fix(pda): 暂停未配套上线的仓租预检查调用

This commit is contained in:
2026-10-26 17:31:11 +08:00
parent cc4b38261e
commit 902d7bda86
7 changed files with 68 additions and 118 deletions
+3 -3
View File
@@ -257,12 +257,12 @@ test('partial bound pallet confirmation sends only selected marks and preserves
assert.deepEqual(payload, ['CD-P', 'P-1', [{ itemId: 'sku', actualPackages: 1 }], ['101'], ['BOX-2'], false, { idempotencyKey: 'key' }])
})
test('discard confirmation preserves inputs after preflight failure and starts a new checked request', async () => {
test('discard confirmation preserves inputs after stock command failure and starts a new explicit request', async () => {
const submitted = []
const retry = deferred()
let attempt = 0
const { vm } = page({
confirmCargoDiscard: async (...args) => { submitted.push(args); if (++attempt === 1) throw new Error('费用确认中'); await retry.promise },
confirmCargoDiscard: async (...args) => { submitted.push(args); if (++attempt === 1) throw new Error('库存状态已变化'); await retry.promise },
fulfillmentIdempotencyKey: () => ({ value: `discard-${attempt}` }), listCargoDiscardTasks: async () => []
})
vm.discardCurrent = { discardNo: 'CD-RETRY' }
@@ -271,7 +271,7 @@ test('discard confirmation preserves inputs after preflight failure and starts a
await vm.confirmDiscard()
assert.equal(vm.discardBusy, false)
assert.ok(vm.discardTask)
assert.equal(vm.error.message, '费用确认中')
assert.equal(vm.error.message, '库存状态已变化')
vm.successMessage = '上次作业已完成'
const retried = vm.confirmDiscard()
assert.equal(vm.error, null)