feat(admin): adapt channel booking and smart loading contracts
This commit is contained in:
@@ -166,7 +166,7 @@ async function load() {
|
||||
if (error instanceof ApiResponseError && ['A0404', 'NOT_FOUND'].includes(error.code)) plan.value = null
|
||||
else throw Object.assign(error instanceof Error ? error : new Error(details.message), { details })
|
||||
}
|
||||
candidates.value = nextContainer.warehouseId ? await listSmartLoadingCandidates(nextContainer.warehouseId) : []
|
||||
candidates.value = nextContainer.warehouseId ? await listSmartLoadingCandidates(nextContainer.id, nextContainer.warehouseId) : []
|
||||
} catch (error) {
|
||||
container.value = null
|
||||
plan.value = null
|
||||
@@ -185,7 +185,7 @@ async function runAction(name: string, operation: () => Promise<SmartLoadingPlan
|
||||
plan.value = await operation()
|
||||
ElMessage.success(success)
|
||||
emit('updated')
|
||||
if (container.value?.warehouseId) candidates.value = await listSmartLoadingCandidates(container.value.warehouseId)
|
||||
if (container.value?.warehouseId) candidates.value = await listSmartLoadingCandidates(container.value.id, container.value.warehouseId)
|
||||
return true
|
||||
} catch (error) {
|
||||
actionError.value = getApiErrorDetails(error, `${success}失败,请重试`)
|
||||
|
||||
Reference in New Issue
Block a user