ssfg 4 gadi atpakaļ
vecāks
revīzija
dc8024a32f

+ 483 - 280
pages/collectInfo/collectInfo.js

@@ -7,6 +7,8 @@ Page({
   data: {
     // isVisittimesnull: true,
     // visitWaysFromOther: true,
+    // showLoading:false,
+    // fiveLeave:true,
     color: '#898989',
     paizhaofalg: false,
     activeIndex: 0,
@@ -420,7 +422,245 @@ Page({
       visitCount: '',
       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) {
     let index = e.currentTarget.dataset.index
@@ -980,7 +1220,7 @@ Page({
                     console.log("返回临时文件路径");
                     //返回临时文件路径
                     let img = 'data:image/png;base64,' + res1.data
-                    console.log(img,"1232323231222222");
+                    console.log(img, "1232323231222222");
                     wx.request({
                       url: 'https://aip.baidubce.com/rest/2.0/ocr/v1/idcard?access_token=' + token,
                       method: 'POST',
@@ -993,8 +1233,8 @@ Page({
                       },
                       dataType: 'json',
                       success: (e) => {
-                        console.log(e,"看看那ocr返回了么数据呢");
-                        
+                        console.log(e, "看看那ocr返回了么数据呢");
+
                         // 扫描后赋值 
                         _this.setData({
                           showBj: false,
@@ -1199,26 +1439,26 @@ Page({
   },
   // 联系电话
   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'
     this.setData({
       [phone]: e.detail.value
@@ -1264,10 +1504,9 @@ Page({
         id: this.data.nameArr[this.data.activeIndex]._id,
         isSameWithAddress: '否',
         addressExt: '',
-
       })
       this.setData({
-        [Info]: null,
+        [Info]: '',
         [Infos]: '',
       })
       console.log(this.data.oldInfo[this.data.activeIndex].chooseAdressArr1)
@@ -2154,7 +2393,6 @@ Page({
     })
 
   },
-
   closeImage(e) {
     console.log(e.currentTarget.dataset.activeindex, "121212");
     let imgPath = 'oldInfo[' + e.currentTarget.dataset.activeindex + '].imgPath'
@@ -2391,8 +2629,6 @@ Page({
   },
   // 一年探望次数
   tab2Change12: function (e) {
-
-
     let child = 'childInfo[' + this.data.activeIndex + '].Info[' + e.currentTarget.dataset.index + '].visit';
     this.setData({
       [child]: this.data.childTfTimes[e.detail.value]
@@ -2427,12 +2663,9 @@ Page({
         otherInfo: ''
       })
     }
-
     this.setData({
       [isHasOther]: this.data.othersyrArr[e.detail.value],
     })
-
-
   },
   // 其他赡养人姓名
   tab3Change2: function (e) {
@@ -3658,8 +3891,8 @@ Page({
               }
             }
           })
-          console.log(mmm,"mmmmmmmmmmmmmm");
-          
+          console.log(mmm, "mmmmmmmmmmmmmm");
+
           // if (datass[that.data.activeIndex].regularsInfo) {
           //   let regularsInfo = that.removeExcess(datass[that.data.activeIndex].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) {
     console.log(data, ' 提交老人信息带过来的数据')
@@ -4075,7 +4287,6 @@ Page({
               [photoAndLocation]: gps
             })
             console.log(that.data.nameArr[that.data.activeIndex], "定位的问题");
-
             that.SubmitOldmanInfo({
               id: that.data.nameArr[that.data.activeIndex]._id,
               photoAndLocation: gps
@@ -4089,11 +4300,9 @@ Page({
       fail: function (res) {}
     });
   },
-
   onLoad(value) {
-    console.log(value, "onLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoadonLoad");
     this.huixian1(value.id, value.name);
-    // this.getSelfLocation();
+    this.chooseAdress();
   },
   huixian1(id, name) {
     if (id) {
@@ -4769,7 +4978,6 @@ Page({
           let mmm = datass.map(item => {
             if (item.regularsInfo) {
               let partol = this.removeExcess(item.regularsInfo);
-              console.log(partol, "111111111111111111111");
               return {
                 visitCount: partol.visitCount,
                 visitCountExt: partol.visitCountExt,
@@ -4778,7 +4986,6 @@ Page({
               }
             }
           })
-          console.log(mmm,"mmmmmmmmmmmmmm");
           that.setData({
             oldInfo: abc,
             otherInfo: def,
@@ -4786,15 +4993,11 @@ Page({
             regularsInfos: zzz,
             regularsInfo: mmm
           })
-          console.log(that.data.oldInfo, "老人的返现数组")
-          console.log(that.data.otherInfo, "其他的返现数组")
-          console.log(that.data.childInfo, "孩子的返现数组")
-          console.log(that.data.regularsInfos, "q巡访的返现数组")
         }
       })
     } else {
 
     }
 
-  },
+  }
 })

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 20 - 12
pages/collectInfo/collectInfo.wxml


+ 17 - 2
pages/collectInfo/collectInfo.wxss

@@ -365,7 +365,15 @@ radio-group label {
   line-height: 50rpx;
   margin-top: 10rpx;
 }
-
+.picker1 {
+  border: 1px solid #e3e5eb;
+  width: 450rpx;
+  border-radius: 10rpx;
+  text-indent: 20rpx;
+  line-height: 50rpx;
+  margin-top: 10rpx;
+  height: auto;
+}
 .red {
   color: red;
 }
@@ -454,5 +462,12 @@ radio .wx-radio-input{
   position: absolute;
   top: 10rpx;
   left: 150rpx;
-
+}
+.loading{
+  width: 750rpx;
+  height: 100vh;
+  background-color: rgba(0, 0, 0, 0.5);
+  z-index: 99999;
+  position: fixed;
+  bottom: 0;
 }