From 8fd406331ad036497b8875ab89f82cb30346a4ac Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Mon, 28 Sep 2026 13:21:59 +0800 Subject: [PATCH] feat(customs): show receipt action history in client --- src/modules/first-leg/api/customs.ts | 12 ++++++++++++ .../first-leg/components/CustomsDocumentsDialog.vue | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/src/modules/first-leg/api/customs.ts b/src/modules/first-leg/api/customs.ts index 3c7d976..6b2d957 100644 --- a/src/modules/first-leg/api/customs.ts +++ b/src/modules/first-leg/api/customs.ts @@ -21,6 +21,17 @@ export interface MerchantCustomsReceiptVersion { createdAt: string } +export type MerchantCustomsConfirmationAction = 'CONFIRM' | 'REJECT' + +export interface MerchantCustomsConfirmationHistory { + id: string + receiptVersion: number + action: MerchantCustomsConfirmationAction + reason: string | null + operatorName: string + createdAt: string +} + export interface MerchantCustomsInbound { inboundId: string orderId: string @@ -44,6 +55,7 @@ export interface MerchantCustomsDocument { receiptRejectReason: string | null finalDocument: MerchantCustomsFile | null receiptHistory?: MerchantCustomsReceiptVersion[] + confirmationHistory: MerchantCustomsConfirmationHistory[] } export interface MerchantCustomsContainer { diff --git a/src/modules/first-leg/components/CustomsDocumentsDialog.vue b/src/modules/first-leg/components/CustomsDocumentsDialog.vue index 9ab6534..606f4e7 100644 --- a/src/modules/first-leg/components/CustomsDocumentsDialog.vue +++ b/src/modules/first-leg/components/CustomsDocumentsDialog.vue @@ -249,6 +249,9 @@ function formatDateTime(value: string | null | undefined) { function receiptHistoryLabel(document: MerchantCustomsDocument) { return (document.receiptHistory || []).map((item) => `V${item.version}`).join('、') || '—' } +function confirmationActionLabel(action: MerchantCustomsDocument['confirmationHistory'][number]['action']) { + return action === 'CONFIRM' ? '确认' : '打回' +} function formatSize(bytes: number) { if (bytes < 1024) return `${bytes} B` @@ -345,6 +348,7 @@ function clearanceResultStatusLabel(value: MerchantClearanceResult) { {{ item.source.fileName }} 版本 V{{ item.source.version }} · {{ formatSize(item.source.sizeBytes) }} · {{ formatDateTime(item.source.uploadedAt) }} 报关行回执历史:{{ receiptHistoryLabel(item) }} + {{ confirmationActionLabel(history.action) }} · {{ formatDateTime(history.createdAt) }} · {{ history.operatorName || '—' }} · {{ history.reason }} 关联入仓码:{{ item.inboundCodes.join('、') || '—' }}