feat(shipping-notice): 通知准备履约字段就地编辑并修复缺口复核入口

- 编辑闸门翻转为状态制:Excel 生成前+无活动 Attempt 即可编辑,原因不强制(审计自动记录操作人与变更)
- 修复 Decimal 字段人工编辑无法持久化(单字段+整行替换两路径)
- 预约注册与核验比对改读有效订单值视图,消除编辑后重匹配 RESERVATION_MISMATCH 阻断
- 通知准备值列改读有效视图:保存即显新值,匹配结果列保持最近一轮事实
- 行编辑入口为更多操作列编辑按钮;编辑态替换为保存/取消;库存源行内改选随保存统一提交
- 展示态动作收纳进更多菜单(Teleport 浮层,防表格 overflow 裁剪)
- 修复缺口复核投影键错位(has_shortage 恒 False 致入口隐藏)并补齐行级结案入口
- 缺口放行改行内补录条(菜单放行或缺 N 项徽标展开,确认放行/取消收起),放行原因可选
- i18n 四语言;technical.md/funclist.md 语义文档同步
This commit is contained in:
hugo committed 2026-09-18 14:59:39 +08:00
1 parent 4d879dd8ea
commit eed1068ae3
29 files changed
+1981 -218

No files matched your search

@@ -1178,7 +1178,7 @@ export async function updateWorkspaceShippingNoticeFields(
taskNo: string,
fields: Partial<ShippingNoticeHeader>,
comment: string | undefined,
options: { expectedOrderDataVersion: number; idempotencyKey?: string; evidence: ShippingReviewEvidence; reason: string },
options: { expectedOrderDataVersion: number; idempotencyKey?: string; evidence?: ShippingReviewEvidence; reason?: string },
) {
const body = await requestJson<ShippingDecisionResponse & ShippingApiStatusPayload>(
`/api/workspace/shipping-tasks/${encodeURIComponent(taskNo)}/update-notice-fields`,
@@ -1186,8 +1186,9 @@ export async function updateWorkspaceShippingNoticeFields(
fields,
...(comment ? { comment } : {}),
expected_order_data_version: options.expectedOrderDataVersion,
evidence: options.evidence,
reason: options.reason,
// 证据/理由改为可选:未传时不带字段,与后端免证据编辑通道(Task 2)对齐。
...(options.evidence ? { evidence: options.evidence } : {}),
...(options.reason ? { reason: options.reason } : {}),
...(options.idempotencyKey ? { idempotency_key: options.idempotencyKey } : {}),
}),
);
@@ -1207,7 +1208,7 @@ export async function updateWorkspaceShippingNoticeLine(
lineIndex: number,
patch: Partial<ShippingNoticeLine> & { quantity?: number },
comment: string | undefined,
options: { expectedOrderDataVersion: number; idempotencyKey?: string; evidence: ShippingReviewEvidence; reason: string },
options: { expectedOrderDataVersion: number; idempotencyKey?: string; evidence?: ShippingReviewEvidence; reason?: string },
) {
const body = await requestJson<ShippingDecisionResponse & ShippingApiStatusPayload>(
`/api/workspace/shipping-tasks/${encodeURIComponent(taskNo)}/update-notice-line`,
@@ -1216,8 +1217,9 @@ export async function updateWorkspaceShippingNoticeLine(
patch,
...(comment ? { comment } : {}),
expected_order_data_version: options.expectedOrderDataVersion,
evidence: options.evidence,
reason: options.reason,
// 证据/理由改为可选:未传时不带字段,与后端免证据编辑通道(Task 2)对齐。
...(options.evidence ? { evidence: options.evidence } : {}),
...(options.reason ? { reason: options.reason } : {}),
...(options.idempotencyKey ? { idempotency_key: options.idempotencyKey } : {}),
}),
);
@@ -17,8 +17,9 @@
-->
<script setup lang="ts">
import { computed, defineAsyncComponent, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
import type { Component } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { Bot, Check, ChevronDown, Crosshair, Download, MoreHorizontal, Plus, RefreshCw, Undo2, Copy, Trash2 } from 'lucide-vue-next';
import { Bot, Check, ChevronDown, Crosshair, Download, MoreHorizontal, Pencil, Plus, RefreshCw, Undo2, Copy, Trash2, X } from 'lucide-vue-next';
import { useI18n } from 'vue-i18n';
import { BusinessError } from '@/shared/api/client';
import { useMessage } from '@/shared/composables/useMessage';
@@ -37,6 +38,7 @@ import {
retryWorkspaceShippingOrderStpAutoCreate,
retryShippingNoticeIntake,
decideWorkspaceShippingOrderReviewLineFulfillment,
updateWorkspaceShippingNoticeLine,
waveWorkspaceShippingOrderReviewLineFulfillment,
setWorkspaceShippingTaskOdmChoice,
viewWorkspaceShippingOrderReviewHighlightDiagnostic,
@@ -1930,7 +1932,8 @@ async function handleCurrentTaskAction(
break;
case 'open_inventory_match_review':
if (hasFormalOt.value) {
scrollWorkbenchAnchor('review-order-lines-table');
// 正式 OT 后匹配/缺口语境的真实宿主是通知准备工作区;订单明细表不承载库存结果。
scrollWorkbenchAnchor('review-fulfillment-prep-workspace');
} else {
workbenchMode.value = 'inventory';
scrollWorkbenchAnchor('review-inventory-issue-list');
@@ -2603,9 +2606,8 @@ function formalPreparationLineSource(line: {
/** 锁定边界 = Excel 生成(D7):后端 preparation.source_locked 下发,生成后行源只读。 */
const formalPreparationSourceLocked = computed(() => Boolean(formalPreparationContext.value?.source_locked));
/** 多文件冲突行的行内选源暂存(line_no → 选定 source_code),提交后由后端映射快照行并重匹配。 */
const lineSourceSelections = ref<Record<string, string>>({});
const lineSourceBusy = ref(false);
/** 库存源选择不再有独立确认流:行进入就地编辑态后在下拉中改选,随行级「保存」统一提交
* (override_line_inventory_source Gate 动作,见 saveInlineEdit);展示态回退为文本。 */
/** 选源下拉项文案:源编码始终可见(等宽语义由样式层保证)。 */
function lineSourceOptionLabel(code: string): string {
@@ -2613,58 +2615,14 @@ function lineSourceOptionLabel(code: string): string {
return String(code || '').trim().toUpperCase();
}
/**
* 提交歧义行选定源:走正式 Gate 动作 override_line_inventory_source(方案 3·放开,唯一选源入口),
* 后端校验启用/Excel 锁并仅重匹配该行;成功后清空行内暂存并刷新任务详情。
*/
async function submitLineSourceSelection(line: { snapshot_line_id?: number | null; line_no?: string | number | null }) {
const selectionKey = String(line.snapshot_line_id ?? '');
const sourceCode = String(lineSourceSelections.value[selectionKey] || '').trim();
const lineNo = Number(line.line_no);
if (!sourceCode || !Number.isInteger(lineNo) || lineNo < 1 || lineSourceBusy.value) return;
lineSourceBusy.value = true;
try {
await submitFormalGateAction('override_line_inventory_source', {
line_no: lineNo,
source_code: sourceCode,
});
delete lineSourceSelections.value[selectionKey];
} finally {
lineSourceBusy.value = false;
}
}
/** 人工覆写库存源(方案 3·放开):后端下发全部已启用源 source_options,供行级下拉人工指定。 */
const formSourceOptions = computed(() => formalPreparationContext.value?.source_options || []);
const overrideSourceSelections = ref<Record<string, string>>({});
const overrideSourceBusy = ref(false);
function overrideSourceOptionLabel(code: string): string {
// 兜底:下拉只展示源编码(如 DSV360_AWSSG),不展示冗长 display_name,便于快速识别。
return String(code || '').trim().toUpperCase();
}
/**
* 提交人工覆写行库存源:走正式 Gate 动作 override_line_inventory_source(方案 3·放开),
* 后端校验源启用/Excel 锁并仅重匹配该行;成功后清空暂存并刷新任务详情。
*/
async function submitOverrideSource(line: { snapshot_line_id?: number | null; line_no?: string | number | null }) {
const selectionKey = String(line.snapshot_line_id ?? '');
const sourceCode = String(overrideSourceSelections.value[selectionKey] || '').trim();
const lineNo = Number(line.line_no);
if (!sourceCode || !Number.isInteger(lineNo) || lineNo < 1 || overrideSourceBusy.value) return;
overrideSourceBusy.value = true;
try {
await submitFormalGateAction('override_line_inventory_source', {
line_no: lineNo,
source_code: sourceCode,
});
delete overrideSourceSelections.value[selectionKey];
} finally {
overrideSourceBusy.value = false;
}
}
/** 整单 ODM 裁决列可见性:任一行候选多于一个时展示(候选已经客户范围过滤)。 */
const formalPreparationOdmColumnVisible = computed(() =>
(formalPreparationContext.value?.lines || []).some((line) => (line.odm_values?.length || 0) > 1),
@@ -2761,7 +2719,7 @@ async function confirmReleaseInventoryShortage() {
const caseNo = activeCase.value?.case_no;
const reason = releaseInventoryReason.value.trim();
const requiredFields = line?.release_required_fields || [];
if (!line || !caseNo || !reason || requiredFields.some((field) => !releaseInventoryFieldValues.value[field.field_id]?.trim()) || releaseInventoryBusy.value) return;
if (!line || !caseNo || requiredFields.some((field) => !releaseInventoryFieldValues.value[field.field_id]?.trim()) || releaseInventoryBusy.value) return;
releaseInventoryBusy.value = true;
try {
await decideWorkspaceShippingOrderReviewLineFulfillment(caseNo, {
@@ -2788,6 +2746,160 @@ function formalPreparationLineInventoryFileNo(line: { snapshot_line_id?: number
return String(line.inventory_file_no || fulfillment?.inventory_file_no || '').trim();
}
/** 行内放行补录条(常显子行):短缺行携带必填放行字段时直接在行下补填,替代弹窗。 */
const releaseBarValues = ref<Record<string, Record<string, string>>>({});
const releaseBarBusy = ref<Record<string, boolean>>({});
function releaseBarKey(line: { snapshot_line_id?: number | null }): string {
return String(line.snapshot_line_id ?? '');
}
/** 放行必填字段:仅短缺行且投影声明了必填补录项(有候选缺失才需要补录)。 */
function releaseBarLineRequiredFields(line: { snapshot_line_id?: number | null }) {
const fulfillment = formalPreparationLineFulfillment(line);
return fulfillment?.release_required_fields || [];
}
/** 缺字段型短缺行:放行走行内补录(而非仅原因的旧弹窗路径)。 */
function releaseBarHasFields(line: {
snapshot_line_id?: number | null;
shortage_qty?: string | number | null;
}): boolean {
return Number(line.shortage_qty || 0) > 0 && releaseBarLineRequiredFields(line).length > 0;
}
/** 补录条展开态:默认收起(表格保持干净),由 ⋯ 菜单「放行缺口」或缺 N 项徽标点击展开。 */
const releaseBarExpandedFor = ref<string | null>(null);
function expandReleaseBar(line: { snapshot_line_id?: number | null }) {
if (inlineEditBusy.value) {
msg.warning(t('chat.shippingOrderReview.inlineEdit.busy'));
return;
}
releaseBarExpandedFor.value = releaseBarKey(line);
}
function releaseBarValue(
line: { snapshot_line_id?: number | null },
field: { field_id?: string | null },
): string {
return releaseBarValues.value[releaseBarKey(line)]?.[String(field.field_id)] ?? '';
}
function updateReleaseBarValue(
line: { snapshot_line_id?: number | null },
field: { field_id?: string | null },
value: string,
) {
const key = releaseBarKey(line);
releaseBarValues.value = {
...releaseBarValues.value,
[key]: { ...(releaseBarValues.value[key] || {}), [String(field.field_id)]: value },
};
}
/** 放行按钮可用性:后端授权 + 必填补录项全部已填 + 非保存中。 */
function releaseBarReadyFor(line: { snapshot_line_id?: number | null }): boolean {
const fulfillment = formalPreparationLineFulfillment(line);
const required = releaseBarLineRequiredFields(line);
return Boolean(
fulfillment?.line_allowed_actions?.includes('release_inventory_shortage')
&& required.every((field) => releaseBarValue(line, field).trim())
&& !releaseBarBusy.value[releaseBarKey(line)],
);
}
/** 行内放行提交:走既有 decide 通道;原因可选(人工放行事实由审计链记录)。 */
async function confirmReleaseBar(line: { snapshot_line_id?: number | null }) {
const caseNo = activeCase.value?.case_no;
const fulfillment = formalPreparationLineFulfillment(line);
const key = releaseBarKey(line);
const required = releaseBarLineRequiredFields(line);
if (
!caseNo || !fulfillment?.draft_line_id
|| !required.every((field) => releaseBarValue(line, field).trim())
|| releaseBarBusy.value[key]
) return;
releaseBarBusy.value = { ...releaseBarBusy.value, [key]: true };
try {
await decideWorkspaceShippingOrderReviewLineFulfillment(caseNo, {
draft_line_id: String(fulfillment.draft_line_id || ''),
decision_code: 'release_inventory_shortage',
reason: '',
release_field_values: { ...(releaseBarValues.value[key] || {}) },
expected_draft_version: activeCase.value?.draft?.draft_version,
});
const next = { ...releaseBarValues.value };
delete next[key];
releaseBarValues.value = next;
// 放行写入成功即结束用户交互;Notice/Excel 由后端 Job 异步创建(与原弹窗通道一致)。
handleGateRecoveryAccepted({ releaseAutoAdvance: true });
} catch (error) {
msg.warning(error instanceof Error ? error.message : t('chat.shippingOrderReview.workbench.resultNotReady'));
} finally {
releaseBarBusy.value = { ...releaseBarBusy.value, [key]: false };
}
}
/** 行结案弹窗状态;与放行缺口弹窗同款交互(原因必填),走 line-fulfillment decide 通道。 */
const closeLineDialogLine = ref<ShippingOrderReviewLineFulfillmentLine | null>(null);
const closeLineReason = ref('');
const closeLineBusy = ref(false);
/**
* 结案按钮可见性:仅「无货可发」的未终态 prep 行开放。
* 核心逻辑:line_allowed_actions 由后端投影下发(终态行返回空数组,天然排除已结案/
* 已放行/已入波次行),前端再叠加短缺信号(is_shortage / 缺量>0 / not_found)过滤;
* 后端 decide API 才是权威闸门,这里只做入口收敛。
*/
function formalPreparationLineCloseVisible(line: { snapshot_line_id?: number | null; shortage_qty?: string | number | null }): boolean {
if (!formalPreparationLineAllows(line, 'close_unfulfillable')) return false;
const fulfillment = formalPreparationLineFulfillment(line);
if (fulfillment?.decision?.decision_code === 'close_unfulfillable') return false;
const notFound = String(fulfillment?.match_result || '').trim().toLowerCase() === 'not_found';
const shortageQty = Number(line.shortage_qty ?? fulfillment?.shortage_qty ?? 0) > 0;
return Boolean(fulfillment?.is_shortage) || shortageQty || notFound;
}
/**
* 打开行结案弹窗:按快照行身份定位履约投影行(携带 draft_line_id)。
* 核心逻辑:与行内编辑互斥——弹窗打开即取消该行编辑态,避免两套写路径叠加。
*/
function openCloseLineDialog(line: { snapshot_line_id?: number | null }) {
const fulfillment = formalPreparationLineFulfillment(line);
if (!fulfillment) return;
cancelInlineEdit();
closeLineDialogLine.value = fulfillment;
closeLineReason.value = '';
}
/**
* 提交行结案决定(decision_code='close_unfulfillable',原因必填)。
* 核心逻辑:复用既有 line-fulfillment decide API;成功后走恢复协调刷新三投影,
* prep 表即时反映已结案状态(后端拒绝无效流转时以 BusinessError 文案提示)。
*/
async function confirmCloseLine() {
const line = closeLineDialogLine.value;
const caseNo = activeCase.value?.case_no;
const reason = closeLineReason.value.trim();
if (!line || !caseNo || !reason || closeLineBusy.value) return;
closeLineBusy.value = true;
try {
await decideWorkspaceShippingOrderReviewLineFulfillment(caseNo, {
draft_line_id: String(line.draft_line_id || ''),
decision_code: 'close_unfulfillable',
reason,
expected_draft_version: activeCase.value?.draft?.draft_version,
});
closeLineDialogLine.value = null;
handleGateRecoveryAccepted();
} catch (error) {
msg.warning(error instanceof Error ? error.message : t('chat.shippingOrderReview.workbench.resultNotReady'));
} finally {
closeLineBusy.value = false;
}
}
/** 下载行级实际匹配快照,禁止退回到任务级 active link。 */
async function downloadFormalPreparationLineInventoryFile(line: {
snapshot_line_id?: number | null;
@@ -2812,6 +2924,257 @@ async function retryFormalPreparationLine(
await submitFormalGateAction(actionCode, { snapshot_line_id: Number(snapshotLineId) });
}
/**
* 库存 RPA 是否运行中(就地编辑的 busy 禁用条件)。
* 核心逻辑:后端 preparation 摘要当前未下发 inventory_rpa_is_running(仅内部计算),
* 故先消费可选下发字段(后端补发即生效),缺失时以 status==='processing'
* (尚无匹配结果且无门禁 → 首轮抓取进行中)兜底;重匹配期间的写冲突由
* 后端 SHIPPING.EDIT_WINDOW_SYSTEM_BUSY 守卫兜底。
*/
const inlineEditBusy = computed(() => {
const preparation = formalTaskDetail.value?.ui_state?.stage_context?.preparation;
if (!preparation) return false;
const running = (preparation as { inventory_rpa_is_running?: unknown }).inventory_rpa_is_running;
if (typeof running === 'boolean') return running;
return preparation.status === 'processing';
});
/** 就地编辑状态:仅一行处于编辑态;保存走既有 update-notice-line 通道(免证据人工修订)。
* 编辑入口 = 行级「编辑」按钮(防单元格误触);编辑态下更多操作列替换为保存/取消。 */
const editingLine = ref<{
snapshot_line_id: number;
line_no: number;
part_number: string;
reservation_id: string;
required_qty: string;
source_code: string;
} | null>(null);
const inlineEditSaving = ref(false);
/**
* 就地编辑草稿种子值:把展示占位「—」还原为空串,避免占位符被当作真实值提交。
* @param value - prep 行展示值(可能为 null / '—' / 数字)
* @returns 可直接进入输入框的字符串
*/
function inlineEditSeedValue(value: unknown): string {
const text = String(value ?? '').trim();
return text === '—' ? '' : text;
}
/**
* 进入单个准备行的就地编辑(料号 / 预约号 / 需求数量三个值列)。
* @param line - prep 展示行;snapshot_line_id 定位编辑行,line_no-1 与后端 line_index 0 基对齐
*/
function startInlineEdit(line: {
snapshot_line_id?: number | null;
line_no?: string | number | null;
part_number?: string | null;
reservation_id?: string | null;
required_qty?: string | number | null;
selected_source_code?: string | null;
source_code?: string | null;
}) {
if (!line.snapshot_line_id || inlineEditSaving.value) return;
// 库存 RPA 运行中禁止改值:匹配进行中修改会与重匹配竞态。
if (inlineEditBusy.value) {
msg.warning(t('chat.shippingOrderReview.inlineEdit.busy'));
return;
}
editingLine.value = {
snapshot_line_id: Number(line.snapshot_line_id),
line_no: Number(line.line_no || 0),
part_number: inlineEditSeedValue(line.part_number),
reservation_id: inlineEditSeedValue(line.reservation_id),
required_qty: inlineEditSeedValue(line.required_qty),
source_code: inlineEditSeedValue(line.selected_source_code || line.source_code),
};
}
/** 行是否处于就地编辑态(统一 Number 收敛,避免模板严格等于的类型漂移)。 */
function isInlineEditing(line: { snapshot_line_id?: number | null }): boolean {
return editingLine.value?.snapshot_line_id === Number(line.snapshot_line_id);
}
/**
* 编辑态库存源下拉选项:多文件冲突行优先取候选源,其余行取全部已启用源;
* 无可用项返回空——此时编辑态库存源保持文本展示(无可选即不可改)。
*/
function inlineSourceOptions(line: {
source_ambiguous?: boolean;
source_candidates?: Array<string>;
}): Array<{ value: string; label: string }> {
if (line.source_ambiguous && (line.source_candidates?.length || 0) > 0) {
return (line.source_candidates || []).map((code) => ({ value: String(code), label: lineSourceOptionLabel(String(code)) }));
}
if (formSourceOptions.value.length) {
return formSourceOptions.value.map((s) => ({ value: String(s.source_code), label: overrideSourceOptionLabel(String(s.source_code)) }));
}
return [];
}
/** 同步编辑态库存源草稿(与三个值列一致:改动仅在保存时提交)。 */
function updateInlineEditSource(value: string) {
if (editingLine.value) editingLine.value.source_code = value;
}
/** 行级动作收纳菜单(⋯)打开状态:键 = snapshot_line_id,单行互斥;坐标视口固定定位,
* Teleport 到 body——表格祖先容器 overflow-auto 会裁剪 absolute 浮层并转为滚动高度。 */
const overflowMenuOpenFor = ref<string | null>(null);
const overflowMenuPos = ref<{ top: number; left: number }>({ top: 0, left: 0 });
function toggleOverflowMenu(key: string, event?: MouseEvent) {
if (overflowMenuOpenFor.value === key) {
overflowMenuOpenFor.value = null;
return;
}
const rect = (event?.currentTarget as HTMLElement | undefined)?.getBoundingClientRect();
const menuWidth = 176;
overflowMenuPos.value = {
top: rect ? Math.min(rect.bottom + 4, window.innerHeight - 8) : 0,
left: rect ? Math.max(8, Math.min(rect.right - menuWidth, window.innerWidth - menuWidth - 8)) : 0,
};
overflowMenuOpenFor.value = key;
}
/**
* 行级收纳菜单项:低频/诊断类动作入口(守卫条件与原常显按钮完全一致),
* 高频的「编辑」保持常显;无可用项时 ⋯ 整体不渲染。
*/
function overflowItems(line: {
snapshot_line_id?: number | null;
shortage_qty?: string | number | null;
}): Array<{ key: string; icon: Component; labelKey: string; run: () => void | Promise<void> }> {
const items: Array<{ key: string; icon: Component; labelKey: string; run: () => void | Promise<void> }> = [];
if (formalPreparationLineAllows(line, 'retry_inventory_matching')) {
items.push({
key: 'retry_inventory_matching',
icon: RefreshCw,
labelKey: inventoryActionLabelKey('retry_inventory_matching')!,
run: () => retryFormalPreparationLine(Number(line.snapshot_line_id), 'retry_inventory_matching'),
});
}
// 放行缺口:缺字段型短缺行 → 行内展开补录条(替代弹窗);仅缺原因的行 → 旧弹窗(原因已可选)。
if (formalPreparationLineAllows(line, 'release_inventory_shortage')) {
items.push({
key: 'release_inventory_shortage',
icon: Check,
labelKey: inventoryActionLabelKey('release_inventory_shortage')!,
run: () => {
if (releaseBarHasFields(line)) expandReleaseBar(line);
else openReleaseInventoryShortage(line);
},
});
}
if (formalPreparationLineCloseVisible(line)) {
items.push({
key: 'close_unfulfillable',
icon: X,
labelKey: 'chat.shippingOrderReview.lineActions.closeLine',
run: () => openCloseLineDialog(line),
});
}
if (formalPreparationLineAllows(line, 'retry_inventory_preparation')) {
items.push({
key: 'retry_inventory_preparation',
icon: Bot,
labelKey: inventoryActionLabelKey('retry_inventory_preparation')!,
run: () => retryFormalPreparationLine(Number(line.snapshot_line_id), 'retry_inventory_preparation'),
});
}
if (formalPreparationLineInventoryFileNo(line)) {
items.push({
key: 'download_inventory_file',
icon: Download,
labelKey: inventoryActionLabelKey('download_inventory_file') || 'chat.shippingOrderReview.lifecycle.prepare.downloadInventory',
run: () => downloadFormalPreparationLineInventoryFile(line),
});
}
return items;
}
/** 同步需求数量输入:数字输入框经 @input 手动回写,避免 v-model 的隐式 number 转型。 */
function updateInlineEditQty(value: string) {
if (editingLine.value) editingLine.value.required_qty = value;
}
/** 退出就地编辑并丢弃未保存修改。 */
function cancelInlineEdit() {
editingLine.value = null;
}
/**
* 保存就地编辑:仅提交有变化且非空的字段(part_number / reservation_id / qty),
* 成功后提示「请点击重新匹配库存」并刷新任务详情(值列即刻显示新值,重匹配仍需手动触发)。
* @param line - 当前编辑行,用于与编辑起始值比对计算差量补丁
*/
async function saveInlineEdit(line: {
snapshot_line_id?: number | null;
part_number?: string | null;
reservation_id?: string | null;
required_qty?: string | number | null;
selected_source_code?: string | null;
source_code?: string | null;
}) {
const draft = editingLine.value;
if (!draft || !draft.snapshot_line_id || inlineEditSaving.value) return;
// 编辑态行与触发行的快照身份不一致(如刷新后错位)时直接丢弃,禁止错行提交。
if (draft.snapshot_line_id !== Number(line.snapshot_line_id)) {
cancelInlineEdit();
return;
}
const taskNo = String(formalTaskDetail.value?.task_no || '').trim();
const lineIndex = Number(draft.line_no) - 1;
if (!taskNo || !Number.isInteger(lineIndex) || lineIndex < 0) {
cancelInlineEdit();
return;
}
const patch: Record<string, string> = {};
const nextPartNumber = draft.part_number.trim();
if (nextPartNumber !== inlineEditSeedValue(line.part_number)) patch.part_number = nextPartNumber;
const nextReservationId = draft.reservation_id.trim();
if (nextReservationId !== inlineEditSeedValue(line.reservation_id)) patch.reservation_id = nextReservationId;
const nextQty = draft.required_qty.trim();
if (nextQty !== inlineEditSeedValue(line.required_qty) && nextQty) patch.qty = nextQty;
// 库存源草稿与进入编辑时的种子值比对:变化即随保存提交行级源覆写。
const seedSourceCode = inlineEditSeedValue(line.selected_source_code || line.source_code);
const nextSourceCode = draft.source_code.trim();
const sourceChanged = Boolean(nextSourceCode) && nextSourceCode !== seedSourceCode;
if (!Object.keys(patch).length && !sourceChanged) {
cancelInlineEdit();
return;
}
inlineEditSaving.value = true;
try {
// 字段值先落库(update-notice-line);随后的源覆写会触发单行重匹配,读到的是修正后的字段值。
if (Object.keys(patch).length) {
await updateWorkspaceShippingNoticeLine(
taskNo,
lineIndex,
patch,
undefined,
// 免证据人工修订(后端 Task 2 已放宽 evidence/reason);乐观锁版本缺失时
// 退回后端初值 1,冲突由后端 ORDER_DATA_VERSION_MISMATCH 的 409 语义兜底。
{ expectedOrderDataVersion: Number(formalTaskDetail.value?.order_data_version ?? 1) },
);
}
// 库存源覆写沿用既有 Gate 动作(override_line_inventory_source),后端校验后仅重匹配该行。
if (sourceChanged) {
await submitFormalGateAction('override_line_inventory_source', {
line_no: draft.line_no,
source_code: nextSourceCode,
});
}
cancelInlineEdit();
msg.success(t('chat.shippingOrderReview.inlineEdit.saved'));
await loadFormalTaskDetail();
} catch (error) {
// BusinessError.message 即后端业务文案(版本冲突 / 系统处理中),复用既有提示通道。
msg.warning(error instanceof Error ? error.message : t('chat.shippingOrderReview.workbench.resultNotReady'));
} finally {
inlineEditSaving.value = false;
}
}
/**
* 人工上传登记是后端 Gate 的受控写动作;仅进入「货代上传」工作面不构成授权。
* [§2 单源] 授权从 A(shippingProcessingProjection.ui_state)读 —— §2.5 差异① 已归一,A 的
@@ -4104,13 +4467,10 @@ const closeAuxiliaryPanelsForCaseSwitch = () => {
llmSuggestionOpen: false,
versionHistoryOpen: false,
};
// [NO-OPTIMISTIC MEMORY] 行级选源/覆写是「点保存才生效」的实提交,未保存的暂存选择
// 不得跨文件/切换残留(否则会把上一文件的未保存意图带进新行)。切换即清空暂存,
// 行回到后端 selected_source_code / source_code,用户须重新选择并点保存。
lineSourceSelections.value = {};
lineSourceBusy.value = false;
overrideSourceSelections.value = {};
overrideSourceBusy.value = false;
// [NO-OPTIMISTIC MEMORY] 行级就地编辑是「点保存才生效」的实提交,未保存的编辑草稿
// 不得跨文件/切换残留(否则会把上一文件的未保存意图带进新行)。切换即丢弃草稿,
// 行回到后端 selected_source_code / source_code,用户须重新进入编辑并保存。
cancelInlineEdit();
};
/**
@@ -4949,7 +5309,7 @@ watch(
<div class="overflow-x-auto overscroll-x-contain" data-testid="review-fulfillment-prep-table-scroll">
<table class="review-fulfillment-prep-table min-w-[1060px] text-xs">
<thead class="border-b border-default bg-surface-muted/50 text-left"><tr><th v-if="preparationEditable" class="w-10 px-3 py-2"><input type="checkbox" class="rounded border-default" :checked="allPreparationWaveSelected" :disabled="!preparationWaveSelectableLines.length || preparationWaveBusy" :aria-label="t('chat.shippingOrderReview.fulfillmentDecision.selectReady')" @change="toggleAllPreparationLineSelection(($event.target as HTMLInputElement).checked)"></th><th v-if="preparationCustomerPoLineVisible" class="whitespace-nowrap px-3 py-2">{{ preparationCustomerPoLineLabel() }}</th><th class="whitespace-nowrap px-3 py-2">{{ t('chat.shippingOrderReview.workbench.resultReservation') }}</th><th class="px-3 py-2">{{ t('chat.shippingOrderReview.workbench.resultPartNumber') }}</th><th class="whitespace-nowrap px-3 py-2">{{ t('chat.shippingOrderReview.lifecycle.prepare.requiredQty') }}</th><th class="px-3 py-2">{{ t('chat.shippingOrderReview.lifecycle.prepare.inventorySource') }}</th><th v-if="formalPreparationOdmColumnVisible" class="whitespace-nowrap px-3 py-2">{{ t('chat.shippingOrderReview.odmConflict.column') }}</th><th class="whitespace-nowrap px-3 py-2">{{ t('chat.shippingOrderReview.fulfillmentDecision.availableQty') }}</th><th class="whitespace-nowrap px-3 py-2">{{ t('chat.shippingOrderReview.fulfillmentDecision.shortage') }}</th><th class="whitespace-nowrap px-3 py-2">{{ t('chat.shippingOrderReview.lifecycle.prepare.lineStatus') }}</th><th class="review-fulfillment-sticky-action-head whitespace-nowrap px-3 py-2">{{ t('chat.shippingOrderReview.lineOps.moreActions') }}</th></tr></thead>
<tbody><tr v-for="(line, lineIndex) in formalPreparationDisplayLines" :key="line.snapshot_line_id || `${line.reservation_id}-${line.part_number}`" :class="Number(line.shortage_qty || 0) > 0 ? 'border-b border-amber-100 bg-amber-50/40 last:border-0 dark:border-amber-950 dark:bg-amber-950/10' : 'border-b border-default last:border-0'"><td v-if="preparationEditable" class="w-10 px-3 py-2"><input type="checkbox" class="rounded border-default" :checked="selectedPreparationSnapshotLineIds.includes(String(line.snapshot_line_id))" :disabled="preparationWaveBusy || !preparationWaveSelectableLines.some((item) => String(item.snapshot_line_id) === String(line.snapshot_line_id))" :aria-label="`${t('chat.shippingOrderReview.fulfillmentDecision.selectReady')}: ${preparationLineCustomerPoLine(line)}`" :data-testid="`review-fulfillment-line-select-${line.snapshot_line_id || lineIndex}`" @change="togglePreparationLineSelection(String(line.snapshot_line_id || lineIndex), ($event.target as HTMLInputElement).checked)"></td><td v-if="preparationCustomerPoLineVisible" class="whitespace-nowrap px-3 py-2">{{ preparationLineCustomerPoLine(line) }}</td><td class="whitespace-nowrap px-3 py-2 font-medium text-primary">{{ line.reservation_id || '—' }}</td><td class="max-w-[220px] truncate px-3 py-2" :title="line.part_number || '—'">{{ line.part_number || '—' }}</td><td class="whitespace-nowrap px-3 py-2">{{ line.required_qty ?? '—' }}</td><td class="max-w-[220px] px-3 py-2"><div v-if="line.source_ambiguous && !formalPreparationSourceLocked" class="flex items-center gap-1" :data-testid="`review-line-source-ambiguous-${line.snapshot_line_id || lineIndex}`" :title="t('chat.shippingOrderReview.lifecycle.prepare.sourceAmbiguous')"><select class="min-w-0 flex-1 rounded border border-default bg-surface px-1.5 py-1 text-xs" :data-testid="`review-line-source-select-${line.snapshot_line_id || lineIndex}`" :aria-label="t('chat.shippingOrderReview.lifecycle.prepare.selectSource')" :value="lineSourceSelections[String(line.snapshot_line_id || lineIndex)] || line.source_code || ''" @change="lineSourceSelections[String(line.snapshot_line_id || lineIndex)] = ($event.target as HTMLSelectElement).value"><option value="" disabled>{{ t('chat.shippingOrderReview.lifecycle.prepare.selectSource') }}</option><option v-for="code in line.source_candidates || []" :key="code" :value="code">{{ lineSourceOptionLabel(code) }}</option></select><button type="button" class="rounded bg-brand-600 px-2 py-1 text-xs font-medium text-white disabled:opacity-50" :data-testid="`review-line-source-confirm-${line.snapshot_line_id || lineIndex}`" :disabled="!lineSourceSelections[String(line.snapshot_line_id || lineIndex)] || lineSourceBusy || !preparationEditable" :aria-label="t('chat.shippingOrderReview.lifecycle.prepare.selectSource')" @click="submitLineSourceSelection(line)"><Check class="h-3.5 w-3.5" /></button></div><span v-else-if="line.source_ambiguous && formalPreparationSourceLocked" class="text-xs text-secondary" :title="t('chat.shippingOrderReview.lifecycle.prepare.sourceLocked')">{{ t('chat.shippingOrderReview.lifecycle.prepare.sourceLocked') }}</span><span v-else-if="!formalPreparationSourceLocked && formSourceOptions.length" class="flex items-center gap-1" :data-testid="`review-line-source-override-${line.snapshot_line_id || lineIndex}`" :title="t('chat.shippingOrderReview.lifecycle.prepare.selectSource')"><select class="min-w-0 flex-1 rounded border border-default bg-surface px-1.5 py-1 text-xs" :data-testid="`review-line-source-override-select-${line.snapshot_line_id || lineIndex}`" :aria-label="t('chat.shippingOrderReview.lifecycle.prepare.selectSource')" :value="overrideSourceSelections[String(line.snapshot_line_id || lineIndex)] || line.selected_source_code || line.source_code || ''" @change="overrideSourceSelections[String(line.snapshot_line_id || lineIndex)] = ($event.target as HTMLSelectElement).value"><option value="" disabled>{{ t('chat.shippingOrderReview.lifecycle.prepare.selectSource') }}</option><option v-for="s in formSourceOptions" :key="String(s.source_code)" :value="String(s.source_code)">{{ overrideSourceOptionLabel(String(s.source_code)) }}</option></select><button type="button" class="rounded bg-brand-600 px-2 py-1 text-xs font-medium text-white disabled:opacity-50" :data-testid="`review-line-source-override-confirm-${line.snapshot_line_id || lineIndex}`" :disabled="!overrideSourceSelections[String(line.snapshot_line_id || lineIndex)] || overrideSourceBusy" :aria-label="t('chat.shippingOrderReview.lifecycle.prepare.selectSource')" :data-line-index="lineIndex" @click="submitOverrideSource(line)"><Check class="h-3.5 w-3.5" /></button></span><span v-else class="block max-w-[220px] truncate" :title="formalPreparationLineSource(line)">{{ formalPreparationLineSource(line) }}</span></td><td v-if="formalPreparationOdmColumnVisible" class="whitespace-nowrap px-3 py-2"><div v-if="(line.odm_values?.length || 0) > 1 && !formalLine truncated
<tbody><template v-for="(line, lineIndex) in formalPreparationDisplayLines" :key="line.snapshot_line_id || `${line.reservation_id}-${line.part_number}`"><tr :class="Number(line.shortage_qty || 0) > 0 ? 'border-b border-amber-100 bg-amber-50/40 last:border-0 dark:border-amber-950 dark:bg-amber-950/10' : 'border-b border-default last:border-0'"><td v-if="preparationEditable" class="w-10 px-3 py-2"><input type="checkbox" class="rounded border-default" :checked="selectedPreparationSnapshotLineIds.includes(String(line.snapshot_line_id))" :disabled="preparationWaveBusy || !preparationWaveSelectableLines.some((item) => String(item.snapshot_line_id) === String(line.snapshot_line_id))" :aria-label="`${t('chat.shippingOrderReview.fulfillmentDecision.selectReady')}: ${preparationLineCustomerPoLine(line)}`" :data-testid="`review-fulfillment-line-select-${line.snapshot_line_id || lineIndex}`" @change="togglePreparationLineSelection(String(line.snapshot_line_id || lineIndex), ($event.target as HTMLInputElement).checked)"></td><td v-if="preparationCustomerPoLineVisible" class="whitespace-nowrap px-3 py-2">{{ preparationLineCustomerPoLine(line) }}</td><td class="whitespace-nowrap px-3 py-2 font-medium text-primary"><template v-if="editingLine && isInlineEditing(line)"><input v-model="editingLine.reservation_id" type="text" class="w-28 rounded border border-default bg-surface px-1.5 py-1 text-xs" :disabled="inlineEditSaving" :aria-label="t('chat.shippingOrderReview.workbench.resultReservation')" :data-testid="`review-fulfillment-line-edit-reservation-${line.snapshot_line_id}`" @keyup.enter="saveInlineEdit(line)" @keyup.esc="cancelInlineEdit" /></template><span v-else>{{ line.reservation_id || '—' }}</span></td><td class="max-w-[220px] px-3 py-2"><template v-if="editingLine && isInlineEditing(line)"><input v-model="editingLine.part_number" type="text" class="w-full min-w-0 rounded border border-default bg-surface px-1.5 py-1 text-xs" :disabled="inlineEditSaving" :aria-label="t('chat.shippingOrderReview.workbench.resultPartNumber')" :data-testid="`review-fulfillment-line-edit-part-${line.snapshot_line_id}`" @keyup.enter="saveInlineEdit(line)" @keyup.esc="cancelInlineEdit" /></template><span v-else class="block max-w-[220px] truncate" :title="line.part_number || '—'">{{ line.part_number || '—' }}</span></td><td class="whitespace-nowrap px-3 py-2"><template v-if="editingLine && isInlineEditing(line)"><input :value="editingLine.required_qty" type="number" min="0" step="any" class="w-20 rounded border border-default bg-surface px-1.5 py-1 text-xs" :disabled="inlineEditSaving" :aria-label="t('chat.shippingOrderReview.lifecycle.prepare.requiredQty')" :data-testid="`review-fulfillment-line-edit-qty-${line.snapshot_line_id}`" @input="updateInlineEditQty(($event.target as HTMLInputElement).value)" @keyup.enter="saveInlineEdit(line)" @keyup.esc="cancelInlineEdit" /></template><span v-else>{{ line.required_qty ?? '—' }}</span></td><td class="max-w-[220px] px-3 py-2"><template v-if="isInlineEditing(line) && inlineSourceOptions(line).length"><select class="w-full min-w-0 rounded border border-default bg-surface px-1.5 py-1 text-xs" :data-testid="`review-fulfillment-line-edit-source-${line.snapshot_line_id}`" :aria-label="t('chat.shippingOrderReview.lifecycle.prepare.selectSource')" :value="editingLine?.source_code" :disabled="inlineEditSaving" @change="updateInlineEditSource(($event.target as HTMLSelectElement).value)"><option v-for="option in inlineSourceOptions(line)" :key="option.value" :value="option.value">{{ option.label }}</option></select></template><span v-else class="block max-w-[220px] truncate" :title="formalPreparationLineSource(line)">{{ formalPreparationLineSource(line) || '—' }}</span></td><td v-if="formalPreparationOdmColumnVisible" class="whitespace-nowrap px-3 py-2"><div v-if="(line.odm_values?.length || 0) > 1 && !formalPreparationSourceLocked" class="flex items-center gap-1" :data-testid="`review-line-odm-${line.snapshot_line_id || lineIndex}`"><select class="min-w-0 flex-1 rounded border border-default bg-surface px-1.5 py-1 text-xs" :data-testid="`review-line-odm-select-${line.snapshot_line_id || lineIndex}`" :aria-label="t('chat.shippingOrderReview.odmConflict.title')" :value="lineOdmSelections[String(line.snapshot_line_id || lineIndex)] || line.chosen_odm_id || ''" @change="lineOdmSelections[String(line.snapshot_line_id || lineIndex)] = ($event.target as HTMLSelectElement).value"><option value="" disabled>{{ t('chat.shippingOrderReview.odmConflict.placeholder') }}</option><option v-for="value in line.odm_values" :key="value" :value="value">{{ value }}</option></select><button type="button" class="rounded bg-brand-600 px-2 py-1 text-xs font-medium text-white disabled:opacity-50" :data-testid="`review-line-odm-confirm-${line.snapshot_line_id || lineIndex}`" :disabled="!lineOdmSelections[String(line.snapshot_line_id || lineIndex)] || lineOdmBusy" :aria-label="t('chat.shippingOrderReLine truncated
</table>
</div>
</div>
@@ -5728,7 +6088,31 @@ watch(
</label>
<div class="mt-4 flex justify-end gap-2">
<button type="button" class="rounded border border-default px-3 py-1.5 text-sm" :disabled="releaseInventoryBusy" @click="releaseInventoryLine = null">{{ t('chat.shippingOrderReview.workbench.close') }}</button>
<button type="button" class="rounded bg-amber-600 px-3 py-1.5 text-sm font-medium text-white disabled:opacity-50" :disabled="releaseInventoryBusy || !releaseInventoryReason.trim() || (releaseInventoryLine.release_required_fields || []).some((field) => !releaseInventoryFieldValues[field.field_id]?.trim())" @click="confirmReleaseInventoryShortage">{{ t('chat.shippingOrderReview.lifecycle.prepare.releaseConfirm') }}</button>
<button type="button" class="rounded bg-amber-600 px-3 py-1.5 text-sm font-medium text-white disabled:opacity-50" :disabled="releaseInventoryBusy || (releaseInventoryLine.release_required_fields || []).some((field) => !releaseInventoryFieldValues[field.field_id]?.trim())" @click="confirmReleaseInventoryShortage">{{ t('chat.shippingOrderReview.lifecycle.prepare.releaseConfirm') }}</button>
</div>
</div>
</div>
<div
v-if="closeLineDialogLine"
class="fixed inset-0 z-50 flex items-center justify-center bg-slate-900/40 p-4"
data-testid="review-close-line-dialog"
@click.self="closeLineDialogLine = null"
>
<div class="w-full max-w-md rounded-xl border border-default bg-surface p-4 shadow-xl">
<h2 class="text-sm font-semibold">{{ t('chat.shippingOrderReview.lineActions.closeLine') }}</h2>
<p class="mt-1 text-xs text-muted">{{ t('chat.shippingOrderReview.closeFulfillment.subtitle') }}</p>
<textarea
v-model="closeLineReason"
rows="3"
class="mt-3 w-full rounded-md border border-default bg-surface px-2.5 py-2 text-sm"
data-testid="review-close-line-reason"
:placeholder="t('chat.shippingOrderReview.lineActions.closeLineReason')"
:disabled="closeLineBusy"
/>
<div class="mt-4 flex justify-end gap-2">
<button type="button" class="rounded border border-default px-3 py-1.5 text-sm" :disabled="closeLineBusy" @click="closeLineDialogLine = null">{{ t('chat.shippingOrderReview.workbench.close') }}</button>
<button type="button" class="rounded bg-rose-600 px-3 py-1.5 text-sm font-medium text-white disabled:opacity-50" data-testid="review-close-line-submit" :disabled="closeLineBusy || !closeLineReason.trim()" @click="confirmCloseLine">{{ t('chat.shippingOrderReview.lineActions.closeLineConfirm') }}</button>
</div>
</div>
</div>
+9 -17
View File
@@ -629,14 +629,11 @@
"orderSchemaRequired": "Publish an Order Fields version first; inventory parsing profiles, shipping Excel templates, and routing rules can then reference order fields.",
"connections": "System Connections",
"receiptReportConfig": "Receipt Report Configuration",
"receiptReportConfigHint": "Separate from inventory report paths and inventory query parameters. DBS exports each Warehouse below separately; report date is never filtered.",
"receiptReportEnabled": "Enable receipt export",
"receiptWarehouses": "Receipt Warehouse list",
"receiptWarehousesHint": "Separate multiple Warehouses with commas",
"receiptOptionalParameters": "Optional query parameters (excluding report date)",
"receiptReportConfigHint": "Same structure as inventory configuration: report path + query parameters. Each warehouse in the Warehouse condition exports one receipt file per schedule; report date is never filtered. Receipt has no separate switch and follows the site's unified enablement.",
"receiptQueryParametersHint": "Same as inventory query parameters. Warehouse supports multiple values (comma-separated); each Warehouse exports one receipt file. Report date filtering is never allowed.",
"receiptCraneFixedPath": "Crane receipt export is fixed to Inbound Details and is not split by Warehouse. No query conditions are maintained; execution directly runs the page defaults.",
"saveReceiptReportConfig": "Save receipt configuration",
"receiptReportSaved": "Receipt report configuration saved",
"pathSectionConfigured": "Configured",
"pathSectionNotConfigured": "Not configured",
"parsingProfiles": "Inventory Parsing",
"parsingProfilesHelp": "Maintain inventory file structures, field mappings, and order-field match keys shared by inventory sites.",
"inventoryMapping": "Inventory Parsing",
@@ -896,12 +893,11 @@
"parsingBindingOperationBulk": "Bulk binding",
"parsingBindingVersion": "Configuration version {before} to {after}",
"sourceSavedDisabledHint": "The site remains disabled after its first save. Complete the test export, inventory parsing, and shipping template before activation.",
"activationStatus": "Production Readiness",
"readinessProgress": "{passed} of {total} complete",
"activationRequiredTitle": "Next step",
"activationRequiredHint": "Complete the current item and the system will continue deciding whether the site can be enabled automatically.",
"readinessBlockedBy": "One step left before enablement: {requirement}",
"readinessAutoEnableHint": "After completion the system will evaluate and enable the site automatically.",
"readinessLastVerified": "Last verified {time}",
"readinessOptionalPending": "{count} item(s) pending for later",
"activationOptionalTitle": "Prepare later (does not block enablement)",
"activationOptionalHint": "Complete when inventory exists or before an actual transfer.",
"readinessState": {
"passed": "Complete",
"required": "Action required",
@@ -918,12 +914,8 @@
"configure_warehouse_mapping": "Configure warehouse mapping"
},
"saveBeforeReadinessAction": "Save the current inventory-site changes before taking this action.",
"activationReady": "The inventory site is enabled and can run in production.",
"activationDraft": "The inventory site is disabled. Complete the following items before activation.",
"activationReady": "Site enabled. Inventory and receipt runs follow the site switch.",
"activationCanEnable": "All enablement conditions pass. You can enable this inventory site.",
"activationEnabledHint": "This site participates in production inventory runs.",
"activationCanEnableHint": "Click Enable Inventory Site to start production runs, or run another successful test export to auto-enable.",
"activationMissingHint": "Complete only the unfinished required items. Later preparation does not block enablement.",
"activationRequirement": {
"rpa_profile": "System connection is available",
"parsing_profile": "Inventory file parsing profile",
+17
View File
@@ -2219,6 +2219,12 @@
"hint": "Other lines on the same snapshot file use this ODM ID too; Excel generation retries automatically",
"column": "ODM ID"
},
"inlineEdit": {
"saved": "Saved. Click \"Re-match inventory\" to apply",
"busy": "System is busy. Please try again later",
"save": "Save",
"cancel": "Cancel"
},
"fulfillmentDecision": {
"title": "Line fulfillment decisions",
"subtitle": "Select inventory-ready or manually released lines to create an independent shipping notice and Excel.",
@@ -2354,6 +2360,13 @@
"success": "Lines closed",
"failed": "Close failed. Try again."
},
"lineActions": {
"closeLine": "Close line (no shipment)",
"closeLineReason": "Enter a reason to close",
"closeLineConfirm": "Confirm close",
"editLine": "Edit",
"more": "More actions"
},
"auditTrail": {
"open": "Audit trail",
"title": "Operation audit",
@@ -2742,6 +2755,10 @@
"inventory_rpa_export_failed": "Inventory export failed",
"inventory_file_empty": "Inventory file empty"
}
},
"releaseBar": {
"label": "Release info",
"badge": "{n} missing release field(s)"
}
},
"shippingOrderExtractionElapsed": "Elapsed {elapsed}",
+9 -17
View File
@@ -629,14 +629,11 @@
"orderSchemaRequired": "โปรดเผยแพร่เวอร์ชันฟิลด์คำสั่งซื้อก่อน เพื่อให้โปรไฟล์การแยกวิเคราะห์สต็อก เทมเพลต Excel สำหรับจัดส่ง และกฎการกำหนดเส้นทางอ้างอิงฟิลด์คำสั่งซื้อได้",
"connections": "การเชื่อมต่อระบบ",
"receiptReportConfig": "การตั้งค่ารายงานรับสินค้า",
"receiptReportConfigHint": "แยกจากเส้นทางรายงานสต็อกและเงื่อนไขค้นหาสต็อก DBS ส่งออกแยกตาม Warehouse ด้านล่าง และไม่กรองวันที่รายงาน",
"receiptReportEnabled": "เปิดใช้การส่งออกรับสินค้า",
"receiptWarehouses": "รายการ Warehouse รับสินค้า",
"receiptWarehousesHint": "คั่นหลาย Warehouse ด้วยเครื่องหมายจุลภาค",
"receiptOptionalParameters": "เงื่อนไขค้นหาเพิ่มเติม (ไม่รวมวันที่รายงาน)",
"receiptReportConfigHint": "โครงสร้างเหมือนการตั้งค่าสต็อก: เส้นทางรายงาน + เงื่อนไขค้นหา แต่ละ Warehouse ในเงื่อนไขจะส่งออกไฟล์รับสินค้าหนึ่งไฟล์ต่อรอบ และไม่กรองวันที่รายงาน การรับสินค้าไม่มีสวิตช์แยก และจะเปิดหรือปิดตามไซต์โดยรวม",
"receiptQueryParametersHint": "เหมือนเงื่อนไขค้นหาสต็อก Warehouse รองรับหลายค่า (คั่นด้วยเครื่องหมายจุลภาค) แต่ละ Warehouse จะส่งออกไฟล์รับสินค้าหนึ่งไฟล์ และห้ามกรองวันที่รายงาน",
"receiptCraneFixedPath": "การส่งออกรับสินค้าของ Crane ถูกกำหนดเป็น Inbound Details และไม่แยกตาม Warehouse ไม่มีการบำรุงรักษาเงื่อนไขค้นหา และระบบจะ Run Report ด้วยค่าเริ่มต้นของหน้าเว็บโดยตรง",
"saveReceiptReportConfig": "บันทึกการตั้งค่ารับสินค้า",
"receiptReportSaved": "บันทึกการตั้งค่ารายงานรับสินค้าแล้ว",
"pathSectionConfigured": "ตั้งค่าแล้ว",
"pathSectionNotConfigured": "ยังไม่ได้ตั้งค่า",
"parsingProfiles": "แผนการแยกวิเคราะห์ไฟล์สต็อก",
"parsingProfilesHelp": "จัดการโครงสร้างไฟล์สต็อก การจับคู่ฟิลด์ และคีย์จับคู่ฟิลด์คำสั่งซื้อที่ใช้ร่วมกันได้ระหว่างไซต์สต็อก",
"inventoryMapping": "แผนการแยกวิเคราะห์ไฟล์สต็อก",
@@ -896,12 +893,11 @@
"parsingBindingOperationBulk": "ผูกแบบกลุ่ม",
"parsingBindingVersion": "เวอร์ชันการตั้งค่า {before} → {after}",
"sourceSavedDisabledHint": "ไซต์จะยังปิดใช้งานหลังบันทึกครั้งแรก โปรดทำการส่งออกทดสอบ แผนการอ่าน และเทมเพลตการจัดส่งให้เสร็จก่อนเปิดใช้งาน",
"activationStatus": "การตรวจสอบก่อนใช้งานจริง",
"readinessProgress": "เสร็จแล้ว {passed} / {total}",
"activationRequiredTitle": "ขั้นตอนถัดไป",
"activationRequiredHint": "ทำรายการปัจจุบันให้เสร็จ แล้วระบบจะพิจารณาการเปิดใช้งานอัตโนมัติต่อไป",
"readinessBlockedBy": "เหลืออีกหนึ่งขั้นก่อนเปิดใช้งาน: {requirement}",
"readinessAutoEnableHint": "เมื่อเสร็จแล้วระบบจะประเมินและเปิดใช้งานไซต์ให้อัตโนมัติ",
"readinessLastVerified": "ตรวจสอบล่าสุด {time}",
"readinessOptionalPending": "เหลือ {count} รายการที่ทำภายหลัง",
"activationOptionalTitle": "การเตรียมภายหลัง (ไม่ขัดขวางการเปิดใช้งาน)",
"activationOptionalHint": "ดำเนินการเมื่อมีสต็อกหรือก่อนโอนย้ายจริง",
"readinessState": {
"passed": "เสร็จสมบูรณ์",
"required": "ต้องดำเนินการ",
@@ -918,12 +914,8 @@
"configure_warehouse_mapping": "ตั้งค่าการแมปคลังสินค้า"
},
"saveBeforeReadinessAction": "โปรดบันทึกการเปลี่ยนแปลงไซต์สต็อกปัจจุบันก่อนดำเนินการนี้",
"activationReady": "เปิดใช้งานไซต์สต็อกแล้วและพร้อมใช้งานจริง",
"activationDraft": "ไซต์สต็อกยังปิดใช้งาน โปรดทำรายการต่อไปนี้ให้เสร็จก่อนเปิดใช้งาน",
"activationReady": "ไซต์เปิดใช้งานแล้ว งานสต็อกและรับสินค้าจะเปิดหรือปิดตามสวิตช์ไซต์",
"activationCanEnable": "ผ่านทุกเงื่อนไขแล้ว สามารถเปิดใช้งานไซต์สต็อกนี้ได้",
"activationEnabledHint": "ไซต์นี้เข้าร่วมการทำงานสต็อกจริงแล้ว",
"activationCanEnableHint": "คลิกเปิดใช้งานไซต์สต็อกเพื่อเริ่มใช้งานจริง หรือทดสอบส่งออกอีกครั้ง ระบบจะเปิดใช้งานอัตโนมัติเมื่อผ่าน",
"activationMissingHint": "ทำเฉพาะเงื่อนไขการเปิดใช้งานที่ยังไม่ผ่าน การเตรียมภายหลังไม่ขัดขวางการเปิดใช้งาน",
"activationRequirement": {
"rpa_profile": "การเชื่อมต่อระบบพร้อมใช้งาน",
"parsing_profile": "แผนการแยกวิเคราะห์ไฟล์สต็อก",
+17
View File
@@ -2219,6 +2219,12 @@
"hint": "แถวอื่นในไฟล์สแนปชอตเดียวกันจะใช้ ODM ID เดียวกัน และสร้าง Excel ใหม่โดยอัตโนมัติ",
"column": "ODM ID"
},
"inlineEdit": {
"saved": "บันทึกแล้ว กด \"จับคู่สินค้าคงเหลือใหม่\" เพื่อใช้งาน",
"busy": "ระบบกำลังประมวลผล โปรดลองอีกครั้งภายหลัง",
"save": "บันทึก",
"cancel": "ยกเลิก"
},
"fulfillmentDecision": {
"title": "การตัดสินใจการปฏิบัติตามบรรทัด",
"subtitle": "เลือกหลายบรรทัดที่สต็อกพร้อมหรืออนุมัติด้วยมือ เพื่อสร้างใบแจ้งการจัดส่งและ Excel แยกอิสระ",
@@ -2354,6 +2360,13 @@
"success": "ปิดบรรทัดแล้ว",
"failed": "ปิดล้มเหลว โปรดลองใหม่"
},
"lineActions": {
"closeLine": "ปิดบรรทัด (ไม่จัดส่ง)",
"closeLineReason": "กรอกเหตุผลเพื่อปิด",
"closeLineConfirm": "ยืนยันการปิด",
"editLine": "แก้ไข",
"more": "การดำเนินการเพิ่มเติม"
},
"auditTrail": {
"open": "บันทึก audit",
"title": "Audit การดำเนินการ",
@@ -2742,6 +2755,10 @@
"inventory_rpa_export_failed": "ส่งออกสต็อกล้มเหลว",
"inventory_file_empty": "ไฟล์สต็อกว่าง"
}
},
"releaseBar": {
"label": "ข้อมูลเพิ่มเติมเพื่อปล่อยของ",
"badge": "ขาด {n} รายการก่อนปล่อย"
}
},
"shippingOrderExtractionElapsed": "ใช้เวลา {elapsed}",
+9 -17
View File
@@ -758,14 +758,11 @@
"orderSchemaRequired": "请先在「订单 Schema」发布一个版本;库存解析、发货模板和路由规则才能引用订单字段。",
"connections": "系统连接",
"receiptReportConfig": "收料报表配置",
"receiptReportConfigHint": "独立于库存报表路径与库存查询条件。DBS 会按下方每个 Warehouse 分别导出;报表日期固定不筛选。",
"receiptReportEnabled": "启用收料导出",
"receiptWarehouses": "收料 Warehouse 列表",
"receiptWarehousesHint": "多个 Warehouse 用英文逗号分隔",
"receiptOptionalParameters": "可选查询条件(不含报表日期)",
"receiptReportConfigHint": "与库存配置同构:报表路径 + 查询条件。Warehouse 条件填几个仓,排程逐仓拆分导出几个收料文件;报表日期固定不筛选。收料无独立开关,随站点统一启停。",
"receiptQueryParametersHint": "与库存查询条件一致。Warehouse 支持多值(英文逗号分隔),每个 Warehouse 拆分导出一个收料文件;报表日期固定禁填。",
"receiptCraneFixedPath": "Crane 收料固定导出 Inbound Details,不按 Warehouse 拆分,也不维护查询条件;执行时直接使用页面默认条件点击 Run Report。",
"saveReceiptReportConfig": "保存收料配置",
"receiptReportSaved": "收料报表配置已保存",
"pathSectionConfigured": "已配置",
"pathSectionNotConfigured": "未配置",
"parsingProfiles": "库存解析",
"parsingProfilesHelp": "维护可由多个库存站点共享的库存文件结构、字段对应关系和订单字段匹配键。",
"inventoryMapping": "库存解析",
@@ -1025,12 +1022,11 @@
"parsingBindingOperationBulk": "批量绑定",
"parsingBindingVersion": "配置版本 {before} → {after}",
"sourceSavedDisabledHint": "首次保存后站点保持停用;请完成测试导出、库存解析和发货模板配置后再启用。",
"activationStatus": "正式运行检查",
"readinessProgress": "{passed} / {total} 已完成",
"activationRequiredTitle": "下一步",
"activationRequiredHint": "完成当前项目后,系统会继续判断是否可以自动启用。",
"readinessBlockedBy": "启用前还差一步:{requirement}",
"readinessAutoEnableHint": "完成后系统会自动判断并启用站点。",
"readinessLastVerified": "上次验证 {time}",
"readinessOptionalPending": "{count} 项待后续完成",
"activationOptionalTitle": "后续准备(不影响启用)",
"activationOptionalHint": "有库存数据或实际调拨前再完成。",
"readinessState": {
"passed": "已完成",
"required": "需要完成",
@@ -1047,12 +1043,8 @@
"configure_warehouse_mapping": "配置仓库映射"
},
"saveBeforeReadinessAction": "请先保存当前库存站点更改,再执行此操作。",
"activationReady": "库存站点已启用,可进入正式库存运行。",
"activationDraft": "库存站点当前停用;完成以下项目后才可启用。",
"activationReady": "站点已启用,库存与收料随站点统一运行。",
"activationCanEnable": "启用条件已满足,可启用该库存站点。",
"activationEnabledHint": "站点已参与正式库存运行。",
"activationCanEnableHint": "点击“启用库存站点”即可投入正式运行;也可再次测试导出,通过后仍会自动启用。",
"activationMissingHint": "仅需完成“启用条件”中的未通过项目;后续准备不影响启用。",
"activationRequirement": {
"rpa_profile": "系统连接可用",
"parsing_profile": "库存解析",
+17
View File
@@ -2326,6 +2326,12 @@
"hint": "同一快照文件的其他行会同步使用该 ODM ID,确认后自动重试生成 Excel",
"column": "ODM ID"
},
"inlineEdit": {
"saved": "已保存,请点击「重新匹配库存」生效",
"busy": "系统处理中,请稍后再修改",
"save": "保存",
"cancel": "取消"
},
"fulfillmentDecision": {
"title": "行级履约决定",
"subtitle": "可多选库存满足或已人工放行的明细,生成独立发货通知和 Excel。",
@@ -2473,6 +2479,13 @@
"success": "行已关闭",
"failed": "关闭失败,请重试"
},
"lineActions": {
"closeLine": "结案(不再发货)",
"closeLineReason": "请填写结案原因",
"closeLineConfirm": "确认结案",
"editLine": "编辑",
"more": "更多操作"
},
"auditTrail": {
"open": "审计记录",
"title": "操作审计",
@@ -2850,6 +2863,10 @@
"missing_order_table": "缺少订单表格",
"other": "其他(须填写说明)"
}
},
"releaseBar": {
"label": "放行补录",
"badge": "缺 {n} 项放行信息"
}
},
"shippingProcessing": {
+9 -17
View File
@@ -629,14 +629,11 @@
"orderSchemaRequired": "請先在「訂單欄位規則」發佈一個版本;庫存解析、出貨範本和路由規則才能引用訂單欄位。",
"connections": "系統連線",
"receiptReportConfig": "收料報表設定",
"receiptReportConfigHint": "獨立於庫存報表路徑與庫存查詢條件。DBS 會依下方每個 Warehouse 分別匯出;報表日期固定不篩選。",
"receiptReportEnabled": "啟用收料匯出",
"receiptWarehouses": "收料 Warehouse 清單",
"receiptWarehousesHint": "多個 Warehouse 以英文逗號分隔",
"receiptOptionalParameters": "可選查詢條件(不含報表日期)",
"receiptReportConfigHint": "與庫存設定同構:報表路徑 + 查詢條件。Warehouse 條件填幾個倉,排程逐倉拆分匯出幾個收料檔案;報表日期固定不篩選。收料無獨立開關,隨站點統一啟停。",
"receiptQueryParametersHint": "與庫存查詢條件一致。Warehouse 支援多值(英文逗號分隔),每個 Warehouse 拆分匯出一個收料檔案;報表日期固定禁填。",
"receiptCraneFixedPath": "Crane 收料固定匯出 Inbound Details,不依 Warehouse 拆分,也不維護查詢條件;執行時直接使用頁面預設條件點擊 Run Report。",
"saveReceiptReportConfig": "儲存收料設定",
"receiptReportSaved": "收料報表設定已儲存",
"pathSectionConfigured": "已設定",
"pathSectionNotConfigured": "未設定",
"parsingProfiles": "庫存解析",
"parsingProfilesHelp": "維護可由多個庫存站點共用的庫存檔案結構、欄位對應與訂單欄位匹配鍵。",
"inventoryMapping": "庫存解析",
@@ -896,12 +893,11 @@
"parsingBindingOperationBulk": "批量綁定",
"parsingBindingVersion": "設定版本 {before} → {after}",
"sourceSavedDisabledHint": "首次儲存後站點保持停用;請完成測試匯出、庫存解析與出貨範本設定後再啟用。",
"activationStatus": "正式執行檢查",
"readinessProgress": "已完成 {passed} / {total}",
"activationRequiredTitle": "下一步",
"activationRequiredHint": "完成目前項目後,系統會繼續判斷是否可自動啟用。",
"readinessBlockedBy": "啟用前還差一步:{requirement}",
"readinessAutoEnableHint": "完成後系統會自動判斷並啟用站點。",
"readinessLastVerified": "上次驗證 {time}",
"readinessOptionalPending": "{count} 項待後續完成",
"activationOptionalTitle": "後續準備(不影響啟用)",
"activationOptionalHint": "有庫存資料或實際調撥前再完成。",
"readinessState": {
"passed": "已完成",
"required": "需要完成",
@@ -918,12 +914,8 @@
"configure_warehouse_mapping": "設定倉庫對應"
},
"saveBeforeReadinessAction": "請先儲存目前庫存站點的變更,再執行此操作。",
"activationReady": "庫存站點已啟用,可進入正式庫存執行。",
"activationDraft": "庫存站點目前停用;完成以下項目後才可啟用。",
"activationReady": "站點已啟用,庫存與收料隨站點統一執行。",
"activationCanEnable": "已符合啟用條件,可啟用此庫存站點。",
"activationEnabledHint": "站點已參與正式庫存執行。",
"activationCanEnableHint": "點選「啟用庫存站點」即可投入正式執行;也可再次測試匯出,通過後仍會自動啟用。",
"activationMissingHint": "只需完成「啟用條件」中未通過的項目;後續準備不影響啟用。",
"activationRequirement": {
"rpa_profile": "系統連線可用",
"parsing_profile": "庫存解析",
+17
View File
@@ -2219,6 +2219,12 @@
"hint": "同一快照檔案的其他行會同步使用該 ODM ID,確認後自動重試產生 Excel",
"column": "ODM ID"
},
"inlineEdit": {
"saved": "已儲存,請點擊「重新匹配庫存」生效",
"busy": "系統處理中,請稍後再修改",
"save": "儲存",
"cancel": "取消"
},
"fulfillmentDecision": {
"title": "行級履約決定",
"subtitle": "可多選庫存滿足或已人工放行的明細,產生獨立發貨通知和 Excel。",
@@ -2354,6 +2360,13 @@
"success": "行已關閉",
"failed": "關閉失敗,請重試"
},
"lineActions": {
"closeLine": "結案(不再發貨)",
"closeLineReason": "請填寫結案原因",
"closeLineConfirm": "確認結案",
"editLine": "編輯",
"more": "更多操作"
},
"auditTrail": {
"open": "稽核記錄",
"title": "操作稽核",
@@ -2742,6 +2755,10 @@
"inventory_rpa_export_failed": "庫存匯出失敗",
"inventory_file_empty": "庫存檔案為空"
}
},
"releaseBar": {
"label": "放行補錄",
"badge": "缺 {n} 項放行資訊"
}
},
"shippingOrderExtractionElapsed": "已用時 {elapsed}",