|
@@ -7,6 +7,8 @@ Page({
|
|
data: {
|
|
data: {
|
|
// isVisittimesnull: true,
|
|
// isVisittimesnull: true,
|
|
// visitWaysFromOther: true,
|
|
// visitWaysFromOther: true,
|
|
|
|
+ // showLoading:false,
|
|
|
|
+ // fiveLeave:true,
|
|
color: '#898989',
|
|
color: '#898989',
|
|
paizhaofalg: false,
|
|
paizhaofalg: false,
|
|
activeIndex: 0,
|
|
activeIndex: 0,
|
|
@@ -420,7 +422,245 @@ Page({
|
|
visitCount: '',
|
|
visitCount: '',
|
|
visitCountExt: '', // 频次的其他
|
|
visitCountExt: '', // 频次的其他
|
|
}],
|
|
}],
|
|
|
|
+ multiArray: [
|
|
|
|
+ [],
|
|
|
|
+ [],
|
|
|
|
+ [],
|
|
|
|
+ [],
|
|
|
|
+ []
|
|
|
|
+ ],
|
|
|
|
+ multiIndex: [0, 0, 0, 0, 0]
|
|
|
|
+ },
|
|
|
|
+ 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);
|
|
|
|
+ });
|
|
|
|
+ console.log(newdata)
|
|
|
|
+ for (var i = 0; i < newdata.length; i++) {
|
|
|
|
+ if (newdata[i].CIVILREGIONALISMNAME == '吉林省') {
|
|
|
|
+ j = i;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ newdata.unshift(newdata[j])
|
|
|
|
+ newdata.splice(j + 1, 1);
|
|
|
|
+ this.setData({
|
|
|
|
+ [arr]: newdata,
|
|
|
|
+ })
|
|
|
|
+ this.chooseAdress2();
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ chooseAdress2(fid) {
|
|
|
|
+
|
|
|
|
+ console.log(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) => {
|
|
|
|
+ console.log(res.data.data, '我是二级内容')
|
|
|
|
+ res.data.data.forEach(item => {
|
|
|
|
+ newdata.push(item)
|
|
|
|
+ });
|
|
|
|
+ this.setData({
|
|
|
|
+ [arr]: newdata
|
|
|
|
+ })
|
|
|
|
+ this.chooseAdress3();
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ chooseAdress3(fid) {
|
|
|
|
+
|
|
|
|
+ console.log(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) => {
|
|
|
|
+ console.log(res.data.data, '我是三级内容')
|
|
|
|
+ res.data.data.forEach(item => {
|
|
|
|
+ newdata.push(item)
|
|
|
|
+ });
|
|
|
|
+ this.setData({
|
|
|
|
+ [arr]: newdata
|
|
|
|
+ })
|
|
|
|
+ this.chooseAdress4();
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
+ chooseAdress4(fid) {
|
|
|
|
+
|
|
|
|
+ console.log(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) => {
|
|
|
|
+ console.log(res.data.data, '我是四级内容')
|
|
|
|
+ res.data.data.forEach(item => {
|
|
|
|
+ newdata.push(item)
|
|
|
|
+ });
|
|
|
|
+ this.setData({
|
|
|
|
+ [arr]: newdata
|
|
|
|
+ })
|
|
|
|
+ this.chooseAdress5();
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ chooseAdress5(fid) {
|
|
|
|
+
|
|
|
|
+ console.log(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) => {
|
|
|
|
+ console.log(res.data.data, '我是五级内容')
|
|
|
|
+ res.data.data.forEach(item => {
|
|
|
|
+ newdata.push(item)
|
|
|
|
+ });
|
|
|
|
+ this.setData({
|
|
|
|
+ [arr]: newdata
|
|
|
|
+ })
|
|
|
|
+ wx.hideLoading()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ bindMultiPickerChange: function (e) {
|
|
|
|
+ console.log(this.data.multiArray,'我是数组111111111')
|
|
|
|
+ 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;
|
|
|
|
+ this.setData({
|
|
|
|
+ multiIndex: e.detail.value,
|
|
|
|
+ [arr]: []
|
|
|
|
+ })
|
|
|
|
+ this.data.oldInfo[this.data.activeIndex].chooseAdressArr.push(province, city, area, town, village)
|
|
|
|
+ this.SubmitOldmanInfo({
|
|
|
|
+ id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
|
+ address: JSON.stringify(this.data.oldInfo[this.data.activeIndex].chooseAdressArr)
|
|
|
|
+ })
|
|
|
|
+ this.setData({
|
|
|
|
+ [arr]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ bindMultiPickerColumnChange: function (e) {
|
|
|
|
+ // this.setData({
|
|
|
|
+ // showLoading:true
|
|
|
|
+ // })
|
|
|
|
+ // this.data.showLoading=true;
|
|
|
|
+ // wx.showLoading({
|
|
|
|
+ // title: '选择中',
|
|
|
|
+ // mask: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);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ bindMultiPickerChange1: function (e) {
|
|
|
|
+ console.log(this.data.multiArray,'我是数组2222222222')
|
|
|
|
+ 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;
|
|
|
|
+ this.setData({
|
|
|
|
+ multiIndex1: e.detail.value,
|
|
|
|
+ [arr]: []
|
|
|
|
+ })
|
|
|
|
+ this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.push(province, city, area, town, village)
|
|
|
|
+ this.SubmitOldmanInfo({
|
|
|
|
+ id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
|
+ nativePlace: JSON.stringify(this.data.oldInfo[this.data.activeIndex].chooseAdressArr1)
|
|
|
|
+ })
|
|
|
|
+ this.setData({
|
|
|
|
+ [arr]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr1
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // bindMultiPickerColumnChange1: function (e) {
|
|
|
|
+ // 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);
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
// 左侧点击
|
|
// 左侧点击
|
|
turn(e) {
|
|
turn(e) {
|
|
let index = e.currentTarget.dataset.index
|
|
let index = e.currentTarget.dataset.index
|
|
@@ -980,7 +1220,7 @@ Page({
|
|
console.log("返回临时文件路径");
|
|
console.log("返回临时文件路径");
|
|
//返回临时文件路径
|
|
//返回临时文件路径
|
|
let img = 'data:image/png;base64,' + res1.data
|
|
let img = 'data:image/png;base64,' + res1.data
|
|
- console.log(img,"1232323231222222");
|
|
|
|
|
|
+ console.log(img, "1232323231222222");
|
|
wx.request({
|
|
wx.request({
|
|
url: 'https://aip.baidubce.com/rest/2.0/ocr/v1/idcard?access_token=' + token,
|
|
url: 'https://aip.baidubce.com/rest/2.0/ocr/v1/idcard?access_token=' + token,
|
|
method: 'POST',
|
|
method: 'POST',
|
|
@@ -993,8 +1233,8 @@ Page({
|
|
},
|
|
},
|
|
dataType: 'json',
|
|
dataType: 'json',
|
|
success: (e) => {
|
|
success: (e) => {
|
|
- console.log(e,"看看那ocr返回了么数据呢");
|
|
|
|
-
|
|
|
|
|
|
+ console.log(e, "看看那ocr返回了么数据呢");
|
|
|
|
+
|
|
// 扫描后赋值
|
|
// 扫描后赋值
|
|
_this.setData({
|
|
_this.setData({
|
|
showBj: false,
|
|
showBj: false,
|
|
@@ -1199,26 +1439,26 @@ Page({
|
|
},
|
|
},
|
|
// 联系电话
|
|
// 联系电话
|
|
tab1Change5: function (e) {
|
|
tab1Change5: function (e) {
|
|
- if (e.detail.value == null || e.detail.value == '') {
|
|
|
|
- this.setData({
|
|
|
|
- oldPhone: true
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- } else {
|
|
|
|
- this.setData({
|
|
|
|
- oldPhone: false
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- if (!(/^[0-9]*$/.test(e.detail.value))) {
|
|
|
|
- this.setData({
|
|
|
|
- oldPhone1: true
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- } else {
|
|
|
|
- this.setData({
|
|
|
|
- oldPhone1: false
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ // if (e.detail.value == null || e.detail.value == '') {
|
|
|
|
+ // this.setData({
|
|
|
|
+ // oldPhone: true
|
|
|
|
+ // })
|
|
|
|
+ // return
|
|
|
|
+ // } else {
|
|
|
|
+ // this.setData({
|
|
|
|
+ // oldPhone: false
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // if (!(/^[0-9]*$/.test(e.detail.value))) {
|
|
|
|
+ // this.setData({
|
|
|
|
+ // oldPhone1: true
|
|
|
|
+ // })
|
|
|
|
+ // return
|
|
|
|
+ // } else {
|
|
|
|
+ // this.setData({
|
|
|
|
+ // oldPhone1: false
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
let phone = 'oldInfo[' + this.data.activeIndex + '].phone'
|
|
let phone = 'oldInfo[' + this.data.activeIndex + '].phone'
|
|
this.setData({
|
|
this.setData({
|
|
[phone]: e.detail.value
|
|
[phone]: e.detail.value
|
|
@@ -1264,10 +1504,9 @@ Page({
|
|
id: this.data.nameArr[this.data.activeIndex]._id,
|
|
id: this.data.nameArr[this.data.activeIndex]._id,
|
|
isSameWithAddress: '否',
|
|
isSameWithAddress: '否',
|
|
addressExt: '',
|
|
addressExt: '',
|
|
-
|
|
|
|
})
|
|
})
|
|
this.setData({
|
|
this.setData({
|
|
- [Info]: null,
|
|
|
|
|
|
+ [Info]: '',
|
|
[Infos]: '',
|
|
[Infos]: '',
|
|
})
|
|
})
|
|
console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr1)
|
|
console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr1)
|
|
@@ -2154,7 +2393,6 @@ Page({
|
|
})
|
|
})
|
|
|
|
|
|
},
|
|
},
|
|
-
|
|
|
|
closeImage(e) {
|
|
closeImage(e) {
|
|
console.log(e.currentTarget.dataset.activeindex, "121212");
|
|
console.log(e.currentTarget.dataset.activeindex, "121212");
|
|
let imgPath = 'oldInfo[' + e.currentTarget.dataset.activeindex + '].imgPath'
|
|
let imgPath = 'oldInfo[' + e.currentTarget.dataset.activeindex + '].imgPath'
|
|
@@ -2391,8 +2629,6 @@ Page({
|
|
},
|
|
},
|
|
// 一年探望次数
|
|
// 一年探望次数
|
|
tab2Change12: function (e) {
|
|
tab2Change12: function (e) {
|
|
-
|
|
|
|
-
|
|
|
|
let child = 'childInfo[' + this.data.activeIndex + '].Info[' + e.currentTarget.dataset.index + '].visit';
|
|
let child = 'childInfo[' + this.data.activeIndex + '].Info[' + e.currentTarget.dataset.index + '].visit';
|
|
this.setData({
|
|
this.setData({
|
|
[child]: this.data.childTfTimes[e.detail.value]
|
|
[child]: this.data.childTfTimes[e.detail.value]
|
|
@@ -2427,12 +2663,9 @@ Page({
|
|
otherInfo: ''
|
|
otherInfo: ''
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
this.setData({
|
|
this.setData({
|
|
[isHasOther]: this.data.othersyrArr[e.detail.value],
|
|
[isHasOther]: this.data.othersyrArr[e.detail.value],
|
|
})
|
|
})
|
|
-
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
// 其他赡养人姓名
|
|
// 其他赡养人姓名
|
|
tab3Change2: function (e) {
|
|
tab3Change2: function (e) {
|
|
@@ -3658,8 +3891,8 @@ Page({
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- console.log(mmm,"mmmmmmmmmmmmmm");
|
|
|
|
-
|
|
|
|
|
|
+ console.log(mmm, "mmmmmmmmmmmmmm");
|
|
|
|
+
|
|
// if (datass[that.data.activeIndex].regularsInfo) {
|
|
// if (datass[that.data.activeIndex].regularsInfo) {
|
|
// let regularsInfo = that.removeExcess(datass[that.data.activeIndex].regularsInfo);
|
|
// let regularsInfo = that.removeExcess(datass[that.data.activeIndex].regularsInfo);
|
|
// console.log(regularsInfo,"解析的regularsInfo");
|
|
// console.log(regularsInfo,"解析的regularsInfo");
|
|
@@ -3751,242 +3984,221 @@ Page({
|
|
}
|
|
}
|
|
|
|
|
|
},
|
|
},
|
|
- chooseAdress() {
|
|
|
|
- console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr)
|
|
|
|
- if (this.data.oldInfo[this.data.activeIndex].chooseAdressArr.length == 0) {
|
|
|
|
- wx.request({
|
|
|
|
- url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
|
|
- method: "get",
|
|
|
|
- header: {
|
|
|
|
- appletsId: wx.getStorageSync('openId')
|
|
|
|
- },
|
|
|
|
- success: (res) => {
|
|
|
|
- this.setData({
|
|
|
|
- showAdress: true,
|
|
|
|
- provinceArr: res.data.data
|
|
|
|
- })
|
|
|
|
- console.log(this.data.provinceArr)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- this.setData({
|
|
|
|
- showAdress: true
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 选择现居地址
|
|
|
|
- chooseAdress1() {
|
|
|
|
- if (this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.length == 0) {
|
|
|
|
- wx.request({
|
|
|
|
- url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
|
|
- method: "get",
|
|
|
|
- header: {
|
|
|
|
- appletsId: wx.getStorageSync('openId')
|
|
|
|
- },
|
|
|
|
- success: (res) => {
|
|
|
|
- console.log(res.data.data)
|
|
|
|
- this.setData({
|
|
|
|
- showAdress1: true,
|
|
|
|
- provinceArr1: res.data.data
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- this.setData({
|
|
|
|
- showAdress1: true
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- provinceClick(e) {
|
|
|
|
- console.log(e.currentTarget.dataset.item)
|
|
|
|
- wx.showLoading({
|
|
|
|
- title: '选择中',
|
|
|
|
- mask: true
|
|
|
|
- })
|
|
|
|
- this.data.oldInfo[this.data.activeIndex].chooseAdressArr.push(e.currentTarget.dataset.item)
|
|
|
|
- wx.request({
|
|
|
|
- url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
|
|
- method: "get",
|
|
|
|
- header: {
|
|
|
|
- appletsId: wx.getStorageSync('openId')
|
|
|
|
- },
|
|
|
|
- data: {
|
|
|
|
- fid: e.currentTarget.dataset.item.CIVILREGIONALISMID
|
|
|
|
- },
|
|
|
|
- success: (res) => {
|
|
|
|
- this.setData({
|
|
|
|
- provinceArr: res.data.data,
|
|
|
|
- isAdress: true,
|
|
|
|
- oldInfo: this.data.oldInfo
|
|
|
|
- })
|
|
|
|
- if (res.data.data.length == 0) {
|
|
|
|
- this.setData({
|
|
|
|
- pleaseChoose: false
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- if (this.data.oldInfo[this.data.activeIndex].chooseAdressArr.length == 5) {
|
|
|
|
- let nativePlaceId = '';
|
|
|
|
- let nativePlace = '';
|
|
|
|
- for (let value of this.data.oldInfo[this.data.activeIndex].chooseAdressArr) {
|
|
|
|
- nativePlace += value.CIVILREGIONALISMNAME + '/'
|
|
|
|
- nativePlaceId += value.CIVILREGIONALISMID + ','
|
|
|
|
- console.log(value, "打印下");
|
|
|
|
- }
|
|
|
|
- this.SubmitOldmanInfo({
|
|
|
|
- id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
|
- nativePlace: nativePlace.substring(0, nativePlace.length - 1),
|
|
|
|
- nativePlaceId: nativePlaceId.substring(0, nativePlaceId.length - 1),
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr, '我是添加的数组')
|
|
|
|
- wx.hideLoading()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- // }
|
|
|
|
- },
|
|
|
|
- provinceClick1(e) {
|
|
|
|
- console.log(e.currentTarget.dataset.item)
|
|
|
|
- wx.showLoading({
|
|
|
|
- title: '选择中',
|
|
|
|
- mask: true
|
|
|
|
- })
|
|
|
|
- this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.push(e.currentTarget.dataset.item)
|
|
|
|
- wx.request({
|
|
|
|
- url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
|
|
- method: "get",
|
|
|
|
- header: {
|
|
|
|
- appletsId: wx.getStorageSync('openId')
|
|
|
|
- },
|
|
|
|
- data: {
|
|
|
|
- fid: e.currentTarget.dataset.item.CIVILREGIONALISMID
|
|
|
|
- },
|
|
|
|
- success: (res) => {
|
|
|
|
- this.setData({
|
|
|
|
- provinceArr1: res.data.data,
|
|
|
|
- isAdress1: true,
|
|
|
|
- oldInfo: this.data.oldInfo
|
|
|
|
- })
|
|
|
|
- if (res.data.data.length == 0) {
|
|
|
|
- this.setData({
|
|
|
|
- pleaseChoose1: false
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- if (this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.length == 5) {
|
|
|
|
- let addressId = '';
|
|
|
|
- let address = '';
|
|
|
|
- for (let value of this.data.oldInfo[this.data.activeIndex].chooseAdressArr1) {
|
|
|
|
- address += value.CIVILREGIONALISMNAME + '/'
|
|
|
|
- addressId += value.CIVILREGIONALISMID + ','
|
|
|
|
- console.log(value, "打印下");
|
|
|
|
- }
|
|
|
|
- this.SubmitOldmanInfo({
|
|
|
|
- id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
|
- address: address.substring(0, address.length - 1),
|
|
|
|
- addressId: addressId.substring(0, addressId.length - 1),
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr1, '我是添加的数组')
|
|
|
|
- wx.hideLoading()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- // }
|
|
|
|
- },
|
|
|
|
- closeAdress() {
|
|
|
|
- this.setData({
|
|
|
|
- showAdress: false
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- closeAdress1() {
|
|
|
|
- this.setData({
|
|
|
|
- showAdress1: false
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- reSelect(e) {
|
|
|
|
- let Info = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr'
|
|
|
|
- console.log(e.currentTarget.dataset.index)
|
|
|
|
- this.setData({
|
|
|
|
- [Info]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr.slice(0, e.currentTarget.dataset.index),
|
|
|
|
- oldInfo: this.data.oldInfo
|
|
|
|
- })
|
|
|
|
- console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr)
|
|
|
|
- let fid;
|
|
|
|
- if (this.data.oldInfo[this.data.activeIndex].chooseAdressArr.length != 0) {
|
|
|
|
- fid = this.data.oldInfo[this.data.activeIndex].chooseAdressArr[this.data.oldInfo[this.data.activeIndex].chooseAdressArr.length - 1].CIVILREGIONALISMID;
|
|
|
|
- } else {
|
|
|
|
- fid = ''
|
|
|
|
- }
|
|
|
|
- wx.request({
|
|
|
|
- url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
|
|
- method: "get",
|
|
|
|
- header: {
|
|
|
|
- appletsId: wx.getStorageSync('openId')
|
|
|
|
- },
|
|
|
|
- data: {
|
|
|
|
- fid
|
|
|
|
- },
|
|
|
|
- success: (res) => {
|
|
|
|
- this.setData({
|
|
|
|
- provinceArr: res.data.data,
|
|
|
|
- isAdress: true,
|
|
|
|
- oldInfo: this.data.oldInfo
|
|
|
|
- })
|
|
|
|
- if (res.data.data.length == 0) {
|
|
|
|
- this.setData({
|
|
|
|
- pleaseChoose: false
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr, '我是添加的数组')
|
|
|
|
- wx.hideLoading()
|
|
|
|
- // this.setData({
|
|
|
|
- // provinceArr: res.data.data,
|
|
|
|
- // isAdress: true,
|
|
|
|
- // [Info]: this.data.oldInfo
|
|
|
|
- // })
|
|
|
|
- // if (res.data.data.length == 0) {
|
|
|
|
- // this.setData({
|
|
|
|
- // pleaseChoose: false
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- reSelect1(e) {
|
|
|
|
- let Info = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr1'
|
|
|
|
- console.log(e.currentTarget.dataset.index)
|
|
|
|
- this.setData({
|
|
|
|
- [Info]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.slice(0, e.currentTarget.dataset.index),
|
|
|
|
- oldInfo: this.data.oldInfo
|
|
|
|
- })
|
|
|
|
- console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr1)
|
|
|
|
- let fid;
|
|
|
|
- if (this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.length != 0) {
|
|
|
|
- fid = this.data.oldInfo[this.data.activeIndex].chooseAdressArr1[this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.length - 1].CIVILREGIONALISMID;
|
|
|
|
- } else {
|
|
|
|
- fid = ''
|
|
|
|
- }
|
|
|
|
- wx.request({
|
|
|
|
- url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
|
|
- method: "get",
|
|
|
|
- header: {
|
|
|
|
- appletsId: wx.getStorageSync('openId')
|
|
|
|
- },
|
|
|
|
- data: {
|
|
|
|
- fid
|
|
|
|
- },
|
|
|
|
- success: (res) => {
|
|
|
|
- this.setData({
|
|
|
|
- provinceArr1: res.data.data,
|
|
|
|
- isAdress1: true,
|
|
|
|
- oldInfo: this.data.oldInfo
|
|
|
|
- })
|
|
|
|
- if (res.data.data.length == 0) {
|
|
|
|
- this.setData({
|
|
|
|
- pleaseChoose1: false
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr1, '我是添加的数组')
|
|
|
|
- wx.hideLoading()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
|
|
+ // // 选择现居地址
|
|
|
|
+ // chooseAdress1() {
|
|
|
|
+ // if (this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.length == 0) {
|
|
|
|
+ // wx.request({
|
|
|
|
+ // url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
|
|
+ // method: "get",
|
|
|
|
+ // header: {
|
|
|
|
+ // appletsId: wx.getStorageSync('openId')
|
|
|
|
+ // },
|
|
|
|
+ // success: (res) => {
|
|
|
|
+ // console.log(res.data.data)
|
|
|
|
+ // this.setData({
|
|
|
|
+ // showAdress1: true,
|
|
|
|
+ // provinceArr1: res.data.data
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // this.setData({
|
|
|
|
+ // showAdress1: true
|
|
|
|
+ // })
|
|
|
|
+ // },
|
|
|
|
+ // provinceClick(e) {
|
|
|
|
+ // console.log(e.currentTarget.dataset.item)
|
|
|
|
+ // wx.showLoading({
|
|
|
|
+ // title: '选择中',
|
|
|
|
+ // mask: true
|
|
|
|
+ // })
|
|
|
|
+ // this.data.oldInfo[this.data.activeIndex].chooseAdressArr.push(e.currentTarget.dataset.item)
|
|
|
|
+ // wx.request({
|
|
|
|
+ // url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
|
|
+ // method: "get",
|
|
|
|
+ // header: {
|
|
|
|
+ // appletsId: wx.getStorageSync('openId')
|
|
|
|
+ // },
|
|
|
|
+ // data: {
|
|
|
|
+ // fid: e.currentTarget.dataset.item.CIVILREGIONALISMID
|
|
|
|
+ // },
|
|
|
|
+ // success: (res) => {
|
|
|
|
+ // this.setData({
|
|
|
|
+ // provinceArr: res.data.data,
|
|
|
|
+ // isAdress: true,
|
|
|
|
+ // oldInfo: this.data.oldInfo
|
|
|
|
+ // })
|
|
|
|
+ // if (res.data.data.length == 0) {
|
|
|
|
+ // this.setData({
|
|
|
|
+ // pleaseChoose: false
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // if (this.data.oldInfo[this.data.activeIndex].chooseAdressArr.length == 5) {
|
|
|
|
+ // let nativePlaceId = '';
|
|
|
|
+ // let nativePlace = '';
|
|
|
|
+ // for (let value of this.data.oldInfo[this.data.activeIndex].chooseAdressArr) {
|
|
|
|
+ // nativePlace += value.CIVILREGIONALISMNAME + '/'
|
|
|
|
+ // nativePlaceId += value.CIVILREGIONALISMID + ','
|
|
|
|
+ // console.log(value, "打印下");
|
|
|
|
+ // }
|
|
|
|
+ // this.SubmitOldmanInfo({
|
|
|
|
+ // id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
|
+ // nativePlace: nativePlace.substring(0, nativePlace.length - 1),
|
|
|
|
+ // nativePlaceId: nativePlaceId.substring(0, nativePlaceId.length - 1),
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr, '我是添加的数组')
|
|
|
|
+ // wx.hideLoading()
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // // }
|
|
|
|
+ // },
|
|
|
|
+ // provinceClick1(e) {
|
|
|
|
+ // console.log(e.currentTarget.dataset.item)
|
|
|
|
+ // wx.showLoading({
|
|
|
|
+ // title: '选择中',
|
|
|
|
+ // mask: true
|
|
|
|
+ // })
|
|
|
|
+ // this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.push(e.currentTarget.dataset.item)
|
|
|
|
+ // wx.request({
|
|
|
|
+ // url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
|
|
+ // method: "get",
|
|
|
|
+ // header: {
|
|
|
|
+ // appletsId: wx.getStorageSync('openId')
|
|
|
|
+ // },
|
|
|
|
+ // data: {
|
|
|
|
+ // fid: e.currentTarget.dataset.item.CIVILREGIONALISMID
|
|
|
|
+ // },
|
|
|
|
+ // success: (res) => {
|
|
|
|
+ // this.setData({
|
|
|
|
+ // provinceArr1: res.data.data,
|
|
|
|
+ // isAdress1: true,
|
|
|
|
+ // oldInfo: this.data.oldInfo
|
|
|
|
+ // })
|
|
|
|
+ // if (res.data.data.length == 0) {
|
|
|
|
+ // this.setData({
|
|
|
|
+ // pleaseChoose1: false
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // if (this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.length == 5) {
|
|
|
|
+ // let addressId = '';
|
|
|
|
+ // let address = '';
|
|
|
|
+ // for (let value of this.data.oldInfo[this.data.activeIndex].chooseAdressArr1) {
|
|
|
|
+ // address += value.CIVILREGIONALISMNAME + '/'
|
|
|
|
+ // addressId += value.CIVILREGIONALISMID + ','
|
|
|
|
+ // console.log(value, "打印下");
|
|
|
|
+ // }
|
|
|
|
+ // this.SubmitOldmanInfo({
|
|
|
|
+ // id: this.data.nameArr[this.data.activeIndex]._id,
|
|
|
|
+ // address: address.substring(0, address.length - 1),
|
|
|
|
+ // addressId: addressId.substring(0, addressId.length - 1),
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr1, '我是添加的数组')
|
|
|
|
+ // wx.hideLoading()
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // // }
|
|
|
|
+ // },
|
|
|
|
+ // closeAdress() {
|
|
|
|
+ // this.setData({
|
|
|
|
+ // showAdress: false
|
|
|
|
+ // })
|
|
|
|
+ // },
|
|
|
|
+ // closeAdress1() {
|
|
|
|
+ // this.setData({
|
|
|
|
+ // showAdress1: false
|
|
|
|
+ // })
|
|
|
|
+ // },
|
|
|
|
+ // reSelect(e) {
|
|
|
|
+ // let Info = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr'
|
|
|
|
+ // console.log(e.currentTarget.dataset.index)
|
|
|
|
+ // this.setData({
|
|
|
|
+ // [Info]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr.slice(0, e.currentTarget.dataset.index),
|
|
|
|
+ // oldInfo: this.data.oldInfo
|
|
|
|
+ // })
|
|
|
|
+ // console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr)
|
|
|
|
+ // let fid;
|
|
|
|
+ // if (this.data.oldInfo[this.data.activeIndex].chooseAdressArr.length != 0) {
|
|
|
|
+ // fid = this.data.oldInfo[this.data.activeIndex].chooseAdressArr[this.data.oldInfo[this.data.activeIndex].chooseAdressArr.length - 1].CIVILREGIONALISMID;
|
|
|
|
+ // } else {
|
|
|
|
+ // fid = ''
|
|
|
|
+ // }
|
|
|
|
+ // wx.request({
|
|
|
|
+ // url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
|
|
+ // method: "get",
|
|
|
|
+ // header: {
|
|
|
|
+ // appletsId: wx.getStorageSync('openId')
|
|
|
|
+ // },
|
|
|
|
+ // data: {
|
|
|
|
+ // fid
|
|
|
|
+ // },
|
|
|
|
+ // success: (res) => {
|
|
|
|
+ // this.setData({
|
|
|
|
+ // provinceArr: res.data.data,
|
|
|
|
+ // isAdress: true,
|
|
|
|
+ // oldInfo: this.data.oldInfo
|
|
|
|
+ // })
|
|
|
|
+ // if (res.data.data.length == 0) {
|
|
|
|
+ // this.setData({
|
|
|
|
+ // pleaseChoose: false
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr, '我是添加的数组')
|
|
|
|
+ // wx.hideLoading()
|
|
|
|
+ // // this.setData({
|
|
|
|
+ // // provinceArr: res.data.data,
|
|
|
|
+ // // isAdress: true,
|
|
|
|
+ // // [Info]: this.data.oldInfo
|
|
|
|
+ // // })
|
|
|
|
+ // // if (res.data.data.length == 0) {
|
|
|
|
+ // // this.setData({
|
|
|
|
+ // // pleaseChoose: false
|
|
|
|
+ // // })
|
|
|
|
+ // // }
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // },
|
|
|
|
+ // reSelect1(e) {
|
|
|
|
+ // let Info = 'oldInfo[' + this.data.activeIndex + '].chooseAdressArr1'
|
|
|
|
+ // console.log(e.currentTarget.dataset.index)
|
|
|
|
+ // this.setData({
|
|
|
|
+ // [Info]: this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.slice(0, e.currentTarget.dataset.index),
|
|
|
|
+ // oldInfo: this.data.oldInfo
|
|
|
|
+ // })
|
|
|
|
+ // console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr1)
|
|
|
|
+ // let fid;
|
|
|
|
+ // if (this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.length != 0) {
|
|
|
|
+ // fid = this.data.oldInfo[this.data.activeIndex].chooseAdressArr1[this.data.oldInfo[this.data.activeIndex].chooseAdressArr1.length - 1].CIVILREGIONALISMID;
|
|
|
|
+ // } else {
|
|
|
|
+ // fid = ''
|
|
|
|
+ // }
|
|
|
|
+ // wx.request({
|
|
|
|
+ // url: util.globalData.publicUrl + '/civilregionalism/deptList',
|
|
|
|
+ // method: "get",
|
|
|
|
+ // header: {
|
|
|
|
+ // appletsId: wx.getStorageSync('openId')
|
|
|
|
+ // },
|
|
|
|
+ // data: {
|
|
|
|
+ // fid
|
|
|
|
+ // },
|
|
|
|
+ // success: (res) => {
|
|
|
|
+ // this.setData({
|
|
|
|
+ // provinceArr1: res.data.data,
|
|
|
|
+ // isAdress1: true,
|
|
|
|
+ // oldInfo: this.data.oldInfo
|
|
|
|
+ // })
|
|
|
|
+ // if (res.data.data.length == 0) {
|
|
|
|
+ // this.setData({
|
|
|
|
+ // pleaseChoose1: false
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr1, '我是添加的数组')
|
|
|
|
+ // wx.hideLoading()
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // },
|
|
// 提交老人采集信息
|
|
// 提交老人采集信息
|
|
SubmitOldmanInfo(data) {
|
|
SubmitOldmanInfo(data) {
|
|
console.log(data, ' 提交老人信息带过来的数据')
|
|
console.log(data, ' 提交老人信息带过来的数据')
|
|
@@ -4075,7 +4287,6 @@ Page({
|
|
[photoAndLocation]: gps
|
|
[photoAndLocation]: gps
|
|
})
|
|
})
|
|
console.log(that.data.nameArr[that.data.activeIndex], "定位的问题");
|
|
console.log(that.data.nameArr[that.data.activeIndex], "定位的问题");
|
|
-
|
|
|
|
that.SubmitOldmanInfo({
|
|
that.SubmitOldmanInfo({
|
|
id: that.data.nameArr[that.data.activeIndex]._id,
|
|
id: that.data.nameArr[that.data.activeIndex]._id,
|
|
photoAndLocation: gps
|
|
photoAndLocation: gps
|
|
@@ -4089,11 +4300,9 @@ Page({
|
|
fail: function (res) {}
|
|
fail: function (res) {}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
-
|
|
|
|
onLoad(value) {
|
|
onLoad(value) {
|
|
- console.log(value, "onLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoad");
|
|
|
|
this.huixian1(value.id, value.name);
|
|
this.huixian1(value.id, value.name);
|
|
- // this.getSelfLocation();
|
|
|
|
|
|
+ this.chooseAdress();
|
|
},
|
|
},
|
|
huixian1(id, name) {
|
|
huixian1(id, name) {
|
|
if (id) {
|
|
if (id) {
|
|
@@ -4769,7 +4978,6 @@ Page({
|
|
let mmm = datass.map(item => {
|
|
let mmm = datass.map(item => {
|
|
if (item.regularsInfo) {
|
|
if (item.regularsInfo) {
|
|
let partol = this.removeExcess(item.regularsInfo);
|
|
let partol = this.removeExcess(item.regularsInfo);
|
|
- console.log(partol, "111111111111111111111");
|
|
|
|
return {
|
|
return {
|
|
visitCount: partol.visitCount,
|
|
visitCount: partol.visitCount,
|
|
visitCountExt: partol.visitCountExt,
|
|
visitCountExt: partol.visitCountExt,
|
|
@@ -4778,7 +4986,6 @@ Page({
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- console.log(mmm,"mmmmmmmmmmmmmm");
|
|
|
|
that.setData({
|
|
that.setData({
|
|
oldInfo: abc,
|
|
oldInfo: abc,
|
|
otherInfo: def,
|
|
otherInfo: def,
|
|
@@ -4786,15 +4993,11 @@ Page({
|
|
regularsInfos: zzz,
|
|
regularsInfos: zzz,
|
|
regularsInfo: mmm
|
|
regularsInfo: mmm
|
|
})
|
|
})
|
|
- console.log(that.data.oldInfo, "老人的返现数组")
|
|
|
|
- console.log(that.data.otherInfo, "其他的返现数组")
|
|
|
|
- console.log(that.data.childInfo, "孩子的返现数组")
|
|
|
|
- console.log(that.data.regularsInfos, "q巡访的返现数组")
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- },
|
|
|
|
|
|
+ }
|
|
})
|
|
})
|