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/processRoute/processRouteItem/index.vue | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/views/productionManagement/processRoute/processRouteItem/index.vue b/src/views/productionManagement/processRoute/processRouteItem/index.vue
index 3c52410..0f54aef 100644
--- a/src/views/productionManagement/processRoute/processRouteItem/index.vue
+++ b/src/views/productionManagement/processRoute/processRouteItem/index.vue
@@ -47,14 +47,14 @@
<span class="info-value">{{ routeInfo.quantity || '-' }}</span>
</div>
</div>
- <div class="info-item">
- <div class="info-label-wrapper">
- <span class="info-label">澶囨敞</span>
- </div>
- <div class="info-value-wrapper">
- <span class="info-value">{{ routeInfo.description }}</span>
- </div>
- </div>
+<!-- <div class="info-item">-->
+<!-- <div class="info-label-wrapper">-->
+<!-- <span class="info-label">澶囨敞</span>-->
+<!-- </div>-->
+<!-- <div class="info-value-wrapper">-->
+<!-- <span class="info-value">{{ routeInfo.description }}</span>-->
+<!-- </div>-->
+<!-- </div>-->
</div>
</el-card>
<!-- 闄勪欢妯″潡 -->
@@ -340,7 +340,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%"
@@ -1198,19 +1198,19 @@
});
};
- const toQuantityNumber = value => {
+ const toQuantityNumber = (value, scale = 2) => {
const numberValue = Number(value);
if (!Number.isFinite(numberValue)) {
return 0;
}
- return Number(numberValue.toFixed(2));
+ return Number(numberValue.toFixed(scale));
};
const syncDemandedQuantityTree = (items, parentDemandedQuantity = null) => {
items.forEach(item => {
if (parentDemandedQuantity !== null) {
item.demandedQuantity = toQuantityNumber(
- parentDemandedQuantity * toQuantityNumber(item.unitQuantity)
+ parentDemandedQuantity * toQuantityNumber(item.unitQuantity, 8)
);
}
--
Gitblit v1.9.3