应付计算evri和CTT模板调整计费
This commit is contained in:
@@ -36,6 +36,19 @@
|
||||
<el-table-column prop="zoneName" label="分区" min-width="140" show-overflow-tooltip>
|
||||
<template #default="{ row }"><cell-text v-model="row.zoneName" :edit="isRowEditing(row)" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="calcRule" label="计费条件" width="110" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-select v-if="isRowEditing(row)" v-model="row.calcRule" clearable size="small" placeholder="不限">
|
||||
<el-option label="邮编" value="POSTCODE" />
|
||||
<el-option label="尺寸" value="SIZE" />
|
||||
<el-option label="重量" value="WEIGHT" />
|
||||
</el-select>
|
||||
<span v-else>{{ bandRuleLabel(row.calcRule) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="calcParam" label="条件参数" min-width="150" show-overflow-tooltip>
|
||||
<template #default="{ row }"><cell-text v-model="row.calcParam" :edit="isRowEditing(row)" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="weightLabel" label="重量段" min-width="120" show-overflow-tooltip>
|
||||
<template #default="{ row }"><cell-text v-model="row.weightLabel" :edit="isRowEditing(row)" /></template>
|
||||
</el-table-column>
|
||||
@@ -539,7 +552,7 @@ watch(source, (list) => {
|
||||
}, { immediate: true })
|
||||
|
||||
function filteredBands(pane) {
|
||||
return filterRows(pane.item.weightBands || [], pane.bandKeyword, ['sectionName', 'countryName', 'countryCode', 'zoneName', 'weightLabel', 'chargeName', 'priceUnit'])
|
||||
return filterRows(pane.item.weightBands || [], pane.bandKeyword, ['sectionName', 'countryName', 'countryCode', 'zoneName', 'calcRule', 'calcParam', 'weightLabel', 'chargeName', 'priceUnit'])
|
||||
}
|
||||
|
||||
function filteredFees(pane) {
|
||||
@@ -718,6 +731,14 @@ function filterRows(rows, keyword, fields) {
|
||||
return rows.filter(row => fields.some(field => String(row?.[field] ?? '').toLowerCase().includes(text)))
|
||||
}
|
||||
|
||||
function bandRuleLabel(rule) {
|
||||
const value = String(rule || '').toUpperCase()
|
||||
if (value === 'POSTCODE') return '邮编'
|
||||
if (value === 'SIZE') return '尺寸'
|
||||
if (value === 'WEIGHT') return '重量'
|
||||
return ''
|
||||
}
|
||||
|
||||
function pageOf(rows, pageNo) {
|
||||
const start = (pageNo - 1) * pageSize
|
||||
return rows.slice(start, start + pageSize)
|
||||
|
||||
Reference in New Issue
Block a user