fix(pda): preserve authoritative overseas receiving reservation hints

This commit is contained in:
2026-09-09 12:25:13 +08:00
parent cb1dfc5a31
commit f6ee80d677
5 changed files with 71 additions and 11 deletions
+13 -3
View File
@@ -38,15 +38,21 @@ export function assertReceivingWarehouse(value, profile, label = '当前柜') {
export function normalizeReceivingInbound(value = {}) {
return {
...value,
...normalizeReceivingAssignment(value),
plannedPalletCount: number(value.plannedPalletCount),
totalPackages: number(value.totalPackages),
receivedPackages: number(value.receivedPackages),
pendingPackages: number(value.pendingPackages),
pendingPackages: number(value.pendingPackages)
}
}
export function normalizeReceivingAssignment(value = {}) {
return {
...value,
assigned: value.assigned === true,
mergeAllowed: value.mergeAllowed === true,
urgent: value.urgent === true,
mergeHint: text(value.mergeHint)
mergeHint: value.mergeAllowed === true ? text(value.mergeHint) : ''
}
}
@@ -104,6 +110,10 @@ export function toReceivingError(error, fallback = '海外仓作业失败') {
const code = error?.code
const rawMessage = String(error?.message || '').trim()
const palletConflictMessages = {
'Reserved pallet binding is incomplete': '预留托盘资料不完整,请联系管理员检查入仓计划',
'Reserved pallet customer binding is invalid': '预留托盘与当前客户不匹配,请联系管理员检查入仓计划',
'Scanned pallet does not match the reserved inbound plan resource': '扫描托盘与入仓计划预留资源不一致,请扫描已预留的托盘',
'Pallet code matches multiple reserved resources in this inbound plan': '托盘码对应多个预留资源,请联系管理员检查入仓计划',
'Pallet is not idle': '该托盘已被占用,当前不可用于收货,请更换可用托盘',
'Pallet location was not found': '该托盘未关联有效库位,请联系管理员维护后重试',
'Pallet virtual location is not active': '该托盘所在虚拟库位不可用,请更换托盘或联系管理员',