修复海外收货连续扫码步骤并提示本票预留托盘

This commit is contained in:
2026-11-04 14:11:29 +08:00
parent 55cdca5444
commit ed39421cdf
3 changed files with 36 additions and 1 deletions
+24
View File
@@ -64,6 +64,30 @@ test('editing and rejecting a pallet cannot submit using the previous successful
assert.equal(writes, 0)
})
test('queued pallet scan follows the current step while a pending carton requires confirmation', t => {
store.resetReceivingSession(); store.setCurrentReceiving(sessionValue())
store.receiving.resolvedCarton = { inboundCode: 'IN-A', cartonMark: 'IN-A#1', destinationType: 'OVERSEAS' }
const { vm } = page()
t.after(() => vm.suspendReceiving())
const calls = [], toasts = []
vm.resolvePallet = value => calls.push(['pallet', value])
vm.resolveCarton = value => calls.push(['carton', value])
vm.showToast = message => toasts.push(message)
vm.activeTarget = 'pallet'
vm.dispatchHardwareScan({ value: 'PAL-A', target: 'carton' })
assert.deepEqual(calls, [['pallet', 'PAL-A']])
store.receiving.resolvedPallet = { palletCode: 'PAL-A', compatible: true }
vm.palletInput = 'PAL-A'; vm.activeTarget = 'carton'
vm.dispatchHardwareScan({ value: 'IN-A#2', target: 'carton' })
assert.deepEqual(calls, [['pallet', 'PAL-A']])
assert.deepEqual(toasts, ['请先确认当前箱收货,再扫描下一箱'])
assert.equal(vm.activeInbound.cartonMark, 'IN-A#1')
vm.clearReceiptContext()
vm.dispatchHardwareScan({ value: 'IN-A#2', target: 'pallet' })
assert.deepEqual(calls, [['pallet', 'PAL-A'], ['carton', 'IN-A#2']])
})
test('an incompatible pallet never reports success and a corrected scan can be validated normally', async t => {
store.resetReceivingSession(); store.setCurrentReceiving(sessionValue())
store.receiving.resolvedCarton = { inboundCode: 'IN-A', cartonMark: 'IN-A#22-1', destinationType: 'FBA' }