From 4e89136677c9fd3dabeffadbfd20fccd6ec42cef Mon Sep 17 00:00:00 2001
From: su1124 <1583764726@qq.com>
Date: 星期五, 21 六月 2024 12:04:55 +0800
Subject: [PATCH] su

---
 src/views/system/package/index.vue |   45 ++++++++++++++++++++++++++++++++++++---------
 1 files changed, 36 insertions(+), 9 deletions(-)

diff --git a/src/views/system/package/index.vue b/src/views/system/package/index.vue
index 1a2b1b7..77d8860 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"
@@ -431,6 +432,23 @@
             style="width: 150px"
           />
         </el-form-item>
+         <el-form-item label="浣撴绫诲埆" prop="tjCategory">
+         <el-select
+            v-model="form.tjCategory"
+            placeholder="璇烽�夋嫨鏄惁涓婃灦"
+            style="width: 150px"
+            filterable
+            clearable
+          >
+            <el-option
+              v-for="dict in dict.type.dict_tjtype"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        
 
         <div v-if="!isCollapsed" style="display: flex">
           <div>
@@ -586,7 +604,7 @@
                 </template> 
               </el-table-column>-->
             </el-table>
-            <span>鍚堣锛歿{ pics }}鍏�</span>
+            <h3 style="font-weight: 600;">鍚堣锛歿{ pics }}鍏�</h3>
           </div>
         </el-col>
       </el-row>
@@ -639,7 +657,7 @@
 import { Message } from "element-ui";
 export default {
   name: "Package",
-  dicts: ["sys_normal_disable", "sys_yes_no"],
+  dicts: ["sys_normal_disable", "sys_yes_no","dict_tjtype"],
   components: { Packages },
   data() {
     let checkPhoneNum = (rule, value, callback) => {
@@ -653,7 +671,7 @@
       }
     };
     return {
-      pics: "",
+      pics: 0,
       filterText: "",
       DataList: [],
       list1: true,
@@ -934,6 +952,7 @@
         this.form.keywords = this.form.keywords.slice(0, -1);
         this.form.keywords = this.form.keywords.split(",");
         this.DataList = [];
+        // this.pics = 0;
         this.checkedkey = [];
         this.checkedListkey = [];
         this.getDataList();
@@ -1064,7 +1083,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 +1095,16 @@
                     item2.disabled = true;
                     this.checkedListkey.push(item2.proId);
                     this.DataList.push(item2);
-                    console.log(this.DataList);
                     if (this.DataList.length != 0) {
                       this.DataList.forEach((item) => {
                         if (item.proParentId == item1.proId) {
                           item.propinName = item1.proName;
                           item.propinPrice = item1.proPrice;
                         }
+                      });
+                      this.pics = 0;
+                      this.DataList.forEach((item) => {
+                        this.pics += item.proPrice;
                       });
                     }
                   });
@@ -1103,6 +1124,10 @@
               this.DataList.forEach((item) => {
                 item.propinName = this.Treedata[0].proName;
                 item.propinPrice = this.Treedata[0].proPrice;
+              });
+              this.pics = 0;
+              this.DataList.forEach((item) => {
+                this.pics += item.proPrice;
               });
             });
           });
@@ -1125,7 +1150,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 +1175,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 +1211,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 +1229,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;
         });
       }
@@ -1416,6 +1442,7 @@
   max-height: 400px;
   overflow-y: auto;
   border: 1px solid #d9d9d9;
+  
 }
 /* .custom-tree-node {
     flex: 1;

--
Gitblit v1.8.0