From 4d9ce4d87bcae1f27cffe03befaeb50eea69dde1 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期日, 13 九月 2026 12:35:07 +0800
Subject: [PATCH] fix: 将数量字段的输入精度更新为8位小数
---
src/views/productionManagement/productStructure/Detail/index.vue | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/views/productionManagement/productStructure/Detail/index.vue b/src/views/productionManagement/productStructure/Detail/index.vue
index 5cb08e8..5898bd0 100644
--- a/src/views/productionManagement/productStructure/Detail/index.vue
+++ b/src/views/productionManagement/productStructure/Detail/index.vue
@@ -82,7 +82,7 @@
style="margin: 0">
<el-input-number v-model="row.unitQuantity"
:min="0"
- :precision="2"
+ :precision="8"
:step="1"
controls-position="right"
style="width: 100%"
@@ -269,12 +269,12 @@
});
};
- const toQuantityNumber = (value: any) => {
+ const toQuantityNumber = (value: any, scale: number = 2) => {
const numberValue = Number(value);
if (!Number.isFinite(numberValue)) {
return 0;
}
- return Number(numberValue.toFixed(2));
+ return Number(numberValue.toFixed(scale));
};
const syncDemandedQuantityTree = (
@@ -284,7 +284,7 @@
items.forEach((item: any) => {
if (parentDemandedQuantity !== null) {
item.demandedQuantity = toQuantityNumber(
- parentDemandedQuantity * toQuantityNumber(item.unitQuantity)
+ parentDemandedQuantity * toQuantityNumber(item.unitQuantity, 8)
);
}
--
Gitblit v1.9.3