roose 4 роки тому
батько
коміт
82b68988a7
2 змінених файлів з 73 додано та 55 видалено
  1. 67 51
      pages/collectInfo/collectInfo.js
  2. 6 4
      pages/collectInfo/collectInfo.wxml

+ 67 - 51
pages/collectInfo/collectInfo.js

@@ -42,42 +42,6 @@ Page({
       }, {
         name: '女'
       }],
-      regularsInfos: {
-        visitMode: [{
-          name: '电话问候',
-          checked: false
-        }, {
-          name: '上门巡访',
-          checked: false
-        }, {
-          name: '其它',
-          checked: false
-        }],
-        visitModeExt: '', //巡访其他
-        visitCount: [{
-          name: '每天',
-          checked: false
-        }, {
-          name: '每周',
-          checked: false
-        }, {
-          name: '每月',
-          checked: false
-        }, {
-          name: '每季',
-          checked: false
-        }, {
-          name: '其它',
-          checked: false
-        }],
-        visitCountExt: '', // 频次的其他
-      },
-      regularsInfo: {
-        visitMode: '',
-        visitModeExt: '', //巡访其他
-        visitCount: '',
-        visitCountExt: '', // 频次的其他
-      },
       nation: '', //民族
       idNumber: '', //身份证号
       phone: '',
@@ -105,7 +69,6 @@ Page({
         name: "老年人慢性病",
         disabled: false
       }],
-
       disabilityAyy: [{
         name: "视力残疾"
       }, {
@@ -314,7 +277,6 @@ Page({
 
     ],
     isHavePhoto: false,
-
     // tab2
     childInfo: [{
       childrenNum: ''
@@ -322,11 +284,6 @@ Page({
     childNumArr: [
       '0个', '1个', '2个', '3个', '3个以上'
     ],
-    // tab2可维护数组
-    // childSexArr:{
-
-    // }
-    // ,
     ischildName: [false, false, false],
     childSexArr: ['男', '女'],
     ischildPhone: [false, false, false],
@@ -372,8 +329,6 @@ Page({
         ]
       }
     }],
-    // otherInfo: ,
-    // otherInfo: '', //是否有赡养人
     othersyrArr: ['是', '否'],
     othersyrSexArr: ['男', '女'],
     othersyrRelation: [
@@ -381,7 +336,6 @@ Page({
     ],
     othersyrIsout: ['是', '否'],
     region: ['', '', ''],
-    // customItem: '其它',
     othersyrIsMarry: ['是', '否'],
     othersyrTfTimes: [
       '0次', '1次', '2次及以上'
@@ -412,6 +366,42 @@ Page({
     //   name: '其它'
     // }],
     // syrIndex:
+    regularsInfos: {
+      visitMode: [{
+        name: '电话问候',
+        checked: false
+      }, {
+        name: '上门巡访',
+        checked: false
+      }, {
+        name: '其它',
+        checked: false
+      }],
+      visitModeExt: '', //巡访其他
+      visitCount: [{
+        name: '每天',
+        checked: false
+      }, {
+        name: '每周',
+        checked: false
+      }, {
+        name: '每月',
+        checked: false
+      }, {
+        name: '每季',
+        checked: false
+      }, {
+        name: '其它',
+        checked: false
+      }],
+      visitCountExt: '', // 频次的其他
+    },
+    regularsInfo: [{
+      visitMode: '',
+      visitModeExt: '', //巡访其他
+      visitCount: '',
+      visitCountExt: '', // 频次的其他
+    }],
   },
   // 左侧点击
   turn(e) {
@@ -503,7 +493,8 @@ Page({
           this.setData({
             nameArr: this.data.nameArr.concat(res.data.data),
             familyFid: res.data.data.fid,
-            [name]: this.data.addOldname
+            [name]: this.data.addOldname,
+            oldInfo: this.data.oldInfo
           })
           this.getSelfLocation();
           console.log(this.data.nameArr)
@@ -2271,14 +2262,34 @@ Page({
   },
   // tab3是否有赡养人状态改变
   tab3Change1: function (e) {
+    // 否是1
+    console.log(e.detail.value, "1111111");
     let isHasOther = 'otherInfo[' + this.data.activeIndex + '].isHasOther'
+    if (e.detail.value == '0') {
+      this.setData({
+        [isHasOther]: this.data.othersyrArr[e.detail.value],
+      })
+      console.log("1111111");
+
+      this.SubmitOldmanInfo({
+        id: this.data.nameArr[this.data.activeIndex]._id,
+        otherInfo: JSON.stringify(this.data.otherInfo[this.data.activeIndex].Info)
+      })
+    } else {
+      this.setData({
+        [isHasOther]: this.data.othersyrArr[e.detail.value],
+      })
+      this.SubmitOldmanInfo({
+        id: this.data.nameArr[this.data.activeIndex]._id,
+        otherInfo: ''
+      })
+    }
+
     this.setData({
       [isHasOther]: this.data.othersyrArr[e.detail.value],
     })
-    this.SubmitOldmanInfo({
-      id: this.data.nameArr[this.data.activeIndex]._id,
-      isHasOther: this.data.othersyrArr[e.detail.value]
-    })
+
+
   },
   // 其他赡养人姓名
   tab3Change2: function (e) {
@@ -3121,6 +3132,8 @@ Page({
                 phone2 = partol.phone2;
               }
 
+            } else if (item.otherInfo == '') {
+              otherInfo = '否'
             } else {
               otherInfo = ''
             }
@@ -3254,6 +3267,9 @@ Page({
       this.setData({
         showBj: true,
         nameArr: [],
+        oldInfo: [],
+        childInfo: [],
+        otherInfo: [],
       })
     }
 

+ 6 - 4
pages/collectInfo/collectInfo.wxml

@@ -64,13 +64,15 @@
 			<image src="{{currentIndex==2?src5:src6}}" class="img img1"></image>
 			<text class="title2 {{currentIndex==2?'title4':''}}">其他赡养</text>
 			<text class="title3 {{currentIndex==2?'title4':''}}">义务人信息</text>
-			<image src="../../images/mz/unfinish.png" class="isfinish_icon"></image>
+			<image wx:if="{{otherInfo[activeIndex].isHasOther =='是' && otherInfo[activeIndex].Info.name  || otherInfo[activeIndex].isHasOther == '否'}}" src="../../images/mz/finish.png" class="isfinish_icon"></image>
+			<image wx:else src="../../images/mz/unfinish.png" class="isfinish_icon"></image>
+
 		</view>
 		<view class="block2 {{currentIndex!=3?'':'clickblock2'}}" bindtap="turn" data-index="3">
 			<image src="{{currentIndex==3?src7:src8}}" class="img img1"></image>
 			<text class="title2 {{currentIndex==3?'title4':''}}">巡访</text>
 			<text class="title3 {{currentIndex==3?'title4':''}}">联系人信息</text>
-			<image  src="../../images/mz/unfinish.png" class="isfinish_icon"></image>
+			<image src="../../images/mz/unfinish.png" class="isfinish_icon"></image>
 			<!-- <image wx:else src="../../images/mz/finish.png" class="isfinish_icon"></image> -->
 		</view>
 	</view>
@@ -89,6 +91,7 @@
 			</view>
 		</view>
 		<view class="form_box">
+			<!-- 第二个tab老人信息 -->
 			<view wx:if="{{currentIndex==0}}">
 				<view class="scan" bindtap="goOcr">
 					<van-icon name="photograph" color="#2087f7" size="30rpx" style="margin-left:20rpx" />
@@ -429,9 +432,8 @@
 			</view>
 			<!-- 第四个tab寻访联系人信息 -->
 			<view wx:if="{{currentIndex==3}}">
-			 
 				<view class="block">
-					<view class="name"><text class="red">*</text>巡访方式</view>
+					<view class="name"><text class="red">*</text>巡访方式{{oldInfo[activeIndex].regularsInfos.visitMode}} </view>
 					<checkbox-group bindchange="tab4Change1">
 						<label wx:for="{{oldInfo[activeIndex].regularsInfos.visitMode}}" wx:key="{{item.name}}">
 							<checkbox value="{{item.name}}" checked="{{item.checked}}" color="#fff" />{{item.name}}