feat(shipping-order): 迭代货代订单提取与履约全流程功能
添加订单字段自动标注配置,默认仅关键字段参与自动框选 完善字段规范化逻辑,支持更多日期格式解析 添加订单候选人工采纳、驳回的完整流程,包含API、前端交互与状态管理 完善盲测功能,支持订单级字段真值校验,调整盲测集唯一性约束 加固库存校验逻辑,防止重复预约与数量不一致问题 优化坐标匹配逻辑,支持表格外的锚点定位 新增上传结果未知的状态处理,完善任务状态机 更新多语言文案与文档说明,补充功能细节 修复订单合并、重解析的边缘情况问题 补充相关测试用例,完善质量保障
This commit is contained in:
1 parent
11079910ec
commit
90f77634d6
76 files changed
+5056
-338
No files matched your search
@@ -24,6 +24,8 @@ import {
|
||||
listActiveShippingNoticeIntakes,
|
||||
resolveShippingNoticeDuplicate,
|
||||
resolveShippingNoticeCandidateDuplicate,
|
||||
promoteShippingNoticeCandidate,
|
||||
rejectShippingNoticeCandidate,
|
||||
retryShippingNoticeIntake,
|
||||
updateShippingNoticeCandidate,
|
||||
} from '@/features/chat/api/shipping.api';
|
||||
@@ -171,6 +173,10 @@ export function mapServerCandidate(remote: ShippingNoticeCandidateResponse): Shi
|
||||
poNumber: remote.po_number || undefined,
|
||||
documentFilename: remote.primary_document_filename || undefined,
|
||||
validationStatus: remote.validation_status,
|
||||
candidateStatus: remote.candidate_status || 'provisional',
|
||||
acceptanceMode: remote.acceptance_mode || undefined,
|
||||
extractionSource: remote.extraction_source || undefined,
|
||||
actionButtons: Array.isArray(remote.action_buttons) ? remote.action_buttons : [],
|
||||
selected: Boolean(remote.selected),
|
||||
conflicts: remote.conflicts || [],
|
||||
missingFields: Array.isArray(remote.missing_fields) ? remote.missing_fields.map((item) => String(item)) : [],
|
||||
@@ -539,6 +545,24 @@ export function useShippingNoticeIntakes(options: UseShippingNoticeIntakesOption
|
||||
}
|
||||
};
|
||||
|
||||
/** 人工采纳已复核的 Dify Candidate;后端决定是否已满足履约门禁。 */
|
||||
const promoteCandidate = async (candidateNo: string) => {
|
||||
const remote = await promoteShippingNoticeCandidate(candidateNo);
|
||||
for (const attachment of noticeAttachments.value) {
|
||||
if (!(attachment.candidates || []).some((item) => item.candidateNo === candidateNo)) continue;
|
||||
patchAttachment(attachment.id, { candidates: (attachment.candidates || []).map((item) => item.candidateNo === candidateNo ? mapServerCandidate(remote) : item) });
|
||||
}
|
||||
};
|
||||
|
||||
/** 人工驳回无需进入履约的 Dify Candidate。 */
|
||||
const rejectCandidate = async (candidateNo: string, reason?: string) => {
|
||||
const remote = await rejectShippingNoticeCandidate(candidateNo, reason);
|
||||
for (const attachment of noticeAttachments.value) {
|
||||
if (!(attachment.candidates || []).some((item) => item.candidateNo === candidateNo)) continue;
|
||||
patchAttachment(attachment.id, { candidates: (attachment.candidates || []).map((item) => item.candidateNo === candidateNo ? mapServerCandidate(remote) : item) });
|
||||
}
|
||||
};
|
||||
|
||||
/** 保存单个 Candidate 的重复处理决策。 */
|
||||
const resolveCandidateDuplicate = async (
|
||||
candidateNo: string,
|
||||
@@ -594,6 +618,8 @@ export function useShippingNoticeIntakes(options: UseShippingNoticeIntakesOption
|
||||
resolveCandidateDuplicate,
|
||||
setCandidateSelected,
|
||||
updateCandidateSummary,
|
||||
promoteCandidate,
|
||||
rejectCandidate,
|
||||
getParsedIntakeNos,
|
||||
markOrderExtractionStarted,
|
||||
rollbackOrderExtractionStarted,
|
||||
|
||||
Reference in new issue
Block a user