feat(shipping-process-gates): 落地全门禁中断恢复并消除双真相
纳入 Execution/Gate/Attempt 模型与迁移、Worker/API/前端恢复卡片与 Admin 诊断, Gate 阻断时清零旧 action_buttons,异常摘要统一脱敏,并为运维筛选与 Attempt Diff 补齐入口。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
b352c281d5
commit
323928626b
92 files changed
+11930
-458
No files matched your search
@@ -59,6 +59,8 @@ const ShippingOrderExtractionRunsPage = () =>
|
||||
import("@/features/admin/modules/shipping-order-extraction-runs/ShippingOrderExtractionRunsPage.vue");
|
||||
const ShippingAuditCenterPage = () =>
|
||||
import("@/features/admin/modules/shipping-audit/ShippingAuditCenterPage.vue");
|
||||
const ShippingProcessGateDiagnosticsPage = () =>
|
||||
import("@/features/admin/modules/shipping-process-gates/ShippingProcessGateDiagnosticsPage.vue");
|
||||
const ShippingOrderDocumentProfilesPage = () =>
|
||||
import("@/features/admin/modules/shipping-order-document-profiles/ShippingOrderDocumentProfilesPage.vue");
|
||||
const OrderProfileVersionDetailPage = () =>
|
||||
@@ -207,6 +209,12 @@ export const adminRoutes: RouteRecordRaw[] = [
|
||||
component: ShippingAuditCenterPage,
|
||||
meta: { requiresAdmin: true, adminModule: "shipping_inventory", adminSubModule: 'shipping_audit', title: "运行与审计" },
|
||||
},
|
||||
{
|
||||
path: "shipping-process-gates",
|
||||
name: "AdminShippingProcessGates",
|
||||
component: ShippingProcessGateDiagnosticsPage,
|
||||
meta: { requiresAdmin: true, adminModule: "shipping_inventory", adminSubModule: 'process_gates', title: "门禁诊断" },
|
||||
},
|
||||
{
|
||||
path: "shipping-order-document-profiles",
|
||||
name: "AdminShippingOrderDocumentProfiles",
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
* features/admin/components/AdminNav.vue
|
||||
* 管理后台左侧导航,在模块原始顺序中渲染货代手风琴、企微和报表二级菜单。
|
||||
* 依赖:admin-nav.store、modules 常量、vue-router。
|
||||
* 逻辑:报表/企微子菜单默认折叠;当前路由落在对应模块时自动展开以便看到激活项。
|
||||
* 逻辑:报表/企微子菜单默认折叠;当前路由落在对应模块时自动展开;
|
||||
* lg 起固定宽度侧栏,小屏横向滚动导航以免挤占主内容。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
import { computed, watch } from 'vue';
|
||||
@@ -140,10 +141,10 @@ watch(
|
||||
|
||||
<template>
|
||||
<aside
|
||||
class="surface-panel rounded-2xl shadow-sm h-fit md:sticky md:top-24 overflow-hidden shrink-0 z-10 transition-all duration-300"
|
||||
:class="navStore.sidebarCollapsed ? 'w-0 md:w-20' : 'w-full md:w-64'"
|
||||
class="surface-panel rounded-2xl shadow-sm h-fit w-full lg:sticky lg:top-24 overflow-hidden shrink-0 z-10 transition-all duration-300"
|
||||
:class="navStore.sidebarCollapsed ? 'max-h-14 lg:max-h-none lg:w-20' : 'lg:w-64'"
|
||||
>
|
||||
<nav class="flex md:flex-col p-3 gap-1 overflow-x-auto md:overflow-visible no-scrollbar">
|
||||
<nav class="flex lg:flex-col p-3 gap-1 overflow-x-auto lg:overflow-visible no-scrollbar">
|
||||
<template v-for="item in visibleModules" :key="item.id">
|
||||
<div v-if="item.id === 'shipping_inventory'" class="flex flex-col flex-shrink-0">
|
||||
<button
|
||||
@@ -155,7 +156,7 @@ watch(
|
||||
>
|
||||
<div class="flex items-center gap-3">
|
||||
<Warehouse class="w-5 h-5 flex-shrink-0" :class="isShippingManagementActive ? 'text-brand-600' : 'text-muted'" />
|
||||
<span :class="navStore.sidebarCollapsed ? 'md:hidden' : ''">{{ t(item.labelKey) }}</span>
|
||||
<span :class="navStore.sidebarCollapsed ? 'lg:hidden' : ''">{{ t(item.labelKey) }}</span>
|
||||
</div>
|
||||
</button>
|
||||
<div
|
||||
@@ -198,7 +199,7 @@ watch(
|
||||
>
|
||||
<div class="flex items-center gap-3">
|
||||
<Link2 class="w-5 h-5 flex-shrink-0" :class="isWecomActive ? 'text-brand-600' : 'text-muted'" />
|
||||
<span :class="navStore.sidebarCollapsed ? 'md:hidden' : ''">{{ t(item.labelKey) }}</span>
|
||||
<span :class="navStore.sidebarCollapsed ? 'lg:hidden' : ''">{{ t(item.labelKey) }}</span>
|
||||
</div>
|
||||
</button>
|
||||
<div
|
||||
@@ -231,7 +232,7 @@ watch(
|
||||
class="w-5 h-5 transition-transform group-hover:scale-110 flex-shrink-0"
|
||||
:class="isModuleActive(item.id) ? 'text-brand-600' : 'text-muted group-hover:text-secondary'"
|
||||
/>
|
||||
<span :class="navStore.sidebarCollapsed ? 'md:hidden' : ''">{{ t(item.labelKey) }}</span>
|
||||
<span :class="navStore.sidebarCollapsed ? 'lg:hidden' : ''">{{ t(item.labelKey) }}</span>
|
||||
<span
|
||||
v-if="navStore.badgeForModule(item.id) && !navStore.sidebarCollapsed"
|
||||
class="ml-auto bg-red-500 text-white text-[10px] font-bold px-2 py-0.5 rounded-full shadow-sm"
|
||||
@@ -254,7 +255,7 @@ watch(
|
||||
>
|
||||
<div class="flex items-center gap-3">
|
||||
<BarChart2 class="w-5 h-5 flex-shrink-0" :class="isReportsActive ? 'text-brand-600' : 'text-muted'" />
|
||||
<span :class="navStore.sidebarCollapsed ? 'md:hidden' : ''">{{ t('admin.nav.reports') }}</span>
|
||||
<span :class="navStore.sidebarCollapsed ? 'lg:hidden' : ''">{{ t('admin.nav.reports') }}</span>
|
||||
</div>
|
||||
</button>
|
||||
<div
|
||||
|
||||
@@ -22,6 +22,7 @@ export interface ShippingConfigSubModuleMeta {
|
||||
| 'AdminShippingIdentityRules'
|
||||
| 'AdminShippingOrderExtractionRuns'
|
||||
| 'AdminShippingAudit'
|
||||
| 'AdminShippingProcessGates'
|
||||
| 'AdminShippingOrderDocumentProfiles';
|
||||
path:
|
||||
| 'shipping-notice'
|
||||
@@ -30,6 +31,7 @@ export interface ShippingConfigSubModuleMeta {
|
||||
| 'shipping-identity-rules'
|
||||
| 'shipping-order-extraction-runs'
|
||||
| 'shipping-audit'
|
||||
| 'shipping-process-gates'
|
||||
| 'shipping-order-document-profiles';
|
||||
labelKey: string;
|
||||
groupKey: 'admin.nav.shippingOrderRecognition' | 'admin.nav.shippingInventoryManagement' | 'admin.nav.shippingRunAudit';
|
||||
@@ -72,6 +74,7 @@ export const SHIPPING_CONFIG_SUB_MODULE_METAS: ShippingConfigSubModuleMeta[] = [
|
||||
{ id: 'routing_rules', routeName: 'AdminShippingInventory', path: 'shipping-notice', labelKey: 'admin.shippingInventory.rules', groupKey: 'admin.nav.shippingInventoryManagement', query: { section: 'rules' } },
|
||||
{ id: 'shipping_templates', routeName: 'AdminShippingInventory', path: 'shipping-notice', labelKey: 'admin.shippingInventory.excelTemplates', groupKey: 'admin.nav.shippingInventoryManagement', query: { section: 'templates' } },
|
||||
{ id: 'shipping_audit', routeName: 'AdminShippingAudit', path: 'shipping-audit', labelKey: 'admin.nav.shippingAudit', groupKey: 'admin.nav.shippingRunAudit' },
|
||||
{ id: 'process_gates', routeName: 'AdminShippingProcessGates', path: 'shipping-process-gates', labelKey: 'admin.nav.shippingProcessGates', groupKey: 'admin.nav.shippingRunAudit' },
|
||||
{ id: 'inventory_snapshots', routeName: 'AdminShippingInventory', path: 'shipping-notice', labelKey: 'admin.shippingInventory.snapshots', groupKey: 'admin.nav.shippingRunAudit', query: { section: 'snapshots' } },
|
||||
{ id: 'export_records', routeName: 'AdminShippingInventory', path: 'shipping-notice', labelKey: 'admin.shippingInventory.exports', groupKey: 'admin.nav.shippingRunAudit', query: { section: 'exports' } },
|
||||
];
|
||||
|
||||
+794
@@ -0,0 +1,794 @@
|
||||
<!--
|
||||
features/admin/modules/shipping-process-gates/ShippingProcessGateDiagnosticsPage.vue
|
||||
用途:管理员 Process Gate Execution 诊断——列表、Gate 轨道与 Attempt 明细。
|
||||
依赖:process-gates.api、Vue Router、Vue I18n(admin + workspace.processGate 动作文案)。
|
||||
逻辑:只读诊断;多维度筛选(status/gate/reason/party/q/时间);小屏卡片化列表,lg+ 横向表格(nowrap + 滚动提示);
|
||||
状态/动作展示业务标签并附技术码;Gate 诊断结构化卡片(findings/blocking/effective_result);
|
||||
Attempt 展示 snapshot_diff 摘要并可跳转 AdminShippingAudit。
|
||||
-->
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import {
|
||||
getAdminProcessExecution,
|
||||
listAdminProcessExecutions,
|
||||
listAdminProcessGateAttempts,
|
||||
type AdminProcessExecutionDetail,
|
||||
type AdminProcessExecutionListFilters,
|
||||
type AdminProcessExecutionSummary,
|
||||
type AdminProcessGateAttemptsPayload,
|
||||
} from '@/features/shipping-process-gates/api/process-gates.api';
|
||||
|
||||
const { t, te } = useI18n();
|
||||
const router = useRouter();
|
||||
const loading = ref(false);
|
||||
const detailLoading = ref(false);
|
||||
const attemptsLoading = ref(false);
|
||||
const error = ref('');
|
||||
const page = ref(1);
|
||||
const pageSize = 25;
|
||||
const total = ref(0);
|
||||
const filters = ref<AdminProcessExecutionListFilters>({
|
||||
status: '',
|
||||
gate_code: '',
|
||||
blocking_reason_code: '',
|
||||
responsible_party: '',
|
||||
q: '',
|
||||
updated_from: '',
|
||||
updated_to: '',
|
||||
});
|
||||
const rows = ref<AdminProcessExecutionSummary[]>([]);
|
||||
const detail = ref<AdminProcessExecutionDetail | null>(null);
|
||||
const selectedGateCode = ref('');
|
||||
const attemptsPayload = ref<AdminProcessGateAttemptsPayload | null>(null);
|
||||
|
||||
const EXECUTION_STATUS_OPTIONS = [
|
||||
'active',
|
||||
'blocked',
|
||||
'waiting_external',
|
||||
'completed',
|
||||
'failed',
|
||||
'cancelled',
|
||||
] as const;
|
||||
|
||||
type GateFinding = {
|
||||
severity?: string;
|
||||
field_code?: string;
|
||||
field?: string;
|
||||
responsible_party?: string;
|
||||
party?: string;
|
||||
reason_code?: string;
|
||||
reason?: string;
|
||||
code?: string;
|
||||
finding_code?: string;
|
||||
message?: string;
|
||||
details?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
type SnapshotKeyDiff = {
|
||||
added?: string[];
|
||||
removed?: string[];
|
||||
changed?: string[];
|
||||
};
|
||||
|
||||
type SnapshotDiffPayload = {
|
||||
previous_attempt_no?: number;
|
||||
input?: SnapshotKeyDiff;
|
||||
output?: SnapshotKeyDiff;
|
||||
input_hash_changed?: boolean;
|
||||
output_hash_changed?: boolean;
|
||||
};
|
||||
|
||||
const EMPTY_FILTERS: AdminProcessExecutionListFilters = {
|
||||
status: '',
|
||||
gate_code: '',
|
||||
blocking_reason_code: '',
|
||||
responsible_party: '',
|
||||
q: '',
|
||||
updated_from: '',
|
||||
updated_to: '',
|
||||
};
|
||||
|
||||
const formatTime = (value?: string | null) => (value ? new Date(value).toLocaleString() : '—');
|
||||
|
||||
/**
|
||||
* 将 datetime-local 值规范为 ISO 字符串供 API 查询。
|
||||
*/
|
||||
function normalizeDateTimeFilter(value?: string): string {
|
||||
const raw = String(value || '').trim();
|
||||
if (!raw) return '';
|
||||
const date = new Date(raw);
|
||||
if (Number.isNaN(date.getTime())) return raw;
|
||||
return date.toISOString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execution / Gate 状态业务标签;无翻译时回落原始码。
|
||||
*/
|
||||
function statusLabel(code?: string | null): string {
|
||||
const key = String(code || '').trim();
|
||||
if (!key) return '—';
|
||||
const i18nKey = `admin.shippingProcessGates.statusLabels.${key}`;
|
||||
return te(i18nKey) ? t(i18nKey) : key;
|
||||
}
|
||||
|
||||
/**
|
||||
* 主动作业务标签(复用 workspace 动作文案)+ 技术码,便于运维对照。
|
||||
*/
|
||||
function actionLabel(code?: string | null): string {
|
||||
const key = String(code || '').trim();
|
||||
if (!key) return '—';
|
||||
const i18nKey = `workspace.shippingNotice.processGate.actionCodes.${key}`;
|
||||
const label = te(i18nKey) ? t(i18nKey) : key;
|
||||
return label === key ? key : `${label} (${key})`;
|
||||
}
|
||||
|
||||
/**
|
||||
* 组装当前列表筛选 payload,剔除空值并规范化时间。
|
||||
*/
|
||||
function buildListFilters(): AdminProcessExecutionListFilters {
|
||||
const payload: AdminProcessExecutionListFilters = {};
|
||||
(Object.entries(filters.value) as Array<[keyof AdminProcessExecutionListFilters, string | undefined]>).forEach(
|
||||
([key, value]) => {
|
||||
const text = String(value || '').trim();
|
||||
if (!text) return;
|
||||
if (key === 'updated_from' || key === 'updated_to') {
|
||||
payload[key] = normalizeDateTimeFilter(text);
|
||||
return;
|
||||
}
|
||||
payload[key] = text;
|
||||
},
|
||||
);
|
||||
return payload;
|
||||
}
|
||||
|
||||
/** 兼容后端 items / attempts 双字段。 */
|
||||
const attemptRows = computed(() => {
|
||||
const payload = attemptsPayload.value;
|
||||
if (!payload) return [];
|
||||
const list = payload.items || payload.attempts || [];
|
||||
return Array.isArray(list) ? list : [];
|
||||
});
|
||||
|
||||
/** 详情中的完整 Gate 列表(含 findings)。 */
|
||||
const diagnosticGates = computed(() => {
|
||||
const gates = detail.value?.gates;
|
||||
return Array.isArray(gates) ? gates : [];
|
||||
});
|
||||
|
||||
const selectedGateDetail = computed(() => {
|
||||
if (!selectedGateCode.value) return null;
|
||||
return diagnosticGates.value.find((gate) => String(gate.gate_code) === selectedGateCode.value) || null;
|
||||
});
|
||||
|
||||
const selectedGateFindings = computed(() => normalizeFindings(selectedGateDetail.value?.findings));
|
||||
|
||||
const selectedBlockingReasonRows = computed(() => blockingReasonRows(selectedGateDetail.value?.blocking_reason));
|
||||
|
||||
const selectedEffectiveResultSummary = computed(() => effectiveResultSummary(selectedGateDetail.value?.effective_result));
|
||||
|
||||
const selectedEffectiveResultRemainder = computed(() => (
|
||||
effectiveResultRemainder(selectedGateDetail.value?.effective_result, selectedEffectiveResultSummary.value)
|
||||
));
|
||||
|
||||
/**
|
||||
* 将任意 JSON 安全格式化为可展示文本。
|
||||
*/
|
||||
function formatJson(value: unknown): string {
|
||||
if (value == null) return '—';
|
||||
try {
|
||||
return JSON.stringify(value, null, 2);
|
||||
} catch {
|
||||
return String(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将单元格值转为短文本。
|
||||
*/
|
||||
function formatCellValue(value: unknown): string {
|
||||
if (value == null) return '—';
|
||||
if (typeof value === 'string') return value;
|
||||
if (typeof value === 'number' || typeof value === 'boolean') return String(value);
|
||||
try {
|
||||
return JSON.stringify(value);
|
||||
} catch {
|
||||
return String(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 规范化 Gate findings 数组。
|
||||
*/
|
||||
function normalizeFindings(raw: unknown): GateFinding[] {
|
||||
if (!Array.isArray(raw)) return [];
|
||||
return raw.filter((item): item is GateFinding => Boolean(item) && typeof item === 'object');
|
||||
}
|
||||
|
||||
/**
|
||||
* 提取 Finding 展示字段。
|
||||
*/
|
||||
function findingField(finding: GateFinding): string {
|
||||
return String(finding.field_code || finding.field || '').trim() || '—';
|
||||
}
|
||||
|
||||
function findingParty(finding: GateFinding): string {
|
||||
return String(finding.responsible_party || finding.party || '').trim() || '—';
|
||||
}
|
||||
|
||||
function findingReason(finding: GateFinding): string {
|
||||
return String(finding.reason_code || finding.reason || finding.code || finding.finding_code || '').trim() || '—';
|
||||
}
|
||||
|
||||
function findingMessage(finding: GateFinding): string {
|
||||
if (finding.message) return String(finding.message);
|
||||
const details = finding.details;
|
||||
if (details && typeof details === 'object' && details.message != null) {
|
||||
return String(details.message);
|
||||
}
|
||||
return '—';
|
||||
}
|
||||
|
||||
/**
|
||||
* 将 blocking_reason 对象转为 key-value 行。
|
||||
*/
|
||||
function blockingReasonRows(raw: unknown): Array<{ key: string; value: string }> {
|
||||
if (!raw || typeof raw !== 'object' || Array.isArray(raw)) return [];
|
||||
return Object.entries(raw as Record<string, unknown>).map(([key, value]) => ({
|
||||
key,
|
||||
value: formatCellValue(value),
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 从 effective_result 提取摘要 chips(优先常见键 + findings 计数)。
|
||||
*/
|
||||
function effectiveResultSummary(raw: unknown): Array<{ key: string; value: string }> {
|
||||
if (!raw || typeof raw !== 'object' || Array.isArray(raw)) return [];
|
||||
const obj = raw as Record<string, unknown>;
|
||||
const chips: Array<{ key: string; value: string }> = [];
|
||||
const priorityKeys = ['passed', 'status', 'case', 'outcome', 'summary'];
|
||||
for (const key of priorityKeys) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key) && obj[key] != null) {
|
||||
chips.push({ key, value: formatCellValue(obj[key]) });
|
||||
}
|
||||
}
|
||||
if (Array.isArray(obj.findings)) {
|
||||
chips.push({ key: 'findings', value: String(obj.findings.length) });
|
||||
}
|
||||
return chips;
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回 effective_result 中未出现在摘要 chips 内的剩余 JSON。
|
||||
*/
|
||||
function effectiveResultRemainder(
|
||||
raw: unknown,
|
||||
summary: Array<{ key: string; value: string }>,
|
||||
): Record<string, unknown> | null {
|
||||
if (!raw || typeof raw !== 'object' || Array.isArray(raw)) return null;
|
||||
const obj = { ...(raw as Record<string, unknown>) };
|
||||
const consumed = new Set(summary.map((item) => item.key));
|
||||
for (const key of consumed) {
|
||||
delete obj[key];
|
||||
}
|
||||
return Object.keys(obj).length ? obj : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化 Attempt snapshot_diff 单段(input/output)摘要。
|
||||
*/
|
||||
function formatSnapshotDiffSection(scope: 'input' | 'output', diff: SnapshotDiffPayload | null | undefined): string | null {
|
||||
const section = diff?.[scope];
|
||||
if (!section) return null;
|
||||
const added = section.added?.length ?? 0;
|
||||
const removed = section.removed?.length ?? 0;
|
||||
const changed = section.changed?.length ?? 0;
|
||||
if (!added && !removed && !changed) return null;
|
||||
const scopeLabel = scope === 'input' ? 'input' : 'output';
|
||||
return t('admin.shippingProcessGates.attemptDiff', {
|
||||
scope: scopeLabel,
|
||||
added,
|
||||
removed,
|
||||
changed,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 合并 Attempt snapshot_diff 的 input/output 摘要行。
|
||||
*/
|
||||
function formatAttemptDiffSummary(raw: unknown): string[] {
|
||||
if (!raw || typeof raw !== 'object') return [];
|
||||
const diff = raw as SnapshotDiffPayload;
|
||||
const lines: string[] = [];
|
||||
const inputLine = formatSnapshotDiffSection('input', diff);
|
||||
const outputLine = formatSnapshotDiffSection('output', diff);
|
||||
if (inputLine) lines.push(inputLine);
|
||||
if (outputLine) lines.push(outputLine);
|
||||
return lines;
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转 Admin 审计中心,预填 Execution 与 process_gate_ 事件前缀。
|
||||
*/
|
||||
function openAuditForExecution(executionNo: string) {
|
||||
void router.push({
|
||||
name: 'AdminShippingAudit',
|
||||
query: {
|
||||
q: executionNo,
|
||||
event_type: 'process_gate_',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载 Execution 列表。
|
||||
*/
|
||||
async function load() {
|
||||
loading.value = true;
|
||||
error.value = '';
|
||||
try {
|
||||
const response = await listAdminProcessExecutions(page.value, pageSize, buildListFilters());
|
||||
rows.value = response.items;
|
||||
total.value = response.total;
|
||||
} catch {
|
||||
error.value = t('admin.shippingProcessGates.loadFailed');
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用筛选并重置到第一页。
|
||||
*/
|
||||
function applyFilters() {
|
||||
page.value = 1;
|
||||
void load();
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空筛选并刷新列表。
|
||||
*/
|
||||
function resetFilters() {
|
||||
filters.value = { ...EMPTY_FILTERS };
|
||||
page.value = 1;
|
||||
void load();
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开 Execution 诊断详情。
|
||||
*/
|
||||
async function openDetail(executionNo: string) {
|
||||
detailLoading.value = true;
|
||||
selectedGateCode.value = '';
|
||||
attemptsPayload.value = null;
|
||||
try {
|
||||
detail.value = await getAdminProcessExecution(executionNo);
|
||||
const current = detail.value.current_gate?.gate_code
|
||||
|| detail.value.current_blocking_gate?.gate_code;
|
||||
if (current) await loadAttempts(String(current));
|
||||
} catch {
|
||||
error.value = t('admin.shippingProcessGates.detailFailed');
|
||||
detail.value = null;
|
||||
} finally {
|
||||
detailLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载指定 Gate 的 Attempt 列表。
|
||||
*/
|
||||
async function loadAttempts(gateCode: string) {
|
||||
if (!detail.value?.execution_no) return;
|
||||
selectedGateCode.value = gateCode;
|
||||
attemptsLoading.value = true;
|
||||
try {
|
||||
attemptsPayload.value = await listAdminProcessGateAttempts(detail.value.execution_no, gateCode);
|
||||
} catch {
|
||||
attemptsPayload.value = null;
|
||||
error.value = t('admin.shippingProcessGates.attemptsFailed');
|
||||
} finally {
|
||||
attemptsLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭详情面板。
|
||||
*/
|
||||
function closeDetail() {
|
||||
detail.value = null;
|
||||
selectedGateCode.value = '';
|
||||
attemptsPayload.value = null;
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
void load();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="space-y-6 p-4 sm:p-6">
|
||||
<header>
|
||||
<h1 class="text-xl font-bold">{{ t('admin.shippingProcessGates.title') }}</h1>
|
||||
<p class="mt-1 max-w-3xl text-sm text-muted">{{ t('admin.shippingProcessGates.subtitle') }}</p>
|
||||
</header>
|
||||
|
||||
<section class="rounded-xl border border-default bg-surface p-4">
|
||||
<div class="grid gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
|
||||
<label class="text-sm">
|
||||
<span class="mb-1 block text-xs text-muted">{{ t('admin.shippingProcessGates.status') }}</span>
|
||||
<select v-model="filters.status" class="w-full rounded border border-default px-2 py-1.5 text-sm">
|
||||
<option value="">{{ t('admin.shippingProcessGates.allStatuses') }}</option>
|
||||
<option v-for="code in EXECUTION_STATUS_OPTIONS" :key="code" :value="code">
|
||||
{{ statusLabel(code) }}
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="text-sm">
|
||||
<span class="mb-1 block text-xs text-muted">{{ t('admin.shippingProcessGates.filterGate') }}</span>
|
||||
<input
|
||||
v-model="filters.gate_code"
|
||||
type="text"
|
||||
class="w-full rounded border border-default px-2 py-1.5 text-sm font-mono"
|
||||
:placeholder="t('admin.shippingProcessGates.gateCode')"
|
||||
/>
|
||||
</label>
|
||||
<label class="text-sm">
|
||||
<span class="mb-1 block text-xs text-muted">{{ t('admin.shippingProcessGates.filterReason') }}</span>
|
||||
<input
|
||||
v-model="filters.blocking_reason_code"
|
||||
type="text"
|
||||
class="w-full rounded border border-default px-2 py-1.5 text-sm font-mono"
|
||||
:placeholder="t('admin.shippingProcessGates.blockingReasonCode')"
|
||||
/>
|
||||
</label>
|
||||
<label class="text-sm">
|
||||
<span class="mb-1 block text-xs text-muted">{{ t('admin.shippingProcessGates.filterParty') }}</span>
|
||||
<input
|
||||
v-model="filters.responsible_party"
|
||||
type="text"
|
||||
class="w-full rounded border border-default px-2 py-1.5 text-sm"
|
||||
:placeholder="t('admin.shippingProcessGates.responsibleParty')"
|
||||
/>
|
||||
</label>
|
||||
<label class="text-sm sm:col-span-2 lg:col-span-1">
|
||||
<span class="mb-1 block text-xs text-muted">{{ t('admin.shippingProcessGates.filterSearch') }}</span>
|
||||
<input
|
||||
v-model="filters.q"
|
||||
type="search"
|
||||
class="w-full rounded border border-default px-2 py-1.5 text-sm"
|
||||
:placeholder="t('admin.shippingProcessGates.executionNo')"
|
||||
/>
|
||||
</label>
|
||||
<label class="text-sm">
|
||||
<span class="mb-1 block text-xs text-muted">{{ t('admin.shippingProcessGates.filterFrom') }}</span>
|
||||
<input v-model="filters.updated_from" type="datetime-local" class="w-full rounded border border-default px-2 py-1.5 text-sm" />
|
||||
</label>
|
||||
<label class="text-sm">
|
||||
<span class="mb-1 block text-xs text-muted">{{ t('admin.shippingProcessGates.filterTo') }}</span>
|
||||
<input v-model="filters.updated_to" type="datetime-local" class="w-full rounded border border-default px-2 py-1.5 text-sm" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="mt-3 flex flex-wrap items-center gap-2">
|
||||
<button type="button" class="rounded border border-default px-3 py-1.5 text-sm" @click="applyFilters">
|
||||
{{ t('admin.shippingProcessGates.applyFilters') }}
|
||||
</button>
|
||||
<button type="button" class="rounded border border-default px-3 py-1.5 text-sm" @click="resetFilters">
|
||||
{{ t('admin.shippingProcessGates.resetFilters') }}
|
||||
</button>
|
||||
<button type="button" class="rounded border border-default px-3 py-1.5 text-sm" @click="load">
|
||||
{{ t('admin.shippingProcessGates.refresh') }}
|
||||
</button>
|
||||
<span class="text-xs text-muted">{{ t('admin.shippingProcessGates.total', { count: total }) }}</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<p v-if="error" class="text-sm text-rose-600">{{ error }}</p>
|
||||
|
||||
<!-- 小屏:卡片列表,避免列标题逐字换行 -->
|
||||
<div class="space-y-3 lg:hidden" data-testid="shipping-process-gate-cards">
|
||||
<p v-if="loading" class="rounded-xl border border-default px-4 py-8 text-center text-sm text-muted">
|
||||
{{ t('admin.shippingProcessGates.loading') }}
|
||||
</p>
|
||||
<p v-else-if="!rows.length" class="rounded-xl border border-default px-4 py-8 text-center text-sm text-muted">
|
||||
{{ t('admin.shippingProcessGates.empty') }}
|
||||
</p>
|
||||
<article
|
||||
v-for="row in rows"
|
||||
:key="row.execution_no"
|
||||
class="rounded-xl border border-default bg-surface px-4 py-3 text-sm"
|
||||
>
|
||||
<div class="font-mono text-xs break-all">{{ row.execution_no }}</div>
|
||||
<dl class="mt-2 grid grid-cols-1 gap-1.5 sm:grid-cols-2">
|
||||
<div>
|
||||
<dt class="text-xs text-muted">{{ t('admin.shippingProcessGates.status') }}</dt>
|
||||
<dd>
|
||||
<span>{{ statusLabel(row.status) }}</span>
|
||||
<span class="ml-1 font-mono text-[11px] text-muted">{{ row.status }}</span>
|
||||
</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-xs text-muted">{{ t('admin.shippingProcessGates.currentGate') }}</dt>
|
||||
<dd class="font-mono text-xs break-all">{{ row.current_gate_code || '—' }}</dd>
|
||||
</div>
|
||||
<div class="sm:col-span-2">
|
||||
<dt class="text-xs text-muted">{{ t('admin.shippingProcessGates.nextAction') }}</dt>
|
||||
<dd class="text-xs">{{ actionLabel(row.primary_next_action_code) }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-xs text-muted">{{ t('admin.shippingProcessGates.updatedAt') }}</dt>
|
||||
<dd class="text-xs">{{ formatTime(row.updated_at) }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
<button
|
||||
type="button"
|
||||
class="mt-3 text-sm text-brand-600 hover:underline"
|
||||
@click="openDetail(row.execution_no)"
|
||||
>
|
||||
{{ t('admin.shippingProcessGates.viewDetail') }}
|
||||
</button>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<!-- lg+:横向表格;表头 nowrap + 外层滚动 -->
|
||||
<div class="hidden lg:block">
|
||||
<p class="mb-2 text-xs text-muted">{{ t('admin.shippingProcessGates.scrollHint') }}</p>
|
||||
<div class="overflow-x-auto rounded-xl border border-default">
|
||||
<table class="min-w-[720px] w-full text-sm">
|
||||
<thead class="bg-surface-soft text-left text-xs uppercase text-muted">
|
||||
<tr>
|
||||
<th class="whitespace-nowrap px-4 py-3">{{ t('admin.shippingProcessGates.executionNo') }}</th>
|
||||
<th class="whitespace-nowrap px-4 py-3">{{ t('admin.shippingProcessGates.status') }}</th>
|
||||
<th class="whitespace-nowrap px-4 py-3">{{ t('admin.shippingProcessGates.currentGate') }}</th>
|
||||
<th class="whitespace-nowrap px-4 py-3">{{ t('admin.shippingProcessGates.nextAction') }}</th>
|
||||
<th class="whitespace-nowrap px-4 py-3">{{ t('admin.shippingProcessGates.updatedAt') }}</th>
|
||||
<th class="whitespace-nowrap px-4 py-3">{{ t('admin.shippingProcessGates.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-if="loading">
|
||||
<td colspan="6" class="px-4 py-8 text-center text-muted">{{ t('admin.shippingProcessGates.loading') }}</td>
|
||||
</tr>
|
||||
<tr v-else-if="!rows.length">
|
||||
<td colspan="6" class="px-4 py-8 text-center text-muted">{{ t('admin.shippingProcessGates.empty') }}</td>
|
||||
</tr>
|
||||
<tr v-for="row in rows" :key="row.execution_no" class="border-t border-default">
|
||||
<td class="whitespace-nowrap px-4 py-3 font-mono text-xs">{{ row.execution_no }}</td>
|
||||
<td class="px-4 py-3">
|
||||
<div>{{ statusLabel(row.status) }}</div>
|
||||
<div class="font-mono text-[11px] text-muted">{{ row.status }}</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 font-mono text-xs">{{ row.current_gate_code || '—' }}</td>
|
||||
<td class="px-4 py-3 text-xs">{{ actionLabel(row.primary_next_action_code) }}</td>
|
||||
<td class="whitespace-nowrap px-4 py-3">{{ formatTime(row.updated_at) }}</td>
|
||||
<td class="whitespace-nowrap px-4 py-3">
|
||||
<button type="button" class="text-brand-600 hover:underline" @click="openDetail(row.execution_no)">
|
||||
{{ t('admin.shippingProcessGates.viewDetail') }}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-2 text-sm">
|
||||
<button type="button" class="rounded border border-default px-3 py-1.5 disabled:opacity-50" :disabled="page <= 1 || loading" @click="page -= 1; load()">
|
||||
{{ t('admin.shippingProcessGates.previous') }}
|
||||
</button>
|
||||
<span>{{ page }}</span>
|
||||
<button type="button" class="rounded border border-default px-3 py-1.5 disabled:opacity-50" :disabled="page * pageSize >= total || loading" @click="page += 1; load()">
|
||||
{{ t('admin.shippingProcessGates.next') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<aside
|
||||
v-if="detail"
|
||||
class="rounded-xl border border-default bg-surface p-4"
|
||||
data-testid="shipping-process-gate-detail"
|
||||
>
|
||||
<div class="mb-4 flex items-center justify-between gap-2">
|
||||
<h2 class="text-lg font-semibold">{{ t('admin.shippingProcessGates.detailTitle') }}</h2>
|
||||
<button type="button" class="text-sm text-muted hover:text-primary" @click="closeDetail">{{ t('admin.close') }}</button>
|
||||
</div>
|
||||
<p v-if="detailLoading" class="text-sm text-muted">{{ t('admin.shippingProcessGates.loading') }}</p>
|
||||
<template v-else>
|
||||
<dl class="grid gap-2 text-sm sm:grid-cols-2">
|
||||
<div><dt class="text-muted">{{ t('admin.shippingProcessGates.executionNo') }}</dt><dd class="font-mono text-xs break-all">{{ detail.execution_no }}</dd></div>
|
||||
<div>
|
||||
<dt class="text-muted">{{ t('admin.shippingProcessGates.status') }}</dt>
|
||||
<dd>
|
||||
{{ statusLabel(detail.status) }}
|
||||
<span class="ml-1 font-mono text-[11px] text-muted">{{ detail.status }}</span>
|
||||
</dd>
|
||||
</div>
|
||||
<div><dt class="text-muted">{{ t('admin.shippingProcessGates.taskNo') }}</dt><dd class="font-mono text-xs">{{ detail.task_no || '—' }}</dd></div>
|
||||
<div><dt class="text-muted">{{ t('admin.shippingProcessGates.caseNo') }}</dt><dd class="font-mono text-xs">{{ detail.review_case_no || detail.case_no || '—' }}</dd></div>
|
||||
</dl>
|
||||
|
||||
<h3 class="mt-6 text-sm font-semibold">{{ t('admin.shippingProcessGates.gates') }}</h3>
|
||||
<div class="mt-2 space-y-2 lg:hidden">
|
||||
<article
|
||||
v-for="gate in diagnosticGates"
|
||||
:key="String(gate.gate_code)"
|
||||
class="rounded-lg border border-default px-3 py-2 text-xs"
|
||||
:class="{ 'bg-amber-50/60 dark:bg-amber-950/20': selectedGateCode === gate.gate_code }"
|
||||
>
|
||||
<div class="font-semibold">#{{ gate.sequence_no }} · {{ gate.gate_code }}</div>
|
||||
<div class="mt-1">{{ statusLabel(String(gate.status)) }} <span class="font-mono text-muted">{{ gate.status }}</span></div>
|
||||
<div class="mt-1 font-mono text-muted">{{ gate.blocking_reason_code || '—' }}</div>
|
||||
<button type="button" class="mt-2 text-brand-600 hover:underline" @click="loadAttempts(String(gate.gate_code))">
|
||||
{{ t('admin.shippingProcessGates.viewAttempts') }}
|
||||
</button>
|
||||
</article>
|
||||
</div>
|
||||
<div class="mt-2 hidden overflow-x-auto rounded-lg border border-default lg:block">
|
||||
<table class="min-w-[640px] w-full text-xs">
|
||||
<thead class="bg-surface-soft text-left text-muted">
|
||||
<tr>
|
||||
<th class="whitespace-nowrap px-3 py-2">#</th>
|
||||
<th class="whitespace-nowrap px-3 py-2">{{ t('admin.shippingProcessGates.gateCode') }}</th>
|
||||
<th class="whitespace-nowrap px-3 py-2">{{ t('admin.shippingProcessGates.gateStatus') }}</th>
|
||||
<th class="whitespace-nowrap px-3 py-2">{{ t('admin.shippingProcessGates.blockingReason') }}</th>
|
||||
<th class="whitespace-nowrap px-3 py-2">{{ t('admin.shippingProcessGates.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr
|
||||
v-for="gate in diagnosticGates"
|
||||
:key="String(gate.gate_code)"
|
||||
class="border-t border-default"
|
||||
:class="{ 'bg-amber-50/60 dark:bg-amber-950/20': selectedGateCode === gate.gate_code }"
|
||||
>
|
||||
<td class="whitespace-nowrap px-3 py-2">{{ gate.sequence_no }}</td>
|
||||
<td class="whitespace-nowrap px-3 py-2 font-mono">{{ gate.gate_code }}</td>
|
||||
<td class="px-3 py-2">
|
||||
<div>{{ statusLabel(String(gate.status)) }}</div>
|
||||
<div class="font-mono text-[11px] text-muted">{{ gate.status }}</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-3 py-2 font-mono">{{ gate.blocking_reason_code || '—' }}</td>
|
||||
<td class="whitespace-nowrap px-3 py-2">
|
||||
<button type="button" class="text-brand-600 hover:underline" @click="loadAttempts(String(gate.gate_code))">
|
||||
{{ t('admin.shippingProcessGates.viewAttempts') }}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<section v-if="selectedGateDetail" class="mt-4 rounded-lg border border-default px-3 py-3 text-xs">
|
||||
<h4 class="font-semibold">{{ t('admin.shippingProcessGates.gateDiagnostics') }}</h4>
|
||||
<p class="mt-1 text-muted">
|
||||
{{ t('admin.shippingProcessGates.nextAction') }}:
|
||||
<span>{{ actionLabel(String(selectedGateDetail.next_action_code || '')) }}</span>
|
||||
</p>
|
||||
|
||||
<div class="mt-3">
|
||||
<div class="font-medium text-muted">{{ t('admin.shippingProcessGates.findingsStructured') }}</div>
|
||||
<p v-if="!selectedGateFindings.length" class="mt-1 text-muted">{{ t('admin.shippingProcessGates.noFindings') }}</p>
|
||||
<div v-else class="mt-2 space-y-2">
|
||||
<article
|
||||
v-for="(finding, index) in selectedGateFindings"
|
||||
:key="`${finding.finding_code || finding.reason_code || index}`"
|
||||
class="rounded border border-default bg-surface-soft px-3 py-2"
|
||||
>
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<span
|
||||
class="rounded px-1.5 py-0.5 font-mono text-[11px]"
|
||||
:class="finding.severity === 'blocking'
|
||||
? 'bg-rose-100 text-rose-800 dark:bg-rose-950 dark:text-rose-200'
|
||||
: 'bg-slate-100 text-slate-700 dark:bg-slate-900 dark:text-slate-200'"
|
||||
>
|
||||
{{ t('admin.shippingProcessGates.severity') }}: {{ finding.severity || '—' }}
|
||||
</span>
|
||||
</div>
|
||||
<dl class="mt-2 grid gap-1 sm:grid-cols-2">
|
||||
<div>
|
||||
<dt class="text-muted">{{ t('admin.shippingProcessGates.field') }}</dt>
|
||||
<dd class="font-mono">{{ findingField(finding) }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-muted">{{ t('admin.shippingProcessGates.party') }}</dt>
|
||||
<dd>{{ findingParty(finding) }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-muted">{{ t('admin.shippingProcessGates.reason') }}</dt>
|
||||
<dd class="font-mono">{{ findingReason(finding) }}</dd>
|
||||
</div>
|
||||
<div class="sm:col-span-2">
|
||||
<dt class="text-muted">{{ t('admin.shippingProcessGates.message') }}</dt>
|
||||
<dd class="break-words">{{ findingMessage(finding) }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<div class="font-medium text-muted">{{ t('admin.shippingProcessGates.blockingReasonDetail') }}</div>
|
||||
<p v-if="!selectedBlockingReasonRows.length" class="mt-1 text-muted">—</p>
|
||||
<dl v-else class="mt-2 divide-y divide-default rounded border border-default">
|
||||
<div
|
||||
v-for="row in selectedBlockingReasonRows"
|
||||
:key="row.key"
|
||||
class="grid gap-1 px-3 py-2 sm:grid-cols-[minmax(8rem,30%)_1fr]"
|
||||
>
|
||||
<dt class="font-mono text-muted">{{ row.key }}</dt>
|
||||
<dd class="break-words">{{ row.value }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<div class="font-medium text-muted">{{ t('admin.shippingProcessGates.effectiveResult') }}</div>
|
||||
<p v-if="!selectedEffectiveResultSummary.length && !selectedEffectiveResultRemainder" class="mt-1 text-muted">—</p>
|
||||
<div v-else class="mt-2 space-y-2">
|
||||
<div v-if="selectedEffectiveResultSummary.length" class="flex flex-wrap gap-2">
|
||||
<span
|
||||
v-for="chip in selectedEffectiveResultSummary"
|
||||
:key="chip.key"
|
||||
class="rounded-full border border-default bg-surface-soft px-2 py-0.5 font-mono text-[11px]"
|
||||
>
|
||||
{{ chip.key }}: {{ chip.value }}
|
||||
</span>
|
||||
</div>
|
||||
<details v-if="selectedEffectiveResultRemainder">
|
||||
<summary class="cursor-pointer text-brand-600">
|
||||
{{ Object.keys(selectedEffectiveResultRemainder).join(', ') }}
|
||||
</summary>
|
||||
<pre class="mt-2 max-h-48 overflow-auto rounded bg-surface-soft p-2">{{ formatJson(selectedEffectiveResultRemainder) }}</pre>
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="mt-6 flex flex-wrap items-center justify-between gap-2">
|
||||
<h3 class="text-sm font-semibold">
|
||||
{{ t('admin.shippingProcessGates.attempts') }}
|
||||
<span v-if="selectedGateCode" class="font-mono text-xs text-muted">({{ selectedGateCode }})</span>
|
||||
</h3>
|
||||
<button
|
||||
type="button"
|
||||
class="text-xs text-brand-600 hover:underline"
|
||||
@click="openAuditForExecution(detail.execution_no)"
|
||||
>
|
||||
{{ t('admin.shippingProcessGates.openAudit') }}
|
||||
</button>
|
||||
</div>
|
||||
<p class="text-xs text-muted">{{ t('admin.shippingProcessGates.auditLink') }}</p>
|
||||
<p v-if="attemptsLoading" class="mt-2 text-sm text-muted">{{ t('admin.shippingProcessGates.loading') }}</p>
|
||||
<div v-else-if="attemptRows.length" class="mt-2 space-y-2">
|
||||
<article
|
||||
v-for="attempt in attemptRows"
|
||||
:key="String(attempt.id || attempt.attempt_no)"
|
||||
class="rounded-lg border border-default px-3 py-2 text-xs"
|
||||
>
|
||||
<div class="font-mono">#{{ attempt.attempt_no }} · {{ statusLabel(String(attempt.status)) }} <span class="text-muted">({{ attempt.status }})</span></div>
|
||||
<div v-if="attempt.error_code" class="mt-1 text-rose-700">{{ attempt.error_code }}: {{ attempt.error_summary }}</div>
|
||||
<div class="mt-1 text-muted">{{ formatTime(attempt.started_at as string) }} → {{ formatTime(attempt.finished_at as string) }}</div>
|
||||
<div class="mt-1 text-muted">
|
||||
hash:
|
||||
in={{ attempt.input_snapshot_hash || '—' }}
|
||||
/ out={{ attempt.output_snapshot_hash || '—' }}
|
||||
</div>
|
||||
<ul v-if="formatAttemptDiffSummary(attempt.snapshot_diff).length" class="mt-2 space-y-0.5 text-muted">
|
||||
<li v-for="(line, lineIndex) in formatAttemptDiffSummary(attempt.snapshot_diff)" :key="lineIndex">
|
||||
{{ line }}
|
||||
</li>
|
||||
</ul>
|
||||
<details v-if="attempt.input_snapshot || attempt.output_snapshot" class="mt-2">
|
||||
<summary class="cursor-pointer text-brand-600">{{ t('admin.shippingProcessGates.viewSnapshots') }}</summary>
|
||||
<div class="mt-2 grid gap-2 md:grid-cols-2">
|
||||
<pre class="max-h-48 overflow-auto rounded bg-surface-soft p-2">{{ formatJson(attempt.input_snapshot) }}</pre>
|
||||
<pre class="max-h-48 overflow-auto rounded bg-surface-soft p-2">{{ formatJson(attempt.output_snapshot) }}</pre>
|
||||
</div>
|
||||
</details>
|
||||
</article>
|
||||
</div>
|
||||
<p v-else class="mt-2 text-sm text-muted">{{ t('admin.shippingProcessGates.noAttempts') }}</p>
|
||||
</template>
|
||||
</aside>
|
||||
</div>
|
||||
</template>
|
||||
@@ -17,6 +17,7 @@ const shippingRoutes = adminRoutes[0].children?.filter((route) =>
|
||||
|| route.name === 'AdminShippingIdentityRules'
|
||||
|| route.name === 'AdminShippingOrderExtractionRuns'
|
||||
|| route.name === 'AdminShippingAudit'
|
||||
|| route.name === 'AdminShippingProcessGates'
|
||||
|| route.name === 'AdminShippingOrderDocumentProfiles',
|
||||
) ?? [];
|
||||
|
||||
@@ -46,10 +47,11 @@ describe('shipping configuration navigation contract', () => {
|
||||
{ id: 'routing_rules', routeName: 'AdminShippingInventory', path: 'shipping-notice', labelKey: 'admin.shippingInventory.rules', groupKey: 'admin.nav.shippingInventoryManagement', query: { section: 'rules' } },
|
||||
{ id: 'shipping_templates', routeName: 'AdminShippingInventory', path: 'shipping-notice', labelKey: 'admin.shippingInventory.excelTemplates', groupKey: 'admin.nav.shippingInventoryManagement', query: { section: 'templates' } },
|
||||
{ id: 'shipping_audit', routeName: 'AdminShippingAudit', path: 'shipping-audit', labelKey: 'admin.nav.shippingAudit', groupKey: 'admin.nav.shippingRunAudit' },
|
||||
{ id: 'process_gates', routeName: 'AdminShippingProcessGates', path: 'shipping-process-gates', labelKey: 'admin.nav.shippingProcessGates', groupKey: 'admin.nav.shippingRunAudit' },
|
||||
{ id: 'inventory_snapshots', routeName: 'AdminShippingInventory', path: 'shipping-notice', labelKey: 'admin.shippingInventory.snapshots', groupKey: 'admin.nav.shippingRunAudit', query: { section: 'snapshots' } },
|
||||
{ id: 'export_records', routeName: 'AdminShippingInventory', path: 'shipping-notice', labelKey: 'admin.shippingInventory.exports', groupKey: 'admin.nav.shippingRunAudit', query: { section: 'exports' } },
|
||||
]);
|
||||
expect(shippingRoutes).toHaveLength(7);
|
||||
expect(shippingRoutes).toHaveLength(8);
|
||||
expect(shippingRoutes.some((route) => route.name === 'AdminShippingReviewSupervision')).toBe(false);
|
||||
});
|
||||
|
||||
@@ -72,6 +74,7 @@ describe('shipping configuration navigation contract', () => {
|
||||
expect.objectContaining({ requiresAdmin: true, adminModule: 'shipping_inventory', adminSubModule: 'identity_rules' }),
|
||||
expect.objectContaining({ requiresAdmin: true, adminModule: 'shipping_inventory', adminSubModule: 'order_extraction_runs' }),
|
||||
expect.objectContaining({ requiresAdmin: true, adminModule: 'shipping_inventory', adminSubModule: 'shipping_audit' }),
|
||||
expect.objectContaining({ requiresAdmin: true, adminModule: 'shipping_inventory', adminSubModule: 'process_gates' }),
|
||||
expect.objectContaining({ requiresAdmin: true, adminModule: 'shipping_inventory', adminSubModule: 'order_document_profiles' }),
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -28,6 +28,7 @@ export type ShippingConfigSubModuleId =
|
||||
| 'identity_rules'
|
||||
| 'order_extraction_runs'
|
||||
| 'shipping_audit'
|
||||
| 'process_gates'
|
||||
| 'inventory_fields'
|
||||
| 'connections'
|
||||
| 'inventory_sites'
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
* features/admin/views/AdminLayout.vue
|
||||
* 管理后台壳层:顶栏 + 左侧导航 + 子路由出口。
|
||||
* 依赖:AdminNav、vue-router、admin-nav.store。
|
||||
* 逻辑:AdminNav 统一承担模块和二级目录导航,内容区保持全宽展示当前页面。
|
||||
* 逻辑:AdminNav 统一承担模块和二级目录导航;lg 起侧栏与内容并排,
|
||||
* 小于 lg(含 768px)上下堆叠,避免运维诊断页主区被侧栏挤窄。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from 'vue';
|
||||
@@ -27,7 +28,7 @@ onMounted(() => {
|
||||
<div class="page-shell min-h-screen font-sans flex flex-col">
|
||||
<header class="app-header px-6">
|
||||
<div class="flex items-center gap-4">
|
||||
<button type="button" class="btn-icon-ds md:block hidden" @click="navStore.toggleSidebar()">
|
||||
<button type="button" class="btn-icon-ds lg:block hidden" @click="navStore.toggleSidebar()">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M9 3v18"/></svg>
|
||||
</button>
|
||||
<button type="button" class="btn-icon-ds" @click="router.push('/workspace')">
|
||||
@@ -43,7 +44,8 @@ onMounted(() => {
|
||||
<AppHeaderTools />
|
||||
</header>
|
||||
|
||||
<main class="flex-1 w-full mx-auto px-4 md:px-8 py-6 md:py-8 flex flex-col md:flex-row gap-8 items-start">
|
||||
<!-- lg 起才并排侧栏;768px 平板保持上下堆叠,避免诊断等运维页主内容被挤窄 -->
|
||||
<main class="flex-1 w-full mx-auto px-4 md:px-8 py-6 md:py-8 flex flex-col lg:flex-row gap-6 lg:gap-8 items-start">
|
||||
<AdminNav />
|
||||
<section class="flex-1 min-w-0 w-full space-y-8">
|
||||
<router-view />
|
||||
|
||||
+30
-7
@@ -1,26 +1,39 @@
|
||||
<!--
|
||||
features/chat/components/shipping-review/ReviewBuildEligibilityPanel.vue
|
||||
用途:展示建单前资格摘要(can_build、阻断原因、行级 Reservation 与库存候选)。
|
||||
依赖:vue-i18n、ShippingOrderReviewBuildEligibility 类型。
|
||||
逻辑:ShippingOrderReviewView 传入 draft.build_eligibility;只读展示,不发起写请求。
|
||||
用途:展示建单前资格摘要(can_build、阻断原因、行级 Reservation 与库存候选)及 Gate 恢复卡片。
|
||||
依赖:vue-i18n、ProcessGateRecoveryCard、ShippingOrderReviewBuildEligibility 类型。
|
||||
逻辑:ShippingOrderReviewView 传入 draft.build_eligibility 与 case.process_gate;只读展示资格,Gate 动作可导航/POST。
|
||||
-->
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { ShippingOrderReviewBuildEligibility } from '@/features/chat/types/shipping.api.types';
|
||||
import ProcessGateRecoveryCard from '@/features/shipping-process-gates/components/ProcessGateRecoveryCard.vue';
|
||||
import type {
|
||||
ShippingOrderReviewBuildEligibility,
|
||||
ShippingProcessGateUserSummary,
|
||||
} from '@/features/chat/types/shipping.api.types';
|
||||
import type { ProcessGateNavigationContext } from '@/features/shipping-process-gates/composables/processGateNavigation';
|
||||
|
||||
const props = defineProps<{
|
||||
eligibility: ShippingOrderReviewBuildEligibility | null;
|
||||
processGate?: ShippingProcessGateUserSummary | null;
|
||||
canHandleGate?: boolean;
|
||||
navigationContext?: ProcessGateNavigationContext;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
gateRefreshed: [];
|
||||
}>();
|
||||
|
||||
const { t, te } = useI18n();
|
||||
const canHandle = computed(() => props.canHandleGate !== false);
|
||||
|
||||
/**
|
||||
* 解析建单资格状态文案。
|
||||
*/
|
||||
function statusLabel(status: string): string {
|
||||
const key = `chat.shippingOrderReview.buildEligibility.status.${status}`;
|
||||
return te(key) ? t(key) : status;
|
||||
return te(key) ? t(key) : t('chat.shippingOrderReview.buildEligibility.status.unknown');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -30,7 +43,7 @@ function blockReasonLabel(reason?: string | null): string {
|
||||
const normalized = String(reason || '').trim();
|
||||
if (!normalized) return '—';
|
||||
const key = `chat.shippingOrderReview.buildEligibility.blockReasons.${normalized}`;
|
||||
return te(key) ? t(key) : normalized;
|
||||
return te(key) ? t(key) : t('chat.shippingOrderReview.buildEligibility.blockReasons.unknown');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,7 +53,7 @@ function routingStatusLabel(status?: string | null): string {
|
||||
const normalized = String(status || '').trim();
|
||||
if (!normalized) return '—';
|
||||
const key = `chat.shippingOrderReview.buildEligibility.routingStatus.${normalized}`;
|
||||
return te(key) ? t(key) : normalized;
|
||||
return te(key) ? t(key) : t('chat.shippingOrderReview.buildEligibility.routingStatus.unknown');
|
||||
}
|
||||
|
||||
/** 未满足建单资格的明细行。 */
|
||||
@@ -60,6 +73,15 @@ const blockingSummary = computed(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="space-y-4">
|
||||
<ProcessGateRecoveryCard
|
||||
v-if="processGate?.current_blocking_gate"
|
||||
:summary="processGate"
|
||||
:can-handle="canHandle"
|
||||
:navigation-context="navigationContext"
|
||||
@refreshed="emit('gateRefreshed')"
|
||||
@refresh-needed="emit('gateRefreshed')"
|
||||
/>
|
||||
<section
|
||||
v-if="eligibility"
|
||||
class="rounded-xl border border-slate-200 bg-white p-4 shadow-sm dark:border-slate-800 dark:bg-slate-900"
|
||||
@@ -164,4 +186,5 @@ const blockingSummary = computed(() => {
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
@@ -5,6 +5,7 @@
|
||||
* orderExtractionProgressDisplay、Workflow 计数投影、vue-router、vue-i18n。
|
||||
* 逻辑:有 Workflow 投影时优先展示统一 counts;否则回退 handling_items / primary_notice;
|
||||
* 「查看处理详情」挂载详情抽屉;抽屉内证据/复核入口携带 focus+document_id 打开复核页;
|
||||
* 用户界面只展示业务原因,内部错误码仅保留在管理员审计中;
|
||||
* 文档与时间线加载失败支持独立就地重试;右侧 ShippingWorkflowTimeline 承接逐 PDF 明细。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
@@ -19,8 +20,10 @@ import type {
|
||||
import type {
|
||||
ShippingOrderExtractionDocumentResult,
|
||||
ShippingOrderExtractionProgressEvent,
|
||||
ShippingProcessGateUserSummary,
|
||||
ShippingWorkflowItemCounts,
|
||||
} from '../../types/shipping.api.types';
|
||||
import ProcessGateRecoveryCard from '@/features/shipping-process-gates/components/ProcessGateRecoveryCard.vue';
|
||||
import {
|
||||
listWorkspaceShippingOrderExtractionDocuments,
|
||||
listWorkspaceShippingOrderExtractionProgressEvents,
|
||||
@@ -60,6 +63,22 @@ const confirmCancelOpen = ref(false);
|
||||
const cancelReason = ref('');
|
||||
const injectedWorkflow = inject(SHIPPING_WORKFLOW_KEY, null);
|
||||
|
||||
/**
|
||||
* 从 Workflow Items 中取首个阻断 Gate 摘要,供 Run 级卡片展示。
|
||||
*/
|
||||
const runLevelProcessGate = computed((): ShippingProcessGateUserSummary | null => {
|
||||
const items = injectedWorkflow?.items.value || [];
|
||||
for (const item of items) {
|
||||
if (item.process_gate?.current_blocking_gate) return item.process_gate;
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
const gateNavigationContext = computed(() => ({
|
||||
agentId: String(route.params.agentId || ''),
|
||||
conversationId: String(route.query.conversation_id || ''),
|
||||
}));
|
||||
|
||||
const detailsOpen = ref(false);
|
||||
const detailsLoading = ref(false);
|
||||
const detailsLoadFailed = ref(false);
|
||||
@@ -249,18 +268,7 @@ function handlingTitle(item: ShippingOrderExtractionHandlingItemState): string {
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析原因码是否已有本地化文案。
|
||||
* @param code - 原因码
|
||||
*/
|
||||
function hasReasonLabel(code: string): boolean {
|
||||
const normalized = String(code || '').trim();
|
||||
if (!normalized) return false;
|
||||
return te(`chat.shippingOrderExtractionReason.${normalized}`)
|
||||
|| te(`chat.shippingOrderExtractionHandling.reason.${normalized}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析原因码文案;未知码回退通用提示(原始码放入技术详情)。
|
||||
* 解析原因码文案;未知或内部技术码统一回退为可执行的业务提示。
|
||||
* @param code - 原因码
|
||||
*/
|
||||
function reasonLabel(code: string): string {
|
||||
@@ -272,16 +280,6 @@ function reasonLabel(code: string): string {
|
||||
return te(freezeKey) ? t(freezeKey) : t('chat.shippingOrderExtractionReasonUnknown');
|
||||
}
|
||||
|
||||
/**
|
||||
* 收集事项中无本地化文案的原因码,供可展开技术详情展示。
|
||||
* @param item - 处理事项
|
||||
*/
|
||||
function unknownReasonCodes(item: ShippingOrderExtractionHandlingItemState): string[] {
|
||||
return (item.reasonCodes || [])
|
||||
.map((code) => String(code || '').trim())
|
||||
.filter((code) => code && !hasReasonLabel(code));
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开订单复核工作台(Chat order-review 模式)。
|
||||
* @param options.documentId - 可选,定位到具体 PDF
|
||||
@@ -536,6 +534,16 @@ function openCancelConfirm() {
|
||||
<span v-if="workflowLastActivityLabel" class="ml-1">· {{ workflowLastActivityLabel }}</span>
|
||||
</div>
|
||||
|
||||
<ProcessGateRecoveryCard
|
||||
v-if="runLevelProcessGate?.current_blocking_gate"
|
||||
class="mt-2"
|
||||
:summary="runLevelProcessGate"
|
||||
:can-handle="true"
|
||||
:navigation-context="gateNavigationContext"
|
||||
@refreshed="emit('refresh')"
|
||||
@refresh-needed="emit('refresh')"
|
||||
/>
|
||||
|
||||
<div
|
||||
v-if="handlingItems.length"
|
||||
class="mt-2 space-y-1.5"
|
||||
@@ -569,18 +577,6 @@ function openCancelConfirm() {
|
||||
<div v-if="item.reasonCodes.length" class="mt-1 opacity-80">
|
||||
{{ t('chat.shippingOrderExtractionHandling.reasonPrefix') }}
|
||||
{{ item.reasonCodes.slice(0, 4).map(reasonLabel).join(';') }}
|
||||
<details
|
||||
v-if="unknownReasonCodes(item).length"
|
||||
class="mt-1"
|
||||
data-testid="shipping-order-extraction-reason-tech"
|
||||
>
|
||||
<summary class="cursor-pointer opacity-90">
|
||||
{{ t('chat.shippingOrderExtractionReasonTechDetails') }}
|
||||
</summary>
|
||||
<code class="mt-1 block break-all text-[11px]">
|
||||
{{ unknownReasonCodes(item).join(', ') }}
|
||||
</code>
|
||||
</details>
|
||||
</div>
|
||||
<div
|
||||
v-if="affectedRows(item).length"
|
||||
|
||||
@@ -4,14 +4,17 @@
|
||||
* 依赖:vue-i18n、useMessage、useShippingNoticeWorkflow(inject 或自建)、DetailDrawer、ReasonDialog。
|
||||
* 逻辑:多批次时展示切换器;Items 以文件名为主标题;
|
||||
* 分组进行中/待处理/待复核/待人工上传登记/失败/已完成(登记前不得进已完成);
|
||||
* 「仅看待处理」过滤;查看进度 / 取消 / 重试重识别;取消与重识别用应用内原因弹窗。
|
||||
* 「仅看待处理」过滤;待复核项提供直接进入复核工作台;查看进度 / 取消 / 重试重识别;
|
||||
* 取消与重识别用应用内原因弹窗。侧栏在桌面端可收窄,在窄屏自动占满宽度。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
import { computed, inject, ref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { ChevronDown, ChevronRight, RefreshCw } from 'lucide-vue-next';
|
||||
import { BusinessError } from '@/shared/api/client';
|
||||
import { useMessage } from '@/shared/composables/useMessage';
|
||||
import ProcessGateRecoveryCard from '@/features/shipping-process-gates/components/ProcessGateRecoveryCard.vue';
|
||||
import {
|
||||
getWorkspaceShippingWorkflowItem,
|
||||
} from '@/features/chat/api/shipping.api';
|
||||
@@ -39,6 +42,13 @@ const props = defineProps<{
|
||||
|
||||
const { t, te, locale } = useI18n();
|
||||
const msg = useMessage();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const gateNavigationContext = computed(() => ({
|
||||
agentId: String(route.params.agentId || ''),
|
||||
conversationId: String(props.conversationId || route.query.conversation_id || ''),
|
||||
}));
|
||||
|
||||
const injected = inject(SHIPPING_WORKFLOW_KEY, null);
|
||||
/** 父级已 provide/传入时本地 composable 以空 conversationId 待机,避免双轮询。 */
|
||||
@@ -72,6 +82,31 @@ const items = computed((): ShippingWorkflowItem[] => ctl.value.items.value);
|
||||
const loading = computed(() => ctl.value.loading.value);
|
||||
const error = computed(() => ctl.value.error.value);
|
||||
|
||||
/**
|
||||
* 打开当前 PDF 对应的人工复核工作台。
|
||||
* 核心逻辑:复核入口必须复用当前 WorkflowItem 的 Run/Case/文档上下文,
|
||||
* 避免用户从侧栏进入后还要重新寻找待处理文件。
|
||||
*/
|
||||
async function openReview(item: ShippingWorkflowItem) {
|
||||
const runNo = String(item.current_run_no || '').trim();
|
||||
if (!runNo) return;
|
||||
const query: Record<string, string> = {
|
||||
mode: 'order-review',
|
||||
run_no: runNo,
|
||||
focus: 'draft',
|
||||
document_id: String(item.current_document_id || ''),
|
||||
};
|
||||
const caseNo = String(item.current_case_no || '').trim();
|
||||
if (caseNo) query.case_no = caseNo;
|
||||
const conversationId = String(props.conversationId || route.query.conversation_id || '').trim();
|
||||
if (conversationId) query.conversation_id = conversationId;
|
||||
await router.push({
|
||||
name: 'Chat',
|
||||
params: { agentId: String(route.params.agentId || '') },
|
||||
query,
|
||||
});
|
||||
}
|
||||
|
||||
const counts = computed(() => workflow.value?.counts || {
|
||||
total: items.value.length,
|
||||
processing: 0,
|
||||
@@ -202,7 +237,7 @@ const groupOrder: ItemGroupKey[] = [
|
||||
*/
|
||||
function statusLabel(status: string): string {
|
||||
const key = `chat.shippingWorkflow.itemStatus.${status}`;
|
||||
return te(key) ? t(key) : status;
|
||||
return te(key) ? t(key) : t('chat.shippingWorkflow.itemStatus.unknown');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -286,6 +321,36 @@ function openReparseDialog(item: ShippingWorkflowItem) {
|
||||
reasonDialogOpen.value = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将重新识别失败转换为可执行提示,而不是直接展示内部配置错误。
|
||||
* @param error - API 层 BusinessError 或未知异常
|
||||
* @returns 面向业务人员的分层错误提示
|
||||
*/
|
||||
function reparseErrorMessage(error: unknown): { title: string; message: string } {
|
||||
if (!(error instanceof BusinessError)) {
|
||||
return { title: t('chat.shippingWorkflow.reparseError.title'), message: t('chat.shippingWorkflow.reparseError.generic') };
|
||||
}
|
||||
const details = error.details || {};
|
||||
const code = String(error.code || '').toUpperCase();
|
||||
const requestId = error.requestId ? `\n${t('chat.shippingWorkflow.reparseError.requestId', { id: error.requestId })}` : '';
|
||||
if (code.includes('SCHEMA_VERSION_INVALID') || code.includes('SNAPSHOT_OBSOLETE') || code.includes('CANDIDATE_SOURCE_CHANGED')) {
|
||||
return {
|
||||
title: t('chat.shippingWorkflow.reparseError.title'),
|
||||
message: `${t('chat.shippingWorkflow.reparseError.schemaUnavailable')}\n${t('chat.shippingWorkflow.reparseError.fallback')}\n${t('chat.shippingWorkflow.reparseError.contactAdmin')}${requestId}`,
|
||||
};
|
||||
}
|
||||
if (code.includes('REPARSE_PENDING')) {
|
||||
return { title: t('chat.shippingWorkflow.reparseError.title'), message: t('chat.shippingWorkflow.reparseError.pending') };
|
||||
}
|
||||
const fallback = details.fallback_available === true
|
||||
? `\n${t('chat.shippingWorkflow.reparseError.fallback')}`
|
||||
: '';
|
||||
return {
|
||||
title: t('chat.shippingWorkflow.reparseError.title'),
|
||||
message: `${error.message || t('chat.shippingWorkflow.reparseError.generic')}${fallback}${requestId}`,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 原因弹窗确认:按 action 取消或重识别。
|
||||
*/
|
||||
@@ -316,8 +381,7 @@ async function onReasonConfirm(payload: { reason: string; comment?: string }) {
|
||||
// 失败时关闭原因确认框,避免与错误提示双遮罩。
|
||||
reasonDialogOpen.value = false;
|
||||
reasonDialogItem.value = null;
|
||||
const message = err instanceof BusinessError ? err.message : t('errors.generic');
|
||||
msg.error(message);
|
||||
msg.error(reparseErrorMessage(err));
|
||||
} finally {
|
||||
actionBusyItemNo.value = null;
|
||||
}
|
||||
@@ -333,7 +397,8 @@ watch(
|
||||
|
||||
<template>
|
||||
<aside
|
||||
class="flex w-72 shrink-0 flex-col border-l border-default bg-surface shadow-[-8px_0_24px_rgba(15,23,42,0.04)]"
|
||||
class="flex shrink-0 flex-col border-l border-default bg-surface shadow-[-8px_0_24px_rgba(15,23,42,0.04)] transition-[width] duration-200"
|
||||
:class="collapsed ? 'w-14 md:w-14' : 'w-full md:w-72'"
|
||||
data-testid="shipping-workflow-timeline"
|
||||
>
|
||||
<div class="flex w-full items-center gap-1 border-b border-default px-2 py-2">
|
||||
@@ -342,7 +407,7 @@ watch(
|
||||
class="flex min-w-0 flex-1 items-center justify-between gap-2 rounded-md px-1 py-1 text-left hover:bg-surface-muted/60"
|
||||
@click="collapsed = !collapsed"
|
||||
>
|
||||
<div class="min-w-0">
|
||||
<div v-if="!collapsed" class="min-w-0">
|
||||
<div class="text-sm font-semibold text-primary">
|
||||
{{ t('chat.shippingWorkflow.title') }}
|
||||
</div>
|
||||
@@ -528,7 +593,26 @@ watch(
|
||||
<div v-if="item.last_activity_at || item.updated_at" class="mt-0.5 text-[11px] text-muted">
|
||||
{{ formatUpdatedLabel(item.last_activity_at || item.updated_at) }}
|
||||
</div>
|
||||
<ProcessGateRecoveryCard
|
||||
v-if="item.process_gate?.current_blocking_gate"
|
||||
class="mt-2"
|
||||
:summary="item.process_gate"
|
||||
:can-handle="true"
|
||||
:navigation-context="gateNavigationContext"
|
||||
@refreshed="() => void ctl.refresh()"
|
||||
@refresh-needed="() => void ctl.refresh()"
|
||||
/>
|
||||
<div class="mt-2 flex flex-wrap gap-2">
|
||||
<button
|
||||
v-if="groupKey === 'pending_review' && item.current_run_no"
|
||||
type="button"
|
||||
class="inline-flex items-center gap-1 rounded-md bg-brand-600 px-2.5 py-1 text-[11px] font-semibold text-white shadow-sm hover:bg-brand-700 disabled:opacity-50"
|
||||
:disabled="actionBusyItemNo === item.item_no"
|
||||
data-testid="shipping-workflow-action-open-review"
|
||||
@click="openReview(item)"
|
||||
>
|
||||
{{ t('chat.shippingWorkflow.actions.openReview') }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="inline-flex items-center gap-1 text-[11px] font-medium text-brand-700 hover:underline"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* 依赖:无(纯类型模块)。
|
||||
* 逻辑:shipping.api.ts 与 Chat/工作台组件统一引用本文件 DTO 类型。
|
||||
* 阶段 0 冻结用户可见阶段、健康提示、取消元数据与审计 DTO;写路径与 UI 在后续阶段启用。
|
||||
* 门禁恢复 Phase 1:ShippingProcessGate* 联合类型与 Python process_gate_contract 对齐。
|
||||
*/
|
||||
export type InventorySourceStatus =
|
||||
| 'unresolved'
|
||||
@@ -218,6 +219,138 @@ export interface ShippingProcessFieldGate {
|
||||
issues?: ShippingParseIssue[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 全门禁中断恢复 — 业务门禁编码(与 process_gate_contract.PROCESS_GATE_CODES 对齐)。
|
||||
* Phase 1 仅冻结类型;统一 Execution API 在后续阶段接线。
|
||||
*/
|
||||
export type ShippingProcessGateCode =
|
||||
| 'document_materialization'
|
||||
| 'layout_parsing'
|
||||
| 'document_profile_routing'
|
||||
| 'order_field_extraction'
|
||||
| 'field_completeness'
|
||||
| 'reservation_validation'
|
||||
| 'customer_resolution'
|
||||
| 'duplicate_detection'
|
||||
| 'field_conflict_resolution'
|
||||
| 'inventory_source_routing'
|
||||
| 'order_freeze_readiness'
|
||||
| 'task_creation'
|
||||
| 'inventory_preparation'
|
||||
| 'inventory_field_mapping'
|
||||
| 'inventory_matching'
|
||||
| 'inventory_sufficiency'
|
||||
| 'excel_readiness'
|
||||
| 'artifact_generation'
|
||||
| 'manual_upload_handoff';
|
||||
|
||||
/** 门禁实例状态(与 PROCESS_GATE_STATUSES 对齐)。 */
|
||||
export type ShippingProcessGateStatus =
|
||||
| 'pending'
|
||||
| 'queued'
|
||||
| 'running'
|
||||
| 'passed'
|
||||
| 'blocked_retryable'
|
||||
| 'blocked_manual'
|
||||
| 'waiting_external'
|
||||
| 'failed_terminal'
|
||||
| 'invalidated'
|
||||
| 'skipped';
|
||||
|
||||
/**
|
||||
* 服务端下发的主要恢复动作码(与 PROCESS_GATE_ACTION_CODES 对齐)。
|
||||
* 客户端禁止本地发明或提交起始阶段 / 目标状态 / Worker 名。
|
||||
*/
|
||||
export type ShippingProcessGateActionCode =
|
||||
| 'rematerialize_document'
|
||||
| 'retry_layout_parsing'
|
||||
| 'reroute_document_profile'
|
||||
| 'open_profile_review'
|
||||
| 'retry_order_extraction'
|
||||
| 'open_order_review'
|
||||
| 'edit_order_fields'
|
||||
| 'revalidate_reservation'
|
||||
| 'edit_reservation'
|
||||
| 'retry_customer_resolution'
|
||||
| 'confirm_customer'
|
||||
| 'retry_duplicate_detection'
|
||||
| 'adjudicate_duplicate'
|
||||
| 'resolve_field_conflicts'
|
||||
| 'retry_with_latest_rules'
|
||||
| 'open_inventory_source_review'
|
||||
| 'adopt_rule_suggestion'
|
||||
| 'keep_manual_inventory_decision'
|
||||
| 'recheck_freeze_readiness'
|
||||
| 'retry_task_creation'
|
||||
| 'retry_inventory_preparation'
|
||||
| 'poll_inventory_preparation'
|
||||
| 'upload_inventory_file'
|
||||
| 'retry_inventory_field_mapping'
|
||||
| 'confirm_inventory_field_mapping'
|
||||
| 'retry_inventory_matching'
|
||||
| 'open_inventory_match_review'
|
||||
| 'recheck_inventory_sufficiency'
|
||||
| 'open_shortage_review'
|
||||
| 'recheck_excel_readiness'
|
||||
| 'regenerate_excel_artifact'
|
||||
| 'regenerate_manual_upload_todo';
|
||||
|
||||
/** 门禁责任方(与 PROCESS_GATE_RESPONSIBLE_PARTIES 对齐)。 */
|
||||
export type ShippingProcessGateResponsibleParty =
|
||||
| 'system'
|
||||
| 'worker'
|
||||
| 'owner'
|
||||
| 'admin'
|
||||
| 'external';
|
||||
|
||||
/** Gate 用户安全投影(与 serialize_process_gate include_diagnostics=false 对齐)。 */
|
||||
export interface ShippingProcessGateProjection {
|
||||
gate_code: ShippingProcessGateCode | string;
|
||||
sequence_no: number;
|
||||
label?: string | null;
|
||||
status: ShippingProcessGateStatus | string;
|
||||
evaluation_version: number;
|
||||
blocking_reason_code?: string | null;
|
||||
blocking_reason?: Record<string, unknown> | null;
|
||||
findings?: Array<Record<string, unknown>>;
|
||||
next_action_code?: ShippingProcessGateActionCode | string | null;
|
||||
passed_at?: string | null;
|
||||
latest_attempt?: {
|
||||
attempt_no?: number;
|
||||
status?: string;
|
||||
} | null;
|
||||
}
|
||||
|
||||
/** Execution 用户 Gate 摘要(ui_state.process_gate / GET execution 对齐)。 */
|
||||
export interface ShippingProcessGateUserSummary {
|
||||
execution_no: string;
|
||||
status: string;
|
||||
current_blocking_gate?: ShippingProcessGateProjection | null;
|
||||
blocking_reason_code?: string | null;
|
||||
blocking_message?: string | null;
|
||||
next_action_code?: ShippingProcessGateActionCode | string | null;
|
||||
responsible_party?: ShippingProcessGateResponsibleParty | string | null;
|
||||
diagnostic_hint?: string | null;
|
||||
case_no?: string | null;
|
||||
review_case_no?: string | null;
|
||||
review_run_no?: string | null;
|
||||
task_no?: string | null;
|
||||
navigation?: {
|
||||
target?: 'order_review' | 'task_workspace' | string;
|
||||
focus?: string | null;
|
||||
run_no?: string | null;
|
||||
case_no?: string | null;
|
||||
task_no?: string | null;
|
||||
} | null;
|
||||
gates_track?: Array<{
|
||||
gate_code: ShippingProcessGateCode | string;
|
||||
label?: string | null;
|
||||
status: string;
|
||||
sequence_no: number;
|
||||
}>;
|
||||
current_findings?: Array<Record<string, unknown>>;
|
||||
}
|
||||
|
||||
export interface ShippingFieldEvidenceItem {
|
||||
field?: string;
|
||||
line_index?: number;
|
||||
@@ -468,8 +601,12 @@ export interface ShippingTaskUiState {
|
||||
allowed_actions?: string[] | null;
|
||||
/** STP 履约事实;仅后端投影,前端禁止二次推导 */
|
||||
stp_facts?: ShippingStpFacts | null;
|
||||
/** 统一 Gate 用户摘要(优先于 legacy action_buttons) */
|
||||
process_gate?: ShippingProcessGateUserSummary | null;
|
||||
};
|
||||
action_buttons: ShippingChatAction[];
|
||||
/** 顶层 Gate 摘要;与 summary.process_gate 同源 */
|
||||
process_gate?: ShippingProcessGateUserSummary | null;
|
||||
updated_at?: string | null;
|
||||
}
|
||||
|
||||
@@ -1061,6 +1198,33 @@ export interface ShippingOrderReviewRun {
|
||||
items: ShippingOrderReviewCaseSummary[];
|
||||
}
|
||||
|
||||
/** 库存路由规则版本摘要(行级投影 / 规则建议内复用)。 */
|
||||
export interface ShippingOrderReviewInventoryRuleVersion {
|
||||
rule_id?: number;
|
||||
rule_code?: string;
|
||||
version?: number;
|
||||
}
|
||||
|
||||
/** 库存路由命中规则摘要。 */
|
||||
export interface ShippingOrderReviewInventoryMatchedRule {
|
||||
rule_id?: number;
|
||||
rule_code?: string;
|
||||
version?: number;
|
||||
priority?: number;
|
||||
action_type?: string;
|
||||
scope?: string;
|
||||
}
|
||||
|
||||
/** 规则引擎产出的库存源建议;人工覆盖后仍可对照。 */
|
||||
export interface ShippingOrderReviewInventoryRuleSuggestion {
|
||||
source_codes?: string[];
|
||||
raw_source_codes?: string[];
|
||||
unavailable_source_codes?: string[];
|
||||
routing_status?: string;
|
||||
rule_versions?: ShippingOrderReviewInventoryRuleVersion[];
|
||||
matched_rule_ids?: number[];
|
||||
}
|
||||
|
||||
/** 建单前资格行级投影;与后端 validation.line_projections 对齐。 */
|
||||
export interface ShippingOrderReviewBuildEligibilityLineProjection {
|
||||
line_key?: string | null;
|
||||
@@ -1068,6 +1232,22 @@ export interface ShippingOrderReviewBuildEligibilityLineProjection {
|
||||
effective_reservation_id?: string | null;
|
||||
inventory_source_hint?: string | null;
|
||||
candidate_inventory_source_codes?: string[];
|
||||
/** 规则原始命中源(含不可用) */
|
||||
raw_rule_source_codes?: string[];
|
||||
/** 规则建议可用源 */
|
||||
rule_suggestion_source_codes?: string[];
|
||||
/** 规则命中但当前不可用的源 */
|
||||
unavailable_source_codes?: string[];
|
||||
/** 不可用源 → 原因文案 */
|
||||
unavailable_reasons?: Record<string, string>;
|
||||
matched_rule_ids?: number[];
|
||||
matched_rules?: ShippingOrderReviewInventoryMatchedRule[];
|
||||
rule_versions?: ShippingOrderReviewInventoryRuleVersion[];
|
||||
rule_suggestion?: ShippingOrderReviewInventoryRuleSuggestion;
|
||||
/** 人工结果与最新规则建议不一致,待采纳/保留 */
|
||||
suggestion_pending?: boolean;
|
||||
/** 与 rule_suggestion_source_codes 同义兼容字段 */
|
||||
rule_source_codes?: string[];
|
||||
routing_status?: string;
|
||||
can_build?: boolean;
|
||||
block_reason?: string | null;
|
||||
@@ -1093,6 +1273,20 @@ export interface ShippingOrderReviewInventoryCandidatesWrite {
|
||||
reason: string;
|
||||
}
|
||||
|
||||
/** 整单或行级重新匹配库存路由写请求。 */
|
||||
export interface ShippingOrderReviewInventoryRoutingRerouteWrite {
|
||||
expected_draft_version: number;
|
||||
idempotency_key?: string;
|
||||
line_key?: string;
|
||||
}
|
||||
|
||||
/** 采纳规则建议 / 保留人工路由写请求。 */
|
||||
export interface ShippingOrderReviewInventoryRoutingDecisionWrite {
|
||||
expected_draft_version: number;
|
||||
idempotency_key?: string;
|
||||
reason?: string;
|
||||
}
|
||||
|
||||
export interface ShippingOrderReviewCase {
|
||||
case_no: string;
|
||||
run_no: string;
|
||||
@@ -1114,6 +1308,7 @@ export interface ShippingOrderReviewCase {
|
||||
} | null;
|
||||
available_actions: string[];
|
||||
llm_suggestions?: ShippingOrderReviewLlmSuggestion[];
|
||||
process_gate?: ShippingProcessGateUserSummary | null;
|
||||
}
|
||||
|
||||
export interface ShippingOrderReviewConfirmResponse {
|
||||
@@ -1360,6 +1555,9 @@ export interface ShippingWorkflowItem {
|
||||
reparse_kind?: 'case_version' | 'failed_run_retry' | string | null;
|
||||
/** 详情接口 include_events=true 时附带。 */
|
||||
events?: ShippingWorkflowEvent[];
|
||||
/** 当前 WorkflowItem 版本关联 Execution 的用户 Gate 摘要。 */
|
||||
process_gate?: ShippingProcessGateUserSummary | null;
|
||||
gate_user_hint?: string | null;
|
||||
}
|
||||
|
||||
/** Workflow 批次投影;与 serialize_workflow 对齐。 */
|
||||
|
||||
@@ -5,10 +5,12 @@
|
||||
ReviewLineNoOverrideDialog、ReviewBuildEligibilityPanel、ReviewInventoryCandidatesPanel、
|
||||
ReviewWorkflowProgressPanel、ReviewLlmSuggestionPanel。
|
||||
逻辑:左 PDF 预览 + 中部订单编辑 + 右侧独立建单资格/库存候选门禁区(sticky);
|
||||
build_eligibility 驱动建单门禁与零候选时已启用库存源选择;破坏性操作二次确认;
|
||||
build_eligibility 驱动建单门禁、路由恢复(reroute / adopt / keep)与零候选时已启用库存源选择;
|
||||
破坏性操作二次确认;
|
||||
底部操作窄屏纵向堆叠(异常操作在上、保存/确认建单在下且确认最后);
|
||||
初始加载失败提供就地重试(再次调用 load);
|
||||
确认后挂载自动进度面板并轮询 Workflow Item;内部项次 line_no 编辑须经覆盖原因弹窗;
|
||||
确认后挂载自动进度面板;重识别按 WorkflowItem 真实阶段展示并在新版就绪后自动切换;
|
||||
内部项次 line_no 编辑须经覆盖原因弹窗;
|
||||
AI 建议请求/裁决走 useShippingOrderReview.requestSuggestion / decideSuggestion。
|
||||
-->
|
||||
<script setup lang="ts">
|
||||
@@ -53,7 +55,7 @@ const {
|
||||
draftConflictDiffLines,
|
||||
buildEligibility,
|
||||
canConfirmBuild,
|
||||
manualInventoryLines,
|
||||
routingRecoveryLines,
|
||||
isViewingHistoricalVersion,
|
||||
isReadOnly,
|
||||
loading,
|
||||
@@ -80,6 +82,9 @@ const {
|
||||
deleteLine,
|
||||
validate,
|
||||
setLineInventoryCandidates,
|
||||
rerouteInventoryRouting,
|
||||
adoptInventoryRoutingSuggestion,
|
||||
keepManualInventoryRouting,
|
||||
confirm,
|
||||
createManualDraft,
|
||||
markNonOrder,
|
||||
@@ -92,6 +97,10 @@ const {
|
||||
editable,
|
||||
showWorkflowProgress,
|
||||
workflowProgressPolling,
|
||||
reparseProgressActive,
|
||||
reparseProgressPolling,
|
||||
reparseProgressRefreshFailed,
|
||||
reparseProgressStage,
|
||||
} = useShippingOrderReview();
|
||||
const msg = useMessage();
|
||||
|
||||
@@ -100,6 +109,11 @@ const agentId = computed(() => String(route.params.agentId || ''));
|
||||
const conversationId = computed(() => String(page.conversationId || route.query.conversation_id || ''));
|
||||
const itemNoFromQuery = computed(() => String(route.query.item_no || ''));
|
||||
const reviewFocus = computed(() => String(route.query.focus || '').trim());
|
||||
/** Gate 恢复卡片导航上下文(复核台深链)。 */
|
||||
const reviewGateNavigationContext = computed(() => ({
|
||||
agentId: agentId.value,
|
||||
conversationId: conversationId.value,
|
||||
}));
|
||||
const focusedEvidenceRef = ref<{ fieldId: string; lineIndex?: number } | null>(null);
|
||||
|
||||
watch(
|
||||
@@ -291,8 +305,24 @@ const caseStatusLabel = (status: string) => {
|
||||
};
|
||||
const statusBannerText = computed(() => {
|
||||
if (!statusMessage.value) return '';
|
||||
return t(`chat.shippingOrderReview.statusBanner.${statusMessage.value}`);
|
||||
const key = `chat.shippingOrderReview.statusBanner.${statusMessage.value}`;
|
||||
return te(key) ? t(key) : t('chat.shippingOrderReview.statusBanner.unknown');
|
||||
});
|
||||
|
||||
/** 将服务端复核问题码转换为业务说明;未知代码不得直接展示给用户。 */
|
||||
const reviewIssueLabel = (code?: string) => {
|
||||
const normalized = String(code || '').trim();
|
||||
const key = `chat.shippingOrderReview.issueCodes.${normalized}`;
|
||||
return normalized && te(key) ? t(key) : t('chat.shippingOrderReview.issueCodes.unknown');
|
||||
};
|
||||
|
||||
/** 重识别阶段顺序;仅展示后端状态,不推算虚假百分比。 */
|
||||
const reparseProgressStages = ['submitted', 'layout_parsing', 'extracting', 'draft_ready'] as const;
|
||||
const reparseProgressIndex = computed(() => (
|
||||
reparseProgressStage.value === 'failed'
|
||||
? reparseProgressStages.indexOf('extracting')
|
||||
: reparseProgressStages.indexOf(reparseProgressStage.value)
|
||||
));
|
||||
const workItemVersionLabel = computed(() => {
|
||||
const versionNo = workItem.value?.current_version_no;
|
||||
if (!versionNo) return '';
|
||||
@@ -359,6 +389,27 @@ const submitInventoryCandidates = async (payload: { lineKey: string; sourceCodes
|
||||
await reportSave(() => setLineInventoryCandidates(payload.lineKey, payload.sourceCodes, payload.reason));
|
||||
};
|
||||
|
||||
/**
|
||||
* 重新匹配库存路由(行级或整单);进度复用 saving。
|
||||
*/
|
||||
const onInventoryRoutingReroute = async (lineKey?: string) => {
|
||||
await reportSave(() => rerouteInventoryRouting(lineKey));
|
||||
};
|
||||
|
||||
/**
|
||||
* 采纳待决规则建议。
|
||||
*/
|
||||
const onInventoryRoutingAdopt = async (payload: { lineKey: string; reason?: string }) => {
|
||||
await reportSave(() => adoptInventoryRoutingSuggestion(payload.lineKey, payload.reason));
|
||||
};
|
||||
|
||||
/**
|
||||
* 保留当前人工库存路由结果。
|
||||
*/
|
||||
const onInventoryRoutingKeep = async (payload: { lineKey: string; reason?: string }) => {
|
||||
await reportSave(() => keepManualInventoryRouting(payload.lineKey, payload.reason));
|
||||
};
|
||||
|
||||
/** 打开指定类型的二次确认弹窗。 */
|
||||
const openActionDialog = (action: ReviewConfirmAction) => {
|
||||
pendingAction.value = action;
|
||||
@@ -556,7 +607,10 @@ const selectVersionFromHistory = async (caseNo: string) => {
|
||||
*/
|
||||
const jumpToCurrentVersion = async () => {
|
||||
const target = await openCurrentVersion();
|
||||
if (!target) return;
|
||||
if (!target) {
|
||||
msg.warning(t('chat.shippingOrderReview.currentVersionUnavailable'));
|
||||
return;
|
||||
}
|
||||
await router.replace({
|
||||
query: {
|
||||
...route.query,
|
||||
@@ -776,6 +830,64 @@ watch(
|
||||
/>
|
||||
</div>
|
||||
|
||||
<section
|
||||
v-if="reparseProgressActive"
|
||||
class="mx-4 mt-3 rounded-xl border border-sky-200 bg-white p-4 shadow-sm dark:border-sky-900 dark:bg-slate-900"
|
||||
data-testid="review-reparse-progress"
|
||||
>
|
||||
<div class="flex flex-wrap items-start justify-between gap-2">
|
||||
<div>
|
||||
<h2 class="text-sm font-semibold">{{ t('chat.shippingOrderReview.reparseProgress.title') }}</h2>
|
||||
<p class="mt-0.5 text-xs text-slate-500 dark:text-slate-400">
|
||||
{{ t('chat.shippingOrderReview.reparseProgress.subtitle') }}
|
||||
</p>
|
||||
</div>
|
||||
<span v-if="reparseProgressPolling" class="text-xs text-sky-700 dark:text-sky-300">
|
||||
{{ t('chat.shippingOrderReview.reparseProgress.polling') }}
|
||||
</span>
|
||||
</div>
|
||||
<ol class="mt-3 grid gap-2 sm:grid-cols-4">
|
||||
<li
|
||||
v-for="(stage, index) in reparseProgressStages"
|
||||
:key="stage"
|
||||
class="rounded-lg border px-3 py-2 text-xs"
|
||||
:class="index < reparseProgressIndex
|
||||
? 'border-emerald-200 bg-emerald-50 text-emerald-900 dark:border-emerald-900 dark:bg-emerald-950/40 dark:text-emerald-100'
|
||||
: index === reparseProgressIndex
|
||||
? 'border-sky-300 bg-sky-50 text-sky-950 dark:border-sky-800 dark:bg-sky-950/40 dark:text-sky-100'
|
||||
: 'border-slate-200 bg-slate-50 text-slate-500 dark:border-slate-800 dark:bg-slate-950/40 dark:text-slate-400'"
|
||||
:data-testid="`review-reparse-stage-${stage}`"
|
||||
>
|
||||
<span class="font-semibold">{{ index + 1 }}.</span>
|
||||
{{ t(`chat.shippingOrderReview.reparseProgress.stages.${stage}`) }}
|
||||
</li>
|
||||
</ol>
|
||||
<p
|
||||
v-if="reparseProgressRefreshFailed"
|
||||
class="mt-3 text-xs text-amber-700 dark:text-amber-300"
|
||||
data-testid="review-reparse-refresh-failed"
|
||||
>
|
||||
{{ t('chat.shippingOrderReview.reparseProgress.refreshFailed') }}
|
||||
</p>
|
||||
<p
|
||||
v-if="reparseProgressStage === 'failed'"
|
||||
class="mt-3 flex flex-wrap items-center justify-between gap-2 rounded-lg border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-800 dark:border-rose-900 dark:bg-rose-950/40 dark:text-rose-200"
|
||||
data-testid="review-reparse-failed"
|
||||
>
|
||||
<span>{{ t('chat.shippingOrderReview.reparseProgress.failed') }}</span>
|
||||
<button
|
||||
v-if="activeCase?.available_actions.includes('reparse')"
|
||||
type="button"
|
||||
class="rounded border border-rose-300 px-2.5 py-1 font-medium hover:bg-rose-100 disabled:opacity-50 dark:border-rose-800 dark:hover:bg-rose-900/50"
|
||||
:disabled="saving"
|
||||
data-testid="review-reparse-retry"
|
||||
@click="openActionDialog('reparse')"
|
||||
>
|
||||
{{ t('chat.shippingOrderReview.reparseProgress.retry') }}
|
||||
</button>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<div v-if="loading" class="p-8 text-sm text-slate-600 dark:text-slate-300">{{ t('chat.shippingOrderReview.loading') }}</div>
|
||||
<div
|
||||
v-else-if="loadFailed"
|
||||
@@ -863,7 +975,9 @@ watch(
|
||||
|
||||
<div v-if="activeCase?.draft?.issues?.length" class="rounded-lg border border-amber-300 bg-amber-50 p-3 text-xs text-amber-950 dark:border-amber-800 dark:bg-amber-950/30 dark:text-amber-100">
|
||||
<div class="font-semibold">{{ t('chat.shippingOrderReview.issues') }}</div>
|
||||
<div v-for="issue in activeCase.draft.issues" :key="`${issue.code}-${issue.severity}`" class="mt-1">{{ issue.code }}</div>
|
||||
<div v-for="issue in activeCase.draft.issues" :key="`${issue.code}-${issue.severity}`" class="mt-1">
|
||||
{{ reviewIssueLabel(issue.code) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ReviewLlmSuggestionPanel
|
||||
@@ -1054,13 +1168,22 @@ watch(
|
||||
data-testid="review-build-gate-rail"
|
||||
:aria-label="t('chat.shippingOrderReview.buildGateRail')"
|
||||
>
|
||||
<ReviewBuildEligibilityPanel :eligibility="buildEligibility" />
|
||||
<ReviewBuildEligibilityPanel
|
||||
:eligibility="buildEligibility"
|
||||
:process-gate="activeCase?.process_gate"
|
||||
:can-handle-gate="editable"
|
||||
:navigation-context="reviewGateNavigationContext"
|
||||
@gate-refreshed="reloadLatestDraft"
|
||||
/>
|
||||
<ReviewInventoryCandidatesPanel
|
||||
:lines="manualInventoryLines"
|
||||
:lines="routingRecoveryLines"
|
||||
:enabled-source-codes="buildEligibility?.enabled_inventory_source_codes || []"
|
||||
:editable="editable"
|
||||
:saving="saving"
|
||||
@submit="submitInventoryCandidates"
|
||||
@reroute="onInventoryRoutingReroute"
|
||||
@adopt="onInventoryRoutingAdopt"
|
||||
@keep="onInventoryRoutingKeep"
|
||||
/>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
/**
|
||||
* features/shipping-process-gates/api/process-gates.api.ts
|
||||
* 用途:封装 Workspace / Admin 全门禁恢复 HTTP API。
|
||||
* 依赖:@/shared/api/client requestJson、process-gate.types。
|
||||
* 逻辑:由 useShippingProcessGateRecovery 与 ProcessGateRecoveryCard 调用;
|
||||
* 动作码仅使用服务端下发的 next_action_code / primary_next_action_code。
|
||||
*/
|
||||
import { requestJson } from '@/shared/api/client';
|
||||
import type {
|
||||
ShippingProcessGateActionRequest,
|
||||
ShippingProcessGateActionResponse,
|
||||
ShippingProcessGateAuditEventsPage,
|
||||
ShippingProcessGateUserSummary,
|
||||
} from '../types/process-gate.types';
|
||||
|
||||
const WORKSPACE_BASE = '/api/workspace/shipping-notice/process-executions';
|
||||
const ADMIN_BASE = '/api/admin/shipping-notice/process-executions';
|
||||
|
||||
export interface AdminProcessExecutionSummary {
|
||||
execution_no: string;
|
||||
status: string;
|
||||
current_gate_code?: string | null;
|
||||
primary_next_action_code?: string | null;
|
||||
responsible_party?: string | null;
|
||||
blocking_reason_code?: string | null;
|
||||
task_no?: string | null;
|
||||
workflow_item_id?: number | null;
|
||||
workflow_item_version_id?: number | null;
|
||||
review_case_id?: number | null;
|
||||
task_id?: number | null;
|
||||
lock_version?: number;
|
||||
updated_at?: string | null;
|
||||
}
|
||||
|
||||
export interface AdminProcessExecutionListFilters {
|
||||
status?: string;
|
||||
gate_code?: string;
|
||||
blocking_reason_code?: string;
|
||||
responsible_party?: string;
|
||||
q?: string;
|
||||
updated_from?: string;
|
||||
updated_to?: string;
|
||||
}
|
||||
|
||||
export interface AdminProcessExecutionListPage {
|
||||
items: AdminProcessExecutionSummary[];
|
||||
total: number;
|
||||
page: number;
|
||||
page_size: number;
|
||||
}
|
||||
|
||||
export interface AdminProcessExecutionDetail extends ShippingProcessGateUserSummary {
|
||||
current_gate?: Record<string, unknown> | null;
|
||||
current_blocking_gate?: ShippingProcessGateUserSummary['current_blocking_gate'];
|
||||
gates?: Array<Record<string, unknown>>;
|
||||
lock_version?: number;
|
||||
workflow_item_id?: number;
|
||||
workflow_item_version_id?: number;
|
||||
review_case_id?: number | null;
|
||||
task_id?: number | null;
|
||||
}
|
||||
|
||||
export interface AdminProcessGateAttemptsPayload {
|
||||
gate: Record<string, unknown>;
|
||||
/** 后端契约主字段 */
|
||||
items?: Array<Record<string, unknown>>;
|
||||
/** 与 items 同义的前端兼容别名 */
|
||||
attempts?: Array<Record<string, unknown>>;
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取 Execution 工作台投影。
|
||||
* @param executionNo - Execution 编号
|
||||
*/
|
||||
export async function getWorkspaceProcessExecution(
|
||||
executionNo: string,
|
||||
): Promise<ShippingProcessGateUserSummary> {
|
||||
return requestJson<ShippingProcessGateUserSummary>(`${WORKSPACE_BASE}/${encodeURIComponent(executionNo)}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交门禁恢复动作。
|
||||
* @param executionNo - Execution 编号
|
||||
* @param gateCode - 目标 gate_code
|
||||
* @param body - 契约内动作请求体
|
||||
*/
|
||||
export async function postWorkspaceProcessGateAction(
|
||||
executionNo: string,
|
||||
gateCode: string,
|
||||
body: ShippingProcessGateActionRequest,
|
||||
): Promise<ShippingProcessGateActionResponse> {
|
||||
return requestJson<ShippingProcessGateActionResponse>(
|
||||
`${WORKSPACE_BASE}/${encodeURIComponent(executionNo)}/gates/${encodeURIComponent(gateCode)}/actions`,
|
||||
{
|
||||
method: 'POST',
|
||||
body: JSON.stringify(body),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页读取 Admin Execution 摘要列表(支持 Gate/原因/责任方/时间/关键字筛选)。
|
||||
*/
|
||||
export async function listAdminProcessExecutions(
|
||||
page = 1,
|
||||
pageSize = 25,
|
||||
filters: AdminProcessExecutionListFilters | string = {},
|
||||
): Promise<AdminProcessExecutionListPage> {
|
||||
const normalized: AdminProcessExecutionListFilters =
|
||||
typeof filters === 'string' ? { status: filters } : (filters || {});
|
||||
const params = new URLSearchParams({
|
||||
page: String(page),
|
||||
page_size: String(pageSize),
|
||||
});
|
||||
(Object.entries(normalized) as Array<[keyof AdminProcessExecutionListFilters, string | undefined]>).forEach(
|
||||
([key, value]) => {
|
||||
const text = String(value || '').trim();
|
||||
if (text) params.set(key, text);
|
||||
},
|
||||
);
|
||||
return requestJson<AdminProcessExecutionListPage>(`${ADMIN_BASE}?${params.toString()}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取 Admin Execution 完整诊断投影。
|
||||
*/
|
||||
export async function getAdminProcessExecution(
|
||||
executionNo: string,
|
||||
): Promise<AdminProcessExecutionDetail> {
|
||||
return requestJson<AdminProcessExecutionDetail>(`${ADMIN_BASE}/${encodeURIComponent(executionNo)}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取指定 Gate 的全部 Attempt 摘要。
|
||||
*/
|
||||
export async function listAdminProcessGateAttempts(
|
||||
executionNo: string,
|
||||
gateCode: string,
|
||||
): Promise<AdminProcessGateAttemptsPayload> {
|
||||
return requestJson<AdminProcessGateAttemptsPayload>(
|
||||
`${ADMIN_BASE}/${encodeURIComponent(executionNo)}/gates/${encodeURIComponent(gateCode)}/attempts`,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页读取 Execution 关联 PROCESS_GATE 审计事件。
|
||||
* @param executionNo - Execution 编号
|
||||
* @param page - 页码
|
||||
* @param pageSize - 每页条数
|
||||
*/
|
||||
export async function listWorkspaceProcessGateAuditEvents(
|
||||
executionNo: string,
|
||||
page = 1,
|
||||
pageSize = 50,
|
||||
): Promise<ShippingProcessGateAuditEventsPage> {
|
||||
const params = new URLSearchParams({
|
||||
page: String(page),
|
||||
page_size: String(pageSize),
|
||||
});
|
||||
return requestJson<ShippingProcessGateAuditEventsPage>(
|
||||
`${WORKSPACE_BASE}/${encodeURIComponent(executionNo)}/audit-events?${params.toString()}`,
|
||||
);
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* features/shipping-process-gates/components/ProcessGateRecoveryCard.spec.ts
|
||||
* 用途:验证待处理事项卡片不展示未知内部编号和技术诊断文本。
|
||||
* 依赖:Vitest、Vue Test Utils、vue-i18n。
|
||||
* 逻辑:构造未知环节、动作及技术自由文本,断言全部回退为业务文案。
|
||||
*/
|
||||
import { mount } from '@vue/test-utils';
|
||||
import { createI18n } from 'vue-i18n';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import workspaceZhCn from '@/locales/zh-CN/workspace.json';
|
||||
import ProcessGateRecoveryCard from './ProcessGateRecoveryCard.vue';
|
||||
import type { ShippingProcessGateUserSummary } from '../types/process-gate.types';
|
||||
|
||||
const i18n = createI18n({
|
||||
legacy: false,
|
||||
locale: 'zh-CN',
|
||||
messages: { 'zh-CN': { workspace: workspaceZhCn } },
|
||||
});
|
||||
|
||||
describe('ProcessGateRecoveryCard', () => {
|
||||
it('does not expose internal gate, action or diagnostic text', () => {
|
||||
const summary: ShippingProcessGateUserSummary = {
|
||||
execution_no: 'EXEC-1',
|
||||
status: 'blocked',
|
||||
current_blocking_gate: {
|
||||
gate_code: 'auto_build_gate_quality_gate_passed',
|
||||
label: 'quality_gate_internal',
|
||||
status: 'blocked',
|
||||
sequence_no: 1,
|
||||
evaluation_version: 1,
|
||||
blocking_reason_code: 'internal_reason_code',
|
||||
next_action_code: 'internal_retry_action',
|
||||
},
|
||||
blocking_message: 'HTTP 500 error: node_id=abc',
|
||||
diagnostic_hint: 'traceback: C:\\service\\worker.py',
|
||||
};
|
||||
const wrapper = mount(ProcessGateRecoveryCard, {
|
||||
props: { summary, canHandle: true },
|
||||
global: { plugins: [i18n] },
|
||||
});
|
||||
const text = wrapper.text();
|
||||
expect(text).toContain('当前处理环节');
|
||||
expect(text).toContain('当前步骤');
|
||||
expect(text).toContain('继续处理');
|
||||
expect(text).toContain('当前步骤需要人工处理');
|
||||
for (const technicalText of [
|
||||
'auto_build_gate_quality_gate_passed', 'quality_gate_internal', 'internal_reason_code',
|
||||
'internal_retry_action', 'HTTP 500', 'node_id', 'traceback', 'worker.py',
|
||||
]) {
|
||||
expect(text).not.toContain(technicalText);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,138 @@
|
||||
/**
|
||||
* features/shipping-process-gates/components/ProcessGateRecoveryCard.vue
|
||||
* 用途:任务工作台展示当前待处理环节与服务端下发的主要处理按钮。
|
||||
* 依赖:useShippingProcessGateRecovery、processGateNavigation、ShippingProcessGateUserSummary。
|
||||
* 逻辑:导航类动作 router.push;POST 类动作调 Workspace API;409 触发 refreshed;
|
||||
* canHandle=false 时只读;禁止展示内部编号、原因码和技术诊断文本。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useShippingProcessGateRecovery } from '../composables/useShippingProcessGateRecovery';
|
||||
import type { ProcessGateNavigationContext } from '../composables/processGateNavigation';
|
||||
import type { ShippingProcessGateUserSummary } from '../types/process-gate.types';
|
||||
|
||||
const props = defineProps<{
|
||||
summary: ShippingProcessGateUserSummary | null | undefined;
|
||||
canHandle: boolean;
|
||||
navigationContext?: ProcessGateNavigationContext;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
refreshed: [];
|
||||
refreshNeeded: [];
|
||||
navigate: [];
|
||||
}>();
|
||||
|
||||
const { t, te } = useI18n();
|
||||
const { busy, submitPrimaryAction } = useShippingProcessGateRecovery();
|
||||
|
||||
const blockingGate = computed(() => props.summary?.current_blocking_gate || null);
|
||||
const nextActionCode = computed(() =>
|
||||
String(props.summary?.next_action_code || blockingGate.value?.next_action_code || '').trim(),
|
||||
);
|
||||
const hasRecoveryAction = computed(() => Boolean(blockingGate.value && nextActionCode.value));
|
||||
|
||||
/** 仅允许自然语言业务说明进入界面,内部标识、路径和异常信息统一隐藏。 */
|
||||
function safeBusinessText(value: unknown): string {
|
||||
const text = String(value || '').trim();
|
||||
if (!text) return '';
|
||||
const technicalPatterns = [
|
||||
/\b(?:workflow|schema|gate|node|traceback|exception|stack|sql|http|api|json)\b/i,
|
||||
/\b[a-z][a-z0-9]*_[a-z0-9_]+\b/i,
|
||||
/(?:^|\s)(?:[A-Z]:\\|\/[^\s]+\/[^\s]+)/,
|
||||
/(?:status|error|reason|code)\s*[:=]/i,
|
||||
/^(?:\{|\[)|(?:\}|\])$/,
|
||||
];
|
||||
return technicalPatterns.some((pattern) => pattern.test(text)) ? '' : text;
|
||||
}
|
||||
|
||||
const gateLabel = computed(() =>
|
||||
safeBusinessText(blockingGate.value?.label)
|
||||
|| t('workspace.shippingNotice.processGate.unknownStep'),
|
||||
);
|
||||
const actionLabel = computed(() => {
|
||||
const code = nextActionCode.value;
|
||||
if (!code) return '';
|
||||
const key = `workspace.shippingNotice.processGate.actionCodes.${code}`;
|
||||
return te(key) ? t(key) : t('workspace.shippingNotice.processGate.continueAction');
|
||||
});
|
||||
|
||||
/**
|
||||
* 用户可见阻断说明:优先 blocking_message,其次 i18n 原因码,禁止展示原始 code。
|
||||
*/
|
||||
const blockingReasonLabel = computed(() => {
|
||||
const message = safeBusinessText(props.summary?.blocking_message);
|
||||
if (message) return message;
|
||||
const code = String(
|
||||
props.summary?.blocking_reason_code
|
||||
|| blockingGate.value?.blocking_reason_code
|
||||
|| '',
|
||||
).trim();
|
||||
if (!code) return '';
|
||||
const key = `workspace.shippingNotice.processGate.reasons.${code}`;
|
||||
return te(key) ? t(key) : t('workspace.shippingNotice.processGate.genericBlocking');
|
||||
});
|
||||
|
||||
const diagnosticHint = computed(() => safeBusinessText(props.summary?.diagnostic_hint));
|
||||
|
||||
/**
|
||||
* 触发恢复动作:导航 / POST;409 时通知父级刷新最新 Gate 投影。
|
||||
*/
|
||||
async function runPrimaryAction() {
|
||||
if (!props.summary || !props.canHandle || busy.value) return;
|
||||
const result = await submitPrimaryAction(props.summary, {
|
||||
navigationContext: props.navigationContext,
|
||||
});
|
||||
if (result.outcome === 'navigated') {
|
||||
emit('navigate');
|
||||
return;
|
||||
}
|
||||
if (result.outcome === 'submitted') {
|
||||
emit('refreshed');
|
||||
return;
|
||||
}
|
||||
if (result.outcome === 'refresh_needed') {
|
||||
emit('refreshNeeded');
|
||||
emit('refreshed');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section
|
||||
v-if="summary && blockingGate"
|
||||
class="rounded-2xl border border-amber-200/80 bg-amber-50/60 px-4 py-3 dark:border-amber-900/50 dark:bg-amber-950/20"
|
||||
>
|
||||
<div class="mb-2 text-xs font-semibold uppercase tracking-wide text-amber-800 dark:text-amber-200">
|
||||
{{ $t('workspace.shippingNotice.processGate.title') }}
|
||||
</div>
|
||||
<dl class="grid gap-2 text-sm">
|
||||
<div>
|
||||
<dt class="text-muted">{{ $t('workspace.shippingNotice.processGate.currentGate') }}</dt>
|
||||
<dd class="font-medium text-secondary">{{ gateLabel }}</dd>
|
||||
</div>
|
||||
<div v-if="blockingReasonLabel">
|
||||
<dt class="text-muted">{{ $t('workspace.shippingNotice.processGate.blockingMessage') }}</dt>
|
||||
<dd class="text-secondary">{{ blockingReasonLabel }}</dd>
|
||||
</div>
|
||||
<div v-if="diagnosticHint">
|
||||
<dt class="text-muted">{{ $t('workspace.shippingNotice.processGate.diagnosticHint') }}</dt>
|
||||
<dd class="text-secondary">{{ diagnosticHint }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
<div v-if="hasRecoveryAction" class="mt-3 flex flex-wrap items-center gap-2">
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-xl bg-primary px-3 py-1.5 text-sm font-medium text-on-primary disabled:opacity-60"
|
||||
:disabled="!canHandle || busy"
|
||||
@click="runPrimaryAction"
|
||||
>
|
||||
{{ busy ? $t('workspace.shippingNotice.processGate.submitting') : actionLabel }}
|
||||
</button>
|
||||
<span v-if="!canHandle" class="text-xs text-muted">
|
||||
{{ $t('workspace.shippingNotice.todo.adminViewOnlyShort') }}
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
* features/shipping-process-gates/composables/processGateNavigation.ts
|
||||
* 用途:将服务端下发的门禁恢复动作映射为 Vue Router 深链(复核台 / 任务工作台)。
|
||||
* 依赖:process-gate.types、vue-router RouteLocationRaw。
|
||||
* 逻辑:与 process_gate_projection.navigation 对齐;禁止本地发明 action_code。
|
||||
*/
|
||||
import type { RouteLocationRaw } from 'vue-router';
|
||||
import type { ShippingProcessGateUserSummary } from '../types/process-gate.types';
|
||||
|
||||
/** 点击后仅导航、不 POST 的人工入口动作(regenerate_manual_upload_todo 除外)。 */
|
||||
export const PROCESS_GATE_NAVIGATION_ACTIONS = new Set<string>([
|
||||
'open_order_review',
|
||||
'open_inventory_source_review',
|
||||
'open_profile_review',
|
||||
'edit_order_fields',
|
||||
'edit_reservation',
|
||||
'confirm_customer',
|
||||
'adjudicate_duplicate',
|
||||
'resolve_field_conflicts',
|
||||
'open_inventory_match_review',
|
||||
'open_shortage_review',
|
||||
'upload_inventory_file',
|
||||
'confirm_inventory_field_mapping',
|
||||
]);
|
||||
|
||||
export interface ProcessGateNavigationContext {
|
||||
agentId?: string;
|
||||
conversationId?: string;
|
||||
preserveQuery?: Record<string, string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断动作码是否属于前端导航类恢复动作。
|
||||
*/
|
||||
export function isProcessGateNavigationAction(actionCode: string): boolean {
|
||||
return PROCESS_GATE_NAVIGATION_ACTIONS.has(String(actionCode || '').trim());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据 Gate 摘要与动作码构建 router 目标。
|
||||
* 核心逻辑:优先 summary.navigation;缺省时回退 review_run_no / case_no / task_no。
|
||||
* @returns 可 push 的路由;缺关键编号时 null
|
||||
*/
|
||||
export function buildProcessGateNavigationRoute(
|
||||
summary: ShippingProcessGateUserSummary,
|
||||
actionCode: string,
|
||||
context: ProcessGateNavigationContext = {},
|
||||
): RouteLocationRaw | null {
|
||||
const code = String(actionCode || '').trim();
|
||||
if (!isProcessGateNavigationAction(code)) return null;
|
||||
|
||||
const nav = summary.navigation;
|
||||
const runNo = String(nav?.run_no || summary.review_run_no || '').trim();
|
||||
const caseNo = String(nav?.case_no || summary.review_case_no || summary.case_no || '').trim();
|
||||
const taskNo = String(nav?.task_no || summary.task_no || '').trim();
|
||||
const focus = String(nav?.focus || 'draft').trim();
|
||||
|
||||
if (nav?.target === 'task_workspace' || code === 'upload_inventory_file') {
|
||||
if (!taskNo) return null;
|
||||
return { name: 'workspace-shipping-tasks', params: { taskNo } };
|
||||
}
|
||||
|
||||
if (!runNo) return null;
|
||||
const query: Record<string, string> = {
|
||||
...(context.preserveQuery || {}),
|
||||
mode: 'order-review',
|
||||
run_no: runNo,
|
||||
};
|
||||
if (caseNo) query.case = caseNo;
|
||||
if (focus) query.focus = focus;
|
||||
if (context.conversationId) query.conversation_id = context.conversationId;
|
||||
if (!context.agentId) return null;
|
||||
return {
|
||||
name: 'Chat',
|
||||
params: { agentId: context.agentId },
|
||||
query,
|
||||
};
|
||||
}
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* features/shipping-process-gates/composables/useShippingProcessGateRecovery.ts
|
||||
* 用途:任务工作台门禁恢复动作编排(导航、幂等键、版本锁、409 刷新)。
|
||||
* 依赖:process-gates.api、processGateNavigation、process-gate.types、useMessage。
|
||||
* 逻辑:ProcessGateRecoveryCard 调用 submitPrimaryAction;禁止本地发明 action_code。
|
||||
*/
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { BusinessError, resolveLocalizedErrorMessage } from '@/shared/api/client';
|
||||
import { useMessage } from '@/shared/composables/useMessage';
|
||||
import { postWorkspaceProcessGateAction } from '../api/process-gates.api';
|
||||
import type {
|
||||
ShippingProcessGateActionCode,
|
||||
ShippingProcessGateUserSummary,
|
||||
} from '../types/process-gate.types';
|
||||
import {
|
||||
buildProcessGateNavigationRoute,
|
||||
isProcessGateNavigationAction,
|
||||
type ProcessGateNavigationContext,
|
||||
} from './processGateNavigation';
|
||||
|
||||
export type ProcessGateActionOutcome =
|
||||
| 'submitted'
|
||||
| 'navigated'
|
||||
| 'refresh_needed'
|
||||
| 'failed'
|
||||
| 'noop';
|
||||
|
||||
export interface ProcessGateActionResult {
|
||||
outcome: ProcessGateActionOutcome;
|
||||
}
|
||||
|
||||
function newIdempotencyKey(): string {
|
||||
if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {
|
||||
return crypto.randomUUID();
|
||||
}
|
||||
return `pg-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编排单次门禁恢复:导航类动作直接 router.push;其余 POST 到 Workspace API。
|
||||
* @returns busy 状态与 submitPrimaryAction 方法
|
||||
*/
|
||||
export function useShippingProcessGateRecovery() {
|
||||
const { t } = useI18n();
|
||||
const msg = useMessage();
|
||||
const router = useRouter();
|
||||
const busy = ref(false);
|
||||
|
||||
/**
|
||||
* 提交或导航当前阻断 Gate 的主要恢复动作。
|
||||
* 核心逻辑:evaluation_version 来自 current_blocking_gate;409 返回 refresh_needed。
|
||||
*/
|
||||
async function submitPrimaryAction(
|
||||
summary: ShippingProcessGateUserSummary,
|
||||
options?: {
|
||||
payload?: Record<string, unknown>;
|
||||
navigationContext?: ProcessGateNavigationContext;
|
||||
},
|
||||
): Promise<ProcessGateActionResult> {
|
||||
const gate = summary.current_blocking_gate;
|
||||
const actionCode = (summary.next_action_code || gate?.next_action_code || '') as ShippingProcessGateActionCode | '';
|
||||
if (!summary.execution_no || !gate?.gate_code || !actionCode) {
|
||||
msg.warning(t('workspace.shippingNotice.processGate.noAction'));
|
||||
return { outcome: 'noop' };
|
||||
}
|
||||
|
||||
if (isProcessGateNavigationAction(actionCode)) {
|
||||
const route = buildProcessGateNavigationRoute(
|
||||
summary,
|
||||
actionCode,
|
||||
options?.navigationContext || {},
|
||||
);
|
||||
if (!route) {
|
||||
msg.warning(t('workspace.shippingNotice.processGate.navigationMissing'));
|
||||
return { outcome: 'failed' };
|
||||
}
|
||||
busy.value = true;
|
||||
try {
|
||||
await router.push(route);
|
||||
return { outcome: 'navigated' };
|
||||
} catch {
|
||||
msg.warning(t('workspace.shippingNotice.actions.failed'));
|
||||
return { outcome: 'failed' };
|
||||
} finally {
|
||||
busy.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
const expectedVersion = Number(gate.evaluation_version);
|
||||
if (!Number.isFinite(expectedVersion) || expectedVersion < 1) {
|
||||
msg.warning(t('workspace.shippingNotice.processGate.versionMissing'));
|
||||
return { outcome: 'failed' };
|
||||
}
|
||||
busy.value = true;
|
||||
try {
|
||||
await postWorkspaceProcessGateAction(summary.execution_no, String(gate.gate_code), {
|
||||
action_code: actionCode,
|
||||
expected_gate_version: expectedVersion,
|
||||
idempotency_key: newIdempotencyKey(),
|
||||
payload: options?.payload,
|
||||
});
|
||||
msg.success(t('workspace.shippingNotice.processGate.actionSubmitted'));
|
||||
return { outcome: 'submitted' };
|
||||
} catch (error: unknown) {
|
||||
const isVersionMismatch = error instanceof BusinessError && (
|
||||
error.code === 'SHIPPING.PROCESS_GATE_VERSION_MISMATCH'
|
||||
|| error.status === 409
|
||||
);
|
||||
if (isVersionMismatch) {
|
||||
msg.warning(resolveLocalizedErrorMessage(
|
||||
'SHIPPING.PROCESS_GATE_VERSION_MISMATCH',
|
||||
error instanceof BusinessError ? error.message : undefined,
|
||||
));
|
||||
return { outcome: 'refresh_needed' };
|
||||
}
|
||||
const message = error instanceof BusinessError
|
||||
? resolveLocalizedErrorMessage(error.code, error.message)
|
||||
: (error instanceof Error ? error.message : t('workspace.shippingNotice.actions.failed'));
|
||||
msg.warning(message);
|
||||
return { outcome: 'failed' };
|
||||
} finally {
|
||||
busy.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
busy,
|
||||
submitPrimaryAction,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* features/shipping-process-gates/types/process-gate.types.ts
|
||||
* 用途:全门禁恢复 API 与工作台卡片类型;与后端 process_gate_projection 对齐。
|
||||
* 依赖:features/chat/types/shipping.api.types 中的 Gate 联合类型与摘要接口。
|
||||
* 逻辑:避免重复定义 action/gate code 联合;Workspace API 专用响应在此扩展。
|
||||
*/
|
||||
import type {
|
||||
ShippingProcessGateActionCode,
|
||||
ShippingProcessGateCode,
|
||||
ShippingProcessGateProjection,
|
||||
ShippingProcessGateStatus,
|
||||
ShippingProcessGateUserSummary,
|
||||
} from '@/features/chat/types/shipping.api.types';
|
||||
|
||||
export type {
|
||||
ShippingProcessGateActionCode,
|
||||
ShippingProcessGateCode,
|
||||
ShippingProcessGateProjection,
|
||||
ShippingProcessGateStatus,
|
||||
ShippingProcessGateUserSummary,
|
||||
};
|
||||
|
||||
export interface ShippingProcessGateActionRequest {
|
||||
action_code: ShippingProcessGateActionCode | string;
|
||||
expected_gate_version: number;
|
||||
idempotency_key: string;
|
||||
payload?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface ShippingProcessGateActionResponse {
|
||||
execution_no: string;
|
||||
gate_code: ShippingProcessGateCode | string;
|
||||
action_code: ShippingProcessGateActionCode | string;
|
||||
dispatch: 'sync' | 'async_job' | 'idempotent_replay' | string;
|
||||
attempt: {
|
||||
id: number;
|
||||
attempt_no: number;
|
||||
status: string;
|
||||
idempotency_key: string;
|
||||
};
|
||||
gate_status?: string;
|
||||
gate_evaluation_version?: number;
|
||||
next_action_code?: ShippingProcessGateActionCode | string | null;
|
||||
job_id?: number;
|
||||
}
|
||||
|
||||
export interface ShippingProcessGateAuditEventsPage {
|
||||
items: Array<Record<string, unknown>>;
|
||||
total: number;
|
||||
page: number;
|
||||
page_size: number;
|
||||
}
|
||||
@@ -28,7 +28,7 @@ const emit = defineEmits<{
|
||||
refreshed: [];
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
const { t, te } = useI18n();
|
||||
const msg = useMessage();
|
||||
|
||||
const workflowSteps = computed(() => resolveShippingWorkflowSteps(props.detail));
|
||||
@@ -42,11 +42,32 @@ const workflowItem = computed(() => props.detail.workflow_item || null);
|
||||
const workflowEvents = computed(() => workflowItem.value?.events || []);
|
||||
const stpFacts = computed(() => props.detail.ui_state?.summary?.stp_facts || null);
|
||||
const lastActivityAt = computed(() => workflowItem.value?.last_activity_at || props.detail.updated_at || null);
|
||||
const terminateReason = computed(() => workflowItem.value?.closed_reason || null);
|
||||
const terminateReason = computed(() => {
|
||||
const code = String(workflowItem.value?.closed_reason || '').trim();
|
||||
if (!code) return null;
|
||||
const key = `workspace.shippingNotice.workflowReasons.${code}`;
|
||||
return te(key) ? t(key) : t('workspace.shippingNotice.timeline.updated');
|
||||
});
|
||||
const hasExcelArtifact = computed(() =>
|
||||
Array.isArray(props.detail.export_artifacts) && props.detail.export_artifacts.length > 0,
|
||||
);
|
||||
|
||||
/** 将内部状态映射为业务文案,未知值不回显原始状态码。 */
|
||||
function workflowStatusLabel(value: unknown): string {
|
||||
const code = String(value || '').trim();
|
||||
if (!code) return t('workspace.shippingNotice.status.unknown');
|
||||
const key = `workspace.shippingNotice.workflowStatus.${code}`;
|
||||
return te(key) ? t(key) : t('workspace.shippingNotice.status.unknown');
|
||||
}
|
||||
|
||||
const taskStatusLabel = computed(() => workflowStatusLabel(props.detail.process_status));
|
||||
const taskMatchStatusLabel = computed(() => {
|
||||
const code = String(props.detail.match_status || '').trim();
|
||||
if (!code) return t('workspace.shippingNotice.matchStatus.unknown');
|
||||
const key = `workspace.shippingNotice.matchStatus.${code}`;
|
||||
return te(key) ? t(key) : t('workspace.shippingNotice.matchStatus.unknown');
|
||||
});
|
||||
|
||||
/**
|
||||
* 下载已生成的发货 Excel。
|
||||
*/
|
||||
@@ -84,8 +105,8 @@ async function downloadExcel() {
|
||||
</div>
|
||||
<div v-if="workflowItem" class="sm:col-span-2">
|
||||
<dt class="text-muted">{{ $t('workspace.shippingNotice.todo.workflowItem') }}</dt>
|
||||
<dd class="font-mono text-secondary">
|
||||
{{ workflowItem.item_no }} · {{ workflowItem.lifecycle_status }} · {{ workflowItem.current_stage }}
|
||||
<dd class="text-secondary">
|
||||
{{ workflowStatusLabel(workflowItem.lifecycle_status) }} · {{ workflowStatusLabel(workflowItem.current_stage) }}
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
@@ -109,11 +130,11 @@ async function downloadExcel() {
|
||||
<dl class="grid gap-3 text-sm sm:grid-cols-2">
|
||||
<div>
|
||||
<dt class="text-muted">{{ $t('workspace.shippingNotice.fields.status') }}</dt>
|
||||
<dd>{{ detail.process_status || '—' }}</dd>
|
||||
<dd>{{ taskStatusLabel }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-muted">{{ $t('workspace.shippingNotice.fields.match') }}</dt>
|
||||
<dd>{{ detail.match_status || '—' }}</dd>
|
||||
<dd>{{ taskMatchStatusLabel }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-muted">{{ $t('workspace.shippingNotice.fields.shipTo') }}</dt>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* features/workspace/shipping-task-center/TaskProgressTimeline.spec.ts
|
||||
* 用途:锁定任务中心时间线同时消费 Task Event 与 Workflow Event。
|
||||
* 依赖:Vitest、@vue/test-utils、TaskProgressTimeline。
|
||||
* 逻辑:合并排序后两类事件均可见;Workflow 操作人展示 type/id。
|
||||
* 逻辑:合并排序后两类事件均可见;未知内部码、操作人 ID 与 JSON 详情不展示。
|
||||
*/
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { mount } from '@vue/test-utils';
|
||||
@@ -21,8 +21,10 @@ const messages = {
|
||||
empty: '暂无事件记录',
|
||||
detail: '查看详情',
|
||||
sourceTask: '任务事件',
|
||||
sourceWorkflow: 'Workflow 事件',
|
||||
workflowEvent: 'Workflow 事件',
|
||||
sourceWorkflow: '文件处理记录',
|
||||
workflowEvent: '文件处理记录',
|
||||
updated: '处理状态已更新',
|
||||
actors: { user: '业务人员', system: '系统' },
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -51,10 +53,40 @@ describe('TaskProgressTimeline', () => {
|
||||
});
|
||||
// 关键断言:时间线同时展示 Task 与 Workflow 事件来源标签,且 Workflow 显示操作人。
|
||||
expect(wrapper.text()).toContain('任务事件');
|
||||
expect(wrapper.text()).toContain('Workflow 事件');
|
||||
expect(wrapper.text()).toContain('文件处理记录');
|
||||
expect(wrapper.text()).toContain('任务已创建');
|
||||
expect(wrapper.text()).toContain('人工上传已登记');
|
||||
expect(wrapper.text()).toContain('操作者 1');
|
||||
expect(wrapper.text()).toContain('操作者 user/42');
|
||||
expect(wrapper.text()).toContain('操作者 业务人员');
|
||||
expect(wrapper.text()).not.toContain('user/42');
|
||||
expect(wrapper.text()).not.toContain('操作者 1');
|
||||
});
|
||||
|
||||
it('does not expose unknown event codes or raw detail JSON', () => {
|
||||
const i18n = createI18n({ legacy: false, locale: 'zh-CN', messages });
|
||||
const wrapper = mount(TaskProgressTimeline, {
|
||||
props: {
|
||||
events: [{
|
||||
event_type: 'internal_task_event',
|
||||
actor_id: 99,
|
||||
detail_json: { node_id: 'node-1', error: 'HTTP 500' },
|
||||
}],
|
||||
workflowEvents: [{
|
||||
seq_no: 2,
|
||||
event_code: 'internal_workflow_event',
|
||||
actor_type: 'worker',
|
||||
actor_id: 'worker-7',
|
||||
payload: { gate_code: 'quality_gate_internal' },
|
||||
}],
|
||||
},
|
||||
global: { plugins: [i18n] },
|
||||
});
|
||||
const text = wrapper.text();
|
||||
expect(text).toContain('处理状态已更新');
|
||||
for (const technicalText of [
|
||||
'internal_task_event', 'internal_workflow_event', 'node_id', 'HTTP 500',
|
||||
'gate_code', 'quality_gate_internal', 'worker-7',
|
||||
]) {
|
||||
expect(text).not.toContain(technicalText);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -3,7 +3,7 @@
|
||||
* 用途:展示任务事件 + Workflow Event 统一时间线(只读),不发明进度百分比。
|
||||
* 依赖:ShippingTaskEvent、ShippingWorkflowEvent、dateTime、vue-i18n。
|
||||
* 逻辑:由 ShippingTaskWorkbench 传入 task events 与 workflow events;按时间合并排序;
|
||||
* Workflow 事件操作人展示为 actor_type/actor_id。
|
||||
* 未知事件与操作者内部标识统一使用通用业务文案。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
@@ -23,18 +23,17 @@ type TimelineRow = {
|
||||
label: string;
|
||||
createdAt?: string | null;
|
||||
actor?: string | null;
|
||||
detail?: Record<string, unknown> | null;
|
||||
source: 'task' | 'workflow';
|
||||
};
|
||||
|
||||
/**
|
||||
* 将任务事件类型映射为可读文案;契约外码原样展示。
|
||||
* 将任务事件类型映射为可读文案;契约外码使用通用说明。
|
||||
*/
|
||||
function taskEventLabel(eventType: string | null | undefined): string {
|
||||
const code = String(eventType || '').trim();
|
||||
if (!code) return t('workspace.shippingNotice.eventTypes.system');
|
||||
const key = `workspace.shippingNotice.eventTypes.${code}`;
|
||||
return te(key) ? t(key) : code;
|
||||
return te(key) ? t(key) : t('workspace.shippingNotice.timeline.updated');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -44,20 +43,20 @@ function workflowEventLabel(event: ShippingWorkflowEvent): string {
|
||||
const code = String(event.event_code || event.message_code || event.stage_code || '').trim();
|
||||
if (!code) return t('workspace.shippingNotice.timeline.workflowEvent');
|
||||
const key = `workspace.shippingNotice.workflowEvents.${code}`;
|
||||
return te(key) ? t(key) : code;
|
||||
return te(key) ? t(key) : t('workspace.shippingNotice.timeline.updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化操作人展示:优先 type/id,便于审计追溯。
|
||||
* 格式化操作人展示:普通工作台只显示业务角色,不展示内部 ID。
|
||||
* @param actorType - 角色(user/system/admin…)
|
||||
* @param actorId - 操作者 ID 或系统标识
|
||||
*/
|
||||
function formatActorLabel(actorType?: string | null, actorId?: string | number | null): string | null {
|
||||
const type = String(actorType || '').trim();
|
||||
const id = actorId == null ? '' : String(actorId).trim();
|
||||
if (type && id) return `${type}/${id}`;
|
||||
if (id) return id;
|
||||
if (type) return type;
|
||||
const roleKey = `workspace.shippingNotice.timeline.actors.${type}`;
|
||||
if (type && te(roleKey)) return t(roleKey);
|
||||
if (type || id) return t('workspace.shippingNotice.timeline.actors.user');
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -67,7 +66,6 @@ const rows = computed<TimelineRow[]>(() => {
|
||||
label: taskEventLabel(event.event_type),
|
||||
createdAt: event.created_at,
|
||||
actor: formatActorLabel(null, event.actor_id),
|
||||
detail: event.detail_json || null,
|
||||
source: 'task',
|
||||
}));
|
||||
const workflowRows: TimelineRow[] = (props.workflowEvents || []).map((event, index) => ({
|
||||
@@ -75,11 +73,6 @@ const rows = computed<TimelineRow[]>(() => {
|
||||
label: workflowEventLabel(event),
|
||||
createdAt: event.occurred_at,
|
||||
actor: formatActorLabel(event.actor_type, event.actor_id),
|
||||
detail: {
|
||||
...(event.payload || {}),
|
||||
...(event.reason ? { reason: event.reason } : {}),
|
||||
...(event.stage_code ? { stage_code: event.stage_code } : {}),
|
||||
},
|
||||
source: 'workflow',
|
||||
}));
|
||||
return [...taskRows, ...workflowRows].sort((a, b) => {
|
||||
@@ -116,13 +109,6 @@ const rows = computed<TimelineRow[]>(() => {
|
||||
<span class="text-muted">{{ formatLocalDateTime(row.createdAt) }}</span>
|
||||
<span v-if="row.actor" class="text-muted">{{ $t('workspace.shippingNotice.operator', { id: row.actor }) }}</span>
|
||||
</div>
|
||||
<details
|
||||
v-if="row.detail && Object.keys(row.detail).length"
|
||||
class="mt-1 text-xs text-muted"
|
||||
>
|
||||
<summary class="cursor-pointer select-none">{{ $t('workspace.shippingNotice.timeline.detail') }}</summary>
|
||||
<pre class="mt-1 whitespace-pre-wrap break-words">{{ JSON.stringify(row.detail, null, 2) }}</pre>
|
||||
</details>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* features/workspace/shipping-task-center/TaskTodoPanel.vue
|
||||
* 用途:仅渲染后端 ui_state.action_buttons / summary.allowed_actions 对应的当前待办动作。
|
||||
* 依赖:shipping.api 履约写接口、shipping-tasks.api 下载/人工上传、ManualUploadEvidenceDialog、各确认对话框。
|
||||
* 逻辑:禁止按 process_status 二次推导按钮;管理员 can_handle=false 时只读;
|
||||
* wait_manual_upload 允许下载 Excel + 登记人工上传凭据(禁 RPA);
|
||||
* 多源阻断时对话框候选强制取 stp_facts.recovery_source_codes,禁止展示冻结全集。
|
||||
* 用途:渲染统一 Gate 恢复卡片与 STP 履约待办动作(ui_state.action_buttons)。
|
||||
* 依赖:ProcessGateRecoveryCard、shipping.api、shipping-tasks.api、ManualUploadEvidenceDialog。
|
||||
* 逻辑:优先展示 ui_state.process_gate 阻断信息与 next_action_code;禁止按 process_status
|
||||
* 二次推导门禁动作;存在 current_blocking_gate 时不渲染旧 action_buttons(Gate 唯一真相);
|
||||
* 管理员 can_handle=false 时只读;无 Gate 阻断时 wait_manual_upload 允许下载 Excel + 人工上传凭据。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from 'vue';
|
||||
@@ -32,6 +32,8 @@ import { downloadWorkspaceShippingExcelFile } from '@/features/workspace/api/shi
|
||||
import { refreshShippingTodoBadge } from '@/features/workspace/composables/useShippingTodoBadge';
|
||||
import InventorySourceSelectDialog from './InventorySourceSelectDialog.vue';
|
||||
import ManualUploadEvidenceDialog from './ManualUploadEvidenceDialog.vue';
|
||||
import ProcessGateRecoveryCard from '@/features/shipping-process-gates/components/ProcessGateRecoveryCard.vue';
|
||||
import type { ShippingProcessGateUserSummary } from '@/features/chat/types/shipping.api.types';
|
||||
|
||||
const props = defineProps<{
|
||||
detail: ShippingTaskDetail;
|
||||
@@ -56,9 +58,34 @@ const inventorySourceCandidates = ref<ShippingInventorySourceCandidate[]>([]);
|
||||
const inventorySourceInitialCode = ref('');
|
||||
|
||||
const summary = computed(() => props.detail.ui_state?.summary || {});
|
||||
const processGateSummary = computed((): ShippingProcessGateUserSummary | null =>
|
||||
props.detail.ui_state?.process_gate
|
||||
|| (summary.value.process_gate as ShippingProcessGateUserSummary | null | undefined)
|
||||
|| null,
|
||||
);
|
||||
const actionButtons = computed(() => props.detail.ui_state?.action_buttons || []);
|
||||
const checkpointKind = computed(() => String(props.detail.ui_state?.checkpoint_kind || ''));
|
||||
const checkpoint = computed(() => String(props.detail.ui_state?.checkpoint || ''));
|
||||
/** 统一 Gate 投影中的主要恢复动作;用于去重旧 action_buttons。 */
|
||||
const processGateNextAction = computed(() =>
|
||||
String(
|
||||
processGateSummary.value?.next_action_code
|
||||
|| processGateSummary.value?.current_blocking_gate?.next_action_code
|
||||
|| '',
|
||||
).trim(),
|
||||
);
|
||||
/** 有 Gate 阻断时优先展示统一投影文案。 */
|
||||
const displayTodoTitle = computed(() =>
|
||||
processGateSummary.value?.current_blocking_gate?.label
|
||||
|| summary.value.current_todo
|
||||
|| summary.value.title
|
||||
|| t('workspace.shippingNotice.todo.noActionTitle'),
|
||||
);
|
||||
const displayTodoMessage = computed(() =>
|
||||
processGateSummary.value?.blocking_message
|
||||
|| summary.value.message
|
||||
|| t('workspace.shippingNotice.todo.noActionMessage'),
|
||||
);
|
||||
|
||||
/**
|
||||
* 是否展示「待人工上传登记」提示。
|
||||
@@ -117,12 +144,22 @@ const allowedIds = computed(() => {
|
||||
if (Array.isArray(fromSummary) && fromSummary.length) return new Set(fromSummary.map(String));
|
||||
return new Set(actionButtons.value.map((item) => item.id));
|
||||
});
|
||||
const visibleActions = computed(() =>
|
||||
actionButtons.value.filter((action) => {
|
||||
const hasBlockingGate = computed(() => Boolean(processGateSummary.value?.current_blocking_gate));
|
||||
|
||||
const visibleActions = computed(() => {
|
||||
// [STEP] Gate 阻断时后端已清零 action_buttons;前端再兜底隐藏,避免双真相。
|
||||
if (hasBlockingGate.value) return [];
|
||||
return actionButtons.value.filter((action) => {
|
||||
const id = String(action.id || '');
|
||||
return allowedIds.value.has(id) && isActionAllowedForCheckpoint(id, checkpointKind.value);
|
||||
}),
|
||||
);
|
||||
if (!allowedIds.value.has(id) || !isActionAllowedForCheckpoint(id, checkpointKind.value)) {
|
||||
return false;
|
||||
}
|
||||
if (processGateNextAction.value && id === processGateNextAction.value) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});
|
||||
/**
|
||||
* 动作成功后刷新详情并更新导航徽标。
|
||||
*/
|
||||
@@ -327,15 +364,29 @@ async function runAction(action: ShippingChatAction) {
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<section class="rounded-2xl border border-brand-200/80 bg-brand-50/40 px-4 py-3">
|
||||
<div class="space-y-3">
|
||||
<ProcessGateRecoveryCard
|
||||
:summary="processGateSummary"
|
||||
:can-handle="canHandle"
|
||||
:navigation-context="{
|
||||
agentId: detail.owner_agent_id != null ? String(detail.owner_agent_id) : undefined,
|
||||
conversationId: detail.conversation_id || undefined,
|
||||
}"
|
||||
@refreshed="afterSuccess"
|
||||
@refresh-needed="afterSuccess"
|
||||
/>
|
||||
<section
|
||||
v-if="!hasBlockingGate"
|
||||
class="rounded-2xl border border-brand-200/80 bg-brand-50/40 px-4 py-3"
|
||||
>
|
||||
<div class="mb-1 text-xs font-semibold uppercase tracking-wide text-brand-700">
|
||||
{{ $t('workspace.shippingNotice.todo.currentTodo') }}
|
||||
</div>
|
||||
<h3 class="text-sm font-semibold text-primary">
|
||||
{{ summary.current_todo || summary.title || $t('workspace.shippingNotice.todo.noActionTitle') }}
|
||||
{{ displayTodoTitle }}
|
||||
</h3>
|
||||
<p class="mt-1 text-sm text-secondary">
|
||||
{{ summary.message || $t('workspace.shippingNotice.todo.noActionMessage') }}
|
||||
{{ displayTodoMessage }}
|
||||
</p>
|
||||
<p v-if="summary.pause_reason" class="mt-1 text-xs text-amber-700">
|
||||
{{ summary.pause_reason }}
|
||||
@@ -398,5 +449,6 @@ async function runAction(action: ShippingChatAction) {
|
||||
@confirm="onFreezeConfirm"
|
||||
/>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
"shippingOrderDocumentProfiles": "Doc Templates",
|
||||
"shippingFieldAssets": "Field Assets",
|
||||
"shippingOrderSchema": "Order Schema",
|
||||
"shippingAudit": "Audit center"
|
||||
"shippingAudit": "Audit center",
|
||||
"shippingProcessGates": "Process gate diagnostics"
|
||||
},
|
||||
"shippingOrderExtractionRuns": {
|
||||
"eyebrow": "READ-ONLY RUN DIAGNOSTICS",
|
||||
@@ -3712,5 +3713,81 @@
|
||||
"chainTruncated": " (truncated)",
|
||||
"eventHash": "Event hash",
|
||||
"previousEventHash": "Previous hash"
|
||||
},
|
||||
"shippingProcessGates": {
|
||||
"title": "Process Gate diagnostics",
|
||||
"subtitle": "Read-only Execution gate track, blocking status, and Attempt history for recovery troubleshooting.",
|
||||
"refresh": "Refresh",
|
||||
"loading": "Loading…",
|
||||
"empty": "No executions",
|
||||
"loadFailed": "Failed to load executions",
|
||||
"detailFailed": "Failed to load execution detail",
|
||||
"attemptsFailed": "Failed to load attempts",
|
||||
"detailTitle": "Execution diagnostics",
|
||||
"executionNo": "Execution no.",
|
||||
"status": "Status",
|
||||
"allStatuses": "All statuses",
|
||||
"currentGate": "Current gate",
|
||||
"nextAction": "Primary action",
|
||||
"updatedAt": "Updated at",
|
||||
"actions": "Actions",
|
||||
"viewDetail": "View detail",
|
||||
"viewAttempts": "View attempts",
|
||||
"viewSnapshots": "View input/output snapshots",
|
||||
"total": "{count} total",
|
||||
"previous": "Previous",
|
||||
"next": "Next",
|
||||
"gates": "Gate track",
|
||||
"gateCode": "Gate code",
|
||||
"gateStatus": "Gate status",
|
||||
"blockingReason": "Blocking reason code",
|
||||
"blockingReasonDetail": "Blocking reason detail",
|
||||
"gateDiagnostics": "Selected gate diagnostics",
|
||||
"findings": "Findings",
|
||||
"effectiveResult": "Effective result",
|
||||
"attempts": "Attempts",
|
||||
"noAttempts": "No attempts",
|
||||
"taskNo": "Task no.",
|
||||
"caseNo": "Review case",
|
||||
"scrollHint": "Scroll horizontally to see all columns",
|
||||
"filterGate": "Filter by gate code",
|
||||
"filterReason": "Filter by blocking reason",
|
||||
"filterParty": "Filter by responsible party",
|
||||
"filterSearch": "Keyword search",
|
||||
"filterFrom": "Updated from",
|
||||
"filterTo": "Updated to",
|
||||
"applyFilters": "Apply filters",
|
||||
"resetFilters": "Reset filters",
|
||||
"findingsStructured": "Structured findings",
|
||||
"severity": "Severity",
|
||||
"field": "Field",
|
||||
"party": "Party",
|
||||
"reason": "Reason",
|
||||
"message": "Message",
|
||||
"noFindings": "No findings",
|
||||
"attemptDiff": "{scope}: +{added} / -{removed} / ~{changed}",
|
||||
"auditLink": "View process_gate_ audit events for this execution in the audit center",
|
||||
"openAudit": "Open audit center",
|
||||
"responsibleParty": "Responsible party",
|
||||
"blockingReasonCode": "Blocking reason code",
|
||||
"statusLabels": {
|
||||
"active": "Active",
|
||||
"blocked": "Blocked",
|
||||
"waiting_external": "Waiting external",
|
||||
"completed": "Completed",
|
||||
"failed": "Failed",
|
||||
"cancelled": "Cancelled",
|
||||
"pending": "Pending",
|
||||
"queued": "Queued",
|
||||
"running": "Running",
|
||||
"passed": "Passed",
|
||||
"blocked_retryable": "Retryable block",
|
||||
"blocked_manual": "Needs manual action",
|
||||
"failed_terminal": "Terminal failure",
|
||||
"invalidated": "Invalidated",
|
||||
"skipped": "Skipped",
|
||||
"succeeded": "Succeeded",
|
||||
"superseded": "Superseded"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -198,7 +198,7 @@
|
||||
"nonOrderReasonPrompt": "Enter a reason for marking non-order",
|
||||
"reparseReasonPrompt": "Enter a reason for re-identification",
|
||||
"reasonRequired": "A reason is required to continue",
|
||||
"caseRequired": "This work item has no review case; open manual review first",
|
||||
"caseRequired": "A review form is not ready for this file yet. Try again shortly.",
|
||||
"versionHistoryTitle": "Version history",
|
||||
"currentVersion": "Current",
|
||||
"readonlyVersion": "Read-only",
|
||||
@@ -344,7 +344,8 @@
|
||||
"candidate_ready": "Candidate ready",
|
||||
"review_required": "Manual review required",
|
||||
"failed": "Processing failed",
|
||||
"cancelled": "Cancelled"
|
||||
"cancelled": "Cancelled",
|
||||
"unknown": "Status pending confirmation"
|
||||
},
|
||||
"shippingOrderExtractionReason": {
|
||||
"profile_not_found": "No suitable published order template was found.",
|
||||
@@ -395,12 +396,14 @@
|
||||
"generic_deterministic": "Generic rule-based parse",
|
||||
"llm_assisted_review": "AI-assisted review",
|
||||
"manual_review": "Manual review",
|
||||
"rejected": "Rejected"
|
||||
"rejected": "Rejected",
|
||||
"unknown": "Processing method pending confirmation"
|
||||
},
|
||||
"shippingOrderExtractionFreezeSource": {
|
||||
"profile_deterministic": "Auto-freeze source: template",
|
||||
"generic_deterministic": "Auto-freeze source: generic rules",
|
||||
"manual_confirmation": "Freeze source: manual confirmation"
|
||||
"manual_confirmation": "Confirmation method: manual confirmation",
|
||||
"unknown": "Confirmation method pending"
|
||||
},
|
||||
"shippingOrderExtractionPlanSummary": "This run planned {groups} order group(s) from {total} attachment(s). The first wave may process up to {attachments} attachment(s) with concurrency {concurrency}.",
|
||||
"shippingOrderExtractionPlanSelected": "{count} attachment(s) selected",
|
||||
@@ -439,7 +442,8 @@
|
||||
},
|
||||
"shippingOrderExtractionEmailSupplementRelation": {
|
||||
"po_mpn": "Relation: PO + part number",
|
||||
"po_fallback": "Relation: PO fallback"
|
||||
"po_fallback": "Relation: matched by PO",
|
||||
"unknown": "Relation pending confirmation"
|
||||
},
|
||||
"shippingOrderExtractionEmailSupplementField": {
|
||||
"reservation": "Reservation: ",
|
||||
@@ -1435,7 +1439,7 @@
|
||||
"unknown": "Unknown status"
|
||||
},
|
||||
"previewTitle": "PDF preview",
|
||||
"buildGateRail": "Build eligibility and inventory candidates",
|
||||
"buildGateRail": "Order checks and inventory sources",
|
||||
"previewLoading": "Loading PDF preview...",
|
||||
"previewUnavailable": "PDF preview is unavailable. Draft editing is unaffected.",
|
||||
"previewCollapsed": "This evidence has only a page and quote, with no reliable coordinates; the PDF preview is collapsed.",
|
||||
@@ -1446,15 +1450,36 @@
|
||||
"viewEvidence": "View evidence",
|
||||
"locateSource": "Locate source: {field}",
|
||||
"orderFields": "Order fields",
|
||||
"schemaVersion": "Frozen schema #{version}",
|
||||
"schemaVersion": "Order field version V{version}",
|
||||
"issues": "Open issues",
|
||||
"machineSource": "Source: machine extraction",
|
||||
"issueCodes": {
|
||||
"customer_unresolved": "Customer information has not been confirmed",
|
||||
"machine_order_unavailable": "No reviewable order information was identified",
|
||||
"machine_multiple_orders_legacy": "This file may contain multiple orders; please confirm them",
|
||||
"required_field_missing": "Information required to create the order is missing",
|
||||
"field_value_invalid": "Some order information has an invalid format",
|
||||
"invalid_order_line": "Some order lines are incomplete or invalid",
|
||||
"effective_reservation_missing": "A valid reservation number is missing",
|
||||
"reservation_duplicated_in_order": "The order contains duplicate reservation numbers",
|
||||
"require_manual_review": "The inventory source needs confirmation",
|
||||
"no_inventory_source_candidates": "No available inventory source was found",
|
||||
"manual_inventory_source_reason_required": "Select an inventory source and provide a reason",
|
||||
"manual_inventory_source_invalid": "The selected inventory source is unavailable",
|
||||
"inventory_source_unresolved": "The inventory source has not been determined",
|
||||
"auto_build_gate_approved_template": "This file needs review before the order can be created",
|
||||
"auto_build_gate_fields_complete": "Complete the order information to continue",
|
||||
"auto_build_gate_evidence_passed": "Some recognized information needs confirmation",
|
||||
"auto_build_gate_no_conflict_or_duplicate": "Check whether the order is duplicated or contains conflicting information",
|
||||
"auto_build_gate_quality_gate_passed": "The automatic order creation policy has not approved this order; manual confirmation is required",
|
||||
"unknown": "The system found an item that needs confirmation"
|
||||
},
|
||||
"machineSource": "Source: system recognition",
|
||||
"manualSource": "Source: manual edit",
|
||||
"derivedSource": "Source: rule derivation",
|
||||
"overrideSource": "Source: manual override (locked)",
|
||||
"skippedSource": "Source: derivation skipped",
|
||||
"valueSources": {
|
||||
"machine": "Machine",
|
||||
"machine": "System recognized",
|
||||
"manual": "Manual edit",
|
||||
"manual_override": "Manual override",
|
||||
"derived": "Derived",
|
||||
@@ -1470,10 +1495,11 @@
|
||||
"compare": "Compare suggestion",
|
||||
"scope": "Evidence scope: {level}",
|
||||
"evidenceLevel": {
|
||||
"L1_field": "Field text",
|
||||
"L1_field": "Current field content",
|
||||
"L2_table": "Containing table",
|
||||
"L3_page": "Containing page",
|
||||
"L4_pdf": "Full PDF (authorized)"
|
||||
"L4_pdf": "Full PDF (authorized)",
|
||||
"unknown": "Relevant document content"
|
||||
},
|
||||
"review": "Review",
|
||||
"empty": "No AI suggestions yet. Select a field, then request.",
|
||||
@@ -1493,7 +1519,8 @@
|
||||
"accepted": "Accepted",
|
||||
"modified": "Modified",
|
||||
"rejected": "Rejected",
|
||||
"failed": "Unavailable"
|
||||
"failed": "Unavailable",
|
||||
"unknown": "Status pending confirmation"
|
||||
},
|
||||
"decisions": {
|
||||
"accept": "Accept",
|
||||
@@ -1524,7 +1551,7 @@
|
||||
"other": "Other"
|
||||
}
|
||||
},
|
||||
"restoreMachine": "Restore machine value",
|
||||
"restoreMachine": "Restore recognized value",
|
||||
"restorePriorProjection": "Restore extracted/derived value",
|
||||
"lineNoUnsavedHint": "Unsaved · enter override reason on blur",
|
||||
"lockedHint": "Locked",
|
||||
@@ -1557,7 +1584,7 @@
|
||||
"addLine": "Add line",
|
||||
"copyLine": "Copy line",
|
||||
"deleteLine": "Delete line",
|
||||
"noMachineOrder": "Machine results are awaiting review. Create a draft to make corrections.",
|
||||
"noMachineOrder": "The recognized result needs confirmation. Create a draft to make corrections.",
|
||||
"lines": "Order lines",
|
||||
"line": "Line {index}",
|
||||
"noLines": "No order lines were identified.",
|
||||
@@ -1600,9 +1627,19 @@
|
||||
"manual_upload_pending": "Awaiting upload registration"
|
||||
}
|
||||
},
|
||||
"reparseProgress": {
|
||||
"title": "PDF recognition progress",
|
||||
"subtitle": "Progress comes from the current work item. The new review draft opens automatically when ready.",
|
||||
"polling": "Refreshing live progress…",
|
||||
"refreshFailed": "Progress is temporarily unavailable. The last stage is retained while retrying automatically.",
|
||||
"failed": "Recognition did not complete. The previous version was retained and you can recognize it again now.",
|
||||
"retry": "Recognize again",
|
||||
"stages": { "submitted": "Submitted", "layout_parsing": "Reading page content", "extracting": "Reading order information", "draft_ready": "Preparing review content" }
|
||||
},
|
||||
"backToSession": "Back to this session",
|
||||
"workItemHeader": "Work item {itemNo} · {version}",
|
||||
"jumpToCurrentVersion": "Go to current version",
|
||||
"currentVersionUnavailable": "The current version is not ready or progress cannot be refreshed yet. Please try again shortly.",
|
||||
"showContext": "Conversation context",
|
||||
"hideContext": "Hide context",
|
||||
"contextTitle": "Conversation context",
|
||||
@@ -1614,7 +1651,8 @@
|
||||
"work_item_closed": "This work item is closed and read-only. Disposition and editing are disabled.",
|
||||
"reparse_in_progress": "This PDF is being re-recognized. Please wait before continuing review.",
|
||||
"restored": "Re-recognition failed and the previous version was restored. You may continue editing.",
|
||||
"draft_version_conflict": "Draft version conflict: your local edits are outdated. Reload the latest version before continuing."
|
||||
"draft_version_conflict": "Draft version conflict: your local edits are outdated. Reload the latest version before continuing.",
|
||||
"unknown": "The order status changed. Refresh before continuing."
|
||||
},
|
||||
"versionHistory": {
|
||||
"title": "Version history",
|
||||
@@ -1626,31 +1664,33 @@
|
||||
"open": "Open"
|
||||
},
|
||||
"buildEligibility": {
|
||||
"title": "Build eligibility",
|
||||
"subtitle": "Reservation and inventory routing gates after draft validation.",
|
||||
"title": "Order checks",
|
||||
"subtitle": "Checks whether the order information and inventory sources are ready for order creation.",
|
||||
"canBuildYes": "Can build",
|
||||
"canBuildNo": "Cannot build yet",
|
||||
"statusLabel": "Eligibility status",
|
||||
"blockingSummary": "Blocking summary",
|
||||
"lineProjections": "Line projections",
|
||||
"blockingSummary": "Needs attention",
|
||||
"lineProjections": "Line check results",
|
||||
"lineCanBuild": "Eligible",
|
||||
"lineBlocked": "Blocked",
|
||||
"reservation": "Effective reservation",
|
||||
"routingStatusLabel": "Routing status",
|
||||
"lineBlocked": "Needs attention",
|
||||
"reservation": "Reservation number",
|
||||
"routingStatusLabel": "Inventory source status",
|
||||
"sourceHint": "Inventory hint",
|
||||
"candidates": "Candidate sources",
|
||||
"blockReason": "Block reason",
|
||||
"blockReason": "Reason to address",
|
||||
"manualReason": "Manual reason",
|
||||
"confirmBlocked": "Build eligibility is not satisfied. Resolve inventory or validation issues before confirming.",
|
||||
"status": {
|
||||
"ready": "Ready to build",
|
||||
"needs_review": "Needs review"
|
||||
"needs_review": "Needs review",
|
||||
"unknown": "Needs confirmation"
|
||||
},
|
||||
"routingStatus": {
|
||||
"resolved": "Resolved",
|
||||
"ambiguous": "Multiple candidates",
|
||||
"unresolved": "Unresolved",
|
||||
"conflicted": "Manual review required"
|
||||
"conflicted": "Confirmation required",
|
||||
"unknown": "Needs confirmation"
|
||||
},
|
||||
"blockReasons": {
|
||||
"require_manual_review": "Rules require manual inventory review",
|
||||
@@ -1658,20 +1698,33 @@
|
||||
"manual_inventory_source_reason_required": "Manual selection reason required",
|
||||
"manual_inventory_source_invalid": "Selected inventory source invalid or disabled",
|
||||
"inventory_source_unresolved": "Inventory source unresolved",
|
||||
"effective_reservation_missing": "Effective reservation missing"
|
||||
"effective_reservation_missing": "A valid reservation number is missing",
|
||||
"unknown": "The system found an item that needs confirmation"
|
||||
}
|
||||
},
|
||||
"inventoryCandidates": {
|
||||
"title": "Manual inventory selection",
|
||||
"subtitle": "Choose one or more enabled inventory sources for unresolved lines and provide a reason.",
|
||||
"subtitle": "Choose one or more enabled inventory sources for unresolved lines and provide a reason. You can also rematch rules or resolve pending suggestions.",
|
||||
"selectSources": "Select candidates",
|
||||
"selectEnabledSources": "Select from enabled inventory sources",
|
||||
"noCandidates": "No selectable sources. Check routing rules or contact an administrator.",
|
||||
"noCandidates": "No inventory sources are available. Contact an administrator to check the configuration.",
|
||||
"noEnabledSources": "No enabled inventory sources are available. Ask an administrator to enable sources first.",
|
||||
"reasonLabel": "Reason (required)",
|
||||
"reasonPlaceholder": "Explain why these inventory sources were selected...",
|
||||
"submit": "Submit candidates"
|
||||
},
|
||||
"inventoryRouting": {
|
||||
"reroute": "Rematch routing",
|
||||
"adoptSuggestion": "Adopt rule result",
|
||||
"keepManual": "Keep manual result",
|
||||
"suggestionPending": "The rule suggestion was updated and differs from the current manual result. Adopt the rule result or keep the manual result.",
|
||||
"rawCandidates": "Raw rule candidates",
|
||||
"unavailableCandidates": "Unavailable candidates",
|
||||
"ruleSuggestion": "Rule suggestion",
|
||||
"ruleVersions": "Rule versions",
|
||||
"hint": "Inventory source hint",
|
||||
"rerouteHint": "You can rematch routing rules at any time. When a suggestion is pending, decide whether to adopt or keep the manual result first."
|
||||
},
|
||||
"confirmDialog": {
|
||||
"reasonLabel": "Reason (required)",
|
||||
"reasonPlaceholder": "Describe why you are taking this action...",
|
||||
@@ -1782,7 +1835,7 @@
|
||||
},
|
||||
"itemStatus": {
|
||||
"queued": "Queued",
|
||||
"layout_parsing": "Parsing layout",
|
||||
"layout_parsing": "Reading page content",
|
||||
"extracting": "Extracting",
|
||||
"building_order": "Building order",
|
||||
"inventory_matching": "Matching inventory",
|
||||
@@ -1792,7 +1845,8 @@
|
||||
"failed": "Failed",
|
||||
"closed": "Completed",
|
||||
"cancelled": "Cancelled",
|
||||
"manual_upload_pending": "Awaiting upload registration"
|
||||
"manual_upload_pending": "Awaiting upload registration",
|
||||
"unknown": "Status pending confirmation"
|
||||
},
|
||||
"closedReason": {
|
||||
"confirmed": "Order confirmed",
|
||||
@@ -1802,11 +1856,21 @@
|
||||
},
|
||||
"actions": {
|
||||
"refresh": "Refresh",
|
||||
"openReview": "Open review workspace",
|
||||
"viewProgress": "View progress",
|
||||
"cancelFile": "Cancel this file",
|
||||
"reparse": "Re-identify",
|
||||
"retryFailedRun": "Retry failed run"
|
||||
},
|
||||
"reparseError": {
|
||||
"title": "Re-identification did not complete",
|
||||
"schemaUnavailable": "The order field rules are unavailable, so no new recognition result was created.",
|
||||
"fallback": "The previous recognition version is preserved. Open the review workspace to handle this file manually.",
|
||||
"contactAdmin": "If this affects multiple files, ask an administrator to check the order field rule version.",
|
||||
"pending": "This file is already being re-identified. Wait for the current run to finish.",
|
||||
"generic": "Re-identification did not complete. View the file details or try again later.",
|
||||
"requestId": "Request ID: {id}"
|
||||
},
|
||||
"reasonDialog": {
|
||||
"cancelTitle": "Cancel this file",
|
||||
"reparseTitle": "Retry / re-identify",
|
||||
@@ -1825,14 +1889,17 @@
|
||||
"filename": "Filename",
|
||||
"status": "Status",
|
||||
"stage": "Stage",
|
||||
"runNo": "Extraction run",
|
||||
"caseNo": "Review case",
|
||||
"runNo": "Recognition batch",
|
||||
"caseNo": "Review number",
|
||||
"lastActivity": "Last activity",
|
||||
"closedReason": "Closed reason",
|
||||
"eventsTitle": "Event timeline",
|
||||
"eventsEmpty": "No events yet",
|
||||
"empty": "No file selected"
|
||||
},
|
||||
"versionHistoryNote": "Full version history API is not available yet; showing the current item version only."
|
||||
"event": {
|
||||
"unknown": "Processing status updated"
|
||||
},
|
||||
"versionHistoryNote": "Showing the available versions for this file."
|
||||
}
|
||||
}
|
||||
@@ -248,7 +248,8 @@
|
||||
"SHIPPING_NOTICE_INTAKE_PARSE_TIMEOUT": "Shipping notice parsing timed out. Retry or remove and upload again.",
|
||||
"SHIPPING_NOTICE_INTAKE_STAGE2_PERSIST_FAILED": "Saving preprocessed email or attachment documents failed. Retry parsing.",
|
||||
"SHIPPING_NOTICE_INTAKE_ATTACHMENTS_INCOMPLETE": "Shipping notice attachments are incomplete. Retry parse or remove and upload again.",
|
||||
"SHIPPING_NOTICE_INTAKE_ALREADY_CONSUMED": "Shipping notice intake has already been consumed.",
|
||||
"SHIPPING_NOTICE_INTAKE_ALREADY_CONSUMED": "This file is already being handled. View the existing result instead of submitting it again.",
|
||||
"SHIPPING_NOTICE_ORDER_EXTRACTION_ALREADY_CONSUMED": "This file already has an order-processing result. View it or use recognition again.",
|
||||
"SHIPPING_NOTICE_INTAKE_EXPIRED": "Shipping notice intake has expired.",
|
||||
"SHIPPING_NOTICE_INTAKE_INVALID_STATUS": "Current intake status does not allow this operation.",
|
||||
"SHIPPING_NOTICE_DUPLICATE_RESOLUTION_REQUIRED": "A duplicate shipping notice was detected. Choose how to proceed.",
|
||||
@@ -370,6 +371,8 @@
|
||||
"SHIPPING_REVIEW_DRAFT_VERSION_MISMATCH": "The draft was updated in another window. Refresh and try again.",
|
||||
"SHIPPING_REVIEW_FIELD_INVALID": "The review field is not in this order's frozen schema.",
|
||||
"SHIPPING_REVIEW_INVENTORY_CANDIDATES_INVALID": "Manual inventory source candidates are invalid. Select enabled sources and provide a reason.",
|
||||
"SHIPPING_REVIEW_INVENTORY_ROUTING_ADOPT_INVALID": "Cannot adopt the rule suggestion: this line has no valid pending rule result.",
|
||||
"SHIPPING_REVIEW_INVENTORY_ROUTING_KEEP_INVALID": "Cannot keep the manual result: this line has no pending rule suggestion.",
|
||||
"SHIPPING_REVIEW_BUILD_ELIGIBILITY_BLOCKED": "Build eligibility failed. Resolve blocking issues or inventory candidates before confirming.",
|
||||
"SHIPPING_REVIEW_LINE_NOT_FOUND": "The order line was not found or was deleted.",
|
||||
"SHIPPING_REVIEW_DOCUMENT_NOT_FOUND": "The review PDF does not exist or is not accessible.",
|
||||
@@ -397,6 +400,18 @@
|
||||
"SHIPPING_REVIEW_QUALITY_COMMENT_REQUIRED": "A comment is required when the quality issue reason is Other.",
|
||||
"SHIPPING_NOTICE_SESSION_WORK_ITEM_CLOSE_REASON_REQUIRED": "A reason is required to cancel this work item.",
|
||||
"SHIPPING_NOTICE_SESSION_WORK_ITEM_LOCK_VERSION_INVALID": "The work item version is invalid. Refresh and try again.",
|
||||
"SHIPPING_NOTICE_SESSION_WORK_ITEM_VERSION_CONFLICT": "The work item was updated by another operation. Refresh and try again."
|
||||
"SHIPPING_NOTICE_SESSION_WORK_ITEM_VERSION_CONFLICT": "The work item was updated by another operation. Refresh and try again.",
|
||||
"SHIPPING.PROCESS_EXECUTION_NOT_FOUND": "The process execution was not found.",
|
||||
"SHIPPING.PROCESS_GATE_NOT_FOUND": "The process gate was not found.",
|
||||
"SHIPPING.PROCESS_GATE_ACTION_INVALID": "The process gate recovery action is invalid.",
|
||||
"SHIPPING.PROCESS_GATE_ACTION_FORBIDDEN": "The request includes forbidden execution control fields.",
|
||||
"SHIPPING.PROCESS_GATE_ACTION_NOT_ALLOWED": "This action is not the allowed primary recovery action for the current gate.",
|
||||
"SHIPPING.PROCESS_GATE_VERSION_MISMATCH": "The gate version changed. Refresh and try again.",
|
||||
"SHIPPING.PROCESS_GATE_BUSY": "The gate is already running. Try again shortly.",
|
||||
"SHIPPING.PROCESS_GATE_ALREADY_PASSED": "This gate has already passed.",
|
||||
"SHIPPING.PROCESS_GATE_ATTEMPT_NOT_FOUND": "The process gate attempt was not found.",
|
||||
"SHIPPING.PROCESS_GATE_PERMISSION_DENIED": "You do not have permission to access or recover this gate.",
|
||||
"SHIPPING.PROCESS_GATE_IDEMPOTENCY_REQUIRED": "The recovery request is missing an idempotency key.",
|
||||
"SHIPPING.PROCESS_GATE_IDEMPOTENCY_CONFLICT": "The idempotency key conflicts with a different gate request. Retry with a new key."
|
||||
}
|
||||
}
|
||||
@@ -181,11 +181,57 @@
|
||||
"adminViewOnlyShort": "View only",
|
||||
"lastActivity": "Last activity",
|
||||
"terminateReason": "Terminate reason",
|
||||
"workflowItem": "Workflow Item",
|
||||
"workflowItem": "File item",
|
||||
"downloadExcel": "Download shipping Excel",
|
||||
"manualUploadEndNote": "Excel generated. Download it, upload on the freight platform, then register credentials here.",
|
||||
"waitingManualUploadNote": "Excel generated. Download it, upload on the freight platform, then register credentials here."
|
||||
},
|
||||
"processGate": {
|
||||
"title": "Action needed",
|
||||
"currentGate": "Current step",
|
||||
"blockingMessage": "What needs attention",
|
||||
"reasonCode": "Reason",
|
||||
"diagnosticHint": "Suggested action",
|
||||
"noAction": "No action is currently available",
|
||||
"versionMissing": "This information has changed. Refresh and try again.",
|
||||
"navigationMissing": "Navigation context is missing. Refresh and try again.",
|
||||
"genericBlocking": "This step needs manual attention",
|
||||
"unknownStep": "Current step",
|
||||
"continueAction": "Continue",
|
||||
"actionSubmitted": "Action submitted",
|
||||
"submitting": "Submitting…",
|
||||
"actionCodes": {
|
||||
"retry_with_latest_rules": "Retry with latest rules",
|
||||
"open_inventory_source_review": "Open inventory source review",
|
||||
"open_order_review": "Open order review",
|
||||
"open_profile_review": "Open profile review",
|
||||
"edit_order_fields": "Edit order fields",
|
||||
"confirm_customer": "Confirm customer",
|
||||
"adjudicate_duplicate": "Adjudicate duplicate",
|
||||
"resolve_field_conflicts": "Resolve field conflicts",
|
||||
"open_inventory_match_review": "Open inventory match review",
|
||||
"open_shortage_review": "Open shortage review",
|
||||
"upload_inventory_file": "Upload inventory file",
|
||||
"adopt_rule_suggestion": "Adopt rule suggestion",
|
||||
"keep_manual_inventory_decision": "Keep manual decision",
|
||||
"retry_task_creation": "Retry task creation",
|
||||
"retry_inventory_preparation": "Retry inventory preparation",
|
||||
"regenerate_excel_artifact": "Regenerate Excel",
|
||||
"regenerate_manual_upload_todo": "Regenerate manual upload todo"
|
||||
},
|
||||
"reasons": {
|
||||
"freeze_not_ready": "Order is not ready to build or freeze",
|
||||
"profile_not_auto_freeze_approved": "Document profile is not approved for auto build",
|
||||
"profile_manual_confirmation_required": "Document profile requires manual confirmation",
|
||||
"customer_unresolved": "Customer is unresolved",
|
||||
"customer_ambiguous": "Customer resolution is ambiguous",
|
||||
"field_conflict": "Field conflicts need manual resolution",
|
||||
"duplicate_unresolved": "Duplicate order is unresolved",
|
||||
"require_manual_review": "Manual review is required",
|
||||
"no_inventory_source_candidates": "No inventory source candidates found",
|
||||
"inventory_source_unavailable": "Inventory source is unavailable"
|
||||
}
|
||||
},
|
||||
"myTodos": {
|
||||
"title": "My Todos",
|
||||
"subtitle": "Cross-session aggregation of pending review, exceptions, and waiting manual upload registration.",
|
||||
@@ -237,8 +283,28 @@
|
||||
"empty": "No events yet",
|
||||
"detail": "View details",
|
||||
"sourceTask": "Task event",
|
||||
"sourceWorkflow": "Workflow event",
|
||||
"workflowEvent": "Workflow event"
|
||||
"sourceWorkflow": "File processing record",
|
||||
"workflowEvent": "File processing record",
|
||||
"updated": "Processing status updated",
|
||||
"actors": {
|
||||
"user": "Business user",
|
||||
"system": "System",
|
||||
"admin": "Administrator"
|
||||
}
|
||||
},
|
||||
"workflowStatus": {
|
||||
"created": "Created",
|
||||
"queued": "Waiting",
|
||||
"extracting": "Recognizing",
|
||||
"pending_review": "Pending review",
|
||||
"waiting_manual_upload": "Waiting for manual upload",
|
||||
"failed": "Processing failed",
|
||||
"completed": "Completed",
|
||||
"closed": "Closed"
|
||||
},
|
||||
"workflowReasons": {
|
||||
"user_cancelled": "Cancelled by user",
|
||||
"completed": "Processing completed"
|
||||
},
|
||||
"stpFacts": {
|
||||
"title": "STP fulfillment progress",
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
"shippingOrderDocumentProfiles": "แม่แบบเอกสาร",
|
||||
"shippingFieldAssets": "คลังฟิลด์",
|
||||
"shippingOrderSchema": "Order Schema",
|
||||
"shippingAudit": "ศูนย์ตรวจสอบ"
|
||||
"shippingAudit": "ศูนย์ตรวจสอบ",
|
||||
"shippingProcessGates": "การวินิจฉัย Process Gate"
|
||||
},
|
||||
"shippingOrderExtractionRuns": {
|
||||
"eyebrow": "การวินิจฉัยการทำงานแบบอ่านอย่างเดียว",
|
||||
@@ -3580,5 +3581,81 @@
|
||||
"chainTruncated": " (ตัดทอน)",
|
||||
"eventHash": "แฮชเหตุการณ์",
|
||||
"previousEventHash": "แฮชก่อนหน้า"
|
||||
},
|
||||
"shippingProcessGates": {
|
||||
"title": "การวินิจฉัย Process Gate",
|
||||
"subtitle": "ดู Execution gate track สถานะการบล็อก และประวัติ Attempt แบบอ่านอย่างเดียว",
|
||||
"refresh": "รีเฟรช",
|
||||
"loading": "กำลังโหลด…",
|
||||
"empty": "ไม่มี Execution",
|
||||
"loadFailed": "โหลดรายการ Execution ล้มเหลว",
|
||||
"detailFailed": "โหลดรายละเอียด Execution ล้มเหลว",
|
||||
"attemptsFailed": "โหลด Attempt ล้มเหลว",
|
||||
"detailTitle": "การวินิจฉัย Execution",
|
||||
"executionNo": "หมายเลข Execution",
|
||||
"status": "สถานะ",
|
||||
"allStatuses": "สถานะทั้งหมด",
|
||||
"currentGate": "Gate ปัจจุบัน",
|
||||
"nextAction": "การกระทำหลัก",
|
||||
"updatedAt": "อัปเดตเมื่อ",
|
||||
"actions": "การดำเนินการ",
|
||||
"viewDetail": "ดูรายละเอียด",
|
||||
"viewAttempts": "ดู Attempt",
|
||||
"viewSnapshots": "ดูสแนปช็อตอินพุต/เอาต์พุต",
|
||||
"total": "ทั้งหมด {count} รายการ",
|
||||
"previous": "ก่อนหน้า",
|
||||
"next": "ถัดไป",
|
||||
"gates": "Gate track",
|
||||
"gateCode": "รหัส Gate",
|
||||
"gateStatus": "สถานะ Gate",
|
||||
"blockingReason": "รหัสเหตุผลที่บล็อก",
|
||||
"blockingReasonDetail": "รายละเอียดเหตุผลที่บล็อก",
|
||||
"gateDiagnostics": "การวินิจฉัย Gate ที่เลือก",
|
||||
"findings": "Findings",
|
||||
"effectiveResult": "ผลลัพธ์ที่มีผล",
|
||||
"attempts": "Attempt",
|
||||
"noAttempts": "ไม่มี Attempt",
|
||||
"taskNo": "หมายเลขงาน",
|
||||
"caseNo": "Review case",
|
||||
"scrollHint": "เลื่อนแนวนอนเพื่อดูคอลัมน์ทั้งหมด",
|
||||
"filterGate": "กรองตามรหัส Gate",
|
||||
"filterReason": "กรองตามเหตุผลที่บล็อก",
|
||||
"filterParty": "กรองตามผู้รับผิดชอบ",
|
||||
"filterSearch": "ค้นหาด้วยคำสำคัญ",
|
||||
"filterFrom": "อัปเดตตั้งแต่",
|
||||
"filterTo": "อัปเดตถึง",
|
||||
"applyFilters": "ใช้ตัวกรอง",
|
||||
"resetFilters": "รีเซ็ตตัวกรอง",
|
||||
"findingsStructured": "Findings แบบมีโครงสร้าง",
|
||||
"severity": "ระดับความรุนแรง",
|
||||
"field": "ฟิลด์",
|
||||
"party": "ผู้รับผิดชอบ",
|
||||
"reason": "เหตุผล",
|
||||
"message": "ข้อความ",
|
||||
"noFindings": "ไม่มี Finding",
|
||||
"attemptDiff": "{scope}: เพิ่ม {added} / ลบ {removed} / เปลี่ยน {changed}",
|
||||
"auditLink": "ดูเหตุการณ์ process_gate_ ของ Execution นี้ในศูนย์ audit",
|
||||
"openAudit": "เปิดศูนย์ audit",
|
||||
"responsibleParty": "ผู้รับผิดชอบ",
|
||||
"blockingReasonCode": "รหัสเหตุผลที่บล็อก",
|
||||
"statusLabels": {
|
||||
"active": "กำลังดำเนินการ",
|
||||
"blocked": "ถูกบล็อก",
|
||||
"waiting_external": "รอภายนอก",
|
||||
"completed": "เสร็จสิ้น",
|
||||
"failed": "ล้มเหลว",
|
||||
"cancelled": "ยกเลิกแล้ว",
|
||||
"pending": "รอดำเนินการ",
|
||||
"queued": "อยู่ในคิว",
|
||||
"running": "กำลังรัน",
|
||||
"passed": "ผ่านแล้ว",
|
||||
"blocked_retryable": "บล็อกที่ลองใหม่ได้",
|
||||
"blocked_manual": "ต้องดำเนินการด้วยมือ",
|
||||
"failed_terminal": "ล้มเหลวขั้นสุดท้าย",
|
||||
"invalidated": "หมดอายุผลแล้ว",
|
||||
"skipped": "ข้ามแล้ว",
|
||||
"succeeded": "สำเร็จ",
|
||||
"superseded": "ถูกแทนที่"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -198,7 +198,7 @@
|
||||
"nonOrderReasonPrompt": "กรอกเหตุผลที่ทำเครื่องหมายว่าไม่ใช่คำสั่งซื้อ",
|
||||
"reparseReasonPrompt": "กรอกเหตุผลการระบุใหม่",
|
||||
"reasonRequired": "ต้องระบุเหตุผลก่อนดำเนินการต่อ",
|
||||
"caseRequired": "รายการงานนี้ยังไม่มีเคสตรวจสอบ กรุณาเปิดการตรวจสอบด้วยตนเองก่อน",
|
||||
"caseRequired": "แบบฟอร์มตรวจสอบของไฟล์นี้ยังไม่พร้อม โปรดลองอีกครั้งในภายหลัง",
|
||||
"versionHistoryTitle": "ประวัติเวอร์ชัน",
|
||||
"currentVersion": "ปัจจุบัน",
|
||||
"readonlyVersion": "อ่านอย่างเดียว",
|
||||
@@ -344,7 +344,8 @@
|
||||
"candidate_ready": "ตัวเลือกพร้อมแล้ว",
|
||||
"review_required": "ต้องตรวจสอบด้วยตนเอง",
|
||||
"failed": "ประมวลผลล้มเหลว",
|
||||
"cancelled": "ยกเลิกแล้ว"
|
||||
"cancelled": "ยกเลิกแล้ว",
|
||||
"unknown": "รอยืนยันสถานะ"
|
||||
},
|
||||
"shippingOrderExtractionReason": {
|
||||
"profile_not_found": "ไม่พบเทมเพลตคำสั่งซื้อที่เผยแพร่ซึ่งใช้งานได้",
|
||||
@@ -395,12 +396,14 @@
|
||||
"generic_deterministic": "แยกวิเคราะห์ด้วยกฎทั่วไป",
|
||||
"llm_assisted_review": "ตรวจทานด้วย AI",
|
||||
"manual_review": "ตรวจทานด้วยตนเอง",
|
||||
"rejected": "ปฏิเสธแล้ว"
|
||||
"rejected": "ปฏิเสธแล้ว",
|
||||
"unknown": "รอยืนยันวิธีประมวลผล"
|
||||
},
|
||||
"shippingOrderExtractionFreezeSource": {
|
||||
"profile_deterministic": "แหล่งตรึงอัตโนมัติ: เทมเพลต",
|
||||
"generic_deterministic": "แหล่งตรึงอัตโนมัติ: กฎทั่วไป",
|
||||
"manual_confirmation": "แหล่งตรึง: ยืนยันด้วยตนเอง"
|
||||
"manual_confirmation": "วิธียืนยัน: ยืนยันด้วยตนเอง",
|
||||
"unknown": "รอยืนยันวิธียืนยัน"
|
||||
},
|
||||
"shippingOrderExtractionPlanSummary": "รอบนี้วางแผน {groups} กลุ่มคำสั่งซื้อจากไฟล์แนบ {total} ไฟล์ โดยรอบแรกจะประมวลผลได้สูงสุด {attachments} ไฟล์ พร้อมกัน {concurrency} ไฟล์",
|
||||
"shippingOrderExtractionPlanSelected": "เลือกแล้ว {count} ไฟล์",
|
||||
@@ -439,7 +442,8 @@
|
||||
},
|
||||
"shippingOrderExtractionEmailSupplementRelation": {
|
||||
"po_mpn": "วิธีเชื่อมโยง: PO + หมายเลขชิ้นส่วน",
|
||||
"po_fallback": "วิธีเชื่อมโยง: ใช้ PO สำรอง"
|
||||
"po_fallback": "วิธีเชื่อมโยง: จับคู่ด้วย PO",
|
||||
"unknown": "รอยืนยันวิธีเชื่อมโยง"
|
||||
},
|
||||
"shippingOrderExtractionEmailSupplementField": {
|
||||
"reservation": "Reservation: ",
|
||||
@@ -1435,7 +1439,7 @@
|
||||
"unknown": "ไม่ทราบสถานะ"
|
||||
},
|
||||
"previewTitle": "ตัวอย่าง PDF",
|
||||
"buildGateRail": "คุณสมบัติสร้างงานและแหล่งสต็อก",
|
||||
"buildGateRail": "ตรวจสอบคำสั่งซื้อและแหล่งสต็อก",
|
||||
"previewLoading": "กำลังโหลดตัวอย่าง PDF...",
|
||||
"previewUnavailable": "ตัวอย่าง PDF ใช้งานไม่ได้ แต่การแก้ไขร่างไม่ได้รับผลกระทบ",
|
||||
"previewCollapsed": "หลักฐานนี้มีเพียงหน้าและข้อความอ้างอิง โดยไม่มีพิกัดที่เชื่อถือได้ จึงย่อการแสดงตัวอย่าง PDF แล้ว",
|
||||
@@ -1446,8 +1450,29 @@
|
||||
"viewEvidence": "ดูหลักฐาน",
|
||||
"locateSource": "ค้นหาต้นฉบับ: {field}",
|
||||
"orderFields": "ฟิลด์คำสั่งซื้อ",
|
||||
"schemaVersion": "Schema ที่ตรึงไว้ #{version}",
|
||||
"schemaVersion": "เวอร์ชันฟิลด์คำสั่งซื้อ V{version}",
|
||||
"issues": "ปัญหาที่ยังเปิดอยู่",
|
||||
"issueCodes": {
|
||||
"customer_unresolved": "ยังไม่ได้ยืนยันข้อมูลลูกค้า",
|
||||
"machine_order_unavailable": "ไม่พบข้อมูลคำสั่งซื้อที่พร้อมตรวจสอบ",
|
||||
"machine_multiple_orders_legacy": "ไฟล์นี้อาจมีหลายคำสั่งซื้อ โปรดยืนยันด้วยตนเอง",
|
||||
"required_field_missing": "ข้อมูลที่จำเป็นสำหรับสร้างคำสั่งซื้อยังไม่ครบ",
|
||||
"field_value_invalid": "ข้อมูลคำสั่งซื้อบางรายการมีรูปแบบไม่ถูกต้อง",
|
||||
"invalid_order_line": "รายละเอียดคำสั่งซื้อบางรายการไม่ครบหรือไม่ถูกต้อง",
|
||||
"effective_reservation_missing": "ไม่มีหมายเลขการจองที่ถูกต้อง",
|
||||
"reservation_duplicated_in_order": "พบหมายเลขการจองซ้ำในคำสั่งซื้อนี้",
|
||||
"require_manual_review": "ต้องยืนยันแหล่งสต็อกด้วยตนเอง",
|
||||
"no_inventory_source_candidates": "ไม่พบแหล่งสต็อกที่ใช้งานได้",
|
||||
"manual_inventory_source_reason_required": "เลือกแหล่งสต็อกและระบุเหตุผล",
|
||||
"manual_inventory_source_invalid": "แหล่งสต็อกที่เลือกไม่พร้อมใช้งาน",
|
||||
"inventory_source_unresolved": "ยังไม่สามารถระบุแหล่งสต็อกได้",
|
||||
"auto_build_gate_approved_template": "ไฟล์นี้ต้องผ่านการตรวจสอบก่อนสร้างคำสั่งซื้อ",
|
||||
"auto_build_gate_fields_complete": "กรอกข้อมูลคำสั่งซื้อให้ครบก่อนดำเนินการต่อ",
|
||||
"auto_build_gate_evidence_passed": "ข้อมูลที่ระบบระบุบางส่วนต้องได้รับการยืนยัน",
|
||||
"auto_build_gate_no_conflict_or_duplicate": "ตรวจสอบว่าคำสั่งซื้อซ้ำหรือมีข้อมูลขัดแย้งหรือไม่",
|
||||
"auto_build_gate_quality_gate_passed": "นโยบายสร้างคำสั่งซื้ออัตโนมัติยังไม่อนุมัติรายการนี้ จึงต้องยืนยันด้วยตนเอง",
|
||||
"unknown": "ระบบพบรายการที่ต้องยืนยันด้วยตนเอง"
|
||||
},
|
||||
"machineSource": "แหล่งที่มา: การระบุของระบบ",
|
||||
"manualSource": "แหล่งที่มา: แก้ไขโดยผู้ใช้",
|
||||
"derivedSource": "แหล่งที่มา: อนุมานจากกฎ",
|
||||
@@ -1470,10 +1495,11 @@
|
||||
"compare": "เปรียบเทียบคำแนะนำ",
|
||||
"scope": "ขอบเขตหลักฐาน: {level}",
|
||||
"evidenceLevel": {
|
||||
"L1_field": "ข้อความฟิลด์",
|
||||
"L1_field": "ข้อมูลในฟิลด์ปัจจุบัน",
|
||||
"L2_table": "ตารางที่เกี่ยวข้อง",
|
||||
"L3_page": "หน้าที่เกี่ยวข้อง",
|
||||
"L4_pdf": "PDF ทั้งฉบับ (ต้องได้รับอนุญาต)"
|
||||
"L4_pdf": "PDF ทั้งฉบับ (ต้องได้รับอนุญาต)",
|
||||
"unknown": "เนื้อหาเอกสารที่เกี่ยวข้อง"
|
||||
},
|
||||
"review": "พิจารณา",
|
||||
"empty": "ยังไม่มีคำแนะนำ AI เลือกฟิลด์แล้วกดขอ",
|
||||
@@ -1493,7 +1519,8 @@
|
||||
"accepted": "ยอมรับแล้ว",
|
||||
"modified": "แก้ไขแล้ว",
|
||||
"rejected": "ปฏิเสธแล้ว",
|
||||
"failed": "ใช้ไม่ได้"
|
||||
"failed": "ใช้ไม่ได้",
|
||||
"unknown": "รอยืนยันสถานะ"
|
||||
},
|
||||
"decisions": {
|
||||
"accept": "ยอมรับ",
|
||||
@@ -1524,7 +1551,7 @@
|
||||
"other": "อื่นๆ"
|
||||
}
|
||||
},
|
||||
"restoreMachine": "คืนค่าเครื่อง",
|
||||
"restoreMachine": "คืนค่าที่ระบบระบุ",
|
||||
"restorePriorProjection": "คืนค่าจากการระบุ/อนุมาน",
|
||||
"lineNoUnsavedHint": "ยังไม่บันทึก · กรอกเหตุผลเมื่อออกจากช่อง",
|
||||
"lockedHint": "ล็อกแล้ว",
|
||||
@@ -1600,9 +1627,19 @@
|
||||
"manual_upload_pending": "รอลงทะเบียนอัปโหลด"
|
||||
}
|
||||
},
|
||||
"reparseProgress": {
|
||||
"title": "ความคืบหน้าการรู้จำ PDF ใหม่",
|
||||
"subtitle": "ความคืบหน้ามาจากรายการงานปัจจุบัน และจะเปิดแบบร่างตรวจทานเวอร์ชันใหม่โดยอัตโนมัติเมื่อพร้อม",
|
||||
"polling": "กำลังรีเฟรชความคืบหน้าจริง…",
|
||||
"refreshFailed": "ไม่สามารถรีเฟรชความคืบหน้าได้ชั่วคราว ระบบจะคงขั้นตอนล่าสุดและลองใหม่อัตโนมัติ",
|
||||
"failed": "การรู้จำใหม่ยังไม่เสร็จสมบูรณ์ ระบบเก็บเวอร์ชันก่อนหน้าไว้และคุณสามารถลองรู้จำใหม่ได้ทันที",
|
||||
"retry": "รู้จำใหม่อีกครั้ง",
|
||||
"stages": { "submitted": "ส่งแล้ว", "layout_parsing": "กำลังอ่านเนื้อหาในหน้า", "extracting": "กำลังอ่านข้อมูลคำสั่งซื้อ", "draft_ready": "กำลังเตรียมข้อมูลตรวจสอบ" }
|
||||
},
|
||||
"backToSession": "กลับไปการประมวลผลครั้งนี้",
|
||||
"workItemHeader": "รายการงาน {itemNo} · {version}",
|
||||
"jumpToCurrentVersion": "ไปยังเวอร์ชันปัจจุบัน",
|
||||
"currentVersionUnavailable": "เวอร์ชันปัจจุบันยังไม่พร้อมหรือยังรีเฟรชความคืบหน้าไม่ได้ โปรดลองอีกครั้งในภายหลัง",
|
||||
"showContext": "บริบทการสนทนา",
|
||||
"hideContext": "ซ่อนบริบท",
|
||||
"contextTitle": "บริบทการสนทนา",
|
||||
@@ -1614,7 +1651,8 @@
|
||||
"work_item_closed": "รายการงานนี้ปิดแล้ว ดูได้อย่างเดียว การจัดการและการแก้ไขถูกปิดใช้งาน",
|
||||
"reparse_in_progress": "PDF นี้กำลังถูกระบุใหม่ โปรดรอให้เสร็จก่อนดำเนินการตรวจทานต่อ",
|
||||
"restored": "การระบุใหม่ล้มเหลวและกู้คืนเวอร์ชันก่อนหน้าแล้ว คุณสามารถแก้ไขต่อได้",
|
||||
"draft_version_conflict": "เวอร์ชันฉบับร่างขัดแย้ง: การแก้ไขในเครื่องล้าสมัยแล้ว โปรดโหลดเวอร์ชันล่าสุดก่อนดำเนินการต่อ"
|
||||
"draft_version_conflict": "เวอร์ชันฉบับร่างขัดแย้ง: การแก้ไขในเครื่องล้าสมัยแล้ว โปรดโหลดเวอร์ชันล่าสุดก่อนดำเนินการต่อ",
|
||||
"unknown": "สถานะคำสั่งซื้อมีการเปลี่ยนแปลง โปรดรีเฟรชก่อนดำเนินการต่อ"
|
||||
},
|
||||
"versionHistory": {
|
||||
"title": "ประวัติเวอร์ชัน",
|
||||
@@ -1626,31 +1664,33 @@
|
||||
"open": "เปิด"
|
||||
},
|
||||
"buildEligibility": {
|
||||
"title": "คุณสมบัติการสร้างคำสั่ง",
|
||||
"subtitle": "Reservation และการตรวจสอบแหล่งสต็อกหลังตรวจร่าง",
|
||||
"title": "ตรวจสอบคำสั่งซื้อ",
|
||||
"subtitle": "ตรวจสอบว่าข้อมูลคำสั่งซื้อและแหล่งสต็อกพร้อมสำหรับสร้างคำสั่งซื้อหรือไม่",
|
||||
"canBuildYes": "สร้างได้",
|
||||
"canBuildNo": "ยังสร้างไม่ได้",
|
||||
"statusLabel": "สถานะคุณสมบัติ",
|
||||
"blockingSummary": "สรุปการบล็อก",
|
||||
"lineProjections": "การฉายแถว",
|
||||
"blockingSummary": "รายการที่ต้องดำเนินการ",
|
||||
"lineProjections": "ผลตรวจสอบรายละเอียด",
|
||||
"lineCanBuild": "ผ่าน",
|
||||
"lineBlocked": "ถูกบล็อก",
|
||||
"reservation": "Reservation ที่ใช้ได้",
|
||||
"routingStatusLabel": "สถานะการกำหนดเส้นทาง",
|
||||
"lineBlocked": "ต้องดำเนินการ",
|
||||
"reservation": "หมายเลขการจอง",
|
||||
"routingStatusLabel": "สถานะแหล่งสต็อก",
|
||||
"sourceHint": "คำใบ้สต็อก",
|
||||
"candidates": "แหล่งสต็อกที่เป็นไปได้",
|
||||
"blockReason": "เหตุผลการบล็อก",
|
||||
"blockReason": "เหตุผลที่ต้องดำเนินการ",
|
||||
"manualReason": "เหตุผลด้วยตนเอง",
|
||||
"confirmBlocked": "ร่างยังไม่ผ่านคุณสมบัติการสร้างคำสั่ง โปรดแก้ปัญหาแหล่งสต็อกหรือการตรวจสอบก่อนยืนยัน",
|
||||
"status": {
|
||||
"ready": "พร้อมสร้าง",
|
||||
"needs_review": "ต้องตรวจสอบ"
|
||||
"needs_review": "ต้องตรวจสอบ",
|
||||
"unknown": "รอยืนยัน"
|
||||
},
|
||||
"routingStatus": {
|
||||
"resolved": "แก้ไขแล้ว",
|
||||
"ambiguous": "หลายตัวเลือก",
|
||||
"unresolved": "ยังไม่แก้",
|
||||
"conflicted": "ต้องตรวจสอบด้วยตนเอง"
|
||||
"conflicted": "ต้องยืนยันด้วยตนเอง",
|
||||
"unknown": "รอยืนยัน"
|
||||
},
|
||||
"blockReasons": {
|
||||
"require_manual_review": "กฎต้องตรวจสอบแหล่งสต็อกด้วยตนเอง",
|
||||
@@ -1658,20 +1698,33 @@
|
||||
"manual_inventory_source_reason_required": "ต้องระบุเหตุผลการเลือกด้วยตนเอง",
|
||||
"manual_inventory_source_invalid": "แหล่งสต็อกที่เลือกไม่ถูกต้องหรือปิดใช้งาน",
|
||||
"inventory_source_unresolved": "ยังไม่ระบุแหล่งสต็อก",
|
||||
"effective_reservation_missing": "ไม่มี Reservation ที่ใช้ได้"
|
||||
"effective_reservation_missing": "ไม่มีหมายเลขการจองที่ถูกต้อง",
|
||||
"unknown": "ระบบพบรายการที่ต้องยืนยันด้วยตนเอง"
|
||||
}
|
||||
},
|
||||
"inventoryCandidates": {
|
||||
"title": "เลือกแหล่งสต็อกด้วยตนเอง",
|
||||
"subtitle": "เลือกแหล่งสต็อกที่เปิดใช้งานอย่างน้อยหนึ่งแหล่งสำหรับแถวที่ยังไม่ชัดเจน พร้อมเหตุผล",
|
||||
"subtitle": "เลือกแหล่งสต็อกที่เปิดใช้งานอย่างน้อยหนึ่งแหล่งสำหรับแถวที่ยังไม่ชัดเจน พร้อมเหตุผล หรือจับคู่กฎใหม่/จัดการคำแนะนำที่ค้างอยู่",
|
||||
"selectSources": "เลือกตัวเลือก",
|
||||
"selectEnabledSources": "เลือกจากแหล่งสต็อกที่เปิดใช้งาน",
|
||||
"noCandidates": "ไม่มีแหล่งที่เลือกได้ ตรวจสอบกฎการกำหนดเส้นทางหรือติดต่อผู้ดูแล",
|
||||
"noCandidates": "ไม่มีแหล่งสต็อกที่เลือกได้ โปรดติดต่อผู้ดูแลเพื่อตรวจสอบการตั้งค่า",
|
||||
"noEnabledSources": "ยังไม่มีแหล่งสต็อกที่เปิดใช้งาน กรุณาให้ผู้ดูแลเปิดใช้งานก่อน",
|
||||
"reasonLabel": "เหตุผล (จำเป็น)",
|
||||
"reasonPlaceholder": "อธิบายว่าทำไมจึงเลือกแหล่งสต็อกเหล่านี้...",
|
||||
"submit": "ส่งตัวเลือก"
|
||||
},
|
||||
"inventoryRouting": {
|
||||
"reroute": "จับคู่เส้นทางใหม่",
|
||||
"adoptSuggestion": "ใช้ผลจากกฎ",
|
||||
"keepManual": "คงผลที่เลือกเอง",
|
||||
"suggestionPending": "คำแนะนำจากกฎมีการอัปเดตและต่างจากผลที่เลือกเอง กรุณาใช้ผลจากกฎหรือคงผลที่เลือกเอง",
|
||||
"rawCandidates": "ตัวเลือกดิบจากกฎ",
|
||||
"unavailableCandidates": "ตัวเลือกที่ใช้ไม่ได้",
|
||||
"ruleSuggestion": "แหล่งที่กฎแนะนำ",
|
||||
"ruleVersions": "เวอร์ชันกฎ",
|
||||
"hint": "คำใบ้แหล่งสต็อก",
|
||||
"rerouteHint": "สามารถจับคู่กฎเส้นทางใหม่ได้ตลอดเวลา หากมีคำแนะนำค้างอยู่ ให้ตัดสินใจใช้ผลจากกฎหรือคงผลที่เลือกเองก่อน"
|
||||
},
|
||||
"confirmDialog": {
|
||||
"reasonLabel": "เหตุผล (จำเป็น)",
|
||||
"reasonPlaceholder": "อธิบายเหตุผลของการดำเนินการ...",
|
||||
@@ -1782,7 +1835,7 @@
|
||||
},
|
||||
"itemStatus": {
|
||||
"queued": "รอคิว",
|
||||
"layout_parsing": "กำลังอ่านเลย์เอาต์",
|
||||
"layout_parsing": "กำลังอ่านเนื้อหาในหน้า",
|
||||
"extracting": "กำลังดึงข้อมูล",
|
||||
"building_order": "กำลังสร้างออเดอร์",
|
||||
"inventory_matching": "กำลังจับคู่สต็อก",
|
||||
@@ -1792,7 +1845,8 @@
|
||||
"failed": "ล้มเหลว",
|
||||
"closed": "เสร็จแล้ว",
|
||||
"cancelled": "ยกเลิกแล้ว",
|
||||
"manual_upload_pending": "รอลงทะเบียนอัปโหลด"
|
||||
"manual_upload_pending": "รอลงทะเบียนอัปโหลด",
|
||||
"unknown": "รอยืนยันสถานะ"
|
||||
},
|
||||
"closedReason": {
|
||||
"confirmed": "ยืนยันสร้างออเดอร์แล้ว",
|
||||
@@ -1802,11 +1856,21 @@
|
||||
},
|
||||
"actions": {
|
||||
"refresh": "รีเฟรช",
|
||||
"openReview": "เปิดเวิร์กสเปซตรวจสอบ",
|
||||
"viewProgress": "ดูความคืบหน้า",
|
||||
"cancelFile": "ยกเลิกไฟล์นี้",
|
||||
"reparse": "ระบุใหม่",
|
||||
"retryFailedRun": "ลองรันที่ล้มเหลวอีกครั้ง"
|
||||
},
|
||||
"reparseError": {
|
||||
"title": "การระบุใหม่ไม่เสร็จสมบูรณ์",
|
||||
"schemaUnavailable": "ไม่สามารถใช้กฎฟิลด์คำสั่งซื้อเวอร์ชันปัจจุบัน จึงยังไม่มีผลการระบุใหม่",
|
||||
"fallback": "ระบบเก็บเวอร์ชันเดิมไว้แล้ว โปรดเปิดเวิร์กสเปซตรวจสอบเพื่อจัดการด้วยตนเอง",
|
||||
"contactAdmin": "หากเกิดกับหลายไฟล์ โปรดติดต่อผู้ดูแลระบบให้ตรวจสอบเวอร์ชันกฎฟิลด์คำสั่งซื้อ",
|
||||
"pending": "ไฟล์นี้กำลังระบุใหม่อยู่ โปรดรอให้งานปัจจุบันเสร็จสิ้น",
|
||||
"generic": "การระบุใหม่ไม่เสร็จสมบูรณ์ โปรดดูรายละเอียดหรือลองอีกครั้งภายหลัง",
|
||||
"requestId": "รหัสคำขอ: {id}"
|
||||
},
|
||||
"reasonDialog": {
|
||||
"cancelTitle": "ยกเลิกไฟล์นี้",
|
||||
"reparseTitle": "ลองใหม่ / ระบุใหม่",
|
||||
@@ -1825,14 +1889,17 @@
|
||||
"filename": "ชื่อไฟล์",
|
||||
"status": "สถานะ",
|
||||
"stage": "ขั้นตอน",
|
||||
"runNo": "รอบดึงข้อมูล",
|
||||
"caseNo": "เคสรีวิว",
|
||||
"runNo": "ชุดการระบุข้อมูล",
|
||||
"caseNo": "หมายเลขการตรวจสอบ",
|
||||
"lastActivity": "กิจกรรมล่าสุด",
|
||||
"closedReason": "เหตุผลที่ปิด",
|
||||
"eventsTitle": "ไทม์ไลน์เหตุการณ์",
|
||||
"eventsEmpty": "ยังไม่มีเหตุการณ์",
|
||||
"empty": "ยังไม่ได้เลือกไฟล์"
|
||||
},
|
||||
"versionHistoryNote": "API ประวัติเวอร์ชันฉบับเต็มยังไม่มี — แสดงเฉพาะเวอร์ชันปัจจุบัน"
|
||||
"event": {
|
||||
"unknown": "อัปเดตสถานะการประมวลผลแล้ว"
|
||||
},
|
||||
"versionHistoryNote": "แสดงเวอร์ชันที่พร้อมใช้งานสำหรับไฟล์นี้"
|
||||
}
|
||||
}
|
||||
@@ -248,7 +248,8 @@
|
||||
"SHIPPING_NOTICE_INTAKE_PARSE_TIMEOUT": "การแยกข้อความใบแจ้งจัดส่งหมดเวลา โปรดลองใหม่หรือลบแล้วอัปโหลดใหม่",
|
||||
"SHIPPING_NOTICE_INTAKE_STAGE2_PERSIST_FAILED": "บันทึกอีเมลหรือไฟล์แนบที่ประมวลผลเบื้องต้นไม่สำเร็จ โปรดลองแยกข้อความใหม่",
|
||||
"SHIPPING_NOTICE_INTAKE_ATTACHMENTS_INCOMPLETE": "ไฟล์แนบใบแจ้งจัดส่งแยกข้อความไม่ครบ โปรดลองแยกใหม่หรือลบแล้วอัปโหลดใหม่",
|
||||
"SHIPPING_NOTICE_INTAKE_ALREADY_CONSUMED": "บันทึก intake ถูกใช้งานไปแล้ว",
|
||||
"SHIPPING_NOTICE_INTAKE_ALREADY_CONSUMED": "ไฟล์นี้เข้าสู่กระบวนการคำสั่งซื้อแล้ว โปรดดูผลลัพธ์เดิมโดยไม่ต้องส่งซ้ำ",
|
||||
"SHIPPING_NOTICE_ORDER_EXTRACTION_ALREADY_CONSUMED": "ไฟล์นี้มีผลการประมวลผลคำสั่งซื้อแล้ว โปรดดูผลลัพธ์หรือใช้การรู้จำใหม่",
|
||||
"SHIPPING_NOTICE_INTAKE_EXPIRED": "บันทึก intake หมดอายุแล้ว",
|
||||
"SHIPPING_NOTICE_INTAKE_INVALID_STATUS": "สถานะ intake ปัจจุบันไม่อนุญาตการดำเนินการนี้",
|
||||
"SHIPPING_NOTICE_DUPLICATE_RESOLUTION_REQUIRED": "พบใบแจ้งจัดส่งซ้ำ กรุณาเลือกวิธีดำเนินการก่อน",
|
||||
@@ -370,6 +371,8 @@
|
||||
"SHIPPING_REVIEW_DRAFT_VERSION_MISMATCH": "ร่างถูกแก้ไขจากหน้าต่างอื่น โปรดรีเฟรชแล้วลองใหม่",
|
||||
"SHIPPING_REVIEW_FIELD_INVALID": "ฟิลด์ตรวจทานไม่อยู่ใน Schema ที่ตรึงไว้ของคำสั่งซื้อนี้",
|
||||
"SHIPPING_REVIEW_INVENTORY_CANDIDATES_INVALID": "ตัวเลือกแหล่งสินค้าคงคลังไม่ถูกต้อง โปรดเลือกแหล่งที่เปิดใช้และระบุเหตุผล",
|
||||
"SHIPPING_REVIEW_INVENTORY_ROUTING_ADOPT_INVALID": "ไม่สามารถใช้คำแนะนำจากกฎได้ เพราะแถวนี้ไม่มีผลกฎที่ค้างอยู่ซึ่งถูกต้อง",
|
||||
"SHIPPING_REVIEW_INVENTORY_ROUTING_KEEP_INVALID": "ไม่สามารถคงผลที่เลือกเองได้ เพราะแถวนี้ไม่มีคำแนะนำจากกฎที่ค้างอยู่",
|
||||
"SHIPPING_REVIEW_BUILD_ELIGIBILITY_BLOCKED": "คุณสมบัติการสร้างงานไม่ผ่าน โปรดแก้ปัญหาที่บล็อกหรือเติมแหล่งสินค้าคงคลังก่อนยืนยัน",
|
||||
"SHIPPING_REVIEW_LINE_NOT_FOUND": "ไม่พบรายการคำสั่งซื้อหรือรายการถูกลบแล้ว",
|
||||
"SHIPPING_REVIEW_DOCUMENT_NOT_FOUND": "ไม่พบ PDF สำหรับตรวจทานหรือไม่มีสิทธิ์เข้าถึง",
|
||||
@@ -397,6 +400,18 @@
|
||||
"SHIPPING_REVIEW_QUALITY_COMMENT_REQUIRED": "ต้องระบุรายละเอียดเมื่อเลือกเหตุผลเป็น อื่นๆ",
|
||||
"SHIPPING_NOTICE_SESSION_WORK_ITEM_CLOSE_REASON_REQUIRED": "ต้องระบุเหตุผลเมื่อยกเลิกรายการงานนี้",
|
||||
"SHIPPING_NOTICE_SESSION_WORK_ITEM_LOCK_VERSION_INVALID": "หมายเลขเวอร์ชันรายการงานไม่ถูกต้อง โปรดรีเฟรชแล้วลองใหม่",
|
||||
"SHIPPING_NOTICE_SESSION_WORK_ITEM_VERSION_CONFLICT": "รายการงานถูกอัปเดตโดยการดำเนินการอื่น โปรดรีเฟรชแล้วลองใหม่"
|
||||
"SHIPPING_NOTICE_SESSION_WORK_ITEM_VERSION_CONFLICT": "รายการงานถูกอัปเดตโดยการดำเนินการอื่น โปรดรีเฟรชแล้วลองใหม่",
|
||||
"SHIPPING.PROCESS_EXECUTION_NOT_FOUND": "ไม่พบ process execution",
|
||||
"SHIPPING.PROCESS_GATE_NOT_FOUND": "ไม่พบ process gate",
|
||||
"SHIPPING.PROCESS_GATE_ACTION_INVALID": "การกู้คืน process gate ไม่ถูกต้อง",
|
||||
"SHIPPING.PROCESS_GATE_ACTION_FORBIDDEN": "คำขอมีฟิลด์ควบคุมการทำงานที่ห้ามส่ง",
|
||||
"SHIPPING.PROCESS_GATE_ACTION_NOT_ALLOWED": "การกระทำนี้ไม่ใช่การกู้คืนหลักที่อนุญาตสำหรับ gate ปัจจุบัน",
|
||||
"SHIPPING.PROCESS_GATE_VERSION_MISMATCH": "เวอร์ชัน gate เปลี่ยนแล้ว โปรดรีเฟรชแล้วลองใหม่",
|
||||
"SHIPPING.PROCESS_GATE_BUSY": "gate กำลังทำงานอยู่ โปรดลองใหม่ภายหลัง",
|
||||
"SHIPPING.PROCESS_GATE_ALREADY_PASSED": "gate นี้ผ่านแล้ว",
|
||||
"SHIPPING.PROCESS_GATE_ATTEMPT_NOT_FOUND": "ไม่พบ process gate attempt",
|
||||
"SHIPPING.PROCESS_GATE_PERMISSION_DENIED": "คุณไม่มีสิทธิ์เข้าถึงหรือกู้คืน gate นี้",
|
||||
"SHIPPING.PROCESS_GATE_IDEMPOTENCY_REQUIRED": "คำขอกู้คืนไม่มี idempotency key",
|
||||
"SHIPPING.PROCESS_GATE_IDEMPOTENCY_CONFLICT": "idempotency key ขัดแย้งกับคำขอ gate อื่น กรุณาใช้คีย์ใหม่แล้วลองอีกครั้ง"
|
||||
}
|
||||
}
|
||||
@@ -122,11 +122,57 @@
|
||||
"adminViewOnlyShort": "ดูอย่างเดียว",
|
||||
"lastActivity": "กิจกรรมล่าสุด",
|
||||
"terminateReason": "เหตุผลยุติ",
|
||||
"workflowItem": "Workflow Item",
|
||||
"workflowItem": "รายการไฟล์",
|
||||
"downloadExcel": "ดาวน์โหลด Excel",
|
||||
"manualUploadEndNote": "สร้าง Excel แล้ว โปรดดาวน์โหลด อัปโหลดบนแพลตฟอร์มขนส่ง แล้วลงทะเบียนหลักฐานในระบบนี้",
|
||||
"waitingManualUploadNote": "สร้าง Excel แล้ว โปรดดาวน์โหลด อัปโหลดบนแพลตฟอร์มขนส่ง แล้วลงทะเบียนหลักฐานในระบบนี้"
|
||||
},
|
||||
"processGate": {
|
||||
"title": "รายการที่ต้องดำเนินการ",
|
||||
"currentGate": "ขั้นตอนปัจจุบัน",
|
||||
"blockingMessage": "เหตุผลที่ต้องดำเนินการ",
|
||||
"reasonCode": "เหตุผล",
|
||||
"diagnosticHint": "คำแนะนำในการดำเนินการ",
|
||||
"noAction": "ขณะนี้ไม่มีการดำเนินการที่ใช้ได้",
|
||||
"versionMissing": "ข้อมูลนี้มีการเปลี่ยนแปลง โปรดรีเฟรชแล้วลองใหม่",
|
||||
"navigationMissing": "ไม่มีข้อมูลสำหรับนำทาง โปรดรีเฟรชแล้วลองใหม่",
|
||||
"genericBlocking": "ขั้นตอนนี้ต้องดำเนินการด้วยตนเอง",
|
||||
"unknownStep": "ขั้นตอนปัจจุบัน",
|
||||
"continueAction": "ดำเนินการต่อ",
|
||||
"actionSubmitted": "ส่งการดำเนินการแล้ว",
|
||||
"submitting": "กำลังส่ง…",
|
||||
"actionCodes": {
|
||||
"retry_with_latest_rules": "ลองใหม่ด้วยกฎล่าสุด",
|
||||
"open_inventory_source_review": "เปิดการตรวจสอบแหล่งสต็อก",
|
||||
"open_order_review": "เปิดการตรวจทานคำสั่งซื้อ",
|
||||
"open_profile_review": "เปิดการตรวจทานโปรไฟล์",
|
||||
"edit_order_fields": "แก้ไขฟิลด์คำสั่งซื้อ",
|
||||
"confirm_customer": "ยืนยันลูกค้า",
|
||||
"adjudicate_duplicate": "ตัดสินคำสั่งซื้อซ้ำ",
|
||||
"resolve_field_conflicts": "แก้ไขความขัดแย้งฟิลด์",
|
||||
"open_inventory_match_review": "เปิดการตรวจสอบการจับคู่สต็อก",
|
||||
"open_shortage_review": "เปิดการตรวจสอบสินค้าขาด",
|
||||
"upload_inventory_file": "อัปโหลดไฟล์สต็อก",
|
||||
"adopt_rule_suggestion": "ยอมรับคำแนะนำกฎ",
|
||||
"keep_manual_inventory_decision": "คงการตัดสินใจด้วยตนเอง",
|
||||
"retry_task_creation": "ลองสร้างงานใหม่",
|
||||
"retry_inventory_preparation": "ลองเตรียมสต็อกใหม่",
|
||||
"regenerate_excel_artifact": "สร้าง Excel ใหม่",
|
||||
"regenerate_manual_upload_todo": "สร้างงานอัปโหลดด้วยตนเองใหม่"
|
||||
},
|
||||
"reasons": {
|
||||
"freeze_not_ready": "คำสั่งซื้อยังไม่พร้อมสร้างหรือ freeze",
|
||||
"profile_not_auto_freeze_approved": "โปรไฟล์เอกสารยังไม่ได้รับอนุมัติ auto build",
|
||||
"profile_manual_confirmation_required": "โปรไฟล์เอกสารต้องยืนยันด้วยตนเอง",
|
||||
"customer_unresolved": "ยังระบุลูกค้าไม่ได้",
|
||||
"customer_ambiguous": "การระบุลูกค้ามีความคลุมเครือ",
|
||||
"field_conflict": "ฟิลด์ขัดแย้ง ต้องตัดสินด้วยตนเอง",
|
||||
"duplicate_unresolved": "คำสั่งซื้อซ้ำยังไม่ได้รับการแก้ไข",
|
||||
"require_manual_review": "ต้องตรวจทานด้วยตนเอง",
|
||||
"no_inventory_source_candidates": "ไม่พบแหล่งสต็อกที่ใช้ได้",
|
||||
"inventory_source_unavailable": "แหล่งสต็อกไม่พร้อมใช้งาน"
|
||||
}
|
||||
},
|
||||
"myTodos": {
|
||||
"title": "งานของฉัน",
|
||||
"subtitle": "รวมรายการรอบทบทวน ข้อยกเว้น และรอลงทะเบียนอัปโหลดด้วยตนเองข้ามเซสชัน",
|
||||
@@ -178,8 +224,28 @@
|
||||
"empty": "ยังไม่มีเหตุการณ์",
|
||||
"detail": "ดูรายละเอียด",
|
||||
"sourceTask": "เหตุการณ์งาน",
|
||||
"sourceWorkflow": "เหตุการณ์ Workflow",
|
||||
"workflowEvent": "เหตุการณ์ Workflow"
|
||||
"sourceWorkflow": "บันทึกการประมวลผลไฟล์",
|
||||
"workflowEvent": "บันทึกการประมวลผลไฟล์",
|
||||
"updated": "อัปเดตสถานะการประมวลผลแล้ว",
|
||||
"actors": {
|
||||
"user": "ผู้ใช้งานธุรกิจ",
|
||||
"system": "ระบบ",
|
||||
"admin": "ผู้ดูแลระบบ"
|
||||
}
|
||||
},
|
||||
"workflowStatus": {
|
||||
"created": "สร้างแล้ว",
|
||||
"queued": "รอดำเนินการ",
|
||||
"extracting": "กำลังอ่านข้อมูล",
|
||||
"pending_review": "รอตรวจสอบ",
|
||||
"waiting_manual_upload": "รออัปโหลดด้วยตนเอง",
|
||||
"failed": "ดำเนินการไม่สำเร็จ",
|
||||
"completed": "เสร็จสิ้น",
|
||||
"closed": "สิ้นสุดแล้ว"
|
||||
},
|
||||
"workflowReasons": {
|
||||
"user_cancelled": "ผู้ใช้ยกเลิกแล้ว",
|
||||
"completed": "ดำเนินการเสร็จสิ้นแล้ว"
|
||||
},
|
||||
"stpFacts": {
|
||||
"title": "ความคืบหน้า STP",
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
"shippingIdentityRules": "客户识别",
|
||||
"shippingOrderExtractionRuns": "识别任务",
|
||||
"shippingOrderDocumentProfiles": "文档模板",
|
||||
"shippingAudit": "运行与审计中心"
|
||||
"shippingAudit": "运行与审计中心",
|
||||
"shippingProcessGates": "门禁诊断"
|
||||
},
|
||||
"shippingFieldAssets": {
|
||||
"title": "字段资产库",
|
||||
@@ -3690,5 +3691,81 @@
|
||||
"chainTruncated": "(已截断)",
|
||||
"eventHash": "事件哈希",
|
||||
"previousEventHash": "前序哈希"
|
||||
},
|
||||
"shippingProcessGates": {
|
||||
"title": "Process Gate 诊断",
|
||||
"subtitle": "只读查看 Execution 门禁轨道、阻断状态与 Attempt 历史,供运维排查恢复链路。",
|
||||
"refresh": "刷新",
|
||||
"loading": "加载中…",
|
||||
"empty": "暂无 Execution",
|
||||
"loadFailed": "加载 Execution 列表失败",
|
||||
"detailFailed": "加载 Execution 详情失败",
|
||||
"attemptsFailed": "加载 Attempt 失败",
|
||||
"detailTitle": "Execution 诊断",
|
||||
"executionNo": "Execution 编号",
|
||||
"status": "状态",
|
||||
"allStatuses": "全部状态",
|
||||
"currentGate": "当前 Gate",
|
||||
"nextAction": "主动作",
|
||||
"updatedAt": "更新时间",
|
||||
"actions": "操作",
|
||||
"viewDetail": "查看详情",
|
||||
"viewAttempts": "查看 Attempt",
|
||||
"viewSnapshots": "查看输入/输出快照",
|
||||
"total": "共 {count} 条",
|
||||
"previous": "上一页",
|
||||
"next": "下一页",
|
||||
"gates": "Gate 轨道",
|
||||
"gateCode": "Gate 编码",
|
||||
"gateStatus": "Gate 状态",
|
||||
"blockingReason": "阻断原因码",
|
||||
"blockingReasonDetail": "阻断原因详情",
|
||||
"gateDiagnostics": "当前 Gate 诊断",
|
||||
"findings": "Findings",
|
||||
"effectiveResult": "有效结果",
|
||||
"attempts": "Attempt 列表",
|
||||
"noAttempts": "暂无 Attempt",
|
||||
"taskNo": "任务编号",
|
||||
"caseNo": "复核 Case",
|
||||
"scrollHint": "表格可左右滑动查看完整列",
|
||||
"filterGate": "Gate 编码筛选",
|
||||
"filterReason": "阻断原因码筛选",
|
||||
"filterParty": "责任方筛选",
|
||||
"filterSearch": "关键字搜索",
|
||||
"filterFrom": "更新时间起",
|
||||
"filterTo": "更新时间止",
|
||||
"applyFilters": "应用筛选",
|
||||
"resetFilters": "重置筛选",
|
||||
"findingsStructured": "结构化 Findings",
|
||||
"severity": "严重级别",
|
||||
"field": "字段",
|
||||
"party": "责任方",
|
||||
"reason": "原因码",
|
||||
"message": "说明",
|
||||
"noFindings": "暂无 Finding",
|
||||
"attemptDiff": "{scope}:新增 {added}、删除 {removed}、变更 {changed}",
|
||||
"auditLink": "可在审计中心查看该 Execution 的 process_gate_ 事件",
|
||||
"openAudit": "打开审计中心",
|
||||
"responsibleParty": "责任方",
|
||||
"blockingReasonCode": "阻断原因码",
|
||||
"statusLabels": {
|
||||
"active": "进行中",
|
||||
"blocked": "已阻断",
|
||||
"waiting_external": "等待外部",
|
||||
"completed": "已完成",
|
||||
"failed": "失败",
|
||||
"cancelled": "已取消",
|
||||
"pending": "待处理",
|
||||
"queued": "已排队",
|
||||
"running": "执行中",
|
||||
"passed": "已通过",
|
||||
"blocked_retryable": "可重试阻断",
|
||||
"blocked_manual": "需人工处理",
|
||||
"failed_terminal": "终态失败",
|
||||
"invalidated": "已失效",
|
||||
"skipped": "已跳过",
|
||||
"succeeded": "成功",
|
||||
"superseded": "已替代"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -198,7 +198,7 @@
|
||||
"nonOrderReasonPrompt": "请填写标记非订单的原因",
|
||||
"reparseReasonPrompt": "请填写重新识别的原因",
|
||||
"reasonRequired": "必须填写原因后才能继续",
|
||||
"caseRequired": "当前工作项缺少复核 Case,请先进入人工复核",
|
||||
"caseRequired": "当前文件尚未生成复核单,请稍后再进入人工复核",
|
||||
"versionHistoryTitle": "版本历史",
|
||||
"currentVersion": "当前",
|
||||
"readonlyVersion": "只读",
|
||||
@@ -378,7 +378,8 @@
|
||||
"candidate_ready": "候选已生成",
|
||||
"review_required": "需要人工复核",
|
||||
"failed": "处理失败",
|
||||
"cancelled": "已取消"
|
||||
"cancelled": "已取消",
|
||||
"unknown": "状态待确认"
|
||||
},
|
||||
"shippingOrderExtractionReason": {
|
||||
"profile_not_found": "未找到适用的已发布订单模板。",
|
||||
@@ -429,12 +430,14 @@
|
||||
"generic_deterministic": "通用规则确定性解析",
|
||||
"llm_assisted_review": "AI 辅助复核",
|
||||
"manual_review": "人工复核",
|
||||
"rejected": "已拒识"
|
||||
"rejected": "已拒识",
|
||||
"unknown": "处理方式待确认"
|
||||
},
|
||||
"shippingOrderExtractionFreezeSource": {
|
||||
"profile_deterministic": "自动冻结来源:异型模板",
|
||||
"generic_deterministic": "自动冻结来源:通用规则",
|
||||
"manual_confirmation": "冻结来源:人工确认"
|
||||
"manual_confirmation": "确认方式:人工确认",
|
||||
"unknown": "确认方式待确认"
|
||||
},
|
||||
"shippingOrderExtractionPlanSummary": "本轮从 {total} 个附件中规划 {groups} 个订单组,首轮最多识别 {attachments} 个附件,并发 {concurrency} 个。",
|
||||
"shippingOrderExtractionPlanSelected": "已选 {count} 个附件",
|
||||
@@ -473,7 +476,8 @@
|
||||
},
|
||||
"shippingOrderExtractionEmailSupplementRelation": {
|
||||
"po_mpn": "关联方式:PO + 料号",
|
||||
"po_fallback": "关联方式:按 PO 回退"
|
||||
"po_fallback": "关联方式:按 PO 匹配",
|
||||
"unknown": "关联方式待确认"
|
||||
},
|
||||
"shippingOrderExtractionEmailSupplementField": {
|
||||
"reservation": "Reservation:",
|
||||
@@ -1469,7 +1473,7 @@
|
||||
"unknown": "状态未知"
|
||||
},
|
||||
"previewTitle": "PDF 预览",
|
||||
"buildGateRail": "建单资格与库存候选",
|
||||
"buildGateRail": "订单检查与库存来源",
|
||||
"previewLoading": "正在加载 PDF 预览...",
|
||||
"previewUnavailable": "PDF 预览不可用,草稿编辑不受影响。",
|
||||
"previewCollapsed": "该证据只有页码和引文,没有可靠坐标;已收起 PDF 预览。",
|
||||
@@ -1480,15 +1484,36 @@
|
||||
"viewEvidence": "查看证据",
|
||||
"locateSource": "定位原文:{field}",
|
||||
"orderFields": "订单字段",
|
||||
"schemaVersion": "冻结 Schema #{version}",
|
||||
"schemaVersion": "订单字段版本 V{version}",
|
||||
"issues": "待处理问题",
|
||||
"machineSource": "来源:机器识别",
|
||||
"issueCodes": {
|
||||
"customer_unresolved": "客户信息尚未确认",
|
||||
"machine_order_unavailable": "未识别到可复核的订单内容",
|
||||
"machine_multiple_orders_legacy": "文件中可能包含多份订单,请人工确认",
|
||||
"required_field_missing": "缺少创建订单所需的信息",
|
||||
"field_value_invalid": "部分订单信息格式不正确",
|
||||
"invalid_order_line": "部分订单明细不完整或格式不正确",
|
||||
"effective_reservation_missing": "缺少有效的预约单号",
|
||||
"reservation_duplicated_in_order": "订单内存在重复的预约单号",
|
||||
"require_manual_review": "库存来源需要人工确认",
|
||||
"no_inventory_source_candidates": "未找到可用的库存来源",
|
||||
"manual_inventory_source_reason_required": "请选择库存来源并填写原因",
|
||||
"manual_inventory_source_invalid": "所选库存来源当前不可用",
|
||||
"inventory_source_unresolved": "库存来源尚未确定",
|
||||
"auto_build_gate_approved_template": "该文件需要人工复核后创建订单",
|
||||
"auto_build_gate_fields_complete": "请补全订单信息后继续",
|
||||
"auto_build_gate_evidence_passed": "部分识别结果需要人工核对",
|
||||
"auto_build_gate_no_conflict_or_duplicate": "请确认订单是否重复或存在信息冲突",
|
||||
"auto_build_gate_quality_gate_passed": "自动建单策略尚未放行,需人工确认",
|
||||
"unknown": "系统发现一项需要人工确认的内容"
|
||||
},
|
||||
"machineSource": "来源:系统识别",
|
||||
"manualSource": "来源:人工修改",
|
||||
"derivedSource": "来源:规则派生",
|
||||
"overrideSource": "来源:人工覆盖(已锁定)",
|
||||
"skippedSource": "来源:派生跳过",
|
||||
"valueSources": {
|
||||
"machine": "机器识别",
|
||||
"machine": "系统识别",
|
||||
"manual": "人工修改",
|
||||
"manual_override": "人工覆盖",
|
||||
"derived": "规则派生",
|
||||
@@ -1504,10 +1529,11 @@
|
||||
"compare": "对比建议",
|
||||
"scope": "证据范围:{level}",
|
||||
"evidenceLevel": {
|
||||
"L1_field": "字段原文",
|
||||
"L1_field": "当前字段内容",
|
||||
"L2_table": "所在表格",
|
||||
"L3_page": "所在页面",
|
||||
"L4_pdf": "整份 PDF(需授权)"
|
||||
"L4_pdf": "整份 PDF(需授权)",
|
||||
"unknown": "相关文档内容"
|
||||
},
|
||||
"review": "裁决",
|
||||
"empty": "尚无 AI 建议。选择字段后点击请求。",
|
||||
@@ -1527,7 +1553,8 @@
|
||||
"accepted": "已接受",
|
||||
"modified": "已修改",
|
||||
"rejected": "已拒绝",
|
||||
"failed": "不可用"
|
||||
"failed": "不可用",
|
||||
"unknown": "状态待确认"
|
||||
},
|
||||
"decisions": {
|
||||
"accept": "接受",
|
||||
@@ -1558,7 +1585,7 @@
|
||||
"other": "其他"
|
||||
}
|
||||
},
|
||||
"restoreMachine": "恢复机器值",
|
||||
"restoreMachine": "恢复系统识别值",
|
||||
"restorePriorProjection": "恢复识别/派生值",
|
||||
"lineNoUnsavedHint": "未保存 · 失焦后填写覆盖原因",
|
||||
"lockedHint": "已锁定",
|
||||
@@ -1591,7 +1618,7 @@
|
||||
"addLine": "新增行",
|
||||
"copyLine": "复制行",
|
||||
"deleteLine": "删除行",
|
||||
"noMachineOrder": "机器识别结果待人工确认,可创建草稿进行修正。",
|
||||
"noMachineOrder": "系统识别结果需要人工确认,可创建草稿进行修正。",
|
||||
"lines": "订单明细",
|
||||
"line": "第 {index} 行",
|
||||
"noLines": "未识别到订单明细。",
|
||||
@@ -1634,9 +1661,19 @@
|
||||
"manual_upload_pending": "待人工上传登记"
|
||||
}
|
||||
},
|
||||
"reparseProgress": {
|
||||
"title": "PDF 重新识别进度",
|
||||
"subtitle": "进度来自当前工作项,完成后将自动打开新版复核草稿。",
|
||||
"polling": "正在刷新真实进度…",
|
||||
"refreshFailed": "暂时无法刷新进度,正在保留当前阶段并自动重试。",
|
||||
"failed": "重新识别未完成,已保留上一版本。您可以直接再次识别。",
|
||||
"retry": "重新识别",
|
||||
"stages": { "submitted": "已提交", "layout_parsing": "读取页面内容", "extracting": "提取订单信息", "draft_ready": "准备复核内容" }
|
||||
},
|
||||
"backToSession": "返回本次处理",
|
||||
"workItemHeader": "工作项 {itemNo} · {version}",
|
||||
"jumpToCurrentVersion": "跳转当前版本",
|
||||
"currentVersionUnavailable": "当前版本尚未生成或进度暂时无法刷新,请稍后重试。",
|
||||
"showContext": "对话上下文",
|
||||
"hideContext": "收起对话上下文",
|
||||
"contextTitle": "对话上下文",
|
||||
@@ -1649,6 +1686,7 @@
|
||||
"reparse_in_progress": "此 PDF 正在重新识别,请等待完成后继续复核。",
|
||||
"restored": "重识别失败已恢复上一版本,可继续编辑。",
|
||||
"draft_version_conflict": "草稿版本冲突:本地编辑已过期,请重新加载最新版本后再继续。"
|
||||
,"unknown": "订单状态已更新,请刷新后继续处理。"
|
||||
},
|
||||
"versionHistory": {
|
||||
"title": "版本历史",
|
||||
@@ -1660,31 +1698,33 @@
|
||||
"open": "打开"
|
||||
},
|
||||
"buildEligibility": {
|
||||
"title": "建单资格",
|
||||
"subtitle": "校验草稿后汇总的 Reservation 与库存源门禁。",
|
||||
"title": "订单检查",
|
||||
"subtitle": "检查订单信息和库存来源是否满足创建条件。",
|
||||
"canBuildYes": "可建单",
|
||||
"canBuildNo": "暂不可建单",
|
||||
"statusLabel": "资格状态",
|
||||
"blockingSummary": "阻断摘要",
|
||||
"lineProjections": "明细投影",
|
||||
"blockingSummary": "需要处理",
|
||||
"lineProjections": "明细检查结果",
|
||||
"lineCanBuild": "可建单",
|
||||
"lineBlocked": "阻断",
|
||||
"reservation": "有效 Reservation",
|
||||
"routingStatusLabel": "路由状态",
|
||||
"lineBlocked": "需要处理",
|
||||
"reservation": "预约单号",
|
||||
"routingStatusLabel": "库存来源状态",
|
||||
"sourceHint": "库存线索",
|
||||
"candidates": "候选库存源",
|
||||
"blockReason": "阻断原因",
|
||||
"blockReason": "需要处理的原因",
|
||||
"manualReason": "人工说明",
|
||||
"confirmBlocked": "当前草稿未满足建单资格,请先处理库存源或校验问题后再确认。",
|
||||
"status": {
|
||||
"ready": "可建单",
|
||||
"needs_review": "待复核"
|
||||
"needs_review": "待复核",
|
||||
"unknown": "待确认"
|
||||
},
|
||||
"routingStatus": {
|
||||
"resolved": "已解析",
|
||||
"ambiguous": "多候选",
|
||||
"unresolved": "未解析",
|
||||
"conflicted": "需人工复核"
|
||||
"conflicted": "需人工确认",
|
||||
"unknown": "待确认"
|
||||
},
|
||||
"blockReasons": {
|
||||
"require_manual_review": "规则要求人工复核库存源",
|
||||
@@ -1692,20 +1732,33 @@
|
||||
"manual_inventory_source_reason_required": "须填写人工选源原因",
|
||||
"manual_inventory_source_invalid": "所选库存源无效或未启用",
|
||||
"inventory_source_unresolved": "库存源未解析",
|
||||
"effective_reservation_missing": "缺少有效 Reservation"
|
||||
"effective_reservation_missing": "缺少有效的预约单号",
|
||||
"unknown": "系统发现一项需要人工确认的内容"
|
||||
}
|
||||
},
|
||||
"inventoryCandidates": {
|
||||
"title": "人工选择库存源",
|
||||
"subtitle": "为未决明细选择一个或多个已启用库存源,并说明原因。",
|
||||
"subtitle": "为未决明细选择一个或多个已启用库存源,并说明原因;也可重新匹配规则或处理待决建议。",
|
||||
"selectSources": "选择候选源",
|
||||
"selectEnabledSources": "从已启用库存源中选择",
|
||||
"noCandidates": "暂无可选库存源,请检查路由规则或联系管理员。",
|
||||
"noCandidates": "暂无可选库存来源,请联系管理员检查相关配置。",
|
||||
"noEnabledSources": "系统中没有已启用的库存源,请联系管理员启用后再选择。",
|
||||
"reasonLabel": "选择原因(必填)",
|
||||
"reasonPlaceholder": "请说明为何选择这些库存源...",
|
||||
"submit": "提交候选"
|
||||
},
|
||||
"inventoryRouting": {
|
||||
"reroute": "重新匹配路由",
|
||||
"adoptSuggestion": "采用规则结果",
|
||||
"keepManual": "保留人工结果",
|
||||
"suggestionPending": "规则建议与当前人工结果不一致,请选择采用或保留。",
|
||||
"rawCandidates": "规则原始候选",
|
||||
"unavailableCandidates": "不可用候选",
|
||||
"ruleSuggestion": "规则建议源",
|
||||
"ruleVersions": "规则版本",
|
||||
"hint": "库存源提示",
|
||||
"rerouteHint": "可随时重新匹配路由;若存在待决规则建议,请选择采用或保留人工结果。"
|
||||
},
|
||||
"confirmDialog": {
|
||||
"reasonLabel": "原因(必填)",
|
||||
"reasonPlaceholder": "请说明操作原因...",
|
||||
@@ -1734,7 +1787,7 @@
|
||||
"reasonCodeRequired": "请选择原因类型",
|
||||
"quality_issue": {
|
||||
"title": "标记文件质量异常",
|
||||
"impact": "保留当前 PDF、草稿与机器识别结果,供补件或重新识别;须选择原因并在选择「其他」时填写说明。",
|
||||
"impact": "保留当前 PDF、草稿与系统识别结果,供补件或重新识别;须选择原因并在选择「其他」时填写说明。",
|
||||
"confirm": "确认标记"
|
||||
},
|
||||
"qualityReasons": {
|
||||
@@ -1782,7 +1835,7 @@
|
||||
},
|
||||
"itemStatus": {
|
||||
"queued": "排队中",
|
||||
"layout_parsing": "版面解析中",
|
||||
"layout_parsing": "读取页面内容中",
|
||||
"extracting": "识别中",
|
||||
"building_order": "建单中",
|
||||
"inventory_matching": "库存匹配中",
|
||||
@@ -1792,7 +1845,8 @@
|
||||
"failed": "失败",
|
||||
"closed": "已完成",
|
||||
"cancelled": "已取消",
|
||||
"manual_upload_pending": "待人工上传登记"
|
||||
"manual_upload_pending": "待人工上传登记",
|
||||
"unknown": "状态待确认"
|
||||
},
|
||||
"closedReason": {
|
||||
"confirmed": "已确认建单",
|
||||
@@ -1802,11 +1856,21 @@
|
||||
},
|
||||
"actions": {
|
||||
"refresh": "刷新",
|
||||
"openReview": "进入复核工作台",
|
||||
"viewProgress": "查看进度",
|
||||
"cancelFile": "取消此文件",
|
||||
"reparse": "重新识别",
|
||||
"retryFailedRun": "重试失败识别"
|
||||
},
|
||||
"reparseError": {
|
||||
"title": "重新识别未完成",
|
||||
"schemaUnavailable": "当前订单字段规则版本不可用,系统没有生成新的识别结果。",
|
||||
"fallback": "原有识别版本已保留,建议进入复核工作台人工处理。",
|
||||
"contactAdmin": "如果多个文件同时出现此问题,请联系管理员检查订单字段规则版本。",
|
||||
"pending": "该文件正在重新识别,请等待当前任务完成后再操作。",
|
||||
"generic": "重新识别未完成,请查看处理详情或稍后重试。",
|
||||
"requestId": "处理编号:{id}"
|
||||
},
|
||||
"reasonDialog": {
|
||||
"cancelTitle": "取消此文件",
|
||||
"reparseTitle": "重试/重新识别",
|
||||
@@ -1825,14 +1889,17 @@
|
||||
"filename": "文件名",
|
||||
"status": "状态",
|
||||
"stage": "阶段",
|
||||
"runNo": "抽取 Run",
|
||||
"caseNo": "复核 Case",
|
||||
"runNo": "识别批次",
|
||||
"caseNo": "复核编号",
|
||||
"lastActivity": "最近活动",
|
||||
"closedReason": "关闭原因",
|
||||
"eventsTitle": "事件时间线",
|
||||
"eventsEmpty": "暂无事件记录",
|
||||
"empty": "未选择文件"
|
||||
},
|
||||
"event": {
|
||||
"unknown": "处理状态已更新"
|
||||
},
|
||||
"versionHistoryNote": "完整版本历史待后端接口补齐;当前仅展示工作项最新版本。"
|
||||
}
|
||||
}
|
||||
@@ -248,7 +248,8 @@
|
||||
"SHIPPING_NOTICE_INTAKE_PARSE_TIMEOUT": "发货通知解析超时,请重试或移除后重新上传。",
|
||||
"SHIPPING_NOTICE_INTAKE_STAGE2_PERSIST_FAILED": "发货通知正文或附件预处理保存失败,请重试解析。",
|
||||
"SHIPPING_NOTICE_INTAKE_ATTACHMENTS_INCOMPLETE": "发货通知附件解析不完整,请重试解析或移除后重新上传。",
|
||||
"SHIPPING_NOTICE_INTAKE_ALREADY_CONSUMED": "发货通知接入记录已被消费。",
|
||||
"SHIPPING_NOTICE_INTAKE_ALREADY_CONSUMED": "该文件已进入订单处理,请查看现有处理结果,无需重复提交。",
|
||||
"SHIPPING_NOTICE_ORDER_EXTRACTION_ALREADY_CONSUMED": "该文件已完成一次订单处理,请查看现有结果或使用重新识别。",
|
||||
"SHIPPING_NOTICE_INTAKE_EXPIRED": "发货通知接入记录已过期。",
|
||||
"SHIPPING_NOTICE_INTAKE_INVALID_STATUS": "当前接入状态不允许该操作。",
|
||||
"SHIPPING_NOTICE_DUPLICATE_RESOLUTION_REQUIRED": "检测到重复发货通知,请先选择处理方式。",
|
||||
@@ -370,6 +371,8 @@
|
||||
"SHIPPING_REVIEW_DRAFT_VERSION_MISMATCH": "草稿已被其他窗口更新,请刷新后重试。",
|
||||
"SHIPPING_REVIEW_FIELD_INVALID": "复核字段不属于该订单的冻结模板。",
|
||||
"SHIPPING_REVIEW_INVENTORY_CANDIDATES_INVALID": "人工库存源候选无效:请选择已启用的库存源并填写原因。",
|
||||
"SHIPPING_REVIEW_INVENTORY_ROUTING_ADOPT_INVALID": "无法采用规则建议:当前行没有有效的待决规则结果。",
|
||||
"SHIPPING_REVIEW_INVENTORY_ROUTING_KEEP_INVALID": "无法保留人工结果:当前行没有待决的规则建议。",
|
||||
"SHIPPING_REVIEW_BUILD_ELIGIBILITY_BLOCKED": "建单资格未通过,请先处理阻断问题或补齐库存源候选后再确认。",
|
||||
"SHIPPING_REVIEW_LINE_NOT_FOUND": "订单明细行不存在或已被删除。",
|
||||
"SHIPPING_REVIEW_DOCUMENT_NOT_FOUND": "复核 PDF 不存在或无权访问。",
|
||||
@@ -397,6 +400,18 @@
|
||||
"SHIPPING_REVIEW_QUALITY_COMMENT_REQUIRED": "选择「其他」时必须填写质量异常说明。",
|
||||
"SHIPPING_NOTICE_SESSION_WORK_ITEM_CLOSE_REASON_REQUIRED": "取消本次处理必须填写原因。",
|
||||
"SHIPPING_NOTICE_SESSION_WORK_ITEM_LOCK_VERSION_INVALID": "工作项版本号无效,请刷新后重试。",
|
||||
"SHIPPING_NOTICE_SESSION_WORK_ITEM_VERSION_CONFLICT": "工作项已被其他操作更新,请刷新后重试。"
|
||||
"SHIPPING_NOTICE_SESSION_WORK_ITEM_VERSION_CONFLICT": "工作项已被其他操作更新,请刷新后重试。",
|
||||
"SHIPPING.PROCESS_EXECUTION_NOT_FOUND": "未找到流程执行实例。",
|
||||
"SHIPPING.PROCESS_GATE_NOT_FOUND": "未找到门禁实例。",
|
||||
"SHIPPING.PROCESS_GATE_ACTION_INVALID": "门禁恢复动作无效。",
|
||||
"SHIPPING.PROCESS_GATE_ACTION_FORBIDDEN": "请求包含禁止提交的执行控制字段。",
|
||||
"SHIPPING.PROCESS_GATE_ACTION_NOT_ALLOWED": "该动作不是当前门禁允许的主要恢复动作。",
|
||||
"SHIPPING.PROCESS_GATE_VERSION_MISMATCH": "门禁版本已变更,请刷新后重试。",
|
||||
"SHIPPING.PROCESS_GATE_BUSY": "门禁正在执行中,请稍后再试。",
|
||||
"SHIPPING.PROCESS_GATE_ALREADY_PASSED": "该门禁已通过,无需重复恢复。",
|
||||
"SHIPPING.PROCESS_GATE_ATTEMPT_NOT_FOUND": "未找到门禁执行尝试。",
|
||||
"SHIPPING.PROCESS_GATE_PERMISSION_DENIED": "无权访问或恢复该门禁。",
|
||||
"SHIPPING.PROCESS_GATE_IDEMPOTENCY_REQUIRED": "恢复请求缺少幂等键。",
|
||||
"SHIPPING.PROCESS_GATE_IDEMPOTENCY_CONFLICT": "幂等键与其他门禁请求冲突,请使用新的幂等键后重试。"
|
||||
}
|
||||
}
|
||||
@@ -182,11 +182,57 @@
|
||||
"adminViewOnlyShort": "只读",
|
||||
"lastActivity": "最后活动",
|
||||
"terminateReason": "终止原因",
|
||||
"workflowItem": "Workflow Item",
|
||||
"workflowItem": "文件处理项",
|
||||
"downloadExcel": "下载发货 Excel",
|
||||
"manualUploadEndNote": "Excel 已生成,请下载后在货代平台上传,并在本系统登记凭据。",
|
||||
"waitingManualUploadNote": "Excel 已生成,请下载后在货代平台上传,并在本系统登记凭据。"
|
||||
},
|
||||
"processGate": {
|
||||
"title": "待处理事项",
|
||||
"currentGate": "当前处理环节",
|
||||
"blockingMessage": "需要处理的原因",
|
||||
"reasonCode": "处理原因",
|
||||
"diagnosticHint": "处理建议",
|
||||
"noAction": "当前没有可执行的处理操作",
|
||||
"versionMissing": "当前信息已更新,请刷新后重试",
|
||||
"navigationMissing": "缺少跳转所需的任务或复核信息,请刷新后重试",
|
||||
"genericBlocking": "当前步骤需要人工处理",
|
||||
"unknownStep": "当前步骤",
|
||||
"continueAction": "继续处理",
|
||||
"actionSubmitted": "操作已提交",
|
||||
"submitting": "提交中…",
|
||||
"actionCodes": {
|
||||
"retry_with_latest_rules": "按最新规则重试",
|
||||
"open_inventory_source_review": "打开库存源复核",
|
||||
"open_order_review": "打开订单复核",
|
||||
"open_profile_review": "打开模板复核",
|
||||
"edit_order_fields": "编辑订单字段",
|
||||
"confirm_customer": "确认客户",
|
||||
"adjudicate_duplicate": "处理重复订单",
|
||||
"resolve_field_conflicts": "解决字段冲突",
|
||||
"open_inventory_match_review": "打开库存匹配复核",
|
||||
"open_shortage_review": "打开缺货复核",
|
||||
"upload_inventory_file": "上传库存文件",
|
||||
"adopt_rule_suggestion": "采用规则建议",
|
||||
"keep_manual_inventory_decision": "保留人工决定",
|
||||
"retry_task_creation": "重试创建任务",
|
||||
"retry_inventory_preparation": "重试库存准备",
|
||||
"regenerate_excel_artifact": "重新生成 Excel",
|
||||
"regenerate_manual_upload_todo": "重新生成待上传待办"
|
||||
},
|
||||
"reasons": {
|
||||
"freeze_not_ready": "订单尚未满足建单/冻结条件",
|
||||
"profile_not_auto_freeze_approved": "文档模板未通过自动建单审批",
|
||||
"profile_manual_confirmation_required": "文档模板需要人工确认",
|
||||
"customer_unresolved": "客户尚未识别",
|
||||
"customer_ambiguous": "客户识别存在歧义",
|
||||
"field_conflict": "字段存在冲突,需人工裁决",
|
||||
"duplicate_unresolved": "重复订单尚未处理",
|
||||
"require_manual_review": "需要人工复核",
|
||||
"no_inventory_source_candidates": "未找到可用库存源",
|
||||
"inventory_source_unavailable": "库存源不可用"
|
||||
}
|
||||
},
|
||||
"myTodos": {
|
||||
"title": "我的待办",
|
||||
"subtitle": "跨会话聚合待复核、异常与待人工上传登记事项。",
|
||||
@@ -238,8 +284,28 @@
|
||||
"empty": "暂无事件记录",
|
||||
"detail": "查看详情",
|
||||
"sourceTask": "任务事件",
|
||||
"sourceWorkflow": "Workflow 事件",
|
||||
"workflowEvent": "Workflow 事件"
|
||||
"sourceWorkflow": "文件处理记录",
|
||||
"workflowEvent": "文件处理记录",
|
||||
"updated": "处理状态已更新",
|
||||
"actors": {
|
||||
"user": "业务人员",
|
||||
"system": "系统",
|
||||
"admin": "管理员"
|
||||
}
|
||||
},
|
||||
"workflowStatus": {
|
||||
"created": "已创建",
|
||||
"queued": "等待处理",
|
||||
"extracting": "正在识别",
|
||||
"pending_review": "待复核",
|
||||
"waiting_manual_upload": "待人工上传",
|
||||
"failed": "处理失败",
|
||||
"completed": "已完成",
|
||||
"closed": "已结束"
|
||||
},
|
||||
"workflowReasons": {
|
||||
"user_cancelled": "已由用户取消",
|
||||
"completed": "处理已完成"
|
||||
},
|
||||
"stpFacts": {
|
||||
"title": "STP 履约进度",
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
"shippingOrderDocumentProfiles": "文件範本",
|
||||
"shippingFieldAssets": "欄位資產庫",
|
||||
"shippingOrderSchema": "訂單 Schema",
|
||||
"shippingAudit": "運行與稽核中心"
|
||||
"shippingAudit": "運行與稽核中心",
|
||||
"shippingProcessGates": "門禁診斷"
|
||||
},
|
||||
"shippingOrderExtractionRuns": {
|
||||
"eyebrow": "唯讀執行診斷",
|
||||
@@ -3580,5 +3581,81 @@
|
||||
"chainTruncated": "(已截斷)",
|
||||
"eventHash": "事件雜湊",
|
||||
"previousEventHash": "前序雜湊"
|
||||
},
|
||||
"shippingProcessGates": {
|
||||
"title": "Process Gate 診斷",
|
||||
"subtitle": "唯讀檢視 Execution 門禁軌道、阻斷狀態與 Attempt 歷史,供維運排查恢復鏈路。",
|
||||
"refresh": "重新整理",
|
||||
"loading": "載入中…",
|
||||
"empty": "暫無 Execution",
|
||||
"loadFailed": "載入 Execution 列表失敗",
|
||||
"detailFailed": "載入 Execution 詳情失敗",
|
||||
"attemptsFailed": "載入 Attempt 失敗",
|
||||
"detailTitle": "Execution 診斷",
|
||||
"executionNo": "Execution 編號",
|
||||
"status": "狀態",
|
||||
"allStatuses": "全部狀態",
|
||||
"currentGate": "當前 Gate",
|
||||
"nextAction": "主動作",
|
||||
"updatedAt": "更新時間",
|
||||
"actions": "操作",
|
||||
"viewDetail": "檢視詳情",
|
||||
"viewAttempts": "檢視 Attempt",
|
||||
"viewSnapshots": "檢視輸入/輸出快照",
|
||||
"total": "共 {count} 條",
|
||||
"previous": "上一頁",
|
||||
"next": "下一頁",
|
||||
"gates": "Gate 軌道",
|
||||
"gateCode": "Gate 編碼",
|
||||
"gateStatus": "Gate 狀態",
|
||||
"blockingReason": "阻斷原因碼",
|
||||
"blockingReasonDetail": "阻斷原因詳情",
|
||||
"gateDiagnostics": "目前 Gate 診斷",
|
||||
"findings": "Findings",
|
||||
"effectiveResult": "有效結果",
|
||||
"attempts": "Attempt 列表",
|
||||
"noAttempts": "暫無 Attempt",
|
||||
"taskNo": "任務編號",
|
||||
"caseNo": "覆核 Case",
|
||||
"scrollHint": "表格可左右滑動查看完整欄位",
|
||||
"filterGate": "Gate 編碼篩選",
|
||||
"filterReason": "阻斷原因碼篩選",
|
||||
"filterParty": "責任方篩選",
|
||||
"filterSearch": "關鍵字搜尋",
|
||||
"filterFrom": "更新時間起",
|
||||
"filterTo": "更新時間止",
|
||||
"applyFilters": "套用篩選",
|
||||
"resetFilters": "重設篩選",
|
||||
"findingsStructured": "結構化 Findings",
|
||||
"severity": "嚴重級別",
|
||||
"field": "欄位",
|
||||
"party": "責任方",
|
||||
"reason": "原因碼",
|
||||
"message": "說明",
|
||||
"noFindings": "暫無 Finding",
|
||||
"attemptDiff": "{scope}:新增 {added}、刪除 {removed}、變更 {changed}",
|
||||
"auditLink": "可在審計中心檢視該 Execution 的 process_gate_ 事件",
|
||||
"openAudit": "開啟審計中心",
|
||||
"responsibleParty": "責任方",
|
||||
"blockingReasonCode": "阻斷原因碼",
|
||||
"statusLabels": {
|
||||
"active": "進行中",
|
||||
"blocked": "已阻斷",
|
||||
"waiting_external": "等待外部",
|
||||
"completed": "已完成",
|
||||
"failed": "失敗",
|
||||
"cancelled": "已取消",
|
||||
"pending": "待處理",
|
||||
"queued": "已排隊",
|
||||
"running": "執行中",
|
||||
"passed": "已通過",
|
||||
"blocked_retryable": "可重試阻斷",
|
||||
"blocked_manual": "需人工處理",
|
||||
"failed_terminal": "終態失敗",
|
||||
"invalidated": "已失效",
|
||||
"skipped": "已跳過",
|
||||
"succeeded": "成功",
|
||||
"superseded": "已替代"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -198,7 +198,7 @@
|
||||
"nonOrderReasonPrompt": "請填寫標記非訂單的原因",
|
||||
"reparseReasonPrompt": "請填寫重新識別的原因",
|
||||
"reasonRequired": "必須填寫原因後才能繼續",
|
||||
"caseRequired": "目前工作項缺少覆核 Case,請先進入人工覆核",
|
||||
"caseRequired": "目前檔案尚未產生複核單,請稍後再進入人工複核",
|
||||
"versionHistoryTitle": "版本歷史",
|
||||
"currentVersion": "目前",
|
||||
"readonlyVersion": "唯讀",
|
||||
@@ -344,7 +344,8 @@
|
||||
"candidate_ready": "候選已生成",
|
||||
"review_required": "需要人工覆核",
|
||||
"failed": "處理失敗",
|
||||
"cancelled": "已取消"
|
||||
"cancelled": "已取消",
|
||||
"unknown": "狀態待確認"
|
||||
},
|
||||
"shippingOrderExtractionReason": {
|
||||
"profile_not_found": "未找到適用的已發佈訂單模板。",
|
||||
@@ -395,12 +396,14 @@
|
||||
"generic_deterministic": "通用規則確定性解析",
|
||||
"llm_assisted_review": "AI 輔助複核",
|
||||
"manual_review": "人工複核",
|
||||
"rejected": "已拒識"
|
||||
"rejected": "已拒識",
|
||||
"unknown": "處理方式待確認"
|
||||
},
|
||||
"shippingOrderExtractionFreezeSource": {
|
||||
"profile_deterministic": "自動凍結來源:異型模板",
|
||||
"generic_deterministic": "自動凍結來源:通用規則",
|
||||
"manual_confirmation": "凍結來源:人工確認"
|
||||
"manual_confirmation": "確認方式:人工確認",
|
||||
"unknown": "確認方式待確認"
|
||||
},
|
||||
"shippingOrderExtractionPlanSummary": "本輪從 {total} 個附件中規劃 {groups} 個訂單組,首輪最多識別 {attachments} 個附件,並發 {concurrency} 個。",
|
||||
"shippingOrderExtractionPlanSelected": "已選 {count} 個附件",
|
||||
@@ -439,7 +442,8 @@
|
||||
},
|
||||
"shippingOrderExtractionEmailSupplementRelation": {
|
||||
"po_mpn": "關聯方式:PO + 料號",
|
||||
"po_fallback": "關聯方式:依 PO 回退"
|
||||
"po_fallback": "關聯方式:依 PO 配對",
|
||||
"unknown": "關聯方式待確認"
|
||||
},
|
||||
"shippingOrderExtractionEmailSupplementField": {
|
||||
"reservation": "Reservation:",
|
||||
@@ -1435,7 +1439,7 @@
|
||||
"unknown": "狀態未知"
|
||||
},
|
||||
"previewTitle": "PDF 預覽",
|
||||
"buildGateRail": "建單資格與庫存候選",
|
||||
"buildGateRail": "訂單檢查與庫存來源",
|
||||
"previewLoading": "正在載入 PDF 預覽...",
|
||||
"previewUnavailable": "PDF 預覽不可用,草稿編輯不受影響。",
|
||||
"previewCollapsed": "此證據只有頁碼和引文,沒有可靠座標;已收起 PDF 預覽。",
|
||||
@@ -1446,15 +1450,36 @@
|
||||
"viewEvidence": "查看證據",
|
||||
"locateSource": "定位原文:{field}",
|
||||
"orderFields": "訂單欄位",
|
||||
"schemaVersion": "凍結 Schema #{version}",
|
||||
"schemaVersion": "訂單欄位版本 V{version}",
|
||||
"issues": "待處理問題",
|
||||
"machineSource": "來源:機器識別",
|
||||
"issueCodes": {
|
||||
"customer_unresolved": "客戶資訊尚未確認",
|
||||
"machine_order_unavailable": "未識別到可複核的訂單內容",
|
||||
"machine_multiple_orders_legacy": "檔案中可能包含多份訂單,請人工確認",
|
||||
"required_field_missing": "缺少建立訂單所需的資訊",
|
||||
"field_value_invalid": "部分訂單資訊格式不正確",
|
||||
"invalid_order_line": "部分訂單明細不完整或格式不正確",
|
||||
"effective_reservation_missing": "缺少有效的預約單號",
|
||||
"reservation_duplicated_in_order": "訂單內存在重複的預約單號",
|
||||
"require_manual_review": "庫存來源需要人工確認",
|
||||
"no_inventory_source_candidates": "未找到可用的庫存來源",
|
||||
"manual_inventory_source_reason_required": "請選擇庫存來源並填寫原因",
|
||||
"manual_inventory_source_invalid": "所選庫存來源目前不可用",
|
||||
"inventory_source_unresolved": "庫存來源尚未確定",
|
||||
"auto_build_gate_approved_template": "此檔案需要人工複核後建立訂單",
|
||||
"auto_build_gate_fields_complete": "請補全訂單資訊後繼續",
|
||||
"auto_build_gate_evidence_passed": "部分識別結果需要人工核對",
|
||||
"auto_build_gate_no_conflict_or_duplicate": "請確認訂單是否重複或存在資訊衝突",
|
||||
"auto_build_gate_quality_gate_passed": "自動建單策略尚未放行,需人工確認",
|
||||
"unknown": "系統發現一項需要人工確認的內容"
|
||||
},
|
||||
"machineSource": "來源:系統識別",
|
||||
"manualSource": "來源:人工修改",
|
||||
"derivedSource": "來源:規則派生",
|
||||
"overrideSource": "來源:人工覆蓋(已鎖定)",
|
||||
"skippedSource": "來源:派生跳過",
|
||||
"valueSources": {
|
||||
"machine": "機器識別",
|
||||
"machine": "系統識別",
|
||||
"manual": "人工修改",
|
||||
"manual_override": "人工覆蓋",
|
||||
"derived": "規則派生",
|
||||
@@ -1470,10 +1495,11 @@
|
||||
"compare": "對比建議",
|
||||
"scope": "證據範圍:{level}",
|
||||
"evidenceLevel": {
|
||||
"L1_field": "欄位原文",
|
||||
"L1_field": "目前欄位內容",
|
||||
"L2_table": "所在表格",
|
||||
"L3_page": "所在頁面",
|
||||
"L4_pdf": "整份 PDF(需授權)"
|
||||
"L4_pdf": "整份 PDF(需授權)",
|
||||
"unknown": "相關文件內容"
|
||||
},
|
||||
"review": "裁決",
|
||||
"empty": "尚無 AI 建議。選擇欄位後點擊請求。",
|
||||
@@ -1493,7 +1519,8 @@
|
||||
"accepted": "已接受",
|
||||
"modified": "已修改",
|
||||
"rejected": "已拒絕",
|
||||
"failed": "不可用"
|
||||
"failed": "不可用",
|
||||
"unknown": "狀態待確認"
|
||||
},
|
||||
"decisions": {
|
||||
"accept": "接受",
|
||||
@@ -1524,7 +1551,7 @@
|
||||
"other": "其他"
|
||||
}
|
||||
},
|
||||
"restoreMachine": "恢復機器值",
|
||||
"restoreMachine": "恢復系統識別值",
|
||||
"restorePriorProjection": "恢復識別/派生值",
|
||||
"lineNoUnsavedHint": "未儲存 · 失焦後填寫覆蓋原因",
|
||||
"lockedHint": "已鎖定",
|
||||
@@ -1557,7 +1584,7 @@
|
||||
"addLine": "新增行",
|
||||
"copyLine": "複製行",
|
||||
"deleteLine": "刪除行",
|
||||
"noMachineOrder": "機器識別結果待人工確認,可建立草稿進行修正。",
|
||||
"noMachineOrder": "系統識別結果需要人工確認,可建立草稿進行修正。",
|
||||
"lines": "訂單明細",
|
||||
"line": "第 {index} 行",
|
||||
"noLines": "未識別到訂單明細。",
|
||||
@@ -1600,9 +1627,19 @@
|
||||
"manual_upload_pending": "待人工上傳登記"
|
||||
}
|
||||
},
|
||||
"reparseProgress": {
|
||||
"title": "PDF 重新識別進度",
|
||||
"subtitle": "進度來自目前工作項,完成後將自動開啟新版複核草稿。",
|
||||
"polling": "正在重新整理實際進度…",
|
||||
"refreshFailed": "暫時無法重新整理進度,將保留目前階段並自動重試。",
|
||||
"failed": "重新識別未完成,已保留上一版本。您可以直接再次識別。",
|
||||
"retry": "重新識別",
|
||||
"stages": { "submitted": "已提交", "layout_parsing": "讀取頁面內容", "extracting": "提取訂單資訊", "draft_ready": "準備複核內容" }
|
||||
},
|
||||
"backToSession": "返回本次處理",
|
||||
"workItemHeader": "工作項 {itemNo} · {version}",
|
||||
"jumpToCurrentVersion": "跳轉目前版本",
|
||||
"currentVersionUnavailable": "目前版本尚未產生或進度暫時無法重新整理,請稍後重試。",
|
||||
"showContext": "對話上下文",
|
||||
"hideContext": "收起對話上下文",
|
||||
"contextTitle": "對話上下文",
|
||||
@@ -1614,7 +1651,8 @@
|
||||
"work_item_closed": "此工作項已關閉,僅可唯讀追溯;處置與編輯已停用。",
|
||||
"reparse_in_progress": "此 PDF 正在重新識別,請等待完成後繼續覆核。",
|
||||
"restored": "重識別失敗已恢復上一版本,可繼續編輯。",
|
||||
"draft_version_conflict": "草稿版本衝突:本機編輯已過期,請重新載入最新版本後再繼續。"
|
||||
"draft_version_conflict": "草稿版本衝突:本機編輯已過期,請重新載入最新版本後再繼續。",
|
||||
"unknown": "訂單狀態已更新,請重新整理後繼續處理。"
|
||||
},
|
||||
"versionHistory": {
|
||||
"title": "版本歷史",
|
||||
@@ -1626,31 +1664,33 @@
|
||||
"open": "開啟"
|
||||
},
|
||||
"buildEligibility": {
|
||||
"title": "建單資格",
|
||||
"subtitle": "校驗草稿後彙總的 Reservation 與庫存源門禁。",
|
||||
"title": "訂單檢查",
|
||||
"subtitle": "檢查訂單資訊和庫存來源是否符合建立條件。",
|
||||
"canBuildYes": "可建單",
|
||||
"canBuildNo": "暫不可建單",
|
||||
"statusLabel": "資格狀態",
|
||||
"blockingSummary": "阻斷摘要",
|
||||
"lineProjections": "明細投影",
|
||||
"blockingSummary": "需要處理",
|
||||
"lineProjections": "明細檢查結果",
|
||||
"lineCanBuild": "可建單",
|
||||
"lineBlocked": "阻斷",
|
||||
"reservation": "有效 Reservation",
|
||||
"routingStatusLabel": "路由狀態",
|
||||
"lineBlocked": "需要處理",
|
||||
"reservation": "預約單號",
|
||||
"routingStatusLabel": "庫存來源狀態",
|
||||
"sourceHint": "庫存線索",
|
||||
"candidates": "候選庫存源",
|
||||
"blockReason": "阻斷原因",
|
||||
"blockReason": "需要處理的原因",
|
||||
"manualReason": "人工說明",
|
||||
"confirmBlocked": "目前草稿未滿足建單資格,請先處理庫存源或校驗問題後再確認。",
|
||||
"status": {
|
||||
"ready": "可建單",
|
||||
"needs_review": "待複核"
|
||||
"needs_review": "待複核",
|
||||
"unknown": "待確認"
|
||||
},
|
||||
"routingStatus": {
|
||||
"resolved": "已解析",
|
||||
"ambiguous": "多候選",
|
||||
"unresolved": "未解析",
|
||||
"conflicted": "需人工複核"
|
||||
"conflicted": "需人工確認",
|
||||
"unknown": "待確認"
|
||||
},
|
||||
"blockReasons": {
|
||||
"require_manual_review": "規則要求人工複核庫存源",
|
||||
@@ -1658,20 +1698,33 @@
|
||||
"manual_inventory_source_reason_required": "須填寫人工選源原因",
|
||||
"manual_inventory_source_invalid": "所選庫存源無效或未啟用",
|
||||
"inventory_source_unresolved": "庫存源未解析",
|
||||
"effective_reservation_missing": "缺少有效 Reservation"
|
||||
"effective_reservation_missing": "缺少有效的預約單號",
|
||||
"unknown": "系統發現一項需要人工確認的內容"
|
||||
}
|
||||
},
|
||||
"inventoryCandidates": {
|
||||
"title": "人工選擇庫存源",
|
||||
"subtitle": "為未決明細選擇一個或多個已啟用庫存源,並說明原因。",
|
||||
"subtitle": "為未決明細選擇一個或多個已啟用庫存源,並說明原因;亦可重新匹配規則或處理待決建議。",
|
||||
"selectSources": "選擇候選源",
|
||||
"selectEnabledSources": "從已啟用庫存源中選擇",
|
||||
"noCandidates": "暫無可選庫存源,請檢查路由規則或聯絡管理員。",
|
||||
"noCandidates": "暫無可選庫存來源,請聯絡管理員檢查相關設定。",
|
||||
"noEnabledSources": "系統中沒有已啟用的庫存源,請聯絡管理員啟用後再選擇。",
|
||||
"reasonLabel": "選擇原因(必填)",
|
||||
"reasonPlaceholder": "請說明為何選擇這些庫存源...",
|
||||
"submit": "提交候選"
|
||||
},
|
||||
"inventoryRouting": {
|
||||
"reroute": "重新匹配路由",
|
||||
"adoptSuggestion": "採用規則結果",
|
||||
"keepManual": "保留人工結果",
|
||||
"suggestionPending": "規則建議與目前人工結果不一致,請選擇採用或保留。",
|
||||
"rawCandidates": "規則原始候選",
|
||||
"unavailableCandidates": "不可用候選",
|
||||
"ruleSuggestion": "規則建議源",
|
||||
"ruleVersions": "規則版本",
|
||||
"hint": "庫存源提示",
|
||||
"rerouteHint": "可隨時重新匹配路由;若存在待決規則建議,請選擇採用或保留人工結果。"
|
||||
},
|
||||
"confirmDialog": {
|
||||
"reasonLabel": "原因(必填)",
|
||||
"reasonPlaceholder": "請說明操作原因...",
|
||||
@@ -1700,7 +1753,7 @@
|
||||
"reasonCodeRequired": "請選擇原因類型",
|
||||
"quality_issue": {
|
||||
"title": "標記檔案品質異常",
|
||||
"impact": "保留目前 PDF、草稿與機器識別結果,供補件或重新識別;須選擇原因並在選擇「其他」時填寫說明。",
|
||||
"impact": "保留目前 PDF、草稿與系統識別結果,供補件或重新識別;須選擇原因並在選擇「其他」時填寫說明。",
|
||||
"confirm": "確認標記"
|
||||
},
|
||||
"qualityReasons": {
|
||||
@@ -1782,7 +1835,7 @@
|
||||
},
|
||||
"itemStatus": {
|
||||
"queued": "排隊中",
|
||||
"layout_parsing": "版面解析中",
|
||||
"layout_parsing": "讀取頁面內容中",
|
||||
"extracting": "識別中",
|
||||
"building_order": "建單中",
|
||||
"inventory_matching": "庫存匹配中",
|
||||
@@ -1792,7 +1845,8 @@
|
||||
"failed": "失敗",
|
||||
"closed": "已完成",
|
||||
"cancelled": "已取消",
|
||||
"manual_upload_pending": "待人工上傳登記"
|
||||
"manual_upload_pending": "待人工上傳登記",
|
||||
"unknown": "狀態待確認"
|
||||
},
|
||||
"closedReason": {
|
||||
"confirmed": "已確認建單",
|
||||
@@ -1802,11 +1856,21 @@
|
||||
},
|
||||
"actions": {
|
||||
"refresh": "重新整理",
|
||||
"openReview": "進入複核工作台",
|
||||
"viewProgress": "查看進度",
|
||||
"cancelFile": "取消此檔案",
|
||||
"reparse": "重新識別",
|
||||
"retryFailedRun": "重試失敗識別"
|
||||
},
|
||||
"reparseError": {
|
||||
"title": "重新識別未完成",
|
||||
"schemaUnavailable": "目前訂單欄位規則版本不可用,系統未產生新的識別結果。",
|
||||
"fallback": "原有識別版本已保留,建議進入複核工作台人工處理。",
|
||||
"contactAdmin": "若多個檔案同時出現此問題,請聯絡管理員檢查訂單欄位規則版本。",
|
||||
"pending": "此檔案正在重新識別,請等待目前任務完成後再操作。",
|
||||
"generic": "重新識別未完成,請查看處理詳情或稍後重試。",
|
||||
"requestId": "處理編號:{id}"
|
||||
},
|
||||
"reasonDialog": {
|
||||
"cancelTitle": "取消此檔案",
|
||||
"reparseTitle": "重試/重新識別",
|
||||
@@ -1825,14 +1889,17 @@
|
||||
"filename": "檔名",
|
||||
"status": "狀態",
|
||||
"stage": "階段",
|
||||
"runNo": "抽取 Run",
|
||||
"caseNo": "覆核 Case",
|
||||
"runNo": "識別批次",
|
||||
"caseNo": "複核編號",
|
||||
"lastActivity": "最近活動",
|
||||
"closedReason": "關閉原因",
|
||||
"eventsTitle": "事件時間線",
|
||||
"eventsEmpty": "暫無事件記錄",
|
||||
"empty": "未選擇檔案"
|
||||
},
|
||||
"versionHistoryNote": "完整版本歷史待後端介面補齊;目前僅顯示工作項最新版本。"
|
||||
"event": {
|
||||
"unknown": "處理狀態已更新"
|
||||
},
|
||||
"versionHistoryNote": "目前顯示此檔案可用的版本記錄。"
|
||||
}
|
||||
}
|
||||
@@ -248,7 +248,8 @@
|
||||
"SHIPPING_NOTICE_INTAKE_PARSE_TIMEOUT": "發貨通知解析逾時,請重試或移除後重新上傳。",
|
||||
"SHIPPING_NOTICE_INTAKE_STAGE2_PERSIST_FAILED": "發貨通知正文或附件預處理儲存失敗,請重試解析。",
|
||||
"SHIPPING_NOTICE_INTAKE_ATTACHMENTS_INCOMPLETE": "發貨通知附件解析不完整,請重試解析或移除後重新上傳。",
|
||||
"SHIPPING_NOTICE_INTAKE_ALREADY_CONSUMED": "發貨通知接入記錄已被消費。",
|
||||
"SHIPPING_NOTICE_INTAKE_ALREADY_CONSUMED": "此檔案已進入訂單處理,請查看現有處理結果,無需重複提交。",
|
||||
"SHIPPING_NOTICE_ORDER_EXTRACTION_ALREADY_CONSUMED": "此檔案已完成一次訂單處理,請查看現有結果或使用重新識別。",
|
||||
"SHIPPING_NOTICE_INTAKE_EXPIRED": "發貨通知接入記錄已過期。",
|
||||
"SHIPPING_NOTICE_INTAKE_INVALID_STATUS": "目前接入狀態不允許此操作。",
|
||||
"SHIPPING_NOTICE_DUPLICATE_RESOLUTION_REQUIRED": "偵測到重複發貨通知,請先選擇處理方式。",
|
||||
@@ -370,6 +371,8 @@
|
||||
"SHIPPING_REVIEW_DRAFT_VERSION_MISMATCH": "草稿已被其他視窗更新,請重新整理後再試。",
|
||||
"SHIPPING_REVIEW_FIELD_INVALID": "覆核欄位不屬於此訂單的凍結範本。",
|
||||
"SHIPPING_REVIEW_INVENTORY_CANDIDATES_INVALID": "人工庫存源候選無效:請選擇已啟用的庫存源並填寫原因。",
|
||||
"SHIPPING_REVIEW_INVENTORY_ROUTING_ADOPT_INVALID": "無法採用規則建議:目前明細沒有有效的待決規則結果。",
|
||||
"SHIPPING_REVIEW_INVENTORY_ROUTING_KEEP_INVALID": "無法保留人工結果:目前明細沒有待決的規則建議。",
|
||||
"SHIPPING_REVIEW_BUILD_ELIGIBILITY_BLOCKED": "建單資格未通過,請先處理阻斷問題或補齊庫存源候選後再確認。",
|
||||
"SHIPPING_REVIEW_LINE_NOT_FOUND": "訂單明細行不存在或已被刪除。",
|
||||
"SHIPPING_REVIEW_DOCUMENT_NOT_FOUND": "覆核 PDF 不存在或無權存取。",
|
||||
@@ -397,6 +400,18 @@
|
||||
"SHIPPING_REVIEW_QUALITY_COMMENT_REQUIRED": "選擇「其他」時必須填寫品質異常說明。",
|
||||
"SHIPPING_NOTICE_SESSION_WORK_ITEM_CLOSE_REASON_REQUIRED": "取消本次處理必須填寫原因。",
|
||||
"SHIPPING_NOTICE_SESSION_WORK_ITEM_LOCK_VERSION_INVALID": "工作項版本號無效,請重新整理後再試。",
|
||||
"SHIPPING_NOTICE_SESSION_WORK_ITEM_VERSION_CONFLICT": "工作項已被其他操作更新,請重新整理後再試。"
|
||||
"SHIPPING_NOTICE_SESSION_WORK_ITEM_VERSION_CONFLICT": "工作項已被其他操作更新,請重新整理後再試。",
|
||||
"SHIPPING.PROCESS_EXECUTION_NOT_FOUND": "未找到流程執行個體。",
|
||||
"SHIPPING.PROCESS_GATE_NOT_FOUND": "未找到門禁個體。",
|
||||
"SHIPPING.PROCESS_GATE_ACTION_INVALID": "門禁恢復動作無效。",
|
||||
"SHIPPING.PROCESS_GATE_ACTION_FORBIDDEN": "請求包含禁止提交的執行控制欄位。",
|
||||
"SHIPPING.PROCESS_GATE_ACTION_NOT_ALLOWED": "該動作不是當前門禁允許的主要恢復動作。",
|
||||
"SHIPPING.PROCESS_GATE_VERSION_MISMATCH": "門禁版本已變更,請重新整理後再試。",
|
||||
"SHIPPING.PROCESS_GATE_BUSY": "門禁正在執行中,請稍後再試。",
|
||||
"SHIPPING.PROCESS_GATE_ALREADY_PASSED": "該門禁已通過,無需重複恢復。",
|
||||
"SHIPPING.PROCESS_GATE_ATTEMPT_NOT_FOUND": "未找到門禁執行嘗試。",
|
||||
"SHIPPING.PROCESS_GATE_PERMISSION_DENIED": "無權存取或恢復該門禁。",
|
||||
"SHIPPING.PROCESS_GATE_IDEMPOTENCY_REQUIRED": "恢復請求缺少冪等鍵。",
|
||||
"SHIPPING.PROCESS_GATE_IDEMPOTENCY_CONFLICT": "冪等鍵與其他門禁請求衝突,請使用新的冪等鍵後重試。"
|
||||
}
|
||||
}
|
||||
@@ -182,11 +182,57 @@
|
||||
"adminViewOnlyShort": "唯讀",
|
||||
"lastActivity": "最後活動",
|
||||
"terminateReason": "終止原因",
|
||||
"workflowItem": "Workflow Item",
|
||||
"workflowItem": "檔案處理項",
|
||||
"downloadExcel": "下載發貨 Excel",
|
||||
"manualUploadEndNote": "Excel 已產生,請下載後在貨代平台上傳,並在本系統登記憑據。",
|
||||
"waitingManualUploadNote": "Excel 已產生,請下載後在貨代平台上傳,並在本系統登記憑據。"
|
||||
},
|
||||
"processGate": {
|
||||
"title": "待處理事項",
|
||||
"currentGate": "目前處理環節",
|
||||
"blockingMessage": "需要處理的原因",
|
||||
"reasonCode": "處理原因",
|
||||
"diagnosticHint": "處理建議",
|
||||
"noAction": "目前沒有可執行的處理操作",
|
||||
"versionMissing": "目前資訊已更新,請重新整理後再試",
|
||||
"navigationMissing": "缺少跳轉所需的任務或覆核資訊,請重新整理後再試",
|
||||
"genericBlocking": "目前步驟需要人工處理",
|
||||
"unknownStep": "目前步驟",
|
||||
"continueAction": "繼續處理",
|
||||
"actionSubmitted": "操作已提交",
|
||||
"submitting": "提交中…",
|
||||
"actionCodes": {
|
||||
"retry_with_latest_rules": "依最新規則重試",
|
||||
"open_inventory_source_review": "開啟庫存源覆核",
|
||||
"open_order_review": "開啟訂單覆核",
|
||||
"open_profile_review": "開啟模板覆核",
|
||||
"edit_order_fields": "編輯訂單欄位",
|
||||
"confirm_customer": "確認客戶",
|
||||
"adjudicate_duplicate": "處理重複訂單",
|
||||
"resolve_field_conflicts": "解決欄位衝突",
|
||||
"open_inventory_match_review": "開啟庫存匹配覆核",
|
||||
"open_shortage_review": "開啟缺貨覆核",
|
||||
"upload_inventory_file": "上傳庫存檔案",
|
||||
"adopt_rule_suggestion": "採用規則建議",
|
||||
"keep_manual_inventory_decision": "保留人工決定",
|
||||
"retry_task_creation": "重試建立任務",
|
||||
"retry_inventory_preparation": "重試庫存準備",
|
||||
"regenerate_excel_artifact": "重新產生 Excel",
|
||||
"regenerate_manual_upload_todo": "重新產生待上傳待辦"
|
||||
},
|
||||
"reasons": {
|
||||
"freeze_not_ready": "訂單尚未滿足建單/凍結條件",
|
||||
"profile_not_auto_freeze_approved": "文件模板未通過自動建單審批",
|
||||
"profile_manual_confirmation_required": "文件模板需要人工確認",
|
||||
"customer_unresolved": "客戶尚未識別",
|
||||
"customer_ambiguous": "客戶識別存在歧義",
|
||||
"field_conflict": "欄位存在衝突,需人工裁決",
|
||||
"duplicate_unresolved": "重複訂單尚未處理",
|
||||
"require_manual_review": "需要人工覆核",
|
||||
"no_inventory_source_candidates": "未找到可用庫存源",
|
||||
"inventory_source_unavailable": "庫存源不可用"
|
||||
}
|
||||
},
|
||||
"myTodos": {
|
||||
"title": "我的待辦",
|
||||
"subtitle": "跨會話聚合待複核、異常與待人工上傳登記事項。",
|
||||
@@ -238,8 +284,28 @@
|
||||
"empty": "暫無事件記錄",
|
||||
"detail": "查看詳情",
|
||||
"sourceTask": "任務事件",
|
||||
"sourceWorkflow": "Workflow 事件",
|
||||
"workflowEvent": "Workflow 事件"
|
||||
"sourceWorkflow": "檔案處理記錄",
|
||||
"workflowEvent": "檔案處理記錄",
|
||||
"updated": "處理狀態已更新",
|
||||
"actors": {
|
||||
"user": "業務人員",
|
||||
"system": "系統",
|
||||
"admin": "管理員"
|
||||
}
|
||||
},
|
||||
"workflowStatus": {
|
||||
"created": "已建立",
|
||||
"queued": "等待處理",
|
||||
"extracting": "正在識別",
|
||||
"pending_review": "待覆核",
|
||||
"waiting_manual_upload": "待人工上傳",
|
||||
"failed": "處理失敗",
|
||||
"completed": "已完成",
|
||||
"closed": "已結束"
|
||||
},
|
||||
"workflowReasons": {
|
||||
"user_cancelled": "已由使用者取消",
|
||||
"completed": "處理已完成"
|
||||
},
|
||||
"stpFacts": {
|
||||
"title": "STP 履約進度",
|
||||
|
||||
Reference in new issue
Block a user