From 8183bae824f3675053f09c7b929c8e99f48fcb7e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com>
Date: Thu, 4 Jun 2026 14:28:33 +0800
Subject: [PATCH] =?UTF-8?q?fix(crm):=20=E7=BB=9F=E4=B8=80=E9=94=80?=
=?UTF-8?q?=E5=94=AE=E9=87=91=E9=A2=9D=E5=8D=95=E4=BD=8D=E4=B8=BA=E5=85=83?=
=?UTF-8?q?=E5=B9=B6=E4=BC=98=E5=8C=96=E9=87=91=E9=A2=9D=E7=B2=BE=E5=BA=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
1. 修改客户等级图表、销售报告页面的金额单位从万元改为元
2. 将金额计算和展示的精度从两位小数调整为三位小数
3. 新增合同默认编码和签订地点的默认值
---
klp-ui/src/utils/productContent.js | 12 ++++++------
.../views/crm/contract/components/ProductContent.vue | 8 ++++----
klp-ui/src/views/crm/contract/index.vue | 6 ++++--
klp-ui/src/views/crm/report/CustomerLevelChart.vue | 2 +-
.../src/views/crm/report/SalesReportOrderDetail.vue | 10 +++++-----
.../src/views/crm/report/SalesReportSummaryCard.vue | 8 ++++----
6 files changed, 24 insertions(+), 22 deletions(-)
diff --git a/klp-ui/src/utils/productContent.js b/klp-ui/src/utils/productContent.js
index 2ecbe87a..2a98a90a 100644
--- a/klp-ui/src/utils/productContent.js
+++ b/klp-ui/src/utils/productContent.js
@@ -191,16 +191,16 @@ export function calculateProductFields(product, changedField = 'quantity') {
taxAmount = taxTotal - noTaxTotal;
}
- const round2 = (v) => Math.round(v * 100) / 100;
+ const round3 = (v) => Math.round(v * 1000) / 1000;
return {
...product,
quantity,
- taxPrice: round2(taxPrice),
- noTaxPrice: round2(noTaxPrice),
- taxTotal: round2(taxTotal),
- noTaxTotal: round2(noTaxTotal),
- taxAmount: round2(taxAmount),
+ taxPrice: round3(taxPrice),
+ noTaxPrice: round3(noTaxPrice),
+ taxTotal: round3(taxTotal),
+ noTaxTotal: round3(noTaxTotal),
+ taxAmount: round3(taxAmount),
taxDivisor
};
}
diff --git a/klp-ui/src/views/crm/contract/components/ProductContent.vue b/klp-ui/src/views/crm/contract/components/ProductContent.vue
index 97775884..818310e6 100644
--- a/klp-ui/src/views/crm/contract/components/ProductContent.vue
+++ b/klp-ui/src/views/crm/contract/components/ProductContent.vue
@@ -87,13 +87,13 @@
合计
-
{{ totalQuantity.toFixed(2) }}
+
{{ totalQuantity.toFixed(3) }}
-
{{ totalTaxTotal.toFixed(2) }}
-
{{ totalNoTaxTotal.toFixed(2) }}
-
{{ totalTaxAmount.toFixed(2) }}
+
{{ totalTaxTotal.toFixed(3) }}
+
{{ totalNoTaxTotal.toFixed(3) }}
+
{{ totalTaxAmount.toFixed(3) }}
diff --git a/klp-ui/src/views/crm/contract/index.vue b/klp-ui/src/views/crm/contract/index.vue
index 9fda273b..7b80a373 100644
--- a/klp-ui/src/views/crm/contract/index.vue
+++ b/klp-ui/src/views/crm/contract/index.vue
@@ -402,12 +402,12 @@ export default {
this.form = {
contractId: undefined,
contractName: '产品销售合同',
- contractCode: undefined,
+ contractCode: 'KLPYX',
supplier: '嘉祥科伦普重工有限公司',
customer: undefined,
signTime: undefined,
deliveryDate: undefined,
- signLocation: undefined,
+ signLocation: '济宁市嘉祥县',
productContent: undefined,
contractContent: `二、交(提)货方式:
@@ -512,6 +512,8 @@ export default {
getOrder(orderId).then(response => {
this.loading = false;
this.form = response.data;
+ if (!this.form.contractCode) this.form.contractCode = 'KLPYX';
+ if (!this.form.signLocation) this.form.signLocation = '济宁市嘉祥县';
this.open = true;
this.title = "修改订单信息";
});
diff --git a/klp-ui/src/views/crm/report/CustomerLevelChart.vue b/klp-ui/src/views/crm/report/CustomerLevelChart.vue
index 17557b70..f6c65a30 100644
--- a/klp-ui/src/views/crm/report/CustomerLevelChart.vue
+++ b/klp-ui/src/views/crm/report/CustomerLevelChart.vue
@@ -94,7 +94,7 @@ export default {
const option = {
tooltip: {
trigger: "item",
- formatter: "{b}
销售金额:{c} 万元
占比:{d}%"
+ formatter: "{b}
销售金额:{c} 元
占比:{d}%"
},
legend: {
orient: "vertical",
diff --git a/klp-ui/src/views/crm/report/SalesReportOrderDetail.vue b/klp-ui/src/views/crm/report/SalesReportOrderDetail.vue
index e2867e1a..1fd8a0af 100644
--- a/klp-ui/src/views/crm/report/SalesReportOrderDetail.vue
+++ b/klp-ui/src/views/crm/report/SalesReportOrderDetail.vue
@@ -26,7 +26,7 @@
-
+
{{ formatAmount(scope.row.orderAmount) }}
@@ -50,7 +50,7 @@
未结款
-
+
{{ formatAmount(scope.row.unpaidAmount) }}
@@ -115,7 +115,7 @@
客户编码:{{ customer.customerCode }}
客户等级:{{ customer.customerLevel }}
所属行业:{{ customer.industry }}
- 总订单金额:{{ formatAmount(customer.totalOrderAmount) }} 万元
+ 总订单金额:{{ formatAmount(customer.totalOrderAmount) }} 元
订单数量:{{ customer.orderCount }} 单
@@ -130,7 +130,7 @@
empty-text="该客户暂无订单数据"
>
-
+
{{ formatAmount(scope.row.orderAmount) }}
@@ -154,7 +154,7 @@
未结款
-
+
{{ formatAmount(scope.row.unpaidAmount) }}
diff --git a/klp-ui/src/views/crm/report/SalesReportSummaryCard.vue b/klp-ui/src/views/crm/report/SalesReportSummaryCard.vue
index 18f75e99..0f6b3b9e 100644
--- a/klp-ui/src/views/crm/report/SalesReportSummaryCard.vue
+++ b/klp-ui/src/views/crm/report/SalesReportSummaryCard.vue
@@ -7,7 +7,7 @@
{{ summaryData.totalOrderCount || 0 }}
- 总销售金额(万元)
+ 总销售金额(元)
{{ formatAmount(summaryData.totalSalesAmount) }}
@@ -15,15 +15,15 @@
{{ summaryData.completedOrderCount || 0 }}
- 已完成销售金额(万元)
+ 已完成销售金额(元)
{{ formatAmount(summaryData.completedSalesAmount) }}
- 未结款总金额(万元)
+ 未结款总金额(元)
{{ formatAmount(summaryData.totalUnpaidAmount) }}
- 平均订单金额(万元)
+ 平均订单金额(元)
{{ formatAmount(summaryData.avgOrderAmount) }}