|
@@ -4,6 +4,7 @@ var isonShow;
|
|
|
var isTwoOnshow;
|
|
|
Page({
|
|
|
data: {
|
|
|
+ focus:true,
|
|
|
showAdressBox: false,
|
|
|
showAdressBox1: false,
|
|
|
provinceArr: [],
|
|
@@ -122,15 +123,6 @@ Page({
|
|
|
visitCount: '',
|
|
|
visitCountExt: '', // 频次的其他
|
|
|
}],
|
|
|
- // multiArray: [
|
|
|
- // [],
|
|
|
- // [],
|
|
|
- // [],
|
|
|
- // [],
|
|
|
- // []
|
|
|
- // ],
|
|
|
- // multiIndex: [0, 0, 0, 0, 0],
|
|
|
- // multiIndex1: [0, 0, 0, 0, 0]
|
|
|
multiIndex: [0, 0, 0, 0, 0]
|
|
|
},
|
|
|
// 左侧点击
|
|
@@ -891,283 +883,6 @@ 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({
|
|
@@ -1207,25 +922,23 @@ Page({
|
|
|
this.setData({
|
|
|
provinceArr: newdata,
|
|
|
})
|
|
|
- this.setData({
|
|
|
- province: this.data.provinceArr[0].CIVILREGIONALISMNAME,
|
|
|
- provinceCode: this.data.provinceArr[0].CIVILREGIONALISMCODE,
|
|
|
- })
|
|
|
- console.log(this.data.province)
|
|
|
this.chooseAdress2();
|
|
|
+ },
|
|
|
+ fail:()=>{
|
|
|
+ wx.hideLoading()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
chooseAdress2(fid) {
|
|
|
+ wx.showLoading({
|
|
|
+ title: '加载中',
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
let mid;
|
|
|
if (fid) {
|
|
|
mid = fid
|
|
|
- wx.showLoading({
|
|
|
- title: '加载中',
|
|
|
- mask: true
|
|
|
- })
|
|
|
} else {
|
|
|
- mid = this.data.provinceArr[this.data.multiIndex[1]].CIVILREGIONALISMID
|
|
|
+ mid = this.data.provinceArr[this.data.multiIndex[1]].CIVILREGIONALISMID
|
|
|
}
|
|
|
let newdata = [];
|
|
|
wx.request({
|
|
@@ -1244,28 +957,30 @@ Page({
|
|
|
this.setData({
|
|
|
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();
|
|
|
+ },
|
|
|
+ fail:()=>{
|
|
|
+ wx.hideLoading()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 查县区的信息
|
|
|
chooseAdress3(fid) {
|
|
|
+ wx.showLoading({
|
|
|
+ title: '加载中',
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
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.cityArr[this.data.multiIndex[2]].CIVILREGIONALISMID
|
|
|
+ console.log(this.data.cityArr)
|
|
|
+ console.log(this.data.multiIndex)
|
|
|
+ if(!this.data.cityArr[this.data.multiIndex[2]].CIVILREGIONALISMID){
|
|
|
+ wx.hideLoading()
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ mid = this.data.cityArr[this.data.multiIndex[2]].CIVILREGIONALISMID
|
|
|
}
|
|
|
let newdata = [];
|
|
|
wx.request({
|
|
@@ -1284,47 +999,49 @@ Page({
|
|
|
this.setData({
|
|
|
areaArr: newdata
|
|
|
})
|
|
|
- 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,
|
|
|
+ area: '',
|
|
|
+ town: '',
|
|
|
+ village: '',
|
|
|
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
|
|
|
+ areaCode:'',
|
|
|
+ townCode: '',
|
|
|
+ villageCode:'',
|
|
|
+ areaArr:[],
|
|
|
+ townArr: [],
|
|
|
+ villageArr: [],
|
|
|
})
|
|
|
} else {
|
|
|
this.chooseAdress4();
|
|
|
}
|
|
|
+ },
|
|
|
+ fail:()=>{
|
|
|
+ wx.hideLoading()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
// 查镇的信息
|
|
|
chooseAdress4(fid) {
|
|
|
- console.log(fid, '我走4了吗')
|
|
|
- console.log(this.data.areaArr[this.data.multiIndex[3]].CIVILREGIONALISMID,'我是传入的4 id')
|
|
|
+ wx.showLoading({
|
|
|
+ title: '加载中',
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
let mid;
|
|
|
if (fid) {
|
|
|
mid = fid
|
|
|
- wx.showLoading({
|
|
|
- title: '加载中',
|
|
|
- mask: true
|
|
|
- })
|
|
|
} else {
|
|
|
- mid = this.data.areaArr[this.data.multiIndex[3]].CIVILREGIONALISMID
|
|
|
+ console.log(this.data.areaArr)
|
|
|
+ console.log(this.data.multiIndex)
|
|
|
+ if(!this.data.areaArr[this.data.multiIndex[3]].CIVILREGIONALISMID){
|
|
|
+ wx.hideLoading()
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ mid = this.data.areaArr[this.data.multiIndex[3]].CIVILREGIONALISMID
|
|
|
}
|
|
|
let newdata = [];
|
|
|
wx.request({
|
|
@@ -1343,14 +1060,6 @@ Page({
|
|
|
this.setData({
|
|
|
townArr: newdata
|
|
|
})
|
|
|
- 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({
|
|
@@ -1370,16 +1079,24 @@ Page({
|
|
|
} else {
|
|
|
this.chooseAdress5();
|
|
|
}
|
|
|
+ },
|
|
|
+ fail:()=>{
|
|
|
+ wx.hideLoading()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
chooseAdress5(fid) {
|
|
|
let mid;
|
|
|
- console.log(this.data.townArr[this.data.multiIndex[4]].CIVILREGIONALISMID,'我是传入的5 id')
|
|
|
if (fid) {
|
|
|
mid = fid
|
|
|
} else {
|
|
|
- mid = this.data.townArr[this.data.multiIndex[4]].CIVILREGIONALISMID
|
|
|
+ console.log(this.data.townArr)
|
|
|
+ console.log(this.data.multiIndex)
|
|
|
+ if(!this.data.townArr[this.data.multiIndex[4]].CIVILREGIONALISMID){
|
|
|
+ wx.hideLoading()
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ mid = this.data.townArr[this.data.multiIndex[4]].CIVILREGIONALISMID
|
|
|
}
|
|
|
let newdata = [];
|
|
|
wx.request({
|
|
@@ -1399,24 +1116,13 @@ Page({
|
|
|
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({
|
|
|
+ villageArr: [],
|
|
|
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,
|
|
@@ -1438,6 +1144,9 @@ Page({
|
|
|
})
|
|
|
}
|
|
|
wx.hideLoading()
|
|
|
+ },
|
|
|
+ fail:()=>{
|
|
|
+ wx.hideLoading()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -1446,7 +1155,8 @@ Page({
|
|
|
title: '加载中',
|
|
|
mask: true
|
|
|
})
|
|
|
- console.log(e.detail.value)
|
|
|
+ console.log(e.detail.value,'我是改变的数组')
|
|
|
+ console.log(this.data.multiIndex,'我是上次存的数组')
|
|
|
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]) {
|
|
@@ -1460,46 +1170,74 @@ Page({
|
|
|
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
|
|
|
})
|
|
|
+ wx.hideLoading()
|
|
|
+ },
|
|
|
+ pickSure() {
|
|
|
+ let arr = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr';
|
|
|
+ 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].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
|
|
|
+ })
|
|
|
},
|
|
|
- // 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
|
|
|
- // })
|
|
|
+ wx.showLoading({
|
|
|
+ title: '加载中',
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
},
|
|
|
bindpickend(e) {
|
|
|
console.log(e, '滚动结束了')
|
|
|
- // wx.hideLoading()
|
|
|
+ wx.hideLoading()
|
|
|
},
|
|
|
// 补充户籍地址
|
|
|
tab1Change6(e) {
|
|
@@ -1586,59 +1324,6 @@ 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 => {
|