feat(shipping-notice,receipt-report): 新增收料报表功能并优化发货通知流程

清理废弃的shipping xfa ocr automark相关代码和job配置
新增收料报表管理的前端页面、路由和侧边栏入口
新增后端收料报表配置接口、数据库模型和RPA脚本
优化发货通知流程的重试策略,将shipping相关job默认不自动重试
移除废弃的库存源确认相关逻辑,更新流程门禁规则
重构订单模板的值适配器模块,新增坐标OCR值适配器
清理前端shipping菜单和action的废弃选项
更新相关文档和测试用例,调整.gitignore忽略规则
This commit is contained in:
hugo committed 2026-08-20 20:23:10 +08:00
1 parent 260465b72d
commit 1b6483a4ea
466 files changed
+32115 -33796

No files matched your search

@@ -51,25 +51,23 @@ describe('workbenchActionRegistry', () => {
vi.restoreAllMocks();
});
it('registers fulfillment and focus actions used by Footer', () => {
it('registers Gate fulfillment actions and does not retain legacy aliases', () => {
for (const code of [
'confirm_inventory_source',
'match_inventory',
'retry_inventory_matching',
'generate_excel',
'mark_manual_uploaded',
'retry_upload',
'retry_freight_upload_rpa',
'regenerate_excel_artifact',
'view_result',
'view_record',
'confirm_customer',
'open_profile_review',
'open_inventory_source_review',
]) {
expect(lookupWorkbenchAction(code)).toBeTruthy();
}
expect(WORKBENCH_ACTION_REGISTRY.open_inventory_source_review.reviewBehavior).toBe('open_inventory_candidates');
expect(WORKBENCH_ACTION_REGISTRY.confirm_inventory_source.reviewBehavior).toBe('todo_panel');
expect(WORKBENCH_ACTION_REGISTRY.confirm_customer.reviewBehavior).toBe('open_customer_dialog');
for (const code of ['freeze_order', 'confirm_inventory_source', 'open_inventory_source_review', 'confirm_inventory_field_mapping', 'match_inventory', 'rematch', 'generate_excel', 'retry_upload']) {
expect(lookupWorkbenchAction(code)).toBeNull();
}
// 保存订单并校验只属于工作台底栏,不得注册为右栏当前任务动作。
expect(WORKBENCH_ACTION_REGISTRY.validate).toBeUndefined();
});
@@ -90,7 +88,7 @@ describe('workbenchActionRegistry', () => {
});
it('hides write actions when actionsExecutable=false but keeps view_result', () => {
expect(shouldRenderWorkbenchAction(WORKBENCH_ACTION_REGISTRY.match_inventory, {
expect(shouldRenderWorkbenchAction(WORKBENCH_ACTION_REGISTRY.retry_inventory_matching, {
actionsExecutable: false,
surface: 'review',
})).toBe(false);
@@ -111,23 +109,23 @@ describe('workbenchActionRegistry', () => {
expect(payload?.action_code).toBe('totally_unknown_action');
});
it('exposes match_inventory as primary for review Footer', () => {
it('exposes Gate retry_inventory_matching as primary for review Footer', () => {
const result = resolveProcessingActionPresentation(projection({
uiState: {
status: 'waiting_human', stage: 'inventory_matching', blocking_reason: null,
primary_action: { code: 'match_inventory', label_key: 'x' }, secondary_actions: [],
primary_action: { code: 'retry_inventory_matching', label_key: 'x' }, secondary_actions: [],
},
currentGate: {
gateCode: 'inventory_match',
status: 'blocked',
nextActionCode: 'match_inventory',
nextActionCode: 'retry_inventory_matching',
blockingReasonCode: 'inventory_shortage',
attemptNo: 1,
},
availableActions: ['refresh'],
}), { surface: 'review', actionsExecutable: true });
expect(result.primary?.intent).toBe('open_inventory_match_review');
expect(result.primary?.actionCode).toBe('match_inventory');
expect(result.primary?.actionCode).toBe('retry_inventory_matching');
expect(result.secondary).toBeNull();
});
@@ -204,21 +202,8 @@ describe('workbenchActionRegistry', () => {
expect(warn).toHaveBeenCalled();
});
it('routes aliased open_inventory_source_review to todo_panel after create', () => {
// 后端 normalize 后 Footer 只见 open_inventory_source_review;建单后须 Todo。
const pre = resolveWorkbenchActionItem({
intent: 'open_inventory_source_review',
actionCode: 'open_inventory_source_review',
labelKey: 'x',
}, { postCreate: false });
expect(pre?.reviewBehavior).toBe('open_inventory_candidates');
const post = resolveWorkbenchActionItem({
intent: 'open_inventory_source_review',
actionCode: 'open_inventory_source_review',
labelKey: 'x',
}, { postCreate: true });
expect(post?.reviewBehavior).toBe('todo_panel');
expect(post?.todoActionCode).toBe('confirm_inventory_source');
it('does not register inventory source selection or mapping confirmation', () => {
expect(lookupWorkbenchAction('open_inventory_source_review')).toBeNull();
expect(lookupWorkbenchAction('confirm_inventory_field_mapping')).toBeNull();
});
});