From e4affb1916faf0a180e4670a3aaab87e7ea39255 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期五, 12 六月 2026 13:53:35 +0800
Subject: [PATCH] 增加审批loading

---
 src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
index 0605fe5..2a45701 100644
--- a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
+++ b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
@@ -295,8 +295,10 @@
                 v-if="operationType === 'approval'">
         <div class="dialog-footer">
           <el-button type="primary"
+                     :loading="submitLoading"
                      @click="submitForm(2)">涓嶉�氳繃</el-button>
           <el-button type="primary"
+                     :loading="submitLoading"
                      @click="submitForm(1)">閫氳繃</el-button>
           <el-button @click="closeDia">鍙栨秷</el-button>
         </div>
@@ -353,6 +355,7 @@
   const deliveryLoading = ref(false);
   const currentDelivery = ref({});
   const deliveryProductList = ref([]);
+  const submitLoading = ref(false);
   const isQuotationApproval = computed(() => Number(props.approveType) === 6);
   const isPurchaseApproval = computed(() => Number(props.approveType) === 5);
   const isDeliveryApproval = computed(() => Number(props.approveType) === 7);
@@ -581,10 +584,15 @@
     // 鍒ゆ柇鏄惁涓烘渶鍚庝竴姝�
     const isLast =
       activities.value.findIndex(a => a.isShen) === activities.value.length - 1;
-    updateApproveNode({ ...currentActivity, isLast }).then(() => {
-      proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
-      closeDia();
-    });
+    submitLoading.value = true;
+    updateApproveNode({ ...currentActivity, isLast })
+      .then(() => {
+        proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+        closeDia();
+      })
+      .finally(() => {
+        submitLoading.value = false;
+      });
   };
   // 鍏抽棴寮规
   const closeDia = () => {
@@ -594,6 +602,7 @@
     currentQuotation.value = {};
     purchaseLoading.value = false;
     currentPurchase.value = {};
+    submitLoading.value = false;
     emit("close");
   };
   defineExpose({

--
Gitblit v1.9.3