Browse Source

修改

feature
zhaoyongnian 3 years ago
parent
commit
ceb934f94b
  1. 367
      src/views/components/resiForm.vue
  2. 56
      src/views/modules/base/resi.vue

367
src/views/components/resiForm.vue

@ -962,7 +962,7 @@ export default {
} }
], ],
newForm: {},
form:{ form:{
agencyName:this.$store.state.user.agencyName, agencyName:this.$store.state.user.agencyName,
agencyId:this.$store.state.user.agencyId, agencyId:this.$store.state.user.agencyId,
@ -1151,10 +1151,13 @@ export default {
this.getGridList() this.getGridList()
this.getAllNation() this.getAllNation()
this.setNewForm()
}, },
methods: { methods: {
submit_from(){ submit_from(){
this.setJSON()
var flag = false var flag = false
this.$refs.formId.validate(v=>{ this.$refs.formId.validate(v=>{
this.validateFlag = v this.validateFlag = v
@ -1162,10 +1165,9 @@ export default {
}) })
if(flag){ if(flag){
return this.form return this.newForm
} }
console.log(this.form); return this.newForm
return this.form
}, },
async old_from(data) { async old_from(data) {
this.getFormData(data) this.getFormData(data)
@ -1173,7 +1175,8 @@ export default {
await this.getBuildList() await this.getBuildList()
await this.getUniList() await this.getUniList()
await this.getHouseList() await this.getHouseList()
await this.getClassInfo() // await this.getClassInfo()
await this.residentEduInfo(this.form.resiId)
}, },
getAllNation(){ getAllNation(){
// //
@ -1547,43 +1550,104 @@ export default {
this.form.homeId = '' this.form.homeId = ''
this.getHouseList() this.getHouseList()
}, },
handleClick (tab, event) { async handleClick (tab, event) {
// if (!this.form.resiId) { if (event.toElement.innerText == '教育') {
// return false if (!this.form.resiId) {
// } this.newForm.eduInfoDto = this.form.eduInfoDto
// if (event.toElement.innerText == '') { } else {
// await this.residentEduInfo(this.form.resiId) await this.residentEduInfo(this.form.resiId)
// } else if (event.toElement.innerText == '') { }
// await this.residentHobbyInfo(this.form.resiId) } else if (event.toElement.innerText == '兴趣爱好') {
// } else if (event.toElement.innerText == '') { if (!this.form.resiId) {
// await this.residentReligion(this.form.resiId) this.newForm.hobbyInfoDto = this.form.hobbyInfoDto
// } else if (event.toElement.innerText == '') { } else {
// await this.getHealthInfoDetailById(this.form.resiId) await this.residentHobbyInfo(this.form.resiId)
// } else if (event.toElement.innerText == '') { }
// await this.residentWorkInfo(this.form.resiId) } else if (event.toElement.innerText == '宗教信仰') {
// } else if (event.toElement.innerText == '') { if (!this.form.resiId) {
// await this.getEconomyDetailById(this.form.resiId) this.newForm.religionDto = this.form.religionDto
// } else if (event.toElement.innerText == '') { } else {
// await this.getResideInfoDetailById(this.form.resiId) await this.residentReligion(this.form.resiId)
// } else if (event.toElement.innerText == '') { }
// await this.getFamilyInfoDetailById(this.form.resiId) } else if (event.toElement.innerText == '健康') {
// } else if (event.toElement.innerText == '') { if (!this.form.resiId) {
// await this.residentPartyMemberInfo(this.form.resiId) this.newForm.healthDto = this.form.healthDto
// } else if (event.toElement.innerText == '') { } else {
// await this.residentEnsureHouse(this.form.resiId) await this.getHealthInfoDetailById(this.form.resiId)
// } else if (event.toElement.innerText == '') { }
// await this.residentUnemployed(this.form.resiId) } else if (event.toElement.innerText == '工作') {
// } else if (event.toElement.innerText == '退') { if (!this.form.resiId) {
// await this.getVeteranDetailById(this.form.resiId) this.newForm.workInfoDto = this.form.workInfoDto
// } else if (event.toElement.innerText == '') { } else {
// await this.residentUnitedFront(this.form.resiId) await this.residentWorkInfo(this.form.resiId)
// } else if (event.toElement.innerText == '') { }
// await this.getVolunteerDetailById(this.form.resiId) } else if (event.toElement.innerText == '经济情况') {
// } else if (event.toElement.innerText == '') { if (!this.form.resiId) {
// await this.residentSpecial(this.form.resiId) this.newForm.economyDto = this.form.economyDto
// } else if (event.toElement.innerText == '') { } else {
// await this.getOldPeopleDetailById(this.form.resiId) await this.getEconomyDetailById(this.form.resiId)
// } }
} else if (event.toElement.innerText == '居住') {
if (!this.form.resiId) {
this.newForm.resideInfoDto = this.form.resideInfoDto
} else {
await this.getResideInfoDetailById(this.form.resiId)
}
} else if (event.toElement.innerText == '家庭') {
if (!this.form.resiId) {
this.newForm.familyInfoDto = this.form.familyInfoDto
} else {
await this.getFamilyInfoDetailById(this.form.resiId)
}
} else if (event.toElement.innerText == '党员信息') {
if (!this.form.resiId) {
this.newForm.parymemberInfoDto = this.form.parymemberInfoDto
} else {
await this.residentPartyMemberInfo(this.form.resiId)
}
} else if (event.toElement.innerText == '保障房信息') {
if (!this.form.resiId) {
this.newForm.ensureHouseDto = this.form.ensureHouseDto
} else {
await this.residentEnsureHouse(this.form.resiId)
}
} else if (event.toElement.innerText == '失业') {
if (!this.form.resiId) {
this.newForm.unemployedDto = this.form.unemployedDto
} else {
await this.residentUnemployed(this.form.resiId)
}
} else if (event.toElement.innerText == '退役军人') {
if (!this.form.resiId) {
this.newForm.veteranDto = this.form.veteranDto
} else {
await this.getVeteranDetailById(this.form.resiId)
}
} else if (event.toElement.innerText == '统战') {
if (!this.form.resiId) {
this.newForm.unitedFrontDto = this.form.unitedFrontDto
} else {
await this.residentUnitedFront(this.form.resiId)
}
} else if (event.toElement.innerText == '志愿者信息') {
if (!this.form.resiId) {
this.newForm.volunteerDto = this.form.volunteerDto
} else {
await this.getVolunteerDetailById(this.form.resiId)
}
} else if (event.toElement.innerText == '特殊人群') {
if (!this.form.resiId) {
this.newForm.specialDto = this.form.specialDto
} else {
await this.residentSpecial(this.form.resiId)
}
} else if (event.toElement.innerText == '老年人') {
if (!this.form.resiId) {
this.newForm.oldPeopleDto = this.form.oldPeopleDto
} else {
await this.getOldPeopleDetailById(this.form.resiId)
}
}
}, },
handleForm () { handleForm () {
let newForm = [] let newForm = []
@ -1776,24 +1840,48 @@ export default {
this.form.floatingFlag = data.categoryInfo.floatingFlag.toString() this.form.floatingFlag = data.categoryInfo.floatingFlag.toString()
this.form.liveAloneFlag = data.categoryInfo.liveAloneFlag.toString() this.form.liveAloneFlag = data.categoryInfo.liveAloneFlag.toString()
} }
}, let old_Form = {
async getClassInfo () { categoryId: '111222333',//
await this.residentEduInfo(this.form.resiId) resiId: data.resiId,
await this.residentHobbyInfo(this.form.resiId) buildId: data.houseInfo.buildId,
await this.residentReligion(this.form.resiId) gridId: data.houseInfo.gridId,
await this.getHealthInfoDetailById(this.form.resiId) gridName: data.houseInfo.gridName,
await this.residentWorkInfo(this.form.resiId) homeId: data.houseInfo.homeId,
await this.getEconomyDetailById(this.form.resiId) homeName: data.houseInfo.homeName,
await this.getResideInfoDetailById(this.form.resiId) houseMergeId: data.houseInfo.mergeId,
await this.getFamilyInfoDetailById(this.form.resiId) unitId: data.houseInfo.unitId,
await this.residentPartyMemberInfo(this.form.resiId) villageId: data.houseInfo.villageId,
await this.residentEnsureHouse(this.form.resiId) birthday: data.birthday,
await this.residentUnemployed(this.form.resiId) gender: data.gender,
await this.getVeteranDetailById(this.form.resiId) idNum: data.idNum,
await this.residentUnitedFront(this.form.resiId) localResidenceFlag: data.localResidenceFlag.toString(),
await this.getVolunteerDetailById(this.form.resiId) mobile: data.mobile,
await this.residentSpecial(this.form.resiId) name: data.name,
await this.getOldPeopleDetailById(this.form.resiId) nation: data.nation ? data.nation : '',
remark: data.remark ? data.remark : '',
partyFlag: data.categoryInfo.partyFlag.toString(),
subsistenceAllowanceFlag: data.categoryInfo.subsistenceAllowanceFlag.toString(),
ensureHouseFlag: data.categoryInfo.ensureHouseFlag.toString(),
unemployedFlag: data.categoryInfo.unemployedFlag.toString(),
fertileWomanFlag: data.categoryInfo.fertileWomanFlag.toString(),
veteranFlag: data.categoryInfo.veteranFlag.toString(),
unitedFrontFlag: data.categoryInfo.unitedFrontFlag.toString(),
petitionOfficerFlag: data.categoryInfo.petitionOfficerFlag.toString(),
volunteerFlag: data.categoryInfo.volunteerFlag.toString(),
oldPeopleFlag: data.categoryInfo.oldPeopleFlag.toString(),
emptyNesterFlag: data.categoryInfo.emptyNesterFlag.toString(),
bereavedPersonFlag: data.categoryInfo.bereavedPersonFlag.toString(),
disabledFlag: data.categoryInfo.disabledFlag.toString(),
dementedFlag: data.categoryInfo.dementedFlag.toString(),
disabilityFlag: data.categoryInfo.disabilityFlag.toString(),
seriousIllnessFlag: data.categoryInfo.seriousIllnessFlag.toString(),
chronicDiseaseFlag: data.categoryInfo.chronicDiseaseFlag.toString(),
specialCrowdFlag: data.categoryInfo.specialCrowdFlag.toString(),
tenantFlag: data.categoryInfo.tenantFlag.toString(),
floatingFlag: data.categoryInfo.floatingFlag.toString(),
liveAloneFlag: data.categoryInfo.liveAloneFlag.toString(),
}
this.newForm = old_Form
}, },
// //
residentEduInfo(id) { residentEduInfo(id) {
@ -1805,6 +1893,7 @@ export default {
cultureLevel:'', cultureLevel:'',
eduRemark:'' eduRemark:''
} }
this.newForm.eduInfoDto = this.form.eduInfoDto
} }
}) })
}, },
@ -1819,6 +1908,7 @@ export default {
interestDesc:'',// interestDesc:'',//
hobbyRemark:''// hobbyRemark:''//
} }
this.newForm.hobbyInfoDto = this.form.hobbyInfoDto
} }
}) })
}, },
@ -1832,6 +1922,7 @@ export default {
religion:'', religion:'',
religionRemark:'' religionRemark:''
} }
this.newForm.religionDto = this.form.religionDto
} }
}) })
}, },
@ -1861,6 +1952,7 @@ export default {
deliveranceNum:'',// deliveranceNum:'',//
healthRemark:''// healthRemark:''//
} }
this.newForm.healthDto = this.form.healthDto
} }
}) })
}, },
@ -1876,6 +1968,7 @@ export default {
retireTime:'',//退 retireTime:'',//退
workRemark:'',// workRemark:'',//
} }
this.newForm.workInfoDto = this.form.workInfoDto
} }
}) })
}, },
@ -1889,6 +1982,7 @@ export default {
retirementAmount:'',//退 retirementAmount:'',//退
monthIncome:'',// monthIncome:'',//
} }
this.newForm.economyDto = this.form.economyDto
} }
}) })
}, },
@ -1905,6 +1999,7 @@ export default {
householdSituation:'',//code householdSituation:'',//code
resiRemark:'',// resiRemark:'',//
} }
this.newForm.resideInfoDto = this.form.resideInfoDto
} }
}) })
}, },
@ -1924,6 +2019,7 @@ export default {
dependantMobile:'',// dependantMobile:'',//
familyInfoRemark:'',// familyInfoRemark:'',//
} }
this.newForm.familyInfoDto = this.form.familyInfoDto
} }
}) })
}, },
@ -1946,6 +2042,7 @@ export default {
joinCommunityTime:'',//yyyy-MM-dd joinCommunityTime:'',//yyyy-MM-dd
longHolidayFlag:null,//10 longHolidayFlag:null,//10
} }
this.newForm.parymemberInfoDto = this.form.parymemberInfoDto
} }
}) })
}, },
@ -1962,6 +2059,7 @@ export default {
subsidyNum:'',// subsidyNum:'',//
subsidyAmount:'',// subsidyAmount:'',//
} }
this.newForm.ensureHouseDto = this.form.ensureHouseDto
} }
}) })
}, },
@ -1981,6 +2079,7 @@ export default {
employmentHardFlag:null,//10 employmentHardFlag:null,//10
employmentWish:'',// employmentWish:'',//
} }
this.newForm.unemployedDto = this.form.unemployedDto
} }
}) })
}, },
@ -2002,6 +2101,7 @@ export default {
joinWarEndTime:'',//yyyy-MM-dd joinWarEndTime:'',//yyyy-MM-dd
pubWelfareJobFlag:null,//;10 pubWelfareJobFlag:null,//;10
} }
this.newForm.veteranDto = this.form.veteranDto
} }
}) })
}, },
@ -2015,6 +2115,7 @@ export default {
duty:'',// duty:'',//
visitation:'',// visitation:'',//
} }
this.newForm.unitedFrontDto = this.form.unitedFrontDto
} }
}) })
}, },
@ -2028,6 +2129,7 @@ export default {
volunteerCategory:[],// volunteerCategory:[],//
volunteerRemark:''// volunteerRemark:''//
} }
this.newForm.volunteerDto = this.form.volunteerDto
} }
}) })
}, },
@ -2040,6 +2142,7 @@ export default {
this.form.oldPeopleDto = res.data ? res.data : { this.form.oldPeopleDto = res.data ? res.data : {
oldSubsidy:''// oldSubsidy:''//
} }
this.newForm.oldPeopleDto = this.form.oldPeopleDto
} }
}) })
}, },
@ -2052,8 +2155,152 @@ export default {
this.form.specialDto = res.data ? res.data : {// this.form.specialDto = res.data ? res.data : {//
specialCategoryCode:[]//, specialCategoryCode:[]//,
} }
this.newForm.specialDto = this.form.specialDto
} }
}) })
},
setNewForm() {
this.newForm = {
agencyName:this.$store.state.user.agencyName,
agencyId:this.$store.state.user.agencyId,
resiId: '', //
houseMergeId: '', //
categoryId: '', //
gridName:'',
gridId:'', //id
villageId: '', //id
buildId: '', //id
unitId: '', //id
homeId: '', //id
name:'', //
nation:'', //
remark:'', //
localResidenceFlag:'', //
birthday:'', //
idNum:'', //
gender:'', //
mobile:'', //
partyFlag:'0',//
subsistenceAllowanceFlag:'0', //
ensureHouseFlag:'0', //
unemployedFlag:'0',//
fertileWomanFlag:'0', //
veteranFlag:'0', //退
unitedFrontFlag:'0',//
petitionOfficerFlag:'0',//访
volunteerFlag:'0', //
bereavedPersonFlag:'0', //
tenantFlag:'0', //
floatingFlag:'0',//
specialCrowdFlag:'0',//
oldPeopleFlag:'0', //
emptyNesterFlag:'0', //
liveAloneFlag:'0', //
disabledFlag:'0', //
dementedFlag:'0', //
disabilityFlag:'0',//
seriousIllnessFlag:'0', //
chronicDiseaseFlag:'0', //
}
this.newForm.eduInfoDto = this.form.eduInfoDto
},
setJSON() {
this.newForm.agencyName = this.form.agencyName,
this.newForm.agencyId = this.form.agencyId,
this.newForm.resiId = this.form.resiId,
this.newForm.houseMergeId = this.form.houseMergeId,
this.newForm.categoryId = this.form.categoryId,
this.newForm.gridName = this.form.gridName,
this.newForm.gridId = this.form.gridId,
this.newForm.villageId = this.form.villageId,
this.newForm.buildId = this.form.buildId,
this.newForm.unitId = this.form.unitId,
this.newForm.homeId = this.form.homeId,
this.newForm.name = this.form.name,
this.newForm.vnation = this.form.vnation,
this.newForm.remark = this.form.remark,
this.newForm.localResidenceFlag = this.form.localResidenceFlag,
this.newForm.birthday = this.form.birthday,
this.newForm.idNum = this.form.idNum,
this.newForm.gender = this.form.gender,
this.newForm.mobile = this.form.mobile,
this.newForm.partyFlag = this.form.partyFlag,
this.newForm.subsistenceAllowanceFlag = this.form.subsistenceAllowanceFlag,
this.newForm.ensureHouseFlag = this.form.ensureHouseFlag,
this.newForm.unemployedFlag = this.form.unemployedFlag,
this.newForm.fertileWomanFlag = this.form.fertileWomanFlag,
this.newForm.veteranFlag = this.form.veteranFlag,
this.newForm.unitedFrontFlag = this.form.unitedFrontFlag,
this.newForm.petitionOfficerFlag = this.form.petitionOfficerFlag,
this.newForm.volunteerFlag = this.form.volunteerFlag,
this.newForm.bereavedPersonFlag = this.form.bereavedPersonFlag,
this.newForm.tenantFlag = this.form.tenantFlag,
this.newForm.floatingFlag = this.form.floatingFlag,
this.newForm.specialCrowdFlag = this.form.specialCrowdFlag,
this.newForm.oldPeopleFlag = this.form.oldPeopleFlag,
this.newForm.emptyNesterFlag = this.form.emptyNesterFlag,
this.newForm.liveAloneFlag = this.form.liveAloneFlag,
this.newForm.disabledFlag = this.form.disabledFlag,
this.newForm.dementedFlag = this.form.dementedFlag,
this.newForm.disabilityFlag = this.form.disabilityFlag,
this.newForm.seriousIllnessFlag = this.form.seriousIllnessFlag,
this.newForm.chronicDiseaseFlag = this.form.chronicDiseaseFlag
if(this.newForm.eduInfoDto) {
this.newForm.eduInfoDto = this.form.eduInfoDto
}
if(this.newForm.hobbyInfoDto) {
this.newForm.hobbyInfoDto = this.form.hobbyInfoDto
}
if(this.newForm.religionDto) {
this.newForm.religionDto = this.form.religionDto
}
if(this.newForm.healthDto) {
this.newForm.healthDto = this.form.healthDto
}
if(this.newForm.workInfoDto) {
this.newForm.workInfoDto = this.form.workInfoDto
}
if(this.newForm.economyDto) {
this.newForm.economyDto = this.form.economyDto
}
if(this.newForm.resideInfoDto) {
this.newForm.resideInfoDto = this.form.resideInfoDto
}
if(this.newForm.familyInfoDto) {
this.newForm.familyInfoDto = this.form.familyInfoDto
}
if(this.newForm.parymemberInfoDto) {
this.newForm.parymemberInfoDto = this.form.parymemberInfoDto
}
if(this.newForm.ensureHouseDto) {
this.newForm.ensureHouseDto = this.form.ensureHouseDto
}
if(this.newForm.unemployedDto) {
this.newForm.unemployedDto = this.form.unemployedDto
}
if(this.newForm.veteranDto) {
this.newForm.veteranDto = this.form.veteranDto
}
if(this.newForm.unitedFrontDto) {
this.newForm.unitedFrontDto = this.form.unitedFrontDto
}
if(this.newForm.volunteerDto) {
this.newForm.volunteerDto = this.form.volunteerDto
}
if(this.newForm.oldPeopleDto) {
this.newForm.oldPeopleDto = this.form.oldPeopleDto
}
if(this.newForm.specialDto) {
this.newForm.specialDto = this.form.specialDto
}
} }
} }
} }

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

@ -1260,31 +1260,37 @@ export default {
(_baseForm.disabilityFlag = parseInt(_baseForm.disabilityFlag)), // (_baseForm.disabilityFlag = parseInt(_baseForm.disabilityFlag)), //
(_baseForm.seriousIllnessFlag = parseInt(_baseForm.seriousIllnessFlag)), // (_baseForm.seriousIllnessFlag = parseInt(_baseForm.seriousIllnessFlag)), //
(_baseForm.chronicDiseaseFlag = parseInt(_baseForm.chronicDiseaseFlag)); // (_baseForm.chronicDiseaseFlag = parseInt(_baseForm.chronicDiseaseFlag)); //
if ((_baseForm.hobbyInfoDto.hobbyCode = [])) { if (_baseForm.hobbyInfoDto) {
_baseForm.hobbyInfoDto.hobbyCode = ""; if ((_baseForm.hobbyInfoDto.hobbyCode = [])) {
} else { _baseForm.hobbyInfoDto.hobbyCode = "";
_baseForm.hobbyInfoDto.hobbyCode.forEach((element) => { } else {
_baseForm.hobbyInfoDto.hobbyCode = _baseForm.hobbyInfoDto.hobbyCode.forEach((element) => {
_baseForm.hobbyInfoDto.hobbyCode ? _baseForm.hobbyInfoDto.hobbyCode + "," + element : _baseForm.hobbyInfoDto.hobbyCode; _baseForm.hobbyInfoDto.hobbyCode =
}); _baseForm.hobbyInfoDto.hobbyCode ? _baseForm.hobbyInfoDto.hobbyCode + "," + element : _baseForm.hobbyInfoDto.hobbyCode;
} });
if ((_baseForm.volunteerDto.volunteerCategory = [])) { }
_baseForm.volunteerDto.volunteerCategory = ""; }
} else { if (_baseForm.volunteerDto) {
_baseForm.volunteerDto.volunteerCategory.forEach((element) => { if ((_baseForm.volunteerDto.volunteerCategory = [])) {
_baseForm.volunteerDto.volunteerCategory = _baseForm.volunteerDto.volunteerCategory = "";
_baseForm.volunteerDto.volunteerCategory ? _baseForm.volunteerDto.volunteerCategory + "," + element : _baseForm.volunteerDto.volunteerCategory; } else {
}); _baseForm.volunteerDto.volunteerCategory.forEach((element) => {
} _baseForm.volunteerDto.volunteerCategory =
if ((_baseForm.specialDto.specialCategoryCode = [])) { _baseForm.volunteerDto.volunteerCategory ? _baseForm.volunteerDto.volunteerCategory + "," + element : _baseForm.volunteerDto.volunteerCategory;
_baseForm.specialDto.specialCategoryCode = ""; });
} else { }
_baseForm.specialDto.specialCategoryCode.forEach((element) => { }
_baseForm.specialDto.specialCategoryCode = if (_baseForm.specialDto) {
_baseForm.specialDto.specialCategoryCode ? _baseForm.specialDto.specialCategoryCode + "," + element : _baseForm.specialDto.specialCategoryCode; if ((_baseForm.specialDto.specialCategoryCode = [])) {
}); _baseForm.specialDto.specialCategoryCode = "";
} } else {
this.submitAdd(_baseForm); _baseForm.specialDto.specialCategoryCode.forEach((element) => {
_baseForm.specialDto.specialCategoryCode =
_baseForm.specialDto.specialCategoryCode ? _baseForm.specialDto.specialCategoryCode + "," + element : _baseForm.specialDto.specialCategoryCode;
});
}
}
this.submitAdd(_baseForm);
}, },
handleDel(row) { handleDel(row) {
let params = { let params = {

Loading…
Cancel
Save