From 9a64e7bb407317603cdbd3529e2732c777042b7f Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期二, 19 八月 2025 13:58:23 +0800
Subject: [PATCH] qx

---
 src/views/doctor/check/index.vue |  201 ++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 152 insertions(+), 49 deletions(-)

diff --git a/src/views/doctor/check/index.vue b/src/views/doctor/check/index.vue
index 25d2aee..ea268d3 100644
--- a/src/views/doctor/check/index.vue
+++ b/src/views/doctor/check/index.vue
@@ -976,7 +976,7 @@
             });
           }
         });
-      }else {
+      } else {
         if (this.focusrow.proResult != this.focusrow.project.proDefault) {
           const substrings = ["姝e父", "鏈寮傚父", "闃存��", "鏈鏄庢樉寮傚父", "鏃�"];
           let containsAllSubstrings = substrings.some(sub => this.focusrow.proResult.includes(sub));
@@ -1093,7 +1093,7 @@
             });
           }
         });
-      }else {
+      } else {
         if (this.focusrow.proResult != this.focusrow.project.proDefault) {
           const substrings = ["姝e父", "鏈寮傚父", "闃存��", "鏈鏄庢樉寮傚父", "鏃�"];
           let containsAllSubstrings = substrings.some(sub => this.focusrow.proResult.includes(sub));
@@ -2041,36 +2041,87 @@
             // });
           });
 
-          for (var i = 0; i < this.proParentList.sons.length; i++) {
-            //鍒ゆ柇鏂版暟缁勬槸鍚︽湁杩欎釜鍏冪礌鍊硷紝娌℃湁鐨勮瘽锛屽氨鎶奱rr[i]缁檖ush鍒版柊鏁扮粍newArr涓�
-            if (this.proParentList.sons[i].proResult == "" || this.proParentList.sons[i].proResult == null) {
-              this.radio = this.lastClickedTab.name
-              this.$modal.msgError("璇锋鏌ラ」鐩槸鍚﹀~鍐欏畬鎴�");
-              this.minedis = true
-              return
-            } else if (this.proParentList.sons[i].proResult.includes(" ")) {
-              this.$modal.msgError("璇锋鏌ュ~鍐欓」鐩腑鏄惁鏈夌┖鏍�");
-              this.radio = this.lastClickedTab.name
-              this.minedis = true
-              return
-            } else {
-              this.minedis = false
+          // for (var i = 0; i < this.proParentList.sons.length; i++) {
+          //   //鍒ゆ柇鏂版暟缁勬槸鍚︽湁杩欎釜鍏冪礌鍊硷紝娌℃湁鐨勮瘽锛屽氨鎶奱rr[i]缁檖ush鍒版柊鏁扮粍newArr涓�
+          //   if (this.proParentList.sons[i].proResult == "" || this.proParentList.sons[i].proResult == null) {
+          //     this.radio = this.lastClickedTab.name
+          //     this.$modal.msgError("璇锋鏌ラ」鐩槸鍚﹀~鍐欏畬鎴�");
+          //     this.minedis = true
+          //     return
+          //   } else if (this.proParentList.sons[i].proResult.includes(" ")) {
+          //     this.$modal.msgError("璇锋鏌ュ~鍐欓」鐩腑鏄惁鏈夌┖鏍�");
+          //     this.radio = this.lastClickedTab.name
+          //     this.minedis = true
+          //     return
+          //   } else {
+          //     this.minedis = false
+          //     this.tjOrderDetail.push({
+          //       proAdvice: this.proParentList.sons[i].proAdvice,
+          //       proName: this.proParentList.sons[i].project.proName,
+          //       proId: this.proParentList.sons[i].project.proId,
+          //       orderDetailId: this.proParentList.sons[i].orderDetailId,
+          //       flowingWaterId: this.proParentList.sons[i].flowingWaterId,
+          //       proResult: this.proParentList.sons[i].proResult,
+          //       tjStatus: 1,
+          //       isReturn: this.proParentList.sons[i].isReturn === true ? 1 : 0,
+          //       exceptionDesc: this.proParentList.sons[i].exceptionDesc === true ? 1 : 0,
+          //       conclusion: this.proParentList.sons[i].conclusion,
+          //       rulesList: this.proParentList.sons[i].rulesList,
+          //     });
+          //   }
+          // }
+          for (const item of this.proParentList.sons) {
+            const { project, proResult } = item;
+
+            // 蹇呭~椤归獙璇�
+            if (project.proDefault) {
+              console.log('蹇呭~椤规鏌�:', project.proDefault);
+
+                if (!proResult || proResult.trim() === '') {
+                this.$modal.msgError("璇锋鏌ラ」鐩槸鍚﹀~鍐欏畬鎴�");
+                this.minedis = true;
+                return;
+              } else if (proResult.includes(' ')) {
+                this.$modal.msgError("璇锋鏌ラ」鐩槸鍚︽湁绌烘牸");
+                this.minedis = true;
+                return;
+              } else {
+                this.minedis = false;
+                this.tjOrderDetail.push({
+                  proAdvice: item.proAdvice,
+                  proName: project.proName,
+                  proId: project.proId,
+                  orderDetailId: item.orderDetailId,
+                  flowingWaterId: item.flowingWaterId,
+                  proResult: proResult,
+                  tjStatus: 1,
+                  isReturn: item.isReturn ? 1 : 0,
+                  exceptionDesc: item.exceptionDesc ? 1 : 0,
+                  conclusion: item.conclusion,
+                  rulesList: item.rulesList
+                });
+              }
+            }
+
+            // 闈炲繀濉」鏁版嵁澶勭悊
+            if (!project.proDefault) {
+              console.log('闈炲繀濉」澶勭悊:', this.tjOrderDetail);
+              this.minedis = false;
               this.tjOrderDetail.push({
-                proAdvice: this.proParentList.sons[i].proAdvice,
-                proName: this.proParentList.sons[i].project.proName,
-                proId: this.proParentList.sons[i].project.proId,
-                orderDetailId: this.proParentList.sons[i].orderDetailId,
-                flowingWaterId: this.proParentList.sons[i].flowingWaterId,
-                proResult: this.proParentList.sons[i].proResult,
+                proAdvice: item.proAdvice,
+                proName: project.proName,
+                proId: project.proId,
+                orderDetailId: item.orderDetailId,
+                flowingWaterId: item.flowingWaterId,
+                proResult: proResult,
                 tjStatus: 1,
-                isReturn: this.proParentList.sons[i].isReturn === true ? 1 : 0,
-                exceptionDesc: this.proParentList.sons[i].exceptionDesc === true ? 1 : 0,
-                conclusion: this.proParentList.sons[i].conclusion,
-                rulesList: this.proParentList.sons[i].rulesList,
+                isReturn: item.isReturn ? 1 : 0,
+                exceptionDesc: item.exceptionDesc ? 1 : 0,
+                conclusion: item.conclusion,
+                rulesList: item.rulesList
               });
             }
           }
-
           if (this.minedis == false) {
             var data = [{
               tjNumber,
@@ -2097,6 +2148,7 @@
           this.nums = tab.name;
           this.proId = tab.name;
           this.lastClickedTab = tab
+          this.minedis = false
           this.getParentIdsss();
           this.getbzlist();
         });
@@ -2128,30 +2180,81 @@
         //   rulesList: item.rulesList,
         // });
       });
-      for (var i = 0; i < this.proParentList.sons.length; i++) {
-        //鍒ゆ柇鏂版暟缁勬槸鍚︽湁杩欎釜鍏冪礌鍊硷紝娌℃湁鐨勮瘽锛屽氨鎶奱rr[i]缁檖ush鍒版柊鏁扮粍newArr涓�
-        if (this.proParentList.sons[i].proResult == "" || this.proParentList.sons[i].proResult == null) {
-          this.$modal.msgError("璇锋鏌ラ」鐩槸鍚﹀~鍐欏畬鎴�");
-          this.minedis = true
-          return
-        } else if (this.proParentList.sons[i].proResult.includes(" ")) {
-          this.$modal.msgError("璇锋鏌ュ~鍐欓」鐩腑鏄惁鏈夌┖鏍�");
-          this.minedis = true
-          return
-        } else {
-          this.minedis = false
+      // for (var i = 0; i < this.proParentList.sons.length; i++) {
+      //   //鍒ゆ柇鏂版暟缁勬槸鍚︽湁杩欎釜鍏冪礌鍊硷紝娌℃湁鐨勮瘽锛屽氨鎶奱rr[i]缁檖ush鍒版柊鏁扮粍newArr涓�
+      //   if (this.proParentList.sons[i].proResult == "" || this.proParentList.sons[i].proResult == null) {
+      //     this.$modal.msgError("璇锋鏌ラ」鐩槸鍚﹀~鍐欏畬鎴�");
+      //     this.minedis = true
+      //     return
+      //   } else if (this.proParentList.sons[i].proResult.includes(" ")) {
+      //     this.$modal.msgError("璇锋鏌ュ~鍐欓」鐩腑鏄惁鏈夌┖鏍�");
+      //     this.minedis = true
+      //     return
+      //   } else {
+      //     this.minedis = false
+      //     this.tjOrderDetail.push({
+      //       proAdvice: this.proParentList.sons[i].proAdvice,
+      //       proName: this.proParentList.sons[i].project.proName,
+      //       proId: this.proParentList.sons[i].project.proId,
+      //       orderDetailId: this.proParentList.sons[i].orderDetailId,
+      //       flowingWaterId: this.proParentList.sons[i].flowingWaterId,
+      //       proResult: this.proParentList.sons[i].proResult,
+      //       tjStatus: 1,
+      //       isReturn: this.proParentList.sons[i].isReturn === true ? 1 : 0,
+      //       exceptionDesc: this.proParentList.sons[i].exceptionDesc === true ? 1 : 0,
+      //       conclusion: this.proParentList.sons[i].conclusion,
+      //       rulesList: this.proParentList.sons[i].rulesList,
+      //     });
+      //   }
+      // }
+      for (const item of this.proParentList.sons) {
+        const { project, proResult } = item;
+
+        // 蹇呭~椤归獙璇�
+        if (project.proDefault) {
+          console.log('蹇呭~椤规鏌�:', project.proDefault);
+          if (!proResult || proResult.trim() === '') {
+            this.$modal.msgError("璇锋鏌ラ」鐩槸鍚﹀~鍐欏畬鎴�");
+            this.minedis = true;
+            return;
+          } else if (proResult.includes(' ')) {
+            this.$modal.msgError("璇锋鏌ラ」鐩槸鍚︽湁绌烘牸");
+            this.minedis = true;
+            return;
+          } else {
+            this.minedis = false;
+            this.tjOrderDetail.push({
+              proAdvice: item.proAdvice,
+              proName: project.proName,
+              proId: project.proId,
+              orderDetailId: item.orderDetailId,
+              flowingWaterId: item.flowingWaterId,
+              proResult: proResult,
+              tjStatus: 1,
+              isReturn: item.isReturn ? 1 : 0,
+              exceptionDesc: item.exceptionDesc ? 1 : 0,
+              conclusion: item.conclusion,
+              rulesList: item.rulesList
+            });
+          }
+        }
+
+        // 闈炲繀濉」鏁版嵁澶勭悊
+        if (!project.proDefault) {
+          console.log('闈炲繀濉」澶勭悊:', this.tjOrderDetail);
+          this.minedis = false;
           this.tjOrderDetail.push({
-            proAdvice: this.proParentList.sons[i].proAdvice,
-            proName: this.proParentList.sons[i].project.proName,
-            proId: this.proParentList.sons[i].project.proId,
-            orderDetailId: this.proParentList.sons[i].orderDetailId,
-            flowingWaterId: this.proParentList.sons[i].flowingWaterId,
-            proResult: this.proParentList.sons[i].proResult,
+            proAdvice: item.proAdvice,
+            proName: project.proName,
+            proId: project.proId,
+            orderDetailId: item.orderDetailId,
+            flowingWaterId: item.flowingWaterId,
+            proResult: proResult,
             tjStatus: 1,
-            isReturn: this.proParentList.sons[i].isReturn === true ? 1 : 0,
-            exceptionDesc: this.proParentList.sons[i].exceptionDesc === true ? 1 : 0,
-            conclusion: this.proParentList.sons[i].conclusion,
-            rulesList: this.proParentList.sons[i].rulesList,
+            isReturn: item.isReturn ? 1 : 0,
+            exceptionDesc: item.exceptionDesc ? 1 : 0,
+            conclusion: item.conclusion,
+            rulesList: item.rulesList
           });
         }
       }

--
Gitblit v1.8.0