整批提交原子性的方案

This commit is contained in:
2026-09-11 18:14:35 +08:00
parent 1b45a4f2ec
commit 28c574ae36
7 changed files with 114 additions and 19 deletions
+3 -2
View File
@@ -23,9 +23,10 @@ test('demo claim supports the PDA broadcast and normalized manual input without
assert.match(page, /result\.type === 'processed'[\s\S]*?重复扫描[\s\S]*?return/)
})
test('demo batch freezes inventory and submits PICK, SKIP and PARTIAL under one stable key', () => {
test('demo batch freezes inventory and submits carton or whole-pallet actions under one stable key', () => {
const submit = page.match(/async performSubmit\(incompleteReason = ''\) \{[\s\S]*?\n\t\t\t\},/)?.[0] || ''
for (const action of ['PICK', 'SKIP', 'PARTIAL']) assert.match(submit, new RegExp(`type: '${action}'`))
for (const action of ['PICK', 'SKIP', 'PARTIAL', 'PICK_PALLET']) assert.match(submit, new RegExp(`type: '${action}'`))
assert.match(submit, /palletNo: item\.palletNo/)
assert.match(submit, /const submitId = this\.submitId \|\| stableOperationId\('submit'/)
assert.match(submit, /this\.submitId = submitId/)
assert.match(submit, /const inventorySnapshot = await this\.refreshInventorySnapshot\(\)[\s\S]*?submitContainerPickingBatch/)