From 06372ae6f71fd776fc3db320c410c38966576c7c Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期四, 18 六月 2026 14:58:59 +0800
Subject: [PATCH] fix:含税单价改成4位小数
---
src/views/procurementManagement/procurementLedger/index.vue | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 76dc5d6..ab16053 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -604,8 +604,8 @@
<el-form-item label="鍚◣鍗曚环(鍏�)锛�"
prop="taxInclusiveUnitPrice">
<el-input-number v-model="productForm.taxInclusiveUnitPrice"
- :precision="2"
- :step="0.1"
+ :precision="4"
+ :step="0.0001"
:min="0"
clearable
style="width: 100%"
@@ -1072,7 +1072,9 @@
};
const formattedNumber = (row, column, cellValue) => {
- return parseFloat(cellValue).toFixed(2);
+ const val = Number(cellValue ?? 0);
+ if (!Number.isFinite(val)) return "0.00";
+ return column.property === "taxInclusiveUnitPrice" ? val.toFixed(4) : val.toFixed(2);
};
// 鏌ヨ鍒楄〃
/** 鎼滅储鎸夐挳鎿嶄綔 */
@@ -1267,7 +1269,7 @@
"taxInclusiveUnitPrice",
"taxInclusiveTotalPrice",
"taxExclusiveTotalPrice",
- ]);
+ ], { taxInclusiveUnitPrice: { decimalPlaces: 4 } });
};
// 鎵撳紑寮规
const openForm = async (type, row) => {
@@ -1769,7 +1771,7 @@
productForm.value.taxInclusiveUnitPrice = (
Number(productForm.value.taxInclusiveTotalPrice) /
Number(productForm.value.quantity)
- ).toFixed(2);
+ ).toFixed(4);
// 纭繚缁撴灉涓嶄负璐熸暟
if (Number(productForm.value.taxInclusiveUnitPrice) < 0) {
productForm.value.taxInclusiveUnitPrice = "0";
@@ -1810,7 +1812,7 @@
productForm.value.taxInclusiveUnitPrice = (
Number(productForm.value.taxInclusiveTotalPrice) /
Number(productForm.value.quantity)
- ).toFixed(2);
+ ).toFixed(4);
// 纭繚缁撴灉涓嶄负璐熸暟
if (Number(productForm.value.taxInclusiveUnitPrice) < 0) {
productForm.value.taxInclusiveUnitPrice = "0";
--
Gitblit v1.9.3