From edc66961461d93ed675ebd945b222f3b7e13bac7 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Sat, 9 Mar 2024 14:05:30 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=B1=85=E6=B0=91=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=85=A5=E5=8F=82=E9=94=99=E8=AF=AF,=E5=8A=A0loading,=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=B1=85=E6=B0=91=E5=A6=82=E6=9E=9C=E8=AF=81=E4=BB=B6?= =?UTF-8?q?=E5=8F=B7=E5=B7=B2=E5=AD=98=E5=9C=A8=E4=BC=9A=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/addResi.vue | 37 ++++- src/views/components/editResi.vue | 143 ++++++++++-------- src/views/modules/base/resi.vue | 3 + .../modules/portrayal/jumin/cpts/staffTag.vue | 2 +- src/views/modules/portrayal/jumin/index.vue | 92 +++++------ 5 files changed, 166 insertions(+), 111 deletions(-) diff --git a/src/views/components/addResi.vue b/src/views/components/addResi.vue index 61186dc07..8ef63d166 100644 --- a/src/views/components/addResi.vue +++ b/src/views/components/addResi.vue @@ -1185,6 +1185,8 @@ export default { }, handleValidBlur() { if (this.form.baseInfoDto.idType != 1) return + this.getResidentInfoByIdNum() + if (!isCard(this.form.baseInfoDto.idNum) && !isPassport(this.form.baseInfoDto.idNum)) return const { user } = this.$store.state let huji = '', i = 0 @@ -1206,6 +1208,36 @@ export default { } }, + async getResidentInfoByIdNum(){ + try { + let url = '/actual/base/residentBaseInfo/getResidentInfoByIdNum' + let parm = { + idType: this.form.baseInfoDto.idType, + idNum: this.form.baseInfoDto.idNum + } + let { code, data, msg } = await requestGet(url,parm) + if (code == 0 && data != null) { + this.$confirm(`该居民已存在于“${data.name}”是否继续填写`, { + confirmButtonText: '前往修改', + cancelButtonText: '继续填写', + type: 'warning' + }).then(() => { + this.$router.push({ name: 'edit-resi', query: { id: data.id }, params: { idNum: data.idNum, mobile: data.mobile } }); + + }).catch(() => { + + }); + + } else if (code >= 8000) { + this.$message.error(msg); + this.btnLoading = false; + } + } + catch (error) { + // this.$message.error(msg); + console.log(msg); + } + }, handleLocalRadio(e) { if (e.target.type === 'radio') return this.form.baseInfoDto.localResidenceFlag = this.form.baseInfoDto.localResidenceFlag === 0 ? 1 : 0; @@ -1270,6 +1302,7 @@ export default { }) }, async submitForm(house) { + this.btnLoading = true; try { let url = '/actual/base/residentBaseInfo/save' let parm = { @@ -1287,14 +1320,16 @@ export default { this.$refs['addForm'].resetFields(); this.form.resideInfoDtos = homeArr } + this.btnLoading = false; + } else if (code >= 8000) { this.$message.error(msg); + this.btnLoading = false; } } catch (error) { this.$message.error(msg); } - }, showDialog({ index, value }, event) { if (value == 1) { diff --git a/src/views/components/editResi.vue b/src/views/components/editResi.vue index 658131db1..bbe7d1f13 100644 --- a/src/views/components/editResi.vue +++ b/src/views/components/editResi.vue @@ -61,7 +61,7 @@ - + - + - + - + - + - + @@ -248,13 +248,13 @@
- + - + - + - + - + @@ -287,7 +287,7 @@ - + @@ -299,7 +299,7 @@ - + @@ -311,13 +311,13 @@ - + - + - + - + @@ -341,7 +341,7 @@ - + {{ item.label @@ -350,7 +350,7 @@ - + {{ item.label @@ -359,7 +359,7 @@ - + - + {{ item.label @@ -379,7 +379,7 @@ - + - + @@ -404,9 +404,9 @@ 取消 - 保存 + 保存 提交并补充家庭人员信息 + @click="handleClickSubmit('house')" :loading="btnLoading">提交并补充家庭人员信息 @@ -426,7 +426,7 @@ import resiExpand from './resiExpand/editExpand.vue'; export default { data() { return { - loading: true, + loading: false, houseType: true, formList: [], @@ -1056,6 +1056,7 @@ export default { }, async activated() { this.resiId = this.$route.query.id; + this.loading = true; await this.getDicts() await this.getOrgTreeList() await this.getResiDetail() @@ -1146,9 +1147,11 @@ export default { } } this.workInfoDtoId=this.form.workInfoDto.id; + this.loading = false; return Promise.all(promises); } else if (res.data.code >= 8000) { this.$message.error(res.data.msg); + this.loading = false; } }) .then(() => { @@ -1156,7 +1159,6 @@ export default { .catch((err) => { console.log(err); }); - this.loading = false; }, async getDicts() { @@ -1442,47 +1444,62 @@ export default { }); }, handleClickSubmit(house) { - this.$refs['editForm'].validate((valid) => { - if (valid) { - this.form.resideInfoDtos.forEach(item => { - delete item.optionsV; - delete item.optionsB; - delete item.optionsH; - delete item.optionsD; - }); - delete this.form.integrityData; - this.submitForm(house); - } - }) + // this.$refs['editForm'].validate((valid) => { + // if (valid) { + // this.form.resideInfoDtos.forEach(item => { + // delete item.optionsV; + // delete item.optionsB; + // delete item.optionsH; + // delete item.optionsD; + // }); + // delete this.form.integrityData; + // this.submitForm(house); + // } + // }) + this.submitForm(house); }, async submitForm(house) { - try { - let url = this.houseType ? '/actual/base/residentBaseInfo/update' : '/actual/base/residentBaseInfo/save'; - let parm = { - ...this.form - } - let { code, data, msg } = await requestPost(url, parm) - if (code == 0) { - if (house != 'house') { - this.$message.success('保存成功'); - this.$refs['editForm'].resetFields(); - this.handlerCancle(); - } else { - this.$message.success('保存成功'); let homeArr = JSON.parse(JSON.stringify(this.form.resideInfoDtos)); this.$refs['editForm'].resetFields(); this.form.resideInfoDtos = homeArr; - this.removeIdKey(this.form) - this.houseType = false - } + for (let key in this.form.baseInfoDto.categoryInfo) { + if (this.form.baseInfoDto.categoryInfo[key] === 1) { + this.form.baseInfoDto.categoryInfo[key] = 0; + } + } + this.removeIdKey(this.form); + this.houseType = false; + this.btnLoading = true; + + // try { + // let url = this.houseType ? '/actual/base/residentBaseInfo/update' : '/actual/base/residentBaseInfo/save'; + // let parm = { + // ...this.form + // } + // let { code, data, msg } = await requestPost(url, parm) + // if (code == 0) { + // if (house != 'house') { + // this.$message.success('保存成功'); + // this.$refs['editForm'].resetFields(); + // this.handlerCancle(); + // } else { + // this.$message.success('保存成功'); + // let homeArr = JSON.parse(JSON.stringify(this.form.resideInfoDtos)); + // this.$refs['editForm'].resetFields(); + // this.form.resideInfoDtos = homeArr; + // this.removeIdKey(this.form) + // this.houseType = false + // } + + // } else if (code >= 8000) { + // this.$message.error(msg); + // } + // } + // catch (error) { + // this.$message.error(msg); + // } + this.btnLoading = false; - } else if (code >= 8000) { - this.$message.error(msg); - } - } - catch (error) { - this.$message.error(msg); - } }, removeIdKey(obj) { if (!obj || typeof obj !== 'object') { @@ -1501,7 +1518,6 @@ export default { }, showDialog({ index, value }, event) { - console.log(value); // 设置 partyFlag if (value === 1 || value === 0 || value === 2) { this.form.baseInfoDto.categoryInfo.partyFlag = value; @@ -1545,6 +1561,7 @@ export default { }); this.$refs['resiExpand'].formType = this.incidence[value].formType; this.$refs['resiExpand'].showForm(); + console.log(this.form,'tianjiawanzujian'); }); } else { this.$refs['resiExpand'].formList = this.$refs['resiExpand'].formList.filter(item => item.formId !== this.incidence[value].formId); diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index cfe2b938c..21103fcc9 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -588,6 +588,9 @@ export default { for (const n in this.$refs.myResiSearch.form) { this.$refs.myResiSearch.form[n] = ""; } + this.$refs.myResiSearch.form.healthStatus = []; + this.$refs.myResiSearch.form.attentionCrowds = []; + this.$refs.myResiSearch.form.specialCategoryCodes = []; this.currentPage = 1 this.$refs.myResiSearch.level = '' this.getTableData(); diff --git a/src/views/modules/portrayal/jumin/cpts/staffTag.vue b/src/views/modules/portrayal/jumin/cpts/staffTag.vue index 883fddd82..74fc9c442 100644 --- a/src/views/modules/portrayal/jumin/cpts/staffTag.vue +++ b/src/views/modules/portrayal/jumin/cpts/staffTag.vue @@ -161,7 +161,7 @@ export default { const { data } = await this.$http.post('sys/dict/data/dictlist', { dictType: 'special_resident_category' }); this.formData.tableData[3].option = data.data } catch (error) { - console.log(error, `获取 ${dictType} 字典`); + console.log(error); } }, updatedForm() { diff --git a/src/views/modules/portrayal/jumin/index.vue b/src/views/modules/portrayal/jumin/index.vue index 0281697e5..e2475a368 100644 --- a/src/views/modules/portrayal/jumin/index.vue +++ b/src/views/modules/portrayal/jumin/index.vue @@ -326,9 +326,10 @@ = 1 && + resiDetailObj.workInfoDto.careerStatus <= 5 " >
工作单位:
@@ -343,7 +344,7 @@ = 1 && + resiDetailObj.workInfoDto.careerStatus <= 5 " >
@@ -382,10 +384,10 @@
失业时间:
@@ -400,9 +402,10 @@ = 1 && + resiDetailObj.workInfoDto.careerStatus <= 5 " >
@@ -419,10 +422,10 @@
失业证号:
@@ -438,10 +441,9 @@ :span="6" class="f-flex" v-if=" - resiDetailObj.workInfoDto && + resiDetailObj.workInfoDto && (resiDetailObj.workInfoDto.careerStatus == 0 || - resiDetailObj.workInfoDto.careerStatus == 6) - + resiDetailObj.workInfoDto.careerStatus == 6) " >
失业原因:
@@ -456,9 +458,10 @@ = 1 && + resiDetailObj.workInfoDto.careerStatus <= 5 " >
有无赡养人:
@@ -478,10 +481,9 @@ :span="6" class="f-flex" v-if=" - resiDetailObj.workInfoDto && + resiDetailObj.workInfoDto && (resiDetailObj.workInfoDto.careerStatus == 0 || - resiDetailObj.workInfoDto.careerStatus == 6) - + resiDetailObj.workInfoDto.careerStatus == 6) " >
再就业优惠证号:
@@ -500,7 +502,7 @@ v-if=" resiDetailObj.workInfoDto && (resiDetailObj.workInfoDto.careerStatus == 0 || - resiDetailObj.workInfoDto.careerStatus == 6) + resiDetailObj.workInfoDto.careerStatus == 6) " > @@ -515,7 +517,7 @@
是否领取失业金:
- + {{ resiDetailObj.unemployedDto.unempCompensationFlag != null ? resiDetailObj.unemployedDto.unempCompensationFlag === 0 @@ -530,7 +532,7 @@
是否就业困难对象:
- + {{ resiDetailObj.unemployedDto.employmentHardFlag != null ? resiDetailObj.unemployedDto.employmentHardFlag === 0 @@ -542,32 +544,29 @@ }} -- -
劳动就业愿望:
{{ - resiDetailObj.workInfoDto - ? resiDetailObj.workInfoDto.employmentWish + resiDetailObj.workInfoDto ? resiDetailObj.workInfoDto.employmentWish + ? resiDetailObj.workInfoDto.employmentWish + : "--" : "--" - : "--" - }} - + }}
- - + resiDetailObj.workInfoDto.careerStatus == 6) + " + class="f-m-top23" + > +
有无赡养人:
{{ @@ -661,7 +660,7 @@ import { idTypeList } from "@/js/columns/constants"; export default { data() { return { - loading: true, + loading: false, checkType: "edit", //edit或者view changeRecordList: [], //更新记录 resiDetailObj: {}, //居民详情 @@ -1257,7 +1256,6 @@ export default { .catch((err) => { console.log(err); }); - this.loading = false; }, handelClickJumpEdit() { this.checkType = "edit"; @@ -1477,8 +1475,10 @@ export default { formCode: "resi_base_info", }); this.houseHolderRelArr = data.data; + this.loading = false; } catch (error) { console.log(error, "获取与户主关系"); + this.loading = false; } }, houseHolderRelText(index) { @@ -1509,6 +1509,7 @@ export default { watch: { "$store.state.huaXiang.userInfo.resiId": { handler(newValue, oldValue) { + this.loading = true; this.resiId = newValue; this.resiDetailObj = {}; this.getNationalityList(); @@ -1519,7 +1520,6 @@ export default { this.getChangeRecordDetailById(); this.getHouseholdSituation(); this.gethouseHolderRel(); - this.loading = false; }, deep: true, // 开启深度监听 immediate: true, // 立即触发一次handler From 9ed056d63be269fc405640a7fccf9a26b01102c6 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Sat, 9 Mar 2024 14:08:31 +0800 Subject: [PATCH 2/3] 1 --- src/views/components/editResi.vue | 3697 +++++++++++++++++------------ 1 file changed, 2144 insertions(+), 1553 deletions(-) diff --git a/src/views/components/editResi.vue b/src/views/components/editResi.vue index bbe7d1f13..a75a8ba0d 100644 --- a/src/views/components/editResi.vue +++ b/src/views/components/editResi.vue @@ -1,1614 +1,2205 @@