fix(crm): 统一销售金额单位为元并优化金额精度

1. 修改客户等级图表、销售报告页面的金额单位从万元改为元
2. 将金额计算和展示的精度从两位小数调整为三位小数
3. 新增合同默认编码和签订地点的默认值
This commit is contained in:
2026-06-04 14:28:33 +08:00
parent c71dfe3ff2
commit 8183bae824
6 changed files with 24 additions and 22 deletions

View File

@@ -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
};
}