fix(crm): 统一销售金额单位为元并优化金额精度
1. 修改客户等级图表、销售报告页面的金额单位从万元改为元 2. 将金额计算和展示的精度从两位小数调整为三位小数 3. 新增合同默认编码和签订地点的默认值
This commit is contained in:
@@ -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
|
||||
};
|
||||
}
|
||||
|
||||
@@ -87,13 +87,13 @@
|
||||
<!-- 合计行 -->
|
||||
<div class="table-row table-total-row">
|
||||
<div class="table-cell" colspan="3">合计</div>
|
||||
<div class="table-cell">{{ totalQuantity.toFixed(2) }}</div>
|
||||
<div class="table-cell">{{ totalQuantity.toFixed(3) }}</div>
|
||||
<div class="table-cell"></div>
|
||||
<div class="table-cell"></div>
|
||||
<div class="table-cell"></div>
|
||||
<div class="table-cell">{{ totalTaxTotal.toFixed(2) }}</div>
|
||||
<div class="table-cell">{{ totalNoTaxTotal.toFixed(2) }}</div>
|
||||
<div class="table-cell">{{ totalTaxAmount.toFixed(2) }}</div>
|
||||
<div class="table-cell">{{ totalTaxTotal.toFixed(3) }}</div>
|
||||
<div class="table-cell">{{ totalNoTaxTotal.toFixed(3) }}</div>
|
||||
<div class="table-cell">{{ totalTaxAmount.toFixed(3) }}</div>
|
||||
<div class="table-cell"></div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -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 = "修改订单信息";
|
||||
});
|
||||
|
||||
@@ -94,7 +94,7 @@ export default {
|
||||
const option = {
|
||||
tooltip: {
|
||||
trigger: "item",
|
||||
formatter: "{b}<br/>销售金额:{c} 万元<br/>占比:{d}%"
|
||||
formatter: "{b}<br/>销售金额:{c} 元<br/>占比:{d}%"
|
||||
},
|
||||
legend: {
|
||||
orient: "vertical",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<el-table-column prop="contactPerson" label="联系人" min-width="80"></el-table-column>
|
||||
<el-table-column prop="customerLevel" label="客户等级" min-width="100"></el-table-column>
|
||||
<el-table-column prop="industry" label="所属行业" min-width="120"></el-table-column>
|
||||
<el-table-column prop="orderAmount" label="订单金额(万元)">
|
||||
<el-table-column prop="orderAmount" label="订单金额(元)">
|
||||
<template #default="scope">
|
||||
{{ formatAmount(scope.row.orderAmount) }}
|
||||
</template>
|
||||
@@ -50,7 +50,7 @@
|
||||
<el-tag v-else type="danger">未结款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unpaidAmount" label="未结金额(万元)" min-width="100">
|
||||
<el-table-column prop="unpaidAmount" label="未结金额(元)" min-width="100">
|
||||
<template #default="scope">
|
||||
{{ formatAmount(scope.row.unpaidAmount) }}
|
||||
</template>
|
||||
@@ -115,7 +115,7 @@
|
||||
<span class="customer-info">客户编码:{{ customer.customerCode }}</span>
|
||||
<span class="customer-info">客户等级:{{ customer.customerLevel }}</span>
|
||||
<span class="customer-info">所属行业:{{ customer.industry }}</span>
|
||||
<span class="summary-info">总订单金额:{{ formatAmount(customer.totalOrderAmount) }} 万元</span>
|
||||
<span class="summary-info">总订单金额:{{ formatAmount(customer.totalOrderAmount) }} 元</span>
|
||||
<span class="summary-info">订单数量:{{ customer.orderCount }} 单</span>
|
||||
</div>
|
||||
</template>
|
||||
@@ -130,7 +130,7 @@
|
||||
empty-text="该客户暂无订单数据"
|
||||
>
|
||||
<el-table-column prop="orderCode" label="订单编号" min-width="120"></el-table-column>
|
||||
<el-table-column prop="orderAmount" label="订单金额(万元)" min-width="120">
|
||||
<el-table-column prop="orderAmount" label="订单金额(元)" min-width="120">
|
||||
<template #default="scope">
|
||||
{{ formatAmount(scope.row.orderAmount) }}
|
||||
</template>
|
||||
@@ -154,7 +154,7 @@
|
||||
<el-tag v-else type="danger">未结款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unpaidAmount" label="未结金额(万元)" min-width="120">
|
||||
<el-table-column prop="unpaidAmount" label="未结金额(元)" min-width="120">
|
||||
<template #default="scope">
|
||||
{{ formatAmount(scope.row.unpaidAmount) }}
|
||||
</template>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<span class="item-value">{{ summaryData.totalOrderCount || 0 }}</span>
|
||||
</div>
|
||||
<div class="summary-item">
|
||||
<span class="item-label">总销售金额(万元)</span>
|
||||
<span class="item-label">总销售金额(元)</span>
|
||||
<span class="item-value">{{ formatAmount(summaryData.totalSalesAmount) }}</span>
|
||||
</div>
|
||||
<div class="summary-item">
|
||||
@@ -15,15 +15,15 @@
|
||||
<span class="item-value">{{ summaryData.completedOrderCount || 0 }}</span>
|
||||
</div>
|
||||
<div class="summary-item">
|
||||
<span class="item-label">已完成销售金额(万元)</span>
|
||||
<span class="item-label">已完成销售金额(元)</span>
|
||||
<span class="item-value">{{ formatAmount(summaryData.completedSalesAmount) }}</span>
|
||||
</div>
|
||||
<div class="summary-item">
|
||||
<span class="item-label">未结款总金额(万元)</span>
|
||||
<span class="item-label">未结款总金额(元)</span>
|
||||
<span class="item-value">{{ formatAmount(summaryData.totalUnpaidAmount) }}</span>
|
||||
</div>
|
||||
<div class="summary-item">
|
||||
<span class="item-label">平均订单金额(万元)</span>
|
||||
<span class="item-label">平均订单金额(元)</span>
|
||||
<span class="item-value">{{ formatAmount(summaryData.avgOrderAmount) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user