From 35cebfa072de707605d52842672c50beca04f398 Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期四, 23 一月 2025 17:03:53 +0800
Subject: [PATCH] 1

---
 src/views/hosp/order/index.vue |   60 ++++++++++++++++++++++--------------------------------------
 1 files changed, 22 insertions(+), 38 deletions(-)

diff --git a/src/views/hosp/order/index.vue b/src/views/hosp/order/index.vue
index be4a6e1..5f122fb 100644
--- a/src/views/hosp/order/index.vue
+++ b/src/views/hosp/order/index.vue
@@ -2294,36 +2294,6 @@
       //   return [rowspan, 1];
       // }
     },
-     objectspanmethod({ row, column, rowIndex, columnIndex }) {
-      let fields = ["propinName"];
-      let cellValue = row[column.property];
-      if (cellValue && fields.includes(column.property)) {
-        let prevRow = this.Datalists[rowIndex - 1];
-        let nextRow = this.Datalists[rowIndex + 1];
-        if (prevRow && prevRow[column.property] === cellValue) {
-          return { rowspan: 0, colspan: 0 };
-        } else {
-          let countRowspan = 1;
-          while (nextRow && nextRow[column.property] === cellValue) {
-            nextRow = this.Datalists[++countRowspan + rowIndex];
-          }
-
-          if (countRowspan > 1) {
-            return { rowspan: countRowspan, colspan: 1 };
-          }
-        }
-      }
-
-      // if (columnIndex == 3) {
-      //   let rowspan = 0;
-      //   this.DataLists.forEach((element) => {
-      //     if (element.propinName === row.propinName) {
-      //       rowspan++;
-      //     }
-      //   });
-      //   return [rowspan, 1];
-      // }
-    },
     filterpackage(value, data) {
       if (!value) return true;
       if (data.zhmc.indexOf(value) !== -1) {
@@ -2527,6 +2497,8 @@
         // this.marryalls = 0;
         // this.Datalists = [];
         this.checkedkeys = [];
+
+        this.DataList3 = [];
         getZhList().then((response) => {
           if (response.data) {
             this.packageList = response.data;
@@ -2535,8 +2507,10 @@
         });
       } else {
         // this.TotalPrice1 = 0;
-        this.checkedkey = [];
+        this.checkedkeys = [];
         // this.DataList = [];
+        this.Datalists = [];
+        this.DataList3 = [];
         this.getDataList();
         // if (this.marryalls != 0) {
         //   this.TotalPrice1 += this.marryalls;
@@ -2549,7 +2523,7 @@
         let datas = {
           zhId: data.id,
         };
-        
+
         getlistByZhId(datas).then((res) => {
           this.packagedataList = res.data.tjProjectList;
           for (var i = 0; i < this.packagedataList.length; i++) {
@@ -2841,15 +2815,19 @@
       if (checked === true) {
         // this.$refs.tree.setCheckedKeys([data.proId]);
         let proId = data.proId;
-        console.log(data,9898);
-        
         getProSonDxList(proId).then((res) => {
           this.TreedataList = res.data.list;
+
           this.TreedataList.forEach((item) => {
             // item.disabled = true;
-            this.checkedListkey.push(item.proId);
+            // this.checkedListkey.push(item.proId);
+            if (!this.checkedListkey.includes(item.proId)) {
+              this.checkedListkey.push(item.proId);
+            }
             this.Datalists.push(item);
+
             this.DataList3.push(item);
+
             this.spliceData();
             this.DataList3.forEach((item1) => {
               this.TotalPrice1 += item1.proPrice * item1.sl;
@@ -2872,9 +2850,15 @@
         getProSonDxList(proId).then((res) => {
           this.TreedataList = res.data.list;
 
-          // 浠庡凡閫夊垪琛ㄤ腑绉婚櫎璇ラ」鐩殑 ID
-          this.checkedListkey = this.checkedListkey.filter(
-            (id) => id !== proId
+          // 閬嶅巻 TreedataList 骞剁Щ闄ょ浉鍏崇殑瀛愰」 ID
+          this.TreedataList.forEach((item) => {
+            this.checkedListkey = this.checkedListkey.filter(
+              (id) => id !== item.proId
+            );
+          });
+
+          this.Datalists = this.Datalists.filter(
+            (item) => item.proParentId !== proId
           );
 
           // 浠� DataList3 涓Щ闄ょ浉鍏崇殑瀛愰」

--
Gitblit v1.8.0