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/projectManagement/Management/components/formDia.vue | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/views/projectManagement/Management/components/formDia.vue b/src/views/projectManagement/Management/components/formDia.vue
index f29512b..6b53ce5 100644
--- a/src/views/projectManagement/Management/components/formDia.vue
+++ b/src/views/projectManagement/Management/components/formDia.vue
@@ -583,9 +583,9 @@
<el-form-item label="鍚◣鍗曚环(鍏�)锛�" prop="taxInclusiveUnitPrice">
<el-input-number
v-model="productForm.taxInclusiveUnitPrice"
- :step="0.01"
+ :step="0.0001"
:min="0"
- :precision="2"
+ :precision="4"
style="width: 100%"
placeholder="璇疯緭鍏�"
clearable
@@ -863,7 +863,8 @@
function formattedNumber(row, column, cellValue) {
const val = Number(cellValue ?? 0)
- return Number.isFinite(val) ? val.toFixed(2) : '0.00'
+ if (!Number.isFinite(val)) return '0.00'
+ return column.property === 'taxInclusiveUnitPrice' ? val.toFixed(4) : val.toFixed(2)
}
function summarizeProductTable(param) {
@@ -1029,7 +1030,7 @@
const quantity = parseFloat(productForm.value.quantity)
if (!totalPrice || !quantity || quantity <= 0) return
isCalculating.value = true
- productForm.value.taxInclusiveUnitPrice = (totalPrice / quantity).toFixed(2)
+ productForm.value.taxInclusiveUnitPrice = (totalPrice / quantity).toFixed(4)
if (productForm.value.taxRate) {
productForm.value.taxExclusiveTotalPrice = proxy.calculateTaxExclusiveTotalPrice(totalPrice, productForm.value.taxRate)
}
@@ -1050,7 +1051,7 @@
const taxRateDecimal = taxRate / 100
const inclusiveTotalPrice = exclusiveTotalPrice / (1 - taxRateDecimal)
productForm.value.taxInclusiveTotalPrice = inclusiveTotalPrice.toFixed(2)
- productForm.value.taxInclusiveUnitPrice = (inclusiveTotalPrice / quantity).toFixed(2)
+ productForm.value.taxInclusiveUnitPrice = (inclusiveTotalPrice / quantity).toFixed(4)
isCalculating.value = false
}
--
Gitblit v1.9.3