|
@@ -4,6 +4,19 @@ var isonShow;
|
|
|
var isTwoOnshow;
|
|
|
Page({
|
|
|
data: {
|
|
|
+ showAdressBox: false,
|
|
|
+ showAdressBox1: false,
|
|
|
+ provinceArr: [],
|
|
|
+ cityArr: [],
|
|
|
+ areaArr: [],
|
|
|
+ townArr: [],
|
|
|
+ villageArr: [],
|
|
|
+ codeArr: [], //传地址时带的code数组
|
|
|
+ province: '',
|
|
|
+ city: '',
|
|
|
+ area: '',
|
|
|
+ town: '',
|
|
|
+ village: '',
|
|
|
codeArr: [], //传地址时带的code数组
|
|
|
nowAdress: false, //现居地址可点不可点
|
|
|
adressChangeStatus: false,
|
|
@@ -109,13 +122,15 @@ Page({
|
|
|
visitCount: '',
|
|
|
visitCountExt: '', // 频次的其他
|
|
|
}],
|
|
|
- multiArray: [
|
|
|
- [],
|
|
|
- [],
|
|
|
- [],
|
|
|
- [],
|
|
|
- []
|
|
|
- ],
|
|
|
+ // multiArray: [
|
|
|
+ // [],
|
|
|
+ // [],
|
|
|
+ // [],
|
|
|
+ // [],
|
|
|
+ // []
|
|
|
+ // ],
|
|
|
+ // multiIndex: [0, 0, 0, 0, 0],
|
|
|
+ // multiIndex1: [0, 0, 0, 0, 0]
|
|
|
multiIndex: [0, 0, 0, 0, 0]
|
|
|
},
|
|
|
// 左侧点击
|
|
@@ -877,8 +892,299 @@ Page({
|
|
|
}
|
|
|
},
|
|
|
// 选择五级地址
|
|
|
+ // chooseAdress() {
|
|
|
+ // let arr = 'multiArray[0]'
|
|
|
+ // wx.request({
|
|
|
+ // url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
|
+ // method: "get",
|
|
|
+ // header: {
|
|
|
+ // appletsId: wx.getStorageSync('openId')
|
|
|
+ // },
|
|
|
+ // success: (res) => {
|
|
|
+ // let newdata = [];
|
|
|
+ // let j;
|
|
|
+ // res.data.data.forEach(item => {
|
|
|
+ // newdata.push(item);
|
|
|
+ // });
|
|
|
+ // for (var i = 0; i < newdata.length; i++) {
|
|
|
+ // if (newdata[i].CIVILREGIONALISMNAME == '吉林省') {
|
|
|
+ // j = i;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // newdata.unshift(newdata[j])
|
|
|
+ // newdata.splice(j + 1, 1);
|
|
|
+ // console.log('我走了1')
|
|
|
+ // this.setData({
|
|
|
+ // [arr]: newdata,
|
|
|
+ // adressChangeStatus: true
|
|
|
+ // })
|
|
|
+ // this.chooseAdress2();
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // chooseAdress2(fid) {
|
|
|
+ // let mid;
|
|
|
+ // if (fid) {
|
|
|
+ // mid = fid
|
|
|
+ // } else {
|
|
|
+ // mid = this.data.multiArray[0][0].CIVILREGIONALISMID
|
|
|
+ // }
|
|
|
+ // let arr = 'multiArray[1]'
|
|
|
+ // let newdata = [];
|
|
|
+ // wx.request({
|
|
|
+ // url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
|
+ // method: "get",
|
|
|
+ // header: {
|
|
|
+ // appletsId: wx.getStorageSync('openId')
|
|
|
+ // },
|
|
|
+ // data: {
|
|
|
+ // fid: mid
|
|
|
+ // },
|
|
|
+ // success: (res) => {
|
|
|
+ // res.data.data.forEach(item => {
|
|
|
+ // newdata.push(item)
|
|
|
+ // });
|
|
|
+ // console.log('我走了2')
|
|
|
+ // this.setData({
|
|
|
+ // [arr]: newdata,
|
|
|
+ // adressChangeStatus: true
|
|
|
+ // })
|
|
|
+ // this.chooseAdress3();
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // chooseAdress3(fid) {
|
|
|
+ // let mid;
|
|
|
+ // if (fid) {
|
|
|
+ // mid = fid
|
|
|
+ // } else {
|
|
|
+ // mid = this.data.multiArray[1][0].CIVILREGIONALISMID
|
|
|
+ // }
|
|
|
+ // let arr = 'multiArray[2]'
|
|
|
+ // let newdata = [];
|
|
|
+ // wx.request({
|
|
|
+ // url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
|
+ // method: "get",
|
|
|
+ // header: {
|
|
|
+ // appletsId: wx.getStorageSync('openId')
|
|
|
+ // },
|
|
|
+ // data: {
|
|
|
+ // fid: mid
|
|
|
+ // },
|
|
|
+ // success: (res) => {
|
|
|
+ // res.data.data.forEach(item => {
|
|
|
+ // newdata.push(item)
|
|
|
+ // });
|
|
|
+ // console.log('我走了3')
|
|
|
+ // this.setData({
|
|
|
+ // [arr]: newdata,
|
|
|
+ // adressChangeStatus: true
|
|
|
+ // })
|
|
|
+ // this.chooseAdress4();
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // chooseAdress4(fid) {
|
|
|
+ // let mid;
|
|
|
+ // if (fid) {
|
|
|
+ // mid = fid
|
|
|
+ // } else {
|
|
|
+ // mid = this.data.multiArray[2][0].CIVILREGIONALISMID
|
|
|
+ // }
|
|
|
+ // let arr = 'multiArray[3]'
|
|
|
+ // let newdata = [];
|
|
|
+ // wx.request({
|
|
|
+ // url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
|
+ // method: "get",
|
|
|
+ // header: {
|
|
|
+ // appletsId: wx.getStorageSync('openId')
|
|
|
+ // },
|
|
|
+ // data: {
|
|
|
+ // fid: mid
|
|
|
+ // },
|
|
|
+ // success: (res) => {
|
|
|
+ // res.data.data.forEach(item => {
|
|
|
+ // newdata.push(item)
|
|
|
+ // });
|
|
|
+ // console.log('我走了4')
|
|
|
+ // this.setData({
|
|
|
+ // [arr]: newdata,
|
|
|
+ // adressChangeStatus: true
|
|
|
+ // })
|
|
|
+ // this.chooseAdress5();
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // chooseAdress5(fid) {
|
|
|
+ // let mid;
|
|
|
+ // if (fid) {
|
|
|
+ // mid = fid
|
|
|
+ // } else {
|
|
|
+ // mid = this.data.multiArray[3][0].CIVILREGIONALISMID
|
|
|
+ // }
|
|
|
+ // let arr = 'multiArray[4]'
|
|
|
+ // let newdata = [];
|
|
|
+ // wx.request({
|
|
|
+ // url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
|
+ // method: "get",
|
|
|
+ // header: {
|
|
|
+ // appletsId: wx.getStorageSync('openId')
|
|
|
+ // },
|
|
|
+ // data: {
|
|
|
+ // fid: mid
|
|
|
+ // },
|
|
|
+ // success: (res) => {
|
|
|
+ // res.data.data.forEach(item => {
|
|
|
+ // newdata.push(item)
|
|
|
+ // });
|
|
|
+ // console.log('我走了5')
|
|
|
+ // this.setData({
|
|
|
+ // [arr]: newdata,
|
|
|
+ // adressChangeStatus: false
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // // 户籍地址
|
|
|
+ // bindMultiPickerChange: function (e) {
|
|
|
+ // console.log(this.data.adressChangeStatus)
|
|
|
+ // if (!this.data.adressChangeStatus) {
|
|
|
+ // let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr'
|
|
|
+ // let province = this.data.multiArray[0][e.detail.value[0]].CIVILREGIONALISMNAME;
|
|
|
+ // let city = this.data.multiArray[1][e.detail.value[1]].CIVILREGIONALISMNAME;
|
|
|
+ // let area = this.data.multiArray[2][e.detail.value[2]].CIVILREGIONALISMNAME;
|
|
|
+ // let town = this.data.multiArray[3][e.detail.value[3]].CIVILREGIONALISMNAME;
|
|
|
+ // let village = this.data.multiArray[4][e.detail.value[4]].CIVILREGIONALISMNAME;
|
|
|
+ // let provinceCode = this.data.multiArray[0][e.detail.value[0]].CIVILREGIONALISMCODE;
|
|
|
+ // let cityCode = this.data.multiArray[1][e.detail.value[1]].CIVILREGIONALISMCODE;
|
|
|
+ // let areaCode = this.data.multiArray[2][e.detail.value[2]].CIVILREGIONALISMCODE;
|
|
|
+ // let townCode = this.data.multiArray[3][e.detail.value[3]].CIVILREGIONALISMCODE;
|
|
|
+ // let villageCode = this.data.multiArray[4][e.detail.value[4]].CIVILREGIONALISMCODE;
|
|
|
+ // this.setData({
|
|
|
+ // multiIndex: e.detail.value,
|
|
|
+ // [arr]: [],
|
|
|
+ // codeArr: []
|
|
|
+ // })
|
|
|
+ // this.data.codeArr.push(provinceCode, cityCode, areaCode, townCode, villageCode)
|
|
|
+ // this.data.oldInfo[this.data.activeIndex].chooseAdressArr.push(province, city, area, town, village)
|
|
|
+ // let a = this.data.oldInfo[this.data.activeIndex].chooseAdressArr.join("/");
|
|
|
+ // let b = this.data.codeArr.join(",")
|
|
|
+ // this.SubmitOldmanInfo({
|
|
|
+ // id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
+ // nativePlace: a,
|
|
|
+ // nativePlaceId: b
|
|
|
+ // })
|
|
|
+ // this.setData({
|
|
|
+ // [arr]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr
|
|
|
+ // })
|
|
|
+ // if (this.data.oldInfo[this.data.activeIndex].isSameWithAddress[0].checked) {
|
|
|
+ // let Info = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr1'
|
|
|
+ // let Infos = 'oldInfo[' + this.data.activeIndex + '].addressExt'
|
|
|
+ // this.setData({
|
|
|
+ // [Info]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr,
|
|
|
+ // [Infos]: this.data.oldInfo[this.data.activeIndex].nativePlaceExt
|
|
|
+ // })
|
|
|
+ // let a = this.data.oldInfo[this.data.activeIndex].chooseAdressArr.join("/");
|
|
|
+ // let b = this.data.codeArr.join(",")
|
|
|
+ // this.SubmitOldmanInfo({
|
|
|
+ // id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
+ // address: a,
|
|
|
+ // addressId: b
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // // let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr'
|
|
|
+ // // this.setData({
|
|
|
+ // // [arr]: []
|
|
|
+ // // })
|
|
|
+ // wx.showToast({
|
|
|
+ // title: '户籍地址不匹配,请重新选择',
|
|
|
+ // icon: 'none',
|
|
|
+ // duration: 2000,
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // // 五级联动
|
|
|
+ // bindMultiPickerColumnChange: function (e) {
|
|
|
+ // this.setData({
|
|
|
+ // adressChangeStatus: true
|
|
|
+ // })
|
|
|
+ // if (e.detail.column == 4) {
|
|
|
+ // this.setData({
|
|
|
+ // adressChangeStatus: false
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // if (e.detail.column == 0) {
|
|
|
+ // this.chooseAdress2(this.data.multiArray[0][e.detail.value].CIVILREGIONALISMID);
|
|
|
+ // } else if (e.detail.column == 1) {
|
|
|
+ // this.chooseAdress3(this.data.multiArray[1][e.detail.value].CIVILREGIONALISMID);
|
|
|
+ // } else if (e.detail.column == 2) {
|
|
|
+ // this.chooseAdress4(this.data.multiArray[2][e.detail.value].CIVILREGIONALISMID);
|
|
|
+ // } else if (e.detail.column == 3) {
|
|
|
+ // this.chooseAdress5(this.data.multiArray[3][e.detail.value].CIVILREGIONALISMID);
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // //现居地址picker
|
|
|
+ // bindMultiPickerChange1: function (e) {
|
|
|
+ // console.log(this.data.adressChangeStatus)
|
|
|
+ // if (!this.data.adressChangeStatus) {
|
|
|
+ // let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr1'
|
|
|
+ // let province = this.data.multiArray[0][e.detail.value[0]].CIVILREGIONALISMNAME;
|
|
|
+ // let city = this.data.multiArray[1][e.detail.value[1]].CIVILREGIONALISMNAME;
|
|
|
+ // let area = this.data.multiArray[2][e.detail.value[2]].CIVILREGIONALISMNAME;
|
|
|
+ // let town = this.data.multiArray[3][e.detail.value[3]].CIVILREGIONALISMNAME;
|
|
|
+ // let village = this.data.multiArray[4][e.detail.value[4]].CIVILREGIONALISMNAME;
|
|
|
+ // let provinceCode = this.data.multiArray[0][e.detail.value[0]].CIVILREGIONALISMCODE;
|
|
|
+ // let cityCode = this.data.multiArray[1][e.detail.value[1]].CIVILREGIONALISMCODE;
|
|
|
+ // let areaCode = this.data.multiArray[2][e.detail.value[2]].CIVILREGIONALISMCODE;
|
|
|
+ // let townCode = this.data.multiArray[3][e.detail.value[3]].CIVILREGIONALISMCODE;
|
|
|
+ // let villageCode = this.data.multiArray[4][e.detail.value[4]].CIVILREGIONALISMCODE;
|
|
|
+ // this.setData({
|
|
|
+ // multiIndex1: e.detail.value,
|
|
|
+ // [arr]: []
|
|
|
+ // })
|
|
|
+ // let codeArr = [];
|
|
|
+ // codeArr.push(provinceCode, cityCode, areaCode, townCode, villageCode)
|
|
|
+ // this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.push(province, city, area, town, village)
|
|
|
+ // let a = this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.join("/");
|
|
|
+ // let b = codeArr.join(",")
|
|
|
+ // this.SubmitOldmanInfo({
|
|
|
+ // id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
+ // address: a,
|
|
|
+ // addressId: b
|
|
|
+ // })
|
|
|
+ // this.setData({
|
|
|
+ // [arr]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr1
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+ // let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr1'
|
|
|
+ // this.setData({
|
|
|
+ // [arr]: []
|
|
|
+ // })
|
|
|
+ // wx.showToast({
|
|
|
+ // title: '现居地址不匹配,请重新选择',
|
|
|
+ // icon: 'none',
|
|
|
+ // duration: 2000,
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ showAdressShow() {
|
|
|
+ this.chooseAdress();
|
|
|
+ this.setData({
|
|
|
+ multiIndex: [0, 0, 0, 0, 0],
|
|
|
+ showAdressBox: true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ showAdressShow1() {
|
|
|
+ if(!this.data.oldInfo[this.data.activeIndex].isSameWithAddress[0].checked){
|
|
|
+ this.chooseAdress();
|
|
|
+ this.setData({
|
|
|
+ multiIndex: [0, 0, 0, 0, 0],
|
|
|
+ showAdressBox1: true
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
chooseAdress() {
|
|
|
- let arr = 'multiArray[0]'
|
|
|
wx.request({
|
|
|
url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
|
method: "get",
|
|
@@ -899,11 +1205,14 @@ Page({
|
|
|
newdata.unshift(newdata[j])
|
|
|
newdata.splice(j + 1, 1);
|
|
|
this.setData({
|
|
|
- [arr]: newdata,
|
|
|
- adressChangeStatus: true
|
|
|
+ provinceArr: newdata,
|
|
|
+ })
|
|
|
+ this.setData({
|
|
|
+ province: this.data.provinceArr[0].CIVILREGIONALISMNAME,
|
|
|
+ provinceCode: this.data.provinceArr[0].CIVILREGIONALISMCODE,
|
|
|
})
|
|
|
+ console.log(this.data.province)
|
|
|
this.chooseAdress2();
|
|
|
-
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -911,10 +1220,13 @@ Page({
|
|
|
let mid;
|
|
|
if (fid) {
|
|
|
mid = fid
|
|
|
+ wx.showLoading({
|
|
|
+ title: '加载中',
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
} else {
|
|
|
- mid = this.data.multiArray[0][0].CIVILREGIONALISMID
|
|
|
+ mid = this.data.provinceArr[this.data.multiIndex[1]].CIVILREGIONALISMID
|
|
|
}
|
|
|
- let arr = 'multiArray[1]'
|
|
|
let newdata = [];
|
|
|
wx.request({
|
|
|
url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
@@ -930,21 +1242,31 @@ Page({
|
|
|
newdata.push(item)
|
|
|
});
|
|
|
this.setData({
|
|
|
- [arr]: newdata,
|
|
|
- adressChangeStatus: true
|
|
|
+ cityArr: newdata
|
|
|
})
|
|
|
+ if (!fid) {
|
|
|
+ this.setData({
|
|
|
+ city: this.data.cityArr[0].CIVILREGIONALISMNAME,
|
|
|
+ cityCode: this.data.cityArr[0].CIVILREGIONALISMCODE,
|
|
|
+ })
|
|
|
+ console.log(this.data.city)
|
|
|
+ }
|
|
|
this.chooseAdress3();
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
chooseAdress3(fid) {
|
|
|
let mid;
|
|
|
+ console.log(this.data.cityArr[this.data.multiIndex[2]].CIVILREGIONALISMID,'我是传入的3 id')
|
|
|
if (fid) {
|
|
|
mid = fid
|
|
|
+ wx.showLoading({
|
|
|
+ title: '加载中',
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
} else {
|
|
|
- mid = this.data.multiArray[1][0].CIVILREGIONALISMID
|
|
|
+ mid = this.data.cityArr[this.data.multiIndex[2]].CIVILREGIONALISMID
|
|
|
}
|
|
|
- let arr = 'multiArray[2]'
|
|
|
let newdata = [];
|
|
|
wx.request({
|
|
|
url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
@@ -960,21 +1282,50 @@ Page({
|
|
|
newdata.push(item)
|
|
|
});
|
|
|
this.setData({
|
|
|
- [arr]: newdata,
|
|
|
- adressChangeStatus: true
|
|
|
+ areaArr: newdata
|
|
|
})
|
|
|
- this.chooseAdress4();
|
|
|
+ if (!fid) {
|
|
|
+ this.setData({
|
|
|
+ area: this.data.areaArr[0].CIVILREGIONALISMNAME,
|
|
|
+ areaCode: this.data.areaArr[0].CIVILREGIONALISMCODE,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ console.log(newdata)
|
|
|
+ console.log(this.data.multiIndex)
|
|
|
+ if (newdata.length == 0) {
|
|
|
+ wx.hideLoading()
|
|
|
+ this.setData({
|
|
|
+ province: this.data.provinceArr[this.data.multiIndex[0]].CIVILREGIONALISMNAME,
|
|
|
+ city: this.data.cityArr[this.data.multiIndex[1]].CIVILREGIONALISMNAME,
|
|
|
+ area: this.data.areaArr[this.data.multiIndex[2]].CIVILREGIONALISMNAME,
|
|
|
+ town: this.data.townArr[this.data.multiIndex[3]].CIVILREGIONALISMNAME,
|
|
|
+ village: this.data.villageArr[this.data.multiIndex[4]].CIVILREGIONALISMNAME,
|
|
|
+ provinceCode: this.data.provinceArr[this.data.multiIndex[0]].CIVILREGIONALISMCODE,
|
|
|
+ cityCode: this.data.cityArr[this.data.multiIndex[1]].CIVILREGIONALISMCODE,
|
|
|
+ areaCode: this.data.areaArr[this.data.multiIndex[2]].CIVILREGIONALISMCODE,
|
|
|
+ townCode: this.data.townArr[this.data.multiIndex[3]].CIVILREGIONALISMCODE,
|
|
|
+ villageCode: this.data.villageArr[this.data.multiIndex[4]].CIVILREGIONALISMCODE
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.chooseAdress4();
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 查镇的信息
|
|
|
chooseAdress4(fid) {
|
|
|
+ console.log(fid, '我走4了吗')
|
|
|
+ console.log(this.data.areaArr[this.data.multiIndex[3]].CIVILREGIONALISMID,'我是传入的4 id')
|
|
|
let mid;
|
|
|
if (fid) {
|
|
|
mid = fid
|
|
|
+ wx.showLoading({
|
|
|
+ title: '加载中',
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
} else {
|
|
|
- mid = this.data.multiArray[2][0].CIVILREGIONALISMID
|
|
|
+ mid = this.data.areaArr[this.data.multiIndex[3]].CIVILREGIONALISMID
|
|
|
}
|
|
|
- let arr = 'multiArray[3]'
|
|
|
let newdata = [];
|
|
|
wx.request({
|
|
|
url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
@@ -990,21 +1341,46 @@ Page({
|
|
|
newdata.push(item)
|
|
|
});
|
|
|
this.setData({
|
|
|
- [arr]: newdata,
|
|
|
- adressChangeStatus: true
|
|
|
+ townArr: newdata
|
|
|
})
|
|
|
- this.chooseAdress5();
|
|
|
+ if (!fid) {
|
|
|
+ this.setData({
|
|
|
+ town: this.data.townArr[0].CIVILREGIONALISMNAME,
|
|
|
+ townCode: this.data.townArr[0].CIVILREGIONALISMCODE,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ console.log(newdata)
|
|
|
+ console.log(this.data.multiIndex)
|
|
|
+ if (newdata.length == 0) {
|
|
|
+ wx.hideLoading()
|
|
|
+ this.setData({
|
|
|
+ province: this.data.provinceArr[this.data.multiIndex[0]].CIVILREGIONALISMNAME,
|
|
|
+ city: this.data.cityArr[this.data.multiIndex[1]].CIVILREGIONALISMNAME,
|
|
|
+ area: this.data.areaArr[this.data.multiIndex[2]].CIVILREGIONALISMNAME,
|
|
|
+ town: '',
|
|
|
+ village: '',
|
|
|
+ townArr: [],
|
|
|
+ villageArr: [],
|
|
|
+ provinceCode: this.data.provinceArr[this.data.multiIndex[0]].CIVILREGIONALISMCODE,
|
|
|
+ cityCode: this.data.cityArr[this.data.multiIndex[1]].CIVILREGIONALISMCODE,
|
|
|
+ areaCode: this.data.areaArr[this.data.multiIndex[2]].CIVILREGIONALISMCODE,
|
|
|
+ townCode: '',
|
|
|
+ villageCode: ''
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.chooseAdress5();
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
chooseAdress5(fid) {
|
|
|
let mid;
|
|
|
+ console.log(this.data.townArr[this.data.multiIndex[4]].CIVILREGIONALISMID,'我是传入的5 id')
|
|
|
if (fid) {
|
|
|
mid = fid
|
|
|
} else {
|
|
|
- mid = this.data.multiArray[3][0].CIVILREGIONALISMID
|
|
|
+ mid = this.data.townArr[this.data.multiIndex[4]].CIVILREGIONALISMID
|
|
|
}
|
|
|
- let arr = 'multiArray[4]'
|
|
|
let newdata = [];
|
|
|
wx.request({
|
|
|
url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
@@ -1020,127 +1396,110 @@ Page({
|
|
|
newdata.push(item)
|
|
|
});
|
|
|
this.setData({
|
|
|
- [arr]: newdata,
|
|
|
- adressChangeStatus: false
|
|
|
+ villageArr: newdata
|
|
|
})
|
|
|
+ if (newdata.length == 0) {
|
|
|
+ wx.hideLoading()
|
|
|
+ }
|
|
|
+ if (!fid) {
|
|
|
+ this.setData({
|
|
|
+ village: this.data.villageArr[0].CIVILREGIONALISMNAME,
|
|
|
+ villageCode: this.data.villageArr[0].CIVILREGIONALISMCODE,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ console.log(this.data.villageArr[this.data.multiIndex[4]],'我是村阿')
|
|
|
+ if (newdata.length == 0) {
|
|
|
+ wx.hideLoading()
|
|
|
+ this.setData({
|
|
|
+ province: this.data.provinceArr[this.data.multiIndex[0]].CIVILREGIONALISMNAME,
|
|
|
+ city: this.data.cityArr[this.data.multiIndex[1]].CIVILREGIONALISMNAME,
|
|
|
+ area: this.data.areaArr[this.data.multiIndex[2]].CIVILREGIONALISMNAME,
|
|
|
+ town: this.data.townArr[this.data.multiIndex[3]].CIVILREGIONALISMNAME,
|
|
|
+ village: '',
|
|
|
+ villageArr: [],
|
|
|
+ provinceCode: this.data.provinceArr[this.data.multiIndex[0]].CIVILREGIONALISMCODE,
|
|
|
+ cityCode: this.data.cityArr[this.data.multiIndex[1]].CIVILREGIONALISMCODE,
|
|
|
+ areaCode: this.data.areaArr[this.data.multiIndex[2]].CIVILREGIONALISMCODE,
|
|
|
+ townCode: this.data.townArr[this.data.multiIndex[3]].CIVILREGIONALISMCODE,
|
|
|
+ villageCode: ''
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.setData({
|
|
|
+ province: this.data.provinceArr[this.data.multiIndex[0]].CIVILREGIONALISMNAME,
|
|
|
+ city: this.data.cityArr[this.data.multiIndex[1]].CIVILREGIONALISMNAME,
|
|
|
+ area: this.data.areaArr[this.data.multiIndex[2]].CIVILREGIONALISMNAME,
|
|
|
+ town: this.data.townArr[this.data.multiIndex[3]].CIVILREGIONALISMNAME,
|
|
|
+ village: this.data.villageArr[this.data.multiIndex[4]].CIVILREGIONALISMNAME,
|
|
|
+ provinceCode: this.data.provinceArr[this.data.multiIndex[0]].CIVILREGIONALISMCODE,
|
|
|
+ cityCode: this.data.cityArr[this.data.multiIndex[1]].CIVILREGIONALISMCODE,
|
|
|
+ areaCode: this.data.areaArr[this.data.multiIndex[2]].CIVILREGIONALISMCODE,
|
|
|
+ townCode: this.data.townArr[this.data.multiIndex[3]].CIVILREGIONALISMCODE,
|
|
|
+ villageCode: this.data.villageArr[this.data.multiIndex[4]].CIVILREGIONALISMCODE,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ wx.hideLoading()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 户籍地址
|
|
|
- bindMultiPickerChange: function (e) {
|
|
|
- if (!this.data.adressChangeStatus) {
|
|
|
- let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr'
|
|
|
- let province = this.data.multiArray[0][e.detail.value[0]].CIVILREGIONALISMNAME;
|
|
|
- let city = this.data.multiArray[1][e.detail.value[1]].CIVILREGIONALISMNAME;
|
|
|
- let area = this.data.multiArray[2][e.detail.value[2]].CIVILREGIONALISMNAME;
|
|
|
- let town = this.data.multiArray[3][e.detail.value[3]].CIVILREGIONALISMNAME;
|
|
|
- let village = this.data.multiArray[4][e.detail.value[4]].CIVILREGIONALISMNAME;
|
|
|
- let provinceCode = this.data.multiArray[0][e.detail.value[0]].CIVILREGIONALISMCODE;
|
|
|
- let cityCode = this.data.multiArray[1][e.detail.value[1]].CIVILREGIONALISMCODE;
|
|
|
- let areaCode = this.data.multiArray[2][e.detail.value[2]].CIVILREGIONALISMCODE;
|
|
|
- let townCode = this.data.multiArray[3][e.detail.value[3]].CIVILREGIONALISMCODE;
|
|
|
- let villageCode = this.data.multiArray[4][e.detail.value[4]].CIVILREGIONALISMCODE;
|
|
|
- this.setData({
|
|
|
- multiIndex: e.detail.value,
|
|
|
- [arr]: [],
|
|
|
- codeArr: []
|
|
|
- })
|
|
|
- this.data.codeArr.push(provinceCode, cityCode, areaCode, townCode, villageCode)
|
|
|
- this.data.oldInfo[this.data.activeIndex].chooseAdressArr.push(province, city, area, town, village)
|
|
|
- let a = this.data.oldInfo[this.data.activeIndex].chooseAdressArr.join("/");
|
|
|
- let b = this.data.codeArr.join(",")
|
|
|
- this.SubmitOldmanInfo({
|
|
|
- id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
- nativePlace: a,
|
|
|
- nativePlaceId: b
|
|
|
- })
|
|
|
- this.setData({
|
|
|
- [arr]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr
|
|
|
- })
|
|
|
- if (this.data.oldInfo[this.data.activeIndex].isSameWithAddress[0].checked) {
|
|
|
- let Info = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr1'
|
|
|
- let Infos = 'oldInfo[' + this.data.activeIndex + '].addressExt'
|
|
|
- this.setData({
|
|
|
- [Info]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr,
|
|
|
- [Infos]: this.data.oldInfo[this.data.activeIndex].nativePlaceExt
|
|
|
- })
|
|
|
- let a = this.data.oldInfo[this.data.activeIndex].chooseAdressArr.join("/");
|
|
|
- let b = this.data.codeArr.join(",")
|
|
|
- this.SubmitOldmanInfo({
|
|
|
- id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
- address: a,
|
|
|
- addressId: b
|
|
|
- })
|
|
|
- }
|
|
|
- } else {
|
|
|
- let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr'
|
|
|
- this.setData({
|
|
|
- [arr]: []
|
|
|
- })
|
|
|
- wx.showToast({
|
|
|
- title: '户籍地址不匹配,请重新选择',
|
|
|
- icon: 'none',
|
|
|
- duration: 2000,
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- // 五级联动
|
|
|
- bindMultiPickerColumnChange: function (e) {
|
|
|
- this.setData({
|
|
|
- adressChangeStatus: true
|
|
|
- })
|
|
|
- if (e.detail.column == 0) {
|
|
|
- this.chooseAdress2(this.data.multiArray[0][e.detail.value].CIVILREGIONALISMID);
|
|
|
- } else if (e.detail.column == 1) {
|
|
|
- this.chooseAdress3(this.data.multiArray[1][e.detail.value].CIVILREGIONALISMID);
|
|
|
- } else if (e.detail.column == 2) {
|
|
|
- this.chooseAdress4(this.data.multiArray[2][e.detail.value].CIVILREGIONALISMID);
|
|
|
- } else if (e.detail.column == 3) {
|
|
|
- this.chooseAdress5(this.data.multiArray[3][e.detail.value].CIVILREGIONALISMID);
|
|
|
- }
|
|
|
- },
|
|
|
- //现居地址picker
|
|
|
- bindMultiPickerChange1: function (e) {
|
|
|
- if (!this.data.adressChangeStatus) {
|
|
|
- let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr1'
|
|
|
- let province = this.data.multiArray[0][e.detail.value[0]].CIVILREGIONALISMNAME;
|
|
|
- let city = this.data.multiArray[1][e.detail.value[1]].CIVILREGIONALISMNAME;
|
|
|
- let area = this.data.multiArray[2][e.detail.value[2]].CIVILREGIONALISMNAME;
|
|
|
- let town = this.data.multiArray[3][e.detail.value[3]].CIVILREGIONALISMNAME;
|
|
|
- let village = this.data.multiArray[4][e.detail.value[4]].CIVILREGIONALISMNAME;
|
|
|
- let provinceCode = this.data.multiArray[0][e.detail.value[0]].CIVILREGIONALISMCODE;
|
|
|
- let cityCode = this.data.multiArray[1][e.detail.value[1]].CIVILREGIONALISMCODE;
|
|
|
- let areaCode = this.data.multiArray[2][e.detail.value[2]].CIVILREGIONALISMCODE;
|
|
|
- let townCode = this.data.multiArray[3][e.detail.value[3]].CIVILREGIONALISMCODE;
|
|
|
- let villageCode = this.data.multiArray[4][e.detail.value[4]].CIVILREGIONALISMCODE;
|
|
|
- this.setData({
|
|
|
- multiIndex1: e.detail.value,
|
|
|
- [arr]: []
|
|
|
- })
|
|
|
- let codeArr = [];
|
|
|
- codeArr.push(provinceCode, cityCode, areaCode, townCode, villageCode)
|
|
|
- this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.push(province, city, area, town, village)
|
|
|
- let a = this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.join("/");
|
|
|
- let b = codeArr.join(",")
|
|
|
- this.SubmitOldmanInfo({
|
|
|
- id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
- address: a,
|
|
|
- addressId: b
|
|
|
- })
|
|
|
- this.setData({
|
|
|
- [arr]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr1
|
|
|
- })
|
|
|
- } else {
|
|
|
- let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr1'
|
|
|
+ bindChange(e) {
|
|
|
+ wx.showLoading({
|
|
|
+ title: '加载中',
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
+ console.log(e.detail.value)
|
|
|
+ if (e.detail.value[0] != this.data.multiIndex[0]) {
|
|
|
+ this.chooseAdress2(this.data.provinceArr[e.detail.value[0]].CIVILREGIONALISMID);
|
|
|
+ } else if (e.detail.value[1] != this.data.multiIndex[1]) {
|
|
|
+ this.chooseAdress3(this.data.cityArr[e.detail.value[1]].CIVILREGIONALISMID);
|
|
|
+ } else if (e.detail.value[2] != this.data.multiIndex[2]) {
|
|
|
+ this.chooseAdress4(this.data.areaArr[e.detail.value[2]].CIVILREGIONALISMID);
|
|
|
+ } else if (e.detail.value[3] != this.data.multiIndex[3]) {
|
|
|
+ this.chooseAdress5(this.data.townArr[e.detail.value[3]].CIVILREGIONALISMID);
|
|
|
+ } else if (e.detail.value[4] != this.data.multiIndex[4]) {
|
|
|
this.setData({
|
|
|
- [arr]: []
|
|
|
- })
|
|
|
- wx.showToast({
|
|
|
- title: '现居地址不匹配,请重新选择',
|
|
|
- icon: 'none',
|
|
|
- duration: 2000,
|
|
|
+ village:this.data.villageArr[e.detail.value[4]].CIVILREGIONALISMNAME,
|
|
|
+ villageCode:this.data.villageArr[e.detail.value[4]].CIVILREGIONALISMCODE
|
|
|
})
|
|
|
+ wx.hideLoading()
|
|
|
}
|
|
|
+ this.setData({
|
|
|
+ multiIndex: e.detail.value
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // bindChange1(e) {
|
|
|
+ // if (e.detail.value[0] != this.data.multiIndex[0]) {
|
|
|
+ // this.chooseAdress2(this.data.provinceArr[e.detail.value[0]].CIVILREGIONALISMID);
|
|
|
+ // } else if (e.detail.value[1] != this.data.multiIndex[1]) {
|
|
|
+ // this.chooseAdress3(this.data.cityArr[e.detail.value[1]].CIVILREGIONALISMID);
|
|
|
+ // } else if (e.detail.value[2] != this.data.multiIndex[2]) {
|
|
|
+ // this.chooseAdress4(this.data.areaArr[e.detail.value[2]].CIVILREGIONALISMID);
|
|
|
+ // } else if (e.detail.value[3] != this.data.multiIndex[3]) {
|
|
|
+ // this.chooseAdress5(this.data.townArr[e.detail.value[3]].CIVILREGIONALISMID);
|
|
|
+ // }
|
|
|
+ // this.setData({
|
|
|
+ // multiIndex: e.detail.value,
|
|
|
+ // province: this.data.provinceArr[e.detail.value[0]].CIVILREGIONALISMNAME,
|
|
|
+ // city: this.data.cityArr[e.detail.value[1]].CIVILREGIONALISMNAME,
|
|
|
+ // area: this.data.areaArr[e.detail.value[2]].CIVILREGIONALISMNAME,
|
|
|
+ // town: this.data.townArr[e.detail.value[3]].CIVILREGIONALISMNAME,
|
|
|
+ // village: this.data.villageArr[e.detail.value[4]].CIVILREGIONALISMNAME,
|
|
|
+ // provinceCode: this.data.provinceArr[e.detail.value[0]].CIVILREGIONALISMCODE,
|
|
|
+ // cityCode: this.data.cityArr[e.detail.value[1]].CIVILREGIONALISMCODE,
|
|
|
+ // areaCode: this.data.areaArr[e.detail.value[2]].CIVILREGIONALISMCODE,
|
|
|
+ // townCode: this.data.townArr[e.detail.value[3]].CIVILREGIONALISMCODE,
|
|
|
+ // villageCode: this.data.villageArr[e.detail.value[4]].CIVILREGIONALISMCODE
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ bindpickstart(e) {
|
|
|
+ console.log(e, '滚动开始了')
|
|
|
+ // wx.showLoading({
|
|
|
+ // title: '加载中',
|
|
|
+ // mask:true
|
|
|
+ // })
|
|
|
+ },
|
|
|
+ bindpickend(e) {
|
|
|
+ console.log(e, '滚动结束了')
|
|
|
+ // wx.hideLoading()
|
|
|
},
|
|
|
// 补充户籍地址
|
|
|
tab1Change6(e) {
|
|
@@ -1227,6 +1586,59 @@ Page({
|
|
|
addressExt: e.detail.value
|
|
|
})
|
|
|
},
|
|
|
+ pickSure() {
|
|
|
+ let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr';
|
|
|
+ let codeArr = [];
|
|
|
+ this.setData({
|
|
|
+ [arr]: []
|
|
|
+ })
|
|
|
+ console.log(this.data.province, this.data.city, this.data.area, this.data.town, this.data.village)
|
|
|
+ codeArr.push(this.data.provinceCode, this.data.cityCode, this.data.areaCode, this.data.townCode, this.data.villageCode)
|
|
|
+ this.data.oldInfo[this.data.activeIndex].chooseAdressArr.push(this.data.province, this.data.city, this.data.area, this.data.town, this.data.village)
|
|
|
+ let a = this.data.oldInfo[this.data.activeIndex].chooseAdressArr.join("/");
|
|
|
+ let b = codeArr.join(",")
|
|
|
+ this.SubmitOldmanInfo({
|
|
|
+ id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
+ nativePlace: a,
|
|
|
+ nativePlaceId: b
|
|
|
+ })
|
|
|
+ this.setData({
|
|
|
+ showAdressBox: false,
|
|
|
+ oldInfo: this.data.oldInfo
|
|
|
+ })
|
|
|
+ },
|
|
|
+ pickEsc() {
|
|
|
+ this.setData({
|
|
|
+ showAdressBox: false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ pickSure1() {
|
|
|
+ console.log('111111111')
|
|
|
+ let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr1';
|
|
|
+ let codeArr = [];
|
|
|
+ this.setData({
|
|
|
+ [arr]: []
|
|
|
+ })
|
|
|
+ codeArr.push(this.data.provinceCode, this.data.cityCode, this.data.areaCode, this.data.townCode, this.data.villageCode)
|
|
|
+ this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.push(this.data.province, this.data.city, this.data.area, this.data.town, this.data.village)
|
|
|
+ console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr1, '00000000000')
|
|
|
+ let a = this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.join("/");
|
|
|
+ let b = codeArr.join(",")
|
|
|
+ this.SubmitOldmanInfo({
|
|
|
+ id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
+ address: a,
|
|
|
+ addressId: b
|
|
|
+ })
|
|
|
+ this.setData({
|
|
|
+ showAdressBox1: false,
|
|
|
+ oldInfo: this.data.oldInfo
|
|
|
+ })
|
|
|
+ },
|
|
|
+ pickEsc1() {
|
|
|
+ this.setData({
|
|
|
+ showAdressBox1: false
|
|
|
+ })
|
|
|
+ },
|
|
|
// 婚姻以及配偶情况
|
|
|
tab1Change8: function (e) {
|
|
|
let data = this.data.oldInfo[this.data.activeIndex].oldMarry.map(v => {
|
|
@@ -2072,28 +2484,16 @@ Page({
|
|
|
this.setData({
|
|
|
[child]: e.detail.value
|
|
|
})
|
|
|
- // let han = /^[\u4e00-\u9fa5]+$/;
|
|
|
if (!e.detail.value) {
|
|
|
- let flag = 'childNameNull[' + e.currentTarget.dataset.index + '] ';
|
|
|
this.setData({
|
|
|
- [flag]: true
|
|
|
+ ['childNameNull[' + e.currentTarget.dataset.index + ']']: true
|
|
|
})
|
|
|
return false;
|
|
|
+ } else {
|
|
|
+ this.setData({
|
|
|
+ ['childNameNull[' + e.currentTarget.dataset.index + ']']: false
|
|
|
+ })
|
|
|
}
|
|
|
- // if (!han.test(e.detail.value)) {
|
|
|
- // wx.showModal({
|
|
|
- // showCancel: false,
|
|
|
- // content: '您输入的内容不是汉字哦'
|
|
|
- // })
|
|
|
- // return false;
|
|
|
- // };
|
|
|
- // if (e.detail.value.length < 2) {
|
|
|
- // wx.showModal({
|
|
|
- // showCancel: false,
|
|
|
- // content: '赡养人姓名不可以少于两个字哦'
|
|
|
- // })
|
|
|
- // return false
|
|
|
- // }
|
|
|
this.SubmitOldmanInfo({
|
|
|
id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
childInfo: JSON.stringify(this.data.childInfo[this.data.activeIndex].Info)
|
|
@@ -2117,11 +2517,14 @@ Page({
|
|
|
[child]: e.detail.value
|
|
|
})
|
|
|
if (!e.detail.value) {
|
|
|
- let flag = 'childPhoneNull[' + e.currentTarget.dataset.index + '] ';
|
|
|
this.setData({
|
|
|
- [flag]: true
|
|
|
+ ['childPhoneNull[' + e.currentTarget.dataset.index + ']']: true
|
|
|
})
|
|
|
return false;
|
|
|
+ } else {
|
|
|
+ this.setData({
|
|
|
+ ['childPhoneNull[' + e.currentTarget.dataset.index + ']']: false
|
|
|
+ })
|
|
|
}
|
|
|
this.SubmitOldmanInfo({
|
|
|
id: this.data.nameArr[this.data.activeIndex]._id,
|
|
@@ -2145,12 +2548,22 @@ Page({
|
|
|
this.setData({
|
|
|
[child]: e.detail.value
|
|
|
})
|
|
|
+ // if (!e.detail.value) {
|
|
|
+ // let flag = 'ischildOutReason[' + e.currentTarget.dataset.index + '] ';
|
|
|
+ // this.setData({
|
|
|
+ // [flag]: true
|
|
|
+ // })
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
if (!e.detail.value) {
|
|
|
- let flag = 'ischildOutReason[' + e.currentTarget.dataset.index + '] ';
|
|
|
this.setData({
|
|
|
- [flag]: true
|
|
|
+ ['ischildOutReason[' + e.currentTarget.dataset.index + ']']: true
|
|
|
})
|
|
|
return false;
|
|
|
+ } else {
|
|
|
+ this.setData({
|
|
|
+ ['ischildOutReason[' + e.currentTarget.dataset.index + ']']: false
|
|
|
+ })
|
|
|
}
|
|
|
this.SubmitOldmanInfo({
|
|
|
id: this.data.nameArr[this.data.activeIndex]._id,
|
|
@@ -2198,11 +2611,14 @@ Page({
|
|
|
[child]: e.detail.value
|
|
|
})
|
|
|
if (!e.detail.value) {
|
|
|
- let flag = 'ischildMarryName[' + e.currentTarget.dataset.index + '] ';
|
|
|
this.setData({
|
|
|
- [flag]: true
|
|
|
+ ['ischildMarryName[' + e.currentTarget.dataset.index + ']']: true
|
|
|
})
|
|
|
return false;
|
|
|
+ } else {
|
|
|
+ this.setData({
|
|
|
+ ['ischildMarryName[' + e.currentTarget.dataset.index + ']']: false
|
|
|
+ })
|
|
|
}
|
|
|
this.SubmitOldmanInfo({
|
|
|
id: this.data.nameArr[this.data.activeIndex]._id,
|
|
@@ -2216,11 +2632,14 @@ Page({
|
|
|
[child]: e.detail.value
|
|
|
})
|
|
|
if (!e.detail.value) {
|
|
|
- let flag = 'ischildMarryPhone[' + e.currentTarget.dataset.index + '] ';
|
|
|
this.setData({
|
|
|
- [flag]: true
|
|
|
+ ['ischildMarryPhone[' + e.currentTarget.dataset.index + ']']: true
|
|
|
})
|
|
|
return false;
|
|
|
+ } else {
|
|
|
+ this.setData({
|
|
|
+ ['ischildMarryPhone[' + e.currentTarget.dataset.index + ']']: false
|
|
|
+ })
|
|
|
}
|
|
|
this.SubmitOldmanInfo({
|
|
|
id: this.data.nameArr[this.data.activeIndex]._id,
|
|
@@ -2264,21 +2683,6 @@ Page({
|
|
|
},
|
|
|
// 其他赡养人姓名
|
|
|
tab3Change2: function (e) {
|
|
|
- // let han = /^[\u4e00-\u9fa5]+$/;
|
|
|
- // if (!han.test(e.detail.value)) {
|
|
|
- // wx.showModal({
|
|
|
- // showCancel: false,
|
|
|
- // content: '您输入的内容不是汉字哦'
|
|
|
- // })
|
|
|
- // return false;
|
|
|
- // };
|
|
|
- // if (e.detail.value.length < 2) {
|
|
|
- // wx.showModal({
|
|
|
- // showCancel: false,
|
|
|
- // content: '赡养人姓名不可以少于两个字哦'
|
|
|
- // })
|
|
|
- // return false
|
|
|
- // }
|
|
|
let Info = 'otherInfo[' + this.data.activeIndex + '].Info.name'
|
|
|
this.setData({
|
|
|
[Info]: e.detail.value,
|
|
@@ -3731,8 +4135,6 @@ Page({
|
|
|
wx.redirectTo({
|
|
|
url: '/pages/login/login',
|
|
|
})
|
|
|
- } else {
|
|
|
- this.chooseAdress();
|
|
|
}
|
|
|
},
|
|
|
// 表单校验老人身份证号
|