fix(client): restore destination warehouse from pricing quote

This commit is contained in:
2026-09-25 23:23:56 +08:00
parent 806c9f393b
commit df1ea86278
@@ -1273,6 +1273,11 @@ async function autofillWarehouseSelections() {
if (form.receivingWarehouseId) {
await loadSelectedWarehouse(form.receivingWarehouseId)
}
if (form.destinationType !== 'PRIVATE' && !form.destinationWarehouseId && form.amazonWarehouseCode) {
const destinationCode = form.amazonWarehouseCode.trim().toUpperCase()
const matchedDestination = availableDestinationWarehouses.value.find((warehouse) => warehouse.code.trim().toUpperCase() === destinationCode)
if (matchedDestination) await selectDestinationWarehouse(matchedDestination.id)
}
if (form.destinationType !== 'PRIVATE' && !form.destinationWarehouseId && availableDestinationWarehouses.value.length === 1) {
await selectDestinationWarehouse(availableDestinationWarehouses.value[0].id)
}