From f0e3aaa3ab71052db17158d76e1b2e620d581432 Mon Sep 17 00:00:00 2001 From: liuye Date: Mon, 25 Apr 2022 15:39:32 +0800 Subject: [PATCH] bug --- .../AppHelpedResident/AppHelpedResident.vue | 2 +- packages/jianping/AppHelpedResident/hrAdd.vue | 9 +- .../jianping/AppHelpedResident/hrDetail.vue | 148 ++++++++++++------ .../apps/AppPolicyBid/AppPolicyBid.vue | 4 +- 4 files changed, 113 insertions(+), 50 deletions(-) diff --git a/packages/jianping/AppHelpedResident/AppHelpedResident.vue b/packages/jianping/AppHelpedResident/AppHelpedResident.vue index 22468680..551e0da4 100644 --- a/packages/jianping/AppHelpedResident/AppHelpedResident.vue +++ b/packages/jianping/AppHelpedResident/AppHelpedResident.vue @@ -27,7 +27,7 @@ export default { }, created() { this.dict.load("sex", "fpNation", "fpPrtpStatus", "fpHealth", "fpStudentsInSchool", 'fpYesOrNo', "fpRelationship", - "yesOrNo", "fpLaborSkills", "fpEducation", "fpType", "fpPoliticalOutlook", + "yesOrNo", "fpLaborSkills", "fpEducation", "fpType", "fpPoliticalOutlook","fpType", "fpRiskType", "fpPublicWelfarePostAssistance","fpHealthAssistance","fpFnancialAssistance","fpEmploymentAssistance","fpEducationalAssistance","fpIndustrialAssistance","fpSocialAssistance") } } diff --git a/packages/jianping/AppHelpedResident/hrAdd.vue b/packages/jianping/AppHelpedResident/hrAdd.vue index a8823041..d19a0f4c 100644 --- a/packages/jianping/AppHelpedResident/hrAdd.vue +++ b/packages/jianping/AppHelpedResident/hrAdd.vue @@ -304,7 +304,12 @@ export default { params: {id} }).then(res => { if (res?.data) { - this.form = res.data + res.data.healthyStatusList = [] + if(res.data.healthyStatus) { + res.data.healthyStatusList = res.data.healthyStatus.split(',') + } + this.form = {...res.data} + console.log(res.data) } }) }, @@ -315,6 +320,8 @@ export default { submit() { this.$refs.ruleForm.validate(v => { if (v) { + this.form.isHousehold = 1 + this.form.householdIdNumber = this.form.idNumber if (this.form.healthyStatusList.length) { this.form.healthyStatus = this.form.healthyStatusList.join(',') } diff --git a/packages/jianping/AppHelpedResident/hrDetail.vue b/packages/jianping/AppHelpedResident/hrDetail.vue index 6aed700c..d204ee90 100644 --- a/packages/jianping/AppHelpedResident/hrDetail.vue +++ b/packages/jianping/AppHelpedResident/hrDetail.vue @@ -185,9 +185,9 @@ :editable="false" /> - {{ - dict.getLabel("fpHealth", detail.healthyStatus) - }} + + ,{{dict.getLabel("fpHealth", item)}} + @@ -309,7 +309,7 @@ cursor: pointer; font-size: 12px; " - @click="addFamily()" + @click="addFamily({})" >添加 @@ -386,7 +386,7 @@ v-model="form.name" placeholder="请输入姓名" clearable - :disabled="isEdit" + :disabled="isEdit || isSelectUser" > @@ -684,6 +692,10 @@ export default { let { countyName, townName, villageName, currentAddress } = this.detail; return [countyName, townName, villageName, currentAddress].join(""); }, + currentFullAddressFamily() { + let { countyName, townName, villageName, currentAddress } = this.familyInfo; + return [countyName, townName, villageName, currentAddress].join(""); + }, rules() { return { idNumber: [{ required: true, message: "请输入身份证号" }], @@ -708,28 +720,65 @@ export default { detail: {}, currentTab: "", isShowAdd: false, - form: {}, + form: {healthyStatusList: []}, isEdit: false, isShowDetail: false, - familyInfo: {} + familyInfo: {}, + isSelectUser: false }; }, methods: { checkName(e) { - // this.formData.name = e.name - // this.formData.idNumber = e.idNumber - // this.formData.phone = e.phone - // this.formData.areaId = e.householdAreaId + if(!e) { + this.isSelectUser = false + this.form.name = '' + this.form.idNumber = '' + this.form.phone ='' + this.form.areaId = '' + this.form.birthDate = '' + this.form.sex = '' + this.form.age = '' + return + } + this.form.name = e.name + this.form.idNumber = e.idNumber + this.form.phone = e.phone + this.form.areaId = e.householdAreaId + this.handleIdNumberAutocomplete(e.idNumber) + this.isSelectUser = true }, addFamily(row) { + if(row && row.id) { + this.isEdit = true + } + row.healthyStatusList = [] + if(row && row.healthyStatus) { + row.healthyStatusList = row.healthyStatus.split(',') + } this.form = { ...row } this.isShowAdd = true }, viewFamily(row) { + row.healthyStatusList = [] + if(row.healthyStatus) { + row.healthyStatusList = row.healthyStatus.split(',') + } this.familyInfo = {...row} this.isShowDetail = true }, - delFamily() {}, + delFamily(row) { + if(row.isHousehold == 1) { + return this.$message.error('户主信息不允许删除'); + } + this.$confirm("是否删除该家庭成员").then(() => { + this.instance.post(`/app/apppreventionreturntopoverty/delete?ids=${row.id}`).then(res => { + if (res.code == 0) { + this.getDetail() + this.$message.success('删除成功!'); + } + }) + }) + }, handleIdNumberAutocomplete(v) { let { birthday: birthDate, sex } = this.idCardNoUtil.getIdCardInfo(v); this.form = { ...this.form, birthDate, sex, age: this.$calcAge(v) }; @@ -737,20 +786,23 @@ export default { onConfirm() { this.$refs.ruleForm.validate((v) => { if (v) { - // if (this.form.isHousehold == 1) { - // this.form.householdIdNumber = this.form.idNumber - // } - // this.instance.post(`/app/apppreventionreturntopoverty/addOrUpdate`, this.form).then(res => { - // if (res.code == 0) { - // this.$message.success('提交成功!'); - // this.back() - // } - // }) + this.form.isHousehold = 0 + this.form.householdIdNumber = this.detail.idNumber + if (this.form.healthyStatusList.length) { + this.form.healthyStatus = this.form.healthyStatusList.join(',') + } + this.instance.post(`/app/apppreventionreturntopoverty/addOrUpdate`, this.form).then(res => { + if (res.code == 0) { + this.getDetail() + this.$message.success('提交成功!'); + this.isShowAdd = false + } + }) } }); }, onClose() { - this.isShow = false; + this.isShowAdd = false; }, back() { this.$router.push({}); @@ -768,6 +820,10 @@ export default { this.detail.family?.map((e) => { e.householdRelation = e.householdRelation || "户主"; }); + + if(this.detail.healthyStatus) { + this.detail.healthyStatusList = this.detail.healthyStatus.split(',') + } } }); }, diff --git a/project/xiushan/apps/AppPolicyBid/AppPolicyBid.vue b/project/xiushan/apps/AppPolicyBid/AppPolicyBid.vue index 65895ec1..5e1e2422 100644 --- a/project/xiushan/apps/AppPolicyBid/AppPolicyBid.vue +++ b/project/xiushan/apps/AppPolicyBid/AppPolicyBid.vue @@ -38,7 +38,7 @@ @getList="getTableData" :col-configs="colConfigs" :dict="dict"> @@ -98,7 +98,7 @@ export default { }) }, showDetail(row) { - this.dialogTitle = row.classificationName + this.dialogTitle = row.processName this.dialogImgUrl = row.zwspPictureUrl this.dialog = true },