diff --git a/src/modules/container-loading/api/platformContainerCustoms.ts b/src/modules/container-loading/api/platformContainerCustoms.ts index 4f5a374b..e1a839d5 100644 --- a/src/modules/container-loading/api/platformContainerCustoms.ts +++ b/src/modules/container-loading/api/platformContainerCustoms.ts @@ -12,6 +12,13 @@ export interface ContainerCustomsFile { uploadedAt: string } +export interface ContainerCustomsReceiptVersion { + version: number + file: ContainerCustomsFile + operatorName?: string | null + createdAt: string +} + export interface ContainerCustomsInbound { inboundId: string orderId: string @@ -34,6 +41,7 @@ export interface ContainerCustomsDocument { receiptStatus?: 'PENDING' | 'CONFIRMED' | 'REJECTED' | null receiptRejectReason?: string | null finalDocument: ContainerCustomsFile | null + receiptHistory?: ContainerCustomsReceiptVersion[] } export interface ContainerCustomsView { @@ -111,7 +119,7 @@ function normalize(value: RawContainerCustomsView): ContainerCustomsView { ...value, aggregateId: String(value.aggregateId), loadingPlanId: String(value.loadingPlanId), containerBookingId: String(value.containerBookingId), version: Number(value.version), inbounds: value.inbounds.map((item) => ({ ...item, inboundId: String(item.inboundId), orderId: String(item.orderId), tenantId: String(item.tenantId) })), - documents: value.documents.map((item) => ({ ...item, documentId: String(item.documentId), tenantId: String(item.tenantId), source: file(item.source)!, receipt: file(item.receipt), finalDocument: file(item.finalDocument) })), + documents: value.documents.map((item) => ({ ...item, documentId: String(item.documentId), tenantId: String(item.tenantId), source: file(item.source)!, receipt: file(item.receipt), finalDocument: file(item.finalDocument), receiptHistory: (item.receiptHistory || []).map((version) => ({ ...version, version: Number(version.version), file: file(version.file)! })) })), } } diff --git a/src/modules/container-loading/components/ContainerCustomsPanel.vue b/src/modules/container-loading/components/ContainerCustomsPanel.vue index 5de21e11..a12d80aa 100644 --- a/src/modules/container-loading/components/ContainerCustomsPanel.vue +++ b/src/modules/container-loading/components/ContainerCustomsPanel.vue @@ -58,6 +58,9 @@ const statusText: Record = { function documentCustomers(document: ContainerCustomsDocument) { return [...new Set((customs.value?.inbounds || []).filter((item) => document.inboundIds.includes(item.inboundId)).map((item) => item.customerName))].join('、') || '—' } +function receiptHistoryLabel(document: ContainerCustomsDocument) { + return (document.receiptHistory || []).map((item) => `v${item.version}`).join('、') || '—' +} function selectReceipt(documentId: string, upload: UploadFile) { if (!props.canManage || customs.value?.status !== 'DECLARING') return receiptFiles[documentId] = upload.raw || null @@ -269,7 +272,7 @@ onMounted(load)
{{ document.source.fileName }}下载
{{ document.receipt.fileName }}下载
未上传
{{ document.finalDocument.fileName }}下载
未上传 - {{ document.inboundCodes.join('、') || '—' }}{{ brokerSubmitted ? '已发送报关行执行' : '待发送报关行执行' }}退税资料 v{{ document.source.version }} / 回执 v{{ document.receipt.version }} / 完税 v{{ document.finalDocument.version }}{{ documentCustomers(document) }}{{ document.receipt ? (document.receiptStatus === 'CONFIRMED' ? '客户已确认回执' : document.receiptStatus === 'REJECTED' ? '客户已打回回执' : '待客户确认回执') : '待上传报关行回执' }} + {{ document.inboundCodes.join('、') || '—' }}{{ brokerSubmitted ? '已发送报关行执行' : '待发送报关行执行' }}退税资料 v{{ document.source.version }} / 回执 v{{ document.receipt.version }} / 完税 v{{ document.finalDocument.version }}回执历史:{{ receiptHistoryLabel(document) }}{{ documentCustomers(document) }}{{ document.receipt ? (document.receiptStatus === 'CONFIRMED' ? '客户已确认回执' : document.receiptStatus === 'REJECTED' ? '客户已打回回执' : '待客户确认回执') : '待上传报关行回执' }}