feat(shipping-notice): 完成货代发货通知全门禁恢复MVP收口
完成全门禁恢复MVP版本交付:调整自动上传与重试配置,重构正式执行链路;修复多处代码bug,新增测试与审计工具;更新全流程文档与契约规范。
This commit is contained in:
1 parent
8e0bbf7a81
commit
c94d173f92
181 files changed
+12947
-1724
No files matched your search
@@ -98,6 +98,8 @@ function toItem(
|
||||
const chatOrRight = surface === 'chat' || surface === 'right';
|
||||
if (intent === 'open_order_review' && chatOrRight) {
|
||||
labelKey = 'chat.shippingProcessing.action.open_order_processing';
|
||||
} else if (normalized === 'retry_freight_upload_rpa' || normalized === 'retry_upload') {
|
||||
labelKey = 'chat.shippingNoticeRetryUploadAction';
|
||||
} else if (intent === 'retry' && chatOrRight) {
|
||||
labelKey = 'chat.shippingProcessing.action.retry_parse';
|
||||
} else if (normalized === 'focus_task' && chatOrRight) {
|
||||
@@ -183,6 +185,8 @@ export function resolveProcessingActionPresentation(
|
||||
const code = String(raw || '').trim();
|
||||
if (!code) return;
|
||||
const key = code.toLowerCase();
|
||||
// 仅用于管理员恢复缺失待办记录,不作为普通用户履约动作展示。
|
||||
if (key === 'regenerate_manual_upload_todo') return;
|
||||
if (seen.has(key)) return;
|
||||
seen.add(key);
|
||||
const intent = mapActionCodeToIntent(code);
|
||||
@@ -218,11 +222,31 @@ export function resolveProcessingActionPresentation(
|
||||
};
|
||||
|
||||
pushCode(projection.primaryAction?.code || projection.currentGate?.nextActionCode);
|
||||
// Gate 20 同时保留两条用户路径:主动重试 RPA 与人工上传登记。
|
||||
// 该动作由正式任务面板打开登记弹窗,不走 Gate API。
|
||||
if (
|
||||
String(projection.currentGate?.gateCode || '').trim().toLowerCase() === 'manual_upload_handoff'
|
||||
&& items.some((item) => String(item.actionCode).toLowerCase() === 'retry_freight_upload_rpa')
|
||||
) {
|
||||
pushCode('mark_manual_uploaded');
|
||||
}
|
||||
// [ORDER-STABLE] 对 availableActions 标准化(去重 + 字典序排序),确保后端返回顺序不影响前端按钮顺序。
|
||||
const normalizedAvailableActions = normalizeActionCodes(projection.availableActions || []);
|
||||
for (const action of normalizedAvailableActions) {
|
||||
pushCode(action);
|
||||
}
|
||||
// Gate 19 RPA 失败时,人工登记作为任务级替代路径展示,避免与 RPA 重试并列。
|
||||
if (
|
||||
String(projection.currentGate?.gateCode || '').trim().toLowerCase() === 'freight_upload_rpa'
|
||||
&& items.some((item) => String(item.actionCode).toLowerCase() === 'retry_freight_upload_rpa')
|
||||
) {
|
||||
for (let index = items.length - 1; index >= 0; index -= 1) {
|
||||
const code = String(items[index]?.actionCode || '').toLowerCase();
|
||||
if (code === 'mark_manual_uploaded' || code === 'open_manual_upload' || code === 'wait_manual_upload') {
|
||||
items.splice(index, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (items.length === 0 && (status === 'completed' || status === 'failed' || status === 'cancelled')) {
|
||||
pushCode('view_result');
|
||||
|
||||
Reference in new issue
Block a user