Pārlūkot izejas kodu

BOM明细表和材料定额限制4位小数

695593266@qq.com 5 mēneši atpakaļ
vecāks
revīzija
dc9fc6162a

+ 4 - 1
src/views/material/BOMmanage/components/detailedList.vue

@@ -693,8 +693,11 @@
             newVal.slice(firstDotIndex + 1).replace(/\./g, '');
             newVal.slice(firstDotIndex + 1).replace(/\./g, '');
         }
         }
 
 
+        const match = newVal.match(/^(\d+)(\.\d{0,4})?/);
+        item.dosage = match ? match[0] : '';
+
         // 4. 更新数据
         // 4. 更新数据
-        item.dosage = newVal;
+        // item.dosage = newVal;
       },
       },
 
 
       factoriesFn(code) {
       factoriesFn(code) {

+ 4 - 1
src/views/material/BOMmanage/components/workingProcedure.vue

@@ -1431,8 +1431,11 @@
             newVal.slice(firstDotIndex + 1).replace(/\./g, '');
             newVal.slice(firstDotIndex + 1).replace(/\./g, '');
         }
         }
 
 
+        const match = newVal.match(/^(\d+)(\.\d{0,4})?/);
+        item.count = match ? match[0] : '';
+
         // 4. 更新数据
         // 4. 更新数据
-        item.count = newVal;
+        // item.count = newVal;
       },
       },
 
 
       async detailsList() {
       async detailsList() {