优化
This commit is contained in:
@@ -30,7 +30,6 @@ const preloadSummary = {
|
||||
createdAt: '2026-08-10T10:00:00',
|
||||
version: 3,
|
||||
readiness: {
|
||||
preloadPushed: true,
|
||||
containerNoReady: true,
|
||||
preloadLinkCount: 1,
|
||||
confirmedPreloadCount: 0,
|
||||
|
||||
@@ -9,7 +9,6 @@ export interface LoadingCustomer {
|
||||
|
||||
export type PreloadConfirmationStatus = 'PENDING' | 'PARTIALLY_CONFIRMED' | 'CONFIRMED'
|
||||
export type PreloadBlockingReason =
|
||||
| 'PRELOAD_NOT_PUSHED'
|
||||
| 'LOADING_PLAN_NOT_EDITING'
|
||||
| 'PRELOAD_LINK_MISSING'
|
||||
| 'OCEAN_BOOKING_NOT_LINKED'
|
||||
@@ -18,7 +17,6 @@ export type PreloadBlockingReason =
|
||||
| 'PRELOAD_ALREADY_CONFIRMED'
|
||||
|
||||
export interface PreloadReadiness {
|
||||
preloadPushed: boolean
|
||||
containerNoReady: boolean
|
||||
preloadLinkCount: number
|
||||
confirmedPreloadCount: number
|
||||
|
||||
@@ -95,7 +95,6 @@ const visibleHistories = computed(() => {
|
||||
})
|
||||
})
|
||||
const blockingReasonLabels: Record<string, string> = {
|
||||
PRELOAD_NOT_PUSHED: '尚未推送预装清单',
|
||||
LOADING_PLAN_NOT_EDITING: '装柜计划已不在可确认的编辑状态',
|
||||
PRELOAD_LINK_MISSING: '装柜明细尚未完整关联入库预装票据',
|
||||
OCEAN_BOOKING_NOT_LINKED: '尚未关联真实订舱',
|
||||
|
||||
@@ -121,7 +121,6 @@ describe('LoadingListsView', () => {
|
||||
|
||||
it('uses backend readiness for whole-plan confirmation and translates blocking reasons', () => {
|
||||
expect(detailSource).toContain(':disabled="!preloadSummary?.readiness.canConfirm"')
|
||||
expect(detailSource).toContain("PRELOAD_NOT_PUSHED: '尚未推送预装清单'")
|
||||
expect(detailSource).toContain("OCEAN_BOOKING_NOT_RELEASED: '关联订舱尚未放舱'")
|
||||
expect(detailSource).toContain("PRELOAD_ALREADY_CONFIRMED: '整份预装计划已经确认'")
|
||||
expect(detailSource).toContain("confirmationStatus !== 'CONFIRMED' && !preloadSummary.readiness.canConfirm")
|
||||
|
||||
@@ -79,7 +79,7 @@ describe('PreloadPlanDetailView lifecycle handoff', () => {
|
||||
vi.mocked(getPreloadPlan).mockResolvedValue({
|
||||
summary: {
|
||||
status: 'LOADING', containerNo: null,
|
||||
readiness: { preloadPushed: true, pdaTaskStatus: null },
|
||||
readiness: { pdaTaskStatus: null },
|
||||
},
|
||||
items: [], histories: [],
|
||||
} as never)
|
||||
|
||||
@@ -52,7 +52,7 @@ const canCorrectTransport = computed(() => {
|
||||
const summary = detail.value?.summary
|
||||
const pdaStatus = summary?.readiness.pdaTaskStatus
|
||||
return Boolean(canEdit.value && summary?.status === 'EDITING'
|
||||
&& summary.readiness.preloadPushed && (!pdaStatus || pdaStatus === 'PENDING'))
|
||||
&& (!pdaStatus || pdaStatus === 'PENDING'))
|
||||
})
|
||||
const isContainerCorrection = computed(() => Boolean(detail.value?.summary.containerNo))
|
||||
const transportCorrectionNote = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user