Browse Source

666

shibei_master
dai 3 years ago
parent
commit
3bb707bec8
  1. 79
      src/views/modules/base/huji/chusheng/cpts/edit.vue

79
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"
>
<el-option
@ -48,6 +49,7 @@
class="resi-cell-select"
@clear="handleClearVillage"
@change="handleChangeV"
:disabled="formType === 'edit'"
style="margin-right: 8px; width: 120px"
>
<el-option
@ -65,7 +67,7 @@
clearable
style="margin-right: 8px; width: 120px"
class="resi-cell-select"
:disabled="changeVDisabled"
:disabled="changeVDisabled || formType === 'edit'"
@clear="handleClearBuild"
@change="handleChangeB"
>
@ -79,7 +81,7 @@
</el-select>
<el-select
v-model.trim="fmData.unitId"
:disabled="changeBDisabled"
:disabled="changeBDisabled || formType === 'edit'"
placeholder="单元"
size="small"
clearable
@ -98,7 +100,7 @@
</el-select>
<el-select
v-model.trim="fmData.homeId"
:disabled="changeDDisabled"
:disabled="changeDDisabled || formType === 'edit'"
placeholder="房号"
size="small"
clearable
@ -128,17 +130,23 @@
show-word-limit
style="width: 200px; margin-right: 20px"
placeholder="请输入姓名 "
:disabled="formType === 'edit'"
v-model="fmData.name"
>
</el-input>
<el-checkbox v-model="fmData.isWelfare" true-label="1" false-label="0"
<el-checkbox
v-model="fmData.isWelfare"
:disabled="formType === 'edit'"
true-label="1"
false-label="0"
>享受福利</el-checkbox
>
<el-checkbox
v-model="fmData.isCheck"
true-label="1"
false-label="0"
:disabled="formType === 'edit'"
@change="checkResiAvailable"
>补充居民信息</el-checkbox
>
@ -157,6 +165,7 @@
show-word-limit
placeholder="请输入手机号 "
v-model="fmData.mobile"
:disabled="formType === 'edit'"
>
</el-input>
</el-form-item>
@ -172,6 +181,7 @@
placeholder="请输入身份证号"
v-model="fmData.idCard"
@blur="handleBlurId"
:disabled="formType === 'edit'"
></el-input>
</el-form-item>
@ -188,6 +198,7 @@
clearable
style="width: 120px"
class="resi-cell-select"
:disabled="formType === 'edit'"
>
<el-option
v-for="item in optionsGender"
@ -210,6 +221,7 @@
type="date"
placeholder="出生日期"
value-format="yyyy-MM-dd"
:disabled="formType === 'edit'"
>
</el-date-picker>
</el-form-item>
@ -386,6 +398,7 @@ function iniFmData() {
idCard: "",
isWelfare: "0", //01
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();
},
//

Loading…
Cancel
Save