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:
1 parent
43dceaf027
commit
8102a1fe44
151 files changed
+8057
-2382
No files matched your search
@@ -5,7 +5,7 @@
|
||||
依赖:Transfer*Card、useChatTransfer、i18n chat.transfer.*。
|
||||
逻辑:payload 作为初始状态(ChatLog 回放;历史行无 item_id 仅展示不可选);仅携带
|
||||
matching_id 时按 ID 恢复匹配卡(最近匹配入口);勾选/执行按明细 item_id;
|
||||
来源选择卡重试收料 RPA 为 202 异步——存在抓取中来源时组合式函数自动轮询
|
||||
来源选择卡重试入站 RPA 为 202 异步——存在抓取中来源时组合式函数自动轮询
|
||||
GET /sources,RPA 回调收口后状态自动刷新,离开来源卡即停轮询;
|
||||
来源选择卡挂载时并行拉取来源列表与调拨类型配置(Task 7 接口化,
|
||||
类型选项=GET /transfer-types 接口下发);
|
||||
@@ -70,18 +70,17 @@ const busy = ref(false);
|
||||
const closeTarget = ref<TransferBacklogItem | null>(null);
|
||||
/** 批量标记无需处理的明细 id 集合(与单行关闭共用同一弹窗)。 */
|
||||
const batchCloseIds = ref<number[]>([]);
|
||||
/** 正在重试收料 RPA 的来源编码集合(按来源独立展示重试中)。 */
|
||||
/** 正在重试入站 RPA 的来源编码集合(按来源独立展示重试中)。 */
|
||||
const retryingSource = ref<Set<string>>(new Set());
|
||||
/** 上次提交执行的明细行快照(失败单「重查库存」按物料/收料日期关联 item_id 用)。 */
|
||||
/** 上次提交执行的明细行快照(失败单「重查库存」按物料/异动日期关联 item_id 用)。 */
|
||||
const lastExecutedItems = ref<TransferMatchingItem[]>([]);
|
||||
|
||||
const transfer = useChatTransfer();
|
||||
|
||||
/** 待处理异常视图:进入时拉取列表与汇总 */
|
||||
/** 待处理异常视图:进入时拉取列表与汇总(2026-10-16 服务端分页:首拉由
|
||||
* 待办卡挂载时上抛 query-change 触发(携带计数卡切片 initialFilter),
|
||||
* 此处不再兜底首拉避免双请求)。 */
|
||||
onMounted(() => {
|
||||
if (kind.value === 'backlog') {
|
||||
void transfer.loadBacklog();
|
||||
}
|
||||
if (kind.value === 'source-select') {
|
||||
void transfer.loadSources();
|
||||
// 调拨类型配置(Task 7 接口化):类型选项=接口下发,与来源列表并行拉取。
|
||||
@@ -92,6 +91,11 @@ onMounted(() => {
|
||||
}
|
||||
});
|
||||
|
||||
/** 待办卡查询变更(翻页/筛选/首挂载):转调组合式函数按服务端分页拉取。 */
|
||||
function onBacklogQueryChange(query: { page: number; keyword: string; resultFilter: 'all' | 'recoverable' | 'closed' | 'unknown' }) {
|
||||
void transfer.loadBacklog(query);
|
||||
}
|
||||
|
||||
/** payload 更新时重置本地状态(历史回放/刷新);初始化组合式函数上下文 */
|
||||
function applyPayload(payload?: Record<string, unknown> | null) {
|
||||
if (!payload) return;
|
||||
@@ -125,13 +129,13 @@ watch(mode, (value) => {
|
||||
if (value !== 'source-select') transfer.stopSourcePolling();
|
||||
});
|
||||
|
||||
/** 打包下载选中来源的最新归档收料文件 */
|
||||
/** 打包下载选中来源的最新归档入站文件 */
|
||||
async function onDownloadSources(sourceCodes: string[]) {
|
||||
if (!sourceCodes.length) return;
|
||||
busy.value = true;
|
||||
try {
|
||||
const result = await downloadTransferSourceFiles(sourceCodes);
|
||||
triggerBlobDownload(result.blob, result.filename ?? `receipt-files-${sourceCodes.length}.zip`);
|
||||
triggerBlobDownload(result.blob, result.filename ?? `inbound-files-${sourceCodes.length}.zip`);
|
||||
} catch (e) {
|
||||
reportError(e);
|
||||
} finally {
|
||||
@@ -261,9 +265,9 @@ async function onOrderClosed() {
|
||||
}
|
||||
}
|
||||
|
||||
async function onDownloadReceipt() {
|
||||
async function onDownloadInbound() {
|
||||
try {
|
||||
await transfer.downloadReceiptFiles();
|
||||
await transfer.downloadInboundFiles();
|
||||
} catch (e) {
|
||||
reportError(e);
|
||||
}
|
||||
@@ -364,7 +368,7 @@ async function onCloseConfirm(reason: string) {
|
||||
}
|
||||
}
|
||||
|
||||
/** 来源实例选择确认 → 创建匹配并切换匹配卡(决策 4:两步第一步;收料日期范围为查询范围;调拨类型决定数据范围) */
|
||||
/** 来源实例选择确认 → 创建匹配并切换匹配卡(决策 4:两步第一步;异动日期范围为查询范围;调拨类型决定数据范围) */
|
||||
async function onSourceConfirm(
|
||||
sourceCodes: string[],
|
||||
dateRange?: { from?: string; to?: string },
|
||||
@@ -384,7 +388,7 @@ async function onSourceConfirm(
|
||||
}
|
||||
}
|
||||
|
||||
/** 对来源(单个或批量)重新触发收料 RPA 抓取,重试期间标记该来源(busy 独立于 confirm busy)。 */
|
||||
/** 对来源(单个或批量)重新触发入站 RPA 抓取,重试期间标记该来源(busy 独立于 confirm busy)。 */
|
||||
async function onSourceRetry(sourceCodes: string[]) {
|
||||
const codes = Array.isArray(sourceCodes) ? sourceCodes : [sourceCodes];
|
||||
retryingSource.value = new Set([...retryingSource.value, ...codes]);
|
||||
@@ -450,7 +454,7 @@ async function onSourceRetry(sourceCodes: string[]) {
|
||||
v-else-if="(mode === 'run' || mode === 'result') && (runNo || run?.run_no)"
|
||||
:run-no="runNo || String(run?.run_no ?? '')"
|
||||
:initial-run="run"
|
||||
@download-receipt="onDownloadReceipt"
|
||||
@download-inbound="onDownloadInbound"
|
||||
@download-erp="onDownloadErp"
|
||||
@download-exceptions="onDownloadExceptions"
|
||||
@retry="onOrderRetry"
|
||||
@@ -459,8 +463,10 @@ async function onSourceRetry(sourceCodes: string[]) {
|
||||
<TransferBacklogSummaryCard
|
||||
v-else-if="mode === 'backlog'"
|
||||
:items="transfer.backlog.value"
|
||||
:total="transfer.backlogTotal.value"
|
||||
:busy="busy"
|
||||
:initial-filter="backlogInitialFilter"
|
||||
@query-change="onBacklogQueryChange"
|
||||
@retry="onBacklogRetry"
|
||||
@requery="onBacklogRequery"
|
||||
@resume="onBacklogResume"
|
||||
|
||||
Reference in new issue
Block a user