From 91bb42bf4d985d6551ee0d68ad5d5f483924f9fc Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期二, 26 五月 2026 10:41:24 +0800
Subject: [PATCH] Revert "修改单价保留6位小数"
---
src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue | 4 +-
src/views/procurementManagement/procurementLedger/index.vue | 13 ++----
src/views/procurementManagement/procurementLedger/detail.vue | 12 +-----
src/views/procurementManagement/purchaseReturnOrder/New.vue | 2
src/views/salesManagement/salesLedger/index.vue | 26 +++---------
src/views/salesManagement/salesQuotation/index.vue | 9 ++--
6 files changed, 21 insertions(+), 45 deletions(-)
diff --git a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
index 667bdaa..0605fe5 100644
--- a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
+++ b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
@@ -75,7 +75,7 @@
<el-descriptions-item label="鎶ヤ环鎬婚"
:span="2">
<span style="font-size: 18px; color: #e6a23c; font-weight: bold;">
- 楼{{ Number(currentQuotation.totalAmount ?? 0).toFixed(6) }}
+ 楼{{ Number(currentQuotation.totalAmount ?? 0).toFixed(2) }}
</span>
</el-descriptions-item>
</el-descriptions>
@@ -92,7 +92,7 @@
label="鍗曚綅" />
<el-table-column prop="unitPrice"
label="鍗曚环">
- <template #default="scope">楼{{ Number(scope.row.unitPrice ?? 0).toFixed(6) }}</template>
+ <template #default="scope">楼{{ Number(scope.row.unitPrice ?? 0).toFixed(2) }}</template>
</el-table-column>
</el-table>
</div>
diff --git a/src/views/procurementManagement/procurementLedger/detail.vue b/src/views/procurementManagement/procurementLedger/detail.vue
index 9566fa5..37b7fdb 100644
--- a/src/views/procurementManagement/procurementLedger/detail.vue
+++ b/src/views/procurementManagement/procurementLedger/detail.vue
@@ -61,14 +61,14 @@
<el-table-column label="鏁伴噺" prop="quantity" />
<el-table-column label="搴撳瓨棰勭暀鏁伴噺" prop="stockReservedQuantity" />
<el-table-column label="绋庣巼(%)" prop="taxRate" />
- <el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" :formatter="unitPriceFormattedNumber" width="150" />
+ <el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" width="150" />
<el-table-column label="鍚◣鎬讳环(鍏�)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" width="150" />
<el-table-column label="涓嶅惈绋庢�讳环(鍏�)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" width="150" />
<template #append>
<div class="summary-row" v-if="productData.length > 0">
<div class="summary-label">鍚堣</div>
<div class="summary-value" style="width: 150px">
- {{ unitPriceFormattedNumber(null, null, sumTaxInclusiveUnitPrice) }}
+ {{ formattedNumber(null, null, sumTaxInclusiveUnitPrice) }}
</div>
<div class="summary-value" style="width: 150px">
{{ formattedNumber(null, null, sumTaxInclusiveTotalPrice) }}
@@ -160,14 +160,6 @@
const formattedNumber = (row, column, cellValue) => {
if (cellValue != null && !isNaN(cellValue)) {
return Number(cellValue).toFixed(2)
- }
- return cellValue
-}
-
-
-const unitPriceFormattedNumber = (row, column, cellValue) => {
- if (cellValue != null && !isNaN(cellValue)) {
- return Number(cellValue).toFixed(6)
}
return cellValue
}
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 1b6b268..9bbe87e 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -68,7 +68,7 @@
<el-table-column label="鍙敤鏁伴噺" prop="availableQuality" />
<el-table-column label="閫�璐ф暟閲�" prop="returnQuality" />
<el-table-column label="绋庣巼(%)" prop="taxRate" />
- <el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" :formatter="unitPriceFormatter" />
+ <el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" />
<el-table-column label="鍚◣鎬讳环(鍏�)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" />
<el-table-column label="涓嶅惈绋庢�讳环(鍏�)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" />
</el-table>
@@ -210,7 +210,7 @@
<el-table-column label="鏁伴噺" prop="quantity" width="70" />
<el-table-column label="搴撳瓨棰勮鏁伴噺" prop="warnNum" width="120" show-overflow-tooltip />
<el-table-column label="绋庣巼(%)" prop="taxRate" width="80" />
- <el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" :formatter="unitPriceFormatter" width="150" />
+ <el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" width="150" />
<el-table-column label="鍚◣鎬讳环(鍏�)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" width="150" />
<el-table-column label="涓嶅惈绋庢�讳环(鍏�)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" width="150" />
<el-table-column label="鏄惁璐ㄦ" prop="isChecked" width="150">
@@ -310,7 +310,7 @@
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="鍚◣鍗曚环(鍏�)锛�" prop="taxInclusiveUnitPrice">
- <el-input-number v-model="productForm.taxInclusiveUnitPrice" :precision="6" :step="0.1" :min="0" clearable
+ <el-input-number v-model="productForm.taxInclusiveUnitPrice" :precision="2" :step="0.1" :min="0" clearable
style="width: 100%" @change="mathNum" />
</el-form-item>
</el-col>
@@ -772,9 +772,6 @@
const formattedNumber = (row, column, cellValue) => {
return parseFloat(cellValue).toFixed(2);
-};
-const unitPriceFormatter = (row, column, cellValue) => {
- return parseFloat(cellValue).toFixed(6);
};
// 鏌ヨ鍒楄〃
/** 鎼滅储鎸夐挳鎿嶄綔 */
@@ -1479,7 +1476,7 @@
productForm.value.taxInclusiveUnitPrice = (
Number(productForm.value.taxInclusiveTotalPrice) /
Number(productForm.value.quantity)
- ).toFixed(6);
+ ).toFixed(2);
// 纭繚缁撴灉涓嶄负璐熸暟
if (Number(productForm.value.taxInclusiveUnitPrice) < 0) {
productForm.value.taxInclusiveUnitPrice = "0";
@@ -1520,7 +1517,7 @@
productForm.value.taxInclusiveUnitPrice = (
Number(productForm.value.taxInclusiveTotalPrice) /
Number(productForm.value.quantity)
- ).toFixed(6);
+ ).toFixed(2);
// 纭繚缁撴灉涓嶄负璐熸暟
if (Number(productForm.value.taxInclusiveUnitPrice) < 0) {
productForm.value.taxInclusiveUnitPrice = "0";
diff --git a/src/views/procurementManagement/purchaseReturnOrder/New.vue b/src/views/procurementManagement/purchaseReturnOrder/New.vue
index 902f00a..9474b11 100644
--- a/src/views/procurementManagement/purchaseReturnOrder/New.vue
+++ b/src/views/procurementManagement/purchaseReturnOrder/New.vue
@@ -511,7 +511,7 @@
});
const formattedNumber = (row, column, cellValue) => {
- return parseFloat(cellValue).toFixed(6);
+ return parseFloat(cellValue).toFixed(2);
};
const formatAmount = (value) => {
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index ea656cf..56f9fd2 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -161,7 +161,7 @@
prop="taxRate" />
<el-table-column label="鍚◣鍗曚环(鍏�)"
prop="taxInclusiveUnitPrice"
- :formatter="sensitiveUnitPriceFormatter" />
+ :formatter="sensitiveAmountFormatter" />
<el-table-column label="鍚◣鎬讳环(鍏�)"
prop="taxInclusiveTotalPrice"
:formatter="sensitiveAmountFormatter" />
@@ -455,8 +455,8 @@
<el-table-column label="绋庣巼(%)"
prop="taxRate" />
<el-table-column label="鍚◣鍗曚环(鍏�)"
- prop="taxInclusiveUnitPrice"
- :formatter="unitPriceFormatter" />
+ prop="taxInclusiveUnitPrice"
+ :formatter="formattedNumber" />
<el-table-column label="鍚◣鎬讳环(鍏�)"
prop="taxInclusiveTotalPrice"
:formatter="formattedNumber" />
@@ -668,7 +668,7 @@
:min="0"
v-model="productForm.taxInclusiveUnitPrice"
style="width: 100%"
- :precision="6"
+ :precision="2"
placeholder="璇疯緭鍏�"
clearable
@change="calculateFromUnitPrice" />
@@ -1402,12 +1402,6 @@
}
return parseFloat(cellValue).toFixed(2);
};
- const unitPriceFormatter = (row, column, cellValue) => {
- if (cellValue === undefined || cellValue === null || cellValue === "") {
- return "0.000000";
- }
- return parseFloat(cellValue).toFixed(6);
- };
const findLedgerRecordByRow = row => {
if (!row) return null;
if (
@@ -1460,12 +1454,6 @@
return "*****";
}
return formattedNumber(row, column, cellValue);
- };
- const sensitiveUnitPriceFormatter = (row, column, cellValue) => {
- if (!isCurrentUserMaintainer(row)) {
- return "*****";
- }
- return unitPriceFormatter(row, column, cellValue);
};
// 鑾峰彇tree瀛愭暟鎹�
const getModels = value => {
@@ -1746,7 +1734,7 @@
unit: p.unit || "",
quantity: quantity,
taxRate: taxRate,
- taxInclusiveUnitPrice: unitPrice.toFixed(6),
+ taxInclusiveUnitPrice: unitPrice.toFixed(2),
taxInclusiveTotalPrice: taxInclusiveTotalPrice,
taxExclusiveTotalPrice: taxExclusiveTotalPrice,
invoiceType: "澧炴櫘绁�",
@@ -2478,7 +2466,7 @@
isCalculating.value = true;
// 璁$畻鍚◣鍗曚环 = 鍚◣鎬讳环 / 鏁伴噺
- productForm.value.taxInclusiveUnitPrice = (totalPrice / quantity).toFixed(6);
+ productForm.value.taxInclusiveUnitPrice = (totalPrice / quantity).toFixed(2);
// 濡傛灉鏈夌◣鐜囷紝璁$畻涓嶅惈绋庢�讳环
if (productForm.value.taxRate) {
@@ -2520,7 +2508,7 @@
// 璁$畻鍚◣鍗曚环 = 鍚◣鎬讳环 / 鏁伴噺
productForm.value.taxInclusiveUnitPrice = (
inclusiveTotalPrice / quantity
- ).toFixed(6);
+ ).toFixed(2);
isCalculating.value = false;
};
diff --git a/src/views/salesManagement/salesQuotation/index.vue b/src/views/salesManagement/salesQuotation/index.vue
index c79dd4c..fce764f 100644
--- a/src/views/salesManagement/salesQuotation/index.vue
+++ b/src/views/salesManagement/salesQuotation/index.vue
@@ -65,7 +65,7 @@
</el-table-column>
<el-table-column prop="totalAmount" label="鎶ヤ环閲戦" width="120">
<template #default="scope">
- 楼{{ scope.row.totalAmount.toFixed(6) }}
+ 楼{{ scope.row.totalAmount.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="鎿嶄綔" width="200" fixed="right" align="center">
@@ -215,7 +215,7 @@
<el-table-column prop="unitPrice" label="鍗曚环">
<template #default="scope">
<el-form-item :prop="`products.${scope.$index}.unitPrice`" class="product-table-form-item">
- <el-input-number v-model="scope.row.unitPrice" :min="0" :precision="6" style="width: 100%" />
+ <el-input-number v-model="scope.row.unitPrice" :min="0" :precision="2" style="width: 100%" />
</el-form-item>
</template>
</el-table-column>
@@ -267,7 +267,7 @@
<!-- <el-tag :type="getStatusType(currentQuotation.status)">{{ currentQuotation.status }}</el-tag>-->
<!-- </el-descriptions-item>-->
<el-descriptions-item label="鎶ヤ环鎬婚" :span="2">
- <span style="font-size: 18px; color: #e6a23c; font-weight: bold;">楼{{ currentQuotation.totalAmount?.toFixed(6) }}</span>
+ <span style="font-size: 18px; color: #e6a23c; font-weight: bold;">楼{{ currentQuotation.totalAmount?.toFixed(2) }}</span>
</el-descriptions-item>
</el-descriptions>
@@ -279,7 +279,7 @@
<el-table-column prop="unit" label="鍗曚綅" />
<el-table-column prop="unitPrice" label="鍗曚环">
<template #default="scope">
- 楼{{ scope.row.unitPrice.toFixed(6) }}
+ 楼{{ scope.row.unitPrice.toFixed(2) }}
</template>
</el-table-column>
</el-table>
@@ -536,7 +536,6 @@
}
const handleEdit = async (row) => {
- console.log("1111111111111111111", row)
dialogTitle.value = '缂栬緫鎶ヤ环'
isEdit.value = true
editId.value = row.id
--
Gitblit v1.9.3