feat: support dropship pallet loading
This commit is contained in:
@@ -6,7 +6,7 @@ import { getApiErrorDetails, type ApiErrorDetails } from '@/shared/api/http'
|
||||
import ApiErrorMeta from '@/shared/components/ApiErrorMeta.vue'
|
||||
import LoadErrorState from '@/shared/components/LoadErrorState.vue'
|
||||
import StatusBadge from '@/shared/components/StatusBadge.vue'
|
||||
import { getPlatformInbound } from '../core/api'
|
||||
import { getPlatformInbound, listPlatformInboundDropshipPallets } from '../core/api'
|
||||
import InboundHistoryPanel from '../core/InboundHistoryPanel.vue'
|
||||
import InboundSummaryPanel from '../core/InboundSummaryPanel.vue'
|
||||
import type { InboundOrderDetail } from '../core/types'
|
||||
@@ -37,6 +37,7 @@ let disposed = false
|
||||
|
||||
const title = computed(() => detail.value?.summary.inboundCode || '入仓码待补充')
|
||||
const canViewMeasurement = computed(() => access.can('platform:firstleg:inbound:measure:view'))
|
||||
const canViewDropshipPallets = computed(() => access.can('platform:firstleg:pda:view'))
|
||||
const statusLabel = computed(() => inboundStatusLabel(detail.value?.summary.processStatus, inboundProcessStatusLabels, '未知状态'))
|
||||
|
||||
async function loadDetail() {
|
||||
@@ -51,6 +52,9 @@ async function loadDetail() {
|
||||
loadError.value = null
|
||||
try {
|
||||
const response = await getPlatformInbound(props.customerId, props.inboundId)
|
||||
if (response.summary.fulfillmentType === 'ONE_CLICK_DROPSHIP' && canViewDropshipPallets.value) {
|
||||
response.dropshipPallets = await listPlatformInboundDropshipPallets(props.customerId, props.inboundId)
|
||||
}
|
||||
if (disposed || serial !== requestSerial) return
|
||||
detail.value = response
|
||||
} catch (error) {
|
||||
@@ -174,12 +178,13 @@ onBeforeUnmount(() => {
|
||||
:sections="['history']"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="其他记录" name="records" lazy>
|
||||
<el-tab-pane :label="detail.summary.fulfillmentType === 'ONE_CLICK_DROPSHIP' ? '清点组托与其他记录' : '其他记录'" name="records" lazy>
|
||||
<InboundHistoryPanel
|
||||
:pallet-locations="detail.palletLocations"
|
||||
:dropship-pallets="detail.dropshipPallets"
|
||||
:customer-id="customerId"
|
||||
:inbound-id="inboundId"
|
||||
:can-view-dropship="canViewDropshipPallets"
|
||||
:files="detail.files"
|
||||
:internal-notes="detail.internalNotes"
|
||||
:status-history="[]"
|
||||
|
||||
Reference in New Issue
Block a user