diff --git a/src/modules/overseas-warehouse/pages/LastMileOrdersView.vue b/src/modules/overseas-warehouse/pages/LastMileOrdersView.vue index e8d78fe9..69953e44 100644 --- a/src/modules/overseas-warehouse/pages/LastMileOrdersView.vue +++ b/src/modules/overseas-warehouse/pages/LastMileOrdersView.vue @@ -1012,7 +1012,15 @@ function hasInboundPlan(row: LastMileOrderListItem) { return inboundPlanCreatedStatuses.has(row.currentStatusCode) || Boolean(row.inboundOrderNo && row.inboundOrderNo !== '—') } +const departedContainerNodes = new Set([ + 'ACTUAL_DEPARTURE', 'DEPARTED_ORIGIN_PORT', 'IN_TRANSIT', 'ARRIVED_DESTINATION_PORT', + 'DISCHARGED_FROM_VESSEL', 'PICKUP_READY', 'PICKED_UP', 'EMPTY_RETURNED', +]) +function isBeforeDeparture(row: LastMileOrderListItem) { + return row.orderTypeCode === 'FIRST_LEG' && !departedContainerNodes.has(row.containerNode) +} function lastMileRowActions(row: LastMileOrderListItem): RowActionItem[] { + if (statusTab.value === '开船前' || isBeforeDeparture(row)) return [{ key: 'detail', label: '查看', priority: 500 }] const inboundPlanCreated = hasInboundPlan(row) return [ { key: 'detail', label: '查看', priority: 500 }, @@ -1072,6 +1080,10 @@ async function submitReworkRelabel() { } function openDetail(source: object) { const row = source as LastMileOrderListItem + if (isBeforeDeparture(row)) { + void router.push({ name: 'unified-order-detail', params: { orderId: row.id }, query: { tenantId: row.customerId } }) + return + } void router.push({ name: 'overseas-last-mile-order-detail', params: { orderId: row.id } }) } @@ -1156,7 +1168,7 @@ onMounted(() => { void load() }) - +