This commit is contained in:
wujinliang
2026-09-21 19:36:37 +08:00
parent 8fbefcf657
commit b4403ab188
9 changed files with 62 additions and 9 deletions
@@ -46,6 +46,20 @@ export function getTaxModeLabel(value: string) {
return value || '-'
}
export function getCalculationRuleLabel(value: string | null | undefined) {
if (!value) return '-'
if (value === 'ACTUAL_DIMENSION_V1' || value === 'DIMENSION_ACTUAL_V1') return '按实际箱规计算'
const customerRule = /^CUSTOMER_DIMENSION_(SMALL|MEDIUM|LARGE|EXTRA_LARGE)_V(\d+)$/.exec(value)
if (customerRule) {
const sizeLabel: Record<string, string> = {
SMALL: '小号', MEDIUM: '中号', LARGE: '大号', EXTRA_LARGE: '超大号',
}
return `客户箱规规则(${sizeLabel[customerRule[1]]},V${customerRule[2]})`
}
const warehouseRule = /^WAREHOUSE_OUTER_OVERRIDE_(.+)$/.exec(value)
return warehouseRule ? `仓库外箱规覆盖(${warehouseRule[1]})` : value
}
export function getRoundingModeLabel(value: string | null | undefined) {
const labels: Record<string, string> = {
UP: '向上舍入',