fix: refresh PDA task version after immediate pick

This commit is contained in:
2026-09-16 11:05:22 +08:00
parent d46a0ee6d2
commit 19334fc4a2
2 changed files with 16 additions and 2 deletions
+5 -1
View File
@@ -191,7 +191,11 @@ export function normalizePickingTask(task = {}) {
orderNo: task.orderNo ?? task.order?.orderNo ?? '',
inboundCode: task.inboundCode ?? task.inbound?.inboundCode ?? '',
warehouseName: task.warehouseName ?? task.warehouse?.name ?? '',
pickingVersion: task.pickingVersion ?? task.version ?? null,
// `version` is the canonical task version returned by the loading API.
// Prefer it over a previously normalized alias when merging a mutation
// response, otherwise the next immediate pallet action reuses a stale
// expectedTaskVersion and is rejected as a concurrent update.
pickingVersion: task.version ?? task.pickingVersion ?? null,
inboundVersion: task.inboundVersion ?? null
}
}