feat(shipping-notice): 增强订单文档 Profile 管理功能,新增复核与草稿管理
- 添加订单复核相关模型及 API,支持复核案例的创建、更新和确认 - 实现复核草稿的管理功能,允许用户对复核内容进行编辑和保存 - 引入复核事件审计,确保复核过程的可追溯性 - 更新数据库模型以支持复核和草稿的关系管理 - 完善相关服务逻辑,确保复核与草稿的状态管理和数据一致性 - 增强文档模板的管理能力,支持更复杂的业务场景
This commit is contained in:
1 parent
61ac6403c4
commit
b7307fc573
147 files changed
+15108
-1522
No files matched your search
@@ -551,7 +551,6 @@ export function useChatPage() {
|
||||
},
|
||||
retryShippingNoticeAttachment: shipping.retryShippingNoticeAttachment,
|
||||
setShippingCandidateSelected: shipping.setShippingCandidateSelected,
|
||||
updateShippingCandidateSummary: shipping.updateShippingCandidateSummary,
|
||||
resolveShippingCandidateDuplicate: shipping.resolveShippingCandidateDuplicate,
|
||||
showShippingDuplicateDialog: shipping.showShippingDuplicateDialog,
|
||||
shippingDuplicateAttachment: shipping.shippingDuplicateAttachment,
|
||||
|
||||
@@ -1007,24 +1007,6 @@ export function useChatShipping(options: UseChatShippingOptions) {
|
||||
}
|
||||
};
|
||||
|
||||
/** 保存 Candidate 结构化修订,并保留服务端校验错误。 */
|
||||
const updateShippingCandidateSummary = async (
|
||||
candidateNo: string,
|
||||
businessSummary: Record<string, unknown>,
|
||||
done?: (success: boolean) => void,
|
||||
) => {
|
||||
try {
|
||||
await shippingIntakes.updateCandidateSummary(candidateNo, businessSummary);
|
||||
const candidate = shippingIntakes.noticeAttachments.value.flatMap((item) => item.candidates || []).find((item) => item.candidateNo === candidateNo);
|
||||
if (candidate) await shippingOrderExtractionRuns.updateCandidateReviewSnapshot(candidate);
|
||||
msg.success(t('chat.shippingCandidateUpdateDone'));
|
||||
done?.(true);
|
||||
} catch (error: unknown) {
|
||||
msg.warning(error instanceof Error ? error.message : t('chat.shippingCandidateUpdateFailed'));
|
||||
done?.(false);
|
||||
}
|
||||
};
|
||||
|
||||
/** 保存 Candidate 重复决策,并统一展示权限或目标漂移错误。 */
|
||||
const resolveShippingCandidateDuplicate = async (
|
||||
candidateNo: string,
|
||||
@@ -1121,6 +1103,12 @@ export function useChatShipping(options: UseChatShippingOptions) {
|
||||
t,
|
||||
});
|
||||
|
||||
// 快览完成后补充可见的用户请求;用户已输入备注时绝不覆盖。
|
||||
watch([isShippingNoticeAgent, shippingIntakes.allParsedReady], ([isShippingAgent, allParsedReady]) => {
|
||||
if (!isShippingAgent || !allParsedReady || input.value.trim()) return;
|
||||
input.value = t('chat.shippingOrderExtractionDefaultUserMessage');
|
||||
});
|
||||
|
||||
const { handleShippingMenuAction, handleShippingActionClick } = createShippingMenuHandlers({
|
||||
isThinking,
|
||||
currentAgentId,
|
||||
@@ -1510,7 +1498,6 @@ export function useChatShipping(options: UseChatShippingOptions) {
|
||||
reparseOrderExtractionRun: shippingOrderExtractionRuns.reparseRun,
|
||||
shippingNoticeAllReadyForConfirmation: shippingIntakes.allReadyForConfirmation,
|
||||
setShippingCandidateSelected,
|
||||
updateShippingCandidateSummary,
|
||||
resolveShippingCandidateDuplicate,
|
||||
promoteShippingCandidate,
|
||||
rejectShippingCandidate,
|
||||
|
||||
Reference in new issue
Block a user