From c36ada6253862acaa44a1dc0eb5b9cbb28e68fd8 Mon Sep 17 00:00:00 2001
From: wwl <xchao828@163.com>
Date: 星期二, 21 一月 2025 11:08:41 +0800
Subject: [PATCH] 1

---
 src/views/hosp/order/index.vue |   41 +++++++++++++++++++++++++++++++++++------
 1 files changed, 35 insertions(+), 6 deletions(-)

diff --git a/src/views/hosp/order/index.vue b/src/views/hosp/order/index.vue
index 507096f..8aae299 100644
--- a/src/views/hosp/order/index.vue
+++ b/src/views/hosp/order/index.vue
@@ -177,6 +177,7 @@
           type="primary"
           size="mini"
           @click="handleRevoke"
+          :loading="isLoading"
           :disabled="single"
           >鎾ら攢绛惧埌</el-button
         >
@@ -658,6 +659,7 @@
                       width="260px"
                     >
                     </el-table-column>
+
                     <el-table-column prop="proPrice" label="鍘熶环" width="56px">
                     </el-table-column>
 
@@ -762,6 +764,8 @@
                 >
                   <el-table-column prop="propinName" label="妫�鏌ラ」鐩�">
                   </el-table-column>
+                  <el-table-column prop="sl" label="鏁伴噺" width="56px">
+                  </el-table-column>
                   <el-table-column prop="proPrice" label="鍘熶环" width="56px">
                   </el-table-column>
                   <el-table-column
@@ -861,6 +865,7 @@
                         type="primary"
                         @click="submitPrice"
                         :disabled="confirm"
+                        :loading="isSubmit"
                         style="margin-top: 34px"
                         >鎻愪氦</el-button
                       >
@@ -1111,7 +1116,9 @@
           >
             <el-table-column prop="propinName" label="妫�鏌ラ」鐩�">
             </el-table-column>
-            <el-table-column prop="proName" label="鏄庣粏椤圭洰" width="260px">
+            <el-table-column prop="proName" label="鏄庣粏椤圭洰" width="200px">
+            </el-table-column>
+            <el-table-column prop="sl" label="鏁伴噺" width="56px">
             </el-table-column>
             <el-table-column prop="proPrice" label="鍘熶环" width="56px">
             </el-table-column>
@@ -1215,7 +1222,12 @@
 
         <!-- 鎻愪氦鎸夐挳 -->
         <el-form-item style="display: flex">
-          <el-button type="primary" @click="submitPrice1" :disabled="confirm">
+          <el-button
+            type="primary"
+            :loading="isSubmit1"
+            @click="submitPrice1"
+            :disabled="confirm"
+          >
             鎻愪氦
           </el-button>
         </el-form-item>
@@ -1653,6 +1665,9 @@
       DataList3: [],
       bldhid: "",
       budadaozhen: false,
+      isLoading: false,
+      isSubmit: false,
+      isSubmit1: false,
       huizongList: [],
       DataLists: [],
       infoList: [],
@@ -1943,7 +1958,6 @@
       // 鑾峰彇鍗曚綅淇℃伅闆嗗悎
       getCompany(this.queryParams).then((response) => {
         this.CompanyList = response.data;
-        console.log(this.CompanyList, 555);
 
         this.loading = false;
       });
@@ -2080,6 +2094,7 @@
     },
 
     handleRevoke() {
+      this.isLoading = true;
       this.$confirm("鎮ㄧ‘璁よ鎾ら攢锛�", "纭淇℃伅", {
         distinguishCancelAndClose: true,
         confirmButtonText: "纭",
@@ -2088,6 +2103,7 @@
         .then(() => {
           revokeTjOrderByTjNum(this.tjnumbers).then((res) => {
             this.$modal.msgSuccess("鎾ら攢鎴愬姛");
+            // this.isLoading = false;
             this.getList();
           });
         })
@@ -2098,6 +2114,10 @@
               message: "宸插彇娑�",
             });
           }
+        })
+        .finally(() => {
+          // 涓嶈鎿嶄綔鎴愬姛杩樻槸澶辫触锛岄兘浼氭墽琛�
+          this.isLoading = false;
         });
     },
     /** 鐐瑰嚮鏄剧ず浣撴鎶ュ憡鎶ヨ〃*/
@@ -2461,8 +2481,10 @@
         let datas = {
           zhId: data.id,
         };
+
         getlistByZhId(datas).then((res) => {
           this.packagedataList = res.data.tjProjectList;
+
           for (var i = 0; i < this.packagedataList.length; i++) {
             let proId = this.packagedataList[i].proId;
             getProSonDxList(proId).then((res) => {
@@ -2624,7 +2646,7 @@
           this.TotalPrice1 = 0;
           if (this.DataList3.length != 0) {
             this.DataList3.forEach((item) => {
-              this.TotalPrice1 += item.proPrice;
+              this.TotalPrice1 += item.proPrice * item.sl;
             });
           }
           // this.TotalPrice1 = 0;
@@ -2677,7 +2699,6 @@
         });
       } else if (checked == true) {
         this.DataList.push(data);
-        console.log(this.DataList, 6666);
         this.DataList.forEach((item1) => {
           if (item1.proParentId == this.dataObj.proId) {
             item1.propinName = this.dataObj.proName;
@@ -2686,6 +2707,9 @@
         this.spliceData();
         this.TotalPrice1 = 0;
         this.DataList.forEach((item1) => {
+          console.log(item1.proPrice, 3322);
+          console.log(this.TotalPrice1, 1122);
+
           this.TotalPrice1 = item1.proPrice + this.TotalPrice1;
         });
         if (this.marryalls != 0) {
@@ -2812,6 +2836,7 @@
     // 鏀惰垂鎸夐挳
     submitPrice() {
       this.proIds = [];
+      this.isSubmit = true;
       if (this.DataList.length != 0) {
         this.DataList.forEach((item) => {
           this.proIds.push(item.proId);
@@ -2847,6 +2872,7 @@
             payType: this.payType,
           };
           getwater(data).then((res) => {
+            this.isSubmit = false;
             this.$modal.msgSuccess("鎻愪氦鎴愬姛");
             this.mobanId = res.data.mobanId;
             this.waterId = res.data.waterId;
@@ -2862,6 +2888,7 @@
     // 鏀惰垂鎸夐挳
     submitPrice1() {
       this.proIds = [];
+      this.isSubmit1 = true;
       if (this.DataList.length != 0) {
         this.DataList.forEach((item) => {
           this.proIds.push(item.proId);
@@ -2891,11 +2918,12 @@
             discount,
             copeWith,
             tjType,
-            payStasus:this.jsType,
+            payStasus: this.jsType,
             orderId: this.orderIds,
             tjProIds: this.proIds,
             payType: this.payType,
           };
+
           getwater(data).then((res) => {
             this.$modal.msgSuccess("鎻愪氦鎴愬姛");
             this.mobanId = res.data.mobanId;
@@ -2905,6 +2933,7 @@
             const params = { viewNum, tjnumber };
             this.$tab.openPage("鏀舵灏忕エ", "/report/charge", params);
             this.Projectopen1 = false;
+            this.isSubmit1 = false;
           });
         }
       });

--
Gitblit v1.8.0