完善企业编辑页面并修复采购建单重试
This commit is contained in:
@@ -36,8 +36,18 @@ export function formatInboundDateTime(value: string | null | undefined) {
|
||||
}).format(date)
|
||||
}
|
||||
|
||||
export function getChargeModeLabel(value: 'KG' | 'CBM') {
|
||||
return value === 'KG' ? '按重量计费' : '按体积计费'
|
||||
export function getChargeModeLabel(
|
||||
chargeMode: 'KG' | 'CBM',
|
||||
actualWeightKg: number,
|
||||
actualVolumeCbm: number,
|
||||
convertedQuantity: number,
|
||||
) {
|
||||
const actualQuantity = chargeMode === 'KG' ? actualWeightKg : actualVolumeCbm
|
||||
if (!Number.isFinite(actualQuantity) || !Number.isFinite(convertedQuantity)) return '-'
|
||||
const usesConvertedQuantity = convertedQuantity > actualQuantity
|
||||
return chargeMode === 'KG'
|
||||
? usesConvertedQuantity ? '按体积重计费' : '按毛重计费'
|
||||
: usesConvertedQuantity ? '按重量折算体积计费' : '按体积计费'
|
||||
}
|
||||
|
||||
export function getTaxModeLabel(value: string) {
|
||||
|
||||
Reference in New Issue
Block a user