From c87165a43d0ea1ab2995ee00b5684e019fa654cf Mon Sep 17 00:00:00 2001
From: chenhj <1263187585@qq.com>
Date: 星期二, 24 三月 2026 17:53:58 +0800
Subject: [PATCH] feat(production): 更新工单页面检品数量输入组件并添加批号等字段

---
 src/views/productionManagement/workOrder/index.vue    |   43 ++++++++++++++++++++++++++++++++-----------
 src/views/qualityManagement/finalInspection/index.vue |   12 ++++++++++++
 2 files changed, 44 insertions(+), 11 deletions(-)

diff --git a/src/views/productionManagement/workOrder/index.vue b/src/views/productionManagement/workOrder/index.vue
index dbcbb51..6f785cf 100644
--- a/src/views/productionManagement/workOrder/index.vue
+++ b/src/views/productionManagement/workOrder/index.vue
@@ -208,12 +208,13 @@
         </el-form-item>
         <el-form-item label="妫�鍝佹暟閲�"
                       prop="inspectedQuantity">
-          <el-input-number v-model.number="reportForm.inspectedQuantity"
-                    :min="0"
-                    :step="1"
+          <el-input v-model.number="reportForm.inspectedQuantity"
+                    type="number"
+                    min="0"
+                    step="1"
                     style="width: 300px"
-                    controls-position="right"
-                    placeholder="璇疯緭鍏ユ鍝佹暟閲�"/>
+                    placeholder="璇疯緭鍏ユ鍝佹暟閲�"
+                    @input="handleInspectedQuantity"/>
         </el-form-item>
         <el-form-item label="鐝粍淇℃伅">
           <el-select v-model="reportForm.userId"
@@ -553,6 +554,26 @@
     }
     reportForm.scrapQty = num;
   };
+
+  const handleInspectedQuantity = value => {
+    if (value === "" || value === null || value === undefined) {
+      reportForm.inspectedQuantity = null;
+      return;
+    }
+    const num = Number(value);
+    if (isNaN(num)) {
+      return;
+    }
+    if (num < 0) {
+      reportForm.inspectedQuantity = null;
+      return;
+    }
+    if (!Number.isInteger(num)) {
+      reportForm.inspectedQuantity = Math.floor(num);
+      return;
+    }
+    reportForm.inspectedQuantity = num;
+  };
   const currentReportRowData = ref(null);
   const page = reactive({
     current: 1,
@@ -774,12 +795,12 @@
         return;
       }
 
-      if (quantity > reportForm.planQuantity) {
-        ElMessageBox.alert("鏈鐢熶骇鏁伴噺涓嶈兘瓒呰繃寰呯敓浜ф暟閲�", "鎻愮ず", {
-          confirmButtonText: "纭畾",
-        });
-        return;
-      }
+      // if (quantity > reportForm.planQuantity) {
+      //   ElMessageBox.alert("鏈鐢熶骇鏁伴噺涓嶈兘瓒呰繃寰呯敓浜ф暟閲�", "鎻愮ず", {
+      //     confirmButtonText: "纭畾",
+      //   });
+      //   return;
+      // }
 
       const submitData = {
         ...reportForm,
diff --git a/src/views/qualityManagement/finalInspection/index.vue b/src/views/qualityManagement/finalInspection/index.vue
index db44222..d2cf3b7 100644
--- a/src/views/qualityManagement/finalInspection/index.vue
+++ b/src/views/qualityManagement/finalInspection/index.vue
@@ -109,6 +109,18 @@
     prop: "productName",
   },
   {
+    label: "鎵瑰彿",
+    prop: "batchNo",
+  },
+  {
+    label: "妫�鍝佹暟閲�",
+    prop: "inspectedQuantity",
+  },
+  {
+    label: "璇锋閮ㄩ棬",
+    prop: "manufacturingTeam",
+  },
+  {
     label: "瑙勬牸鍨嬪彿",
     prop: "model",
   },

--
Gitblit v1.9.3