feat(in-transit-transfer): inbound/outbound 幂等重命名与解析用途分层

- receipt→inbound 三件套改名(回调桥/文件门禁/触发服务),回调链幂等去重,迁移 tt14 同步台账键与测试基建
- 库存解析用途分层 onhand/inbound/outbound(迁移 tt15):解析档案、文件存储与下载名按用途隔离,管理端表单同步
- 「成熟」概念退役(迁移 tt16):数据无成熟属性,日期边界由调用方入参严格判定
- backlog 新增重解析服务,在途重识别投影 processing,EML 父项不再停留处理中
- 收料 RPA 回调/归档/排程链路同步改名挂点,运维脚本复位假完成状态
- 文档随批:ADR 0003 模块边界决策、10-15/10-16 计划与设计、调拨文档族与 demand/tec/funclist
- 同步 chat/errors 文案四语言、调拨前端卡片与 e2e、测试全家
This commit is contained in:
hugo committed 2026-10-16 19:43:49 +08:00
1 parent 43dceaf027
commit 8102a1fe44
151 files changed
+8057 -2382

No files matched your search

@@ -6,20 +6,25 @@
result_unknown 行仅 [重新触发],D11 无关闭入口;动作按钮与状态徽标
同簇靠右、紧跟状态展示,2026-09-29 布局调整)+ 上一页/下一页分页;
无自动轮询(进入拉一次 + 手动刷新)。
依赖:transfer.api(fetchExecutedOrders/closeTransferDocument/retriggerTransferDocument)、
依赖:Element Plus ElDialog/ElTable/ElTableColumn(2026-10-16 EP 组件化:
关闭单弹层壳与展开明细表格迁 EP,单列表卡片形态与交互不变)、
transfer.api(fetchExecutedOrders/closeTransferDocument/retriggerTransferDocument)、
transferBatch.deriveBatchNo(拨出批号展示侧 WTP→HOW 镜像)、
useMessage、i18n chat.transfer.homeExecuted.*。
逻辑:props.initialGroup(首页卡片点击带入的初始分组,''=全部)→ mounted→load;
[全部] 点击→清 statusGroup+page=1;日期范围变更→page=1+load(后端按收料
[全部] 点击→清 statusGroup+page=1;日期范围变更→page=1+load(后端按异动
日期过滤);[返回]→emit('back') 由首页面板切回卡片视图;关闭单走 D18
原因必填弹窗(同单行影响面 + 「关闭调拨单≠ERP 无单」红线)→close→load。
行为与融合卡(TransferResultCard)一致。列表排序(收料日期→数据源→库位
弹层壳禁 ESC/遮罩点击/X 关闭(仅收起/确认按钮可关,防误触关闭高危操作)。
行为与融合卡(TransferResultCard)一致。列表排序(异动日期→数据源→库位
升序)与分组计数恒全量由后端保证,本视图不消费计数
(计数展示在首页 TransferExecutedCards)。
-->
<script setup lang="ts">
import { computed, onMounted, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { ElDialog, ElTable, ElTableColumn } from 'element-plus';
import { transferDialogShellAttrs } from './transferDialogShell';
import { useMessage } from '@/shared/composables/useMessage';
import {
closeTransferDocument,
@@ -256,7 +261,7 @@ onMounted(() => { void load(); });
>
<div class="flex flex-wrap items-center justify-between gap-2 px-3 py-2 text-xs">
<span class="font-semibold text-secondary">
{{ order.receipt_date || '—' }} · {{ order.from_warehouse }}→{{ order.to_warehouse }}
{{ order.movement_date || '—' }} · {{ order.from_warehouse }}→{{ order.to_warehouse }}
· {{ $t('chat.transfer.materialCount', { count: order.items.length }) }}
</span>
<!-- 状态徽标与单据级行内动作(D11/D18)同簇靠右:处置动作紧跟状态,扫读动线「状态→处置」 -->
@@ -306,34 +311,25 @@ onMounted(() => { void load(); });
</div>
</div>
<!-- 展开明细(invoice 粒度行集) -->
<!-- 展开明细(invoice 粒度行集;EP 表格壳:空态/样式与业务表格一致) -->
<div
v-if="expandedDocNo === order.doc_no"
class="border-t border-subtle px-3 py-2"
:data-testid="`transfer-executed-items-${order.doc_no}`"
>
<table class="w-full text-xs">
<thead>
<tr class="text-left text-[11px] text-muted">
<th class="p-1">{{ $t('chat.transfer.colInvoice') }}</th>
<th class="p-1">{{ $t('chat.transfer.colMaterial') }}</th>
<th class="p-1">{{ $t('chat.transfer.colName') }}</th>
<th class="p-1">{{ $t('chat.transfer.colFromBatch') }}</th>
<th class="p-1">{{ $t('chat.transfer.colToQty') }}</th>
</tr>
</thead>
<tbody>
<tr v-for="item in order.items" :key="`${order.doc_no}|${item.invoice_no}|${item.material_no}`" class="border-t border-subtle">
<td class="p-1">{{ item.invoice_no }}</td>
<td class="p-1">{{ item.material_no }}</td>
<td class="p-1">{{ item.material_name }}</td>
<!-- 拨出批号展示外部形态(WTP→HOW 镜像转换,与匹配卡/可调拨明细/待办池同规则;
行上数据保持文件原形态,转换只发生在展示侧) -->
<td class="p-1">{{ deriveBatchNo(item.lot_no) || '—' }}</td>
<td class="p-1">{{ item.quantity }}<template v-if="item.unit"> {{ item.unit }}</template></td>
</tr>
</tbody>
</table>
<el-table :data="order.items" size="small" class="text-xs">
<el-table-column :label="$t('chat.transfer.colInvoice')" prop="invoice_no" min-width="120" class-name="whitespace-nowrap" />
<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')" prop="material_name" min-width="140" />
<!-- 拨出批号展示外部形态(WTP→HOW 镜像转换,与匹配卡/可调拨明细/待办池同规则;
行上数据保持文件原形态,转换只发生在展示侧) -->
<el-table-column :label="$t('chat.transfer.colFromBatch')" min-width="120" class-name="whitespace-nowrap">
<template #default="{ row }">{{ deriveBatchNo(row.lot_no) || '—' }}</template>
</el-table-column>
<el-table-column :label="$t('chat.transfer.colToQty')" min-width="90" class-name="whitespace-nowrap">
<template #default="{ row }">{{ row.quantity }}<template v-if="row.unit"> {{ row.unit }}</template></template>
</el-table-column>
</el-table>
</div>
</li>
</ul>
@@ -363,57 +359,63 @@ onMounted(() => { void load(); });
</button>
</div>
<!-- 关闭单确认弹层(D18:原因必填 + 同单行影响面 + 「关闭调拨单≠ERP 无单」红线) -->
<div
<!-- 关闭单确认弹层(D18:原因必填 + 同单行影响面 + 「关闭调拨单≠ERP 无单」红线)。
v-if + model-value=true:打开即渲染、关闭即卸载(无过渡等待,测试语义同旧行为) -->
<el-dialog
v-if="closeTarget"
class="fixed inset-0 z-50 flex items-center justify-center bg-slate-900/40 p-4"
data-testid="transfer-executed-close-dialog"
:model-value="true"
v-bind="transferDialogShellAttrs"
width="28rem"
class="rounded-2xl bg-surface"
>
<div class="w-full max-w-md rounded-2xl bg-surface p-5 shadow-xl">
<h3 class="text-base font-bold text-primary">
<template #header>
<h3
class="text-base font-bold text-primary"
data-testid="transfer-executed-close-dialog"
>
{{ $t('chat.transfer.homeExecuted.closeDialog.title', { docNo: closeTarget.doc_no }) }}
</h3>
<p class="mt-1 text-xs text-muted">
{{ $t('chat.transfer.homeExecuted.closeDialog.redlineReopen') }}
</p>
<ul class="mt-2 max-h-32 overflow-y-auto rounded-lg bg-surface-soft p-2 text-[11px] text-secondary">
<li v-for="item in closeTarget.items" :key="`${item.invoice_no}|${item.material_no}`">
{{ item.invoice_no }} · {{ item.material_no }} {{ item.material_name }} ·
{{ item.quantity }}<template v-if="item.unit"> {{ item.unit }}</template>
</li>
</ul>
<ul class="mt-2 list-disc pl-4 text-xs font-bold text-red-600">
<li>{{ $t('chat.transfer.homeExecuted.closeDialog.redlineWhole') }}</li>
<li>{{ $t('chat.transfer.homeExecuted.closeDialog.redlineResidue') }}</li>
<li>{{ $t('chat.transfer.homeExecuted.closeDialog.redlineErpCheck') }}</li>
</ul>
<textarea
v-model="closeDialog.reason"
rows="3"
class="mt-3 w-full rounded-lg border border-default p-2 text-sm"
:placeholder="$t('chat.transfer.homeExecuted.closeDialog.reasonRequired')"
data-testid="transfer-executed-close-reason"
/>
<div class="mt-4 flex justify-end gap-2">
<button
type="button"
class="rounded-lg border border-default px-4 py-1.5 text-sm text-secondary hover-surface-soft"
data-testid="transfer-executed-close-dismiss"
@click="closeDialog = { docNo: '', reason: '' }"
>
{{ $t('chat.transfer.orderClose.dismiss') }}
</button>
<button
type="button"
class="rounded-lg bg-red-600 px-4 py-1.5 text-sm font-bold text-white hover:bg-red-700 disabled:cursor-not-allowed disabled:opacity-40"
data-testid="transfer-executed-close-confirm"
:disabled="!closeDialog.reason.trim() || actionBusy"
@click="confirmCloseOrder"
>
{{ $t('chat.transfer.homeExecuted.closeDialog.confirm') }}
</button>
</div>
</template>
<p class="text-xs text-muted">
{{ $t('chat.transfer.homeExecuted.closeDialog.redlineReopen') }}
</p>
<ul class="mt-2 max-h-32 overflow-y-auto rounded-lg bg-surface-soft p-2 text-[11px] text-secondary">
<li v-for="item in closeTarget.items" :key="`${item.invoice_no}|${item.material_no}`">
{{ item.invoice_no }} · {{ item.material_no }} {{ item.material_name }} ·
{{ item.quantity }}<template v-if="item.unit"> {{ item.unit }}</template>
</li>
</ul>
<ul class="mt-2 list-disc pl-4 text-xs font-bold text-red-600">
<li>{{ $t('chat.transfer.homeExecuted.closeDialog.redlineWhole') }}</li>
<li>{{ $t('chat.transfer.homeExecuted.closeDialog.redlineResidue') }}</li>
<li>{{ $t('chat.transfer.homeExecuted.closeDialog.redlineErpCheck') }}</li>
</ul>
<textarea
v-model="closeDialog.reason"
rows="3"
class="mt-3 w-full rounded-lg border border-default p-2 text-sm"
:placeholder="$t('chat.transfer.homeExecuted.closeDialog.reasonRequired')"
data-testid="transfer-executed-close-reason"
/>
<div class="mt-4 flex justify-end gap-2">
<button
type="button"
class="rounded-lg border border-default px-4 py-1.5 text-sm text-secondary hover-surface-soft"
data-testid="transfer-executed-close-dismiss"
@click="closeDialog = { docNo: '', reason: '' }"
>
{{ $t('chat.transfer.orderClose.dismiss') }}
</button>
<button
type="button"
class="rounded-lg bg-red-600 px-4 py-1.5 text-sm font-bold text-white hover:bg-red-700 disabled:cursor-not-allowed disabled:opacity-40"
data-testid="transfer-executed-close-confirm"
:disabled="!closeDialog.reason.trim() || actionBusy"
@click="confirmCloseOrder"
>
{{ $t('chat.transfer.homeExecuted.closeDialog.confirm') }}
</button>
</div>
</div>
</el-dialog>
</section>
</template>