|
@@ -41,10 +41,9 @@
|
|
|
</zj-form-module>
|
|
|
</zj-form-container>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button v-if="formData.examineStatus == 'WAIT'" size="mini" type="primary"
|
|
|
- @click="audit('OK', data.removeTab)">审核通过</el-button>
|
|
|
- <el-button v-if="formData.examineStatus == 'WAIT'" size="mini" type="danger"
|
|
|
- @click="audit('FAIL', data.removeTab)">审核驳回</el-button>
|
|
|
+ <el-button v-if="formData.examineStatus == 'WAIT' && activeKey == 'examine'" size="mini" type="primary" @click="audit('OK', data.removeTab)">审核通过</el-button>
|
|
|
+ <el-button v-if="formData.examineStatus == 'WAIT' && activeKey == 'examine'" size="mini" type="danger" @click="audit('FAIL', data.removeTab)">审核驳回</el-button>
|
|
|
+ <el-button v-if="activeKey == 'detail'" size="mini" type="primary" @click="update(data.removeTab)">保存</el-button>
|
|
|
<el-button size="mini" @click="data.removeTab()">取 消</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -56,10 +55,11 @@
|
|
|
import TemplatePage from '@/components/template/template-page-1.vue'
|
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
|
import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
|
|
|
-import { memberSlaveBind, memberListPageV2, memberPageExport, getMemberDetail, memberAudit, memberInner } from "@/api/masterManagement";
|
|
|
+import { memberSlaveBind, memberListPageV2, memberPageExport, getMemberDetail, memberAudit, memberInner, update } from "@/api/masterManagement";
|
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
|
+import ImageUpload from '@/components/file-upload'
|
|
|
export default {
|
|
|
- components: { TemplatePage },
|
|
|
+ components: { TemplatePage, ImageUpload },
|
|
|
mixins: [import_mixin, operation_mixin],
|
|
|
data() {
|
|
|
return {
|
|
@@ -80,7 +80,8 @@ export default {
|
|
|
formData: {
|
|
|
type: '工程师',
|
|
|
examineRemark: '',
|
|
|
- examineStatus: ''
|
|
|
+ examineStatus: '',
|
|
|
+ idCardImg: []
|
|
|
},
|
|
|
examineStatus: '',
|
|
|
formDialogaddsf: false,
|
|
@@ -124,11 +125,11 @@ export default {
|
|
|
md: 12,
|
|
|
isShow: true,
|
|
|
name: 'el-input',
|
|
|
- attributes: { placeholder: '请输入', disabled: true },
|
|
|
+ attributes: { placeholder: '请输入' },
|
|
|
formItemAttributes: {
|
|
|
label: '用户名称',
|
|
|
prop: 'nickName',
|
|
|
- rules: []
|
|
|
+ rules: [...required]
|
|
|
}
|
|
|
}, {
|
|
|
md: 12,
|
|
@@ -144,11 +145,11 @@ export default {
|
|
|
md: 12,
|
|
|
isShow: true,
|
|
|
name: 'el-input',
|
|
|
- attributes: { placeholder: '请输入', disabled: true },
|
|
|
+ attributes: { placeholder: '请输入' },
|
|
|
formItemAttributes: {
|
|
|
label: '身份证号码',
|
|
|
prop: 'idCard',
|
|
|
- rules: []
|
|
|
+ rules: [...required]
|
|
|
}
|
|
|
}, {
|
|
|
md: 12,
|
|
@@ -158,13 +159,14 @@ export default {
|
|
|
formItemAttributes: {
|
|
|
label: '身份证',
|
|
|
prop: 'idCardImg',
|
|
|
- rules: []
|
|
|
+ rules: [...required]
|
|
|
},
|
|
|
render: (h, { props, onInput }) => {
|
|
|
var { value } = props
|
|
|
console.log(this.formData.idCardImg)
|
|
|
return (
|
|
|
- this.formData.idCardImg ? <el-image src={this.formData.idCardImg} style='width: 120px;height:120px' preview-src-list={[this.formData.idCardImg]} fit="cover"></el-image> : ''
|
|
|
+ <ImageUpload fileList={this.formData.idCardImg} limit={1} isEdit={true} />
|
|
|
+ // this.formData.idCardImg ? <el-image src={this.formData.idCardImg} style='width: 120px;height:120px' preview-src-list={[this.formData.idCardImg]} fit="cover"></el-image> : ''
|
|
|
)
|
|
|
}
|
|
|
}, {
|
|
@@ -191,7 +193,7 @@ export default {
|
|
|
md: 12,
|
|
|
isShow: true,
|
|
|
name: 'el-input',
|
|
|
- attributes: { placeholder: '请输入', disabled: true },
|
|
|
+ attributes: { placeholder: '请输入' },
|
|
|
formItemAttributes: {
|
|
|
label: '银行卡',
|
|
|
prop: 'bankAccount',
|
|
@@ -303,7 +305,9 @@ export default {
|
|
|
this.imageList = []
|
|
|
this.$nextTick(() => {
|
|
|
getMemberDetail({ id: row.id }).then(res => {
|
|
|
- Object.assign(this.formData, res.data)
|
|
|
+ Object.assign(this.formData, res.data, {
|
|
|
+ idCardImg: [{ url: res.data.idCardImg }],
|
|
|
+ })
|
|
|
res.data.workerImgList.forEach(item=>{
|
|
|
this.imageList.push({
|
|
|
md: 12,
|
|
@@ -345,7 +349,9 @@ export default {
|
|
|
this.guanbi()
|
|
|
this.$nextTick(() => {
|
|
|
getMemberDetail({ id: row.id }).then(res => {
|
|
|
- Object.assign(this.formData, res.data)
|
|
|
+ Object.assign(this.formData, res.data, {
|
|
|
+ idCardImg: [{ url: res.data.idCardImg }],
|
|
|
+ })
|
|
|
})
|
|
|
})
|
|
|
},
|
|
@@ -422,6 +428,20 @@ export default {
|
|
|
this.$refs.pageRef.refreshList()
|
|
|
})
|
|
|
},
|
|
|
+ update(removeTab){
|
|
|
+ update({
|
|
|
+ userId: this.formData.userId,
|
|
|
+ websitId: this.formData.websitId,
|
|
|
+ bankAccount: this.formData.bankAccount,
|
|
|
+ idCard: this.formData.idCard,
|
|
|
+ idCardImg: this.formData.idCardImg[0].url,
|
|
|
+ name: this.formData.nickName
|
|
|
+ }).then(res => {
|
|
|
+ this.$message({ type: 'success', message: '保存成功!' })
|
|
|
+ removeTab('list')
|
|
|
+ this.$refs.pageRef.refreshList()
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|