This commit is contained in:
wujinliang
2026-09-18 11:41:27 +08:00
parent f2d5b2d8e4
commit 451663b6ff
24 changed files with 156 additions and 30 deletions
@@ -38,6 +38,16 @@ const statusLabels: Record<string, string> = {
CANCELLED: '已取消',
}
const inboundPlanStatusLabels: Record<string, string> = {
PENDING_ASSIGNMENT: '待入库',
ASSIGNED: '待入库',
PDA_PENDING: '待入库',
SIGNED: '已签收',
PICKING: '拣货中',
PARTIAL_INBOUND: '部分入库',
COMPLETED: '全部入库',
}
const inventoryBusinessTypeLabels: Record<string, string> = {
IN_TRANSIT: '在途入账',
STOCK_IN: '入库',
@@ -74,6 +84,11 @@ export function lastMileStatusLabel(value: unknown) {
return statusLabels[code] || text(code)
}
export function inboundPlanStatusLabel(value: unknown) {
const code = String(value ?? '').trim()
return inboundPlanStatusLabels[code] || text(code)
}
export function packageDifferenceText(value: number | '—' | null | undefined) {
if (value == null || value === '—' || !Number.isFinite(value)) return '—'
return value > 0 ? `+${value}` : String(value)