From be568ef7fad7aaabf84d95b43dc4a80382edd297 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期六, 13 六月 2026 19:55:00 +0800
Subject: [PATCH] fix: 加生产订单确认下发、确认发货、报工loading

---
 src/views/productionPlan/productionPlan/index.vue            |    6 ++++++
 src/views/salesManagement/salesLedger/index.vue              |    5 +++++
 src/views/productionManagement/workOrderManagement/index.vue |    6 ++++++
 3 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/views/productionManagement/workOrderManagement/index.vue b/src/views/productionManagement/workOrderManagement/index.vue
index a9cf39d..b0ba941 100644
--- a/src/views/productionManagement/workOrderManagement/index.vue
+++ b/src/views/productionManagement/workOrderManagement/index.vue
@@ -245,6 +245,7 @@
       <template #footer>
         <span class="dialog-footer">
           <el-button type="primary"
+                     :loading="reportLoading"
                      @click="handleReport">纭畾</el-button>
           <el-button @click="reportDialogVisible = false">鍙栨秷</el-button>
         </span>
@@ -414,6 +415,7 @@
   const transferCardQrUrl = ref("");
   const transferCardRowData = ref(null);
   const reportDialogVisible = ref(false);
+  const reportLoading = ref(false);
   const fileDialogVisible = ref(false);
   const currentWorkOrderId = ref(null);
   const reportFormRef = ref(null);
@@ -780,6 +782,7 @@
         productionOperationParamList: productionOperationParamList,
       };
 
+      reportLoading.value = true;
       addProductMain(submitParams)
         .then(res => {
           proxy.$modal.msgSuccess("鎶ュ伐鎴愬姛");
@@ -790,6 +793,9 @@
           ElMessageBox.alert("鎶ュ伐澶辫触", "鎻愮ず", {
             confirmButtonText: "纭畾",
           });
+        })
+        .finally(() => {
+          reportLoading.value = false;
         });
     });
   };
diff --git a/src/views/productionPlan/productionPlan/index.vue b/src/views/productionPlan/productionPlan/index.vue
index 4251daa..fd56e89 100644
--- a/src/views/productionPlan/productionPlan/index.vue
+++ b/src/views/productionPlan/productionPlan/index.vue
@@ -143,6 +143,7 @@
       <template #footer>
         <span class="dialog-footer">
           <el-button type="primary"
+                     :loading="mergeSubmitLoading"
                      @click="handleMergeSubmit">纭畾涓嬪彂</el-button>
           <el-button @click="isShowNewModal = false">鍙栨秷</el-button>
         </span>
@@ -466,6 +467,7 @@
 
   // 鍚堝苟涓嬪彂寮圭獥鎺у埗
   const isShowNewModal = ref(false);
+  const mergeSubmitLoading = ref(false);
   // 鍚堝苟涓嬪彂琛ㄥ崟鏁版嵁
   const mergeForm = reactive({
     productName: "",
@@ -778,6 +780,7 @@
     const payload = {
       ...mergeForm,
     };
+    mergeSubmitLoading.value = true;
     productionPlanCombine(payload)
       .then(res => {
         if (res.code === 200) {
@@ -793,6 +796,9 @@
       .catch(err => {
         console.error("鍚堝苟涓嬪彂寮傚父锛�", err);
         ElMessage.error("绯荤粺寮傚父锛屽悎骞朵笅鍙戝け璐�");
+      })
+      .finally(() => {
+        mergeSubmitLoading.value = false;
       });
     // 鍙互閫夋嫨鍒锋柊鍒楄〃鎴栧叾浠栨搷浣�
   };
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index d40b1bf..86af284 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -1017,6 +1017,7 @@
       <template #footer>
         <div class="dialog-footer">
           <el-button type="primary"
+                     :loading="deliveryLoading"
                      @click="submitDelivery">纭鍙戣揣
           </el-button>
           <el-button @click="closeDeliveryDia">鍙栨秷</el-button>
@@ -1182,6 +1183,7 @@
 
   // 鍙戣揣鐩稿叧
   const deliveryFormVisible = ref(false);
+  const deliveryLoading = ref(false);
   const currentDeliveryRow = ref(null);
   const getDeliveryBatchQuantity = item => {
     const quantity =
@@ -2760,6 +2762,7 @@
         const productModelId =
           currentDeliveryRow.value.productModelId ||
           currentDeliveryRow.value.modelId;
+        deliveryLoading.value = true;
         addShippingInfo({
           salesLedgerId: salesLedgerId,
           salesLedgerProductId: currentDeliveryRow.value.id,
@@ -2810,6 +2813,8 @@
               });
             }
           });
+        }).finally(() => {
+            deliveryLoading.value = false;
         });
       }
     });

--
Gitblit v1.9.3