feat(shipping-notice,receipt-report): 新增收料报表功能并优化发货通知流程
清理废弃的shipping xfa ocr automark相关代码和job配置 新增收料报表管理的前端页面、路由和侧边栏入口 新增后端收料报表配置接口、数据库模型和RPA脚本 优化发货通知流程的重试策略,将shipping相关job默认不自动重试 移除废弃的库存源确认相关逻辑,更新流程门禁规则 重构订单模板的值适配器模块,新增坐标OCR值适配器 清理前端shipping菜单和action的废弃选项 更新相关文档和测试用例,调整.gitignore忽略规则
This commit is contained in:
1 parent
260465b72d
commit
1b6483a4ea
466 files changed
+32115
-33796
No files matched your search
@@ -8,23 +8,10 @@ import { computed, ref } from 'vue';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { createShippingMenuHandlers, type ShippingMenuHandlerContext } from './useChatShippingMenuHandler';
|
||||
|
||||
const {
|
||||
confirmWorkspaceShippingInventorySource,
|
||||
getWorkspaceShippingTask,
|
||||
} = vi.hoisted(() => ({
|
||||
confirmWorkspaceShippingInventorySource: vi.fn(),
|
||||
getWorkspaceShippingTask: vi.fn(),
|
||||
}));
|
||||
|
||||
const { downloadWorkspaceShippingExcelFile } = vi.hoisted(() => ({
|
||||
downloadWorkspaceShippingExcelFile: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock('@/features/chat/api/shipping.api', () => ({
|
||||
confirmWorkspaceShippingInventorySource,
|
||||
getWorkspaceShippingTask,
|
||||
}));
|
||||
|
||||
vi.mock('./shippingDownload', () => ({
|
||||
downloadWorkspaceShippingExcelFile,
|
||||
}));
|
||||
@@ -54,12 +41,10 @@ const createContext = (
|
||||
|
||||
describe('useChatShippingMenuHandler', () => {
|
||||
beforeEach(() => {
|
||||
confirmWorkspaceShippingInventorySource.mockReset();
|
||||
getWorkspaceShippingTask.mockReset();
|
||||
downloadWorkspaceShippingExcelFile.mockReset();
|
||||
});
|
||||
|
||||
it('uses explicit taskId for retry_rpa workspace actions', async () => {
|
||||
it('does not execute retry_rpa from a Chat menu', async () => {
|
||||
const ctx = createContext();
|
||||
const { handleShippingMenuAction } = createShippingMenuHandlers(ctx);
|
||||
|
||||
@@ -69,16 +54,8 @@ describe('useChatShippingMenuHandler', () => {
|
||||
{ taskId: 'sn-target-009' },
|
||||
);
|
||||
|
||||
expect(ctx.executeShippingDecision).toHaveBeenCalledWith(
|
||||
'retry_rpa',
|
||||
'重新获取库存',
|
||||
{ taskId: 'SN-TARGET-009' },
|
||||
);
|
||||
expect(ctx.executeShippingDecision).not.toHaveBeenCalledWith(
|
||||
'retry_rpa',
|
||||
'重新获取库存',
|
||||
{ taskId: 'SN-ACTIVE-001' },
|
||||
);
|
||||
expect(ctx.executeShippingDecision).not.toHaveBeenCalled();
|
||||
expect(ctx.refreshShippingActions).toHaveBeenCalledOnce();
|
||||
});
|
||||
|
||||
it('does not dispatch legacy generate_excel Chat Turn', async () => {
|
||||
@@ -109,8 +86,7 @@ describe('useChatShippingMenuHandler', () => {
|
||||
expect(ctx.refreshShippingActions).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('reads the displayed order version before freezing through Chat Turn', async () => {
|
||||
getWorkspaceShippingTask.mockResolvedValue({ order_data_version: 9 });
|
||||
it('does not dispatch a legacy freeze action through Chat Turn', async () => {
|
||||
const ctx = createContext();
|
||||
const { handleShippingMenuAction } = createShippingMenuHandlers(ctx);
|
||||
|
||||
@@ -120,10 +96,7 @@ describe('useChatShippingMenuHandler', () => {
|
||||
{ taskId: 'sn-freeze-901' },
|
||||
);
|
||||
|
||||
expect(ctx.startChatTurn).toHaveBeenCalledWith(expect.objectContaining({
|
||||
actionType: 'shipping.freeze_order',
|
||||
payload: { task_no: 'SN-FREEZE-901', expected_order_data_version: 9 },
|
||||
}));
|
||||
expect(ctx.startChatTurn).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('passes explicit taskId into inventory picker actions', async () => {
|
||||
|
||||
Reference in new issue
Block a user