feat(in-transit-transfer): 实现匹配静默顶替并完善单号与明细表体验

This commit is contained in:
hugo committed 2026-10-27 16:35:56 +08:00
1 parent f5611d6783
commit 79050d02ba
25 files changed
+806 -178

No files matched your search

@@ -320,7 +320,7 @@ function resultLabelKey(item: TransferBacklogItem): string {
</div>
</div>
<!-- EP 表格壳:数据=服务端返回的当前页切片;横向滚动由 el-table 内建(列 min-width 撑开) -->
<!-- EP 表格:show-overflow-tooltip;左固定勾选,右固定结果+操作;单号/老化可滚 -->
<el-table
v-if="items.length"
:data="items"
@@ -330,7 +330,7 @@ function resultLabelKey(item: TransferBacklogItem): string {
class="text-xs"
data-testid="transfer-backlog-table"
>
<el-table-column width="48" class-name="whitespace-nowrap">
<el-table-column fixed width="48">
<template #header>
<el-checkbox
size="small"
@@ -349,40 +349,61 @@ function resultLabelKey(item: TransferBacklogItem): string {
/>
</template>
</el-table-column>
<el-table-column :label="$t('chat.transfer.colSource')" prop="source_code" min-width="110" class-name="whitespace-nowrap" />
<el-table-column :label="$t('chat.transfer.transferTypeLabel')" min-width="140" class-name="whitespace-nowrap">
<el-table-column :label="$t('chat.transfer.colSource')" prop="source_code" min-width="120" show-overflow-tooltip />
<el-table-column :label="$t('chat.transfer.transferTypeLabel')" min-width="140" show-overflow-tooltip>
<template #default="{ row }">
<span :data-testid="`transfer-backlog-type-${row.invoice_no}`">{{ typeLabel(row.transfer_type) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('chat.transfer.colInvoice')" prop="invoice_no" min-width="130" class-name="whitespace-nowrap">
<el-table-column
:label="$t('chat.transfer.transferPendingMatchColDocNo')"
prop="invoice_no"
min-width="130"
show-overflow-tooltip
>
<template #default="{ row }">
<span class="font-semibold">{{ row.invoice_no }}</span>
<span class="font-semibold">{{ row.invoice_no || '—' }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('chat.transfer.colMovementDate')" min-width="100" class-name="whitespace-nowrap">
<el-table-column
:label="$t('chat.transfer.transferPendingMatchColExternalDoc')"
min-width="130"
show-overflow-tooltip
>
<template #default="{ row }">
<span data-testid="transfer-backlog-external-doc">{{ row.external_doc_no || '—' }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('chat.transfer.colMovementDate')" min-width="110" show-overflow-tooltip>
<template #default="{ row }">{{ row.movement_date || '—' }}</template>
</el-table-column>
<el-table-column :label="$t('chat.transfer.colMaterial')" prop="material_no" min-width="110" class-name="whitespace-nowrap" />
<el-table-column :label="$t('chat.transfer.colName')" min-width="140">
<el-table-column :label="$t('chat.transfer.colMaterial')" prop="material_no" min-width="140" show-overflow-tooltip />
<el-table-column :label="$t('chat.transfer.colName')" prop="material_name" min-width="160" show-overflow-tooltip>
<template #default="{ row }">{{ row.material_name || '—' }}</template>
</el-table-column>
<el-table-column :label="$t('chat.transfer.colFromWarehouse')" min-width="110" class-name="whitespace-nowrap">
<el-table-column :label="$t('chat.transfer.colFromWarehouse')" min-width="110" show-overflow-tooltip>
<template #default="{ row }">{{ row.from_warehouse || '—' }}</template>
</el-table-column>
<el-table-column :label="$t('chat.transfer.colFromBatch')" min-width="110" class-name="whitespace-nowrap">
<el-table-column :label="$t('chat.transfer.colFromBatch')" min-width="120" show-overflow-tooltip>
<template #default="{ row }">{{ deriveBatchNo(row.lot_no ?? '') || '—' }}</template>
</el-table-column>
<el-table-column :label="$t('chat.transfer.colFromQty')" min-width="90" class-name="whitespace-nowrap">
<el-table-column :label="$t('chat.transfer.colFromQty')" min-width="90" show-overflow-tooltip>
<template #default="{ row }">{{ formatQuantity(row.external_quantity) }}</template>
</el-table-column>
<el-table-column :label="$t('chat.transfer.colToWarehouse')" min-width="110" class-name="whitespace-nowrap">
<el-table-column :label="$t('chat.transfer.colToWarehouse')" min-width="110" show-overflow-tooltip>
<template #default="{ row }">{{ row.to_warehouse || '—' }}</template>
</el-table-column>
<el-table-column :label="$t('chat.transfer.colToQty')" min-width="90" class-name="whitespace-nowrap">
<el-table-column :label="$t('chat.transfer.colToQty')" min-width="90" show-overflow-tooltip>
<template #default="{ row }">{{ formatQuantity(row.movement_quantity) }}</template>
</el-table-column>
<el-table-column :label="$t('chat.transfer.colResult')" min-width="110">
<el-table-column :label="$t('chat.transfer.colAging')" min-width="90" show-overflow-tooltip>
<template #default="{ row }">{{ $t(agingLabel(row.aging_level)) }}</template>
</el-table-column>
<el-table-column
fixed="right"
:label="$t('chat.transfer.colResult')"
width="100"
>
<template #default="{ row }">
<el-tag
size="small"
@@ -395,10 +416,11 @@ function resultLabelKey(item: TransferBacklogItem): string {
</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('chat.transfer.colAging')" min-width="90" class-name="whitespace-nowrap">
<template #default="{ row }">{{ $t(agingLabel(row.aging_level)) }}</template>
</el-table-column>
<el-table-column :label="$t('chat.transfer.colAction')" min-width="150" class-name="whitespace-nowrap">
<el-table-column
fixed="right"
:label="$t('chat.transfer.colAction')"
width="150"
>
<template #default="{ row }">
<template v-if="isActionable(row as TransferBacklogItem)">
<!-- 失效行(文件已移除)只留关闭:重查会被后端拒绝(TRANSFER.RETRY_NOT_ALLOWED)。 -->