feat(shipping-notice): 落地 XFA 统一视觉拆分确认门禁与处理投影收敛
闭合拆分预览令牌单次消费、样本 checksum 绑定与确认审计;正式提取改为 bindings-only。 同步统一标注工作台交互,并补齐进度投影/任务中心与迁移文档。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
d2b3d74def
commit
84a881b554
195 files changed
+20269
-3463
No files matched your search
@@ -1,9 +1,9 @@
|
||||
/**
|
||||
* features/workspace/shipping-task-center/TaskTodoPanel.vue
|
||||
* 用途:渲染统一 Gate 恢复卡片与 STP 履约待办动作(ui_state.action_buttons)。
|
||||
* 用途:渲染统一 Gate 恢复卡片与 STP 履约待办说明(表单/弹窗入口)。
|
||||
* 依赖:ProcessGateRecoveryCard、shipping.api、shipping-tasks.api、ManualUploadEvidenceDialog。
|
||||
* 逻辑:优先展示 ui_state.process_gate 阻断信息与 next_action_code;禁止按 workflow_item.lifecycle
|
||||
* 或 process_status 推断人工上传;存在 current_blocking_gate 时不渲染旧 action_buttons。
|
||||
* 逻辑:优先展示 ui_state.process_gate 阻断信息;hidePrimaryActions=true 时不渲染平级主按钮
|
||||
* (由订单处理工作台统一 ActionBar 输出,UI-01 / BE-05);对话框与登记表单仍由此面板承接。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from 'vue';
|
||||
@@ -35,10 +35,14 @@ import ProcessGateRecoveryCard from '@/features/shipping-process-gates/component
|
||||
import type { ShippingProcessGateUserSummary } from '@/features/chat/types/shipping.api.types';
|
||||
import { gateSummaryIndicatesManualUpload } from '@/features/chat/shipping/shippingProcessingFulfillment';
|
||||
|
||||
const props = defineProps<{
|
||||
const props = withDefaults(defineProps<{
|
||||
detail: ShippingTaskDetail;
|
||||
canHandle: boolean;
|
||||
}>();
|
||||
/** 为 true 时隐藏主按钮区与 Gate 卡内主操作(统一进度 ActionBar 已输出)。 */
|
||||
hidePrimaryActions?: boolean;
|
||||
}>(), {
|
||||
hidePrimaryActions: false,
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
refreshed: [];
|
||||
@@ -155,11 +159,28 @@ const allowedIds = computed(() => {
|
||||
});
|
||||
const hasBlockingGate = computed(() => Boolean(processGateSummary.value?.current_blocking_gate));
|
||||
|
||||
const UNIFIED_OWNED_ACTION_IDS = new Set([
|
||||
'retry',
|
||||
'refresh',
|
||||
'download_excel',
|
||||
'export',
|
||||
'open_manual_upload',
|
||||
'mark_manual_uploaded',
|
||||
'regenerate_excel',
|
||||
'view_result',
|
||||
'open_order_review',
|
||||
'open_order_processing',
|
||||
]);
|
||||
|
||||
const visibleActions = computed(() => {
|
||||
// [STEP] Gate 阻断时后端已清零 action_buttons;前端再兜底隐藏,避免双真相。
|
||||
if (hasBlockingGate.value) return [];
|
||||
return actionButtons.value.filter((action) => {
|
||||
const id = String(action.id || '');
|
||||
// [UI-01 / BE-05] 统一 ActionBar 已表达的动作不再重复渲染;未映射的履约动作仍由本面板承接。
|
||||
if (props.hidePrimaryActions && UNIFIED_OWNED_ACTION_IDS.has(id)) {
|
||||
return false;
|
||||
}
|
||||
if (!allowedIds.value.has(id) || !isActionAllowedForCheckpoint(id, checkpointKind.value)) {
|
||||
return false;
|
||||
}
|
||||
@@ -169,6 +190,8 @@ const visibleActions = computed(() => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
/** Gate 卡在统一进度存在时仍可执行业务恢复(客户确认等),但避免与 ActionBar 重复的 next_action。 */
|
||||
const gateCanHandle = computed(() => props.canHandle);
|
||||
/**
|
||||
* 动作成功后刷新详情并更新导航徽标。
|
||||
*/
|
||||
@@ -371,12 +394,34 @@ async function runAction(action: ShippingChatAction) {
|
||||
busyId.value = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 供订单处理工作台统一 ActionBar 委托履约动作(库存源/匹配/上传登记等)。
|
||||
*
|
||||
* @param actionId - ui_state / Gate 动作码
|
||||
*/
|
||||
async function invokeActionByCode(actionId: string) {
|
||||
const id = String(actionId || '').trim();
|
||||
if (!id) return;
|
||||
const fromButtons = actionButtons.value.find((item) => String(item.id || '') === id);
|
||||
await runAction(fromButtons || {
|
||||
id,
|
||||
label: id,
|
||||
message: '',
|
||||
variant: 'primary',
|
||||
});
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
invokeActionByCode,
|
||||
openCustomerDialog,
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<div class="space-y-3">
|
||||
<ProcessGateRecoveryCard
|
||||
:summary="processGateSummary"
|
||||
:can-handle="canHandle"
|
||||
:can-handle="gateCanHandle"
|
||||
:navigation-context="{
|
||||
agentId: detail.owner_agent_id != null ? String(detail.owner_agent_id) : undefined,
|
||||
conversationId: detail.conversation_id || undefined,
|
||||
|
||||
Reference in new issue
Block a user