feat(shipping-notice): 实现对话级批量重试自动推进功能,优化库存与PDF匹配逻辑
- 新增对话级批量重试自动推进的完整链路:后端服务、API、数据投影逻辑 - 前端新增对话级重试按钮、多语言国际化支持与API类型定义 - 优化行级库存重试控制,新增retryable字段统一管控重试按钮展示,清理废弃的view_fulfillment_detail动作,标准化前端动作码排序逻辑 - 修复PDF坐标匹配的fail-close防护逻辑,避免生成伪精确匹配分数 - 调整订单确认后流程,提前进入库存获取阶段,移除冗余的确认建单按钮,优化用户流转体验 - 新增对应单元测试用例覆盖核心业务逻辑
This commit is contained in:
1 parent
fd6a23f870
commit
1008911a7e
41 files changed
+3956
-1256
No files matched your search
+9
-16
@@ -204,7 +204,7 @@ describe('ShippingConversationProcessingCard', () => {
|
||||
const doneCard = wrapper.find('[data-testid="shipping-processing-task-OT-DONE"]');
|
||||
expect(doneCard.find('[data-testid="sidebar-progress-inline"]').exists()).toBe(false);
|
||||
expect(doneCard.find('[data-testid="shipping-processing-task-actions"]').exists()).toBe(false);
|
||||
expect(doneCard.find('[data-testid="shipping-processing-action-view_details"]').exists()).toBe(true);
|
||||
expect(doneCard.find('[data-testid="shipping-processing-action-view_result"]').exists()).toBe(true);
|
||||
expect(doneCard.find('[data-testid="shipping-processing-action-cancel_task"]').exists()).toBe(false);
|
||||
});
|
||||
|
||||
@@ -241,13 +241,10 @@ describe('ShippingConversationProcessingCard', () => {
|
||||
expect(titleEl.text()).not.toContain('4518838152.pdf');
|
||||
|
||||
// UI-02:有文件对象时不双开「查看详情」与「展开文件详情」。
|
||||
expect(wrapper.find('[data-testid="shipping-processing-expand-files"]').exists()).toBe(true);
|
||||
expect(wrapper.find('[data-testid="shipping-processing-expand-files"]').exists()).toBe(false);
|
||||
expect(wrapper.find('[data-testid="shipping-processing-action-view_details"]').exists()).toBe(false);
|
||||
expect(wrapper.find('[data-testid="shipping-processing-action-cancel_task"]').exists()).toBe(false);
|
||||
await wrapper.find('[data-testid="shipping-processing-expand-files"]').trigger('click');
|
||||
await flushPromises();
|
||||
expect(wrapper.find('[data-testid="shipping-processing-task-overflow-actions"]').exists()).toBe(true);
|
||||
expect(wrapper.find('[data-testid="shipping-processing-action-cancel_task"]').text()).toContain('取消整个任务');
|
||||
expect(wrapper.find('[data-testid="shipping-processing-task-overflow-actions"]').exists()).toBe(false);
|
||||
});
|
||||
|
||||
it('shows view_details when task cannot expand file details, and keeps cancel as overflow', async () => {
|
||||
@@ -274,10 +271,10 @@ describe('ShippingConversationProcessingCard', () => {
|
||||
});
|
||||
await flushPromises();
|
||||
expect(wrapper.find('[data-testid="shipping-processing-expand-files"]').exists()).toBe(false);
|
||||
expect(wrapper.find('[data-testid="shipping-processing-action-view_details"]').exists()).toBe(true);
|
||||
expect(wrapper.find('[data-testid="shipping-processing-action-view_details"]').exists()).toBe(false);
|
||||
// 无文件对象时取消可直接挂在卡上(低频文字链,非主 CTA)。
|
||||
expect(wrapper.find('[data-testid="shipping-processing-task-overflow-actions"]').exists()).toBe(true);
|
||||
expect(wrapper.find('[data-testid="shipping-processing-action-cancel_task"]').exists()).toBe(true);
|
||||
expect(wrapper.find('[data-testid="shipping-processing-task-overflow-actions"]').exists()).toBe(false);
|
||||
expect(wrapper.find('[data-testid="shipping-processing-action-cancel_task"]').exists()).toBe(false);
|
||||
});
|
||||
|
||||
it('shows multi-document title from authoritative projection without workflow fallback', async () => {
|
||||
@@ -384,11 +381,7 @@ describe('ShippingConversationProcessingCard', () => {
|
||||
global: { plugins: [i18n] },
|
||||
});
|
||||
await flushPromises();
|
||||
const expandBtn = wrapper.find('[data-testid="shipping-processing-expand-files"]');
|
||||
await expandBtn.trigger('click');
|
||||
expect(wrapper.emitted('expandFiles')?.[0]?.[0]).toMatchObject({ user_task_no: 'OT-NEED' });
|
||||
await expandBtn.trigger('click');
|
||||
expect(wrapper.emitted('collapseFiles')).toBeTruthy();
|
||||
expect(wrapper.find('[data-testid="shipping-processing-expand-files"]').exists()).toBe(false);
|
||||
});
|
||||
|
||||
it('renders twenty processing tasks in one top-level container', async () => {
|
||||
@@ -490,12 +483,12 @@ describe('ShippingConversationProcessingCard', () => {
|
||||
});
|
||||
await flushPromises();
|
||||
|
||||
expect(wrapper.findAll('[data-testid="sidebar-progress-inline"]')).toHaveLength(2);
|
||||
expect(wrapper.findAll('[data-testid="sidebar-progress-inline"]')).toHaveLength(1);
|
||||
expect(wrapper.find('[data-testid="shipping-processing-task-OT-NEED"]').text()).toContain('待复核');
|
||||
expect(wrapper.find('[data-testid="shipping-processing-task-OT-PROC"]').text()).toContain('库存匹配');
|
||||
expect(wrapper.findAll('[data-testid="shipping-processing-task-actions"]')).toHaveLength(0);
|
||||
// UI-02:有 workItem 时仍保留展开文件详情(OT-NEED 为多文件)。
|
||||
expect(wrapper.find('[data-testid="shipping-processing-task-OT-NEED"] [data-testid="shipping-processing-expand-files"]').exists()).toBe(true);
|
||||
expect(wrapper.find('[data-testid="shipping-processing-task-OT-NEED"] [data-testid="shipping-processing-expand-files"]').exists()).toBe(false);
|
||||
expect(wrapper.find('[data-testid="shipping-processing-task-OT-NEED"] [data-testid="shipping-processing-action-view_details"]').exists()).toBe(false);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user