feat(admin): use smart-loading groups for simulations

This commit is contained in:
2026-09-10 19:25:11 +08:00
parent 27c4ec759c
commit b57ea2d628
16 changed files with 80 additions and 56 deletions
@@ -19,7 +19,7 @@ import {
import type { ContainerBookingResource, SmartLoadingCandidate, SmartLoadingPlan } from '../types'
import { groupSmartLoadingItems, type SmartLoadingInboundItem } from '../smartLoadingItems'
import { loadSmartLoadingPlanCoLoadGroups, type SmartLoadingPlanCoLoadGroup } from '../smartLoadingPlanGroups'
import { resolveSmartLoadingChannelGroup } from '../smartLoadingChannelGroups'
import { getSmartLoadingChannelGroup } from '../smartLoadingChannelGroups'
const route = useRoute()
const router = useRouter()
@@ -206,7 +206,7 @@ async function load() {
if (detail.code === 'A0404') { plan.value = null; noDraft.value = true }
else throw error
}
const channelGroup = resolveSmartLoadingChannelGroup(container.value.channelCode, container.value.channelName)
const channelGroup = getSmartLoadingChannelGroup(container.value.channelGroupCode)
candidates.value = plan.value?.canAssign && channelGroup
? (await listSmartLoadingCandidates({ channelGroupCodes: [channelGroup.code], warehouseId: container.value.warehouseId, page: 1, size: 200 })).records
: []