From 208d124f1512f45c90ac41849bd50dffda2d4f4a Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期三, 07 五月 2025 17:29:34 +0800
Subject: [PATCH] 1

---
 src/views/doctor/checkAll/index.vue |   71 +++++++++++++++++++++++++++++++++--
 1 files changed, 66 insertions(+), 5 deletions(-)

diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index 695b888..bfa5a7c 100644
--- a/src/views/doctor/checkAll/index.vue
+++ b/src/views/doctor/checkAll/index.vue
@@ -273,7 +273,6 @@
       :before-close="handleClose"
       :with-header="false"
       size="100%"
-     
     >
       <div class="top">
         <table
@@ -1385,7 +1384,12 @@
     </el-dialog>
     <Packages ref="bbb" :baogao="baogao" />
     <Prescription ref="Pre" :preObj="preObj" />
-    <proposal ref="proposal" :cusobj="cusobj" :tjNumber="tjNumber" @event1="eventchange($event)" />
+    <proposal
+      ref="proposal"
+      :cusobj="cusobj"
+      :tjNumber="tjNumber"
+      @event1="eventchange($event)"
+    />
     <createproposal ref="createproposal" :creatobj="creatobj" />
 
     <el-dialog
@@ -1633,7 +1637,7 @@
           this.$modal.closeLoading();
         });
     },
-    shanchu(row) {
+    /*  shanchu(row) {
       console.log(row);
       shanchu({
         id: row.orderDetailId,
@@ -1667,6 +1671,57 @@
           }
         }
       });
+    }, */
+    shanchu(row) {
+      this.isdisabled = true;
+
+      shanchu({
+        id: row.orderDetailId,
+      })
+        .then((res) => {
+          console.log(res, 1111);
+
+          if (res.code === 200) {
+            const parentItem = this.yichangList.find((item) =>
+              item.sone.some(
+                (soneItem) => soneItem.orderDetailId === row.orderDetailId
+              )
+            );
+
+            if (parentItem) {
+              const index = parentItem.sone.findIndex(
+                (item) => item.orderDetailId === row.orderDetailId
+              );
+              if (index > -1) {
+                parentItem.sone.splice(index, 1);
+
+                if (parentItem.sone.length === 0) {
+                  const parentIndex = this.yichangList.indexOf(parentItem);
+                  if (parentIndex > -1) {
+                    this.yichangList.splice(parentIndex, 1);
+                  }
+                }
+
+                this.getExpends();
+                this.$forceUpdate();
+                this.$message.success("鍒犻櫎鎴愬姛");
+              } else {
+                this.$message.error("鏈壘鍒拌鍒犻櫎鐨勫瓙椤�");
+              }
+            } else {
+              this.$message.error("鏈壘鍒拌鍒犻櫎鐨勭埗椤�");
+            }
+          } else {
+            this.$message.error("鍚庣鍒犻櫎澶辫触锛�" + (res.msg || "鏈煡閿欒"));
+          }
+        })
+        .catch((error) => {
+          console.error("鍒犻櫎澶辫触:", error);
+          this.$message.error("鍒犻櫎鎿嶄綔澶辫触锛�" + error.message);
+        })
+        .finally(() => {
+          this.isdisabled = false;
+        });
     },
     getConfigKey() {
       getconfigKey("sfkqtwbg").then((res) => {
@@ -1712,7 +1767,7 @@
       }).then((res) => {
         this.yichangList = res.data;
 
-        console.log(this.yichangList, 3232);
+        // console.log(this.yichangList, 3232);
         this.getExpends();
 
         this.yichangList.forEach((item) => {
@@ -2000,11 +2055,16 @@
     },
     eventchange(data) {
       this.dataText = data;
+      console.log(data, 6655);
+
       if (this.textarea1 == null) {
         this.textarea1 = "";
       }
-      data.forEach((item) => {
+      /* data.forEach((item) => {
         this.textarea1 += item.advice;
+      }); */
+      data.forEach((item) => {
+        this.textarea1 += (item.advice || item.jynr || "") + "\n";
       });
     },
     proposalChange() {
@@ -2055,6 +2115,7 @@
           if (res.data) {
             // this.Testitems = res.data
             this.changedate = res.data;
+
             this.changedate.forEach((item) => {
               this.textarea1 = item.checkAdvice;
             });

--
Gitblit v1.8.0