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

@@ -1,7 +1,7 @@
/**
* features/chat/components/messages/TransferSourceSelectCard.spec.ts
* 用途:来源实例选择卡——平台分组、全选已启用、清空、按收料文件状态门禁确认、
* 确认提交、重试收料 RPA;调拨类型选项=接口下发(Task 7 接口化):
* 用途:来源实例选择卡——平台分组、全选已启用、清空、按入站文件状态门禁确认、
* 确认提交、重试入站 RPA;调拨类型选项=接口下发(Task 7 接口化):
* 选项渲染/名称多语言回退/空配置空态/确认禁用,「即将上线」占位不再出现。
* 依赖:@vue/test-utils、i18n。
* 逻辑:平台 DBS/Crane 仅分组;实例为选择与执行边界(决策 2/3/4);
@@ -15,7 +15,7 @@ import { mount } from '@vue/test-utils';
import { describe, expect, it } from 'vitest';
import i18n from '@/i18n';
import TransferSourceSelectCard from './TransferSourceSelectCard.vue';
import { eligibleReceiptDateTo } from './transferDate';
import { defaultMovementDate, shanghaiBusinessDate } from './transferDate';
import type { TransferTypeOption } from '../../types/transfer.types';
const readySources = [
@@ -156,8 +156,8 @@ describe('TransferSourceSelectCard', () => {
});
it('parse_failed 显示解析失败徽标且可重试', async () => {
// [断言意图] 当日收料文件解析失败(file_status=parse_failed)不得误报就绪;
// 与 none/failed/expired 一样允许重新触发收料 RPA。
// [断言意图] 当日入站文件解析失败(file_status=parse_failed)不得误报就绪;
// 与 none/failed/expired 一样允许重新触发入站 RPA。
const wrapper = mountCard({}, [
{ source_code: 'DSV-BAD', display_name: 'bad', platform: 'dbs', enabled: true, has_ready_file: false, file_status: 'parse_failed' as const },
]);
@@ -189,24 +189,28 @@ describe('TransferSourceSelectCard', () => {
expect(wrapper.emitted('confirm')).toBeUndefined();
});
it('D+1 规则提示收进 ⓘ 悬浮(title),不再平铺占宽', () => {
it('日期默认值提示收进 ⓘ 悬浮(title),不再平铺占宽', () => {
// [断言意图] 长规则文案通过原生 title 渐进披露,紧凑日期行不换行错位。
const wrapper = mountCard();
const title = wrapper.find('[data-testid="transfer-source-date-hint"]').attributes('title') ?? '';
expect(title).toContain('D+1 规则');
expect(title).toContain('业务日期前一天');
expect(title).toContain('T−2');
expect(title).toContain('业务日期');
});
it('收料日期默认为 D+1 规则日期(T-1)且上限锁定(输入期限制)', () => {
// [断言意图] 默认值与 max 均为上海口径 T-1,未来日期在选择器层面不可选。
it('异动日期默认 T−2、上限=业务日期当天(成熟规则退役后仅入参限界),movementDateLabel 文案渲染', () => {
// [断言意图] 默认值=T−2 产品默认作业点(非强制边界);max=上海口径业务日期
// 当天(更近日期允许显式选择,未来日期由后端 MOVEMENT_DATE_RANGE_INVALID 卡控);
// 日期标签 i18n 键 chat.transfer.movementDateLabel(Task 5,值=异动日期)。
const wrapper = mountCard();
const from = wrapper.find('[data-testid="transfer-source-date-from"]').element as HTMLInputElement;
const to = wrapper.find('[data-testid="transfer-source-date-to"]').element as HTMLInputElement;
const cutoff = eligibleReceiptDateTo();
expect(from.value).toBe(cutoff);
expect(to.value).toBe(cutoff);
expect(from.max).toBe(cutoff);
expect(to.max).toBe(cutoff);
const today = shanghaiBusinessDate();
expect(from.value).toBe(defaultMovementDate());
expect(to.value).toBe(defaultMovementDate());
expect(from.max).toBe(today);
expect(to.max).toBe(today);
// i18n 键更名后标签正常解析(深层嵌套纯文本键,不依赖命名插值)。
expect(wrapper.find('[data-testid="transfer-source-params"]').text()).toContain('异动日期');
});
it('起始晚于截止时行内提示并禁用确认(不等提交报错)', async () => {
@@ -258,19 +262,19 @@ describe('TransferSourceSelectCard', () => {
expect(wrapper.emitted('retry')?.[0][0]).toEqual(['DBS-AWSBI', 'DBS-AWSSG', 'CRANE-SZ']);
});
it('空数据来源显示「无收料数据」徽标而非抓取失败', async () => {
// [断言意图] 抓取成功但当日无收料记录(file_status=no_data)属业务结果,
// 必须如实展示"无收料数据",不得与"抓取失败"混淆(2026-10-08 PRD01 误标事故)。
it('空数据来源显示「无入站数据」徽标而非抓取失败', async () => {
// [断言意图] 抓取成功但当日无入站记录(file_status=no_data)属业务结果,
// 必须如实展示"无入站数据",不得与"抓取失败"混淆(2026-10-08 PRD01 误标事故)。
const wrapper = mountCard({}, [
{ source_code: 'CRANE-NODATA', display_name: '空数据在途仓', platform: 'crane', enabled: true, has_ready_file: false, file_status: 'no_data' },
]);
expect(wrapper.find('[data-testid="transfer-source-status-CRANE-NODATA"]').text()).toBe('无收料数据');
expect(wrapper.find('[data-testid="transfer-source-status-CRANE-NODATA"]').text()).toBe('无入站数据');
expect((wrapper.find('[data-testid="transfer-source-retry-CRANE-NODATA"]').element as HTMLButtonElement).disabled).toBe(false);
});
it('已过期来源显示「文件已过期」徽标且可重试', async () => {
// [断言意图] 保留期已到的来源不得误报就绪(has_ready_file=false);
// expired 状态与 none/failed 一样允许重新触发收料 RPA。
// expired 状态与 none/failed 一样允许重新触发入站 RPA。
const wrapper = mountCard({}, [
{ source_code: 'CRANE-EXP', display_name: '过期在途仓', platform: 'crane', enabled: true, has_ready_file: false, file_status: 'expired' },
]);