|
|
|
@ -697,6 +697,12 @@ Page({ |
|
|
|
* 生命周期函数--监听页面加载 |
|
|
|
*/ |
|
|
|
onLoad: async function (options) { |
|
|
|
if(options.type === 'edit'){ |
|
|
|
this.setData({ |
|
|
|
resiId:options.resiId |
|
|
|
}) |
|
|
|
this.userXiangQ(options) |
|
|
|
} |
|
|
|
this.setData({ |
|
|
|
agencyId: app.globalData.user.agencyId, |
|
|
|
'form.resideInfoDtos[0].agencyId': app.globalData.user.agencyId, |
|
|
|
@ -1165,7 +1171,7 @@ Page({ |
|
|
|
const selectedIndex = e.detail.value; |
|
|
|
const selectedVillage = this.data.dicts.nationalityList[selectedIndex] |
|
|
|
this.setData({ |
|
|
|
nationalityName: selectedVillage.label, |
|
|
|
'form.baseInfoDto.nationalityName': selectedVillage.label, |
|
|
|
'form.baseInfoDto.nationality': selectedVillage.value |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -1176,7 +1182,7 @@ Page({ |
|
|
|
}, |
|
|
|
bindPickerChangeGender(e) { |
|
|
|
this.setData({ |
|
|
|
genderName: this.data.dicts.genderList[e.detail.value].label, |
|
|
|
'form.baseInfoDto.genderName': this.data.dicts.genderList[e.detail.value].label, |
|
|
|
"form.baseInfoDto.gender": this.data.dicts.genderList[e.detail.value].value |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -1449,5 +1455,18 @@ Page({ |
|
|
|
} |
|
|
|
}) |
|
|
|
console.log(this.data.form); |
|
|
|
}, |
|
|
|
//**编辑回填逻辑 start*/
|
|
|
|
userXiangQ(option){ |
|
|
|
api.userXiangQ(this.data.resiId).then(res=>{ |
|
|
|
this.setData({ |
|
|
|
form:res.data, |
|
|
|
"form.baseInfoDto.name":option.name, |
|
|
|
"form.baseInfoDto.idNum":option.idNum, |
|
|
|
"form.baseInfoDto.mobile":option.mobile, |
|
|
|
}) |
|
|
|
}).catch(err=>{ |
|
|
|
console.log(err); |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |