From 4069e8544bb2e4ec8022d3f23a7ba60a5fef05c5 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期一, 30 三月 2026 16:12:45 +0800
Subject: [PATCH] fix: 可领用数量字段修改

---
 src/views/productionManagement/workOrder/index.vue |   19 +++----------------
 1 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/src/views/productionManagement/workOrder/index.vue b/src/views/productionManagement/workOrder/index.vue
index 90003cc..fbb3f4f 100644
--- a/src/views/productionManagement/workOrder/index.vue
+++ b/src/views/productionManagement/workOrder/index.vue
@@ -269,8 +269,8 @@
                   :min="0"
                   :precision="2"
                   :controls="false"
-                  :max="row.qualitity || 0"
-                  :disabled="!row.qualitity"
+                  :max="row.requisitionQty || 0"
+                  :disabled="!row.requisitionQty"
                   style="width: 100%"
                 />
               </template>
@@ -320,7 +320,7 @@
           <el-table-column prop="productName" label="浜у搧鍚嶇О" min-width="160" />
           <el-table-column prop="model" label="鍨嬪彿" min-width="150" />
           <el-table-column prop="unit" label="鍗曚綅" width="90" align="center" />
-          <el-table-column prop="qualitity" label="鍙鐢ㄦ暟閲�" width="140" align="center" />
+          <el-table-column prop="requisitionQty" label="鍙鐢ㄦ暟閲�" width="140" align="center" />
         </el-table>
 
         <!-- 宸查�夋嫨鏄庣粏灞曠ず鏀惧湪鎶ュ伐寮规涓嬫柟鐨� reportForm.drawMaterialList 琛ㄦ牸閲� -->
@@ -618,7 +618,6 @@
   const handleQuantityInput = value => {
     if (value === "" || value === null || value === undefined) {
       reportForm.quantity = null;
-      reportForm.scrapQty = null;
       return;
     }
     const num = Number(value);
@@ -627,29 +626,17 @@
     }
     if (num < 1) {
       reportForm.quantity = null;
-      reportForm.scrapQty = null;
       return;
     }
     if (!Number.isInteger(num)) {
       const intValue = Math.floor(num);
       if (intValue < 1) {
         reportForm.quantity = null;
-        reportForm.scrapQty = null;
         return;
       }
       reportForm.quantity = intValue;
     } else {
       reportForm.quantity = num;
-    }
-    // 濡傛灉 totalInvestment 鏈夊�硷紝鑷姩璁$畻 scrapQty = totalInvestment - quantity
-    if (reportForm.totalInvestment !== null && reportForm.totalInvestment !== undefined && reportForm.totalInvestment !== "") {
-      const total = Number(reportForm.totalInvestment);
-      const qty = Number(reportForm.quantity);
-      if (total > qty) {
-        reportForm.scrapQty = total - qty;
-      } else {
-        reportForm.scrapQty = null;
-      }
     }
   };
 

--
Gitblit v1.9.3