From 4c6f9bcc9b3f8bdf5298d73d1035bad529f86d69 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 27 三月 2026 10:04:13 +0800
Subject: [PATCH] 军泰伟业 1.生产订单新增编辑逻辑重写

---
 src/views/productionManagement/workOrder/index.vue |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/views/productionManagement/workOrder/index.vue b/src/views/productionManagement/workOrder/index.vue
index fddcb30..dd96f0f 100644
--- a/src/views/productionManagement/workOrder/index.vue
+++ b/src/views/productionManagement/workOrder/index.vue
@@ -128,6 +128,10 @@
               <span class="info-value">{{ transferCardRowData.completeQuantity }}</span>
             </div>
             <div class="info-item">
+              <span class="info-label">寰呯敓浜ф暟閲�</span>
+              <span class="info-value">{{ (transferCardRowData.planQuantity || 0) - (transferCardRowData.completeQuantity || 0) }}</span>
+            </div>
+            <div class="info-item">
               <span class="info-label">鑹搧鏁伴噺</span>
               <span class="info-value">0</span>
             </div>
@@ -251,8 +255,8 @@
       width: "140",
     },
     {
-      label: "瑙勬牸",
-      prop: "model",
+      label: "鍥剧焊缂栧彿",
+      prop: "model"
     },
     {
       label: "鍗曚綅",
@@ -270,6 +274,11 @@
     {
       label: "瀹屾垚鏁伴噺",
       prop: "completeQuantity",
+      width: "140",
+    },
+    {
+      label: "寰呯敓浜ф暟閲�",
+      prop: "pendingQuantity",
       width: "140",
     },
     {
@@ -329,7 +338,7 @@
           clickFun: row => {
             showReportDialog(row);
           },
-          disabled: row => row.planQuantity <= 0,
+          disabled: row => row.status === 1 || row.status === 3 || row.planQuantity <= 0,
         },
       ],
     },
@@ -402,7 +411,10 @@
     productWorkOrderPage(params)
       .then(res => {
         tableLoading.value = false;
-        tableData.value = res.data.records;
+        tableData.value = res.data.records.map(item => ({
+          ...item,
+          pendingQuantity: (item.planQuantity || 0) - (item.completeQuantity || 0)
+        }));
         page.total = res.data.total;
       })
       .catch(() => {
@@ -493,7 +505,7 @@
 
   const showReportDialog = row => {
     currentReportRowData.value = row;
-    reportForm.planQuantity = row.planQuantity;
+		reportForm.planQuantity = row.planQuantity - row.completeQuantity;
     reportForm.quantity = row.quantity;
     reportForm.productProcessRouteItemId = row.productProcessRouteItemId;
     reportForm.workOrderId = row.id;

--
Gitblit v1.9.3