From 772d8df8a3ee02a6fe2dbd6ba7216e3e3ee0ec63 Mon Sep 17 00:00:00 2001
From: qx <2540746708@qq.com>
Date: 星期四, 20 六月 2024 22:18:38 +0800
Subject: [PATCH] qxtj

---
 src/views/system/package/index.vue |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/views/system/package/index.vue b/src/views/system/package/index.vue
index 1a2b1b7..f7284cb 100644
--- a/src/views/system/package/index.vue
+++ b/src/views/system/package/index.vue
@@ -303,6 +303,7 @@
       :visible.sync="open"
       width="1500px"
       append-to-body
+      :close-on-click-modal="false"
     >
       <el-form
         ref="form"
@@ -586,7 +587,7 @@
                 </template> 
               </el-table-column>-->
             </el-table>
-            <span>鍚堣锛歿{ pics }}鍏�</span>
+            <div>鍚堣锛歿{ pics }}鍏�</div>
           </div>
         </el-col>
       </el-row>
@@ -653,7 +654,7 @@
       }
     };
     return {
-      pics: "",
+      pics: 0,
       filterText: "",
       DataList: [],
       list1: true,
@@ -1064,7 +1065,6 @@
       this.loading = true;
       getProParentIdDxList().then((response) => {
         this.Treedata = response.data.list;
-        console.log(this.Treedata, 666);
         if (this.form.tjProjectList) {
           this.form.tjProjectList.forEach((item) => {
             this.Treedata.forEach((item1) => {
@@ -1077,13 +1077,17 @@
                     item2.disabled = true;
                     this.checkedListkey.push(item2.proId);
                     this.DataList.push(item2);
-                    console.log(this.DataList);
+                    this.pics = 0;
                     if (this.DataList.length != 0) {
                       this.DataList.forEach((item) => {
+                        this.pics += item.proPrice;
                         if (item.proParentId == item1.proId) {
                           item.propinName = item1.proName;
                           item.propinPrice = item1.proPrice;
                         }
+                      });
+                      this.DataList.forEach((item) => {
+                        this.pics += item.proPrice;
                       });
                     }
                   });
@@ -1103,6 +1107,9 @@
               this.DataList.forEach((item) => {
                 item.propinName = this.Treedata[0].proName;
                 item.propinPrice = this.Treedata[0].proPrice;
+              });
+              this.DataList.forEach((item) => {
+                this.pics += item.proPrice;
               });
             });
           });
@@ -1125,7 +1132,7 @@
             this.spliceData();
             this.pics = 0;
             this.DataList.forEach((item1) => {
-              this.pics += item.proPrice;
+              this.pics += item1.proPrice;
               if (item1.proParentId == data.proId) {
                 item1.propinName = data.proName;
                 item1.propinPrice = this.dataObj.proPrice;
@@ -1150,7 +1157,6 @@
             item.disabled = true;
           });
           this.checkedListkey = [];
-          console.log(this.DataList);
           this.DataList.forEach((item, index) => {
             if (item.proParentId == this.dataObj.proId) {
               this.DataList.splice(index, this.TreedataList.length);
@@ -1187,13 +1193,15 @@
             this.pics = 0;
             this.DataList.forEach((item1) => {
               this.pics += item1.proPrice;
-              this.TotalPrice1 = item1.proPrice + this.TotalPrice1;
+              // this.TotalPrice1 = item1.proPrice + this.TotalPrice1;
             });
           }
         });
       } else if (checked == true) {
         this.DataList.push(data);
+        this.pics = 0;
         this.DataList.forEach((item1) => {
+          this.pics += item1.proPrice;
           if (item1.proParentId == this.dataObj.proId) {
             item1.propinName = this.dataObj.proName;
             item1.propinPrice = this.dataObj.proPrice;
@@ -1203,7 +1211,7 @@
         this.TotalPrice1 = 0;
         this.pics = 0;
         this.DataList.forEach((item1) => {
-          this.TotalPrice1 = item1.proPrice + this.TotalPrice1;
+          // this.TotalPrice1 = item1.proPrice + this.TotalPrice1;
           this.pics += item1.proPrice;
         });
       }

--
Gitblit v1.8.0