-
+
添加附加费
{{ row.feeName || '-' }}
-
-
-
-
-
-
@@ -185,24 +179,24 @@
{{ feeUnitOf(row) || '-' }}
-
+
-
- {{ feeNote(row) || '-' }}
+ setFeeChargeMode(row, value)"
+ >
+
+
+ {{ dictLabel(lbl_charge_mode, feeChargeModeOf(row)) || '-' }}
-
-
- setFeeBill(row, value)">
-
-
-
- {{ feeBillFlag(row) === 'BILL' ? '需要计费' : '暂不计费' }}
-
-
修改
@@ -464,16 +458,30 @@ const CellText = {
}
}
-function feeBillFlag(row) {
- return row?.calcRule && row.calcRule !== 'MANUAL' ? 'BILL' : 'MANUAL'
+function normalizeFeeChargeMode(rule) {
+ const v = String(rule || '').trim().toUpperCase()
+ if (!v || v === 'MANUAL') return ''
+ if (v === 'ALWAYS' || v === 'FLAT' || v === 'ZONE' || v === 'WEIGHT' || v === 'SIZE' || v === 'RETURN') return 'ITEM'
+ if (v === 'FIRST_EXTRA') return 'EXTRA_KG'
+ return v
}
-function setFeeBill(row, value) {
- if (value === 'MANUAL') {
- row.calcRule = 'MANUAL'
- return
+function feeChargeModeOf(row) {
+ return normalizeFeeChargeMode(row?.calcRule)
+}
+
+function feeChargeModeOptions(row) {
+ const list = (lbl_charge_mode.value || []).map(d => ({ label: d.label || d.value, value: d.value }))
+ const cur = feeChargeModeOf(row)
+ if (cur && !list.some(d => String(d.value) === String(cur))) {
+ list.unshift({ label: cur, value: cur })
}
- if (!row.calcRule || row.calcRule === 'MANUAL') row.calcRule = 'ALWAYS'
+ return list
+}
+
+function setFeeChargeMode(row, value) {
+ const mode = String(value || '').trim().toUpperCase()
+ row.calcRule = mode || 'MANUAL'
}
const pageSize = 20
@@ -603,7 +611,7 @@ function invalidateBandView(pane) {
}
function filteredFees(pane) {
- return filterRows(pane.item.surcharges || [], pane.feeKeyword, ['feeName', 'zoneCode', 'zoneName', 'chargeText', 'amount', 'currency', 'priceUnit', 'feeDesc', 'calcRule', 'calcParam', 'postcodeParam'])
+ return filterRows(pane.item.surcharges || [], pane.feeKeyword, ['feeName', 'amount', 'currency', 'priceUnit', 'feeDesc', 'calcRule', 'calcParam'])
}
function feeTabLabel(pane) {
@@ -670,8 +678,9 @@ function openFeePicker(pane) {
function toCalcRule(chargeType) {
const t = String(chargeType || '').trim().toUpperCase()
if (!t || t === 'RATE') return 'MANUAL'
- if (t === 'FIXED') return 'ALWAYS'
- const allowed = ['ALWAYS', 'POSTCODE', 'ZONE', 'EXTRA_KG', 'WEIGHT', 'SIZE', 'RETURN', 'MANUAL']
+ if (t === 'FIXED') return 'ITEM'
+ const allowed = ['ITEM', 'PER_KG', 'ALWAYS', 'POSTCODE', 'ZONE', 'EXTRA_KG', 'WEIGHT', 'SIZE', 'RETURN', 'MANUAL']
+ if (t === 'ALWAYS') return 'ITEM'
return allowed.includes(t) ? t : 'MANUAL'
}
diff --git a/bms-front/src/views/price/label/components/LabelVersionProductDrawer.vue b/bms-front/src/views/price/label/components/LabelVersionProductDrawer.vue
index 5989efdf..fc51e115 100644
--- a/bms-front/src/views/price/label/components/LabelVersionProductDrawer.vue
+++ b/bms-front/src/views/price/label/components/LabelVersionProductDrawer.vue
@@ -54,7 +54,7 @@
{{ row.productName || '-' }} ({{ row.productCode || '-' }})
+
+ {{ row.productFloor || '-' }} ({{ row.productFloorCode || '-' }})
+
{{ row.countryName || '-' }} ({{ row.countryCode || '-' }})
@@ -593,8 +596,8 @@ const columns = [
{ label: '客户', prop: 'customerName', minWidth: 140, showOverflowTooltip: true },
{ label: '客户代码', prop: 'customerCode', width: 120 },
{ label: '产品', prop: 'product', minWidth: 160, slot: 'product' },
+ { label: '渠道', prop: 'channel', minWidth: 160, slot: 'channel' },
{ label: '国家', prop: 'country', minWidth: 130, slot: 'country' },
- { label: '件数', prop: 'pieces', align: 'center', width: 70 },
{ label: '计费重', prop: 'weight', align: 'center', width: 90, slot: 'weight' },
{ label: '体积重', prop: 'volumeWeight', align: 'center', width: 90, slot: 'volumeWeight' },
{ label: '实重', prop: 'receiveWeight', align: 'center', width: 90, slot: 'receiveWeight' },