H1-H10 优化OCR实时体验闭环

这个提交包含在:
2026-05-09 11:48:57 +08:00
父节点 549bd81e30
当前提交 c26cf9b954
共修改 34 个文件,包含 1217 行新增和 184 行删除
+4 -4
查看文件
@@ -29,19 +29,19 @@ export function formatInvoiceOcrFieldLabels(fields: string[]) {
export function formatInvoiceOcrErrorMessage(rawError: string | null | undefined) {
const missingFields = parseMissingInvoiceOcrFields(rawError);
if (missingFields.length) {
return `OCR 缺少关键字段:${formatInvoiceOcrFieldLabels(missingFields).join("、")}。`;
return `票据识别缺少关键字段:${formatInvoiceOcrFieldLabels(missingFields).join("、")}。`;
}
if (rawError === "duplicate_invoice_code_number") {
return "OCR 识别到的发票代码/号码与已使用票据重复,请核对后再处理。";
return "已识别出相同发票,不能重复添加。";
}
if (rawError === "mock_ocr_failed") {
return "OCR 识别失败,请重试或人工补齐关键信息。";
return "票据识别失败,请重试或人工补齐关键信息。";
}
if (!rawError) {
return "OCR 识别失败,请稍后重试。";
return "票据识别失败,请稍后重试。";
}
return rawError;