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
@@ -35,16 +35,16 @@ async function loadCandidates() {
error.value = null
if (!target) return
const warehouseId = optional(target.warehouseId)
const channelCode = optional(target.channelCode)
const channelGroupCode = optional(target.channelGroupCode)
const containerType = optional(target.containerType)
if (!warehouseId || !channelCode || !containerType) {
error.value = { message: '当前模拟柜缺少仓库、渠道或柜型,无法查询可关联订舱' }
if (!warehouseId || !channelGroupCode || !containerType) {
error.value = { message: '当前模拟柜缺少仓库、计划渠道或柜型,无法查询可关联订舱' }
return
}
const sequence = ++requestSequence
loading.value = true
try {
const result = await listOceanBookingLinkCandidates({ warehouseId, channelCode, containerType, page: 1, size: 200 })
const result = await listOceanBookingLinkCandidates({ warehouseId, channelGroupCode, containerType, page: 1, size: 200 })
if (sequence !== requestSequence || !props.modelValue || props.container?.id !== target.id) return
candidates.value = result.records.map((candidate) => ({
key: `${candidate.oceanBookingId}:${candidate.requirementId}`,