修改产品功能
This commit is contained in:
@@ -113,9 +113,16 @@
|
||||
<el-descriptions-item label="运费金额">{{ formatMoney(result.freightAmount) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="挂号费">{{ formatMoney(result.registrationFee) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="附加费">{{ formatMoney(result.surchargeAmount) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="应付总额">
|
||||
<el-descriptions-item label="产品价">{{ formatMoney(result.productAmount) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="成本价">
|
||||
<span class="cost">{{ formatMoney(result.costAmount != null ? result.costAmount : result.payTotal) }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="应收总额">
|
||||
<span class="payable">{{ formatMoney(result.payableTotal) }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="应付总额">
|
||||
<span class="cost">{{ formatMoney(result.payTotal != null ? result.payTotal : result.costAmount) }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="试算来源">
|
||||
<el-tag v-if="result.fromCache" size="small" type="success">命中历史试算</el-tag>
|
||||
<el-tag v-else size="small" type="primary">实时计算并落库</el-tag>
|
||||
@@ -152,7 +159,7 @@
|
||||
<template #default="{ row }">{{ row.remark || '-' }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="formula-tip">计算公式:运费金额 = 运费单价 × 计费重量;应付总额 = 运费金额 + 挂号费 + 附加费。相同试算参数直接返回已落库费用明细。</div>
|
||||
<div class="formula-tip">销售试算:运费金额 = 套餐运费单价 × 计费重量;应收总额 = 运费金额 + 挂号费 + 附加费。产品价/成本价 = 目录运费单价 × 计费重量 + 目录挂号费。相同试算参数直接返回已落库明细。</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
@@ -176,6 +183,9 @@
|
||||
<template #col-matchSource="{ row }">
|
||||
<el-tag size="small" :type="sourceTagType(row.matchSource)">{{ sourceLabel(row.matchSource) }}</el-tag>
|
||||
</template>
|
||||
<template #col-costAmount="{ row }">
|
||||
<span class="cost">{{ formatMoney(row.costAmount != null ? row.costAmount : row.payTotal) }}</span>
|
||||
</template>
|
||||
<template #col-payableTotal="{ row }">
|
||||
<span class="payable">{{ formatMoney(row.payableTotal) }}</span>
|
||||
</template>
|
||||
@@ -205,9 +215,16 @@
|
||||
<el-descriptions-item label="运费金额">{{ formatMoney(viewResult.freightAmount) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="挂号费">{{ formatMoney(viewResult.registrationFee) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="附加费">{{ formatMoney(viewResult.surchargeAmount) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="应付总额">
|
||||
<el-descriptions-item label="产品价">{{ formatMoney(viewResult.productAmount) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="成本价">
|
||||
<span class="cost">{{ formatMoney(viewResult.costAmount != null ? viewResult.costAmount : viewResult.payTotal) }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="应收总额">
|
||||
<span class="payable">{{ formatMoney(viewResult.payableTotal) }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="应付总额">
|
||||
<span class="cost">{{ formatMoney(viewResult.payTotal != null ? viewResult.payTotal : viewResult.costAmount) }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="命中说明" :span="2">{{ viewResult.matchMessage || '-' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-table
|
||||
@@ -269,7 +286,9 @@ const historyColumns = [
|
||||
{ label: '计费日期', prop: 'bizDate', align: 'center', width: 120 },
|
||||
{ label: '计价来源', prop: 'matchSource', align: 'center', width: 140, slot: 'matchSource' },
|
||||
{ label: '套餐', prop: 'priceSetName', minWidth: 120, showOverflowTooltip: true },
|
||||
{ label: '应付总额', prop: 'payableTotal', align: 'right', width: 120, slot: 'payableTotal' },
|
||||
{ label: '产品价', prop: 'productAmount', align: 'right', width: 110 },
|
||||
{ label: '成本价', prop: 'costAmount', align: 'right', width: 110, slot: 'costAmount' },
|
||||
{ label: '应收总额', prop: 'payableTotal', align: 'right', width: 120, slot: 'payableTotal' },
|
||||
{ label: '创建时间', prop: 'createTime', align: 'center', width: 170, parseTime: true },
|
||||
{ label: '操作', prop: 'action', align: 'center', width: 90, fixed: 'right', slot: 'action', showInToolbar: false }
|
||||
]
|
||||
@@ -505,7 +524,11 @@ loadProducts()
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.billing-quote .payable {
|
||||
.billing-quote .cost {
|
||||
color: #d48806;
|
||||
font-weight: 600;
|
||||
}
|
||||
.payable {
|
||||
color: #f56c6c;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
export function usePriceSetRefData() {
|
||||
/** 产品下拉选项 */
|
||||
const productOptions = ref([])
|
||||
/** productCode -> bms_product_country 行 */
|
||||
/** productCode -> product_country 行 */
|
||||
const countryCache = reactive({})
|
||||
/** productCode -> 进行中的国家明细请求(去重,避免 hydrate 按行打爆接口) */
|
||||
const countryPending = {}
|
||||
@@ -323,7 +323,7 @@ export function useDetailCascade(refData) {
|
||||
row.weightLabel = formatWeightLabel(row.weightMin, row.weightMax)
|
||||
}
|
||||
row._countryKey = countryKeyOf(row)
|
||||
// Keep package prices in fv*; product base is stamped later from bms_product_country.
|
||||
// Keep package prices in fv*; product base is stamped later from product_country.
|
||||
return row
|
||||
}
|
||||
refData.ensureCountries(row.productCode).then(rows => {
|
||||
|
||||
@@ -178,7 +178,7 @@ export function matchCountryZone(detail, item) {
|
||||
|
||||
/**
|
||||
* 国家下拉选项(按产品的国家配置去重)
|
||||
* @param {Array} rows bms_product_country 行
|
||||
* @param {Array} rows product_country 行
|
||||
* @returns {Array<{key, code, name, label}>}
|
||||
*/
|
||||
export function buildCountryOptions(rows) {
|
||||
@@ -198,7 +198,7 @@ export function buildCountryOptions(rows) {
|
||||
|
||||
/**
|
||||
* 重量段下拉选项(按已选国家过滤去重)
|
||||
* @param {Array} rows bms_product_country 行
|
||||
* @param {Array} rows product_country 行
|
||||
* @param {Object} row 当前明细行(含国家)
|
||||
* @returns {Array<{value, label, detailId, freightPrice, registrationFee}>}
|
||||
*/
|
||||
@@ -311,7 +311,7 @@ export function createEmptyDetailRow() {
|
||||
productCountryId: undefined,
|
||||
fvValue: undefined,
|
||||
fvRegistrationFee: undefined,
|
||||
/** product default freight when copied from bms_product_country */
|
||||
/** product default freight when copied from product_country */
|
||||
_baseFreight: undefined,
|
||||
/** product default registration fee */
|
||||
_baseReg: undefined,
|
||||
|
||||
Reference in New Issue
Block a user