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

+ 68 - 48
pages/collectInfo/collectInfo.js

@@ -1043,18 +1043,27 @@ Page({
                               sex: e.data.words_result['性别'].words
                             })
                           } else {
-                            wx.showToast({
-                              title: "添加当前老人名字和扫描身份证名字不一致,请重新扫描",
-                              icon: 'none',
-                              duration: 2000,
+                            console.log("姓名不一样的");
+                            // wx.showToast({
+                            //   title: "添加当前老人名字和扫描身份证名字不一致,请重新扫描",
+                            //   icon: 'none',
+                            //   duration: 2000,
+                            // })
+                            wx.showModal({
+                              showCancel: false,
+                              content: '添加当前老人名字和扫描身份证名字不一致,请重新扫描'
                             })
                           }
                         } else {
-                          wx.showToast({
-                            title: "身份证OCR识别失败",
-                            icon: 'none',
-                            duration: 2000,
+                          wx.showModal({
+                            showCancel: false,
+                            content: '身份证OCR识别失败'
                           })
+                          // wx.showToast({
+                          //   title: "身份证OCR识别失败",
+                          //   icon: 'none',
+                          //   duration: 2000,
+                          // })
                         }
                       },
                       complete: (e) => {
@@ -2033,30 +2042,30 @@ Page({
     let revise2 = "oldInfo[" + this.data.activeIndex + "].oldType[1].disable";
     let revise3 = "oldInfo[" + this.data.activeIndex + "].oldType[2].disable";
     let revise4 = "oldInfo[" + this.data.activeIndex + "].oldType[3].disable";
-    let revise5 = "oldInfo[" + this.data.activeIndex + "].oldType[4].checked";
+    let revise5 = "oldInfo[" + this.data.activeIndex + "].oldType[3].checked";
     this.SubmitOldmanInfo({
       id: this.data.nameArr[this.data.activeIndex]._id,
       oldType: JSON.stringify(e.detail.value)
     })
-    if (index1 >= 0) {
-      this.setData({
-        [revise2]: true,
-        [revise3]: true,
-        [revise4]: true,
-        [revise5]: true
-      })
-      return false;
-    } else {
-      console.log("反選的");
-      this.setData({
-        // [revise1]: false,
-        [revise2]: false,
-        [revise3]: false,
-        [revise4]: false,
-        [revise5]: false
-      })
-      index4 = -1;
-    }
+    // if (index1 >= 0) {
+    //   this.setData({
+    //     [revise2]: true,
+    //     [revise3]: true,
+    //     [revise4]: true,
+    //     [revise5]: true
+    //   })
+    //   return false;
+    // } else {
+    //   console.log("反選的");
+    //   this.setData({
+    //     // [revise1]: false,
+    //     [revise2]: false,
+    //     [revise3]: false,
+    //     [revise4]: false,
+    //     [revise5]: false
+    //   })
+    //   index4 = -1;
+    // }
     if (index2 >= 0) {
       this.setData({
         [revise1]: true,
@@ -2085,35 +2094,46 @@ Page({
         [revise4]: false
       })
     }
-    if (index4 >= 0) {
-
-      this.setData({
-        [revise1]: true,
-        [revise2]: true,
-        [revise3]: true
-      })
-      return false;
-    } else {
-      this.setData({
-        [revise1]: false,
-        [revise2]: false,
-        [revise3]: false
-      })
-    }
-    // if (index2 >= 0) {
+    // if (index4 >= 0) {
     //   this.setData({
     //     [revise1]: true,
-    //     [revise3]: true,
-    //     [revise4]: true
+    //     [revise2]: true,
+    //     [revise3]: true
     //   })
     //   return false;
     // } else {
     //   this.setData({
     //     [revise1]: false,
-    //     [revise3]: false,
-    //     [revise4]: false
+    //     [revise2]: false,
+    //     [revise3]: false
     //   })
     // }
+    if (index1 >= 0) {
+      this.setData({
+        [revise2]: true,
+        [revise3]: true,
+        [revise4]: true,
+        [revise5]: true
+      })
+      return false;
+    } else if(index4 >= 0){
+  
+      this.setData({
+        [revise1]: false,
+        [revise2]: false,
+        [revise3]: false,
+        [revise4]: false,
+        [revise5]: true
+      })
+    }else {
+      this.setData({
+        [revise1]: false,
+        [revise2]: false,
+        [revise3]: false,
+        [revise4]: false,
+       
+      })
+    }
 
   },
   goPhoto() {