From c9cc00d09c756f126710168f81eb7ceba0959ec2 Mon Sep 17 00:00:00 2001
From: zhang_nuo <zhang_12370@163.com>
Date: 星期五, 21 八月 2026 11:17:31 +0800
Subject: [PATCH] feat(personnel,production): 新增年龄自动计算及工单数量支持小数

---
 src/views/productionManagement/workOrderManagement/index.vue |   37 +++++++++++++------------------------
 1 files changed, 13 insertions(+), 24 deletions(-)

diff --git a/src/views/productionManagement/workOrderManagement/index.vue b/src/views/productionManagement/workOrderManagement/index.vue
index b721de6..a0ed7fc 100644
--- a/src/views/productionManagement/workOrderManagement/index.vue
+++ b/src/views/productionManagement/workOrderManagement/index.vue
@@ -133,7 +133,7 @@
           <el-input v-model.number="reportForm.quantity"
                     type="number"
                     min="0"
-                    step="1"
+                    step="0.001"
                     style="width: 300px"
                     placeholder="璇疯緭鍏ョ敓浜у悎鏍兼暟閲�"
                     @input="handleQuantityInput" />
@@ -336,16 +336,16 @@
       slot: "completionStatus",
       width: "140",
     },
-    {
-      label: "璁″垝寮�濮嬫椂闂�",
-      prop: "planStartTime",
-      width: "140",
-    },
-    {
-      label: "璁″垝缁撴潫鏃堕棿",
-      prop: "planEndTime",
-      width: "140",
-    },
+    // {
+    //   label: "璁″垝寮�濮嬫椂闂�",
+    //   prop: "planStartTime",
+    //   width: "140",
+    // },
+    // {
+    //   label: "璁″垝缁撴潫鏃堕棿",
+    //   prop: "planEndTime",
+    //   width: "140",
+    // },
     {
       label: "瀹為檯寮�濮嬫椂闂�",
       prop: "actualStartTime",
@@ -446,7 +446,7 @@
     }
     const num = Number(value);
     // 鏁存暟涓斿ぇ浜庣瓑浜�1
-    if (isNaN(num) || !Number.isInteger(num) || num < 0) {
+    if (isNaN(num) || num < 0) {
       callback(new Error("鐢熶骇鍚堟牸鏁伴噺蹇呴』澶т簬绛変簬0"));
       return;
     }
@@ -461,7 +461,7 @@
     }
     const num = Number(value);
     // 鏁存暟涓斿ぇ浜庣瓑浜�0
-    if (isNaN(num) || !Number.isInteger(num) || num < 0) {
+    if (isNaN(num) || num < 0) {
       callback(new Error("鎶ュ簾鏁伴噺蹇呴』澶т簬绛変簬0"));
       return;
     }
@@ -487,17 +487,6 @@
     // 濡傛灉灏忎簬1锛屾竻闄�
     if (num < 0) {
       reportForm.quantity = null;
-      return;
-    }
-    // 濡傛灉鏄皬鏁板彇鏁存暟閮ㄥ垎
-    if (!Number.isInteger(num)) {
-      const intValue = Math.floor(num);
-      // 濡傛灉鍙栨暣鍚庡皬浜�1锛屾竻闄�
-      if (intValue < 0) {
-        reportForm.quantity = null;
-        return;
-      }
-      reportForm.quantity = intValue;
       return;
     }
     reportForm.quantity = num;

--
Gitblit v1.9.3