feat(customs): show receipt action history in client

This commit is contained in:
2026-09-28 13:21:59 +08:00
parent 8acfbb1074
commit 8fd406331a
2 changed files with 16 additions and 0 deletions
@@ -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) {
<strong>{{ item.source.fileName }}</strong>
<span>版本 V{{ item.source.version }} · {{ formatSize(item.source.sizeBytes) }} · {{ formatDateTime(item.source.uploadedAt) }}</span>
<small v-if="item.receiptHistory?.length">报关行回执历史:{{ receiptHistoryLabel(item) }}</small>
<small v-for="history in item.confirmationHistory" :key="history.id">{{ confirmationActionLabel(history.action) }} · {{ formatDateTime(history.createdAt) }} · {{ history.operatorName || '—' }}<span v-if="history.reason"> · {{ history.reason }}</span></small>
<small>关联入仓码:{{ item.inboundCodes.join('、') || '—' }}</small>
</div>
</div>