From 0a251e40e30e7c8a96d71b3b9b6c459d4dfa4b22 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期三, 08 七月 2026 23:04:45 +0800
Subject: [PATCH] 暂存

---
 src/views/productionManagement/workOrderManagement/index.vue |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/views/productionManagement/workOrderManagement/index.vue b/src/views/productionManagement/workOrderManagement/index.vue
index e88920d..b2ac432 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);
@@ -667,10 +669,8 @@
     reportForm.workOrderId = row.id;
     reportForm.reportWork = row.reportWork;
     reportForm.productMainId = row.productMainId;
-    reportForm.scrapQty =
-      row.scrapQty !== undefined && row.scrapQty !== null ? row.scrapQty : 0;
-    reportForm.productionOrderRoutingOperationId =
-      row.productionOrderRoutingOperationId;
+    reportForm.scrapQty = 0;
+    reportForm.productionOrderRoutingOperationId = row.productionOrderRoutingOperationId;
     reportForm.productionOrderId = row.productionOrderId;
     if (row.type == 0) {
       reportForm.workHour = row.workHour || 0;
@@ -780,6 +780,7 @@
         productionOperationParamList: productionOperationParamList,
       };
 
+      reportLoading.value = true;
       addProductMain(submitParams)
         .then(res => {
           proxy.$modal.msgSuccess("鎶ュ伐鎴愬姛");
@@ -790,6 +791,9 @@
           ElMessageBox.alert("鎶ュ伐澶辫触", "鎻愮ず", {
             confirmButtonText: "纭畾",
           });
+        })
+        .finally(() => {
+          reportLoading.value = false;
         });
     });
   };

--
Gitblit v1.9.3