bug
This commit is contained in:
@@ -27,7 +27,7 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.dict.load("sex", "fpNation", "fpPrtpStatus", "fpHealth", "fpStudentsInSchool", 'fpYesOrNo', "fpRelationship",
|
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")
|
"fpPublicWelfarePostAssistance","fpHealthAssistance","fpFnancialAssistance","fpEmploymentAssistance","fpEducationalAssistance","fpIndustrialAssistance","fpSocialAssistance")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -304,7 +304,12 @@ export default {
|
|||||||
params: {id}
|
params: {id}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.data) {
|
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() {
|
submit() {
|
||||||
this.$refs.ruleForm.validate(v => {
|
this.$refs.ruleForm.validate(v => {
|
||||||
if (v) {
|
if (v) {
|
||||||
|
this.form.isHousehold = 1
|
||||||
|
this.form.householdIdNumber = this.form.idNumber
|
||||||
if (this.form.healthyStatusList.length) {
|
if (this.form.healthyStatusList.length) {
|
||||||
this.form.healthyStatus = this.form.healthyStatusList.join(',')
|
this.form.healthyStatus = this.form.healthyStatusList.join(',')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,9 +185,9 @@
|
|||||||
:editable="false"
|
:editable="false"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<el-form-item label="健康状况">{{
|
<el-form-item label="健康状况">
|
||||||
dict.getLabel("fpHealth", detail.healthyStatus)
|
<span v-for="(item, index) in detail.healthyStatusList" :key="index"><span v-if="index > 0">,</span>{{dict.getLabel("fpHealth", item)}}</span>
|
||||||
}}</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
<ai-card title="联络信息">
|
<ai-card title="联络信息">
|
||||||
@@ -309,7 +309,7 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
"
|
"
|
||||||
@click="addFamily()"
|
@click="addFamily({})"
|
||||||
>添加</span
|
>添加</span
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
@@ -386,7 +386,7 @@
|
|||||||
v-model="form.name"
|
v-model="form.name"
|
||||||
placeholder="请输入姓名"
|
placeholder="请输入姓名"
|
||||||
clearable
|
clearable
|
||||||
:disabled="isEdit"
|
:disabled="isEdit || isSelectUser"
|
||||||
>
|
>
|
||||||
<template slot="append">
|
<template slot="append">
|
||||||
<ai-person-select
|
<ai-person-select
|
||||||
@@ -402,7 +402,7 @@
|
|||||||
v-model="form.idNumber"
|
v-model="form.idNumber"
|
||||||
placeholder="请输入身份证号"
|
placeholder="请输入身份证号"
|
||||||
:maxlength="18"
|
:maxlength="18"
|
||||||
:disabled="isEdit"
|
:disabled="isEdit || isSelectUser"
|
||||||
@change="handleIdNumberAutocomplete"
|
@change="handleIdNumberAutocomplete"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -552,6 +552,11 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="健康状况" prop="healthyStatusList">
|
||||||
|
<el-checkbox-group v-model="form.healthyStatusList">
|
||||||
|
<el-checkbox :label="item.dictValue" v-for="(item, index) in dict.getDict('fpHealth')" :key="index">{{item.dictName}}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
<ai-dialog
|
<ai-dialog
|
||||||
@@ -569,74 +574,77 @@
|
|||||||
<div flex class="flex-start">
|
<div flex class="flex-start">
|
||||||
<div flex class="half wrap fill">
|
<div flex class="half wrap fill">
|
||||||
<el-form-item label="身份证号" prop="name">{{
|
<el-form-item label="身份证号" prop="name">{{
|
||||||
detail.idNumber
|
familyInfo.name
|
||||||
|
}}</el-form-item>
|
||||||
|
<el-form-item label="身份证号" prop="name">{{
|
||||||
|
familyInfo.idNumber
|
||||||
}}</el-form-item>
|
}}</el-form-item>
|
||||||
<el-form-item label="性别" prop="sex">{{
|
<el-form-item label="性别" prop="sex">{{
|
||||||
dict.getLabel("sex", detail.sex)
|
dict.getLabel("sex", familyInfo.sex)
|
||||||
}}</el-form-item>
|
}}</el-form-item>
|
||||||
<el-form-item label="出生日期">{{
|
<el-form-item label="出生日期">{{
|
||||||
detail.birthDate
|
familyInfo.birthDate
|
||||||
}}</el-form-item>
|
}}</el-form-item>
|
||||||
<el-form-item label="年龄" prop="age">{{
|
<el-form-item label="年龄" prop="age">{{
|
||||||
detail.age
|
familyInfo.age
|
||||||
}}</el-form-item>
|
}}</el-form-item>
|
||||||
<el-form-item label="联系方式">{{detail.phone}}</el-form-item>
|
<el-form-item label="联系方式">{{familyInfo.phone}}</el-form-item>
|
||||||
<el-form-item label="与户主关系">{{
|
<el-form-item label="与户主关系">{{
|
||||||
dict.getLabel("fpRelationship", detail.householdRelation)
|
dict.getLabel("fpRelationship", familyInfo.householdRelation)
|
||||||
}}</el-form-item>
|
}}</el-form-item>
|
||||||
<el-form-item label="文化程度">{{
|
<el-form-item label="文化程度">{{
|
||||||
dict.getLabel("fpEducation", detail.education)
|
dict.getLabel("fpEducation", familyInfo.education)
|
||||||
}}</el-form-item>
|
}}</el-form-item>
|
||||||
<el-form-item label="民族">{{
|
<el-form-item label="民族">{{
|
||||||
dict.getLabel("fpNation", detail.nation)
|
dict.getLabel("fpNation", familyInfo.nation)
|
||||||
}}</el-form-item>
|
}}</el-form-item>
|
||||||
<el-form-item label="政治面貌"
|
<el-form-item label="政治面貌"
|
||||||
>{{
|
>{{
|
||||||
dict.getLabel("fpPoliticalOutlook", detail.politicsStatus)
|
dict.getLabel("fpPoliticalOutlook", familyInfo.politicsStatus)
|
||||||
}}
|
}}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="在校生状况"
|
<el-form-item label="在校生状况"
|
||||||
>{{ dict.getLabel("fpStudentsInSchool", detail.schoolStatus) }}
|
>{{ dict.getLabel("fpStudentsInSchool", familyInfo.schoolStatus) }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="务工时间(月)" prop="idNumber">{{
|
<el-form-item label="务工时间(月)" prop="idNumber">{{
|
||||||
detail.workeMonths
|
familyInfo.workeMonths
|
||||||
}}</el-form-item>
|
}}</el-form-item>
|
||||||
<el-form-item label="劳动技能"
|
<el-form-item label="劳动技能"
|
||||||
>{{ dict.getLabel("fpLaborSkills", detail.labourStatus) }}
|
>{{ dict.getLabel("fpLaborSkills", familyInfo.labourStatus) }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="务工区域" prop="idNumber">{{
|
<el-form-item label="务工区域" prop="idNumber">{{
|
||||||
detail.workArea
|
familyInfo.workArea
|
||||||
}}</el-form-item>
|
}}</el-form-item>
|
||||||
<el-form-item label="是否参加大病保险"
|
<el-form-item label="是否参加大病保险"
|
||||||
>{{
|
>{{
|
||||||
dict.getLabel("fpYesOrNo", detail.seriousIllnessInsurance)
|
dict.getLabel("fpYesOrNo", familyInfo.seriousIllnessInsurance)
|
||||||
}}
|
}}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否参加基本医保"
|
<el-form-item label="是否参加基本医保"
|
||||||
>{{ dict.getLabel("fpYesOrNo", detail.basicMedicalTreatment) }}
|
>{{ dict.getLabel("fpYesOrNo", familyInfo.basicMedicalTreatment) }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="享受最低生活保障"
|
<el-form-item label="享受最低生活保障"
|
||||||
>{{ dict.getLabel("fpYesOrNo", detail.subsistenceAllowance) }}
|
>{{ dict.getLabel("fpYesOrNo", familyInfo.subsistenceAllowance) }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否参加养老保险"
|
<el-form-item label="是否参加养老保险"
|
||||||
>{{ dict.getLabel("fpYesOrNo", detail.endowmentInsurance) }}
|
>{{ dict.getLabel("fpYesOrNo", familyInfo.endowmentInsurance) }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否特困供养"
|
<el-form-item label="是否特困供养"
|
||||||
>{{ dict.getLabel("fpYesOrNo", detail.specialPovertySupport) }}
|
>{{ dict.getLabel("fpYesOrNo", familyInfo.specialPovertySupport) }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<ai-avatar
|
<ai-avatar
|
||||||
:instance="instance"
|
:instance="instance"
|
||||||
v-model="detail.photo"
|
v-model="familyInfo.photo"
|
||||||
:editable="false"
|
:editable="false"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<el-form-item label="现住址">{{
|
<el-form-item label="现住址">{{
|
||||||
currentFullAddress
|
currentFullAddressFamily
|
||||||
}}</el-form-item>
|
|
||||||
<el-form-item label="健康状况">{{
|
|
||||||
currentFullAddress
|
|
||||||
}}</el-form-item>
|
}}</el-form-item>
|
||||||
|
<el-form-item label="健康状况">
|
||||||
|
<span v-for="(item, index) in familyInfo.healthyStatusList" :key="index"><span v-if="index > 0">,</span>{{dict.getLabel("fpHealth", item)}}</span>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
</template>
|
</template>
|
||||||
@@ -684,6 +692,10 @@ export default {
|
|||||||
let { countyName, townName, villageName, currentAddress } = this.detail;
|
let { countyName, townName, villageName, currentAddress } = this.detail;
|
||||||
return [countyName, townName, villageName, currentAddress].join("");
|
return [countyName, townName, villageName, currentAddress].join("");
|
||||||
},
|
},
|
||||||
|
currentFullAddressFamily() {
|
||||||
|
let { countyName, townName, villageName, currentAddress } = this.familyInfo;
|
||||||
|
return [countyName, townName, villageName, currentAddress].join("");
|
||||||
|
},
|
||||||
rules() {
|
rules() {
|
||||||
return {
|
return {
|
||||||
idNumber: [{ required: true, message: "请输入身份证号" }],
|
idNumber: [{ required: true, message: "请输入身份证号" }],
|
||||||
@@ -708,28 +720,65 @@ export default {
|
|||||||
detail: {},
|
detail: {},
|
||||||
currentTab: "",
|
currentTab: "",
|
||||||
isShowAdd: false,
|
isShowAdd: false,
|
||||||
form: {},
|
form: {healthyStatusList: []},
|
||||||
isEdit: false,
|
isEdit: false,
|
||||||
isShowDetail: false,
|
isShowDetail: false,
|
||||||
familyInfo: {}
|
familyInfo: {},
|
||||||
|
isSelectUser: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkName(e) {
|
checkName(e) {
|
||||||
// this.formData.name = e.name
|
if(!e) {
|
||||||
// this.formData.idNumber = e.idNumber
|
this.isSelectUser = false
|
||||||
// this.formData.phone = e.phone
|
this.form.name = ''
|
||||||
// this.formData.areaId = e.householdAreaId
|
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) {
|
addFamily(row) {
|
||||||
|
if(row && row.id) {
|
||||||
|
this.isEdit = true
|
||||||
|
}
|
||||||
|
row.healthyStatusList = []
|
||||||
|
if(row && row.healthyStatus) {
|
||||||
|
row.healthyStatusList = row.healthyStatus.split(',')
|
||||||
|
}
|
||||||
this.form = { ...row }
|
this.form = { ...row }
|
||||||
this.isShowAdd = true
|
this.isShowAdd = true
|
||||||
},
|
},
|
||||||
viewFamily(row) {
|
viewFamily(row) {
|
||||||
|
row.healthyStatusList = []
|
||||||
|
if(row.healthyStatus) {
|
||||||
|
row.healthyStatusList = row.healthyStatus.split(',')
|
||||||
|
}
|
||||||
this.familyInfo = {...row}
|
this.familyInfo = {...row}
|
||||||
this.isShowDetail = true
|
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) {
|
handleIdNumberAutocomplete(v) {
|
||||||
let { birthday: birthDate, sex } = this.idCardNoUtil.getIdCardInfo(v);
|
let { birthday: birthDate, sex } = this.idCardNoUtil.getIdCardInfo(v);
|
||||||
this.form = { ...this.form, birthDate, sex, age: this.$calcAge(v) };
|
this.form = { ...this.form, birthDate, sex, age: this.$calcAge(v) };
|
||||||
@@ -737,20 +786,23 @@ export default {
|
|||||||
onConfirm() {
|
onConfirm() {
|
||||||
this.$refs.ruleForm.validate((v) => {
|
this.$refs.ruleForm.validate((v) => {
|
||||||
if (v) {
|
if (v) {
|
||||||
// if (this.form.isHousehold == 1) {
|
this.form.isHousehold = 0
|
||||||
// this.form.householdIdNumber = this.form.idNumber
|
this.form.householdIdNumber = this.detail.idNumber
|
||||||
// }
|
if (this.form.healthyStatusList.length) {
|
||||||
// this.instance.post(`/app/apppreventionreturntopoverty/addOrUpdate`, this.form).then(res => {
|
this.form.healthyStatus = this.form.healthyStatusList.join(',')
|
||||||
// if (res.code == 0) {
|
}
|
||||||
// this.$message.success('提交成功!');
|
this.instance.post(`/app/apppreventionreturntopoverty/addOrUpdate`, this.form).then(res => {
|
||||||
// this.back()
|
if (res.code == 0) {
|
||||||
// }
|
this.getDetail()
|
||||||
// })
|
this.$message.success('提交成功!');
|
||||||
|
this.isShowAdd = false
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onClose() {
|
onClose() {
|
||||||
this.isShow = false;
|
this.isShowAdd = false;
|
||||||
},
|
},
|
||||||
back() {
|
back() {
|
||||||
this.$router.push({});
|
this.$router.push({});
|
||||||
@@ -768,6 +820,10 @@ export default {
|
|||||||
this.detail.family?.map((e) => {
|
this.detail.family?.map((e) => {
|
||||||
e.householdRelation = e.householdRelation || "户主";
|
e.householdRelation = e.householdRelation || "户主";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if(this.detail.healthyStatus) {
|
||||||
|
this.detail.healthyStatusList = this.detail.healthyStatus.split(',')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
|
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
|
||||||
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button type="text" @click="showDetail(row)" v-if="row.zwspPictureUrl">详情</el-button>
|
<el-button type="text" @click="showDetail(row)" v-if="row.zwspId">详情</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</ai-table>
|
</ai-table>
|
||||||
@@ -98,7 +98,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
showDetail(row) {
|
showDetail(row) {
|
||||||
this.dialogTitle = row.classificationName
|
this.dialogTitle = row.processName
|
||||||
this.dialogImgUrl = row.zwspPictureUrl
|
this.dialogImgUrl = row.zwspPictureUrl
|
||||||
this.dialog = true
|
this.dialog = true
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user