roose 4 年之前
父节点
当前提交
a3999b2b09
共有 1 个文件被更改,包括 12 次插入9 次删除
  1. 12 9
      pages/collectInfo/collectInfo.js

+ 12 - 9
pages/collectInfo/collectInfo.js

@@ -1516,18 +1516,19 @@ Page({
   // 老年人能力情况
   tab1Change12: function (e) {
     let ability = 'oldInfo[' + this.data.activeIndex + '].ability'
+    let Info = 'oldInfo[' + this.data.activeIndex + '].oldType'
     this.setData({
       [ability]: this.data.ableStatus[e.detail.value]
     })
-    // if (e.detail.value == 2) {
-    //   this.setData({
-    //     oldType: this.data.oldType.concat({
-    //       name: "失能老人",
-    //       disable: true,
-    //       checked: true
-    //     })
-    //   })
-    // }
+    if (e.detail.value == 2) {
+      this.setData({
+        [Info]: this.data.oldInfo[this.data.activeIndex].oldType.concat({
+          name: "失能老人",
+          disable: true,
+          checked: true
+        })
+      })
+    }
     this.SubmitOldmanInfo({
       id: this.data.nameArr[this.data.activeIndex]._id,
       ability: this.data.disableLeval[e.detail.value]
@@ -2379,6 +2380,8 @@ 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]