From 1914f6cd22ec9e880d5b8ffcc393ed1fcb744655 Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期三, 22 一月 2025 18:51:40 +0800
Subject: [PATCH] 33

---
 src/views/hosp/order/index.vue |   49 ++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 42 insertions(+), 7 deletions(-)

diff --git a/src/views/hosp/order/index.vue b/src/views/hosp/order/index.vue
index 31be2bf..be4a6e1 100644
--- a/src/views/hosp/order/index.vue
+++ b/src/views/hosp/order/index.vue
@@ -612,7 +612,7 @@
                         :props="defaultProp"
                         show-checkbox
                         node-key="id"
-                        @check="handlepackage"
+                        @check-change="handlepackage"
                         :default-checked-keys="checkedkeys"
                         :filter-node-method="filterpackage"
                         ref="treas"
@@ -1180,7 +1180,7 @@
             </el-table-column>
           </el-table>
 
-          <h3 style="font-weight: 600">鍚堣锛歿{ marryalls }}鍏�</h3>
+          <!-- <h3 style="font-weight: 600">鍚堣锛歿{ marryalls }}鍏�</h3> -->
         </div>
       </div>
 
@@ -2294,6 +2294,36 @@
       //   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) {
@@ -2515,11 +2545,11 @@
     },
     handlepackage(data, checked, checkedNodes) {
       if (checked == true) {
-        this.$refs.treas.setCheckedKeys([data.id]);
+        // this.$refs.treas.setCheckedKeys([data.id]);
         let datas = {
           zhId: data.id,
         };
-
+        
         getlistByZhId(datas).then((res) => {
           this.packagedataList = res.data.tjProjectList;
           for (var i = 0; i < this.packagedataList.length; i++) {
@@ -2541,7 +2571,7 @@
               this.DataList3.forEach((item) => {
                 console.log(item.proPrice);
                 this.TotalPrice1 += item.proPrice * item.sl;
-                this.marryalls += item.proPrice; 
+                this.marryalls += item.proPrice * item.sl;
               });
 
               // 涓烘瘡涓」鐩坊鍔� propinName
@@ -2659,6 +2689,8 @@
       this.orderId = row.orderId;
       this.cusId = row.tjCusIdCard;
       this.userId = row.userId;
+      console.log(row, 666);
+
       this.customer = {
         cusIdcard: row.tjCusIdCard,
         cusName: row.tjCustomerName,
@@ -2807,13 +2839,16 @@
       this.checkedObj = checked;
 
       if (checked === true) {
-        this.$refs.tree.setCheckedKeys([data.proId]);
+        // 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;
+            // item.disabled = true;
             this.checkedListkey.push(item.proId);
+            this.Datalists.push(item);
             this.DataList3.push(item);
             this.spliceData();
             this.DataList3.forEach((item1) => {

--
Gitblit v1.8.0