This commit is contained in:
2026-10-28 17:17:54 +08:00
parent fcba6b6f25
commit 859630fbbe
5 changed files with 99 additions and 10 deletions
+6 -4
View File
@@ -115,7 +115,9 @@ export function isReceivingConflict(error) {
export function toReceivingError(error, fallback = '海外仓作业失败') {
const code = error?.code
const rawMessage = String(error?.message || '').trim()
const palletConflictMessages = {
const receivingMessages = {
'Carton mark must contain a non-empty inbound code prefix': '请扫描箱码或国内DP码',
'Pallet code is not part of the current FBA destination group': '托盘不属于当前目的仓,请重扫',
'Reserved pallet binding is incomplete': '预留托盘资料不完整,请联系管理员检查入仓计划',
'Reserved pallet customer binding is invalid': '预留托盘与当前客户不匹配,请联系管理员检查入仓计划',
'Scanned pallet does not match the reserved inbound plan resource': '扫描托盘与入仓计划预留资源不一致,请扫描已预留的托盘',
@@ -131,13 +133,13 @@ export function toReceivingError(error, fallback = '海外仓作业失败') {
'Pallet FBA destination does not match the inbound code': '该托盘的FBA目的仓与当前入仓码不一致,请更换托盘',
'FBA-designated pallet cannot receive an OVERSEAS destination carton': 'FBA专用托盘不能接收海外仓目的箱,请更换托盘'
}
const conflictMessage = ['409', 'A0409', 'B0409'].includes(String(code || ''))
? palletConflictMessages[rawMessage]
const businessMessage = ['404', 'A0404', 'B0404', '409', 'A0409', 'B0409'].includes(String(code || ''))
? receivingMessages[rawMessage]
: ''
const palletUnavailable = String(code || '') === 'S0503'
&& rawMessage === 'Warehouse pallet service returned no usable response'
const mapped = Object.assign(new Error(
conflictMessage || (palletUnavailable
businessMessage || (palletUnavailable
? '该托盘当前不可用于收货,请更换可用托盘或联系管理员检查托盘状态'
: rawMessage || fallback)
), {
@@ -47,6 +47,8 @@
<style scoped>
.receiving-summary{box-sizing:border-box;margin-bottom:10px;padding:10px 12px;border:1px solid #b8d2f3;border-radius:13px;background:linear-gradient(145deg,#fff,#f2f7ff);box-shadow:0 3px 12px rgba(31,74,125,.08)}
.receiving-summary-head,.receiving-summary-progress>view:first-child{display:flex;align-items:center;justify-content:space-between;gap:10px}
.receiving-summary-head > view:first-child{flex:1;min-width:0}
.receiving-summary-container{white-space:normal;overflow-wrap:anywhere;word-break:break-all}
.receiving-summary-label,.receiving-summary-container,.metric-value,.metric-label{display:block}.receiving-summary-label{color:#718095;font-size:9px;line-height:13px}.receiving-summary-container{margin-top:1px;color:#17324d;font-size:17px;font-weight:850;line-height:22px}
.receiving-summary-status{flex-shrink:0;padding:4px 8px;border-radius:99px;color:#1668dc;font-size:9px;font-weight:700;background:#e3efff}
.receiving-summary-context{display:flex;flex-direction:column;gap:4px;margin-top:7px;color:#617389;font-size:9px;line-height:14px}.receiving-summary-destinations{display:flex;min-width:0;align-items:flex-start}.destination-label{flex-shrink:0}.destination-tags{display:flex;min-width:0;flex-wrap:wrap;gap:3px 4px}.destination-tags text{padding:0 5px;border-radius:99px;color:#42617f;line-height:14px;background:#e8f0fa;white-space:nowrap}
File diff suppressed because one or more lines are too long