chore(shipping-notice): 统一货代发货生命周期阶段命名并优化全链路业务逻辑
This commit is contained in:
1 parent
5ef8329bd8
commit
4ec4e57005
183 files changed
+14653
-3936
No files matched your search
@@ -69,7 +69,7 @@ export type UseShippingNoticeWorkflowOptions = {
|
||||
};
|
||||
|
||||
export type UseShippingNoticeWorkflowReturn = {
|
||||
/** 后端 conversation_processing / 由 work_items 合成。 */
|
||||
/** 后端 conversation_processing;仅旧接口缺状态组时由 work_items 兼容合成。 */
|
||||
processing: Ref<ConversationProcessingProjection | null>;
|
||||
/** 统一 ShippingProcessing work_items。 */
|
||||
processingWorkItems: Ref<ShippingProcessingProjection[]>;
|
||||
@@ -204,11 +204,23 @@ export function useShippingNoticeWorkflow(
|
||||
stage: item.uiState?.stage ?? item.userStage ?? item.stage,
|
||||
gate: item.uiState?.blocking_reason?.code ?? item.blockingReason?.code ?? null,
|
||||
action: item.uiState?.primary_action?.code ?? item.primaryAction?.code ?? null,
|
||||
lifecycleEntries: item.uiState?.lifecycleEntries?.map((entry) => ({
|
||||
code: entry.code,
|
||||
state: entry.state,
|
||||
targetSurface: entry.targetSurface,
|
||||
disabledReasonKey: entry.disabledReasonKey ?? null,
|
||||
})) ?? [],
|
||||
version: item.progressVersion,
|
||||
files: (item.aggregateChildren || []).map((child) => ({
|
||||
no: child.workItemNo,
|
||||
status: child.uiState?.status ?? child.userStatus ?? child.status,
|
||||
stage: child.uiState?.stage ?? child.userStage ?? child.stage,
|
||||
lifecycleEntries: child.uiState?.lifecycleEntries?.map((entry) => ({
|
||||
code: entry.code,
|
||||
state: entry.state,
|
||||
targetSurface: entry.targetSurface,
|
||||
disabledReasonKey: entry.disabledReasonKey ?? null,
|
||||
})) ?? [],
|
||||
file: child.sourceSummary?.filename ?? null,
|
||||
})),
|
||||
})));
|
||||
@@ -293,7 +305,7 @@ export function useShippingNoticeWorkflow(
|
||||
|
||||
/**
|
||||
* 仅拉取统一 shipping-processing 投影。
|
||||
* 核心逻辑:work_items 非空时始终由 order_task 合成任务列表;embedded 仅补焦点元数据;
|
||||
* 核心逻辑:后端 status_groups 存在时直接使用;仅旧响应缺状态组才由 work_items 合成;
|
||||
* 同会话在途请求合并;跨会话请求中止,且只有最新一代可回写页面数据;
|
||||
* 语义签名相同则不替换 projection 对象,避免 DOM 重建与按钮闪烁。
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user