jiangyy 3 years ago
parent
commit
79aaeb469b
  1. 16
      epmet-oper-web/src/views/modules/yantai/certify.vue
  2. 20
      epmet-oper-web/src/views/modules/yantai/editForm.vue

16
epmet-oper-web/src/views/modules/yantai/certify.vue

@ -122,9 +122,14 @@
align="center"
width="200">
<template slot-scope="scope">
<el-button type="text"
<el-button v-if="scope.row.status === '0'"
type="text"
size="small"
@click="handleEdit(scope.row,'add')">新增</el-button>
<el-button v-if="scope.row.status === '1'"
type="text"
size="small"
@click="handleEdit(scope.row)">修改</el-button>
@click="handleEdit(scope.row,'edit')">修改</el-button>
<el-button type="text"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
@ -294,12 +299,11 @@ export default {
handleSearch () {
this.loadTable()
},
async handleEdit (row) {
async handleEdit (row, editType) {
this.showEdit = true
this.$nextTick(() => {
let editType = row.status === '0' ? 'add' : 'edit'
this.$refs.ref_edit.initForm(editType, row.staffId, row.customerId);
this.$refs.ref_edit.initForm(editType, row);
});
},
dialogCancle () {
@ -307,7 +311,7 @@ export default {
this.showDetail = false
},
dialogOk () {
debugger
this.showEdit = false
this.loadTable()
},

20
epmet-oper-web/src/views/modules/yantai/editForm.vue

@ -17,9 +17,9 @@
<el-form-item label="性别"
prop="gender">
<span v-if="peoForm.gender===0">{{'未知'}}</span>
<span v-if="peoForm.gender===1">{{''}}</span>
<span v-if="peoForm.gender===2">{{''}}</span>
<span v-if="peoForm.gender===0||peoForm.gender==='0'">{{'未知'}}</span>
<span v-if="peoForm.gender===1||peoForm.gender==='1'">{{''}}</span>
<span v-if="peoForm.gender===2||peoForm.gender==='2'">{{''}}</span>
</el-form-item>
<el-form-item label="组织/部门"
prop="orgId">
@ -151,16 +151,22 @@ export default {
},
methods: {
async initForm (formType, staffId, customerId) {
async initForm (formType, row) {
this.startLoading()
this.formType = formType
this.staffId = staffId
this.customerId = customerId
this.customerId = row.customerId
this.getDutyList()
this.getRoleList()
if (formType === 'edit' || formType === 'add') {
if (formType === 'edit') {
this.staffId = row.staffId
await this.xiuGridPeo()
}
if (formType === 'add') {
this.peoForm.name = row.userName
this.peoForm.mobile = row.telephoneNumber
this.peoForm.gender = row.gender
}
if (formType === 'add') {
await this.getAgencyList()

Loading…
Cancel
Save