初始化

master
法外狂徒张三 2024-09-09 22:46:24 +08:00
parent e5e0b07ff3
commit 965ff43345
1 changed files with 104 additions and 0 deletions

View File

@ -37,6 +37,7 @@
</el-form> </el-form>
<el-button @click="dialogFormVisible = true">充值</el-button> <el-button @click="dialogFormVisible = true">充值</el-button>
<el-button @click="handleAdd" v-hasPermi="['ruleEngine:firminfo:add']"></el-button>
<el-dialog title="充值" :visible.sync="dialogFormVisible"> <el-dialog title="充值" :visible.sync="dialogFormVisible">
<el-form :model="pay"> <el-form :model="pay">
@ -48,6 +49,39 @@
<button @click="topup()"></button> <button @click="topup()"></button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 添加或修改firmList对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="企业名称" prop="firmTem">
<el-input v-model="form.firmTem" placeholder="请输入企业名称" />
</el-form-item>
<el-form-item label="姓名" prop="names">
<el-input v-model="form.names" placeholder="请输入姓名" />
</el-form-item>
<el-form-item label="职位" prop="position">
<el-input v-model="form.position" placeholder="请输入职位" />
</el-form-item>
<el-form-item label="公司所在省市区" prop="firmRegion">
<el-input v-model="form.firmRegion" placeholder="请输入公司所在省市区" />
</el-form-item>
<el-form-item label="公司详细地址" prop="firmFrom">
<el-input v-model="form.firmFrom" placeholder="请输入公司详细地址" />
</el-form-item>
<el-form-item label="社会信誉" prop="socialReputation">
<el-input v-model="form.socialReputation" placeholder="请输入社会信誉" />
</el-form-item>
<el-form-item label="营业执照" prop="businessLicense">
<el-input v-model="form.businessLicense" placeholder="请输入营业执照" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -58,6 +92,7 @@ import userAvatar from "../../system/user/profile/userAvatar.vue";
import {pay} from "../../../api/market/apitype"; import {pay} from "../../../api/market/apitype";
export default { export default {
open: false,
name: "Firminfo", name: "Firminfo",
components: {userAvatar}, components: {userAvatar},
computed: { computed: {
@ -67,16 +102,85 @@ export default {
}, },
data() { data() {
return { return {
title: "",
dialogFormVisible:false, dialogFormVisible:false,
firminfoForm:{}, firminfoForm:{},
pay:{}, pay:{},
firminfo:{}, firminfo:{},
queryParams: {
pageNum: 1,
pageSize: 10,
firmAvatr: null,
createdName: null,
phone: null,
firmTem: null,
names: null,
position: null,
firmRegion: null,
firmFrom: null,
socialReputation: null,
businessLicense: null,
firmTime: null,
firmScore: null
},
form: {},
rules: {
},
open: false,
}; };
}, },
created() { created() {
this.getFirminfo() this.getFirminfo()
}, },
methods: { methods: {
reset() {
this.form = {
firmId: null,
firmAvatr: null,
createdName: null,
phone: null,
firmTem: null,
names: null,
position: null,
firmRegion: null,
firmFrom: null,
socialReputation: null,
businessLicense: null,
firmTime: null,
firmScore: null
};
this.resetForm("form");
},
cancel() {
this.open = false;
this.reset();
},
handleAdd() {
this.reset();
this.open = true;
this.title = "添加firmList";
},
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.firmId != null) {
updateFirminfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addFirminfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
getFirminfo() { getFirminfo() {
getFirminfo().then(response => { getFirminfo().then(response => {
this.firminfoForm = response.data; this.firminfoForm = response.data;