feat(in-transit-transfer): 落地证据流重解析并纳入货代与排程配套改动

外部单号进入异动档自然键,圈档按 T-2 成熟封顶,当前归档可单独重解析。同批带上 Crane 禁整页刷新、ODM 白名单降级、排程抽屉与执行记录日期窗,以及 YAML 库存源下线。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
hugoandCursor committed 2026-10-22 00:48:37 +08:00
1 parent 911afa0f73
commit 4c2a7e2a23
145 files changed
+11695 -4214

No files matched your search

@@ -47,15 +47,16 @@ import TransferPendingMatchPanel from './TransferPendingMatchPanel.vue';
/** 两个来源的待匹配记录(同来源多行验证按钮行级渲染) */
const records = [
{ ledger_record_id: 101, doc_no: 'HOM-901', material_code: 'MAT-9', material_name: '未匹配物料',
movement_date: '2026-08-04', source_code: 'DBS-AWSBI', quantity: '55' },
movement_date: '2026-08-04', source_code: 'DBS-AWSBI', record_kind: 'inbound' as const, quantity: '55' },
{ ledger_record_id: 102, doc_no: 'HOM-902', material_code: 'MAT-8', material_name: '未匹配物料二',
movement_date: '2026-08-05', source_code: 'DBS-AWSBI', quantity: '12' },
movement_date: '2026-08-05', source_code: 'DBS-AWSBI', record_kind: 'inbound' as const, quantity: '12' },
{ ledger_record_id: 103, doc_no: 'HOM-903', material_code: 'MAT-7', material_name: '未匹配物料三',
movement_date: '2026-08-05', source_code: 'CRANE-FP', quantity: '3' },
movement_date: '2026-08-05', source_code: 'CRANE-FP', record_kind: 'outbound' as const, quantity: '3' },
];
/** 预检载荷(数值刻意互异:文件 2 份/规则 v3/清除 12/保留 4,供弹窗文案断言) */
const previewPayload = {
record_kind: 'inbound' as const,
files: [
{ archived_at: '2026-08-03T10:00:00', sha256: 'sha-aaa', rows: 7 },
{ archived_at: '2026-08-04T10:00:00', sha256: 'sha-bbb', rows: 5 },
@@ -117,13 +118,16 @@ describe('TransferPendingMatchPanel 清空重解析(Task 8)', () => {
});
it('点击后先调预检并弹确认:展示文件份数/规则 code+version/清除与保留行数', async () => {
// [断言意图] 确认弹窗数据必须来自预检接口:点击即调 reparse-preview(带行来源),
// 弹窗内容展示预检四要素(份数 2 / DBS-INV v3 / 清除 12 / 保留 4)。
// [断言意图] 确认弹窗数据必须来自预检接口:点击即调 reparse-preview(带来源+记录类型),
// 弹窗内容展示预检要素(证据流/份数 2 / DBS-INV v3 / 清除 12 / 保留 4)。
const wrapper = await mountFlushedPanel();
await openDialog(wrapper);
expect(api.fetchPendingMatchReparsePreview).toHaveBeenCalledWith('DBS-AWSBI');
expect(api.fetchPendingMatchReparsePreview).toHaveBeenCalledWith('DBS-AWSBI', 'inbound');
const dialog = wrapper.find('[data-testid="transfer-pending-match-reparse-dialog"]');
expect(dialog.exists()).toBe(true);
expect(wrapper.find('[data-testid="transfer-pending-match-reparse-stream"]').text()).toContain(
i18n.global.t('chat.transfer.streamInbound'),
);
expect(wrapper.find('[data-testid="transfer-pending-match-reparse-files"]').text()).toContain('2');
const profile = wrapper.find('[data-testid="transfer-pending-match-reparse-profile"]').text();
expect(profile).toContain('DBS-INV');
@@ -150,7 +154,7 @@ describe('TransferPendingMatchPanel 清空重解析(Task 8)', () => {
await flushPromises();
// [断言意图] 执行走 POST reparse(带来源);成功后向上冒泡 refresh 让宿主
// 重拉待匹配清单,并在弹窗内展示执行端点返回的计数摘要。
expect(api.reparsePendingMatch).toHaveBeenCalledWith('DBS-AWSBI');
expect(api.reparsePendingMatch).toHaveBeenCalledWith('DBS-AWSBI', 'inbound');
expect(wrapper.emitted('refresh')).toBeTruthy();
const summary = wrapper.find('[data-testid="transfer-pending-match-reparse-result"]').text();
expect(summary).toContain('12');