Browse Source

修改

V1.0
zhaoyongnian 3 years ago
parent
commit
83c10eb75f
  1. 369
      src/views/components/resiForm.vue
  2. 27
      src/views/modules/base/resi.vue

369
src/views/components/resiForm.vue

@ -966,6 +966,9 @@ export default {
form:{
agencyName:this.$store.state.user.agencyName,
agencyId:this.$store.state.user.agencyId,
resiId: '', //
houseMergeId: '', //
categoryId: '', //
gridName:'',
gridId:'', //id
villageId: '', //id
@ -1164,7 +1167,14 @@ export default {
console.log(this.form);
return this.form
},
async old_from(data) {
this.getFormData(data)
await this.getValiheList()
await this.getBuildList()
await this.getUniList()
await this.getHouseList()
await this.getClassInfo()
},
getAllNation(){
//
this.getDictList()
@ -1538,6 +1548,42 @@ export default {
this.getHouseList()
},
handleClick (tab, event) {
// if (!this.form.resiId) {
// return false
// }
// if (event.toElement.innerText == '') {
// await this.residentEduInfo(this.form.resiId)
// } else if (event.toElement.innerText == '') {
// await this.residentHobbyInfo(this.form.resiId)
// } else if (event.toElement.innerText == '') {
// await this.residentReligion(this.form.resiId)
// } else if (event.toElement.innerText == '') {
// await this.getHealthInfoDetailById(this.form.resiId)
// } else if (event.toElement.innerText == '') {
// await this.residentWorkInfo(this.form.resiId)
// } else if (event.toElement.innerText == '') {
// await this.getEconomyDetailById(this.form.resiId)
// } else if (event.toElement.innerText == '') {
// await this.getResideInfoDetailById(this.form.resiId)
// } else if (event.toElement.innerText == '') {
// await this.getFamilyInfoDetailById(this.form.resiId)
// } else if (event.toElement.innerText == '') {
// await this.residentPartyMemberInfo(this.form.resiId)
// } else if (event.toElement.innerText == '') {
// await this.residentEnsureHouse(this.form.resiId)
// } else if (event.toElement.innerText == '') {
// await this.residentUnemployed(this.form.resiId)
// } else if (event.toElement.innerText == '退') {
// await this.getVeteranDetailById(this.form.resiId)
// } else if (event.toElement.innerText == '') {
// await this.residentUnitedFront(this.form.resiId)
// } else if (event.toElement.innerText == '') {
// await this.getVolunteerDetailById(this.form.resiId)
// } else if (event.toElement.innerText == '') {
// await this.residentSpecial(this.form.resiId)
// } else if (event.toElement.innerText == '') {
// await this.getOldPeopleDetailById(this.form.resiId)
// }
},
handleForm () {
let newForm = []
@ -1688,6 +1734,327 @@ export default {
}
},
getFormData(data) {
this.form.categoryId = '111222333',//
this.form.resiId = data.resiId
this.form.buildId = data.houseInfo.buildId
this.form.gridId = data.houseInfo.gridId
this.form.gridName = data.houseInfo.gridName
this.form.homeId = data.houseInfo.homeId
this.form.homeName = data.houseInfo.homeName
this.form.houseMergeId = data.houseInfo.mergeId
this.form.unitId = data.houseInfo.unitId
this.form.villageId = data.houseInfo.villageId
this.form.birthday = data.birthday
this.form.gender = data.gender
this.form.idNum = data.idNum
this.form.localResidenceFlag = data.localResidenceFlag.toString()
this.form.mobile = data.mobile
this.form.name = data.name
this.form.nation = data.nation ? data.nation : ''
this.form.remark = data.remark ? data.remark : ''
if (data.categoryInfo) {
this.form.partyFlag = data.categoryInfo.partyFlag.toString()
this.form.subsistenceAllowanceFlag = data.categoryInfo.subsistenceAllowanceFlag.toString()
this.form.ensureHouseFlag = data.categoryInfo.ensureHouseFlag.toString()
this.form.unemployedFlag = data.categoryInfo.unemployedFlag.toString()
this.form.fertileWomanFlag = data.categoryInfo.fertileWomanFlag.toString()
this.form.veteranFlag = data.categoryInfo.veteranFlag.toString()
this.form.unitedFrontFlag = data.categoryInfo.unitedFrontFlag.toString()
this.form.petitionOfficerFlag = data.categoryInfo.petitionOfficerFlag.toString()
this.form.volunteerFlag = data.categoryInfo.volunteerFlag.toString()
this.form.oldPeopleFlag = data.categoryInfo.oldPeopleFlag.toString()
this.form.emptyNesterFlag = data.categoryInfo.emptyNesterFlag.toString()
this.form.bereavedPersonFlag = data.categoryInfo.bereavedPersonFlag.toString()
this.form.disabledFlag = data.categoryInfo.disabledFlag.toString()
this.form.dementedFlag = data.categoryInfo.dementedFlag.toString()
this.form.disabilityFlag = data.categoryInfo.disabilityFlag.toString()
this.form.seriousIllnessFlag = data.categoryInfo.seriousIllnessFlag.toString()
this.form.chronicDiseaseFlag = data.categoryInfo.chronicDiseaseFlag.toString()
this.form.specialCrowdFlag = data.categoryInfo.specialCrowdFlag.toString()
this.form.tenantFlag = data.categoryInfo.tenantFlag.toString()
this.form.floatingFlag = data.categoryInfo.floatingFlag.toString()
this.form.liveAloneFlag = data.categoryInfo.liveAloneFlag.toString()
}
},
async getClassInfo () {
await this.residentEduInfo(this.form.resiId)
await this.residentHobbyInfo(this.form.resiId)
await this.residentReligion(this.form.resiId)
await this.getHealthInfoDetailById(this.form.resiId)
await this.residentWorkInfo(this.form.resiId)
await this.getEconomyDetailById(this.form.resiId)
await this.getResideInfoDetailById(this.form.resiId)
await this.getFamilyInfoDetailById(this.form.resiId)
await this.residentPartyMemberInfo(this.form.resiId)
await this.residentEnsureHouse(this.form.resiId)
await this.residentUnemployed(this.form.resiId)
await this.getVeteranDetailById(this.form.resiId)
await this.residentUnitedFront(this.form.resiId)
await this.getVolunteerDetailById(this.form.resiId)
await this.residentSpecial(this.form.resiId)
await this.getOldPeopleDetailById(this.form.resiId)
},
//
residentEduInfo(id) {
this.$http.get(`/actual/base/residentEduInfo/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form.eduInfoDto = res.data ? res.data : { //
cultureLevel:'',
eduRemark:''
}
}
})
},
//
residentHobbyInfo(id) {
this.$http.get(`/actual/base/residentHobbyInfo/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form.hobbyInfoDto = res.data ? res.data : { //
hobbyCode:[],//
interestDesc:'',//
hobbyRemark:''//
}
}
})
},
//
residentReligion(id) {
this.$http.get(`/actual/base/residentReligion/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form.religionDto = res.data ? res.data : {
religion:'',
religionRemark:''
}
}
})
},
//
getHealthInfoDetailById(id) {
this.$http.post(`/actual/base/residentHealthInfo/getHealthInfoDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form.healthDto = res.data ? res.data : { //
disabilityCategoryCode:'',//
disabilityLevel:'',//
disabilityNum:'',//
disabilityDesc:'',//
guardianFlag:null,//
specialSkillFlag:null,//:1 :0
workCapacityFlag:null,//:1 :0
voluntaryEducationFlag:null,//:1 :0
illnessCode:'',//code
illnessTime:'',//yyyy-MM-dd
chronicDiseaseCode:'',//code
chronicDiseaseTime:'',//
insuredFlag:'',//:1 :0
selfPayAmount:'',//
deliveranceAmount:'',//
deliveranceTime:'',//
deliveranceNum:'',//
healthRemark:''//
}
}
})
},
//
residentWorkInfo(id) {
this.$http.get(`/actual/base/residentWorkInfo/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form.workInfoDto = res.data ? res.data : { //
workUnit:'',//
occupation:'',//
retireTime:'',//退
workRemark:'',//
}
}
})
},
//
getEconomyDetailById(id) {
this.$http.post(`/actual/base/residentEconomy/getEconomyDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form.economyDto = res.data ? res.data : {//
retirementAmount:'',//退
monthIncome:'',//
}
}
})
},
//
getResideInfoDetailById(id) {
this.$http.post(`/actual/base/residentResideInfo/getResideInfoDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form.resideInfoDto = res.data ? res.data : {//
nativePlace:'',//
placeOfDomicile:'',//
currentResidence:'',//
householdSituation:'',//code
resiRemark:'',//
}
}
})
},
//
getFamilyInfoDetailById(id) {
this.$http.post(`/actual/base/residentFamilyInfo/getFamilyInfoDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form.familyInfoDto = res.data ? res.data : {//
houseHolderRel:'',//
resideSituation:'',//
marriage:'',//
spouseSituation:'',//
elderlyFlag:null,//:1 :0
elderlyRelation:'',//
dependantMobile:'',//
familyInfoRemark:'',//
}
}
})
},
//
residentPartyMemberInfo(id) {
this.$http.get(`/actual/base/residentPartyMemberInfo/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form.parymemberInfoDto = res.data ? res.data : {//
joinTime:'',//yyyy-MM-dd
positiveTime:'',//yyyy-MM-dd
branchId:'',//
flowFlag:null,//10
flowActNum:'',//
partyJob:'',//code
retiredFlag:null,//退10
centerFlag:null,//10
joinBranchName:'',//
joinCommunityTime:'',//yyyy-MM-dd
longHolidayFlag:null,//10
}
}
})
},
//
residentEnsureHouse(id) {
this.$http.get(`/actual/base/residentEnsureHouse/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form.ensureHouseDto = res.data ? res.data : {//
housingNature:'',//code
securityType:'',//
certificateDate:'',//yyyy-MM-dd
subsidyNum:'',//
subsidyAmount:'',//
}
}
})
},
//
residentUnemployed(id) {
this.$http.get(`/actual/base/residentUnemployed/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form.unemployedDto = res.data ? res.data : {//
originWorkUnit:'',//
unemploymentTime:'',//yyyy-MM-dd
unemploymentNum:'',//
employmentNum:'',//
specialSkill:'',//
unemploymentReason:'',//code
employmentHardFlag:null,//10
employmentWish:'',//
}
}
})
},
// 退
getVeteranDetailById(id) {
this.$http.post(`/actual/base/residentVeteran/getVeteranDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form.veteranDto = res.data ? res.data : {//退
joinArmyTime:'',//
leaveArmyTime:'',//退
serviceUnit:'',//
receiveUnit:'',//
settlementAmount:'',//
trainDesc:'',//
employmentSituation:'',//
joinWarStartTime:'',//yyyy-MM-dd
joinWarEndTime:'',//yyyy-MM-dd
pubWelfareJobFlag:null,//;10
}
}
})
},
//
residentUnitedFront(id) {
this.$http.get(`/actual/base/residentUnitedFront/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form.unitedFrontDto = res.data ? res.data : {//
duty:'',//
visitation:'',//
}
}
})
},
//
getVolunteerDetailById(id) {
this.$http.post(`/actual/base/residentVolunteer/getVolunteerDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form.volunteerDto = res.data ? res.data : {//
volunteerCategory:[],//
volunteerRemark:''//
}
}
})
},
//
getOldPeopleDetailById(id) {
this.$http.post(`/actual/base/residentOldPeople/getOldPeopleDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form.oldPeopleDto = res.data ? res.data : {
oldSubsidy:''//
}
}
})
},
//
residentSpecial(id) {
this.$http.get(`/actual/base/residentSpecial/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form.specialDto = res.data ? res.data : {//
specialCategoryCode:[]//,
}
}
})
}
}
}
</script>

27
src/views/modules/base/resi.vue

@ -1112,8 +1112,20 @@ export default {
this.editUserId = row.resiId;
this.formName = "编辑居民";
this.dialogVisible = true;
await this.residentBaseInfo();
},
//
residentBaseInfo () {
this.$http.post(`/actual/base/residentBaseInfo/detail/${this.editUserId}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.$refs.baseForm.old_from(res.data);
}
}).catch((err) => {
return this.$message.error("网络错误");
});
},
handlerReset() {
this.$refs.baseForm.resetForm();
},
@ -1218,8 +1230,7 @@ export default {
return finalArr;
},
async handleEditSUbmit() {
const arr = await this.formetForm();
if (arr) this.submitEdit(arr);
this.handleSUbmit()
},
async handleSUbmit() {
@ -1249,12 +1260,12 @@ export default {
(_baseForm.disabilityFlag = parseInt(_baseForm.disabilityFlag)), //
(_baseForm.seriousIllnessFlag = parseInt(_baseForm.seriousIllnessFlag)), //
(_baseForm.chronicDiseaseFlag = parseInt(_baseForm.chronicDiseaseFlag)); //
if ((_baseForm.hobbyInfoDto.hobbyCode = [])) {
if ((_baseForm.hobbyInfoDto.hobbyCode = [])) {
_baseForm.hobbyInfoDto.hobbyCode = "";
} else {
_baseForm.hobbyInfoDto.hobbyCode.forEach((element) => {
_baseForm.hobbyInfoDto.hobbyCode =
_baseForm.hobbyInfoDto.hobbyCode + "," + element;
_baseForm.hobbyInfoDto.hobbyCode ? _baseForm.hobbyInfoDto.hobbyCode + "," + element : _baseForm.hobbyInfoDto.hobbyCode;
});
}
if ((_baseForm.volunteerDto.volunteerCategory = [])) {
@ -1262,7 +1273,7 @@ export default {
} else {
_baseForm.volunteerDto.volunteerCategory.forEach((element) => {
_baseForm.volunteerDto.volunteerCategory =
_baseForm.volunteerDto.volunteerCategory + "," + element;
_baseForm.volunteerDto.volunteerCategory ? _baseForm.volunteerDto.volunteerCategory + "," + element : _baseForm.volunteerDto.volunteerCategory;
});
}
if ((_baseForm.specialDto.specialCategoryCode = [])) {
@ -1270,7 +1281,7 @@ export default {
} else {
_baseForm.specialDto.specialCategoryCode.forEach((element) => {
_baseForm.specialDto.specialCategoryCode =
_baseForm.specialDto.specialCategoryCode + "," + element;
_baseForm.specialDto.specialCategoryCode ? _baseForm.specialDto.specialCategoryCode + "," + element : _baseForm.specialDto.specialCategoryCode;
});
}
this.submitAdd(_baseForm);
@ -1318,7 +1329,7 @@ export default {
async submitAdd(arr) {
this.btnLoading = true;
await this.$http
.post("/actual/base/residentBaseInfo/save", arr)
.post(arr.resiId ? "actual/base/residentBaseInfo/update" : "/actual/base/residentBaseInfo/save", arr)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);

Loading…
Cancel
Save