From 7b93b7d0812e6e87bda16888ca3492d3426163c6 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期三, 29 四月 2026 10:58:13 +0800
Subject: [PATCH] fix(workOrder): 修复工单页面异步操作和权限控制问题

---
 src/views/productionManagement/workOrder/index.vue |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/views/productionManagement/workOrder/index.vue b/src/views/productionManagement/workOrder/index.vue
index 4a4f9bb..9b7f82a 100644
--- a/src/views/productionManagement/workOrder/index.vue
+++ b/src/views/productionManagement/workOrder/index.vue
@@ -936,8 +936,9 @@
     }
 
     proxy.$modal.msgSuccess("鎺掍骇宸蹭繚瀛�");
+    scheduleDialogVisible.value = false;
     resetCreateScheduleRows();
-    getList();
+    await getList();
   } catch (error) {
     console.error("淇濆瓨鎺掍骇澶辫触", error);
     ElMessage.error("淇濆瓨鎺掍骇澶辫触锛岃閲嶈瘯");
@@ -1048,7 +1049,7 @@
         },
         // 鐢ㄦ埛褰撳墠id
         disabled: row => row.completeQuantity >= row.planQuantity ||
-            !isCurrentUserInUserIds(row)
+            !isCurrentUserInUserIds(row) || row.hasUnreportedMachine
       },
       {
         name: "鐢熶骇鎺掍骇",
@@ -1196,7 +1197,7 @@
     await Promise.all(updates);
     ElMessage.success("瀹℃牳鎴愬姛");
     auditDialogVisible.value = false;
-    getList();
+    await getList();
   } finally {
     auditLoading.value = false;
   }
@@ -1314,7 +1315,7 @@
 /** 鎼滅储鎸夐挳鎿嶄綔 */
 const handleQuery = () => {
   page.current = 1;
-  getList();
+   getList();
 };
 const pagination = obj => {
   page.current = obj.page;
@@ -1435,12 +1436,11 @@
 
   currentReportRowData.value = row;
   reportForm.planQuantity = row.planQuantity - row.completeQuantity;
-  reportForm.quantity = row.planQuantity !== undefined && row.planQuantity !== null ? row.planQuantity : null;
+  reportForm.quantity = row.planQuantity - row.completeQuantity;
   reportForm.productProcessRouteItemId = row.productProcessRouteItemId;
   reportForm.workOrderId = row.id;
   reportForm.reportWork = row.reportWork;
   reportForm.productMainId = row.productMainId;
-  reportForm.planQuantity = row.planQuantity;
   reportForm.startTime = "";
   reportForm.endTime = "";
   reportForm.replenishQty = 0;

--
Gitblit v1.9.3