feat(shipping-notice): 优化货运订单履约流程与用户体验
- 优化聊天附件列表为横向可滚动布局并新增配套测试用例 - 移除自动填充默认用户消息逻辑,空备注时不再伪造默认正文 - 修复流程Gate动作展示逻辑,隐藏历史遗留操作与自动阶段无效按钮 - 完善库存匹配重试与订单快照冻结校验流程 - 优化进度展示优先级,优先显示人工待处理状态 - 移除Excel导出自动推导金额逻辑,强制使用Schema配置字段 - 新增货代通用报表RPA详细设计文档 - 更新相关测试用例与断言逻辑
This commit is contained in:
1 parent
dc282f3b1d
commit
11cef575b4
51 files changed
+2197
-112
No files matched your search
@@ -8,7 +8,7 @@
|
||||
ReviewCustomerResolutionPanel / ReviewCurrentProcessingCard / ReviewCompletedChecksPanel /
|
||||
ReviewBuildEligibilitySummary、ReviewInventory*、
|
||||
ReviewLineInventoryOps(履约操作并入明细右侧列)、ReviewLineFulfillmentDetail(行内履约摘要)、
|
||||
ProcessGateRecoveryCard;formal_task 仅显式动作挂载 TaskTodoPanel(主写在 Footer);
|
||||
formal_task 仅显式动作挂载 TaskTodoPanel(主写在 Footer);
|
||||
shipping.api.retryWorkspaceConversationAutoProgress(对话级重试)。
|
||||
逻辑:建单前订单检查为主卡;正式 OT 后保持 standard,不自动切 formal_task 空壳;
|
||||
对话级「重试自动推进」在顶栏;当前 Case 对象级重试优先右栏 CurrentProcessingCard,
|
||||
@@ -65,6 +65,7 @@ import ReviewWorkbenchHeader from '../components/shipping-review/ReviewWorkbench
|
||||
import ReviewWorkbenchModeToggle from '../components/shipping-review/ReviewWorkbenchModeToggle.vue';
|
||||
import ReviewUnsavedSwitchDialog from '../components/shipping-review/ReviewUnsavedSwitchDialog.vue';
|
||||
import ProcessGateRecoveryCard from '@/features/shipping-process-gates/components/ProcessGateRecoveryCard.vue';
|
||||
import { useShippingProcessGateRecovery } from '@/features/shipping-process-gates/composables/useShippingProcessGateRecovery';
|
||||
import TaskTodoPanel from '@/features/workspace/shipping-task-center/TaskTodoPanel.vue';
|
||||
import ManualUploadEvidenceDialog from '@/features/workspace/shipping-task-center/ManualUploadEvidenceDialog.vue';
|
||||
import { downloadWorkspaceShippingExcelFile } from '@/features/workspace/api/shipping-tasks.api';
|
||||
@@ -103,6 +104,7 @@ const route = useRoute();
|
||||
const router = useRouter();
|
||||
const page = useChatPageContext();
|
||||
const { t, te } = useI18n();
|
||||
const { submitPrimaryAction: submitProcessGatePrimaryAction } = useShippingProcessGateRecovery();
|
||||
const {
|
||||
reviewRun,
|
||||
activeCase,
|
||||
@@ -233,11 +235,6 @@ const agentId = computed(() => String(route.params.agentId || ''));
|
||||
const conversationId = computed(() => String(page.conversationId || route.query.conversation_id || ''));
|
||||
const itemNoFromQuery = computed(() => String(route.query.item_no || ''));
|
||||
const reviewFocus = computed(() => String(route.query.focus || '').trim());
|
||||
/** Gate 恢复卡片导航上下文(复核台深链)。 */
|
||||
const reviewGateNavigationContext = computed(() => ({
|
||||
agentId: agentId.value,
|
||||
conversationId: conversationId.value,
|
||||
}));
|
||||
const focusedEvidenceRef = ref<{ fieldId: string; lineIndex?: number } | null>(null);
|
||||
|
||||
const workbenchMode = ref<ReviewWorkbenchMode>('standard');
|
||||
@@ -355,21 +352,47 @@ const caseContentSkeleton = computed(() => caseSwitchFailed.value && !activeCase
|
||||
));
|
||||
|
||||
/**
|
||||
* 是否挂载右侧/窄屏「当前处理」卡:task_missing、正式 OT、或自动化进行中/失败态。
|
||||
* 核心逻辑:对象级重试优先挂在此卡上,未挂载时才回落底栏。
|
||||
* 是否挂载右侧/窄屏「当前处理」卡:task_missing、正式 OT、自动化进行中/失败态,或人工 Gate。
|
||||
* 核心逻辑:当前任务是本页唯一 Gate 写入口,对象级重试优先挂在此卡上,未挂载时才回落底栏。
|
||||
*/
|
||||
const mountCurrentProcessingCard = computed(() => {
|
||||
if (!displayCase.value) return false;
|
||||
if (caseContentSkeleton.value) return true;
|
||||
if (Boolean(displayCase.value.task_missing)) return true;
|
||||
if (hasFormalOt.value) return true;
|
||||
const gate = displayCase.value.process_gate;
|
||||
if (
|
||||
gate?.current_blocking_gate
|
||||
&& !gate.technical_auto_only
|
||||
&& String(gate.owner_type || '') !== 'system'
|
||||
) return true;
|
||||
const status = String(displayCase.value.automation?.status || '').trim().toLowerCase();
|
||||
return ['waiting_to_start', 'queued', 'running', 'failed', 'manual_fallback'].includes(status);
|
||||
});
|
||||
|
||||
/** 对象级重试:有当前处理卡时放右栏/窄屏主卡;否则回落底栏。 */
|
||||
const showObjectRetryOnRail = computed(() => showStpRetry.value && mountCurrentProcessingCard.value);
|
||||
const showObjectRetryOnFooter = computed(() => showStpRetry.value && !mountCurrentProcessingCard.value);
|
||||
const showObjectRetryOnRail = computed(() => showStpRetry.value && mountCurrentProcessingCard.value);
|
||||
const showObjectRetryOnFooter = computed(() => showStpRetry.value && !mountCurrentProcessingCard.value);
|
||||
|
||||
/** 当前任务卡是复核页唯一 Gate 写入口;Gate 主动作优先于泛化自动重试。 */
|
||||
const currentTaskPrimaryAction = computed(() => (
|
||||
displayCase.value?.process_gate?.primary_action
|
||||
?? shippingProcessingProjection.value?.primaryAction
|
||||
?? displayCase.value?.primary_action
|
||||
?? null
|
||||
));
|
||||
const currentTaskRetryable = computed(() => (
|
||||
showObjectRetryOnRail.value
|
||||
|| (
|
||||
Boolean(shippingProcessingProjection.value?.retryable)
|
||||
&& !String(currentTaskPrimaryAction.value?.code || '').trim()
|
||||
)
|
||||
));
|
||||
const currentTaskRecoveryActions = computed(() => (
|
||||
(displayCase.value?.process_gate?.recovery_targets || []).map((target) => ({
|
||||
code: String(target.action_code || '').trim(),
|
||||
})).filter((action) => action.code)
|
||||
));
|
||||
|
||||
/** 管理员诊断:后端 technical_progress / automation.technical 仅 admin 投影。 */
|
||||
const showAdminTaskMissingDiagnosis = computed(() => (
|
||||
@@ -1289,10 +1312,30 @@ async function handleCurrentTaskAction(
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'retry_inventory_matching': {
|
||||
const summary = displayCase.value?.process_gate;
|
||||
if (!summary) return;
|
||||
const result = await submitProcessGatePrimaryAction(summary, { actionCode: code });
|
||||
if (result.outcome === 'submitted' || result.outcome === 'refresh_needed') {
|
||||
await reloadLatestDraft();
|
||||
await refreshShippingProcessing();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'mark_manual_uploaded':
|
||||
await formalTodoPanelRef.value?.invokeActionByCode('mark_manual_uploaded');
|
||||
break;
|
||||
default:
|
||||
if (code.startsWith('retry_') || code.startsWith('recheck_') || code.startsWith('regenerate_')) {
|
||||
const summary = displayCase.value?.process_gate;
|
||||
if (!summary) return;
|
||||
const result = await submitProcessGatePrimaryAction(summary, { actionCode: code });
|
||||
if (result.outcome === 'submitted' || result.outcome === 'refresh_needed') {
|
||||
await reloadLatestDraft();
|
||||
await refreshShippingProcessing();
|
||||
}
|
||||
break;
|
||||
}
|
||||
msg.info(t('chat.shippingOrderReview.currentTask.actionUnknown', { code }));
|
||||
}
|
||||
}
|
||||
@@ -3272,15 +3315,17 @@ watch(
|
||||
:automation="displayCase?.automation"
|
||||
:show-retry="showObjectRetryOnRail"
|
||||
:user-status="shippingProcessingProjection?.userStatus ?? displayCase?.user_status"
|
||||
:retryable="displayCase?.process_gate?.current_blocking_gate ? false : (shippingProcessingProjection?.retryable ?? showObjectRetryOnRail)"
|
||||
:retryable="currentTaskRetryable"
|
||||
:blocking-reason="shippingProcessingProjection?.blockingReason ?? displayCase?.blocking_reason"
|
||||
:primary-action="displayCase?.process_gate?.current_blocking_gate ? null : (shippingProcessingProjection?.primaryAction ?? displayCase?.primary_action)"
|
||||
:primary-action="currentTaskPrimaryAction"
|
||||
:recovery-actions="currentTaskRecoveryActions"
|
||||
:retrying="displayCase?.process_gate?.current_blocking_gate
|
||||
? (progressRetrying || caseSwitchLoading)
|
||||
: (taskRetryButtonDisabled || progressRetrying || caseSwitchLoading)"
|
||||
:retry-exhausted-sources="taskInventoryExhaustedSources"
|
||||
:loading="caseContentSkeleton"
|
||||
@retry="() => void (hasFormalOt ? retryFormalOtAutoProgress() : retryStpAutoCreate())"
|
||||
@action="(code, params) => void handleCurrentTaskAction(code, params)"
|
||||
/>
|
||||
<ReviewCustomerResolutionPanel
|
||||
v-if="activeCase && !activeCase.customer_resolution?.resolved && showEligibilityAsPrimary"
|
||||
@@ -3753,9 +3798,10 @@ watch(
|
||||
:has-formal-ot="shippingProcessingProjection?.hasFormalOt ?? hasFormalOt"
|
||||
:shipping-notice-no="shippingProcessingProjection?.shippingNoticeNo ?? confirmedNoticeTaskNo"
|
||||
:user-status="shippingProcessingProjection?.userStatus ?? displayCase?.user_status"
|
||||
:retryable="displayCase?.process_gate?.current_blocking_gate ? false : (shippingProcessingProjection?.retryable ?? showObjectRetryOnRail)"
|
||||
:retryable="currentTaskRetryable"
|
||||
:blocking-reason="shippingProcessingProjection?.blockingReason ?? displayCase?.blocking_reason"
|
||||
:primary-action="displayCase?.process_gate?.current_blocking_gate ? null : (shippingProcessingProjection?.primaryAction ?? displayCase?.primary_action)"
|
||||
:primary-action="currentTaskPrimaryAction"
|
||||
:recovery-actions="currentTaskRecoveryActions"
|
||||
:retrying="displayCase?.process_gate?.current_blocking_gate
|
||||
? (progressRetrying || caseSwitchLoading)
|
||||
: (taskRetryButtonDisabled || progressRetrying || caseSwitchLoading)"
|
||||
@@ -3772,16 +3818,10 @@ watch(
|
||||
@retry-preparation="() => void retryCaseInventoryFallback()"
|
||||
/>
|
||||
<ProcessGateRecoveryCard
|
||||
v-if="!reparseProgressActive && showHumanBlockingGate && displayCase?.process_gate && hasCreatedShippingTask"
|
||||
v-if="showHumanBlockingGate && displayCase?.process_gate"
|
||||
:summary="displayCase.process_gate"
|
||||
:can-handle="workbenchActionsExecutable"
|
||||
:navigation-context="reviewGateNavigationContext"
|
||||
inventory-upload-mode="local"
|
||||
:field-labels="reviewFieldLabels"
|
||||
@refreshed="reloadLatestDraft"
|
||||
@refresh-needed="reloadLatestDraft"
|
||||
@confirm-customer="(taskNo) => void page.openShippingCustomerDialog?.(taskNo)"
|
||||
@manual-upload="() => void openManualUploadRegistration()"
|
||||
:can-handle="false"
|
||||
:show-actions="false"
|
||||
/>
|
||||
<ReviewProfileMatchPanel
|
||||
:profile-match="displayCase?.profile_match"
|
||||
|
||||
Reference in new issue
Block a user