From 33b53ec9f9804067fa30fe0b8d5e16a0ae2368e1 Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期一, 20 一月 2025 17:24:28 +0800
Subject: [PATCH] 111

---
 src/views/hosp/order/index.vue |   44 ++++++++++++++++++++++++++++++--------------
 1 files changed, 30 insertions(+), 14 deletions(-)

diff --git a/src/views/hosp/order/index.vue b/src/views/hosp/order/index.vue
index 9d7b6c4..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,7 +659,7 @@
                       width="260px"
                     >
                     </el-table-column>
-                  
+
                     <el-table-column prop="proPrice" label="鍘熶环" width="56px">
                     </el-table-column>
 
@@ -765,7 +766,7 @@
                   </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 prop="proPrice" label="鍘熶环" width="56px">
                   </el-table-column>
                   <el-table-column
                     prop="proName"
@@ -773,7 +774,6 @@
                     width="260px"
                   >
                   </el-table-column>
-             
 
                   <el-table-column
                     label="鎿嶄綔"
@@ -865,6 +865,7 @@
                         type="primary"
                         @click="submitPrice"
                         :disabled="confirm"
+                        :loading="isSubmit"
                         style="margin-top: 34px"
                         >鎻愪氦</el-button
                       >
@@ -1221,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>
@@ -1659,6 +1665,9 @@
       DataList3: [],
       bldhid: "",
       budadaozhen: false,
+      isLoading: false,
+      isSubmit: false,
+      isSubmit1: false,
       huizongList: [],
       DataLists: [],
       infoList: [],
@@ -2085,6 +2094,7 @@
     },
 
     handleRevoke() {
+      this.isLoading = true;
       this.$confirm("鎮ㄧ‘璁よ鎾ら攢锛�", "纭淇℃伅", {
         distinguishCancelAndClose: true,
         confirmButtonText: "纭",
@@ -2093,6 +2103,7 @@
         .then(() => {
           revokeTjOrderByTjNum(this.tjnumbers).then((res) => {
             this.$modal.msgSuccess("鎾ら攢鎴愬姛");
+            // this.isLoading = false;
             this.getList();
           });
         })
@@ -2103,6 +2114,10 @@
               message: "宸插彇娑�",
             });
           }
+        })
+        .finally(() => {
+          // 涓嶈鎿嶄綔鎴愬姛杩樻槸澶辫触锛岄兘浼氭墽琛�
+          this.isLoading = false;
         });
     },
     /** 鐐瑰嚮鏄剧ず浣撴鎶ュ憡鎶ヨ〃*/
@@ -2466,10 +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) => {
@@ -2631,7 +2646,6 @@
           this.TotalPrice1 = 0;
           if (this.DataList3.length != 0) {
             this.DataList3.forEach((item) => {
-              
               this.TotalPrice1 += item.proPrice * item.sl;
             });
           }
@@ -2676,9 +2690,7 @@
             this.DataList.splice(index, 1);
             this.TotalPrice1 = 0;
             this.DataList.forEach((item1) => {
-                          
               this.TotalPrice1 = item1.proPrice + this.TotalPrice1;
-              
             });
             if (this.marryalls != 0) {
               this.TotalPrice1 += this.marryalls;
@@ -2695,9 +2707,9 @@
         this.spliceData();
         this.TotalPrice1 = 0;
         this.DataList.forEach((item1) => {
-          console.log(item1.proPrice,3322);
-          console.log(this.TotalPrice1,1122);
-          
+          console.log(item1.proPrice, 3322);
+          console.log(this.TotalPrice1, 1122);
+
           this.TotalPrice1 = item1.proPrice + this.TotalPrice1;
         });
         if (this.marryalls != 0) {
@@ -2824,6 +2836,7 @@
     // 鏀惰垂鎸夐挳
     submitPrice() {
       this.proIds = [];
+      this.isSubmit = true;
       if (this.DataList.length != 0) {
         this.DataList.forEach((item) => {
           this.proIds.push(item.proId);
@@ -2859,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;
@@ -2874,6 +2888,7 @@
     // 鏀惰垂鎸夐挳
     submitPrice1() {
       this.proIds = [];
+      this.isSubmit1 = true;
       if (this.DataList.length != 0) {
         this.DataList.forEach((item) => {
           this.proIds.push(item.proId);
@@ -2903,12 +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;
@@ -2918,6 +2933,7 @@
             const params = { viewNum, tjnumber };
             this.$tab.openPage("鏀舵灏忕エ", "/report/charge", params);
             this.Projectopen1 = false;
+            this.isSubmit1 = false;
           });
         }
       });

--
Gitblit v1.8.0