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:{
agencyName:this.$store.state.user.agencyName,
agencyId:this.$store.state.user.agencyId,
@ -1151,10 +1151,13 @@ export default {
this.getGridList()
this.getAllNation()
this.setNewForm()
},
methods: {
submit_from(){
this.setJSON()
var flag = false
this.$refs.formId.validate(v=>{
this.validateFlag = v
@ -1162,10 +1165,9 @@ export default {
})
if(flag){
return this.form
return this.newForm
}
console.log(this.form);
return this.form
return this.newForm
},
async old_from(data) {
this.getFormData(data)
@ -1173,7 +1175,8 @@ export default {
await this.getBuildList()
await this.getUniList()
await this.getHouseList()
await this.getClassInfo()
// await this.getClassInfo()
await this.residentEduInfo(this.form.resiId)
},
getAllNation(){
//
@ -1547,43 +1550,104 @@ export default {
this.form.homeId = ''
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)
// }
async handleClick (tab, event) {
if (event.toElement.innerText == '教育') {
if (!this.form.resiId) {
this.newForm.eduInfoDto = this.form.eduInfoDto
} else {
await this.residentEduInfo(this.form.resiId)
}
} else if (event.toElement.innerText == '兴趣爱好') {
if (!this.form.resiId) {
this.newForm.hobbyInfoDto = this.form.hobbyInfoDto
} else {
await this.residentHobbyInfo(this.form.resiId)
}
} else if (event.toElement.innerText == '宗教信仰') {
if (!this.form.resiId) {
this.newForm.religionDto = this.form.religionDto
} else {
await this.residentReligion(this.form.resiId)
}
} else if (event.toElement.innerText == '健康') {
if (!this.form.resiId) {
this.newForm.healthDto = this.form.healthDto
} else {
await this.getHealthInfoDetailById(this.form.resiId)
}
} else if (event.toElement.innerText == '工作') {
if (!this.form.resiId) {
this.newForm.workInfoDto = this.form.workInfoDto
} else {
await this.residentWorkInfo(this.form.resiId)
}
} else if (event.toElement.innerText == '经济情况') {
if (!this.form.resiId) {
this.newForm.economyDto = this.form.economyDto
} else {
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 () {
let newForm = []
@ -1776,24 +1840,48 @@ export default {
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)
let old_Form = {
categoryId: '111222333',//
resiId: data.resiId,
buildId: data.houseInfo.buildId,
gridId: data.houseInfo.gridId,
gridName: data.houseInfo.gridName,
homeId: data.houseInfo.homeId,
homeName: data.houseInfo.homeName,
houseMergeId: data.houseInfo.mergeId,
unitId: data.houseInfo.unitId,
villageId: data.houseInfo.villageId,
birthday: data.birthday,
gender: data.gender,
idNum: data.idNum,
localResidenceFlag: data.localResidenceFlag.toString(),
mobile: data.mobile,
name: data.name,
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) {
@ -1805,6 +1893,7 @@ export default {
cultureLevel:'',
eduRemark:''
}
this.newForm.eduInfoDto = this.form.eduInfoDto
}
})
},
@ -1819,6 +1908,7 @@ export default {
interestDesc:'',//
hobbyRemark:''//
}
this.newForm.hobbyInfoDto = this.form.hobbyInfoDto
}
})
},
@ -1832,6 +1922,7 @@ export default {
religion:'',
religionRemark:''
}
this.newForm.religionDto = this.form.religionDto
}
})
},
@ -1861,6 +1952,7 @@ export default {
deliveranceNum:'',//
healthRemark:''//
}
this.newForm.healthDto = this.form.healthDto
}
})
},
@ -1876,6 +1968,7 @@ export default {
retireTime:'',//退
workRemark:'',//
}
this.newForm.workInfoDto = this.form.workInfoDto
}
})
},
@ -1889,6 +1982,7 @@ export default {
retirementAmount:'',//退
monthIncome:'',//
}
this.newForm.economyDto = this.form.economyDto
}
})
},
@ -1905,6 +1999,7 @@ export default {
householdSituation:'',//code
resiRemark:'',//
}
this.newForm.resideInfoDto = this.form.resideInfoDto
}
})
},
@ -1924,6 +2019,7 @@ export default {
dependantMobile:'',//
familyInfoRemark:'',//
}
this.newForm.familyInfoDto = this.form.familyInfoDto
}
})
},
@ -1946,6 +2042,7 @@ export default {
joinCommunityTime:'',//yyyy-MM-dd
longHolidayFlag:null,//10
}
this.newForm.parymemberInfoDto = this.form.parymemberInfoDto
}
})
},
@ -1962,6 +2059,7 @@ export default {
subsidyNum:'',//
subsidyAmount:'',//
}
this.newForm.ensureHouseDto = this.form.ensureHouseDto
}
})
},
@ -1981,6 +2079,7 @@ export default {
employmentHardFlag:null,//10
employmentWish:'',//
}
this.newForm.unemployedDto = this.form.unemployedDto
}
})
},
@ -2002,6 +2101,7 @@ export default {
joinWarEndTime:'',//yyyy-MM-dd
pubWelfareJobFlag:null,//;10
}
this.newForm.veteranDto = this.form.veteranDto
}
})
},
@ -2015,6 +2115,7 @@ export default {
duty:'',//
visitation:'',//
}
this.newForm.unitedFrontDto = this.form.unitedFrontDto
}
})
},
@ -2028,6 +2129,7 @@ export default {
volunteerCategory:[],//
volunteerRemark:''//
}
this.newForm.volunteerDto = this.form.volunteerDto
}
})
},
@ -2040,6 +2142,7 @@ export default {
this.form.oldPeopleDto = res.data ? res.data : {
oldSubsidy:''//
}
this.newForm.oldPeopleDto = this.form.oldPeopleDto
}
})
},
@ -2052,8 +2155,152 @@ export default {
this.form.specialDto = res.data ? res.data : {//
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.seriousIllnessFlag = parseInt(_baseForm.seriousIllnessFlag)), //
(_baseForm.chronicDiseaseFlag = parseInt(_baseForm.chronicDiseaseFlag)); //
if ((_baseForm.hobbyInfoDto.hobbyCode = [])) {
_baseForm.hobbyInfoDto.hobbyCode = "";
} else {
_baseForm.hobbyInfoDto.hobbyCode.forEach((element) => {
_baseForm.hobbyInfoDto.hobbyCode =
_baseForm.hobbyInfoDto.hobbyCode ? _baseForm.hobbyInfoDto.hobbyCode + "," + element : _baseForm.hobbyInfoDto.hobbyCode;
});
}
if ((_baseForm.volunteerDto.volunteerCategory = [])) {
_baseForm.volunteerDto.volunteerCategory = "";
} else {
_baseForm.volunteerDto.volunteerCategory.forEach((element) => {
_baseForm.volunteerDto.volunteerCategory =
_baseForm.volunteerDto.volunteerCategory ? _baseForm.volunteerDto.volunteerCategory + "," + element : _baseForm.volunteerDto.volunteerCategory;
});
}
if ((_baseForm.specialDto.specialCategoryCode = [])) {
_baseForm.specialDto.specialCategoryCode = "";
} else {
_baseForm.specialDto.specialCategoryCode.forEach((element) => {
_baseForm.specialDto.specialCategoryCode =
_baseForm.specialDto.specialCategoryCode ? _baseForm.specialDto.specialCategoryCode + "," + element : _baseForm.specialDto.specialCategoryCode;
});
}
this.submitAdd(_baseForm);
if (_baseForm.hobbyInfoDto) {
if ((_baseForm.hobbyInfoDto.hobbyCode = [])) {
_baseForm.hobbyInfoDto.hobbyCode = "";
} else {
_baseForm.hobbyInfoDto.hobbyCode.forEach((element) => {
_baseForm.hobbyInfoDto.hobbyCode =
_baseForm.hobbyInfoDto.hobbyCode ? _baseForm.hobbyInfoDto.hobbyCode + "," + element : _baseForm.hobbyInfoDto.hobbyCode;
});
}
}
if (_baseForm.volunteerDto) {
if ((_baseForm.volunteerDto.volunteerCategory = [])) {
_baseForm.volunteerDto.volunteerCategory = "";
} else {
_baseForm.volunteerDto.volunteerCategory.forEach((element) => {
_baseForm.volunteerDto.volunteerCategory =
_baseForm.volunteerDto.volunteerCategory ? _baseForm.volunteerDto.volunteerCategory + "," + element : _baseForm.volunteerDto.volunteerCategory;
});
}
}
if (_baseForm.specialDto) {
if ((_baseForm.specialDto.specialCategoryCode = [])) {
_baseForm.specialDto.specialCategoryCode = "";
} else {
_baseForm.specialDto.specialCategoryCode.forEach((element) => {
_baseForm.specialDto.specialCategoryCode =
_baseForm.specialDto.specialCategoryCode ? _baseForm.specialDto.specialCategoryCode + "," + element : _baseForm.specialDto.specialCategoryCode;
});
}
}
this.submitAdd(_baseForm);
},
handleDel(row) {
let params = {

Loading…
Cancel
Save