新增按国家去重区块标题接口,优化计费列表请求方式

This commit is contained in:
wuweihua
2026-11-12 13:45:09 +08:00
parent d2c75e0c51
commit cf336f7a67
22 changed files with 436 additions and 99 deletions
@@ -77,20 +77,32 @@ import { listRegionOptions } from '@/api/data/region'
import { onMounted } from 'vue'
const { proxy } = getCurrentInstance()
const { bms_charge_type } = useDict('bms_charge_type')
const tableRef = ref()
const formDialogRef = ref()
const voidDrawerRef = ref()
const regionOptions = ref([])
const calcModeLabelMap = {
MANUAL: '暂不计费',
ALWAYS: '每票都收',
POSTCODE: '命中邮编',
ZONE: '命中分区',
EXTRA_KG: '超重续收',
WEIGHT: '超重',
SIZE: '超尺寸',
RETURN: '退件'
}
const columns = [
{ label: '附加费名称', prop: 'scName', align: 'center', minWidth: 140, showOverflowTooltip: true },
{ label: '费用类型', prop: 'feeType', align: 'center', width: 110, dict: 'bms_fee_type' },
{ label: '计费方式', prop: 'chargeType', align: 'center', width: 130 },
{ label: '计费方式', prop: 'chargeType', align: 'center', width: 110 },
{ label: '渠道产品', prop: 'dictValue', align: 'center', minWidth: 130, showOverflowTooltip: true },
{ label: '计费数值', prop: 'chargeValue', align: 'center', width: 140 },
{ label: '取值方式', prop: 'roundMode', align: 'center', width: 110, dict: 'bms_round_mode' },
{ label: '适用国家', prop: 'countryCode', align: 'center', minWidth: 120, showOverflowTooltip: true },
{ label: '分区', prop: 'blockTitle', align: 'center', minWidth: 140, showOverflowTooltip: true },
{ label: '状态', prop: 'ssCode', align: 'center', width: 80 },
{ label: '备注', prop: 'scNote', align: 'center', minWidth: 140, showOverflowTooltip: true },
{ label: '创建时间', prop: 'createTime', align: 'center', width: 160, parseTime: true },
@@ -103,10 +115,18 @@ const searchColumns = [
label: '计费方式',
prop: 'chargeType',
component: 'select',
dict: 'bms_charge_type',
options: Object.keys(calcModeLabelMap).map(value => ({ value, label: calcModeLabelMap[value] })),
placeholder: '计费方式',
width: '150px'
},
{
label: '渠道产品',
prop: 'dictValue',
component: 'select',
dict: 'payment_product_type',
placeholder: '渠道产品',
width: '160px'
},
{ label: '取值方式', prop: 'roundMode', component: 'select', dict: 'bms_round_mode', placeholder: '取值方式', width: '150px' },
{
label: '状态',
@@ -127,8 +147,8 @@ function queryList(params) {
}
function chargeTypeLabel(val) {
const found = bms_charge_type.value.find(c => c.value === val)
return found ? found.label : (val || '-')
if (!val) return calcModeLabelMap.MANUAL
return calcModeLabelMap[val] || val
}
function countryLabel(code) {
@@ -150,9 +170,6 @@ onMounted(() => {
function formatChargeValue(row) {
if (row.chargeValue == null) return '-'
const v = Number(row.chargeValue)
if (row.chargeType === 'RATE') {
return (v * 100).toFixed(2) + '%'
}
return v + ' ' + (row.currency || 'CNY')
}