feat(shipping-notice): 完善订单解析、模板管理与库存 RPA 流程

- 优化订单文档解析、补充合并与坐标重建
- 完善订单模板校验、发布及前端管理界面
- 改进库存 RPA 下载回退与工作流处理
- 补充后端、前端及 RPA 自动化测试
- 更新 Shipping Notice 技术文档与四语言文案
This commit is contained in:
hugo committed 2026-09-09 09:10:10 +08:00
1 parent c4a27324c8
commit 8f2f568f92
46 files changed
+1745 -265

No files matched your search

@@ -1999,6 +1999,47 @@ describe('ShippingOrderReviewView layout phase 1', () => {
}
});
it('follows the backend stage advance when the route has no lifecycle_stage deep link', async () => {
// 无 lifecycle_stage = 尚未钉工作面,应跟随系统 current,不能因空深链永久停在订单复核。
const originalQueue = reviewQueue.value;
try {
reviewQueue.value = {
...reviewQueue.value,
items: [{
...reviewQueue.value.items[0],
lifecycle_stage: 'order_review',
lifecycle_entries: [
{ code: 'order_review', state: 'current', targetSurface: 'order_lifecycle_workbench' },
{ code: 'fulfillment_prep', state: 'unavailable', targetSurface: 'order_lifecycle_workbench' },
],
}],
};
const wrapper = await mountView({});
expect((wrapper.vm as { $route: { query: Record<string, string> } }).$route.query.lifecycle_stage)
.toBeUndefined();
reviewQueue.value = {
...reviewQueue.value,
items: [{
...reviewQueue.value.items[0],
lifecycle_stage: 'fulfillment_prep',
lifecycle_entries: [
{ code: 'order_review', state: 'available', targetSurface: 'order_lifecycle_workbench' },
{ code: 'fulfillment_prep', state: 'current', targetSurface: 'order_lifecycle_workbench' },
],
}],
};
await nextTick();
await flushPromises();
expect((wrapper.vm as { $route: { query: Record<string, string> } }).$route.query.lifecycle_stage)
.toBe('fulfillment_prep');
expect(messageMocks.success).toHaveBeenCalledWith('已自动推进到通知准备');
} finally {
reviewQueue.value = originalQueue;
}
});
it('keeps a manually revisited earlier lifecycle stage when the backend advances', async () => {
const originalQueue = reviewQueue.value;
try {