feat(shipping-notice): 升级货代发货流程为五阶段,完善业务校验
将货代发货流程从四阶段扩展为五阶段,拆分上传相关逻辑至独立的货代上传阶段; 统一多语言文案修正客户状态语义,将"客户尚未识别"调整为符合业务的"客户尚未确认"; 新增严格的上传成功验证谓词,需同时满足任务状态、全部预约单上传成功、存在有效成功上传尝试三个条件方可标记为完成; 新增坐标取值模型配置,支持Legacy冻结绝对坐标和锚点框架受限平移两种模式; 更新全链路相关文档、前端组件、后端服务与测试用例,确保业务逻辑对齐新业务规则。
This commit is contained in:
1 parent
1b6483a4ea
commit
935bf26fa6
86 files changed
+2743
-311
No files matched your search
@@ -669,6 +669,51 @@ describe('useShippingOrderReview build eligibility writes', () => {
|
||||
expect(review.activeCase.value?.case_no).toBe('CASE-B');
|
||||
});
|
||||
|
||||
it('keeps the latest Run and Case when an older load response arrives last', async () => {
|
||||
// 关键断言:重识别跳转新版本后,旧 Run 的迟到响应不得覆盖新版工作面。
|
||||
let resolveOldRun: ((value: Record<string, unknown>) => void) | null = null;
|
||||
api.getRun.mockImplementation((runNo: string) => (runNo === 'RUN-OLD'
|
||||
? new Promise<Record<string, unknown>>((resolve) => { resolveOldRun = resolve; })
|
||||
: Promise.resolve({
|
||||
run_no: runNo,
|
||||
summary: {},
|
||||
items: [{ case_no: 'CASE-NEW', document_id: 2, status: 'draft', issue_count: 0 }],
|
||||
})));
|
||||
api.getQueue.mockImplementation((runNo: string) => Promise.resolve({
|
||||
summary: { total: 1, needs_action: 1, processing: 0, completed: 0 },
|
||||
items: [{
|
||||
case_no: runNo === 'RUN-OLD' ? 'CASE-OLD' : 'CASE-NEW',
|
||||
document_id: runNo === 'RUN-OLD' ? 1 : 2,
|
||||
source_run_no: runNo,
|
||||
status: 'draft', issue_count: 0, available_actions: [],
|
||||
}],
|
||||
}));
|
||||
api.getCase.mockImplementation((caseNo: string) => Promise.resolve(buildCase({
|
||||
case_no: caseNo,
|
||||
run_no: caseNo === 'CASE-OLD' ? 'RUN-OLD' : 'RUN-NEW',
|
||||
document: {
|
||||
id: caseNo === 'CASE-OLD' ? 1 : 2,
|
||||
file_name: caseNo === 'CASE-OLD' ? 'old.pdf' : 'new.pdf',
|
||||
},
|
||||
})));
|
||||
api.getEvidence.mockResolvedValue({ items: [] });
|
||||
|
||||
const review = useShippingOrderReview();
|
||||
const olderLoad = review.load('RUN-OLD', 'CASE-OLD');
|
||||
await Promise.resolve();
|
||||
await review.load('RUN-NEW', 'CASE-NEW');
|
||||
|
||||
resolveOldRun?.({
|
||||
run_no: 'RUN-OLD',
|
||||
summary: {},
|
||||
items: [{ case_no: 'CASE-OLD', document_id: 1, status: 'superseded', issue_count: 0 }],
|
||||
});
|
||||
await olderLoad;
|
||||
|
||||
expect(review.reviewRun.value?.run_no).toBe('RUN-NEW');
|
||||
expect(review.activeCase.value?.case_no).toBe('CASE-NEW');
|
||||
});
|
||||
|
||||
it('blocks confirm when build eligibility cannot build', async () => {
|
||||
|
||||
const review = useShippingOrderReview();
|
||||
|
||||
Reference in new issue
Block a user