diff --git a/src/modules/first-leg/components/CustomsDocumentsDialog.vue b/src/modules/first-leg/components/CustomsDocumentsDialog.vue index 39036c4..a36f9bf 100644 --- a/src/modules/first-leg/components/CustomsDocumentsDialog.vue +++ b/src/modules/first-leg/components/CustomsDocumentsDialog.vue @@ -320,19 +320,6 @@ 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 confirmationActionLabel(action: MerchantCustomsDocument['confirmationHistory'][number]['action']) { - return action === 'CONFIRM' ? '确认' : '打回' -} - -function formatSize(bytes: number) { - if (bytes < 1024) return `${bytes} B` - if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB` - return `${(bytes / 1024 / 1024).toFixed(1)} MB` -} - function clearanceResultLabel(value: MerchantClearanceResult) { return ({ INSPECTION: '查验', SUPPLEMENT_REQUIRED: '补充资料', RELEASED: '放行', DETAINED: '扣留', OTHER: '其他' } as Record)[value.resultType] || value.resultType } @@ -418,7 +405,7 @@ function clearanceResultStatusLabel(value: MerchantClearanceResult) {
-

资料版本历史

+

资料文件

确认全部回执 打回全部回执 @@ -431,10 +418,6 @@ 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('、') || '—' }}
diff --git a/src/modules/first-leg/views/FirstLegOrdersView.test.mjs b/src/modules/first-leg/views/FirstLegOrdersView.test.mjs index 53e090a..d4430c4 100644 --- a/src/modules/first-leg/views/FirstLegOrdersView.test.mjs +++ b/src/modules/first-leg/views/FirstLegOrdersView.test.mjs @@ -751,7 +751,8 @@ test('supports the frozen customs document workflow and customer-safe downloads' assert.match(customsDialogSource, /v-if="detail.status === 'COMPLETED'"[^>]*>报关已完成/) assert.match(customsDialogSource, /真实报关完税文件已齐全/) assert.match(customsDialogSource, /item\.finalDocument/) - assert.match(customsDialogSource, /资料版本历史/) + assert.match(customsDialogSource, /资料文件/) + assert.doesNotMatch(customsDialogSource, /资料版本历史|报关行回执历史|item\.confirmationHistory|版本 V/) assert.match(customsDialogSource, /尚未上传退税报关资料/) assert.match(customsDialogSource, /退税报关资料加载失败/) assert.doesNotMatch(customsDialogSource, /accept=/)