feat(shipping-notice): 升级货代发货流程为五阶段,完善业务校验
将货代发货流程从四阶段扩展为五阶段,拆分上传相关逻辑至独立的货代上传阶段; 统一多语言文案修正客户状态语义,将"客户尚未识别"调整为符合业务的"客户尚未确认"; 新增严格的上传成功验证谓词,需同时满足任务状态、全部预约单上传成功、存在有效成功上传尝试三个条件方可标记为完成; 新增坐标取值模型配置,支持Legacy冻结绝对坐标和锚点框架受限平移两种模式; 更新全链路相关文档、前端组件、后端服务与测试用例,确保业务逻辑对齐新业务规则。
This commit is contained in:
1 parent
1b6483a4ea
commit
935bf26fa6
86 files changed
+2743
-311
No files matched your search
@@ -18,6 +18,10 @@ const i18n = createI18n({
|
||||
title: '文档模板匹配', subtitle: '摘要', selected: '命中模板', noSelected: '未选定模板',
|
||||
expandCandidates: '查看候选模板({count})', collapseCandidates: '收起候选模板',
|
||||
routeType: '路由类型', executionMode: '执行模式',
|
||||
coordinateModel: {
|
||||
anchorFrame: '锚点坐标框架', status: '变换状态', translateX: '横向平移',
|
||||
translateY: '纵向平移', reasonCodes: '原因码',
|
||||
},
|
||||
status: { matched: '已匹配', ambiguous: '多个候选' },
|
||||
} } },
|
||||
},
|
||||
@@ -44,6 +48,34 @@ function mountPanel(needsReview = false) {
|
||||
});
|
||||
}
|
||||
|
||||
function mountAnchorFramePanel(visibility: 'admin' | 'admin_only' = 'admin') {
|
||||
return mount(ReviewProfileMatchPanel, {
|
||||
props: {
|
||||
profileMatch: {
|
||||
available: true,
|
||||
visibility,
|
||||
status: 'unique_match',
|
||||
needs_review: false,
|
||||
selected_profile: { profile_code: 'ODP-A', display_name: '客户订单模板', version: 1 },
|
||||
candidates: [{
|
||||
profile_code: 'ODP-A',
|
||||
version: 1,
|
||||
display_name: '客户订单模板',
|
||||
score: 0.99,
|
||||
coordinate_transform: {
|
||||
status: 'applied',
|
||||
translate_x: 0.001,
|
||||
translate_y: 0.03,
|
||||
reason_codes: [],
|
||||
},
|
||||
}],
|
||||
fallback_reason_codes: [],
|
||||
},
|
||||
},
|
||||
global: { plugins: [i18n] },
|
||||
});
|
||||
}
|
||||
|
||||
describe('ReviewProfileMatchPanel', () => {
|
||||
it('默认收起无需关注的候选列表', () => {
|
||||
const wrapper = mountPanel(false);
|
||||
@@ -69,4 +101,23 @@ describe('ReviewProfileMatchPanel', () => {
|
||||
expect(wrapper.get('[data-testid="review-profile-match-candidates"]').text()).toContain('客户订单模板');
|
||||
expect(wrapper.get('[data-testid="review-profile-match-candidates"]').text()).not.toContain('ODP-A');
|
||||
});
|
||||
|
||||
it('管理员技术详情展示锚点框架平移和稳定原因码,不展示原始正文或完整坐标', async () => {
|
||||
const wrapper = mountAnchorFramePanel();
|
||||
|
||||
await wrapper.get('[data-testid="review-profile-match-candidates-toggle"]').trigger('click');
|
||||
|
||||
const details = wrapper.get('[data-testid="review-profile-match-details"]');
|
||||
expect(details.text()).toContain('锚点坐标框架');
|
||||
expect(details.text()).toContain('纵向平移');
|
||||
expect(details.text()).toContain('0.03');
|
||||
expect(details.text()).not.toContain('ORDER NO.');
|
||||
expect(details.text()).not.toContain('x0');
|
||||
});
|
||||
|
||||
it('非管理员不可见锚点框架技术详情', async () => {
|
||||
const wrapper = mountAnchorFramePanel('admin_only');
|
||||
expect(wrapper.find('[data-testid="review-profile-match-panel"]').exists()).toBe(true);
|
||||
expect(wrapper.find('[data-testid="review-profile-match-coordinate-transform"]').exists()).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user