Release/test #10

Merged
admin merged 40 commits from release/test into main 2026-09-28 15:59:06 +08:00
2 changed files with 13 additions and 0 deletions
Showing only changes of commit 3e2847814a - Show all commits
+8
View File
@@ -14,6 +14,13 @@ export interface MerchantCustomsFile {
uploadedAt: string
}
export interface MerchantCustomsReceiptVersion {
version: number
file: MerchantCustomsFile
operatorName: string | null
createdAt: string
}
export interface MerchantCustomsInbound {
inboundId: string
orderId: string
@@ -36,6 +43,7 @@ export interface MerchantCustomsDocument {
receiptStatus: 'PENDING' | 'CONFIRMED' | 'REJECTED' | null
receiptRejectReason: string | null
finalDocument: MerchantCustomsFile | null
receiptHistory?: MerchantCustomsReceiptVersion[]
}
export interface MerchantCustomsContainer {
@@ -246,6 +246,10 @@ function formatDateTime(value: string | null | undefined) {
return Number.isNaN(date.getTime()) ? value : date.toLocaleString('zh-CN', { hour12: false })
}
function receiptHistoryLabel(document: MerchantCustomsDocument) {
return (document.receiptHistory || []).map((item) => `V${item.version}`).join('、') || '—'
}
function formatSize(bytes: number) {
if (bytes < 1024) return `${bytes} B`
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`
@@ -340,6 +344,7 @@ function clearanceResultStatusLabel(value: MerchantClearanceResult) {
<div>
<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>关联入仓码:{{ item.inboundCodes.join('、') || '—' }}</small>
</div>
</div>