docs(tec): 更新货代发货通知批次库存能力文档

- 添加单票与多票发货需求的处理方式
- 说明库存 Excel 上传后的保存与关联机制
- 解释库存匹配与 Excel 生成的独立执行方式
- 明确批次库存的真相来源

feat(chat): 优化发货库存上传提示语
- 根据上传结果生成更详细的提示信息
- 增加批次号的提示逻辑
- 使用国际化支持替换硬编码字符串

refactor(chat): 重构发货库存上传处理逻辑
- 移除多余的任务选择逻辑
- 简化上传处理流程
- 增强代码可读性与维护性

feat(locales): 更新多语言支持的提示信息
- 添加库存上传与任务处理的多语言提示
- 更新库存缺口与任务状态的描述
This commit is contained in:
hugo committed 2026-06-26 16:27:49 +08:00
1 parent 1bd9f278fe
commit 1cf8ff40bd
34 files changed
+4367 -3553

No files matched your search

@@ -4,6 +4,8 @@
* 依赖:无;useChatShippingUploadHandler 在上传成功后调用。
* 逻辑:按 checkpoint 生成不同 follow-up 提示;通知建批后触发 Dify LLM 解析续办。
*/
import i18n from '@/i18n';
/**
* 根据上传 API 响应 checkpoint 生成发给 Agent 的 follow-up 提示语。
*/
@@ -16,17 +18,29 @@ export function buildShippingInventoryUploadPrompt(
&& (result.data as { field_alignment?: unknown }).field_alignment
&& typeof (result.data as { field_alignment?: unknown }).field_alignment === 'object');
const suggestOk = Boolean((result?.data as { suggest_ok?: boolean } | undefined)?.suggest_ok);
const prefix = fileName ? `我已上传库存文件《${fileName}》` : '我已上传库存文件';
const batchNo = String(
(result?.batch_no as string | undefined)
|| ((result?.data as { batch_no?: string } | undefined)?.batch_no)
|| ((result?.data as { batch?: { batch_no?: string } } | undefined)?.batch?.batch_no)
|| '',
).trim();
const prefix = batchNo
? (fileName
? String(i18n.global.t('chat.shippingNoticePrompt.inventory.prefixBatchWithFile', { fileName, batchNo }))
: String(i18n.global.t('chat.shippingNoticePrompt.inventory.prefixBatch', { batchNo })))
: (fileName
? String(i18n.global.t('chat.shippingNoticePrompt.inventory.prefixWithFile', { fileName }))
: String(i18n.global.t('chat.shippingNoticePrompt.inventory.prefix')));
if (checkpoint === 'map_infer') {
if (suggestOk) {
return `${prefix}。请继续处理库存列映射;如果系统已识别出完整映射,请直接应用映射,并展示字段对齐结果给我确认。`;
return String(i18n.global.t('chat.shippingNoticePrompt.inventory.mapInferSuggested', { prefix }));
}
return `${prefix}。请继续解析库存列映射,并在拿到可用映射后展示字段对齐结果给我确认。`;
return String(i18n.global.t('chat.shippingNoticePrompt.inventory.mapInferPending', { prefix }));
}
if (checkpoint === 'align_review' || hasAlignment) {
return `${prefix}。请展示库存字段对齐结果,并引导我确认或更正映射。`;
return String(i18n.global.t('chat.shippingNoticePrompt.inventory.alignReview', { prefix }));
}
return `${prefix}。请继续处理库存导入,并告诉我下一步。`;
return String(i18n.global.t('chat.shippingNoticePrompt.inventory.default', { prefix }));
}
/**
@@ -54,16 +68,29 @@ export function buildShippingNoticeUploadPrompt(
: [];
const fileCount = Number(options?.fileCount || 0);
const fileLabel = options?.fileName
? `《${options.fileName}》`
: (fileCount > 1 ? `${fileCount} 份发货通知` : '发货通知');
const parts = [`我已上传${fileLabel}`];
if (batchNo) parts.push(`批次 ${batchNo}`);
if (taskId) parts.push(`当前任务 ${taskId}`);
if (fileCount > 1 || taskIds.length > 1) {
const taskListText = taskIds.length ? `任务列表:${taskIds.join('、')}。` : '';
return `${parts.join(',')}。${taskListText}请立即开始整批处理,不要只处理当前任务。先调用 get_batch_status 查看整批状态,再按批次顺序逐票处理:必要时调用 switch_focus_task 切到对应任务,然后读取该任务 raw_text,用 LLM 抽取结构化字段并调用 parse_notice(structured=...) 落库;若抽取失败可仅传 task_id 让后端用 raw_text 兜底。每处理完一票,都继续切到下一票,直到本批每一票都进入各自下一阶段(待确认、待上传库存、自动推进中的任一状态)。禁止再次询问我“是否开始解析”或只停在第一票。`;
? String(i18n.global.t('chat.shippingNoticePrompt.notice.fileLabelSingleFile', { fileName: options.fileName }))
: (fileCount > 1
? String(i18n.global.t('chat.shippingNoticePrompt.notice.fileLabelMulti', { fileCount }))
: String(i18n.global.t('chat.shippingNoticePrompt.notice.fileLabelDefault')));
const parts = [String(i18n.global.t('chat.shippingNoticePrompt.notice.uploadedPrefix', { fileLabel }))];
if (batchNo) {
parts.push(String(i18n.global.t('chat.shippingNoticePrompt.notice.batchLabel', { batchNo })));
}
return `${parts.join(',')}。请立即读取任务 raw_text,用 LLM 抽取结构化字段后直接调用 parse_notice(structured=...) 落库;若抽取失败可仅传 raw_text 走后端规则兜底。禁止再次询问我“是否开始解析”或“是否现在开始解析”。解析完成后,请直接展示解析结果供我确认。`;
if (taskId) {
parts.push(String(i18n.global.t('chat.shippingNoticePrompt.notice.taskLabel', { taskId })));
}
if (fileCount > 1 || taskIds.length > 1) {
const taskListText = taskIds.length
? String(i18n.global.t('chat.shippingNoticePrompt.notice.taskList', { taskIds: taskIds.join('、') }))
: '';
return String(i18n.global.t('chat.shippingNoticePrompt.notice.multiTask', {
summary: parts.join(','),
taskListText,
}));
}
return String(i18n.global.t('chat.shippingNoticePrompt.notice.singleTask', {
summary: parts.join(','),
}));
}
/**
@@ -48,9 +48,6 @@ export interface ShippingUploadHandlerContext {
* @returns 自动上传、文件选择器和建议提示相关处理函数
*/
export function createShippingUploadHandlers(ctx: ShippingUploadHandlerContext) {
const hasMultipleShippingBatchTasks = () =>
Array.isArray(ctx.shippingBatchTasks.value) && ctx.shippingBatchTasks.value.length > 1;
const resetInventoryTaskSelection = () => {
ctx.shippingInventorySelectionActive.value = false;
ctx.shippingInventorySelectionTaskId.value = '';
@@ -76,22 +73,14 @@ export function createShippingUploadHandlers(ctx: ShippingUploadHandlerContext)
const uploadInventoryForTask = async (taskId: string, file: File) => {
ctx.resolvedShippingTaskId.value = taskId;
const result = await uploadWorkspaceShippingInventory(taskId, file);
const batchNo = String(
((result as unknown as { data?: { batch_no?: string } }).data?.batch_no)
|| ((result as unknown as { data?: { batch?: { batch_no?: string } } }).data?.batch?.batch_no)
|| '',
).trim();
if (batchNo) ctx.resolvedShippingBatchNo.value = batchNo;
await continueShippingInventoryUploadWithDify(taskId, result as unknown as Record<string, unknown>, file.name);
};
const promptInventoryTaskSelection = async (pendingFile?: File) => {
if (pendingFile) ctx.pendingShippingInventoryFile.value = pendingFile;
ctx.shippingBatchTasksExpanded.value = true;
ctx.pendingShippingUploadTaskId.value = '';
ctx.shippingInventorySelectionTaskId.value = '';
ctx.shippingInventorySelectionActive.value = true;
await ctx.pushShippingLocalAssistantMessage(
ctx.t(
pendingFile
? 'chat.shippingNoticeUi.inventoryTaskPickPendingHint'
: 'chat.shippingNoticeUi.inventoryTaskPickHint',
),
);
void ctx.refreshShippingActions();
};
const selectShippingInventoryUploadTask = (taskId: string): boolean => {
@@ -148,16 +137,13 @@ export function createShippingUploadHandlers(ctx: ShippingUploadHandlerContext)
const handleShippingAutoUploadFile = async (file: File) => {
const kind = classifyShippingUploadFile(file, extractExt);
if (kind === 'inventory') {
if (hasMultipleShippingBatchTasks()) {
await promptInventoryTaskSelection(file);
return;
}
let taskId = ctx.getActiveShippingTaskId();
if (!taskId) {
const created = await createWorkspaceShippingTask({
source_type: 'manual',
conversation_id: String(ctx.conversationId.value || '').trim() || undefined,
});
syncBatchContextFromNoticeResponse(created as unknown as Record<string, unknown>);
taskId = String(created.task_id || '').trim();
if (!taskId) {
ctx.msg.warning('自动创建发货任务失败');
@@ -250,10 +236,6 @@ export function createShippingUploadHandlers(ctx: ShippingUploadHandlerContext)
};
const openShippingInventoryPicker = (): boolean => {
if (hasMultipleShippingBatchTasks()) {
void promptInventoryTaskSelection();
return true;
}
const taskId = ctx.getActiveShippingTaskId();
if (!taskId) {
ctx.msg.warning(ctx.t('chat.shippingNoticeMissingTaskId'));
+32 -9
View File
@@ -22,6 +22,29 @@
"shippingNoticeUploadFailed": "Inventory upload failed.",
"shippingNoticePasteHint": "Paste inventory rows in the input box, then send.",
"shippingNoticeDecisionDone": "Action completed.",
"shippingNoticePrompt": {
"inventory": {
"prefix": "I have uploaded the inventory file",
"prefixWithFile": "I have uploaded the inventory file \"{fileName}\"",
"prefixBatch": "I have uploaded the batch inventory snapshot for batch {batchNo}",
"prefixBatchWithFile": "I have uploaded the batch inventory snapshot \"{fileName}\" for batch {batchNo}",
"mapInferSuggested": "{prefix}. Please continue the inventory column mapping. If the system has already identified a complete mapping, apply it directly and show me the field alignment result for confirmation.",
"mapInferPending": "{prefix}. Please continue parsing the inventory column mapping, and after a usable mapping is available, show me the field alignment result for confirmation.",
"alignReview": "{prefix}. Please show the inventory field alignment result and guide me to confirm or correct the mapping.",
"default": "{prefix}. Please continue the inventory import and tell me the next step."
},
"notice": {
"fileLabelSingleFile": "\"{fileName}\"",
"fileLabelMulti": "{fileCount} shipping notices",
"fileLabelDefault": "the shipping notice",
"uploadedPrefix": "I have uploaded {fileLabel}",
"batchLabel": "batch {batchNo}",
"taskLabel": "current task {taskId}",
"taskList": "Task list: {taskIds}.",
"multiTask": "{summary}. {taskListText}Please only handle the current focus task. First call get_task_status to read the current task status; if the current task is still pending parsing, read raw_text, use the LLM to extract structured fields, then call parse_notice(structured=...) to persist them. If the task is already in a later step, directly explain the current status and guide me on the next step for this task. Do not ask me again whether parsing should start, and do not loop through other tasks in the batch.",
"singleTask": "{summary}. Please first call get_task_status to read the current task status; if the current task is still pending parsing, read raw_text, use the LLM to extract structured fields, and directly call parse_notice(structured=...) to persist them. If the task is already in a later step, directly explain the current status and guide me on the next step. Do not ask me again whether parsing should start now."
}
},
"shippingNoticeMapping": {
"inventoryHeaders": "Inventory headers",
"headerRow": "Header row: {row}",
@@ -70,7 +93,7 @@
"inventoryAvailable": "Inventory available",
"shortageQty": "Shortage",
"statusLabel": "Status",
"shortageBanner": "Inventory shortage exists. Do not continue to freight upload yet. Resolve the shortage first, or use the available actions to confirm partial shipment / retry matching.",
"shortageBanner": "Inventory shortage exists. Do not continue to freight upload yet. Resolve the shortage first, or use the available actions to retry matching / revise the input.",
"shortageDetails": "Shortage details",
"shortageRowDetail": "Line {index}: Reservation ID {reservationId}, SKU {sku}, shortage {shortage}",
"availableActions": "Available actions",
@@ -100,13 +123,13 @@
"nextTask": "Next",
"collapseTasks": "Hide tasks",
"viewTasks": "View tasks",
"inventoryTaskPickTitle": "Select inventory target task",
"inventoryTaskPickHint": "This batch contains multiple tasks. To avoid cross-task mistakes, choose which task this inventory belongs to before uploading.",
"inventoryTaskPickPendingHint": "This batch contains multiple tasks. To avoid cross-task mistakes, select the target task first and the pending inventory file will continue uploading after selection.",
"inventoryTaskPickTitle": "Batch inventory snapshot",
"inventoryTaskPickHint": "This batch contains multiple tasks. The inventory file will be uploaded as one batch snapshot, then each task matches independently.",
"inventoryTaskPickPendingHint": "This batch contains multiple tasks. The pending inventory file will be uploaded as one batch snapshot, then each task matches independently.",
"cancelInventoryTaskPick": "Cancel",
"uploadInventoryToTask": "Upload to this task",
"inventoryTargetTask": "Inventory target {taskId}",
"inventoryTargetIdle": "Waiting for target selection",
"uploadInventoryToTask": "Upload batch inventory",
"inventoryTargetTask": "Batch inventory entry {taskId}",
"inventoryTargetIdle": "Waiting for batch inventory",
"fileCount": "Files",
"runningCount": "Running",
"completedCount": "Completed",
@@ -141,13 +164,13 @@
},
"matchStatus": {
"fulfillable": "Fully fulfillable",
"partial": "Partially fulfillable",
"partial": "Shortage exists",
"unfulfillable": "Unfulfillable",
"pending": "Pending match"
},
"rowStatus": {
"ok": "Enough",
"partial": "Partial",
"partial": "Shortage",
"shortage": "Shortage"
},
"stepper": {
+32 -9
View File
@@ -22,6 +22,29 @@
"shippingNoticeUploadFailed": "อัปโหลดไฟล์สต็อกล้มเหลว",
"shippingNoticePasteHint": "วางข้อมูลสต็อกในช่องข้อความแล้วส่ง",
"shippingNoticeDecisionDone": "ดำเนินการเสร็จแล้ว",
"shippingNoticePrompt": {
"inventory": {
"prefix": "ฉันได้อัปโหลดไฟล์สต็อกแล้ว",
"prefixWithFile": "ฉันได้อัปโหลดไฟล์สต็อก \"{fileName}\" แล้ว",
"prefixBatch": "ฉันได้อัปโหลดสแนปช็อตสต็อกของชุดงาน {batchNo} แล้ว",
"prefixBatchWithFile": "ฉันได้อัปโหลดสแนปช็อตสต็อก \"{fileName}\" ของชุดงาน {batchNo} แล้ว",
"mapInferSuggested": "{prefix} กรุณาดำเนินการจับคู่คอลัมน์สต็อกต่อ หากระบบรู้จักการจับคู่ครบแล้ว ให้ใช้การจับคู่นั้นได้ทันทีและแสดงผลการจัดแนวฟิลด์ให้ฉันยืนยัน",
"mapInferPending": "{prefix} กรุณาแยกการจับคู่คอลัมน์สต็อกต่อ และเมื่อได้การจับคู่ที่ใช้ได้แล้ว ให้แสดงผลการจัดแนวฟิลด์ให้ฉันยืนยัน",
"alignReview": "{prefix} กรุณาแสดงผลการจัดแนวฟิลด์สต็อก และแนะนำให้ฉันยืนยันหรือแก้ไขการจับคู่",
"default": "{prefix} กรุณาดำเนินการนำเข้าสต็อกต่อ และบอกฉันว่าขั้นตอนถัดไปคืออะไร"
},
"notice": {
"fileLabelSingleFile": "\"{fileName}\"",
"fileLabelMulti": "ใบแจ้งจัดส่ง {fileCount} ฉบับ",
"fileLabelDefault": "ใบแจ้งจัดส่ง",
"uploadedPrefix": "ฉันได้อัปโหลด{fileLabel}แล้ว",
"batchLabel": "ชุดงาน {batchNo}",
"taskLabel": "งานปัจจุบัน {taskId}",
"taskList": "รายการงาน: {taskIds}",
"multiTask": "{summary} {taskListText}กรุณาจัดการเฉพาะงานที่โฟกัสอยู่ในขณะนี้ก่อน เรียก get_task_status เพื่ออ่านสถานะงานปัจจุบันก่อน หากงานปัจจุบันยังรอการแยกข้อมูล ให้读取 raw_text ใช้ LLM แยกฟิลด์แบบมีโครงสร้าง แล้วเรียก parse_notice(structured=...) เพื่อบันทึก หากงานเข้าสู่ขั้นตอนถัดไปแล้ว ให้สรุปสถานะปัจจุบันและแนะนำขั้นตอนถัดไปของงานนี้โดยตรง ห้ามถามฉันซ้ำว่าจะเริ่มแยกข้อมูลหรือไม่ และไม่ต้องวนประมวลผลงานอื่นทั้งชุด",
"singleTask": "{summary} กรุณาเรียก get_task_status เพื่ออ่านสถานะงานปัจจุบันก่อน หากงานปัจจุบันยังรอการแยกข้อมูล ให้读取 raw_text ใช้ LLM แยกฟิลด์แบบมีโครงสร้าง แล้วเรียก parse_notice(structured=...) โดยตรงเพื่อบันทึก หากงานเข้าสู่ขั้นตอนถัดไปแล้ว ให้สรุปสถานะปัจจุบันและแนะนำขั้นตอนถัดไปโดยตรง ห้ามถามฉันซ้ำว่าจะเริ่มแยกข้อมูลตอนนี้หรือไม่"
}
},
"shippingNoticeMapping": {
"inventoryHeaders": "หัวคอลัมน์สต็อก",
"headerRow": "แถวหัวตาราง: {row}",
@@ -70,7 +93,7 @@
"inventoryAvailable": "สต็อกที่ใช้ได้",
"shortageQty": "จำนวนที่ขาด",
"statusLabel": "สถานะ",
"shortageBanner": "มีสต็อกขาดอยู่ จึงยังไม่ควรอัปโหลดไปยังผู้ให้บริการขนส่งต่อ กรุณาจัดการส่วนที่ขาดก่อน หรือใช้ปุ่มที่มีให้เพื่อยืนยันการส่งบางส่วน / จับคู่ใหม่",
"shortageBanner": "มีสต็อกขาดอยู่ จึงยังไม่ควรอัปโหลดไปยังผู้ให้บริการขนส่งต่อ กรุณาจัดการส่วนที่ขาดก่อน หรือใช้ปุ่มที่มีให้เพื่อจับคู่ใหม่ / กลับไปแก้ไขข้อมูล",
"shortageDetails": "รายละเอียดส่วนขาด",
"shortageRowDetail": "แถว {index}: Reservation ID {reservationId}, SKU {sku}, ขาด {shortage}",
"availableActions": "การทำงานที่ใช้ได้",
@@ -100,13 +123,13 @@
"nextTask": "ถัดไป",
"collapseTasks": "ซ่อนงาน",
"viewTasks": "ดูงาน",
"inventoryTaskPickTitle": "เลือกงานเป้าหมายของสต็อก",
"inventoryTaskPickHint": "ชุดงานนี้มีหลายงาน เพื่อป้องกันการอัปโหลดผิดงาน โปรดเลือกก่อนว่าสต็อกนี้เป็นของงานใด",
"inventoryTaskPickPendingHint": "ชุดงานนี้มีหลายงาน เพื่อป้องกันการอัปโหลดผิดงาน โปรดเลือกงานเป้าหมายก่อน แล้วระบบจะอัปโหลดไฟล์สต็อกที่เพิ่งเลือกต่อให้",
"inventoryTaskPickTitle": "สแนปช็อตสต็อกของชุดงาน",
"inventoryTaskPickHint": "ชุดงานนี้มีหลายงาน ไฟล์สต็อกจะถูกอัปโหลดเป็นสแนปช็อตเดียวของชุดงาน แล้วแต่ละงานจะจับคู่แยกกัน",
"inventoryTaskPickPendingHint": "ชุดงานนี้มีหลายงาน ไฟล์สต็อกที่รออยู่จะถูกอัปโหลดเป็นสแนปช็อตเดียวของชุดงาน แล้วแต่ละงานจะจับคู่แยกกัน",
"cancelInventoryTaskPick": "ยกเลิก",
"uploadInventoryToTask": "อัปโหลดไปงานนี้",
"inventoryTargetTask": "เป้าหมายสต็อก {taskId}",
"inventoryTargetIdle": "รอเลือกงานเป้าหมาย",
"uploadInventoryToTask": "อัปโหลดสต็อกชุดงาน",
"inventoryTargetTask": "ทางเข้าสต็อกชุดงาน {taskId}",
"inventoryTargetIdle": "รอสต็อกของชุดงาน",
"fileCount": "จำนวนไฟล์",
"runningCount": "กำลังดำเนินการ",
"completedCount": "เสร็จแล้ว",
@@ -141,13 +164,13 @@
},
"matchStatus": {
"fulfillable": "จัดส่งได้ครบ",
"partial": "จัดส่งได้บางส่วน",
"partial": "มีสต็อกขาด",
"unfulfillable": "จัดส่งไม่ได้",
"pending": "รอจับคู่"
},
"rowStatus": {
"ok": "เพียงพอ",
"partial": "บางส่วน",
"partial": "ขาด",
"shortage": "ขาด"
},
"stepper": {
+34 -9
View File
@@ -22,6 +22,31 @@
"shippingNoticeUploadFailed": "库存文件上传失败。",
"shippingNoticePasteHint": "请在输入框粘贴库存小表内容后发送。",
"shippingNoticeDecisionDone": "操作已完成。",
"shippingNoticePrompt": {
"inventory": {
"prefix": "我已上传库存文件",
"prefixWithFile": "我已上传库存文件《{fileName}》",
"prefixBatch": "我已为批次 {batchNo} 上传本批库存快照",
"prefixBatchWithFile": "我已为批次 {batchNo} 上传本批库存快照《{fileName}》",
"mapInferSuggested": "{prefix}。请继续处理库存列映射;如果系统已识别出完整映射,请直接应用映射,并展示字段对齐结果给我确认。",
"mapInferPending": "{prefix}。请继续解析库存列映射,并在拿到可用映射后展示字段对齐结果给我确认。",
"alignReview": "{prefix}。请展示库存字段对齐结果,并引导我确认或更正映射。",
"default": "{prefix}。请继续处理库存导入,并告诉我下一步。"
},
"notice": {
"fileLabelSingleFile": "《{fileName}》",
"fileLabelMulti": "{fileCount} 份发货通知",
"fileLabelDefault": "发货通知",
"uploadedPrefix": "我已上传{fileLabel}",
"batchLabel": "批次 {batchNo}",
"taskLabel": "当前任务 {taskId}",
"taskList": "任务列表:{taskIds}。",
"autoInventoryAction": "上传库存并进入字段对齐",
"autoNoticeAction": "解析发货通知并创建任务",
"multiTask": "{summary}。{taskListText}请只处理当前焦点任务。先调用 get_task_status 读取当前任务状态;如果当前任务仍待解析,请读取 raw_text,用 LLM 抽取结构化字段后调用 parse_notice(structured=...) 落库;如果已经进入后续步骤,请直接解释当前状态并给出本任务下一步引导。禁止再次询问我“是否开始解析”,也不要整批循环处理其他任务。",
"singleTask": "{summary}。请先调用 get_task_status 读取当前任务状态;如果当前任务仍待解析,请读取 raw_text,用 LLM 抽取结构化字段后直接调用 parse_notice(structured=...) 落库;若已进入后续步骤,请直接解释当前状态并给出下一步引导。禁止再次询问我“是否开始解析”或“是否现在开始解析”。"
}
},
"shippingNoticeMapping": {
"inventoryHeaders": "库存表头",
"headerRow": "表头行:{row}",
@@ -70,7 +95,7 @@
"inventoryAvailable": "库存可用",
"shortageQty": "缺口",
"statusLabel": "状态",
"shortageBanner": "存在库存缺口,当前不能直接继续上传货代。请先处理缺口,或按可用按钮确认部分发货 / 重新匹配。",
"shortageBanner": "存在库存缺口,当前不能继续上传货代。请先处理缺口,或按可用按钮重新匹配 / 返回修订。",
"shortageDetails": "缺口明细",
"shortageRowDetail": "第 {index} 行:预订单号 {reservationId},料号 {sku},缺口 {shortage}",
"availableActions": "可用操作",
@@ -104,13 +129,13 @@
"nextTask": "下一票",
"collapseTasks": "收起任务",
"viewTasks": "查看任务",
"inventoryTaskPickTitle": "请选择库存归属任务",
"inventoryTaskPickHint": "当前批次包含多票。为避免串单,请先明确选择库存要上传到哪一票。",
"inventoryTaskPickPendingHint": "当前批次包含多票。为避免串单,请先选择库存归属任务,系统会在选定后继续上传刚才的库存文件。",
"inventoryTaskPickTitle": "本批库存快照",
"inventoryTaskPickHint": "当前批次包含多票。库存文件将作为本批统一快照,后续每票独立匹配。",
"inventoryTaskPickPendingHint": "当前批次包含多票。系统会把刚才的库存文件作为本批统一快照上传,并由每票独立匹配。",
"cancelInventoryTaskPick": "取消选择",
"uploadInventoryToTask": "上传库存到此票",
"inventoryTargetTask": "库存目标 {taskId}",
"inventoryTargetIdle": "等待选择库存目标",
"uploadInventoryToTask": "上传为本批库存",
"inventoryTargetTask": "本批库存入口 {taskId}",
"inventoryTargetIdle": "等待上传本批库存",
"fileCount": "文件数",
"runningCount": "处理中",
"completedCount": "已完成",
@@ -145,13 +170,13 @@
},
"matchStatus": {
"fulfillable": "可全部发货",
"partial": "部分满足",
"partial": "存在缺口",
"unfulfillable": "无法满足",
"pending": "待匹配"
},
"rowStatus": {
"ok": "充足",
"partial": "部分满足",
"partial": "缺口",
"shortage": "缺口"
},
"stepper": {
+34 -9
View File
@@ -22,6 +22,31 @@
"shippingNoticeUploadFailed": "庫存檔案上傳失敗。",
"shippingNoticePasteHint": "請在輸入框貼上庫存小表內容後送出。",
"shippingNoticeDecisionDone": "操作已完成。",
"shippingNoticePrompt": {
"inventory": {
"prefix": "我已上傳庫存檔案",
"prefixWithFile": "我已上傳庫存檔案《{fileName}》",
"prefixBatch": "我已為批次 {batchNo} 上傳本批庫存快照",
"prefixBatchWithFile": "我已為批次 {batchNo} 上傳本批庫存快照《{fileName}》",
"mapInferSuggested": "{prefix}。請繼續處理庫存欄位映射;如果系統已辨識出完整映射,請直接套用映射,並展示欄位對齊結果給我確認。",
"mapInferPending": "{prefix}。請繼續解析庫存欄位映射,並在取得可用映射後展示欄位對齊結果給我確認。",
"alignReview": "{prefix}。請展示庫存欄位對齊結果,並引導我確認或更正映射。",
"default": "{prefix}。請繼續處理庫存匯入,並告訴我下一步。"
},
"notice": {
"fileLabelSingleFile": "《{fileName}》",
"fileLabelMulti": "{fileCount} 份發貨通知",
"fileLabelDefault": "發貨通知",
"uploadedPrefix": "我已上傳{fileLabel}",
"batchLabel": "批次 {batchNo}",
"taskLabel": "當前任務 {taskId}",
"taskList": "任務列表:{taskIds}。",
"autoInventoryAction": "上傳庫存並進入欄位對齊",
"autoNoticeAction": "解析發貨通知並建立任務",
"multiTask": "{summary}。{taskListText}請只處理目前焦點任務。先呼叫 get_task_status 讀取目前任務狀態;如果目前任務仍待解析,請讀取 raw_text,用 LLM 抽取結構化欄位後呼叫 parse_notice(structured=...) 落庫;如果已進入後續步驟,請直接說明目前狀態並給出本任務下一步引導。禁止再次詢問我「是否開始解析」,也不要整批迴圈處理其他任務。",
"singleTask": "{summary}。請先呼叫 get_task_status 讀取目前任務狀態;如果目前任務仍待解析,請讀取 raw_text,用 LLM 抽取結構化欄位後直接呼叫 parse_notice(structured=...) 落庫;若已進入後續步驟,請直接說明目前狀態並給出下一步引導。禁止再次詢問我「是否開始解析」或「是否現在開始解析」。"
}
},
"shippingNoticeMapping": {
"inventoryHeaders": "庫存表頭",
"headerRow": "表頭列:{row}",
@@ -70,7 +95,7 @@
"inventoryAvailable": "庫存可用",
"shortageQty": "缺口",
"statusLabel": "狀態",
"shortageBanner": "存在庫存缺口,目前不能直接繼續上傳貨代。請先處理缺口,或依可用按鈕確認部分發貨 / 重新匹配。",
"shortageBanner": "存在庫存缺口,目前不能繼續上傳貨代。請先處理缺口,或依可用按鈕重新匹配 / 返回修訂。",
"shortageDetails": "缺口明細",
"shortageRowDetail": "第 {index} 行:預訂單號 {reservationId},料號 {sku},缺口 {shortage}",
"availableActions": "可用操作",
@@ -100,13 +125,13 @@
"nextTask": "下一票",
"collapseTasks": "收起任務",
"viewTasks": "查看任務",
"inventoryTaskPickTitle": "請選擇庫存歸屬任務",
"inventoryTaskPickHint": "當前批次包含多票。為避免串單,請先明確選擇庫存要上傳到哪一票。",
"inventoryTaskPickPendingHint": "當前批次包含多票。為避免串單,請先選擇庫存歸屬任務,系統會在選定後繼續上傳剛才的庫存檔案。",
"inventoryTaskPickTitle": "本批庫存快照",
"inventoryTaskPickHint": "當前批次包含多票。庫存檔案將作為本批統一快照,後續每票獨立匹配。",
"inventoryTaskPickPendingHint": "當前批次包含多票。系統會把剛才的庫存檔案作為本批統一快照上傳,並由每票獨立匹配。",
"cancelInventoryTaskPick": "取消選擇",
"uploadInventoryToTask": "上傳庫存到此票",
"inventoryTargetTask": "庫存目標 {taskId}",
"inventoryTargetIdle": "等待選擇庫存目標",
"uploadInventoryToTask": "上傳為本批庫存",
"inventoryTargetTask": "本批庫存入口 {taskId}",
"inventoryTargetIdle": "等待上傳本批庫存",
"fileCount": "檔案數",
"runningCount": "處理中",
"completedCount": "已完成",
@@ -141,13 +166,13 @@
},
"matchStatus": {
"fulfillable": "可全部發貨",
"partial": "部分滿足",
"partial": "存在缺口",
"unfulfillable": "無法滿足",
"pending": "待匹配"
},
"rowStatus": {
"ok": "充足",
"partial": "部分滿足",
"partial": "缺口",
"shortage": "缺口"
},
"stepper": {