From 3bb707bec82ee6104527e217ce9e720b8d288c78 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Wed, 11 May 2022 16:42:25 +0800 Subject: [PATCH] 666 --- .../modules/base/huji/chusheng/cpts/edit.vue | 79 ++++++++++++++----- 1 file changed, 61 insertions(+), 18 deletions(-) diff --git a/src/views/modules/base/huji/chusheng/cpts/edit.vue b/src/views/modules/base/huji/chusheng/cpts/edit.vue index 96c2ecdc..4ad5714a 100644 --- a/src/views/modules/base/huji/chusheng/cpts/edit.vue +++ b/src/views/modules/base/huji/chusheng/cpts/edit.vue @@ -22,6 +22,7 @@ clearable class="resi-cell-select" @change="handleChangeGrid" + :disabled="formType === 'edit'" style="width: 250px" > @@ -79,7 +81,7 @@ - 享受福利 补充居民信息 @@ -157,6 +165,7 @@ show-word-limit placeholder="请输入手机号 " v-model="fmData.mobile" + :disabled="formType === 'edit'" > @@ -172,6 +181,7 @@ placeholder="请输入身份证号" v-model="fmData.idCard" @blur="handleBlurId" + :disabled="formType === 'edit'" > @@ -188,6 +198,7 @@ clearable style="width: 120px" class="resi-cell-select" + :disabled="formType === 'edit'" > @@ -386,6 +398,7 @@ function iniFmData() { idCard: "", isWelfare: "0", //福利0否,1是 isCheck: "0", + isReplace: "0", gender: "", birthplace: "", father: "", @@ -410,6 +423,7 @@ export default { optionsH: [], optionsD: [], optionsG: [], + optionsRelation: [], optionsGender: [ { value: "1", @@ -420,9 +434,9 @@ export default { label: "女", }, ], - optionsRelation: [], fmData: iniFmData(), + checkResult: {}, }; }, components: {}, @@ -490,6 +504,7 @@ export default { } ); if (code === 0) { + this.checkResult = data; if (!data.moveInstatus) { this.$message({ type: "error", @@ -566,11 +581,10 @@ export default { return this.$message.error(res.msg); } else { console.log("获取查询详情成功", res.data); - this.optionsRelation = res.data; + if (res.data) { + this.optionsRelation = res.data; + } } - }) - .catch(() => { - return this.$message.error("网络错误"); }); }, @@ -682,9 +696,6 @@ export default { this.alreadyHaveMaster = false; } } - }) - .catch(() => { - return this.$message.error("网络错误"); }); }, @@ -696,14 +707,18 @@ export default { if (row) { // this.fmData = { ...this.fmData, ...row }; this.getInfo(row.id); + this.getValiheList(); + this.getBuildList(); + this.getUniList(); + this.getHouseList(); } }, async getInfo(id) { const { data, code, msg } = await requestPost( - "/epmetuser/icBirthRecord", + "/epmetuser/icBirthRecord/" + id, { - id, + // id, } ); if (code === 0) { @@ -738,13 +753,37 @@ export default { let url = ""; if (this.formType === "add") { url = "/epmetuser/icBirthRecord/save"; - } else { + } else if (this.formType === "edit") { url = "/epmetuser/icBirthRecord/update"; + } else { + return; + } - this.fmData.orgId = this.orgId; + const { fmData, checkResult } = this; + if ( + fmData.isCheck == "1" && + checkResult.resiHomeId != fmData.homeId && + checkResult.status == "0" + ) { + await this.$confirm( + "居民信息中房屋信息与当前选择房屋不一致,是否更新?", + "提示", + { + confirmButtonText: "更新", + cancelButtonText: "不更新", + type: "warning", + center: true, + } + ) + .then(() => { + this.fmData.isReplace = "1"; + }) + .catch(() => { + this.fmData.isReplace = "0"; + }); } - const { data, code, msg } = await requestPost(url, this.fmData); + const { data, code, msg } = await requestPost(url, fmData); if (code === 0) { this.$message({ @@ -765,7 +804,11 @@ export default { this.$emit("dialogCancle"); }, resetData() { - this.orgId = ""; + this.checkResult = {}; + this.optionsB = []; + this.optionsH = []; + this.optionsD = []; + this.optionsRelation = []; this.fmData = iniFmData(); }, // 开启加载动画