feat(shipping-notice): 增强订单抽取功能,添加进度事件和诊断运行管理,优化数据模型和访问控制

This commit is contained in:
hugo committed 2026-07-21 23:17:29 +08:00
1 parent ce26d6d0c4
commit c4095b08da
175 files changed
+13064 -1814

No files matched your search

@@ -51,6 +51,8 @@ const ShippingInventoryPage = () =>
import("@/features/admin/modules/shipping-inventory/ShippingInventoryPage.vue");
const ShippingIdentityRulesPage = () =>
import("@/features/admin/modules/shipping-identity-rules/ShippingIdentityRulesPage.vue");
const ShippingOrderExtractionRunsPage = () =>
import("@/features/admin/modules/shipping-order-extraction-runs/ShippingOrderExtractionRunsPage.vue");
export const adminRoutes: RouteRecordRaw[] = [
{
@@ -161,6 +163,12 @@ export const adminRoutes: RouteRecordRaw[] = [
component: ShippingIdentityRulesPage,
meta: { requiresAdmin: true, adminModule: "shipping_inventory", adminSubModule: 'identity_rules', title: "客户识别规则" },
},
{
path: "shipping-order-extraction-runs",
name: "AdminShippingOrderExtractionRuns",
component: ShippingOrderExtractionRunsPage,
meta: { requiresAdmin: true, adminModule: "shipping_inventory", adminSubModule: 'order_extraction_runs', title: "订单识别运行" },
},
{
path: "announcements",
+25 -1
View File
@@ -68,6 +68,26 @@ export type ShippingInventoryValidationBatch = {
runs: ShippingInventoryConfigurationTest[];
};
export type ShippingOrderExtractionDiagnosticRun = {
run_no: string; status: string; phase: string; conversation_id: string; workflow_run_id?: string | null;
attempt_count: number; current_stage_code?: string | null; created_at?: string | null; started_at?: string | null;
finished_at?: string | null; error_code?: string | null; durations_ms: Record<string, number | null>;
result_counts: Record<string, number>;
};
export type ShippingOrderExtractionDiagnosticDetail = {
run: ShippingOrderExtractionDiagnosticRun;
job_attempts: Array<{ job_id: number; status: string; attempts: number; max_attempts: number; created_at?: string | null; started_at?: string | null; finished_at?: string | null; duration_ms?: number | null }>;
units: Array<{ unit_id: number; position: number; unit_type: string; document_type: string; status: string; attempt_count: number; duration_ms?: number | null; error_code?: string | null }>;
progress_events: Array<{ event_type: string; node_type?: string | null; stage_code?: string | null; status?: string | null; workflow_run_id?: string | null; node_execution_id?: string | null; occurred_at?: string | null }>;
};
export const listShippingOrderExtractionDiagnosticRuns = (page = 1, pageSize = 25, status = '') => {
const params = new URLSearchParams({ page: String(page), page_size: String(pageSize) });
if (status) params.set('status', status);
return requestJson<{ items: ShippingOrderExtractionDiagnosticRun[]; total: number; page: number; page_size: number }>(`/api/admin/shipping-notice/order-extraction-runs?${params}`, auth());
};
export const getShippingOrderExtractionDiagnosticRun = (runNo: string) =>
requestJson<ShippingOrderExtractionDiagnosticDetail>(`/api/admin/shipping-notice/order-extraction-runs/${encodeURIComponent(runNo)}`, auth());
/** 下载管理员可访问的库存快照,并保留服务端指定的原始文件名。 */
export const downloadShippingInventorySnapshot = async (snapshotId: number, fallbackName: string): Promise<void> => {
const response = await fetch(`/api/admin/shipping-notice/snapshots/${snapshotId}/download`, { headers: getAuthHeaders() });
@@ -437,6 +457,7 @@ export interface AdminAgentRegistrySchema {
allowed_runtime_providers?: string[];
allowed_dify_app_types?: string[];
allowed_exposure_modes?: string[];
allowed_effective_roles?: string[];
}>;
}>;
handler_config_schemas: Record<string, unknown>;
@@ -480,7 +501,10 @@ export interface AdminContentProfileOption {
export const listAdminContentProfiles = () =>
requestJson<AdminContentProfileOption[]>('/api/admin/agents/content-profiles', auth());
export const listAdminAgents = () => requestJson<any[]>('/api/admin/agents', auth());
export const listAdminAgents = (scope?: 'applications' | 'executors') => requestJson<any[]>(
`/api/admin/agents${scope ? `?scope=${scope}` : ''}`,
auth(),
);
export const createAdminAgent = (payload: Record<string, unknown>) =>
requestJson('/api/admin/agents', { method: 'POST', ...jsonAuth(), body: JSON.stringify(payload) });
export const updateAdminAgent = (id: number, payload: Record<string, unknown>) =>
@@ -50,6 +50,12 @@ export const updateShippingOrderField = (
method: 'PUT', body: JSON.stringify(payload), ...jsonAuth(),
});
/** 保存字段目录当前全局顺序;不创建或修改 Schema 版本。 */
export const reorderShippingOrderFields = (fieldIds: string[]) =>
requestJson<{ fields: ShippingOrderField[] }>('/api/admin/shipping-order-schema/fields/order', {
method: 'PUT', body: JSON.stringify({ field_ids: fieldIds }), ...jsonAuth(),
});
/** 退役不再被草稿或下游运行配置引用的字段。 */
export const retireShippingOrderField = (fieldId: string) =>
requestJson<ShippingOrderField>(`/api/admin/shipping-order-schema/fields/${fieldId}/retire`, {
@@ -15,8 +15,8 @@ export interface AdminModuleMeta {
export interface ShippingConfigSubModuleMeta {
id: ShippingConfigSubModuleId;
routeName: 'AdminShippingInventory' | 'AdminShippingIdentityRules';
path: 'shipping-notice' | 'shipping-identity-rules';
routeName: 'AdminShippingInventory' | 'AdminShippingIdentityRules' | 'AdminShippingOrderExtractionRuns';
path: 'shipping-notice' | 'shipping-identity-rules' | 'shipping-order-extraction-runs';
labelKey: string;
}
@@ -42,10 +42,11 @@ export const ADMIN_MODULE_METAS: AdminModuleMeta[] = [
{ id: 'requests', routeName: 'AdminRequests', path: 'requests', labelKey: 'admin.nav.requests', configKey: 'requests' },
];
/** 货代配置的二级导航唯一真相源;两个页面共用父模块权限与可见性开关。 */
/** 货代配置的二级导航唯一真相源;各页面共用父模块权限与可见性开关。 */
export const SHIPPING_CONFIG_SUB_MODULE_METAS: ShippingConfigSubModuleMeta[] = [
{ id: 'inventory', routeName: 'AdminShippingInventory', path: 'shipping-notice', labelKey: 'admin.nav.shippingInventory' },
{ id: 'identity_rules', routeName: 'AdminShippingIdentityRules', path: 'shipping-identity-rules', labelKey: 'admin.nav.shippingIdentityRules' },
{ id: 'order_extraction_runs', routeName: 'AdminShippingOrderExtractionRuns', path: 'shipping-order-extraction-runs', labelKey: 'admin.nav.shippingOrderExtractionRuns' },
];
export const ADMIN_REPORT_TABLES: AdminReportTableId[] = [
@@ -73,14 +73,25 @@ const {
resetColumnWidths,
} = useAgentsTableColumnResize();
const tableHeaderColumns = computed(() => [
{ key: 'name', label: t('admin.agent.headers.name'), align: 'left' as const },
{ key: 'type', label: t('admin.agent.headers.type'), align: 'left' as const },
{ key: 'aggregation', label: t('admin.agent.headers.aggregation'), align: 'left' as const },
{ key: 'config', label: t('admin.agent.headers.config'), align: 'left' as const },
{ key: 'status', label: t('admin.agent.headers.status'), align: 'left' as const },
{ key: 'actions', label: t('admin.agent.headers.actions'), align: 'right' as const },
]);
const tableHeaderColumns = computed(() => (
activeManagementTab.value === 'executors'
? [
{ key: 'name', label: t('admin.agent.headers.name'), align: 'left' as const },
{ key: 'executorType', label: t('admin.agent.headers.executorType'), align: 'left' as const },
{ key: 'protocol', label: t('admin.agent.headers.runtimeProtocol'), align: 'left' as const },
{ key: 'config', label: t('admin.agent.headers.config'), align: 'left' as const },
{ key: 'status', label: t('admin.agent.headers.status'), align: 'left' as const },
{ key: 'actions', label: t('admin.agent.headers.actions'), align: 'right' as const },
]
: [
{ key: 'name', label: t('admin.agent.headers.name'), align: 'left' as const },
{ key: 'type', label: t('admin.agent.headers.type'), align: 'left' as const },
{ key: 'aggregation', label: t('admin.agent.headers.aggregation'), align: 'left' as const },
{ key: 'config', label: t('admin.agent.headers.config'), align: 'left' as const },
{ key: 'status', label: t('admin.agent.headers.status'), align: 'left' as const },
{ key: 'actions', label: t('admin.agent.headers.actions'), align: 'right' as const },
]
));
const formatAgentCode = (agent: AgentRow) => agent.agent_code || 'generic';
@@ -133,6 +144,17 @@ const formatRuntimeProviderLabel = (agent: AgentRow) => {
};
const showFormDialog = ref(false);
const activeManagementTab = ref<'applications' | 'executors'>('applications');
const visibleAgents = computed(() => agents.value.filter((agent) => (
activeManagementTab.value === 'executors'
? agent.exposure_mode === 'internal'
: agent.exposure_mode !== 'internal'
)));
const emptyStateText = computed(() => (
activeManagementTab.value === 'executors'
? t('admin.agent.executor.empty')
: t('admin.agent.noAgents')
));
/**
* 打开新建应用弹窗并重置表单状态。
@@ -143,6 +165,16 @@ const openCreateDialog = (): void => {
showFormDialog.value = true;
};
const formatExecutorProtocol = (agent: AgentRow) => (
`${formatRuntimeProviderLabel(agent)} · ${agent.dify_app_type === 'workflow' ? 'Workflow' : 'Chatflow'}`
);
/** 打开内部执行器专用注册入口,预置 Dify Workflow 与 internal 可见性。 */
const openCreateInternalExecutorDialog = (): void => {
resetForm('internal_executor');
showFormDialog.value = true;
};
/**
* 打开编辑应用弹窗并载入当前行数据。
* 核心逻辑:复用 selectAgent 的表单映射逻辑,确保列表行、权限弹窗和保存接口使用同一份状态。
@@ -178,16 +210,41 @@ onMounted(() => {
<h2 class="section-title">{{ t('admin.agent.title') }}</h2>
<p class="section-desc mt-1">{{ t('admin.agent.subtitle') }}</p>
</div>
<button type="button" class="btn-primary" @click="openCreateDialog">
<Plus class="w-5 h-5" />
<span class="font-medium">{{ t('admin.agent.new') }}</span>
<div class="flex gap-2">
<button v-if="activeManagementTab === 'executors'" type="button" class="btn-primary" @click="openCreateInternalExecutorDialog">
<Plus class="w-5 h-5" />
<span class="font-medium">{{ t('admin.agent.newInternalExecutor') }}</span>
</button>
<button v-else type="button" class="btn-primary" @click="openCreateDialog">
<Plus class="w-5 h-5" />
<span class="font-medium">{{ t('admin.agent.new') }}</span>
</button>
</div>
</div>
<div class="mb-6 flex gap-1 border-b border-default">
<button
type="button"
class="-mb-px border-b-2 px-4 py-2.5 text-sm font-medium transition-colors"
:class="activeManagementTab === 'applications' ? 'border-brand-600 text-brand-600' : 'border-transparent text-muted hover:text-secondary'"
@click="activeManagementTab = 'applications'"
>
{{ t('admin.agent.tabs.applications') }}
</button>
<button
type="button"
class="-mb-px border-b-2 px-4 py-2.5 text-sm font-medium transition-colors"
:class="activeManagementTab === 'executors' ? 'border-brand-600 text-brand-600' : 'border-transparent text-muted hover:text-secondary'"
@click="activeManagementTab = 'executors'"
>
{{ t('admin.agent.tabs.executors') }}
</button>
</div>
<div class="admin-table-wrap">
<div v-if="agents.length === 0" class="admin-table-empty">
<div v-if="visibleAgents.length === 0" class="admin-table-empty">
<Bot class="w-12 h-12 mx-auto text-muted mb-3" />
<p class="text-lg text-secondary">{{ t('admin.agent.noAgents') }}</p>
<p class="text-lg text-secondary">{{ emptyStateText }}</p>
</div>
<table
v-else
@@ -223,7 +280,7 @@ onMounted(() => {
</thead>
<tbody>
<tr
v-for="agent in agents"
v-for="agent in visibleAgents"
:key="agent.id"
class="group cursor-pointer"
:class="{ 'bg-blue-50/50': selectedAgentId === agent.id }"
@@ -243,16 +300,22 @@ onMounted(() => {
</td>
<td class="px-4 py-4 align-middle">
<div class="agent-list-cell">
<p class="truncate text-sm text-primary" :title="formatAgentTypeLabel(agent)">
{{ formatAgentTypeLabel(agent) }}
<p class="truncate text-sm text-primary" :title="activeManagementTab === 'executors' ? agent.name : formatAgentTypeLabel(agent)">
{{ activeManagementTab === 'executors' ? t('admin.agent.executor.workflowExecutor') : formatAgentTypeLabel(agent) }}
</p>
<p class="truncate text-xs text-muted" :title="formatRuntimeProviderLabel(agent)">
{{ formatRuntimeProviderLabel(agent) }}
{{ activeManagementTab === 'executors' ? t('admin.agent.executor.internalOnly') : formatRuntimeProviderLabel(agent) }}
</p>
</div>
</td>
<td class="px-4 py-4 align-middle">
<div class="agent-list-cell">
<div v-if="activeManagementTab === 'executors'" class="agent-list-cell">
<p class="truncate text-sm font-medium text-primary" :title="formatExecutorProtocol(agent)">
{{ formatExecutorProtocol(agent) }}
</p>
<p class="truncate text-xs text-muted">{{ t('admin.agent.executor.internalOnly') }}</p>
</div>
<div v-else class="agent-list-cell">
<p
class="truncate text-sm font-medium"
:class="agent.is_aggregate ? 'text-brand-700' : 'text-secondary'"
@@ -301,6 +364,7 @@ onMounted(() => {
{{ t('admin.edit') }}
</button>
<button
v-if="agent.exposure_mode !== 'internal'"
type="button"
class="inline-flex shrink-0 items-center justify-center p-2 text-blue-600 bg-blue-50 hover:bg-blue-100 rounded-lg transition-all"
:title="t('admin.agent.manageAccess')"
@@ -66,6 +66,16 @@ const directoryMemberSearch = ref('');
const showDifyFields = computed(() => props.form.runtime_provider === 'dify' || props.form.runtime_provider === 'hybrid');
const showIframeFields = computed(() => props.form.runtime_provider === 'iframe');
const isInternalExecutor = computed(() => props.form.exposure_mode === 'internal');
const dialogTitle = computed(() => {
if (isInternalExecutor.value) {
return props.isEditing ? t('admin.agent.editInternalExecutor') : t('admin.agent.createInternalExecutor');
}
return props.isEditing ? t('admin.agent.edit') : t('admin.agent.create');
});
const dialogSubtitle = computed(() => (
isInternalExecutor.value ? t('admin.agent.executor.formSubtitle') : t('admin.agent.subtitle')
));
const orderExtractionCapability = computed(() => (
currentCatalogEntry.value?.required_runtime_capabilities?.['shipping.order_extraction']
));
@@ -218,6 +228,19 @@ watch(
},
);
watch(
() => props.form.exposure_mode,
(exposure) => {
if (exposure === 'internal') {
props.form.runtime_provider = 'dify';
props.form.dify_app_type = 'workflow';
props.form.conversation_mode = 'task_chat';
props.form.welcome_message = '';
props.form.suggested_questions = [];
}
},
);
watch(
() => props.form.is_aggregate,
(enabled) => {
@@ -269,8 +292,8 @@ const handleTrainingQuestionTypeChange = (form: AgentFormState, index: number) =
<div class="flex max-h-[92vh] w-full max-w-5xl flex-col overflow-hidden rounded-2xl border border-default bg-surface shadow-2xl">
<div class="flex items-start justify-between gap-4 border-b border-default px-6 py-5">
<div>
<h3 class="section-title">{{ isEditing ? t('admin.agent.edit') : t('admin.agent.create') }}</h3>
<p class="section-desc mt-1">{{ t('admin.agent.subtitle') }}</p>
<h3 class="section-title">{{ dialogTitle }}</h3>
<p class="section-desc mt-1">{{ dialogSubtitle }}</p>
</div>
<button type="button" class="btn-icon-ds shrink-0" @click="emit('close')">
<X class="h-5 w-5" />
@@ -288,7 +311,7 @@ const handleTrainingQuestionTypeChange = (form: AgentFormState, index: number) =
:placeholder="t('admin.agent.fields.namePlaceholder')"
/>
</div>
<div class="space-y-2">
<div v-if="!isInternalExecutor" class="space-y-2">
<label class="text-xs font-bold text-muted uppercase tracking-wider">{{ t('admin.agent.fields.agentCode') }}</label>
<select v-model="form.agent_code" class="w-full input-field text-sm" @change="handleAgentCodeChange">
<option v-for="entry in typeCatalog" :key="entry.agent_code" :value="entry.agent_code">
@@ -296,7 +319,7 @@ const handleTrainingQuestionTypeChange = (form: AgentFormState, index: number) =
</option>
</select>
</div>
<div class="space-y-2">
<div v-if="!isInternalExecutor" class="space-y-2">
<label class="text-xs font-bold text-muted uppercase tracking-wider">{{ t('admin.agent.fields.runtimeProvider') }}</label>
<select v-model="form.runtime_provider" class="w-full input-field text-sm">
<option v-for="provider in runtimeProviders" :key="provider" :value="provider">
@@ -304,7 +327,7 @@ const handleTrainingQuestionTypeChange = (form: AgentFormState, index: number) =
</option>
</select>
</div>
<div class="space-y-2">
<div v-if="!isInternalExecutor" class="space-y-2">
<label class="text-xs font-bold text-muted uppercase tracking-wider">{{ t('admin.agent.fields.conversationMode') }}</label>
<select v-model="form.conversation_mode" class="w-full input-field text-sm">
<option v-for="mode in conversationModes" :key="mode" :value="mode">
@@ -312,19 +335,10 @@ const handleTrainingQuestionTypeChange = (form: AgentFormState, index: number) =
</option>
</select>
</div>
<div class="space-y-2">
<label class="text-xs font-bold text-muted uppercase tracking-wider">{{ t('admin.agent.runtimeBinding.exposureMode') }}</label>
<select v-model="form.exposure_mode" class="w-full input-field text-sm">
<option value="workspace">{{ t('admin.agent.runtimeBinding.exposureWorkspace') }}</option>
<option value="internal">{{ t('admin.agent.runtimeBinding.exposureInternal') }}</option>
</select>
<p class="text-xs text-muted">{{ t('admin.agent.runtimeBinding.exposureHint') }}</p>
</div>
<template v-if="showDifyFields">
<div class="space-y-2">
<div v-if="!isInternalExecutor" class="space-y-2">
<label class="text-xs font-bold text-muted uppercase tracking-wider">Dify应用类型</label>
<select v-model="form.dify_app_type" class="w-full input-field text-sm">
<select v-model="form.dify_app_type" class="w-full input-field text-sm" :disabled="isInternalExecutor">
<option value="chatflow">Chatflow</option>
<option value="workflow">Workflow</option>
</select>
@@ -358,10 +372,6 @@ const handleTrainingQuestionTypeChange = (form: AgentFormState, index: number) =
<p class="mt-1 text-xs text-muted">{{ t('admin.agent.runtimeBinding.subtitle') }}</p>
</div>
<div class="grid grid-cols-1 gap-4 md:grid-cols-2">
<label class="flex items-center gap-2 text-sm text-secondary">
<input v-model="form.order_extraction_binding_enabled" type="checkbox" />
{{ t('admin.agent.runtimeBinding.enabled') }}
</label>
<div class="space-y-2">
<label class="text-xs font-bold text-muted uppercase tracking-wider">{{ t('admin.agent.runtimeBinding.provider') }}</label>
<select v-model="form.order_extraction_provider_agent_id" class="w-full input-field text-sm">
@@ -379,6 +389,38 @@ const handleTrainingQuestionTypeChange = (form: AgentFormState, index: number) =
<label class="text-xs font-bold text-muted uppercase tracking-wider">{{ t('admin.agent.runtimeBinding.maxAttempts') }}</label>
<input v-model.number="form.order_extraction_max_attempts" type="number" min="1" max="10" class="w-full input-field text-sm" />
</div>
<div class="space-y-2">
<label class="text-xs font-bold text-muted uppercase tracking-wider">{{ t('admin.agent.runtimeBinding.unitConcurrency') }}</label>
<input v-model.number="form.order_extraction_unit_concurrency" type="number" min="2" max="4" class="w-full input-field text-sm" />
</div>
<div class="space-y-2">
<label class="text-xs font-bold text-muted uppercase tracking-wider">{{ t('admin.agent.runtimeBinding.unitMaxAttempts') }}</label>
<input v-model.number="form.order_extraction_unit_max_attempts" type="number" min="1" max="3" class="w-full input-field text-sm" />
</div>
<div class="space-y-2">
<label class="text-xs font-bold text-muted uppercase tracking-wider">{{ t('admin.agent.runtimeBinding.unitRetryBackoff') }}</label>
<input v-model.number="form.order_extraction_unit_retry_backoff_ms" type="number" min="100" max="5000" step="100" class="w-full input-field text-sm" />
</div>
<div class="space-y-2">
<label class="text-xs font-bold text-muted uppercase tracking-wider">{{ t('admin.agent.runtimeBinding.maxModelUnits') }}</label>
<input v-model.number="form.order_extraction_max_model_units" type="number" min="1" max="100" class="w-full input-field text-sm" />
</div>
<div class="space-y-2">
<label class="text-xs font-bold text-muted uppercase tracking-wider">{{ t('admin.agent.runtimeBinding.providerMaxConcurrency') }}</label>
<input v-model.number="form.order_extraction_provider_max_concurrency" type="number" min="1" max="20" class="w-full input-field text-sm" />
</div>
<div class="space-y-2">
<label class="text-xs font-bold text-muted uppercase tracking-wider">{{ t('admin.agent.runtimeBinding.circuitFailureThreshold') }}</label>
<input v-model.number="form.order_extraction_circuit_failure_threshold" type="number" min="2" max="20" class="w-full input-field text-sm" />
</div>
<div class="space-y-2">
<label class="text-xs font-bold text-muted uppercase tracking-wider">{{ t('admin.agent.runtimeBinding.circuitCooldown') }}</label>
<input v-model.number="form.order_extraction_circuit_cooldown_seconds" type="number" min="10" max="600" class="w-full input-field text-sm" />
</div>
<label class="flex items-center gap-3 rounded-lg border border-default px-3 py-2 md:col-span-2">
<input v-model="form.order_extraction_auto_create_enabled" type="checkbox" class="h-4 w-4" />
<span class="text-sm">{{ t('admin.agent.runtimeBinding.autoCreateEnabled') }}</span>
</label>
</div>
<p v-if="!orderExtractionProviderOptions.length" class="mt-3 text-xs text-amber-700">
{{ t('admin.agent.runtimeBinding.noProvider') }}
@@ -392,7 +434,7 @@ const handleTrainingQuestionTypeChange = (form: AgentFormState, index: number) =
</div>
</template>
<div class="col-span-1 md:col-span-2 space-y-2">
<div v-if="!isInternalExecutor" class="col-span-1 md:col-span-2 space-y-2">
<label class="text-xs font-bold text-muted uppercase tracking-wider">{{ t('admin.agent.fields.description') }}</label>
<input
v-model="form.description"
@@ -402,7 +444,7 @@ const handleTrainingQuestionTypeChange = (form: AgentFormState, index: number) =
/>
</div>
<div class="col-span-1 md:col-span-2 space-y-2">
<div v-if="!isInternalExecutor" class="col-span-1 md:col-span-2 space-y-2">
<label class="text-xs font-bold text-muted uppercase tracking-wider">{{ t('admin.agent.fields.welcomeMessage') }}</label>
<textarea
v-model="form.welcome_message"
@@ -412,7 +454,7 @@ const handleTrainingQuestionTypeChange = (form: AgentFormState, index: number) =
/>
</div>
<div class="col-span-1 md:col-span-2 rounded-2xl border border-default bg-surface-soft/40 p-4">
<div v-if="!isInternalExecutor" class="col-span-1 md:col-span-2 rounded-2xl border border-default bg-surface-soft/40 p-4">
<div class="flex flex-col gap-3 md:flex-row md:items-start md:justify-between">
<div>
<div class="flex items-center gap-2 text-xs font-bold uppercase tracking-wider text-muted">
@@ -496,7 +538,7 @@ const handleTrainingQuestionTypeChange = (form: AgentFormState, index: number) =
</div>
<div
v-if="showIntentFastPathSection"
v-if="showIntentFastPathSection && !isInternalExecutor"
class="col-span-1 md:col-span-2 rounded-2xl border border-default bg-surface-soft/40 p-4"
>
<div class="mb-4">
@@ -610,11 +652,12 @@ const handleTrainingQuestionTypeChange = (form: AgentFormState, index: number) =
</div>
<AgentCapabilitiesConfig
v-if="!isInternalExecutor"
:form="form"
:catalog-entry="currentCatalogEntry"
/>
<div class="col-span-1 md:col-span-2 space-y-3">
<div v-if="!isInternalExecutor" class="col-span-1 md:col-span-2 space-y-3">
<div class="flex flex-wrap items-center justify-between gap-3">
<label class="text-xs font-bold text-muted uppercase tracking-wider">常见问题</label>
<button
@@ -674,7 +717,7 @@ const handleTrainingQuestionTypeChange = (form: AgentFormState, index: number) =
</div>
</div>
<div class="col-span-1 md:col-span-2 rounded-2xl border border-default bg-surface-soft/40 p-4">
<div v-if="!isInternalExecutor" class="col-span-1 md:col-span-2 rounded-2xl border border-default bg-surface-soft/40 p-4">
<div class="flex flex-col gap-3 md:flex-row md:items-start md:justify-between">
<div>
<div class="text-xs font-bold uppercase tracking-wider text-muted">{{ t('admin.agent.training.title') }}</div>
@@ -311,7 +311,13 @@ export function useAgentsAdmin() {
const loadAgents = async (): Promise<void> => {
try {
agents.value = await listAdminAgents();
const [applications, executors] = await Promise.all([
listAdminAgents('applications'),
listAdminAgents('executors'),
]);
const byId = new Map<number, AgentRow>();
[...applications, ...executors].forEach((agent) => byId.set(Number(agent.id), agent));
agents.value = [...byId.values()].sort((a, b) => Number(a.id) - Number(b.id));
} catch (e) {
console.error('Error loading agents:', e);
agents.value = [];
@@ -365,10 +371,18 @@ export function useAgentsAdmin() {
isLoading.value = false;
};
const resetForm = (): void => {
const resetForm = (mode: 'user_agent' | 'internal_executor' = 'user_agent'): void => {
selectedAgentId.value = null;
form.value = createEmptyAgentForm(defaultCapabilities());
applyCatalogDefaultsToForm(form.value, typeCatalog.value[0]);
if (mode === 'internal_executor') {
form.value.exposure_mode = 'internal';
form.value.runtime_provider = 'dify';
form.value.dify_app_type = 'workflow';
form.value.conversation_mode = 'task_chat';
form.value.welcome_message = '';
form.value.suggested_questions = [];
}
trainingExamPdfGuides.value = [];
isEditing.value = false;
};
@@ -398,6 +412,14 @@ export function useAgentsAdmin() {
form.value.order_extraction_provider_agent_id = binding?.provider_agent_id ?? null;
form.value.order_extraction_timeout_seconds = Number(binding?.config?.timeout_seconds || 900);
form.value.order_extraction_max_attempts = Number(binding?.config?.max_attempts || 3);
form.value.order_extraction_unit_concurrency = Number(binding?.config?.unit_concurrency || 2);
form.value.order_extraction_unit_max_attempts = Number(binding?.config?.unit_max_attempts || 2);
form.value.order_extraction_unit_retry_backoff_ms = Number(binding?.config?.unit_retry_backoff_ms || 500);
form.value.order_extraction_max_model_units = Number(binding?.config?.max_model_units || 20);
form.value.order_extraction_provider_max_concurrency = Number(binding?.config?.provider_max_concurrency || 4);
form.value.order_extraction_circuit_failure_threshold = Number(binding?.config?.circuit_failure_threshold || 5);
form.value.order_extraction_circuit_cooldown_seconds = Number(binding?.config?.circuit_cooldown_seconds || 60);
form.value.order_extraction_auto_create_enabled = binding?.config?.auto_create_enabled === true;
}).catch((error) => {
console.error('Error loading Agent runtime bindings:', error);
});
@@ -502,6 +524,7 @@ export function useAgentsAdmin() {
trainingExtraPatch: {},
typeCatalog: typeCatalog.value,
});
registryPayload.exposure_mode = form.value.exposure_mode;
if (catalogEntry?.required_runtime_capabilities?.['shipping.order_extraction']) {
if (!form.value.order_extraction_provider_agent_id) {
msg.warning(t('admin.agent.runtimeBinding.providerRequired'));
@@ -510,10 +533,19 @@ export function useAgentsAdmin() {
}
registryPayload.order_extraction_runtime_binding = {
provider_agent_id: form.value.order_extraction_provider_agent_id,
enabled: form.value.order_extraction_binding_enabled,
// 新 UI 不再暴露启用勾选;绑定存在即启用,旧 API 仍兼容显式 enabled=false。
enabled: true,
config: {
timeout_seconds: form.value.order_extraction_timeout_seconds,
max_attempts: form.value.order_extraction_max_attempts,
unit_concurrency: form.value.order_extraction_unit_concurrency,
unit_max_attempts: form.value.order_extraction_unit_max_attempts,
unit_retry_backoff_ms: form.value.order_extraction_unit_retry_backoff_ms,
max_model_units: form.value.order_extraction_max_model_units,
provider_max_concurrency: form.value.order_extraction_provider_max_concurrency,
circuit_failure_threshold: form.value.order_extraction_circuit_failure_threshold,
circuit_cooldown_seconds: form.value.order_extraction_circuit_cooldown_seconds,
auto_create_enabled: form.value.order_extraction_auto_create_enabled,
},
};
}
@@ -53,6 +53,7 @@ export interface AgentTypeCatalogEntry {
allowed_runtime_providers?: string[];
allowed_dify_app_types?: string[];
allowed_exposure_modes?: string[];
allowed_effective_roles?: string[];
}>;
}
@@ -394,6 +395,7 @@ export function mapAgentRowToForm(
dify_app_type: agent.dify_app_type === 'workflow' ? 'workflow' : 'chatflow',
exposure_mode: agent.exposure_mode === 'internal' ? 'internal' : 'workspace',
effective_role: agent.effective_role === 'internal_executor' ? 'internal_executor' : 'user_agent',
api_base_url: agent.api_base_url || '',
@@ -95,7 +95,7 @@ export function usePermissionsAdmin() {
const loadAgents = async (): Promise<void> => {
try {
agents.value = await listAdminAgents();
agents.value = await listAdminAgents('applications');
} catch (e) {
console.error('Failed to load agents', e);
agents.value = [];
@@ -31,7 +31,7 @@ const uploadError = ref('');
const fetchAgents = async () => {
try {
agents.value = await listAdminAgents();
agents.value = await listAdminAgents('applications');
if (agents.value.length > 0) {
selectedAgentId.value = agents.value[0].id;
await fetchGuides();
@@ -65,7 +65,7 @@ export function useHotFaqCandidates() {
const loadAgents = async (): Promise<void> => {
try {
agents.value = await listAdminAgents();
agents.value = await listAdminAgents('applications');
} catch {
agents.value = [];
}
@@ -72,7 +72,7 @@ export function useQuestionsAdmin() {
const loadAgents = async (): Promise<void> => {
try {
agents.value = await listAdminAgents();
agents.value = await listAdminAgents('applications');
} catch (e) {
console.error('Failed to load agents', e);
agents.value = [];
@@ -8,7 +8,7 @@
import { computed, onMounted, reactive, ref, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
import { ArrowUpRight, Check, CircleDotDashed, FileCheck2, Layers3, Plus, Send, Tags, Workflow } from 'lucide-vue-next';
import { ArrowUpRight, Check, CircleDotDashed, CircleHelp, FileCheck2, Layers3, Plus, Send, Tags, Workflow } from 'lucide-vue-next';
import { BusinessError } from '@/shared/api/client';
import { useMessage } from '@/shared/composables/useMessage';
import {
@@ -19,7 +19,7 @@ import {
saveShippingIdentityDefinition,
saveShippingIdentityRuleSet,
} from '@/features/admin/api/shipping-identity-rules.api';
import type { ShippingIdentityRuleCatalog, ShippingIdentityRuleSet } from '@/features/admin/types/shipping-identity-rules.types';
import type { ShippingIdentityDefinition, ShippingIdentityRuleCatalog, ShippingIdentityRuleSet } from '@/features/admin/types/shipping-identity-rules.types';
const { t } = useI18n();
const router = useRouter();
@@ -32,15 +32,14 @@ const loading = ref(false);
const saving = ref(false);
const form = reactive({
display_name: '', description: '', evidence_label: '', target_type: 'customer', context_field_id: '',
default_weight: 100,
default_weight: 100, max_automation: 'none' as 'none' | 'conditional',
});
const selectedDefinitionCount = computed(() => selectedDefinitionIds.value.length);
const activeDefinitions = computed(() => catalog.value?.definitions.filter((item) => item.status === 'active') || []);
const publishedRuleSet = computed(() => ruleSets.value.find((item) => item.status === 'published') || null);
const selectedAutomation = computed(() => {
const field = catalog.value?.context_fields.find((item) => item.field_id === form.context_field_id);
return field?.field_category === 'general_context' && form.target_type === 'customer' ? 'conditional' : 'none';
return form.max_automation;
});
/** 说明当前来源实际从何处取值和自动化边界,帮助管理员在提交前理解选择结果。 */
@@ -75,12 +74,66 @@ const load = async (): Promise<void> => {
}
};
/**
* 将定义写接口返回的最新数据合并到本地目录,避免保存后整页重新加载并打断管理员当前操作。
* @param definition - 后端已校验并保存的识别定义。
*/
const upsertDefinition = (definition: ShippingIdentityDefinition): void => {
if (!catalog.value) return;
const index = catalog.value.definitions.findIndex((item) => item.id === definition.id);
if (index === -1) {
catalog.value.definitions = [...catalog.value.definitions, definition];
return;
}
catalog.value.definitions.splice(index, 1, definition);
};
/**
* 用规则集写接口返回的快照更新本地版本列表,保留当前页面的编辑位置和加载状态。
* @param ruleSet - 后端返回的最新规则集版本。
*/
const upsertRuleSet = (ruleSet: ShippingIdentityRuleSet): void => {
const index = ruleSets.value.findIndex((item) => item.id === ruleSet.id);
if (index === -1) {
ruleSets.value = [ruleSet, ...ruleSets.value];
return;
}
ruleSets.value.splice(index, 1, ruleSet);
};
const saveDefinition = async (): Promise<void> => {
saving.value = true;
try {
await saveShippingIdentityDefinition({ ...form });
Object.assign(form, { display_name: '', description: '', evidence_label: '' });
await load();
const saved = await saveShippingIdentityDefinition({ ...form });
upsertDefinition(saved);
Object.assign(form, { display_name: '', description: '', evidence_label: '', max_automation: 'none' });
message.success(t('admin.shippingIdentityRules.definitionSaved'));
} catch (error) {
showError(error);
} finally {
saving.value = false;
}
};
/** 更新已有定义的自动化授权;已发布快照不变,下一次发布规则集时才会生效。 */
const updateDefinitionAutomation = async (
definition: ShippingIdentityDefinition,
maxAutomation: 'none' | 'conditional',
): Promise<void> => {
if (definition.max_automation === maxAutomation) return;
saving.value = true;
try {
const saved = await saveShippingIdentityDefinition({
definition_code: definition.definition_code,
display_name: definition.display_name,
description: definition.description,
evidence_label: definition.evidence_label,
target_type: definition.target_type,
context_field_id: definition.context_field_id,
default_weight: definition.default_weight,
max_automation: maxAutomation,
}, definition.id);
upsertDefinition(saved);
message.success(t('admin.shippingIdentityRules.definitionSaved'));
} catch (error) {
showError(error);
@@ -95,8 +148,8 @@ const createDraft = async (): Promise<void> => {
const draft = await createShippingIdentityRuleSet({
copy_from_rule_set_id: ruleSets.value.find((item) => item.status === 'published')?.id,
});
upsertRuleSet(draft);
selectedRuleSet.value = draft;
await load();
} catch (error) {
showError(error);
} finally {
@@ -112,8 +165,8 @@ const saveDraft = async (): Promise<void> => {
expected_lock_version: selectedRuleSet.value.lock_version,
definition_ids: selectedDefinitionIds.value,
});
upsertRuleSet(saved);
selectedRuleSet.value = saved;
await load();
message.success(t('admin.shippingIdentityRules.ruleSetSaved'));
} catch (error) {
showError(error);
@@ -123,11 +176,21 @@ const saveDraft = async (): Promise<void> => {
};
const publishDraft = async (): Promise<void> => {
if (!selectedRuleSet.value || selectedRuleSet.value.status !== 'draft') return;
if (!selectedRuleSet.value || selectedRuleSet.value.status !== 'draft' || !selectedDefinitionCount.value) return;
saving.value = true;
try {
await publishShippingIdentityRuleSet(selectedRuleSet.value.id, selectedRuleSet.value.lock_version);
await load();
// 发布必须先持久化当前勾选,避免投产上一次保存的旧规则快照。
const saved = await saveShippingIdentityRuleSet(selectedRuleSet.value.id, {
expected_lock_version: selectedRuleSet.value.lock_version,
definition_ids: selectedDefinitionIds.value,
});
const published = await publishShippingIdentityRuleSet(saved.id, saved.lock_version);
// 新发布版本会替代旧发布版本;本地同步状态而不重新装载整页。
ruleSets.value = ruleSets.value.map((item) => (
item.status === 'published' && item.id !== published.id ? { ...item, status: 'retired' } : item
));
upsertRuleSet(published);
selectedRuleSet.value = published;
message.success(t('admin.shippingIdentityRules.ruleSetPublished'));
} catch (error) {
showError(error);
@@ -185,7 +248,7 @@ onMounted(() => { void load(); });
<div class="identity-definition-row__icon"><Tags class="h-4 w-4" /></div>
<div class="min-w-0"><strong>{{ definition.display_name }}</strong><p>{{ definition.description || sourceDisplay(definition) }}</p></div>
<span class="identity-target">{{ t(`admin.shippingIdentityRules.targets.${definition.target_type}`) }}</span>
<span class="identity-automation" :class="{ 'identity-automation--enabled': definition.max_automation === 'conditional' }">{{ t(`admin.shippingIdentityRules.automations.${definition.max_automation}`) }}</span>
<select class="identity-automation identity-automation-select" :class="{ 'identity-automation--enabled': definition.max_automation === 'conditional' }" :value="definition.max_automation" :disabled="saving" @change="updateDefinitionAutomation(definition, ($event.target as HTMLSelectElement).value as 'none' | 'conditional')"><option value="none">{{ t('admin.shippingIdentityRules.automations.none') }}</option><option value="conditional">{{ t('admin.shippingIdentityRules.automations.conditional') }}</option></select>
</article>
</div>
<div v-else class="identity-empty"><Tags class="h-5 w-5" /><span>{{ t('admin.shippingIdentityRules.definitionHint') }}</span></div>
@@ -198,6 +261,7 @@ onMounted(() => { void load(); });
<label><span>{{ t('admin.shippingIdentityRules.target') }}</span><select v-model="form.target_type" class="input-field"><option value="customer">{{ t('admin.shippingIdentityRules.targets.customer') }}</option><option value="site">{{ t('admin.shippingIdentityRules.targets.site') }}</option></select></label>
<label><span>{{ t('admin.shippingIdentityRules.evidenceLabel') }}</span><input v-model="form.evidence_label" required class="input-field" :placeholder="t('admin.shippingIdentityRules.evidenceLabelPlaceholder')"></label>
<label><span>{{ t('admin.shippingIdentityRules.description') }}</span><input v-model="form.description" class="input-field" :placeholder="t('admin.shippingIdentityRules.descriptionPlaceholder')"></label>
<label><span class="identity-label-with-tip">{{ t('admin.shippingIdentityRules.automationPolicy') }}<CircleHelp class="identity-label-tip" :title="t('admin.shippingIdentityRules.automationPolicyHint')" :aria-label="t('admin.shippingIdentityRules.automationPolicyHint')" /></span><select v-model="form.max_automation" class="input-field"><option value="none">{{ t('admin.shippingIdentityRules.automations.none') }}</option><option value="conditional">{{ t('admin.shippingIdentityRules.automations.conditional') }}</option></select></label>
<div class="identity-source-help"><strong>{{ t('admin.shippingIdentityRules.selectionResult') }}</strong><span>{{ selectedSourceHint }}</span><small>{{ t(`admin.shippingIdentityRules.automations.${selectedAutomation}`) }}</small></div>
<button type="submit" class="btn-primary identity-definition-form__submit" :disabled="saving || !form.context_field_id"><Plus class="h-4 w-4" />{{ t('admin.shippingIdentityRules.addDefinition') }}</button>
</form>
@@ -222,6 +286,17 @@ onMounted(() => { void load(); });
<input v-model="selectedDefinitionIds" type="checkbox" :value="definition.id"><span>{{ definition.display_name }}</span><small>{{ t(`admin.shippingIdentityRules.targets.${definition.target_type}`) }}</small>
</label>
</div>
<div v-else-if="selectedRuleSet" class="identity-published-definitions">
<div class="identity-selection__heading"><span>{{ t('admin.shippingIdentityRules.publishedDefinitions') }}</span><strong>{{ selectedRuleSet.definition?.definitions.length || 0 }}</strong></div>
<div v-if="selectedRuleSet.definition?.definitions.length" class="identity-published-definition-list">
<div v-for="definition in selectedRuleSet.definition.definitions" :key="definition.id" class="identity-published-definition">
<div><strong>{{ definition.display_name }}</strong><small>{{ definition.context_field?.display_name || definition.context_field?.field_code || '-' }}</small></div>
<span class="identity-target">{{ t(`admin.shippingIdentityRules.targets.${definition.target_type}`) }}</span>
<span class="identity-automation" :class="{ 'identity-automation--enabled': definition.max_automation === 'conditional' }">{{ t(`admin.shippingIdentityRules.automations.${definition.max_automation}`) }}</span>
</div>
</div>
<p v-else class="identity-published-empty">{{ t('admin.shippingIdentityRules.publishedDefinitionsEmpty') }}</p>
</div>
<div v-if="selectedRuleSet" class="identity-publication__actions">
<template v-if="selectedRuleSet.status === 'draft'">
@@ -266,12 +341,16 @@ onMounted(() => { void load(); });
.identity-definition-row strong { color: #1a3856; font-size: .86rem; font-weight: 750; }
.identity-definition-row p { overflow: hidden; margin-top: .18rem; color: #8194a8; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.identity-target, .identity-automation { padding: .32rem .52rem; border-radius: 999px; background: #f1f5f8; color: #677f98; font-size: .7rem; white-space: nowrap; }
.identity-automation-select { border: 1px solid #dce8ef; cursor: pointer; }
.identity-automation--enabled { background: #e4f8ef; color: #12865c; }
.identity-empty { display: flex; align-items: center; gap: .55rem; min-height: 5.5rem; padding: 1.2rem 1.35rem; color: #7c91a7; font-size: .82rem; }
.identity-definition-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; padding: 1.1rem 1.35rem 1.35rem; background: linear-gradient(135deg, #f7fbfd 0%, #f3f9fc 100%); }
.identity-form-title { grid-column: 1 / -1; display: flex; align-items: center; gap: .42rem; color: #173857; font-size: .85rem; }
.identity-form-guide { grid-column: 1 / -1; margin: -.45rem 0 .1rem; color: #73889e; font-size: .75rem; line-height: 1.55; }
.identity-definition-form label { display: grid; gap: .35rem; color: #667f99; font-size: .72rem; font-weight: 700; }
.identity-label-with-tip { display: inline-flex; align-items: center; gap: .28rem; }
.identity-label-tip { width: .9rem; height: .9rem; color: #7d93a8; cursor: help; }
.identity-label-tip:focus-visible { border-radius: 50%; outline: 2px solid #7cc7eb; outline-offset: 2px; }
.identity-definition-form label small { color: #8295a8; font-size: .67rem; font-weight: 500; line-height: 1.35; }
.identity-definition-form .input-field, .identity-static-field { box-sizing: border-box; min-width: 0; height: 2.75rem; padding: 0 .8rem; border-color: #d9e7ef; background: #fff; font-size: .83rem; line-height: 1.25; }
.identity-definition-form select.input-field { padding-top: 0; padding-bottom: 0; line-height: 2.75rem; }
@@ -288,6 +367,13 @@ onMounted(() => { void load(); });
.identity-version:hover, .identity-version--selected { border-color: #0b91cd; background: #eefaff; color: #087cae; }
.identity-version span { font-weight: 800; }.identity-version small { font-size: .68rem; }
.identity-selection { margin: 1rem 0; }
.identity-published-definitions { margin: 1rem 0; }
.identity-published-definition-list { display: grid; gap: .45rem; }
.identity-published-definition { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .5rem; align-items: center; padding: .58rem .65rem; border: 1px solid #e5eef3; border-radius: .6rem; background: #fbfdfe; }
.identity-published-definition strong, .identity-published-definition small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity-published-definition strong { color: #294660; font-size: .76rem; }
.identity-published-definition small { margin-top: .15rem; color: #8194a8; font-size: .68rem; }
.identity-published-empty { margin: 0; color: #8194a8; font-size: .76rem; }
.identity-selection__heading { display: flex; justify-content: space-between; margin-bottom: .6rem; color: #274563; font-size: .78rem; font-weight: 750; }
.identity-selection__heading strong { color: #0a8bc4; }
.identity-check-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .5rem; padding: .54rem 0; border-bottom: 1px dashed #e2ebf1; color: #37516c; font-size: .78rem; }
@@ -0,0 +1,119 @@
<!--
features/admin/modules/shipping-order-extraction-runs/ShippingOrderExtractionRunsPage.vue
用途:为所有管理员提供订单识别异步 Run 的只读诊断视图。
依赖:admin.api 的脱敏诊断 DTO、Vue Composition API、Vue I18n。
逻辑:列表按状态筛选并按需加载单条详情;页面不提供重试、取消或任何业务数据修改入口。
-->
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import {
getShippingOrderExtractionDiagnosticRun,
listShippingOrderExtractionDiagnosticRuns,
type ShippingOrderExtractionDiagnosticDetail,
type ShippingOrderExtractionDiagnosticRun,
} from '@/features/admin/api/admin.api';
const { t } = useI18n();
const loading = ref(false);
const detailLoading = ref(false);
const page = ref(1);
const pageSize = 25;
const total = ref(0);
const status = ref('');
const rows = ref<ShippingOrderExtractionDiagnosticRun[]>([]);
const detail = ref<ShippingOrderExtractionDiagnosticDetail | null>(null);
const error = ref('');
const formatTime = (value?: string | null) => value ? new Date(value).toLocaleString() : '-';
const formatDuration = (value?: number | null) => value == null ? '-' : `${(value / 1000).toFixed(value < 10000 ? 1 : 0)} s`;
/** 加载安全摘要;服务端已完成管理员鉴权、审计及敏感字段剔除。 */
const load = async () => {
loading.value = true;
error.value = '';
try {
const response = await listShippingOrderExtractionDiagnosticRuns(page.value, pageSize, status.value);
rows.value = response.items;
total.value = response.total;
} catch {
error.value = t('admin.shippingOrderExtractionRuns.loadFailed');
} finally {
loading.value = false;
}
};
/** 按需打开一条 Run 的脱敏执行尝试和节点生命周期,不预取详情以减少诊断审计噪声。 */
const openDetail = async (runNo: string) => {
detailLoading.value = true;
error.value = '';
try {
detail.value = await getShippingOrderExtractionDiagnosticRun(runNo);
} catch {
error.value = t('admin.shippingOrderExtractionRuns.detailFailed');
} finally {
detailLoading.value = false;
}
};
const applyStatus = async () => {
page.value = 1;
await load();
};
onMounted(() => { void load(); });
</script>
<template>
<section class="space-y-5 p-5 md:p-7">
<header class="flex flex-wrap items-start justify-between gap-4">
<div>
<p class="text-xs font-semibold uppercase tracking-[0.16em] text-brand-600">{{ t('admin.shippingOrderExtractionRuns.eyebrow') }}</p>
<h1 class="mt-1 text-2xl font-bold text-primary">{{ t('admin.shippingOrderExtractionRuns.title') }}</h1>
<p class="mt-2 max-w-3xl text-sm text-secondary">{{ t('admin.shippingOrderExtractionRuns.subtitle') }}</p>
</div>
<button type="button" class="rounded-lg border border-default px-3 py-2 text-sm text-secondary hover:bg-slate-50 dark:hover:bg-slate-800" :disabled="loading" @click="load">
{{ t('admin.shippingOrderExtractionRuns.refresh') }}
</button>
</header>
<div class="flex flex-wrap items-center gap-3 rounded-xl border border-default bg-surface p-3">
<label class="flex items-center gap-2 text-sm text-secondary">
{{ t('admin.shippingOrderExtractionRuns.status') }}
<select v-model="status" class="rounded-md border border-default bg-surface px-2 py-1.5" @change="applyStatus">
<option value="">{{ t('admin.shippingOrderExtractionRuns.allStatuses') }}</option>
<option v-for="value in ['queued', 'running', 'result_persisted', 'completed', 'needs_review', 'failed', 'cancelled']" :key="value" :value="value">
{{ t(`admin.shippingOrderExtractionRuns.statuses.${value}`) }}
</option>
</select>
</label>
<span class="text-xs text-muted">{{ t('admin.shippingOrderExtractionRuns.total', { count: total }) }}</span>
</div>
<p v-if="error" class="rounded-lg border border-rose-200 bg-rose-50 p-3 text-sm text-rose-700">{{ error }}</p>
<div class="overflow-x-auto rounded-xl border border-default bg-surface">
<table class="min-w-[940px] w-full text-left text-sm">
<thead class="border-b border-default bg-slate-50 text-xs text-muted dark:bg-slate-900/40"><tr>
<th class="px-4 py-3">{{ t('admin.shippingOrderExtractionRuns.runNo') }}</th><th class="px-4 py-3">{{ t('admin.shippingOrderExtractionRuns.status') }}</th><th class="px-4 py-3">{{ t('admin.shippingOrderExtractionRuns.stage') }}</th><th class="px-4 py-3">{{ t('admin.shippingOrderExtractionRuns.attempts') }}</th><th class="px-4 py-3">{{ t('admin.shippingOrderExtractionRuns.createdAt') }}</th><th class="px-4 py-3">{{ t('admin.shippingOrderExtractionRuns.totalDuration') }}</th><th class="px-4 py-3"></th>
</tr></thead>
<tbody><tr v-if="loading"><td colspan="7" class="px-4 py-8 text-center text-muted">{{ t('admin.shippingOrderExtractionRuns.loading') }}</td></tr>
<tr v-else-if="!rows.length"><td colspan="7" class="px-4 py-8 text-center text-muted">{{ t('admin.shippingOrderExtractionRuns.empty') }}</td></tr>
<tr v-for="row in rows" :key="row.run_no" class="border-b border-default last:border-0"><td class="px-4 py-3 font-mono text-xs">{{ row.run_no }}</td><td class="px-4 py-3">{{ t(`admin.shippingOrderExtractionRuns.statuses.${row.status}`) }}</td><td class="px-4 py-3">{{ row.current_stage_code || '-' }}</td><td class="px-4 py-3">{{ row.attempt_count }}</td><td class="px-4 py-3">{{ formatTime(row.created_at) }}</td><td class="px-4 py-3">{{ formatDuration(row.durations_ms.total) }}</td><td class="px-4 py-3"><button type="button" class="text-brand-600 hover:underline" @click="openDetail(row.run_no)">{{ t('admin.shippingOrderExtractionRuns.viewDetail') }}</button></td></tr>
</tbody>
</table>
</div>
<div class="flex items-center justify-end gap-3 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.shippingOrderExtractionRuns.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.shippingOrderExtractionRuns.next') }}</button></div>
<div v-if="detail || detailLoading" class="fixed inset-0 z-50 flex justify-end bg-black/30" @click.self="detail = null">
<aside class="h-full w-full max-w-2xl overflow-y-auto bg-surface p-6 shadow-2xl">
<div class="flex items-center justify-between"><h2 class="text-lg font-bold">{{ t('admin.shippingOrderExtractionRuns.detailTitle') }}</h2><button type="button" class="text-secondary" @click="detail = null">{{ t('admin.close') }}</button></div>
<p v-if="detailLoading" class="mt-6 text-muted">{{ t('admin.shippingOrderExtractionRuns.loading') }}</p>
<template v-else-if="detail"><dl class="mt-5 grid grid-cols-2 gap-3 text-sm"><dt>{{ t('admin.shippingOrderExtractionRuns.runNo') }}</dt><dd class="font-mono text-xs">{{ detail.run.run_no }}</dd><dt>{{ t('admin.shippingOrderExtractionRuns.workflowRunId') }}</dt><dd class="font-mono text-xs">{{ detail.run.workflow_run_id || '-' }}</dd><dt>{{ t('admin.shippingOrderExtractionRuns.errorCode') }}</dt><dd>{{ detail.run.error_code || '-' }}</dd><dt>{{ t('admin.shippingOrderExtractionRuns.totalDuration') }}</dt><dd>{{ formatDuration(detail.run.durations_ms.total) }}</dd></dl>
<h3 class="mt-7 font-semibold">{{ t('admin.shippingOrderExtractionRuns.jobAttempts') }}</h3><div class="mt-2 space-y-2"><div v-for="job in detail.job_attempts" :key="job.job_id" class="rounded-lg border border-default p-3 text-sm"><b>#{{ job.job_id }}</b> · {{ job.status }} · {{ t('admin.shippingOrderExtractionRuns.attempts') }} {{ job.attempts }}/{{ job.max_attempts }} · {{ formatDuration(job.duration_ms) }}</div><p v-if="!detail.job_attempts.length" class="text-sm text-muted">{{ t('admin.shippingOrderExtractionRuns.empty') }}</p></div>
<h3 class="mt-7 font-semibold">{{ t('admin.shippingOrderExtractionRuns.units') }}</h3><div class="mt-2 space-y-2"><div v-for="unit in detail.units" :key="unit.unit_id" class="rounded-lg border border-default p-3 text-sm"><b>#{{ unit.position + 1 }} {{ unit.unit_type }}</b> · {{ unit.status }} · {{ t('admin.shippingOrderExtractionRuns.attempts') }} {{ unit.attempt_count }} · {{ formatDuration(unit.duration_ms) }}<span v-if="unit.error_code" class="ml-2 font-mono text-xs text-danger">{{ unit.error_code }}</span></div><p v-if="!detail.units.length" class="text-sm text-muted">{{ t('admin.shippingOrderExtractionRuns.empty') }}</p></div>
<h3 class="mt-7 font-semibold">{{ t('admin.shippingOrderExtractionRuns.lifecycle') }}</h3><div class="mt-2 space-y-2"><div v-for="event in detail.progress_events" :key="`${event.node_execution_id}:${event.event_type}:${event.occurred_at}`" class="rounded-lg border border-default p-3 text-sm"><b>{{ event.stage_code || event.event_type }}</b><span class="ml-2 text-secondary">{{ event.status || '-' }}</span><span class="ml-2 font-mono text-xs text-muted">{{ event.node_type || '-' }}</span><time class="ml-2 text-xs text-muted">{{ formatTime(event.occurred_at) }}</time></div><p v-if="!detail.progress_events.length" class="text-sm text-muted">{{ t('admin.shippingOrderExtractionRuns.empty') }}</p></div>
</template>
</aside>
</div>
</section>
</template>
@@ -8,6 +8,7 @@
import { computed, onMounted, reactive, ref, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute, useRouter } from 'vue-router';
import { GripVertical } from 'lucide-vue-next';
import { BusinessError } from '@/shared/api/client';
import DeleteConfirmDialog from '@/shared/components/DeleteConfirmDialog.vue';
import { useMessage } from '@/shared/composables/useMessage';
@@ -25,6 +26,7 @@ import {
listShippingOrderSchemaVersions,
listShippingOrderSchemaAuditEvents,
publishShippingOrderSchemaDraft,
reorderShippingOrderFields,
saveShippingOrderSchemaDraft,
updateShippingOrderField,
} from '@/features/admin/api/shipping-order-schema.api';
@@ -32,7 +34,10 @@ import SchemaVersionHistoryDrawer from '@/features/admin/modules/shipping-order-
import SchemaVersionDiffDrawer from '@/features/admin/modules/shipping-order-schema/components/SchemaVersionDiffDrawer.vue';
import SchemaVersionUsageDrawer from '@/features/admin/modules/shipping-order-schema/components/SchemaVersionUsageDrawer.vue';
import SchemaExtractionAuditDrawer from '@/features/admin/modules/shipping-order-schema/components/SchemaExtractionAuditDrawer.vue';
import { contextOptionLabelKey, fieldShapeForCategory } from './shippingOrderField.utils';
import {
contextOptionLabelKey, fieldShapeForCategory, reorderFieldConfigs, reorderFieldIds,
} from './shippingOrderField.utils';
import type { FieldDropPosition } from './shippingOrderField.utils';
import type {
ShippingOrderField,
ShippingOrderFieldConfig,
@@ -71,6 +76,7 @@ const expandedGroups = reactive<Record<FieldCategory, boolean>>({
general_context: false, order_header: false, order_line: false,
});
const groupExpansionInitialized = ref(false);
const draggingFieldId = ref<string | null>(null);
const historyOpen = ref(false);
const historyLoading = ref(false);
const historyDetailLoading = ref(false);
@@ -110,6 +116,7 @@ const activeContextOptions = computed(() => (state.value?.context_providers || [
.filter((option) => option.status === 'active' && option.registered)
.map((option) => ({ ...option, provider_key: provider.provider_key }))));
const selectedIsContext = computed(() => selectedField.value?.field_category === 'general_context');
const selectedIsOrderHeader = computed(() => selectedField.value?.field_category === 'order_header');
const selectedContextOption = computed(() => activeContextOptions.value.find(
(item) => item.id === contextOptionId(selectedRuleConfig.value || {} as ShippingOrderFieldConfig),
) || null);
@@ -124,7 +131,9 @@ const groupedFields = computed(() => {
if (!query) return true;
const label = displayNameForField(field, 0).toLocaleLowerCase();
return label.includes(query) || field.field_code.toLocaleLowerCase().includes(query);
});
}).sort((left, right) => (
left.display_sequence - right.display_sequence
));
return [
{ category: 'general_context' as const, fields: fields.filter((field) => field.field_category === 'general_context') },
{ category: 'order_header' as const, fields: fields.filter((field) => field.field_category === 'order_header') },
@@ -132,6 +141,74 @@ const groupedFields = computed(() => {
].filter((group) => group.fields.length);
});
/** 应用同分类拖拽;数组位置会在保存时由后端固化为 sequence。 */
const applyFieldMove = (
draggedFieldId: string,
targetField: ShippingOrderField,
position: FieldDropPosition,
): boolean => {
const draggedField = state.value?.fields.find((item) => item.id === draggedFieldId);
if (!draggedField || draggedField.field_category !== targetField.field_category) return false;
const categoryIds = draftFields.value
.map((config) => state.value?.fields.find((field) => field.id === config.field_id))
.filter((field): field is ShippingOrderField => field?.field_category === targetField.field_category)
.map((field) => field.id);
draftFields.value = reorderFieldConfigs(
draftFields.value, categoryIds, draggedFieldId, targetField.id, position,
).map((config, index) => ({ ...config, sequence: index + 1 }));
if (state.value) {
const categoryFieldIds = state.value.fields
.filter((field) => field.field_category === targetField.field_category)
.sort((left, right) => left.display_sequence - right.display_sequence)
.map((field) => field.id);
const nextCategoryIds = reorderFieldIds(
categoryFieldIds, draggedFieldId, targetField.id, position,
);
if (nextCategoryIds.every((fieldId, index) => fieldId === categoryFieldIds[index])) return false;
const categorySet = new Set(categoryFieldIds);
let categoryIndex = 0;
state.value.fields = [...state.value.fields]
.sort((left, right) => left.display_sequence - right.display_sequence)
.map((field) => categorySet.has(field.id)
? state.value!.fields.find((item) => item.id === nextCategoryIds[categoryIndex++]) || field
: field)
.map((field, index) => ({ ...field, display_sequence: index + 1 }));
}
return true;
};
/** 记录原生拖拽身份,避免 dragend 与异步建草稿竞争导致字段 ID 丢失。 */
const startFieldDrag = (event: DragEvent, fieldId: string): void => {
draggingFieldId.value = fieldId;
event.dataTransfer?.setData('text/plain', fieldId);
if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move';
};
/** 拖拽只保存字段目录全局顺序;草稿/发布版本均不参与当前页面排序。 */
const moveFieldWithinCategory = async (event: DragEvent, targetField: ShippingOrderField): Promise<void> => {
const draggedFieldId = event.dataTransfer?.getData('text/plain') || draggingFieldId.value;
draggingFieldId.value = null;
if (!draggedFieldId || draggedFieldId === targetField.id) return;
const previousFields = state.value ? [...state.value.fields] : [];
const previousDraftFields = [...draftFields.value];
const targetElement = event.currentTarget as HTMLElement | null;
const targetBounds = targetElement?.getBoundingClientRect();
const position: FieldDropPosition = targetBounds && event.clientY >= targetBounds.top + targetBounds.height / 2
? 'after'
: 'before';
if (!applyFieldMove(draggedFieldId, targetField, position) || !state.value) return;
try {
const result = await reorderShippingOrderFields(
[...state.value.fields].sort((left, right) => left.display_sequence - right.display_sequence).map((field) => field.id),
);
state.value.fields = result.fields;
} catch (error) {
state.value.fields = previousFields;
draftFields.value = previousDraftFields;
showError(error);
}
};
/** 搜索期间自动展开命中分组;清空搜索后自然恢复用户原来的展开状态。 */
const groupIsExpanded = (category: FieldCategory): boolean => Boolean(fieldSearch.value.trim()) || expandedGroups[category];
@@ -349,15 +426,16 @@ const syncContextExposurePolicy = (config: ShippingOrderFieldConfig): void => {
/** 将草稿字段配置同步到本地编辑状态,并保留未纳入版本的 active 字段供管理员选择。 */
const syncDraftFields = (): void => {
const existing = draft.value?.definition?.fields || [];
const existing = draft.value?.definition?.fields || published.value?.definition?.fields || [];
const byId = new Map(existing.map((item) => [item.field_id, item]));
const globalSequence = new Map((state.value?.fields || []).map((field) => [field.id, field.display_sequence]));
draftFields.value = (state.value?.fields || [])
.filter((field) => field.status === 'active')
.map((field) => ({
...(byId.get(field.id) || {
field_id: field.id,
display_name: published.value?.definition?.fields.find((item) => item.field_id === field.id)?.display_name || field.field_code,
business_purpose: 'general',
business_purpose: 'general' as const,
required: false,
aliases: [],
...defaultRule(field),
@@ -371,13 +449,16 @@ const syncDraftFields = (): void => {
},
relation_role: null,
extraction_instruction: '',
sensitivity_level: field.field_category === 'general_context' ? 'low' : 'confidential',
dify_exposure_policy: 'never',
sensitivity_level: (field.field_category === 'general_context' ? 'low' : 'confidential') as 'low' | 'confidential',
dify_exposure_policy: 'never' as const,
available_for_customer_identity: false,
sequence: Number.MAX_SAFE_INTEGER,
}),
context_provider_option_id: contextOptionId(byId.get(field.id) || {} as ShippingOrderFieldConfig),
enabled: byId.has(field.id) ? byId.get(field.id)?.enabled !== false : false,
}));
}))
.sort((left, right) => (globalSequence.get(left.field_id) || 0) - (globalSequence.get(right.field_id) || 0))
.map((config, index) => ({ ...config, sequence: index + 1 }));
changeNote.value = draft.value?.change_note || '';
if (!draftFields.value.some((item) => item.field_id === selectedDraftFieldId.value)) {
selectedDraftFieldId.value = draftFields.value[0]?.field_id || null;
@@ -517,13 +598,15 @@ const saveDraft = async (): Promise<void> => {
saving.value = true;
try {
const fields = draftFields.value.map((item) => ({ ...item }));
await saveShippingOrderSchemaDraft(draft.value.id, {
const saved = await saveShippingOrderSchemaDraft(draft.value.id, {
fields,
change_note: changeNote.value,
expected_lock_version: draft.value.lock_version,
});
if (state.value) {
state.value.versions = state.value.versions.map((item) => item.id === saved.id ? saved : item);
}
message.success(t('admin.shippingOrderSchema.draftSaved'));
await load();
} catch (error) {
await handleWriteError(error);
} finally {
@@ -701,6 +784,10 @@ onMounted(async () => {
<input v-model="fieldSearch" type="search" :placeholder="t('admin.shippingOrderSchema.searchFields')">
<span>{{ t('admin.shippingOrderSchema.fieldCount', { count: state.fields.length }) }}</span>
</div>
<div class="field-sort-guide">
<GripVertical class="field-sort-guide-icon" />
<span>{{ fieldSearch ? t('admin.shippingOrderSchema.dragDisabledBySearch') : t('admin.shippingOrderSchema.globalOrderGuide') }}</span>
</div>
<div class="field-list">
<section v-for="group in groupedFields" :key="group.category" class="field-group">
<button
@@ -713,7 +800,18 @@ onMounted(async () => {
<span class="field-group-summary"><b v-if="!groupIsExpanded(group.category) && groupHasSelectedField(group.category)">{{ t('admin.shippingOrderSchema.selectedInGroup') }}</b><em>{{ group.fields.length }}</em></span>
</button>
<div v-if="groupIsExpanded(group.category)" class="field-group-items">
<div v-for="(field, index) in group.fields" :key="field.id" class="field-item" :class="{ selected: selectedDraftFieldId === field.id, retired: field.status !== 'active' }">
<div
v-for="(field, index) in group.fields"
:key="field.id"
class="field-item"
:class="{ selected: selectedDraftFieldId === field.id, retired: field.status !== 'active', dragging: draggingFieldId === field.id }"
:draggable="!fieldSearch && !saving"
@dragstart="startFieldDrag($event, field.id)"
@dragend="draggingFieldId = null"
@dragover.prevent
@drop.prevent="void moveFieldWithinCategory($event, field)"
>
<span class="field-drag-handle" :title="t('admin.shippingOrderSchema.dragToReorder')" aria-hidden="true"><GripVertical /></span>
<button type="button" class="field-select" :disabled="field.status !== 'active'" @click="selectedDraftFieldId = field.id">
<span class="field-identity"><strong>{{ displayNameForField(field, index) }}</strong><code :title="field.field_code">{{ field.field_code }}</code></span>
<span class="field-state" :class="{ included: fieldIncluded(field) }" :title="fieldVersionStatus(field)"></span>
@@ -753,6 +851,10 @@ onMounted(async () => {
<label><span>{{ t('admin.shippingOrderSchema.businessPurpose') }}</span><select v-model="selectedRuleConfig.business_purpose" :disabled="isReadOnly || !selectedDraftField?.enabled || fieldFor(selectedRuleConfig)?.scope !== 'line'"><option v-for="item in ['general', 'part_number', 'quantity', 'reservation_id', 'inventory_source_hint']" :key="item" :value="item">{{ t(`admin.shippingOrderSchema.businessPurposeOption.${item}`) }}</option></select></label>
<label class="span-two"><span>{{ t('admin.shippingOrderSchema.aliases') }}</span><input :value="selectedRuleConfig.aliases.join(', ')" :disabled="isReadOnly || !selectedDraftField?.enabled" @input="!isReadOnly && (selectedRuleConfig.aliases = splitValues(($event.target as HTMLInputElement).value))"></label>
<label class="span-two"><span>{{ t('admin.shippingOrderSchema.extractionInstruction') }}</span><textarea v-model="selectedRuleConfig.extraction_instruction" :disabled="isReadOnly || !selectedDraftField?.enabled" :placeholder="t('admin.shippingOrderSchema.extractionInstructionPlaceholder')"></textarea></label>
<template v-if="selectedIsOrderHeader">
<div class="span-two context-field-note"><strong>{{ t('admin.shippingOrderSchema.orderHeaderIdentityTitle') }}</strong><span>{{ t('admin.shippingOrderSchema.orderHeaderIdentityHint') }}</span></div>
<label class="span-two"><input v-model="selectedRuleConfig.available_for_customer_identity" :disabled="isReadOnly" type="checkbox"><span>{{ t('admin.shippingOrderSchema.availableForCustomerIdentity') }}</span></label>
</template>
</template>
</div>
<template v-if="!selectedIsContext"><div class="rule-switches"><label><input v-model="selectedRuleConfig.required" :disabled="isReadOnly || !selectedDraftField?.enabled" type="checkbox"><span><strong>{{ t('admin.shippingOrderSchema.required') }}</strong></span></label><label><input v-model="selectedRuleConfig.evidence_policy.required" :disabled="isReadOnly || !selectedDraftField?.enabled" type="checkbox"><span><strong>{{ t('admin.shippingOrderSchema.evidenceRequired') }}</strong></span></label><label><input v-model="selectedRuleConfig.evidence_policy.allow_single_source" :disabled="isReadOnly || !selectedDraftField?.enabled" type="checkbox"><span><strong>{{ t('admin.shippingOrderSchema.allowSingleSource') }}</strong></span></label></div>
@@ -786,6 +888,7 @@ onMounted(async () => {
:audit-loading="historyAuditLoading"
:comparison-target="comparisonTarget"
:copying="saving"
:field-order="state?.fields || []"
@update:model-value="closeHistory"
@select="selectHistoryVersion"
@load-more="loadHistory(false)"
@@ -834,6 +937,8 @@ onMounted(async () => {
.panel-heading p { margin: 5px 0 0; color: #94a3b8; font-size: 12px; line-height: 1.5; }
.add-field-trigger { flex: 0 0 auto; border: 0; background: transparent; padding: 2px 0; color: #0284c7; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.new-field-form { display: grid; gap: 10px; margin: 0 12px 10px; border: 1px solid #dbe6ef; border-radius: 7px; background: #fff; padding: 12px; }
.field-sort-guide { display: flex; align-items: center; gap: 6px; margin: 0 12px 8px; border: 1px solid #bae6fd; border-radius: 7px; background: #f0f9ff; padding: 8px 9px; color: #0369a1; font-size: 11px; line-height: 1.4; }
.field-sort-guide-icon { width: 15px; height: 15px; flex: 0 0 15px; }
.new-field-form label, .rule-body label, .rule-footer label { display: grid; gap: 5px; color: #64748b; font-size: 12px; }
.new-field-form label small { color: #94a3b8; font-size: 11px; line-height: 1.4; }
.rule-body label small { color: #94a3b8; font-size: 11px; line-height: 1.4; }
@@ -857,6 +962,10 @@ onMounted(async () => {
.field-group-items { padding-top: 2px; }
.field-item { display: flex; align-items: center; margin-top: 2px; border-radius: 7px; color: #475569; }
.field-item:hover { background: #f1f6fa; }
.field-item.dragging { opacity: .45; }
.field-drag-handle { display: grid; width: 28px; align-self: stretch; place-items: center; flex: 0 0 28px; color: #64748b; cursor: grab; user-select: none; }
.field-drag-handle svg { width: 17px; height: 17px; }
.field-drag-handle:active { cursor: grabbing; }
.field-item.selected { background: #e8f5fc; color: #0369a1; box-shadow: inset 3px 0 #0ea5e9; }
.field-item.retired { opacity: .55; }
.field-select { display: flex; min-width: 0; flex: 1; align-items: center; justify-content: space-between; gap: 10px; border: 0; background: transparent; padding: 8px 10px 8px 12px; color: inherit; font: inherit; text-align: left; cursor: pointer; }
@@ -8,7 +8,7 @@
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
import SchemaAuditTimeline from '@/features/admin/modules/shipping-order-schema/components/SchemaAuditTimeline.vue';
import type { ShippingOrderSchemaVersion } from '@/features/admin/types/shipping-order-schema.types';
import type { ShippingOrderField, ShippingOrderSchemaVersion } from '@/features/admin/types/shipping-order-schema.types';
import type { ShippingOrderSchemaAuditEvent } from '@/features/admin/types/shipping-order-schema.types';
const props = defineProps<{
@@ -23,6 +23,7 @@ const props = defineProps<{
auditLoading: boolean;
comparisonTarget: ShippingOrderSchemaVersion | null;
copying: boolean;
fieldOrder: ShippingOrderField[];
}>();
const emit = defineEmits<{
@@ -51,8 +52,15 @@ const statusLabel = (status: ShippingOrderSchemaVersion['status']): string =>
const contextSourceLabel = (field: NonNullable<ShippingOrderSchemaVersion['definition']>['fields'][number]): string =>
field.context_source?.source_key || '-';
/** 历史详情只展示快照中的完整字段,不回读当前字段目录。 */
const fields = computed(() => props.selectedVersion?.definition?.fields || []);
/** 快照内容保持不变;展示时按当前字段目录顺序排列,已不存在字段回退冻结 sequence。 */
const fields = computed(() => {
const globalOrder = new Map(props.fieldOrder.map((field) => [field.id, field.display_sequence]));
return [...(props.selectedVersion?.definition?.fields || [])].sort((left, right) => {
const leftOrder = globalOrder.get(left.field_id) ?? 1_000_000 + Number(left.sequence || 0);
const rightOrder = globalOrder.get(right.field_id) ?? 1_000_000 + Number(right.sequence || 0);
return leftOrder - rightOrder;
});
});
/** 关闭抽屉时由父页面同步清除 URL 中的版本查询参数。 */
const close = (): void => emit('update:modelValue', false);
@@ -5,7 +5,9 @@
* 逻辑:阻止通用字段误提交为 Line/LLM/数值字段,并避免页面泄露内部来源键。
*/
import { describe, expect, it } from 'vitest';
import { contextOptionLabelKey, fieldShapeForCategory } from './shippingOrderField.utils';
import {
contextOptionLabelKey, fieldShapeForCategory, reorderFieldConfigs, reorderFieldIds,
} from './shippingOrderField.utils';
describe('shipping order field category helpers', () => {
it('forces general context fields to deterministic header text', () => {
@@ -23,4 +25,24 @@ describe('shipping order field category helpers', () => {
expect(contextOptionLabelKey('mail_header', 'from_email')).toContain('mail_header_from_email');
expect(contextOptionLabelKey('json_path', 'selector')).toBeNull();
});
it('reorders fields only inside the selected category slots', () => {
const configs = [
{ field_id: 'context-1' }, { field_id: 'header-1' }, { field_id: 'header-2' }, { field_id: 'line-1' },
] as never[];
const reordered = reorderFieldConfigs(configs, ['header-1', 'header-2'], 'header-2', 'header-1');
expect(reordered.map((item) => item.field_id)).toEqual(['context-1', 'header-2', 'header-1', 'line-1']);
});
it('moves a field after the next row when dragging downward', () => {
expect(reorderFieldIds(['field-1', 'field-2', 'field-3'], 'field-1', 'field-2', 'after'))
.toEqual(['field-2', 'field-1', 'field-3']);
});
it('moves a field before the previous row when dragging upward', () => {
expect(reorderFieldIds(['field-1', 'field-2', 'field-3'], 'field-3', 'field-2', 'before'))
.toEqual(['field-1', 'field-3', 'field-2']);
});
});
@@ -4,9 +4,10 @@
* 依赖:shipping-order-schema.types。
* 逻辑:Schema 页面创建字段与展示来源时共享纯函数,避免模板分支产生不一致 payload。
*/
import type { ShippingOrderField } from '@/features/admin/types/shipping-order-schema.types';
import type { ShippingOrderField, ShippingOrderFieldConfig } from '@/features/admin/types/shipping-order-schema.types';
export type ShippingOrderFieldCategory = ShippingOrderField['field_category'];
export type FieldDropPosition = 'before' | 'after';
/** 将业务分类收敛为后端允许的 scope、collection_mode 和默认 value_type。 */
export const fieldShapeForCategory = (category: ShippingOrderFieldCategory): Pick<
@@ -26,3 +27,36 @@ export const contextOptionLabelKey = (providerKey: string, optionKey: string): s
'mail_header.from_domain': 'admin.shippingOrderSchema.contextOption.mail_header_from_domain',
}[key] || null;
};
/** 计算同分类字段的插入顺序;明确区分目标行前后,避免向下拖动相邻字段时顺序不变。 */
export const reorderFieldIds = (
fieldIds: string[],
draggedFieldId: string,
targetFieldId: string,
position: FieldDropPosition = 'before',
): string[] => {
if (draggedFieldId === targetFieldId || !fieldIds.includes(draggedFieldId)) return fieldIds;
const orderedIds = fieldIds.filter((fieldId) => fieldId !== draggedFieldId);
const targetIndex = orderedIds.indexOf(targetFieldId);
if (targetIndex < 0) return fieldIds;
orderedIds.splice(targetIndex + (position === 'after' ? 1 : 0), 0, draggedFieldId);
return orderedIds;
};
/** 按当前数组顺序移动同分类字段;后端保存时会将数组位置固化为 sequence。 */
export const reorderFieldConfigs = <T extends ShippingOrderFieldConfig>(
configs: T[],
fieldIdsInCategory: string[],
draggedFieldId: string,
targetFieldId: string,
position: FieldDropPosition = 'before',
): T[] => {
const orderedIds = reorderFieldIds(fieldIdsInCategory, draggedFieldId, targetFieldId, position);
if (orderedIds === fieldIdsInCategory) return configs;
const categorySet = new Set(fieldIdsInCategory);
const replacements = orderedIds.map((fieldId) => configs.find((item) => item.field_id === fieldId));
let replacementIndex = 0;
return configs.map((item) => (
categorySet.has(item.field_id) ? replacements[replacementIndex++] || item : item
));
};
@@ -128,7 +128,7 @@ export function useUsersAdmin() {
const loadAgents = async (): Promise<void> => {
try {
agents.value = await listAdminAgents();
agents.value = await listAdminAgents('applications');
} catch (e) {
console.error('Error loading agents:', e);
agents.value = [];
@@ -10,24 +10,26 @@ import { adminRoutes } from '@/app/router/routes/admin.routes';
import { SHIPPING_CONFIG_SUB_MODULE_METAS } from './constants/modules';
const shippingRoutes = adminRoutes[0].children?.filter((route) =>
route.name === 'AdminShippingInventory' || route.name === 'AdminShippingIdentityRules',
route.name === 'AdminShippingInventory' || route.name === 'AdminShippingIdentityRules' || route.name === 'AdminShippingOrderExtractionRuns',
) ?? [];
describe('shipping configuration navigation contract', () => {
it('registers inventory and identity rules as the only shipping configuration subpages', () => {
it('registers all shipping configuration subpages with discoverable deep links', () => {
// 关键断言:导航注册表与深链路由必须一一对应,避免后台入口不可发现。
expect(SHIPPING_CONFIG_SUB_MODULE_METAS).toEqual([
{ id: 'inventory', routeName: 'AdminShippingInventory', path: 'shipping-notice', labelKey: 'admin.nav.shippingInventory' },
{ id: 'identity_rules', routeName: 'AdminShippingIdentityRules', path: 'shipping-identity-rules', labelKey: 'admin.nav.shippingIdentityRules' },
{ id: 'order_extraction_runs', routeName: 'AdminShippingOrderExtractionRuns', path: 'shipping-order-extraction-runs', labelKey: 'admin.nav.shippingOrderExtractionRuns' },
]);
expect(shippingRoutes).toHaveLength(2);
expect(shippingRoutes).toHaveLength(3);
});
it('keeps both deep links behind the shared shipping inventory admin boundary', () => {
// 关键断言:菜单可见性不是授权;两个页面均须保留 requiresAdmin 和共享模块权限标识。
it('keeps all deep links behind the shared shipping inventory admin boundary', () => {
// 关键断言:菜单可见性不是授权;所有页面均须保留 requiresAdmin 和共享模块权限标识。
expect(shippingRoutes.map((route) => route.meta)).toEqual([
expect.objectContaining({ requiresAdmin: true, adminModule: 'shipping_inventory', adminSubModule: 'inventory' }),
expect.objectContaining({ requiresAdmin: true, adminModule: 'shipping_inventory', adminSubModule: 'identity_rules' }),
expect.objectContaining({ requiresAdmin: true, adminModule: 'shipping_inventory', adminSubModule: 'order_extraction_runs' }),
]);
});
});
@@ -21,7 +21,7 @@ export type AdminModuleId =
| 'reports';
/** 货代配置领域下可由侧栏展示和高亮的稳定子页面。 */
export type ShippingConfigSubModuleId = 'inventory' | 'identity_rules';
export type ShippingConfigSubModuleId = 'inventory' | 'identity_rules' | 'order_extraction_runs';
export type AdminReportTableId =
| 'usage_analysis'
@@ -34,6 +34,7 @@ export interface AgentRow {
conversation_mode?: AgentConversationMode;
dify_app_type?: 'chatflow' | 'workflow';
exposure_mode?: AgentExposureMode;
effective_role?: 'user_agent' | 'internal_executor';
api_base_url?: string;
iframe_url?: string;
welcome_message?: string | null;
@@ -104,6 +105,7 @@ export interface AgentFormState {
conversation_mode: AgentConversationMode;
dify_app_type: 'chatflow' | 'workflow';
exposure_mode: AgentExposureMode;
effective_role?: 'user_agent' | 'internal_executor';
api_base_url: string;
iframe_url: string;
welcome_message: string;
@@ -134,6 +136,14 @@ export interface AgentFormState {
order_extraction_provider_agent_id: number | null;
order_extraction_timeout_seconds: number;
order_extraction_max_attempts: number;
order_extraction_unit_concurrency: number;
order_extraction_unit_max_attempts: number;
order_extraction_unit_retry_backoff_ms: number;
order_extraction_max_model_units: number;
order_extraction_provider_max_concurrency: number;
order_extraction_circuit_failure_threshold: number;
order_extraction_circuit_cooldown_seconds: number;
order_extraction_auto_create_enabled: boolean;
}
export const createEmptyTrainingQuestionForm = (): AgentTrainingQuestionFormItem => ({
@@ -197,6 +207,14 @@ export const createEmptyAgentForm = (
order_extraction_provider_agent_id: null,
order_extraction_timeout_seconds: 900,
order_extraction_max_attempts: 3,
order_extraction_unit_concurrency: 2,
order_extraction_unit_max_attempts: 2,
order_extraction_unit_retry_backoff_ms: 500,
order_extraction_max_model_units: 20,
order_extraction_provider_max_concurrency: 4,
order_extraction_circuit_failure_threshold: 5,
order_extraction_circuit_cooldown_seconds: 60,
order_extraction_auto_create_enabled: false,
});
export interface AgentRuntimeBindingRow {
@@ -208,5 +226,13 @@ export interface AgentRuntimeBindingRow {
config: {
timeout_seconds?: number;
max_attempts?: number;
unit_concurrency?: number;
unit_max_attempts?: number;
unit_retry_backoff_ms?: number;
max_model_units?: number;
provider_max_concurrency?: number;
circuit_failure_threshold?: number;
circuit_cooldown_seconds?: number;
auto_create_enabled?: boolean;
};
}
@@ -11,6 +11,7 @@ export interface ShippingOrderField {
value_type: 'string' | 'decimal' | 'integer' | 'date' | 'boolean' | 'enum';
field_category: 'general_context' | 'order_header' | 'order_line';
collection_mode: 'deterministic_context' | 'llm_extraction';
display_sequence: number;
status: 'active' | 'retired';
published_once: boolean;
}
@@ -24,6 +24,7 @@ import type {
ShippingTaskSummary,
ShippingCustomerOption,
ShippingOrderExtractionRun,
ShippingOrderExtractionProgressEvent,
ShippingOrderExtractionRunCreateResponse,
ShippingTaskUiState,
} from '../types/shipping.api.types';
@@ -175,6 +176,26 @@ export const getWorkspaceShippingOrderExtractionRun = (runNo: string, signal?: A
{ signal },
);
/** 复用原附件与冻结快照,重新入队一次失败的订单抽取 Run。 */
export const retryWorkspaceShippingOrderExtractionRun = (runNo: string) =>
requestJson<ShippingOrderExtractionRunCreateResponse>(
`/api/workspace/shipping-notice/order-extraction-runs/${encodeURIComponent(runNo)}/retry`,
jsonPost(),
);
/** 用户展开状态卡时获取脱敏进度时间线;不返回节点或Workflow诊断数据。 */
export const listWorkspaceShippingOrderExtractionProgressEvents = (runNo: string) =>
requestJson<{ items: ShippingOrderExtractionProgressEvent[] }>(
`/api/workspace/shipping-notice/order-extraction-runs/${encodeURIComponent(runNo)}/progress-events`,
);
/** 在终态状态卡已投影到当前会话后确认已查看,避免只因预加载会话列表而消除提醒。 */
export const markWorkspaceShippingOrderExtractionRunSeen = (runNo: string) =>
requestJson<{ seen: boolean }>(
`/api/workspace/shipping-notice/order-extraction-runs/${encodeURIComponent(runNo)}/seen`,
jsonPost(),
);
/** 按会话恢复订单抽取 Run,刷新页面后不依赖聊天 SSE 历史。 */
export const listWorkspaceShippingOrderExtractionRuns = (
conversationId: string,
@@ -103,6 +103,15 @@ const userInitial = (fallback: string) => {
const name = String(props.currentUser?.username ?? '').trim();
return (name || fallback).charAt(0).toUpperCase();
};
/** 会话待查看采用点状提醒,颜色只表达业务处理优先级,不泄露订单或错误细节。 */
const orderExtractionAttentionClass = (item: DisplayHistoryItem) => {
switch (item.unseen_order_extraction_severity) {
case 'error': return 'bg-rose-500';
case 'warning': return 'bg-amber-500';
default: return 'bg-sky-500';
}
};
</script>
<template>
@@ -220,6 +229,13 @@ const userInitial = (fallback: string) => {
>
{{ item.title || $t('chat.newChat') }}
</button>
<span
v-if="item.unseen_order_extraction_count"
class="absolute right-8 h-2 w-2 rounded-full"
:class="orderExtractionAttentionClass(item)"
:title="$t('chat.shippingOrderExtractionUnread', { count: item.unseen_order_extraction_count })"
:aria-label="$t('chat.shippingOrderExtractionUnread', { count: item.unseen_order_extraction_count })"
/>
<button
v-if="!item.__runId"
type="button"
@@ -629,6 +629,9 @@ const handleSwitchBatch = (batchNo: string) => {
:task-no="activeTaskDetail.task_no"
:po-number="activeTaskDetail.po_number"
:lines="activeTaskDetail.lines"
:order-header="activeTaskDetail.order_header"
:order-header-fields="activeTaskDetail.order_header_fields"
:order-line-fields="activeTaskDetail.order_line_fields"
:parse-validation="activeTaskDetail.parse_validation || activeTaskDetail.step_payload?.parse_validation || null"
:process-field-gate="activeTaskDetail.process_field_gate || null"
:source-candidate="activeTaskDetail.source_candidate || null"
@@ -12,6 +12,7 @@ import ShippingTaskFieldConflictPanel from '@/features/chat/components/ShippingT
import type {
ShippingFieldConflict,
ShippingNoticeLine,
ShippingOrderDisplayField,
ShippingParseIssue,
ShippingParseValidation,
ShippingProcessFieldGate,
@@ -22,6 +23,9 @@ const props = defineProps<{
taskNo?: string | null;
poNumber?: string | null;
lines?: ShippingNoticeLine[] | null;
orderHeader?: Record<string, unknown> | null;
orderHeaderFields?: ShippingOrderDisplayField[] | null;
orderLineFields?: ShippingOrderDisplayField[] | null;
parseValidation?: ShippingParseValidation | null;
processFieldGate?: ShippingProcessFieldGate | null;
sourceCandidate?: ShippingSourceCandidateProjection | null;
@@ -48,6 +52,8 @@ watch(
);
const orderLines = computed(() => (props.lines || []).filter((line) => line && typeof line === 'object'));
const orderedHeaderFields = computed(() => [...(props.orderHeaderFields || [])].sort((a, b) => a.sequence - b.sequence));
const orderedLineFields = computed(() => [...(props.orderLineFields || [])].sort((a, b) => a.sequence - b.sequence));
const gateIssues = computed(() => {
const fromGate = Array.isArray(props.processFieldGate?.issues) ? props.processFieldGate?.issues : [];
@@ -142,6 +148,16 @@ function issueReasonLabel(reason?: string | null): string {
@refreshed="emit('refreshed')"
/>
<div v-if="orderedHeaderFields.length" class="rounded-xl border border-default bg-white/90 p-2.5">
<div class="mb-2 font-semibold text-slate-700">{{ t('chat.shippingParsedResult.orderInformation') }}</div>
<dl class="grid gap-2 sm:grid-cols-2">
<div v-for="field in orderedHeaderFields" :key="field.field_code" class="rounded-lg bg-slate-50 px-2.5 py-2">
<dt class="text-[10px] text-muted">{{ field.display_name }}</dt>
<dd class="mt-0.5 break-words text-xs text-slate-800">{{ displayValue(orderHeader?.[field.field_code]) }}</dd>
</div>
</dl>
</div>
<div v-if="missingFields.length" class="space-y-1">
<div class="font-semibold text-amber-800">{{ t('chat.shippingParsedResult.missingFields') }}</div>
<div class="flex flex-wrap gap-1">
@@ -182,12 +198,7 @@ function issueReasonLabel(reason?: string | null): string {
<thead class="bg-surface text-left text-[11px] text-muted">
<tr>
<th class="px-2.5 py-2">#</th>
<th class="px-2.5 py-2">{{ t('chat.shippingNoticeUi.partNumber') }}</th>
<th class="px-2.5 py-2">{{ t('chat.shippingNoticeUi.customerPartNumber') }}</th>
<th class="px-2.5 py-2">{{ t('chat.shippingNoticeUi.awsPartNumber') }}</th>
<th class="px-2.5 py-2">{{ t('chat.shippingNoticeUi.qty') }}</th>
<th class="px-2.5 py-2">{{ t('chat.shippingNoticeUi.reservationId') }}</th>
<th class="px-2.5 py-2">{{ t('chat.shippingNoticeUi.inventorySourceHint') }}</th>
<th v-for="field in orderedLineFields" :key="field.field_code" class="px-2.5 py-2">{{ field.display_name }}</th>
</tr>
</thead>
<tbody>
@@ -197,12 +208,7 @@ function issueReasonLabel(reason?: string | null): string {
class="border-t border-default/60 text-xs"
>
<td class="px-2.5 py-2 text-muted">{{ index + 1 }}</td>
<td class="px-2.5 py-2 font-mono">{{ displayValue(line.part_number) }}</td>
<td class="px-2.5 py-2 font-mono">{{ displayValue(line.customer_part_number) }}</td>
<td class="px-2.5 py-2 font-mono">{{ displayValue(line.aws_part_number) }}</td>
<td class="px-2.5 py-2">{{ displayValue(line.qty) }}</td>
<td class="px-2.5 py-2 font-mono">{{ displayValue(line.reservation_id) }}</td>
<td class="px-2.5 py-2">{{ displayValue(line.inventory_source_hint) }}</td>
<td v-for="field in orderedLineFields" :key="field.field_code" class="px-2.5 py-2" :class="{ 'font-mono': field.value_type === 'string' }">{{ displayValue((line as unknown as Record<string, unknown>)[field.field_code]) }}</td>
</tr>
</tbody>
</table>
@@ -5,7 +5,7 @@
* 逻辑:由 ChatMessageList 按消息逐条挂载;用户附件与文字共用同一气泡,助手正文与特殊交互委托页面 handlers。
*/
<script setup lang="ts">
import { computed, nextTick, ref, watch } from 'vue';
import { computed, nextTick, onBeforeUnmount, ref, watch } from 'vue';
import {
Check,
CircleCheck,
@@ -36,6 +36,8 @@ import type { ChatMessage, InlineDownloadFile, SourceFileLink } from '../../type
import type { ShippingMatchResultPayload } from '../../types/shipping.types';
import type { MaintenanceDevice } from '@/features/maintenance/types/ledger.types';
import type { MaintenanceRecord } from '@/features/maintenance/types/record.types';
import { listWorkspaceShippingOrderExtractionProgressEvents } from '../../api/shipping.api';
import type { ShippingOrderExtractionProgressEvent } from '../../types/shipping.api.types';
export interface ChatMessageBubbleHandlers {
renderMarkdown: (text: string) => string;
@@ -136,6 +138,30 @@ const showShippingActionsPanel = computed(() =>
&& message.type !== 'shipping-match-result',
);
const shippingOrderExtractionState = computed(() => message.shipping_order_extraction_state);
const retryingOrderExtraction = ref(false);
const showOrderExtractionDetails = ref(false);
const orderExtractionEvents = ref<ShippingOrderExtractionProgressEvent[]>([]);
const loadingOrderExtractionEvents = ref(false);
const orderExtractionEventsError = ref(false);
const orderExtractionClock = ref(Date.now());
let orderExtractionClockTimer: ReturnType<typeof setInterval> | null = null;
const shippingOrderExtractionRunNo = computed(() => {
const payload = message.payload && typeof message.payload === 'object'
? message.payload as Record<string, unknown>
: {};
return String(payload.order_extraction_run_no || '').trim();
});
/** 失败卡片复用原 Run 重试;按钮本地防重,成功后状态卡由 Run 轮询原位更新。 */
const retryShippingOrderExtraction = async () => {
if (!shippingOrderExtractionRunNo.value || retryingOrderExtraction.value) return;
retryingOrderExtraction.value = true;
try {
await shippingHandlers.retryOrderExtractionRun(shippingOrderExtractionRunNo.value);
} finally {
retryingOrderExtraction.value = false;
}
};
const shippingOrderExtractionTitleKey = computed(() => {
switch (shippingOrderExtractionState.value?.status) {
case 'completed': return 'chat.shippingOrderExtractionCompleted';
@@ -144,6 +170,75 @@ const shippingOrderExtractionTitleKey = computed(() => {
default: return 'chat.shippingOrderExtractionProcessing';
}
});
const shippingOrderExtractionFailureHintKey = computed(() => (
shippingOrderExtractionState.value?.status === 'failed'
? 'chat.shippingOrderExtractionFailureHint'
: ''
));
const shippingOrderExtractionStageKey = computed(() => {
const code = String(shippingOrderExtractionState.value?.current_stage_code || '').trim();
const known = new Set(['queued', 'workflow_accepted', 'document_processing', 'order_recognition', 'result_processing', 'provider_result_ready', 'hxops_persistence', 'auto_recovering', 'generic_processing']);
return known.has(code) ? `chat.shippingOrderExtractionStage.${code}` : 'chat.shippingOrderExtractionProcessing';
});
const orderExtractionElapsedSeconds = computed(() => {
const raw = shippingOrderExtractionState.value?.started_at;
const started = raw ? Date.parse(raw) : NaN;
if (!Number.isFinite(started)) return null;
return Math.max(0, Math.floor((orderExtractionClock.value - started) / 1000));
});
/**
* 识别运行时刷新纯展示时钟,避免网络轮询间隔或无状态变化时运行时长停滞。
* 仅在当前消息处于识别中时启动;后台 Run 的真实健康状态仍完全由服务端计算。
*/
watch(
() => shippingOrderExtractionState.value?.status,
(status) => {
if (orderExtractionClockTimer) {
clearInterval(orderExtractionClockTimer);
orderExtractionClockTimer = null;
}
if (status === 'extracting') {
orderExtractionClock.value = Date.now();
orderExtractionClockTimer = setInterval(() => {
orderExtractionClock.value = Date.now();
}, 1000);
}
},
{ immediate: true },
);
onBeforeUnmount(() => {
if (orderExtractionClockTimer) clearInterval(orderExtractionClockTimer);
});
const toggleOrderExtractionDetails = async () => {
if (!shippingOrderExtractionRunNo.value) return;
showOrderExtractionDetails.value = !showOrderExtractionDetails.value;
if (!showOrderExtractionDetails.value || orderExtractionEvents.value.length || loadingOrderExtractionEvents.value) return;
loadingOrderExtractionEvents.value = true;
orderExtractionEventsError.value = false;
try {
const { items } = await listWorkspaceShippingOrderExtractionProgressEvents(shippingOrderExtractionRunNo.value);
orderExtractionEvents.value = items;
} catch {
// 详情加载失败不影响 Run 短轮询或后台订单识别,只给出可理解的局部提示。
orderExtractionEventsError.value = true;
} finally {
loadingOrderExtractionEvents.value = false;
}
};
/** 将服务端脱敏事件时间格式化为用户本地时间;无效值不伪造时间。 */
const formatOrderExtractionEventTime = (value: string): string => {
const timestamp = Date.parse(value);
return Number.isFinite(timestamp) ? new Date(timestamp).toLocaleTimeString() : '';
};
/** 把固定的阶段生命周期状态映射为本地化文案键,未知值使用中性兜底。 */
const shippingOrderExtractionEventStatusKey = (status: string): string => {
const known = new Set(['started', 'running', 'completed', 'failed', 'recovered']);
return known.has(status) ? `chat.shippingOrderExtractionEventStatus.${status}` : 'chat.shippingOrderExtractionEventStatus.updated';
};
const showShippingOrderExtractionMessage = computed(() => {
const stateMessage = String(shippingOrderExtractionState.value?.message || '').trim();
const assistantContent = String(message.content || '').trim();
@@ -696,6 +791,20 @@ function handleInlineDownload(file: InlineDownloadFile): void {
<CircleX v-else class="mt-0.5 h-5 w-5 shrink-0" />
<div class="min-w-0 flex-1">
<div class="text-sm font-semibold">{{ $t(shippingOrderExtractionTitleKey) }}</div>
<template v-if="shippingOrderExtractionState.status === 'extracting'">
<div class="mt-1 text-xs opacity-80">{{ $t(shippingOrderExtractionStageKey) }}</div>
<div class="mt-1 flex flex-wrap gap-x-2 text-xs opacity-70">
<span v-if="orderExtractionElapsedSeconds !== null">
{{ $t('chat.shippingOrderExtractionElapsed', { seconds: orderExtractionElapsedSeconds }) }}
</span>
<span v-if="shippingOrderExtractionState.health === 'slow'">
{{ $t('chat.shippingOrderExtractionSlow') }}
</span>
<span v-else-if="shippingOrderExtractionState.health === 'idle'">
{{ $t('chat.shippingOrderExtractionIdle') }}
</span>
</div>
</template>
<div
data-testid="shipping-order-extraction-progress"
class="mt-2 h-1.5 w-full overflow-hidden rounded-full bg-black/10 dark:bg-white/15"
@@ -740,9 +849,42 @@ function handleInlineDownload(file: InlineDownloadFile): void {
{{ $t('chat.shippingOrderExtractionMissingFieldsCount', { count: shippingOrderExtractionState.created_with_missing_fields_count }) }}
</span>
</div>
<div v-if="showShippingOrderExtractionMessage" class="mt-1 break-words text-xs opacity-80">
<div v-if="shippingOrderExtractionFailureHintKey" class="mt-1 break-words text-xs opacity-80">
{{ $t(shippingOrderExtractionFailureHintKey) }}
</div>
<div v-else-if="showShippingOrderExtractionMessage" class="mt-1 break-words text-xs opacity-80">
{{ shippingOrderExtractionState.message }}
</div>
<button
v-if="shippingOrderExtractionRunNo"
type="button"
class="mt-2 text-xs font-medium underline underline-offset-2 opacity-80 hover:opacity-100"
@click="toggleOrderExtractionDetails"
>
{{ $t(showOrderExtractionDetails ? 'chat.shippingOrderExtractionHideDetails' : 'chat.shippingOrderExtractionShowDetails') }}
</button>
<div v-if="showOrderExtractionDetails" class="mt-2 space-y-1 border-t border-current/15 pt-2 text-xs opacity-85">
<div v-if="loadingOrderExtractionEvents">{{ $t('chat.shippingOrderExtractionLoadingDetails') }}</div>
<div v-else-if="orderExtractionEventsError">{{ $t('chat.shippingOrderExtractionDetailsUnavailable') }}</div>
<div v-else-if="orderExtractionEvents.length === 0">{{ $t('chat.shippingOrderExtractionNoDetails') }}</div>
<div v-for="event in orderExtractionEvents" :key="`${event.stage_code}:${event.occurred_at}`">
<span>{{ $t(`chat.shippingOrderExtractionStage.${event.stage_code}`) }}</span>
<span class="ml-1 opacity-75">{{ $t(shippingOrderExtractionEventStatusKey(event.status)) }}</span>
<time v-if="formatOrderExtractionEventTime(event.occurred_at)" class="ml-1 opacity-65">
{{ formatOrderExtractionEventTime(event.occurred_at) }}
</time>
</div>
</div>
<button
v-if="shippingOrderExtractionState.status === 'failed' && shippingOrderExtractionRunNo"
type="button"
class="mt-3 inline-flex items-center gap-1.5 rounded-md border border-rose-300 bg-white/75 px-3 py-1.5 text-xs font-medium text-rose-700 transition hover:bg-white disabled:cursor-not-allowed disabled:opacity-60 dark:border-rose-700 dark:bg-rose-950/40 dark:text-rose-200"
:disabled="retryingOrderExtraction"
@click="retryShippingOrderExtraction"
>
<RotateCw class="h-3.5 w-3.5" :class="{ 'animate-spin': retryingOrderExtraction }" />
{{ $t(retryingOrderExtraction ? 'chat.shippingOrderExtractionRetrying' : 'chat.shippingOrderExtractionRetry') }}
</button>
</div>
</div>
<LeaveMessageBlock
@@ -15,4 +15,5 @@ export interface ShippingMessageHandlers {
updateLine: (msg: ChatMessage, lineIndex: number, patch: Partial<ShippingNoticeLine>) => Promise<boolean>;
addLine: (msg: ChatMessage, line: Partial<ShippingNoticeLine>) => Promise<boolean>;
removeLine: (msg: ChatMessage, lineIndex: number) => Promise<boolean>;
retryOrderExtractionRun: (runNo: string) => Promise<boolean>;
}
@@ -881,6 +881,7 @@ export function useChatShipping(options: UseChatShippingOptions) {
query: { ...route.query, conversation_id: resolvedConversationId },
});
},
onRetryError: (message) => msg.error(message),
t,
});
@@ -1470,6 +1471,7 @@ export function useChatShipping(options: UseChatShippingOptions) {
handleShippingLocalFilesSelected,
removeShippingNoticeAttachment: shippingIntakes.removeNoticeAttachment,
retryShippingNoticeAttachment: shippingIntakes.retryNoticeAttachment,
retryOrderExtractionRun: shippingOrderExtractionRuns.retryRun,
shippingNoticeAllReadyForConfirmation: shippingIntakes.allReadyForConfirmation,
setShippingCandidateSelected,
updateShippingCandidateSummary,
@@ -35,6 +35,7 @@ type ShippingHandlerSource = Pick<
| 'updateShippingParseReviewLine'
| 'addShippingParseReviewLine'
| 'removeShippingParseReviewLine'
| 'retryOrderExtractionRun'
>;
type TrainingHandlerSource = ReturnType<typeof useTrainingWorkspace>;
@@ -68,6 +69,7 @@ export function createShippingMessageHandlers(shipping: ShippingHandlerSource):
updateLine: shipping.updateShippingParseReviewLine,
addLine: shipping.addShippingParseReviewLine,
removeLine: shipping.removeShippingParseReviewLine,
retryOrderExtractionRun: shipping.retryOrderExtractionRun,
};
}
@@ -580,6 +580,9 @@ export function useChatPageToolRun(ctx: ChatPageToolRunContext) {
if (msg?.role !== 'assistant') return false;
// 订单抽取 Run 有专用状态卡,不能再叠加通用工具进度卡。
if (msg.shipping_order_extraction_state) return false;
if (!toolRunProgressConfig.value) return false;
if (assistantMessageHasError(msg)) return false;
@@ -14,12 +14,16 @@ const api = vi.hoisted(() => ({
createRun: vi.fn(),
getRun: vi.fn(),
listRuns: vi.fn(),
markSeen: vi.fn(),
retryRun: vi.fn(),
}));
vi.mock('../api/shipping.api', () => ({
createWorkspaceShippingOrderExtractionRun: api.createRun,
getWorkspaceShippingOrderExtractionRun: api.getRun,
listWorkspaceShippingOrderExtractionRuns: api.listRuns,
markWorkspaceShippingOrderExtractionRunSeen: api.markSeen,
retryWorkspaceShippingOrderExtractionRun: api.retryRun,
}));
const run = (patch: Partial<ShippingOrderExtractionRun>): ShippingOrderExtractionRun => ({
@@ -50,6 +54,7 @@ const createHarness = () => {
refreshShippingActions: vi.fn(async () => undefined),
loadHistory: vi.fn(async () => undefined),
onConversationResolved: vi.fn(async () => undefined),
onRetryError: vi.fn(),
t: (key: string) => key,
};
return { messages, conversationId, options, runs: useShippingOrderExtractionRuns(options) };
@@ -127,16 +132,110 @@ describe('useShippingOrderExtractionRuns lifecycle', () => {
expect(harness.messages.value[1]?.shipping_order_extraction_state?.status).toBe('extracting');
harness.runs.stopPolling();
});
it('retries a failed Run in place and resumes polling without creating a new user message', async () => {
const failed = run({ run_no: 'SNER-RETRY', status: 'failed', phase: 'failed', error: { message: 'bad workflow' } });
const queued = run({ run_no: 'SNER-RETRY', status: 'queued', phase: 'manual_retry_queued', error: null });
api.listRuns.mockResolvedValue({ items: [failed] });
api.retryRun.mockResolvedValue({ run: queued, reused: false });
api.getRun.mockResolvedValue(queued);
const harness = createHarness();
harness.conversationId.value = 'conv-1';
await harness.runs.restoreForConversation('conv-1');
await expect(harness.runs.retryRun('SNER-RETRY')).resolves.toBe(true);
expect(api.retryRun).toHaveBeenCalledWith('SNER-RETRY');
expect(harness.options.refreshNoticeIntakeStatuses).toHaveBeenCalledTimes(1);
expect(harness.messages.value).toHaveLength(1);
expect(harness.messages.value[0]?.shipping_order_extraction_state?.status).toBe('extracting');
expect(harness.runs.getActiveRunNo()).toBe('SNER-RETRY');
harness.runs.stopPolling();
});
it('reports a retry API error and leaves the failed state available for another retry', async () => {
api.retryRun.mockRejectedValue(new Error('retry unavailable'));
const harness = createHarness();
await expect(harness.runs.retryRun('SNER-FAILED')).resolves.toBe(false);
expect(harness.options.onRetryError).toHaveBeenCalledWith('retry unavailable');
expect(harness.runs.getActiveRunNo()).toBe('');
});
});
describe('mapOrderExtractionRunToMessageState', () => {
it('maps queued/running to indeterminate extracting state', () => {
expect(mapOrderExtractionRunToMessageState(run({ status: 'running', phase: 'calling_provider' }))).toMatchObject({
expect(mapOrderExtractionRunToMessageState(run({
status: 'running',
phase: 'calling_provider',
progress: {
version: 3,
current_stage_code: 'document_processing',
health: 'normal',
last_activity_at: '2026-07-21T03:24:51Z',
},
}))).toMatchObject({
status: 'extracting', terminal: false, phase: 'llm_extraction',
current_stage_code: 'document_processing', health: 'normal',
last_activity_at: '2026-07-21T03:24:51Z',
});
});
it('persists a changed progress projection even when Run status and result are unchanged', async () => {
vi.useFakeTimers();
const first = run({
run_no: 'SNER-PROGRESS',
status: 'running',
progress: { version: 1, current_stage_code: 'workflow_accepted' },
});
const second = run({
run_no: 'SNER-PROGRESS',
status: 'running',
progress: { version: 2, current_stage_code: 'order_recognition' },
});
api.listRuns.mockResolvedValue({ items: [first] });
api.getRun.mockResolvedValueOnce(second);
const harness = createHarness();
harness.conversationId.value = 'conv-1';
await harness.runs.restoreForConversation('conv-1');
expect(harness.options.saveLocalMessageToBackend).toHaveBeenCalledTimes(1);
await vi.advanceTimersByTimeAsync(1000);
expect(harness.options.saveLocalMessageToBackend).toHaveBeenCalledTimes(2);
expect(harness.messages.value[0]?.shipping_order_extraction_state?.current_stage_code).toBe('order_recognition');
harness.runs.stopPolling();
vi.useRealTimers();
});
it('merges duplicate local cards for one Run when a terminal update arrives', async () => {
vi.useFakeTimers();
const active = run({ run_no: 'SNER-DUPLICATE', status: 'running' });
const failed = run({
run_no: 'SNER-DUPLICATE', status: 'failed', phase: 'failed', error: { message: 'provider unavailable' },
});
api.listRuns.mockResolvedValue({ items: [active] });
api.getRun.mockResolvedValue(failed);
const harness = createHarness();
harness.conversationId.value = 'conv-1';
harness.messages.value.push({
role: 'assistant', type: 'text', content: '', local_id: 'legacy-duplicate', local_only: true,
shipping_order_extraction_state: mapOrderExtractionRunToMessageState(active),
payload: { formId: 'legacy-state-card', order_extraction_run_no: 'SNER-DUPLICATE' },
});
await harness.runs.restoreForConversation('conv-1');
await vi.advanceTimersByTimeAsync(1000);
const cards = harness.messages.value.filter((item) => item.shipping_order_extraction_state);
expect(cards).toHaveLength(1);
expect(cards[0]?.shipping_order_extraction_state?.status).toBe('failed');
harness.runs.stopPolling();
vi.useRealTimers();
});
it('maps completed result counters without guessing from text', () => {
expect(mapOrderExtractionRunToMessageState(run({
status: 'completed',
@@ -152,6 +251,19 @@ describe('mapOrderExtractionRunToMessageState', () => {
}))).toMatchObject({ status: 'partially_completed', pending_count: 3, terminal: true });
expect(mapOrderExtractionRunToMessageState(run({
status: 'failed', error: { code: 'X', message: 'provider failed' },
}))).toMatchObject({ status: 'failed', message: 'provider failed', terminal: true });
}))).toMatchObject({ status: 'failed', message: '', terminal: true });
});
it('acknowledges a terminal Run only after it is restored into the active conversation', async () => {
const terminal = run({ run_no: 'SNER-SEEN', status: 'completed' });
api.listRuns.mockResolvedValue({ items: [terminal] });
api.markSeen.mockResolvedValue({ seen: true });
const harness = createHarness();
harness.conversationId.value = 'conv-1';
await harness.runs.restoreForConversation('conv-1');
expect(api.markSeen).toHaveBeenCalledWith('SNER-SEEN');
expect(harness.options.loadHistory).toHaveBeenCalledTimes(1);
});
});
@@ -9,6 +9,8 @@ import {
createWorkspaceShippingOrderExtractionRun,
getWorkspaceShippingOrderExtractionRun,
listWorkspaceShippingOrderExtractionRuns,
markWorkspaceShippingOrderExtractionRunSeen,
retryWorkspaceShippingOrderExtractionRun,
} from '../api/shipping.api';
import type { ChatMessage, ChatMessageAttachment, ShippingOrderExtractionState } from '../types/chat.types';
import type { ShippingOrderExtractionRun } from '../types/shipping.api.types';
@@ -25,6 +27,7 @@ interface UseShippingOrderExtractionRunsOptions {
refreshShippingActions: () => Promise<void>;
loadHistory: () => Promise<void>;
onConversationResolved: (conversationId: string) => Promise<void> | void;
onRetryError: (message: string) => void;
t: (key: string, params?: Record<string, unknown>) => string;
}
@@ -39,7 +42,8 @@ export function mapOrderExtractionRunToMessageState(run: ShippingOrderExtraction
return {
status: failed ? 'failed' : partial ? 'partially_completed' : completed ? 'completed' : 'extracting',
phase: failed ? 'failed' : run.status === 'result_persisted' ? 'result_persisted' : 'llm_extraction',
message: failed ? String(run.error?.message || '') : '',
// Provider/网络错误正文仅供管理员诊断,用户卡片统一展示可操作的业务提示。
message: '',
created_count: Number(result.created_count || 0),
opened_existing_count: Number(result.opened_existing_count || 0),
pending_count: Number(result.pending_count || 0),
@@ -47,6 +51,10 @@ export function mapOrderExtractionRunToMessageState(run: ShippingOrderExtraction
created_with_missing_fields_count: Number(result.created_with_missing_fields_count || 0),
batch_no: result.batch_no || null,
terminal: failed || partial || completed,
current_stage_code: run.progress?.current_stage_code || null,
health: run.progress?.health || 'normal',
last_activity_at: run.progress?.last_activity_at || null,
started_at: run.started_at || run.created_at || null,
};
}
@@ -77,10 +85,19 @@ export function useShippingOrderExtractionRuns(options: UseShippingOrderExtracti
const upsertRunMessage = async (run: ShippingOrderExtractionRun): Promise<ChatMessage> => {
const formId = `shipping-order-extraction-run:${run.run_no}`;
const state = mapOrderExtractionRunToMessageState(run);
let message = options.messages.value.find((item) => {
const stateCards = options.messages.value.filter((item) => {
if (item.role !== 'assistant') return false;
const payload = item.payload && typeof item.payload === 'object' ? item.payload as Record<string, unknown> : {};
return payload.formId === formId || payload.order_extraction_run_no === run.run_no;
});
let message = stateCards.find((item) => {
const payload = item.payload && typeof item.payload === 'object' ? item.payload as Record<string, unknown> : {};
return payload.formId === formId;
});
}) || stateCards[0];
if (stateCards.length > 1) {
// 网络恢复或历史合并可能重复注入同一 Run 的旧卡;Run 编号是唯一业务锚点,只保留一张原位更新。
options.messages.value = options.messages.value.filter((item) => item === message || !stateCards.includes(item));
}
if (!message) {
message = {
role: 'assistant',
@@ -97,7 +114,7 @@ export function useShippingOrderExtractionRuns(options: UseShippingOrderExtracti
order_extraction_run_no: run.run_no,
shipping_order_extraction_state: state,
};
const signature = JSON.stringify({ status: run.status, phase: run.phase, result: run.result, error: run.error });
const signature = JSON.stringify({ status: run.status, phase: run.phase, result: run.result, error: run.error, progress: run.progress });
if (persistedSignatures.get(run.run_no) !== signature) {
const persisted = await options.saveLocalMessageToBackend(message);
if (persisted) persistedSignatures.set(run.run_no, signature);
@@ -105,6 +122,25 @@ export function useShippingOrderExtractionRuns(options: UseShippingOrderExtracti
return message;
};
/**
* 终态卡已投影到当前会话后才确认已查看,避免侧栏或历史预加载错误清除提醒。
* 确认失败不影响状态卡、轮询或业务 Run,下一次进入会话会继续尝试。
*/
const acknowledgeTerminalRunWhenVisible = async (run: ShippingOrderExtractionRun): Promise<void> => {
if (ACTIVE_RUN_STATUSES.has(run.status) || run.conversation_id !== options.conversationId.value) return;
const stateCardVisible = options.messages.value.some((item) => {
const payload = item.payload && typeof item.payload === 'object' ? item.payload as Record<string, unknown> : {};
return payload.order_extraction_run_no === run.run_no && item.shipping_order_extraction_state?.terminal;
});
if (!stateCardVisible) return;
try {
await markWorkspaceShippingOrderExtractionRunSeen(run.run_no);
await options.loadHistory();
} catch {
// 待查看状态仍由服务端保留,后续成功加载同一终态卡时再次确认。
}
};
/**
* Run 终态后容错刷新领域事实;单个视图失败不得阻断其他事实和聊天历史恢复。
* @returns 所有可独立执行的刷新均已尝试完成。
@@ -152,6 +188,7 @@ export function useShippingOrderExtractionRuns(options: UseShippingOrderExtracti
if (generation !== pollGeneration || activeRunNo !== runNo) return;
pollFailureCount = 0;
await upsertRunMessage(run);
await acknowledgeTerminalRunWhenVisible(run);
if (generation !== pollGeneration || activeRunNo !== runNo) return;
if (!ACTIVE_RUN_STATUSES.has(run.status)) {
stopPolling();
@@ -211,6 +248,7 @@ export function useShippingOrderExtractionRuns(options: UseShippingOrderExtracti
options.messages.value.push(userMessage);
await options.saveLocalMessageToBackend(userMessage, query);
await upsertRunMessage(run);
await acknowledgeTerminalRunWhenVisible(run);
await options.onConversationResolved(run.conversation_id);
if (ACTIVE_RUN_STATUSES.has(run.status)) {
beginPolling(run.run_no, 1000);
@@ -220,6 +258,26 @@ export function useShippingOrderExtractionRuns(options: UseShippingOrderExtracti
return true;
};
/** 复用原 Run 的冻结附件重新识别,并恢复同一状态卡的轮询。 */
const retryRun = async (runNo: string): Promise<boolean> => {
const normalizedRunNo = String(runNo || '').trim();
if (!normalizedRunNo) return false;
try {
stopPolling();
const response = await retryWorkspaceShippingOrderExtractionRun(normalizedRunNo);
await upsertRunMessage(response.run);
await acknowledgeTerminalRunWhenVisible(response.run);
await Promise.allSettled([options.refreshNoticeIntakeStatuses()]);
if (ACTIVE_RUN_STATUSES.has(response.run.status)) {
beginPolling(response.run.run_no, 1000);
}
return true;
} catch (error) {
options.onRetryError(error instanceof Error ? error.message : options.t('chat.shippingOrderExtractionRetryFailed'));
return false;
}
};
/** 刷新或进入既有会话时恢复最新 Run;活动 Run 继续轮询,终态只恢复状态卡。 */
const restoreForConversation = async (conversationId: string): Promise<void> => {
stopPolling();
@@ -231,6 +289,7 @@ export function useShippingOrderExtractionRuns(options: UseShippingOrderExtracti
const latest = items[0];
if (!latest) return;
await upsertRunMessage(latest);
await acknowledgeTerminalRunWhenVisible(latest);
if (options.conversationId.value !== conversationId) return;
if (ACTIVE_RUN_STATUSES.has(latest.status)) {
beginPolling(latest.run_no, 1000);
@@ -241,5 +300,5 @@ export function useShippingOrderExtractionRuns(options: UseShippingOrderExtracti
};
onBeforeUnmount(stopPolling);
return { startRun, restoreForConversation, stopPolling, getActiveRunNo: () => activeRunNo };
return { startRun, retryRun, restoreForConversation, stopPolling, getActiveRunNo: () => activeRunNo };
}
@@ -31,6 +31,10 @@ export interface ShippingOrderExtractionState {
created_with_missing_fields_count: number;
batch_no?: string | null;
terminal: boolean;
current_stage_code?: string | null;
health?: string;
last_activity_at?: string | null;
started_at?: string | null;
}
/**
@@ -123,6 +127,8 @@ export interface ChatSessionItem {
conversation_id: string;
title: string;
created_at: string;
unseen_order_extraction_count?: number;
unseen_order_extraction_severity?: 'info' | 'warning' | 'error' | null;
}
export type DisplayHistoryItem = ChatSessionItem & { __runId?: number; __status?: string };
@@ -249,6 +249,14 @@ export interface ShippingFieldAdjudication {
conflicts?: Array<Record<string, unknown>>;
}
export interface ShippingOrderDisplayField {
field_code: string;
display_name: string;
scope: 'header' | 'line' | string;
value_type: string;
sequence: number;
}
/** 工作台任务列表的数据库分页响应;items 仅包含当前页。 */
export interface ShippingTaskPage {
items: ShippingTaskSummary[];
@@ -338,6 +346,9 @@ export interface ShippingTaskDetail extends ShippingTaskSummary {
export_version?: number | null;
idempotency_key?: string | null;
lines: ShippingNoticeLine[];
order_header?: Record<string, unknown>;
order_header_fields?: ShippingOrderDisplayField[];
order_line_fields?: ShippingOrderDisplayField[];
shortage?: ShippingShortageSummary | null;
line_results?: ShippingMatchLineResult[];
parse_confidence?: number | null;
@@ -560,6 +571,15 @@ export interface ShippingOrderExtractionRun {
schema_version?: number | null;
schema_checksum?: string | null;
attempt_count: number;
progress?: {
version: number;
current_stage_code?: string | null;
active_stage_codes?: string[];
completed_stage_codes?: string[];
message_code?: string | null;
health?: string;
last_activity_at?: string | null;
} | null;
result?: {
batch_no?: string | null;
created_count?: number;
@@ -575,6 +595,12 @@ export interface ShippingOrderExtractionRun {
finished_at?: string | null;
}
export interface ShippingOrderExtractionProgressEvent {
stage_code: string;
status: string;
occurred_at: string;
}
export interface ShippingOrderExtractionRunCreateResponse {
run: ShippingOrderExtractionRun;
reused: boolean;
@@ -112,7 +112,7 @@ const submitSite = (): void => {
<div v-else class="grid grid-cols-1 md:grid-cols-3 gap-3">
<select v-model="form.target_type" class="input-field text-sm"><option value="customer">{{ t('admin.shippingCustomers.identifiers.targets.customer') }}</option><option value="site">{{ t('admin.shippingCustomers.identifiers.targets.site') }}</option></select>
<select v-if="form.target_type === 'site'" v-model.number="form.target_id" class="input-field text-sm"><option :value="undefined">{{ t('admin.shippingCustomers.identifiers.selectSite') }}</option><option v-for="site in customer.sites || []" :key="site.id" :value="site.id">{{ site.site_name }} · {{ site.site_code }}</option></select><div v-else class="input-field text-sm bg-surface-soft">{{ customer.standard_name }}</div>
<select v-model="form.definition_id" class="input-field text-sm"><option value="">{{ t('admin.shippingCustomers.identifiers.selectDefinition') }}</option><option v-for="definition in currentDefinitions" :key="definition.id" :value="definition.id">{{ definition.display_name }}</option></select>
<select v-model="form.definition_id" class="input-field text-sm"><option value="">{{ t('admin.shippingCustomers.identifiers.selectDefinition') }}</option><option v-for="definition in currentDefinitions" :key="definition.id" :value="definition.id">{{ definition.display_name }} · {{ definition.context_field?.display_name || definition.context_field?.field_code || '-' }}</option></select>
<input v-model="form.raw_value" class="input-field text-sm md:col-span-2" :placeholder="t('admin.shippingCustomers.identifiers.valuePlaceholder')">
<select v-model="form.status" class="input-field text-sm"><option value="pending">{{ t('admin.shippingCustomers.identifierStatus.pending') }}</option><option value="approved">{{ t('admin.shippingCustomers.identifierStatus.approved') }}</option></select>
<label class="flex items-center gap-2 text-sm text-secondary"><input v-model="form.auto_match_allowed" type="checkbox" :disabled="form.status !== 'approved' || selectedDefinition?.max_automation !== 'conditional'">{{ t('admin.shippingCustomers.identifiers.allowAuto') }}</label>
+31 -4
View File
@@ -30,10 +30,18 @@
"shippingCustomers": "Shipping Customers",
"shippingConfig": "Shipping Configuration",
"shippingInventory": "Inventory Configuration",
"shippingIdentityRules": "Customer Identity Rules"
"shippingIdentityRules": "Customer Identity Rules",
"shippingOrderExtractionRuns": "Order Recognition Runs"
,
"platformApps": "Platform Apps"
},
"shippingOrderExtractionRuns": {
"eyebrow": "READ-ONLY RUN DIAGNOSTICS",
"title": "Order Recognition Runs",
"subtitle": "Inspect asynchronous order-recognition runs, job attempts, and redacted node lifecycles. Order content, prompts, inputs, outputs, and stack traces are never shown.",
"refresh": "Refresh", "status": "Status", "allStatuses": "All statuses", "total": "{count} total", "runNo": "Run no.", "stage": "Current stage", "attempts": "Attempts", "createdAt": "Created", "totalDuration": "Total duration", "viewDetail": "View details", "previous": "Previous", "next": "Next", "loading": "Loading...", "empty": "No runs found", "loadFailed": "Failed to load order recognition runs", "detailFailed": "Failed to load run details", "detailTitle": "Run diagnostics", "workflowRunId": "Workflow Run ID", "errorCode": "Error code", "jobAttempts": "Job attempts", "units": "Document unit diagnostics", "lifecycle": "Redacted node lifecycle",
"statuses": { "queued": "Queued", "running": "Running", "result_persisted": "Result persisted", "completed": "Completed", "needs_review": "Needs user action", "failed": "Failed", "cancelled": "Cancelled" }
},
"shippingOrderSchema": {
"eyebrow": "Order field template",
"title": "Order Template Configuration",
@@ -116,6 +124,12 @@
"searchFields": "Search display name or field code",
"fieldCount": "{count} fields",
"selectedInGroup": "Selected",
"dragToReorder": "Drag to change the global field catalog order.",
"dragGuide": "Drag the handle on the left to reorder fields within the same category.",
"globalOrderGuide": "Drag the handle to change the global order. No draft or published version is required, and the order persists after refresh.",
"orderSaved": "Field order saved",
"orderSaveMismatch": "The persisted field order does not match. Refresh and try again.",
"dragDisabledBySearch": "Clear the search field to enable drag reordering.",
"noMatchingFields": "No matching fields",
"cancelAddField": "Close add form",
"publishedRuleViewer": "Published field configuration",
@@ -207,7 +221,9 @@
"difyExposurePolicy": "Dify read-only exposure",
"difyExposurePolicyOption": {"never":"Never expose","redacted":"Redacted read-only","confirmed_readonly":"Frozen value read-only"},
"difyExposurePolicyHint": {"never":"This field is omitted from Dify inputs.","redacted":"Only an irreversible placeholder is sent; the original email, domain, and recoverable patterns are excluded.","confirmed_readonly":"Sends the deterministic value frozen for this HXOPS run. This does not mean customer-confirmed, and Dify must not write it back."},
"availableForCustomerIdentity": "Allow the published field for customer identity"
"availableForCustomerIdentity": "Allow the published field for customer identity",
"orderHeaderIdentityTitle": "Available as customer identity candidate evidence",
"orderHeaderIdentityHint": "Order information is a Header field and may provide customer or ship-to candidate evidence. It cannot auto-confirm a customer by itself. Item details do not support this setting."
},
"shippingInventory": {
"title": "Shipping Configuration",
@@ -634,6 +650,11 @@
"title": "Agent Configuration",
"subtitle": "Manage AI assistants and their integrations",
"new": "New Agent",
"newInternalExecutor": "New Internal Executor",
"editInternalExecutor": "Edit Internal Executor",
"createInternalExecutor": "Create Internal Executor",
"tabs": { "applications": "Applications", "executors": "Internal Executors" },
"executor": { "internalOnly": "Backend use only", "empty": "No internal executors configured", "formSubtitle": "Configure an internal executor for background capability bindings", "workflowExecutor": "Workflow executor" },
"edit": "Edit Agent",
"create": "Create New Agent",
"noAgents": "No agents configured yet",
@@ -644,7 +665,9 @@
"config": "Configuration",
"status": "Status",
"actions": "Actions",
"aggregation": "Aggregation"
"aggregation": "Aggregation",
"executorType": "Executor type",
"runtimeProtocol": "Runtime protocol"
},
"fields": {
"name": "Name",
@@ -831,7 +854,7 @@
"normalListHint": "This app only"
}
,
"runtimeBinding": {"title":"Background business capability binding","subtitle":"Explicitly select a background business provider; no name or environment fallback is used.","exposureMode":"Application visibility","exposureWorkspace":"Workspace entry","exposureInternal":"Internal business provider","exposureHint":"Internal applications are only available for background business bindings and are hidden from users.","enabled":"Enable order extraction service","provider":"Order extraction service provider","selectProvider":"Select an internal Dify Workflow","timeout":"Timeout (seconds)","maxAttempts":"Maximum attempts","noProvider":"No eligible internal Dify Workflow exists. Create and test the service provider application first.","providerRequired":"Select an order extraction service provider first."}
"runtimeBinding": {"title":"Background business capability binding","subtitle":"Explicitly select a background business provider; no name or environment fallback is used.","exposureMode":"Application visibility","exposureWorkspace":"Workspace entry","exposureInternal":"Internal business provider","exposureHint":"Internal applications are only available for background business bindings and are hidden from users.","enabled":"Enable order extraction service","provider":"Order extraction service provider","selectProvider":"Select an internal Dify Workflow","timeout":"Timeout (seconds)","maxAttempts":"Maximum attempts","unitConcurrency":"Document concurrency (2-4)","unitMaxAttempts":"Attempts per document (1-3)","unitRetryBackoff":"Document retry backoff (ms)","maxModelUnits":"Maximum model documents per Run","providerMaxConcurrency":"Provider process concurrency","circuitFailureThreshold":"Circuit consecutive failure threshold","circuitCooldown":"Circuit cooldown (seconds)","autoCreateEnabled":"Allow automatic task creation after all gates pass","noProvider":"No eligible internal Dify Workflow exists. Create and test the service provider application first.","providerRequired":"Select an order extraction service provider first."}
},
"question": {
"title": "Common Questions",
@@ -1764,6 +1787,8 @@
"target": "Target",
"source": "Source",
"automation": "Automation ceiling",
"automationPolicy": "Automation limit (user-authorized)",
"automationPolicyHint": "Manual review is the default. Controlled auto-confirm still requires approved evidence, a unique match, and quality gates.",
"normalizer": "Text handling",
"displayName": "Rule name", "displayNamePlaceholder": "For example: US customer sender email", "evidenceLabel": "Evidence name in customer master data", "evidenceLabelPlaceholder": "For example: Customer business email", "description": "Usage note (optional)", "descriptionPlaceholder": "For example: Identifies Bill-to customers in the US region", "formGuide": "Name this rule in business terms and select where the information comes from. The system applies the required technical rules.", "emailType": "Email information to use", "identityAttribute": "What to identify", "templateValue": "Layout signature of the current document", "selectionResult": "This rule will use",
"selectField": "Select a published order field",
@@ -1774,6 +1799,8 @@
"openCustomerMaster": "Open customer master data",
"ruleSets": "Rule set versions",
"ruleSetHint": "Published snapshots are immutable. Replace or retire definitions before retiring a referenced order field.",
"publishedDefinitions": "Definitions actually published in this version",
"publishedDefinitionsEmpty": "This version contains no identity definitions.",
"createDraft": "Create rule draft",
"saveDraft": "Save draft",
"publish": "Publish rule set",
+23
View File
@@ -118,9 +118,31 @@
"shippingCandidateSelectRequired": "Select at least one order candidate before creating tasks.",
"shippingOrderExtractionDefaultPrompt": "Fully parse the shipping orders in the uploaded email and attachments, then create eligible tasks automatically.",
"shippingOrderExtractionProcessing": "Identifying orders in the email and attachments",
"shippingOrderExtractionElapsed": "Running for {seconds} seconds",
"shippingOrderExtractionIdle": "No new recognition progress yet. The system is still waiting.",
"shippingOrderExtractionSlow": "The recognition service is responding slowly. The system is still waiting.",
"shippingOrderExtractionShowDetails": "Show details",
"shippingOrderExtractionHideDetails": "Hide details",
"shippingOrderExtractionLoadingDetails": "Loading stage details...",
"shippingOrderExtractionDetailsUnavailable": "Stage details are temporarily unavailable. Please try again later.",
"shippingOrderExtractionNoDetails": "No new stage information is available yet",
"shippingOrderExtractionUnread": "{count} order identification result(s) need review",
"shippingOrderExtractionEventStatus": {
"started": "started",
"running": "in progress",
"completed": "completed",
"failed": "issue detected",
"recovered": "recovered",
"updated": "updated"
},
"shippingOrderExtractionStage": {"queued":"Waiting for background execution","workflow_accepted":"Connected to the recognition service","document_processing":"Parsing the email and attachments","order_recognition":"Identifying order information","result_processing":"Organizing and validating results","provider_result_ready":"Recognition complete; saving results","hxops_persistence":"Creating order tasks","auto_recovering":"The service is recovering automatically","generic_processing":"Processing the recognition task"},
"shippingOrderExtractionPartiallyCompleted": "Some orders were processed; others need more information or confirmation",
"shippingOrderExtractionCompleted": "Order identification completed",
"shippingOrderExtractionFailed": "Order identification failed",
"shippingOrderExtractionFailureHint": "The recognition service is temporarily unavailable. Try identifying again later.",
"shippingOrderExtractionRetry": "Identify again",
"shippingOrderExtractionRetrying": "Identifying again...",
"shippingOrderExtractionRetryFailed": "Could not restart order identification. Try again later.",
"shippingOrderExtractionCreatedCount": "{count} task(s) created",
"shippingOrderExtractionOpenedExistingCount": "{count} existing task(s) opened",
"shippingOrderExtractionPendingCount": "{count} awaiting details or confirmation",
@@ -167,6 +189,7 @@
"statusReady": "Ready",
"statusEmpty": "No order lines",
"impactHint": "internal part number and Reservation ID drive inventory matching; customer and AWS part numbers support traceability, while the inventory source hint supports routing and is optional.",
"orderInformation": "Order information",
"missingFields": "Missing fields",
"sourceType": "Source Type",
"hubCode": "Hub Code",
+49 -2
View File
@@ -1,6 +1,12 @@
{
"generic": "Request failed.",
"codes": {
"AGENT.EXPOSURE_ROLE_IMMUTABLE": "An application and an internal executor cannot be converted into each other.",
"AGENT.ADMIN_SCOPE_INVALID": "The application management tab parameter is invalid.",
"AGENT.INTERNAL_EXECUTOR_USER_ACCESS_FORBIDDEN": "Internal executors cannot be displayed, assigned, or accessed through user-facing APIs.",
"SHIPPING_NOTICE.ORDER_EXTRACTION_RUN_NOT_RETRYABLE": "Only failed order identification runs can be retried.",
"SHIPPING_NOTICE.ORDER_EXTRACTION_RUN_SNAPSHOT_OBSOLETE": "This run uses an obsolete input contract and cannot be retried. Send the email and attachments again to start a new run.",
"SHIPPING_NOTICE.ORDER_EXTRACTION_CONVERSATION_ACTIVE": "An order identification run is already processing in this conversation. Please wait for it to finish.",
"SHIPPING_ORDER_SCHEMA_NOT_FOUND": "The order template has not been initialized.",
"SHIPPING_ORDER_SCHEMA_EXISTS": "The order template already exists.",
"SHIPPING_ORDER_SCHEMA_DRAFT_EXISTS": "An order template draft already exists. Complete or publish it first.",
@@ -129,7 +135,11 @@
"SHIPPING_TEMP_INVENTORY_QUALITY_INVALID": "The temporary inventory file did not pass part number, reservation ID, or available quantity validation.",
"SHIPPING_TEMP_INVENTORY_SESSION_EXPIRED": "The temporary inventory session has expired. Upload the file again.",
"SHIPPING_TEMP_INVENTORY_TASK_NOT_FOUND": "No shipping task in this conversation can use the temporary inventory.",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_INVALID": "Run the test export while the inventory site is disabled.", "SHIPPING_INVENTORY_CONFIGURATION_TEST_UNAVAILABLE": "The RPA Worker is unavailable and cannot start a test export.", "SHIPPING_INVENTORY_CONFIGURATION_TEST_NOT_FOUND": "The inventory site test export record was not found.", "SHIPPING_INVENTORY_CONFIGURATION_TEST_NOT_READY": "The test export has not completed and its parsing plan cannot be confirmed.", "SHIPPING_INVENTORY_CONFIGURATION_TEST_STALE": "The inventory site configuration changed. Run the test export again.",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_INVALID": "Run the test export while the inventory site is disabled.",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_UNAVAILABLE": "The RPA Worker is unavailable and cannot start a test export.",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_NOT_FOUND": "The inventory site test export record was not found.",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_NOT_READY": "The test export has not completed and its parsing plan cannot be confirmed.",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_STALE": "The inventory site configuration changed. Run the test export again.",
"SHIPPING_RPA_PROFILE_CONFLICT": "The freight login profile name already exists.",
"SHIPPING_RPA_PROFILE_DELETE_BLOCKED": "The freight login profile is still referenced by an inventory source and cannot be deleted.",
"SHIPPING_RPA_PROFILE_DISABLE_BLOCKED": "The freight login profile is still referenced by an enabled inventory source and cannot be disabled.",
@@ -257,6 +267,43 @@
"SHIPPING_ORDER_CUSTOMER_ROLE_INVALID": "The customer role is invalid.",
"SHIPPING_ORDER_CUSTOMER_MATCH_NOT_FOUND": "The order customer match does not exist.",
"SHIPPING_ORDER_CUSTOMER_SITE_INVALID": "Select an active delivery site belonging to this customer.",
"SHIPPING_CUSTOMER_NOT_FOUND": "Customer not found.", "SHIPPING_CUSTOMER_CHANGE_REASON_REQUIRED": "A reason is required when changing customer status, short code, or auto-match authorization.", "SHIPPING_CUSTOMER_NAME_REQUIRED": "Standard customer name is required.", "SHIPPING_CUSTOMER_SHORT_CODE_INVALID": "Customer short code must contain 2-6 letters.", "SHIPPING_CUSTOMER_SHORT_CODE_EXISTS": "Customer short code already exists.", "SHIPPING_CUSTOMER_STATUS_INVALID": "Invalid customer status.", "SHIPPING_CUSTOMER_CONFLICT": "Customer data conflict.", "SHIPPING_CUSTOMER_IDENTIFIER_TYPE_INVALID": "Invalid identifier type.", "SHIPPING_CUSTOMER_IDENTIFIER_VALUE_REQUIRED": "Identifier value is required.", "SHIPPING_CUSTOMER_EMAIL_INVALID": "Invalid customer email.", "SHIPPING_CUSTOMER_DOMAIN_INVALID": "Invalid customer domain.", "SHIPPING_CUSTOMER_IDENTIFIER_STATUS_INVALID": "Invalid identifier status.", "SHIPPING_CUSTOMER_IDENTIFIER_NOT_FOUND": "Identifier not found.", "SHIPPING_CUSTOMER_IDENTIFIER_EXISTS": "Identifier already exists.", "SHIPPING_CUSTOMER_IDENTIFIER_NOT_APPROVED": "Only approved identifiers can enable automatic matching.", "SHIPPING_CUSTOMER_PUBLIC_DOMAIN_AUTO_MATCH_FORBIDDEN": "Public email domains cannot be used for automatic matching.", "SHIPPING_CUSTOMER_EXTERNAL_REF_CONFLICT": "The legacy customer key is bound to another customer.", "SHIPPING_CUSTOMER_IMPORT_FILE_REQUIRED": "Select an import file.", "SHIPPING_CUSTOMER_IMPORT_FILE_TYPE_INVALID": "Only .xlsx files are supported.", "SHIPPING_CUSTOMER_IMPORT_FILE_EMPTY": "The import file is empty.", "SHIPPING_CUSTOMER_IMPORT_FILE_TOO_LARGE": "The import file exceeds 5 MB.", "SHIPPING_CUSTOMER_IMPORT_FILE_INVALID": "Invalid import workbook.", "SHIPPING_CUSTOMER_IMPORT_SHEET_MISSING": "A required worksheet is missing.", "SHIPPING_CUSTOMER_IMPORT_COLUMNS_MISSING": "Required import columns are missing.", "SHIPPING_CUSTOMER_IMPORT_KEY_REQUIRED": "Legacy customer key is required.", "SHIPPING_CUSTOMER_IMPORT_DUPLICATE_KEY": "Duplicate legacy key in the same source.", "SHIPPING_CUSTOMER_IMPORT_SHORT_CODE_CONFLICT": "Short code conflicts with an existing customer.", "SHIPPING_CUSTOMER_IMPORT_NAME_MATCH": "Customer name may duplicate an existing customer.", "SHIPPING_CUSTOMER_IMPORT_IDENTIFIER_CUSTOMER_MISSING": "No customer mapping was found for this identifier.", "SHIPPING_CUSTOMER_IMPORT_NOT_FOUND": "Import batch not found.", "SHIPPING_CUSTOMER_IMPORT_ROW_NOT_FOUND": "Import row not found.", "SHIPPING_CUSTOMER_IMPORT_DECISION_INVALID": "Invalid import row action.", "SHIPPING_CUSTOMER_IMPORT_TARGET_REQUIRED": "Select a target customer for update or merge.", "SHIPPING_CUSTOMER_IMPORT_HAS_ERRORS": "The import batch contains blocking errors.", "SHIPPING_CUSTOMER_IMPORT_DECISIONS_REQUIRED": "Resolve all warning rows first.", "SHIPPING_CUSTOMER_IMPORT_ALREADY_PUBLISHED": "The import batch is already published.", "SHIPPING_CUSTOMER_IMPORT_UPLOAD_CONFLICT": "A conflict occurred while staging the import.", "SHIPPING_CUSTOMER_IMPORT_PUBLISH_CONFLICT": "A data conflict occurred while publishing the import."
"SHIPPING_CUSTOMER_NOT_FOUND": "Customer not found.",
"SHIPPING_CUSTOMER_CHANGE_REASON_REQUIRED": "A reason is required when changing customer status, short code, or auto-match authorization.",
"SHIPPING_CUSTOMER_NAME_REQUIRED": "Standard customer name is required.",
"SHIPPING_CUSTOMER_SHORT_CODE_INVALID": "Customer short code must contain 2-6 letters.",
"SHIPPING_CUSTOMER_SHORT_CODE_EXISTS": "Customer short code already exists.",
"SHIPPING_CUSTOMER_STATUS_INVALID": "Invalid customer status.",
"SHIPPING_CUSTOMER_CONFLICT": "Customer data conflict.",
"SHIPPING_CUSTOMER_IDENTIFIER_TYPE_INVALID": "Invalid identifier type.",
"SHIPPING_CUSTOMER_IDENTIFIER_VALUE_REQUIRED": "Identifier value is required.",
"SHIPPING_CUSTOMER_EMAIL_INVALID": "Invalid customer email.",
"SHIPPING_CUSTOMER_DOMAIN_INVALID": "Invalid customer domain.",
"SHIPPING_CUSTOMER_IDENTIFIER_STATUS_INVALID": "Invalid identifier status.",
"SHIPPING_CUSTOMER_IDENTIFIER_NOT_FOUND": "Identifier not found.",
"SHIPPING_CUSTOMER_IDENTIFIER_EXISTS": "Identifier already exists.",
"SHIPPING_CUSTOMER_IDENTIFIER_NOT_APPROVED": "Only approved identifiers can enable automatic matching.",
"SHIPPING_CUSTOMER_PUBLIC_DOMAIN_AUTO_MATCH_FORBIDDEN": "Public email domains cannot be used for automatic matching.",
"SHIPPING_CUSTOMER_EXTERNAL_REF_CONFLICT": "The legacy customer key is bound to another customer.",
"SHIPPING_CUSTOMER_IMPORT_FILE_REQUIRED": "Select an import file.",
"SHIPPING_CUSTOMER_IMPORT_FILE_TYPE_INVALID": "Only .xlsx files are supported.",
"SHIPPING_CUSTOMER_IMPORT_FILE_EMPTY": "The import file is empty.",
"SHIPPING_CUSTOMER_IMPORT_FILE_TOO_LARGE": "The import file exceeds 5 MB.",
"SHIPPING_CUSTOMER_IMPORT_FILE_INVALID": "Invalid import workbook.",
"SHIPPING_CUSTOMER_IMPORT_SHEET_MISSING": "A required worksheet is missing.",
"SHIPPING_CUSTOMER_IMPORT_COLUMNS_MISSING": "Required import columns are missing.",
"SHIPPING_CUSTOMER_IMPORT_KEY_REQUIRED": "Legacy customer key is required.",
"SHIPPING_CUSTOMER_IMPORT_DUPLICATE_KEY": "Duplicate legacy key in the same source.",
"SHIPPING_CUSTOMER_IMPORT_SHORT_CODE_CONFLICT": "Short code conflicts with an existing customer.",
"SHIPPING_CUSTOMER_IMPORT_NAME_MATCH": "Customer name may duplicate an existing customer.",
"SHIPPING_CUSTOMER_IMPORT_IDENTIFIER_CUSTOMER_MISSING": "No customer mapping was found for this identifier.",
"SHIPPING_CUSTOMER_IMPORT_NOT_FOUND": "Import batch not found.",
"SHIPPING_CUSTOMER_IMPORT_ROW_NOT_FOUND": "Import row not found.",
"SHIPPING_CUSTOMER_IMPORT_DECISION_INVALID": "Invalid import row action.",
"SHIPPING_CUSTOMER_IMPORT_TARGET_REQUIRED": "Select a target customer for update or merge.",
"SHIPPING_CUSTOMER_IMPORT_HAS_ERRORS": "The import batch contains blocking errors.",
"SHIPPING_CUSTOMER_IMPORT_DECISIONS_REQUIRED": "Resolve all warning rows first.",
"SHIPPING_CUSTOMER_IMPORT_ALREADY_PUBLISHED": "The import batch is already published.",
"SHIPPING_CUSTOMER_IMPORT_UPLOAD_CONFLICT": "A conflict occurred while staging the import.",
"SHIPPING_CUSTOMER_IMPORT_PUBLISH_CONFLICT": "A data conflict occurred while publishing the import."
}
}
+26 -6
View File
@@ -30,7 +30,12 @@
"shippingCustomers": "ลูกค้าขนส่ง",
"shippingConfig": "การตั้งค่าการจัดส่ง",
"shippingInventory": "การตั้งค่าคลังสินค้า",
"shippingIdentityRules": "กฎการระบุตัวตนลูกค้า"
"shippingIdentityRules": "กฎการระบุตัวตนลูกค้า",
"shippingOrderExtractionRuns": "การทำงานระบุคำสั่งซื้อ"
},
"shippingOrderExtractionRuns": {
"eyebrow": "การวินิจฉัยการทำงานแบบอ่านอย่างเดียว", "title": "การทำงานระบุคำสั่งซื้อ", "subtitle": "ตรวจสอบการทำงานระบุคำสั่งซื้อแบบอะซิงโครนัส ความพยายามของ Job และวงจรโหนดที่ผ่านการปกปิดข้อมูล โดยไม่แสดงเนื้อหาคำสั่งซื้อ พรอมป์ต์ อินพุต เอาต์พุต หรือสแตกข้อผิดพลาด", "refresh": "รีเฟรช", "status": "สถานะ", "allStatuses": "ทุกสถานะ", "total": "ทั้งหมด {count} รายการ", "runNo": "หมายเลขการทำงาน", "stage": "ขั้นตอนปัจจุบัน", "attempts": "จำนวนครั้ง", "createdAt": "เวลาสร้าง", "totalDuration": "เวลารวม", "viewDetail": "ดูรายละเอียด", "previous": "ก่อนหน้า", "next": "ถัดไป", "loading": "กำลังโหลด...", "empty": "ไม่มีรายการทำงาน", "loadFailed": "โหลดการทำงานระบุคำสั่งซื้อไม่สำเร็จ", "detailFailed": "โหลดรายละเอียดการทำงานไม่สำเร็จ", "detailTitle": "รายละเอียดการวินิจฉัย", "workflowRunId": "Workflow Run ID", "errorCode": "รหัสข้อผิดพลาด", "jobAttempts": "ความพยายามของ Job", "units": "การวินิจฉัยหน่วยเอกสาร", "lifecycle": "วงจรโหนดที่ปกปิดข้อมูล",
"statuses": { "queued": "รอการดำเนินการ", "running": "กำลังดำเนินการ", "result_persisted": "บันทึกผลแล้ว", "completed": "เสร็จสิ้น", "needs_review": "ต้องให้ผู้ใช้ดำเนินการ", "failed": "ล้มเหลว", "cancelled": "ยกเลิก" }
},
"shippingOrderSchema": {
"eyebrow": "เทมเพลตฟิลด์คำสั่งซื้อ",
@@ -114,6 +119,12 @@
"searchFields": "ค้นหาชื่อที่แสดงหรือรหัสฟิลด์",
"fieldCount": "{count} ฟิลด์",
"selectedInGroup": "ฟิลด์ปัจจุบัน",
"dragToReorder": "ลากเพื่อเปลี่ยนลำดับส่วนกลางของรายการฟิลด์",
"dragGuide": "ลากที่จับด้านซ้ายเพื่อจัดลำดับฟิลด์ภายในหมวดหมู่เดียวกัน",
"globalOrderGuide": "ลากที่จับเพื่อเปลี่ยนลำดับส่วนกลาง ไม่ต้องมีฉบับร่างหรือเวอร์ชันที่เผยแพร่ และลำดับจะคงอยู่หลังรีเฟรช",
"orderSaved": "บันทึกลำดับฟิลด์แล้ว",
"orderSaveMismatch": "ลำดับฟิลด์หลังบันทึกไม่ตรงกัน โปรดรีเฟรชและลองอีกครั้ง",
"dragDisabledBySearch": "ล้างช่องค้นหาเพื่อเปิดใช้การลากจัดลำดับ",
"noMatchingFields": "ไม่พบฟิลด์ที่ตรงกัน",
"cancelAddField": "ปิดแบบฟอร์มเพิ่ม",
"publishedRuleViewer": "การตั้งค่าฟิลด์ที่เผยแพร่แล้ว",
@@ -205,7 +216,9 @@
"difyExposurePolicy": "นโยบายเปิดเผยแบบอ่านอย่างเดียวให้ Dify",
"difyExposurePolicyOption": {"never":"ไม่เปิดเผย","redacted":"ปกปิดและอ่านอย่างเดียว","confirmed_readonly":"ค่าที่ตรึงและอ่านอย่างเดียว"},
"difyExposurePolicyHint": {"never":"ฟิลด์นี้จะไม่อยู่ในอินพุตของ Dify","redacted":"ส่งเฉพาะค่าตัวแทนที่ย้อนคืนไม่ได้ โดยไม่ส่งอีเมล โดเมน หรือลักษณะที่กู้คืนได้","confirmed_readonly":"ส่งค่าที่ HXOPS เก็บแบบกำหนดแน่นอนและตรึงไว้สำหรับ Run นี้ ไม่ได้หมายความว่าลูกค้ายืนยันแล้ว และ Dify ห้ามเขียนค่ากลับ"},
"availableForCustomerIdentity": "อนุญาตให้ใช้ฟิลด์ที่เผยแพร่แล้วเพื่อระบุตัวตนลูกค้า"
"availableForCustomerIdentity": "อนุญาตให้ใช้ฟิลด์ที่เผยแพร่แล้วเพื่อระบุตัวตนลูกค้า",
"orderHeaderIdentityTitle": "ใช้เป็นหลักฐานผู้สมัครสำหรับการระบุตัวตนลูกค้าได้",
"orderHeaderIdentityHint": "ข้อมูลคำสั่งซื้อเป็นฟิลด์ Header และใช้เป็นหลักฐานผู้สมัครสำหรับลูกค้าหรือสถานที่จัดส่งได้ ระบบจะไม่ยืนยันลูกค้าอัตโนมัติจากฟิลด์นี้เพียงอย่างเดียว และรายละเอียดสินค้าไม่รองรับการตั้งค่านี้"
},
"shippingInventory": {
"title": "การตั้งค่าการจัดส่ง",
@@ -617,6 +630,11 @@
"title": "การกำหนดค่าตัวแทน",
"subtitle": "จัดการผู้ช่วย AI และการรวมระบบ",
"new": "ตัวแทนใหม่",
"newInternalExecutor": "ตัวดำเนินการภายในใหม่",
"editInternalExecutor": "แก้ไขตัวดำเนินการภายใน",
"createInternalExecutor": "สร้างตัวดำเนินการภายใน",
"tabs": { "applications": "แอปพลิเคชัน", "executors": "ตัวดำเนินการภายใน" },
"executor": { "internalOnly": "ใช้สำหรับงานเบื้องหลังเท่านั้น", "empty": "ยังไม่มีตัวดำเนินการภายใน", "formSubtitle": "กำหนดค่าตัวดำเนินการภายในสำหรับการผูกความสามารถเบื้องหลัง", "workflowExecutor": "ตัวดำเนินการ Workflow" },
"edit": "แก้ไขตัวแทน",
"create": "สร้างตัวแทนใหม่",
"noAgents": "ยังไม่มีการกำหนดค่าตัวแทน",
@@ -627,7 +645,9 @@
"config": "การกำหนดค่า",
"status": "สถานะ",
"actions": "การกระทำ",
"aggregation": "การรวมแอป"
"aggregation": "การรวมแอป",
"executorType": "ประเภทตัวดำเนินการ",
"runtimeProtocol": "โปรโตคอลรันไทม์"
},
"fields": {
"name": "ชื่อ",
@@ -814,7 +834,7 @@
"normalListHint": "เฉพาะแอปนี้"
}
,
"runtimeBinding": {"title":"การผูกความสามารถทางธุรกิจเบื้องหลัง","subtitle":"เลือกผู้ให้บริการธุรกิจเบื้องหลังอย่างชัดเจน โดยไม่ย้อนกลับไปใช้ชื่อหรือค่าจากสภาพแวดล้อม","exposureMode":"การมองเห็นแอป","exposureWorkspace":"ทางเข้าพื้นที่ทำงาน","exposureInternal":"ผู้ให้บริการธุรกิจภายใน","exposureHint":"แอปภายในใช้สำหรับการผูกธุรกิจเบื้องหลังเท่านั้นและไม่แสดงต่อผู้ใช้ทั่วไป","enabled":"เปิดใช้บริการแยกคำสั่งซื้อ","provider":"ผู้ให้บริการบริการแยกคำสั่งซื้อ","selectProvider":"เลือก Dify Workflow ภายใน","timeout":"หมดเวลา (วินาที)","maxAttempts":"จำนวนครั้งสูงสุด","noProvider":"ยังไม่มี Dify Workflow ภายในที่ใช้ได้ โปรดสร้างและทดสอบแอปผู้ให้บริการก่อน","providerRequired":"โปรดเลือกผู้ให้บริการบริการแยกคำสั่งซื้อก่อน"}
"runtimeBinding": {"title":"การผูกความสามารถทางธุรกิจเบื้องหลัง","subtitle":"เลือกผู้ให้บริการธุรกิจเบื้องหลังอย่างชัดเจน โดยไม่ย้อนกลับไปใช้ชื่อหรือค่าจากสภาพแวดล้อม","exposureMode":"การมองเห็นแอป","exposureWorkspace":"ทางเข้าพื้นที่ทำงาน","exposureInternal":"ผู้ให้บริการธุรกิจภายใน","exposureHint":"แอปภายในใช้สำหรับการผูกธุรกิจเบื้องหลังเท่านั้นและไม่แสดงต่อผู้ใช้ทั่วไป","enabled":"เปิดใช้บริการแยกคำสั่งซื้อ","provider":"ผู้ให้บริการบริการแยกคำสั่งซื้อ","selectProvider":"เลือก Dify Workflow ภายใน","timeout":"หมดเวลา (วินาที)","maxAttempts":"จำนวนครั้งสูงสุด","unitConcurrency":"จำนวนเอกสารพร้อมกัน (2-4)","unitMaxAttempts":"จำนวนครั้งต่อเอกสาร (1-3)","unitRetryBackoff":"เวลาหน่วงก่อนลองเอกสารใหม่ (มิลลิวินาที)","maxModelUnits":"จำนวนเอกสารโมเดลสูงสุดต่อ Run","providerMaxConcurrency":"ขีดจำกัดพร้อมกันของ Provider","circuitFailureThreshold":"เกณฑ์ความล้มเหลวต่อเนื่องของวงจร","circuitCooldown":"เวลาพักวงจร (วินาที)","autoCreateEnabled":"อนุญาตให้สร้างงานอัตโนมัติเมื่อผ่านทุกเกณฑ์","noProvider":"ยังไม่มี Dify Workflow ภายในที่ใช้ได้ โปรดสร้างและทดสอบแอปผู้ให้บริการก่อน","providerRequired":"โปรดเลือกผู้ให้บริการบริการแยกคำสั่งซื้อก่อน"}
},
"question": {
"title": "คำถามทั่วไป",
@@ -1611,10 +1631,10 @@
"loading": "กำลังโหลดกฎการระบุตัวตน...",
"definitions": "นิยามการระบุตัวตน",
"definitionHint": "เลือกฟิลด์ Header ที่เผยแพร่และเปิดใช้สำหรับการระบุตัวตนลูกค้า ระบบจะใช้เฉพาะค่าที่ตัดสินแล้วของฟิลด์นั้น",
"code": "รหัสนิยาม", "target": "เป้าหมาย", "source": "แหล่งที่มา", "automation": "ระดับอัตโนมัติสูงสุด", "normalizer": "วิธีจัดการข้อความ",
"code": "รหัสนิยาม", "target": "เป้าหมาย", "source": "แหล่งที่มา", "automation": "ระดับอัตโนมัติสูงสุด", "automationPolicy": "ขีดจำกัดอัตโนมัติ (ผู้ใช้อนุญาต)", "automationPolicyHint": "ค่าเริ่มต้นคือการตรวจสอบด้วยคน การยืนยันอัตโนมัติแบบควบคุมยังต้องผ่านหลักฐานที่อนุมัติ การจับคู่ได้เพียงรายการเดียว และเกณฑ์คุณภาพของระบบ", "normalizer": "วิธีจัดการข้อความ",
"displayName": "ชื่อกฎ", "displayNamePlaceholder": "เช่น อีเมลผู้ส่งของลูกค้าสหรัฐ", "evidenceLabel": "ชื่อหลักฐานในข้อมูลหลักลูกค้า", "evidenceLabelPlaceholder": "เช่น อีเมลธุรกิจของลูกค้า", "description": "คำอธิบายการใช้ (ไม่บังคับ)", "descriptionPlaceholder": "เช่น ใช้ระบุลูกค้าผู้ชำระเงินในภูมิภาคสหรัฐ", "formGuide": "ตั้งชื่อกฎและเลือกฟิลด์ระบุตัวตน วิธีเก็บ รูปแบบ และการตรวจสอบจะสืบทอดจาก Schema คำสั่งซื้อที่เผยแพร่แล้ว", "emailType": "ข้อมูลอีเมลที่ใช้", "identityAttribute": "ใช้ระบุอะไร", "templateValue": "ลักษณะรูปแบบของเอกสารปัจจุบัน", "selectionResult": "กฎนี้จะใช้",
"selectField": "เลือกฟิลด์ระบุตัวตนที่เผยแพร่แล้ว", "addDefinition": "เพิ่มนิยามธุรกิจ", "definitionSaved": "บันทึกนิยามการระบุตัวตนแล้ว", "workflowTitle": "ลำดับการตั้งค่า", "workflowHint": "1. เพิ่มนิยามการระบุตัวตน 2. สร้าง บันทึก และเผยแพร่ชุดกฎ 3. กลับไปที่ข้อมูลหลักลูกค้าเพื่อดูแลหลักฐานของลูกค้าหรือสถานที่จัดส่ง", "openCustomerMaster": "ไปที่ข้อมูลหลักลูกค้า",
"ruleSets": "เวอร์ชันชุดกฎ", "ruleSetHint": "สแนปช็อตที่เผยแพร่แล้วแก้ไขไม่ได้ ต้องแทนที่หรือเลิกใช้นิยามก่อนเลิกใช้ฟิลด์คำสั่งซื้อที่ถูกอ้างอิง",
"ruleSets": "เวอร์ชันชุดกฎ", "ruleSetHint": "สแนปช็อตที่เผยแพร่แล้วแก้ไขไม่ได้ ต้องแทนที่หรือเลิกใช้นิยามก่อนเลิกใช้ฟิลด์คำสั่งซื้อที่ถูกอ้างอิง", "publishedDefinitions": "คำจำกัดความที่เผยแพร่จริงในเวอร์ชันนี้", "publishedDefinitionsEmpty": "เวอร์ชันนี้ไม่มีคำจำกัดความการระบุตัวตน",
"createDraft": "สร้างร่างกฎ", "saveDraft": "บันทึกร่าง", "publish": "เผยแพร่ชุดกฎ", "ruleSetSaved": "บันทึกร่างกฎแล้ว", "ruleSetPublished": "เผยแพร่ชุดกฎการระบุตัวตนแล้ว", "operationFailed": "การดำเนินการกฎการระบุตัวตนลูกค้าล้มเหลว",
"targets": { "customer": "ลูกค้า", "site": "สถานที่จัดส่ง" }, "automations": { "none": "เฉพาะผู้สมัคร/ตรวจสอบด้วยคน", "conditional": "ยืนยันอัตโนมัติแบบควบคุม" }, "status": { "draft": "ร่าง", "published": "ใช้งานอยู่", "retired": "เลิกใช้" }
,
+23
View File
@@ -118,9 +118,31 @@
"shippingCandidateSelectRequired": "โปรดเลือกรายการคำสั่งซื้ออย่างน้อยหนึ่งรายการก่อนสร้างงาน",
"shippingOrderExtractionDefaultPrompt": "โปรดแยกวิเคราะห์คำสั่งซื้อจัดส่งจากอีเมลและไฟล์แนบที่อัปโหลดให้ครบถ้วน แล้วสร้างงานที่ผ่านเกณฑ์โดยอัตโนมัติ",
"shippingOrderExtractionProcessing": "กำลังระบุคำสั่งซื้อจากอีเมลและไฟล์แนบ",
"shippingOrderExtractionElapsed": "ดำเนินการแล้ว {seconds} วินาที",
"shippingOrderExtractionIdle": "ยังไม่ได้รับความคืบหน้าการระบุข้อมูลใหม่ ระบบยังรออยู่",
"shippingOrderExtractionSlow": "บริการระบุข้อมูลตอบสนองช้า ระบบยังรออยู่",
"shippingOrderExtractionShowDetails": "ดูรายละเอียด",
"shippingOrderExtractionHideDetails": "ซ่อนรายละเอียด",
"shippingOrderExtractionLoadingDetails": "กำลังโหลดรายละเอียดขั้นตอน...",
"shippingOrderExtractionDetailsUnavailable": "ไม่สามารถโหลดรายละเอียดขั้นตอนได้ชั่วคราว โปรดลองอีกครั้งภายหลัง",
"shippingOrderExtractionNoDetails": "ยังไม่มีข้อมูลขั้นตอนใหม่",
"shippingOrderExtractionUnread": "มีผลการระบุคำสั่งซื้อ {count} รายการรอตรวจสอบ",
"shippingOrderExtractionEventStatus": {
"started": "เริ่มแล้ว",
"running": "กำลังดำเนินการ",
"completed": "เสร็จสิ้นแล้ว",
"failed": "พบปัญหา",
"recovered": "กู้คืนแล้ว",
"updated": "อัปเดตแล้ว"
},
"shippingOrderExtractionStage": {"queued":"รอการประมวลผลเบื้องหลัง","workflow_accepted":"เชื่อมต่อบริการระบุข้อมูลแล้ว","document_processing":"กำลังแยกวิเคราะห์อีเมลและไฟล์แนบ","order_recognition":"กำลังระบุข้อมูลคำสั่งซื้อ","result_processing":"กำลังจัดระเบียบและตรวจสอบผลลัพธ์","provider_result_ready":"ระบุข้อมูลเสร็จแล้ว กำลังบันทึกผลลัพธ์","hxops_persistence":"กำลังสร้างงานคำสั่งซื้อ","auto_recovering":"ระบบกำลังกู้คืนบริการโดยอัตโนมัติ","generic_processing":"กำลังประมวลผลงานระบุข้อมูล"},
"shippingOrderExtractionPartiallyCompleted": "ประมวลผลคำสั่งซื้อบางส่วนแล้ว และยังมีรายการที่ต้องเพิ่มข้อมูลหรือยืนยัน",
"shippingOrderExtractionCompleted": "ระบุคำสั่งซื้อเสร็จแล้ว",
"shippingOrderExtractionFailed": "ระบุคำสั่งซื้อไม่สำเร็จ",
"shippingOrderExtractionFailureHint": "บริการระบุข้อมูลไม่พร้อมใช้งานชั่วคราว โปรดลองระบุใหม่ภายหลัง",
"shippingOrderExtractionRetry": "ระบุใหม่",
"shippingOrderExtractionRetrying": "กำลังระบุใหม่...",
"shippingOrderExtractionRetryFailed": "เริ่มการระบุใหม่ไม่สำเร็จ โปรดลองอีกครั้งภายหลัง",
"shippingOrderExtractionCreatedCount": "สร้างงานแล้ว {count} รายการ",
"shippingOrderExtractionOpenedExistingCount": "เปิดงานที่มีอยู่แล้ว {count} รายการ",
"shippingOrderExtractionPendingCount": "รอข้อมูลหรือการยืนยัน {count} รายการ",
@@ -167,6 +189,7 @@
"statusReady": "พร้อมดำเนินการ",
"statusEmpty": "ยังไม่มีรายการคำสั่งซื้อ",
"impactHint": "หมายเลขชิ้นส่วนภายใน และ Reservation ID ใช้จับคู่สินค้าคงคลัง; หมายเลขลูกค้าและ AWS ใช้ติดตามย้อนกลับ ส่วนคำใบ้แหล่งสินค้าคงคลังใช้กำหนดเส้นทางและไม่บังคับ",
"orderInformation": "ข้อมูลคำสั่งซื้อ",
"missingFields": "ฟิลด์ที่ต้องเติม",
"sourceType": "Source Type",
"hubCode": "Hub Code",
+49 -2
View File
@@ -1,6 +1,12 @@
{
"generic": "คำขอล้มเหลว",
"codes": {
"AGENT.EXPOSURE_ROLE_IMMUTABLE": "ไม่สามารถแปลงแอปพลิเคชันเป็นตัวดำเนินการภายในหรือกลับกันได้",
"AGENT.ADMIN_SCOPE_INVALID": "พารามิเตอร์แท็บการจัดการแอปพลิเคชันไม่ถูกต้อง",
"AGENT.INTERNAL_EXECUTOR_USER_ACCESS_FORBIDDEN": "ไม่สามารถแสดง มอบสิทธิ์ หรือเข้าถึงตัวดำเนินการภายในผ่าน API สำหรับผู้ใช้ได้",
"SHIPPING_NOTICE.ORDER_EXTRACTION_RUN_NOT_RETRYABLE": "ลองระบุใหม่ได้เฉพาะงานระบุคำสั่งซื้อที่ล้มเหลวเท่านั้น",
"SHIPPING_NOTICE.ORDER_EXTRACTION_RUN_SNAPSHOT_OBSOLETE": "งานนี้ใช้สัญญาข้อมูลนำเข้าเวอร์ชันเก่าและไม่สามารถลองใหม่ได้ โปรดส่งอีเมลและไฟล์แนบอีกครั้งเพื่อเริ่มงานใหม่",
"SHIPPING_NOTICE.ORDER_EXTRACTION_CONVERSATION_ACTIVE": "มีงานระบุคำสั่งซื้อกำลังดำเนินการอยู่ในบทสนทนานี้ โปรดรอให้เสร็จสิ้นก่อน",
"SHIPPING_ORDER_SCHEMA_NOT_FOUND": "ยังไม่ได้เริ่มต้นเทมเพลตคำสั่งซื้อ",
"SHIPPING_ORDER_SCHEMA_EXISTS": "มีเทมเพลตคำสั่งซื้ออยู่แล้ว",
"SHIPPING_ORDER_SCHEMA_DRAFT_EXISTS": "มีฉบับร่างเทมเพลตคำสั่งซื้ออยู่แล้ว โปรดดำเนินการหรือเผยแพร่ฉบับปัจจุบันก่อน",
@@ -129,7 +135,11 @@
"SHIPPING_TEMP_INVENTORY_QUALITY_INVALID": "ไฟล์สต็อกชั่วคราวไม่ผ่านการตรวจสอบเลขชิ้นส่วน รหัสการจอง หรือจำนวนคงเหลือ",
"SHIPPING_TEMP_INVENTORY_SESSION_EXPIRED": "เซสชันสต็อกชั่วคราวหมดอายุ โปรดอัปโหลดไฟล์อีกครั้ง",
"SHIPPING_TEMP_INVENTORY_TASK_NOT_FOUND": "ไม่พบงานจัดส่งในการสนทนานี้ที่ใช้สต็อกชั่วคราวได้",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_INVALID": "โปรดส่งออกทดสอบขณะที่ไซต์สต็อกปิดใช้งาน", "SHIPPING_INVENTORY_CONFIGURATION_TEST_UNAVAILABLE": "RPA Worker ไม่พร้อมใช้งานและไม่สามารถเริ่มการส่งออกทดสอบได้", "SHIPPING_INVENTORY_CONFIGURATION_TEST_NOT_FOUND": "ไม่พบระเบียนการส่งออกทดสอบของไซต์สต็อก", "SHIPPING_INVENTORY_CONFIGURATION_TEST_NOT_READY": "การส่งออกทดสอบยังไม่เสร็จ จึงยังยืนยันแผนการอ่านไม่ได้", "SHIPPING_INVENTORY_CONFIGURATION_TEST_STALE": "การตั้งค่าไซต์สต็อกเปลี่ยนแล้ว โปรดส่งออกทดสอบอีกครั้ง",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_INVALID": "โปรดส่งออกทดสอบขณะที่ไซต์สต็อกปิดใช้งาน",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_UNAVAILABLE": "RPA Worker ไม่พร้อมใช้งานและไม่สามารถเริ่มการส่งออกทดสอบได้",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_NOT_FOUND": "ไม่พบระเบียนการส่งออกทดสอบของไซต์สต็อก",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_NOT_READY": "การส่งออกทดสอบยังไม่เสร็จ จึงยังยืนยันแผนการอ่านไม่ได้",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_STALE": "การตั้งค่าไซต์สต็อกเปลี่ยนแล้ว โปรดส่งออกทดสอบอีกครั้ง",
"SHIPPING_RPA_PROFILE_CONFLICT": "ชื่อโปรไฟล์เข้าสู่ระบบขนส่งมีอยู่แล้ว",
"SHIPPING_RPA_PROFILE_DELETE_BLOCKED": "โปรไฟล์เข้าสู่ระบบขนส่งยังถูกอ้างอิงและไม่สามารถลบได้",
"SHIPPING_RPA_PROFILE_DISABLE_BLOCKED": "โปรไฟล์เข้าสู่ระบบขนส่งยังถูกอ้างอิงโดยแหล่งสินค้าคงคลังที่เปิดใช้และไม่สามารถปิดใช้งานได้",
@@ -257,6 +267,43 @@
"SHIPPING_ORDER_CUSTOMER_ROLE_INVALID": "บทบาทลูกค้าไม่ถูกต้อง",
"SHIPPING_ORDER_CUSTOMER_MATCH_NOT_FOUND": "ไม่พบข้อมูลการจับคู่ลูกค้าของคำสั่งซื้อ",
"SHIPPING_ORDER_CUSTOMER_SITE_INVALID": "โปรดเลือกสถานที่จัดส่งที่ใช้งานอยู่และเป็นของลูกค้ารายนี้",
"SHIPPING_CUSTOMER_NOT_FOUND": "ไม่พบลูกค้า", "SHIPPING_CUSTOMER_CHANGE_REASON_REQUIRED": "ต้องระบุเหตุผลเมื่อแก้ไขสถานะ รหัสย่อ หรือสิทธิ์การจับคู่อัตโนมัติของลูกค้า", "SHIPPING_CUSTOMER_NAME_REQUIRED": "ต้องระบุชื่อลูกค้ามาตรฐาน", "SHIPPING_CUSTOMER_SHORT_CODE_INVALID": "รหัสย่อลูกค้าต้องเป็นตัวอักษร 2-6 ตัว", "SHIPPING_CUSTOMER_SHORT_CODE_EXISTS": "รหัสย่อลูกค้ามีอยู่แล้ว", "SHIPPING_CUSTOMER_STATUS_INVALID": "สถานะลูกค้าไม่ถูกต้อง", "SHIPPING_CUSTOMER_CONFLICT": "ข้อมูลลูกค้าขัดแย้ง", "SHIPPING_CUSTOMER_IDENTIFIER_TYPE_INVALID": "ประเภทหลักฐานไม่ถูกต้อง", "SHIPPING_CUSTOMER_IDENTIFIER_VALUE_REQUIRED": "ต้องระบุค่าหลักฐาน", "SHIPPING_CUSTOMER_EMAIL_INVALID": "อีเมลลูกค้าไม่ถูกต้อง", "SHIPPING_CUSTOMER_DOMAIN_INVALID": "โดเมนลูกค้าไม่ถูกต้อง", "SHIPPING_CUSTOMER_IDENTIFIER_STATUS_INVALID": "สถานะหลักฐานไม่ถูกต้อง", "SHIPPING_CUSTOMER_IDENTIFIER_NOT_FOUND": "ไม่พบหลักฐาน", "SHIPPING_CUSTOMER_IDENTIFIER_EXISTS": "หลักฐานนี้มีอยู่แล้ว", "SHIPPING_CUSTOMER_IDENTIFIER_NOT_APPROVED": "เปิดจับคู่อัตโนมัติได้เฉพาะหลักฐานที่อนุมัติแล้ว", "SHIPPING_CUSTOMER_PUBLIC_DOMAIN_AUTO_MATCH_FORBIDDEN": "โดเมนอีเมลสาธารณะใช้จับคู่อัตโนมัติไม่ได้", "SHIPPING_CUSTOMER_EXTERNAL_REF_CONFLICT": "รหัสลูกค้าเดิมผูกกับลูกค้ารายอื่นแล้ว", "SHIPPING_CUSTOMER_IMPORT_FILE_REQUIRED": "เลือกไฟล์นำเข้า", "SHIPPING_CUSTOMER_IMPORT_FILE_TYPE_INVALID": "รองรับเฉพาะไฟล์ .xlsx", "SHIPPING_CUSTOMER_IMPORT_FILE_EMPTY": "ไฟล์นำเข้าว่าง", "SHIPPING_CUSTOMER_IMPORT_FILE_TOO_LARGE": "ไฟล์นำเข้าเกิน 5 MB", "SHIPPING_CUSTOMER_IMPORT_FILE_INVALID": "ไฟล์ Excel นำเข้าไม่ถูกต้อง", "SHIPPING_CUSTOMER_IMPORT_SHEET_MISSING": "ขาดชีตที่จำเป็น", "SHIPPING_CUSTOMER_IMPORT_COLUMNS_MISSING": "ขาดคอลัมน์ที่จำเป็น", "SHIPPING_CUSTOMER_IMPORT_KEY_REQUIRED": "ต้องระบุรหัสลูกค้าเดิม", "SHIPPING_CUSTOMER_IMPORT_DUPLICATE_KEY": "รหัสลูกค้าเดิมซ้ำในแหล่งเดียวกัน", "SHIPPING_CUSTOMER_IMPORT_SHORT_CODE_CONFLICT": "รหัสย่อขัดแย้งกับลูกค้าที่มีอยู่", "SHIPPING_CUSTOMER_IMPORT_NAME_MATCH": "ชื่อลูกค้าอาจซ้ำกับลูกค้าที่มีอยู่", "SHIPPING_CUSTOMER_IMPORT_IDENTIFIER_CUSTOMER_MISSING": "ไม่พบลูกค้าที่ตรงกับหลักฐาน", "SHIPPING_CUSTOMER_IMPORT_NOT_FOUND": "ไม่พบชุดนำเข้า", "SHIPPING_CUSTOMER_IMPORT_ROW_NOT_FOUND": "ไม่พบแถวนำเข้า", "SHIPPING_CUSTOMER_IMPORT_DECISION_INVALID": "การดำเนินการของแถวไม่ถูกต้อง", "SHIPPING_CUSTOMER_IMPORT_TARGET_REQUIRED": "ต้องเลือกลูกค้าเป้าหมายสำหรับอัปเดตหรือรวม", "SHIPPING_CUSTOMER_IMPORT_HAS_ERRORS": "ชุดนำเข้ามีข้อผิดพลาดที่บล็อก", "SHIPPING_CUSTOMER_IMPORT_DECISIONS_REQUIRED": "จัดการแถวคำเตือนทั้งหมดก่อน", "SHIPPING_CUSTOMER_IMPORT_ALREADY_PUBLISHED": "ชุดนำเข้าเผยแพร่แล้ว", "SHIPPING_CUSTOMER_IMPORT_UPLOAD_CONFLICT": "เกิดข้อขัดแย้งระหว่างอัปโหลด", "SHIPPING_CUSTOMER_IMPORT_PUBLISH_CONFLICT": "เกิดข้อขัดแย้งของข้อมูลระหว่างเผยแพร่"
"SHIPPING_CUSTOMER_NOT_FOUND": "ไม่พบลูกค้า",
"SHIPPING_CUSTOMER_CHANGE_REASON_REQUIRED": "ต้องระบุเหตุผลเมื่อแก้ไขสถานะ รหัสย่อ หรือสิทธิ์การจับคู่อัตโนมัติของลูกค้า",
"SHIPPING_CUSTOMER_NAME_REQUIRED": "ต้องระบุชื่อลูกค้ามาตรฐาน",
"SHIPPING_CUSTOMER_SHORT_CODE_INVALID": "รหัสย่อลูกค้าต้องเป็นตัวอักษร 2-6 ตัว",
"SHIPPING_CUSTOMER_SHORT_CODE_EXISTS": "รหัสย่อลูกค้ามีอยู่แล้ว",
"SHIPPING_CUSTOMER_STATUS_INVALID": "สถานะลูกค้าไม่ถูกต้อง",
"SHIPPING_CUSTOMER_CONFLICT": "ข้อมูลลูกค้าขัดแย้ง",
"SHIPPING_CUSTOMER_IDENTIFIER_TYPE_INVALID": "ประเภทหลักฐานไม่ถูกต้อง",
"SHIPPING_CUSTOMER_IDENTIFIER_VALUE_REQUIRED": "ต้องระบุค่าหลักฐาน",
"SHIPPING_CUSTOMER_EMAIL_INVALID": "อีเมลลูกค้าไม่ถูกต้อง",
"SHIPPING_CUSTOMER_DOMAIN_INVALID": "โดเมนลูกค้าไม่ถูกต้อง",
"SHIPPING_CUSTOMER_IDENTIFIER_STATUS_INVALID": "สถานะหลักฐานไม่ถูกต้อง",
"SHIPPING_CUSTOMER_IDENTIFIER_NOT_FOUND": "ไม่พบหลักฐาน",
"SHIPPING_CUSTOMER_IDENTIFIER_EXISTS": "หลักฐานนี้มีอยู่แล้ว",
"SHIPPING_CUSTOMER_IDENTIFIER_NOT_APPROVED": "เปิดจับคู่อัตโนมัติได้เฉพาะหลักฐานที่อนุมัติแล้ว",
"SHIPPING_CUSTOMER_PUBLIC_DOMAIN_AUTO_MATCH_FORBIDDEN": "โดเมนอีเมลสาธารณะใช้จับคู่อัตโนมัติไม่ได้",
"SHIPPING_CUSTOMER_EXTERNAL_REF_CONFLICT": "รหัสลูกค้าเดิมผูกกับลูกค้ารายอื่นแล้ว",
"SHIPPING_CUSTOMER_IMPORT_FILE_REQUIRED": "เลือกไฟล์นำเข้า",
"SHIPPING_CUSTOMER_IMPORT_FILE_TYPE_INVALID": "รองรับเฉพาะไฟล์ .xlsx",
"SHIPPING_CUSTOMER_IMPORT_FILE_EMPTY": "ไฟล์นำเข้าว่าง",
"SHIPPING_CUSTOMER_IMPORT_FILE_TOO_LARGE": "ไฟล์นำเข้าเกิน 5 MB",
"SHIPPING_CUSTOMER_IMPORT_FILE_INVALID": "ไฟล์ Excel นำเข้าไม่ถูกต้อง",
"SHIPPING_CUSTOMER_IMPORT_SHEET_MISSING": "ขาดชีตที่จำเป็น",
"SHIPPING_CUSTOMER_IMPORT_COLUMNS_MISSING": "ขาดคอลัมน์ที่จำเป็น",
"SHIPPING_CUSTOMER_IMPORT_KEY_REQUIRED": "ต้องระบุรหัสลูกค้าเดิม",
"SHIPPING_CUSTOMER_IMPORT_DUPLICATE_KEY": "รหัสลูกค้าเดิมซ้ำในแหล่งเดียวกัน",
"SHIPPING_CUSTOMER_IMPORT_SHORT_CODE_CONFLICT": "รหัสย่อขัดแย้งกับลูกค้าที่มีอยู่",
"SHIPPING_CUSTOMER_IMPORT_NAME_MATCH": "ชื่อลูกค้าอาจซ้ำกับลูกค้าที่มีอยู่",
"SHIPPING_CUSTOMER_IMPORT_IDENTIFIER_CUSTOMER_MISSING": "ไม่พบลูกค้าที่ตรงกับหลักฐาน",
"SHIPPING_CUSTOMER_IMPORT_NOT_FOUND": "ไม่พบชุดนำเข้า",
"SHIPPING_CUSTOMER_IMPORT_ROW_NOT_FOUND": "ไม่พบแถวนำเข้า",
"SHIPPING_CUSTOMER_IMPORT_DECISION_INVALID": "การดำเนินการของแถวไม่ถูกต้อง",
"SHIPPING_CUSTOMER_IMPORT_TARGET_REQUIRED": "ต้องเลือกลูกค้าเป้าหมายสำหรับอัปเดตหรือรวม",
"SHIPPING_CUSTOMER_IMPORT_HAS_ERRORS": "ชุดนำเข้ามีข้อผิดพลาดที่บล็อก",
"SHIPPING_CUSTOMER_IMPORT_DECISIONS_REQUIRED": "จัดการแถวคำเตือนทั้งหมดก่อน",
"SHIPPING_CUSTOMER_IMPORT_ALREADY_PUBLISHED": "ชุดนำเข้าเผยแพร่แล้ว",
"SHIPPING_CUSTOMER_IMPORT_UPLOAD_CONFLICT": "เกิดข้อขัดแย้งระหว่างอัปโหลด",
"SHIPPING_CUSTOMER_IMPORT_PUBLISH_CONFLICT": "เกิดข้อขัดแย้งของข้อมูลระหว่างเผยแพร่"
}
}
+58 -2
View File
@@ -31,7 +31,36 @@
"shippingCustomers": "货代客户",
"shippingConfig": "货代配置",
"shippingInventory": "库存配置",
"shippingIdentityRules": "客户识别规则"
"shippingIdentityRules": "客户识别规则",
"shippingOrderExtractionRuns": "订单识别运行"
},
"shippingOrderExtractionRuns": {
"eyebrow": "只读运行诊断",
"title": "订单识别运行",
"subtitle": "用于排查异步订单识别的运行、重试尝试与脱敏节点生命周期;不展示订单正文、提示词、输入输出或错误堆栈。",
"refresh": "刷新",
"status": "状态",
"allStatuses": "全部状态",
"total": "共 {count} 条",
"runNo": "运行编号",
"stage": "当前阶段",
"attempts": "尝试次数",
"createdAt": "创建时间",
"totalDuration": "总耗时",
"viewDetail": "查看详情",
"previous": "上一页",
"next": "下一页",
"loading": "正在加载...",
"empty": "暂无运行记录",
"loadFailed": "加载订单识别运行失败",
"detailFailed": "加载运行详情失败",
"detailTitle": "运行诊断详情",
"workflowRunId": "Workflow Run ID",
"errorCode": "错误码",
"jobAttempts": "Job 执行尝试",
"units": "文档单元诊断",
"lifecycle": "脱敏节点生命周期",
"statuses": { "queued": "等待执行", "running": "执行中", "result_persisted": "结果已落库", "completed": "已完成", "needs_review": "需用户处理", "failed": "失败", "cancelled": "已取消" }
},
"shippingOrderSchema": {
"eyebrow": "订单字段模板",
@@ -108,6 +137,12 @@
"searchFields": "搜索显示名称或字段编号",
"fieldCount": "{count} 个字段",
"selectedInGroup": "当前字段",
"dragToReorder": "拖拽调整字段目录的全局顺序",
"dragGuide": "拖动字段左侧手柄调整顺序,仅支持同一分类内排序",
"globalOrderGuide": "拖动字段左侧手柄调整全局顺序;无需草稿或已发布版本,刷新后仍保持",
"orderSaved": "字段顺序已保存",
"orderSaveMismatch": "字段顺序保存后不一致,请刷新后重试",
"dragDisabledBySearch": "清空搜索条件后即可拖拽排序",
"noMatchingFields": "没有匹配的字段",
"cancelAddField": "收起新增",
"publishedRuleViewer": "已发布字段配置",
@@ -131,6 +166,8 @@
"difyExposurePolicyOption": { "never": "从不暴露", "redacted": "脱敏只读", "confirmed_readonly": "冻结值只读" },
"difyExposurePolicyHint": { "never": "该字段不会进入 Dify 输入。", "redacted": "仅传入不可逆占位值,不包含原邮箱、域名或可恢复特征。", "confirmed_readonly": "传入当前 Run 已冻结的 HXOPS 确定性值;不代表客户已确认,Dify 不得回写。" },
"availableForCustomerIdentity": "允许已发布版本用于客户识别",
"orderHeaderIdentityTitle": "可作为客户识别候选证据",
"orderHeaderIdentityHint": "订单信息属于 Header 字段,可作为客户或送货站点候选证据;系统不会仅凭该字段自动确认客户。货品明细不支持此配置。",
"businessFieldFormat": "数据格式",
"placementHeader": "订单信息",
"placementLine": "货品明细",
@@ -675,6 +712,11 @@
"title": "应用配置",
"subtitle": "管理 AI 助手及其集成配置",
"new": "新建应用",
"newInternalExecutor": "新建内部执行器",
"editInternalExecutor": "编辑内部执行器",
"createInternalExecutor": "创建内部执行器",
"tabs": { "applications": "应用", "executors": "内部执行器" },
"executor": { "internalOnly": "仅供后台调用", "empty": "暂无内部执行器", "formSubtitle": "配置供后台能力绑定调用的内部执行器", "workflowExecutor": "Workflow 执行器" },
"edit": "编辑应用",
"create": "创建应用",
"noAgents": "暂无应用配置",
@@ -685,7 +727,9 @@
"config": "配置",
"status": "状态",
"actions": "操作",
"aggregation": "聚合配置"
"aggregation": "聚合配置",
"executorType": "执行器类型",
"runtimeProtocol": "运行协议"
},
"fields": {
"name": "名称",
@@ -811,6 +855,14 @@
"selectProvider": "请选择内部 Dify Workflow",
"timeout": "超时时间(秒)",
"maxAttempts": "最大尝试次数",
"unitConcurrency": "文档并发数(2-4)",
"unitMaxAttempts": "单文档最大尝试次数(1-3)",
"unitRetryBackoff": "单文档重试退避(毫秒)",
"maxModelUnits": "单次 Run 最大模型文档数",
"providerMaxConcurrency": "Provider 进程并发上限",
"circuitFailureThreshold": "熔断连续失败阈值",
"circuitCooldown": "熔断冷却时间(秒)",
"autoCreateEnabled": "通过全部业务门禁后允许自动创建任务",
"noProvider": "暂无符合条件的内部 Dify Workflow,请先创建并测试服务 Provider 应用。",
"providerRequired": "请先选择订单抽取服务 Provider。"
},
@@ -1795,6 +1847,8 @@
"target": "识别对象",
"source": "来源",
"automation": "自动化上限",
"automationPolicy": "自动化上限(由用户授权)",
"automationPolicyHint": "默认仅候选;选择受控自动确认后,仍需审核证据、唯一命中和系统质量门禁全部通过。",
"normalizer": "文本处理方式",
"displayName": "规则名称",
"displayNamePlaceholder": "例如:美国客户发件人邮箱",
@@ -1816,6 +1870,8 @@
"openCustomerMaster": "前往客户主数据维护证据",
"ruleSets": "规则集版本",
"ruleSetHint": "发布后规则快照不可修改;订单字段退役前必须先替换或退役引用它的定义。",
"publishedDefinitions": "本版本实际发布的识别定义",
"publishedDefinitionsEmpty": "该版本未包含识别定义。",
"createDraft": "创建规则草稿",
"saveDraft": "保存草稿",
"publish": "发布规则集",
+33
View File
@@ -118,9 +118,41 @@
"shippingCandidateSelectRequired": "请至少选择一个订单候选后再确认建单。",
"shippingOrderExtractionDefaultPrompt": "请完整解析已上传邮件及附件中的发货订单,并按规则自动建单。",
"shippingOrderExtractionProcessing": "正在识别邮件及附件中的订单",
"shippingOrderExtractionElapsed": "已运行 {seconds} 秒",
"shippingOrderExtractionIdle": "暂未收到新的识别进度,系统仍在等待",
"shippingOrderExtractionSlow": "识别服务响应较慢,系统仍在等待",
"shippingOrderExtractionShowDetails": "查看详情",
"shippingOrderExtractionHideDetails": "收起详情",
"shippingOrderExtractionLoadingDetails": "正在加载阶段详情...",
"shippingOrderExtractionDetailsUnavailable": "暂时无法加载阶段详情,请稍后再试",
"shippingOrderExtractionNoDetails": "暂未收到新的阶段信息",
"shippingOrderExtractionUnread": "有 {count} 条订单识别结果待查看",
"shippingOrderExtractionEventStatus": {
"started": "已开始",
"running": "进行中",
"completed": "已完成",
"failed": "异常",
"recovered": "已恢复",
"updated": "已更新"
},
"shippingOrderExtractionStage": {
"queued": "等待后台执行",
"workflow_accepted": "已连接识别服务",
"document_processing": "正在解析邮件及附件",
"order_recognition": "正在识别订单信息",
"result_processing": "正在整理和校验结果",
"provider_result_ready": "识别完成,正在保存结果",
"hxops_persistence": "正在生成订单任务",
"auto_recovering": "识别服务响应异常,系统正在自动恢复",
"generic_processing": "正在处理识别任务"
},
"shippingOrderExtractionPartiallyCompleted": "部分订单已处理,仍需补充或确认",
"shippingOrderExtractionCompleted": "订单识别完成",
"shippingOrderExtractionFailed": "订单识别失败",
"shippingOrderExtractionFailureHint": "识别服务暂时不可用,请稍后点击“重新识别”。",
"shippingOrderExtractionRetry": "重新识别",
"shippingOrderExtractionRetrying": "正在重新识别...",
"shippingOrderExtractionRetryFailed": "重新识别发起失败,请稍后重试。",
"shippingOrderExtractionCreatedCount": "新建 {count} 个任务",
"shippingOrderExtractionOpenedExistingCount": "打开 {count} 个已有任务",
"shippingOrderExtractionPendingCount": "{count} 个待补充或确认",
@@ -167,6 +199,7 @@
"statusReady": "可继续",
"statusEmpty": "暂无订单行",
"impactHint": "内部料号与 Reservation ID 用于库存匹配;客户料号和 AWS 料号用于追溯,库存源线索用于路由,缺失不阻断。",
"orderInformation": "订单信息",
"missingFields": "待补字段",
"sourceType": "Source Type",
"hubCode": "Hub Code",
+44 -1
View File
@@ -1,6 +1,12 @@
{
"generic": "请求失败。",
"codes": {
"AGENT.EXPOSURE_ROLE_IMMUTABLE": "应用与内部执行器不可互相转换。",
"AGENT.ADMIN_SCOPE_INVALID": "应用管理页签参数无效。",
"AGENT.INTERNAL_EXECUTOR_USER_ACCESS_FORBIDDEN": "内部执行器不能展示、授权或通过普通用户接口访问。",
"SHIPPING_NOTICE.ORDER_EXTRACTION_RUN_NOT_RETRYABLE": "只有识别失败的订单任务可以重新识别。",
"SHIPPING_NOTICE.ORDER_EXTRACTION_RUN_SNAPSHOT_OBSOLETE": "该识别任务使用旧版输入契约,无法重试。请重新发送邮件及附件发起新识别。",
"SHIPPING_NOTICE.ORDER_EXTRACTION_CONVERSATION_ACTIVE": "当前对话已有订单识别任务正在处理,请等待完成后再继续。",
"SHIPPING_ORDER_SCHEMA_NOT_FOUND": "尚未初始化订单模板。",
"SHIPPING_ORDER_SCHEMA_EXISTS": "订单模板已存在。",
"SHIPPING_ORDER_SCHEMA_DRAFT_EXISTS": "已有订单模板草稿,请先完成或发布当前草稿。",
@@ -261,6 +267,43 @@
"SHIPPING_ORDER_CUSTOMER_ROLE_INVALID": "客户角色无效。",
"SHIPPING_ORDER_CUSTOMER_MATCH_NOT_FOUND": "订单客户匹配记录不存在。",
"SHIPPING_ORDER_CUSTOMER_SITE_INVALID": "请选择属于该客户的有效送货站点。",
"SHIPPING_CUSTOMER_NOT_FOUND": "客户不存在。", "SHIPPING_CUSTOMER_CHANGE_REASON_REQUIRED": "修改客户状态、简码或自动匹配授权时必须填写原因。", "SHIPPING_CUSTOMER_NAME_REQUIRED": "标准客户名称必填。", "SHIPPING_CUSTOMER_SHORT_CODE_INVALID": "客户简码必须为 2-6 位英文字母。", "SHIPPING_CUSTOMER_SHORT_CODE_EXISTS": "客户简码已存在。", "SHIPPING_CUSTOMER_STATUS_INVALID": "客户状态无效。", "SHIPPING_CUSTOMER_CONFLICT": "客户数据冲突。", "SHIPPING_CUSTOMER_IDENTIFIER_TYPE_INVALID": "识别证据类型无效。", "SHIPPING_CUSTOMER_IDENTIFIER_VALUE_REQUIRED": "识别证据值必填。", "SHIPPING_CUSTOMER_EMAIL_INVALID": "客户邮箱格式无效。", "SHIPPING_CUSTOMER_DOMAIN_INVALID": "客户域名格式无效。", "SHIPPING_CUSTOMER_IDENTIFIER_STATUS_INVALID": "识别证据状态无效。", "SHIPPING_CUSTOMER_IDENTIFIER_NOT_FOUND": "识别证据不存在。", "SHIPPING_CUSTOMER_IDENTIFIER_EXISTS": "该识别证据已存在。", "SHIPPING_CUSTOMER_IDENTIFIER_NOT_APPROVED": "只有已审核证据才能启用自动匹配。", "SHIPPING_CUSTOMER_PUBLIC_DOMAIN_AUTO_MATCH_FORBIDDEN": "公共邮箱域名不能用于自动匹配。", "SHIPPING_CUSTOMER_EXTERNAL_REF_CONFLICT": "历史客户键已绑定其他客户。", "SHIPPING_CUSTOMER_IMPORT_FILE_REQUIRED": "请选择导入文件。", "SHIPPING_CUSTOMER_IMPORT_FILE_TYPE_INVALID": "仅支持 .xlsx 文件。", "SHIPPING_CUSTOMER_IMPORT_FILE_EMPTY": "导入文件为空。", "SHIPPING_CUSTOMER_IMPORT_FILE_TOO_LARGE": "导入文件超过 5 MB。", "SHIPPING_CUSTOMER_IMPORT_FILE_INVALID": "导入 Excel 无效。", "SHIPPING_CUSTOMER_IMPORT_SHEET_MISSING": "导入文件缺少必要 Sheet。", "SHIPPING_CUSTOMER_IMPORT_COLUMNS_MISSING": "导入文件缺少必要列。", "SHIPPING_CUSTOMER_IMPORT_KEY_REQUIRED": "历史客户键必填。", "SHIPPING_CUSTOMER_IMPORT_DUPLICATE_KEY": "同一来源存在重复历史客户键。", "SHIPPING_CUSTOMER_IMPORT_SHORT_CODE_CONFLICT": "客户简码与现有客户冲突。", "SHIPPING_CUSTOMER_IMPORT_NAME_MATCH": "客户名称可能与现有客户重复。", "SHIPPING_CUSTOMER_IMPORT_IDENTIFIER_CUSTOMER_MISSING": "识别证据找不到对应客户。", "SHIPPING_CUSTOMER_IMPORT_NOT_FOUND": "导入批次不存在。", "SHIPPING_CUSTOMER_IMPORT_ROW_NOT_FOUND": "导入行不存在。", "SHIPPING_CUSTOMER_IMPORT_DECISION_INVALID": "导入行处理动作无效。", "SHIPPING_CUSTOMER_IMPORT_TARGET_REQUIRED": "更新或合并时必须选择目标客户。", "SHIPPING_CUSTOMER_IMPORT_HAS_ERRORS": "导入批次存在阻断错误。", "SHIPPING_CUSTOMER_IMPORT_DECISIONS_REQUIRED": "请先处理全部警告行。", "SHIPPING_CUSTOMER_IMPORT_ALREADY_PUBLISHED": "导入批次已发布。", "SHIPPING_CUSTOMER_IMPORT_UPLOAD_CONFLICT": "上传导入批次时发生冲突。", "SHIPPING_CUSTOMER_IMPORT_PUBLISH_CONFLICT": "发布导入批次时发生数据冲突。"
"SHIPPING_CUSTOMER_NOT_FOUND": "客户不存在。",
"SHIPPING_CUSTOMER_CHANGE_REASON_REQUIRED": "修改客户状态、简码或自动匹配授权时必须填写原因。",
"SHIPPING_CUSTOMER_NAME_REQUIRED": "标准客户名称必填。",
"SHIPPING_CUSTOMER_SHORT_CODE_INVALID": "客户简码必须为 2-6 位英文字母。",
"SHIPPING_CUSTOMER_SHORT_CODE_EXISTS": "客户简码已存在。",
"SHIPPING_CUSTOMER_STATUS_INVALID": "客户状态无效。",
"SHIPPING_CUSTOMER_CONFLICT": "客户数据冲突。",
"SHIPPING_CUSTOMER_IDENTIFIER_TYPE_INVALID": "识别证据类型无效。",
"SHIPPING_CUSTOMER_IDENTIFIER_VALUE_REQUIRED": "识别证据值必填。",
"SHIPPING_CUSTOMER_EMAIL_INVALID": "客户邮箱格式无效。",
"SHIPPING_CUSTOMER_DOMAIN_INVALID": "客户域名格式无效。",
"SHIPPING_CUSTOMER_IDENTIFIER_STATUS_INVALID": "识别证据状态无效。",
"SHIPPING_CUSTOMER_IDENTIFIER_NOT_FOUND": "识别证据不存在。",
"SHIPPING_CUSTOMER_IDENTIFIER_EXISTS": "该识别证据已存在。",
"SHIPPING_CUSTOMER_IDENTIFIER_NOT_APPROVED": "只有已审核证据才能启用自动匹配。",
"SHIPPING_CUSTOMER_PUBLIC_DOMAIN_AUTO_MATCH_FORBIDDEN": "公共邮箱域名不能用于自动匹配。",
"SHIPPING_CUSTOMER_EXTERNAL_REF_CONFLICT": "历史客户键已绑定其他客户。",
"SHIPPING_CUSTOMER_IMPORT_FILE_REQUIRED": "请选择导入文件。",
"SHIPPING_CUSTOMER_IMPORT_FILE_TYPE_INVALID": "仅支持 .xlsx 文件。",
"SHIPPING_CUSTOMER_IMPORT_FILE_EMPTY": "导入文件为空。",
"SHIPPING_CUSTOMER_IMPORT_FILE_TOO_LARGE": "导入文件超过 5 MB。",
"SHIPPING_CUSTOMER_IMPORT_FILE_INVALID": "导入 Excel 无效。",
"SHIPPING_CUSTOMER_IMPORT_SHEET_MISSING": "导入文件缺少必要 Sheet。",
"SHIPPING_CUSTOMER_IMPORT_COLUMNS_MISSING": "导入文件缺少必要列。",
"SHIPPING_CUSTOMER_IMPORT_KEY_REQUIRED": "历史客户键必填。",
"SHIPPING_CUSTOMER_IMPORT_DUPLICATE_KEY": "同一来源存在重复历史客户键。",
"SHIPPING_CUSTOMER_IMPORT_SHORT_CODE_CONFLICT": "客户简码与现有客户冲突。",
"SHIPPING_CUSTOMER_IMPORT_NAME_MATCH": "客户名称可能与现有客户重复。",
"SHIPPING_CUSTOMER_IMPORT_IDENTIFIER_CUSTOMER_MISSING": "识别证据找不到对应客户。",
"SHIPPING_CUSTOMER_IMPORT_NOT_FOUND": "导入批次不存在。",
"SHIPPING_CUSTOMER_IMPORT_ROW_NOT_FOUND": "导入行不存在。",
"SHIPPING_CUSTOMER_IMPORT_DECISION_INVALID": "导入行处理动作无效。",
"SHIPPING_CUSTOMER_IMPORT_TARGET_REQUIRED": "更新或合并时必须选择目标客户。",
"SHIPPING_CUSTOMER_IMPORT_HAS_ERRORS": "导入批次存在阻断错误。",
"SHIPPING_CUSTOMER_IMPORT_DECISIONS_REQUIRED": "请先处理全部警告行。",
"SHIPPING_CUSTOMER_IMPORT_ALREADY_PUBLISHED": "导入批次已发布。",
"SHIPPING_CUSTOMER_IMPORT_UPLOAD_CONFLICT": "上传导入批次时发生冲突。",
"SHIPPING_CUSTOMER_IMPORT_PUBLISH_CONFLICT": "发布导入批次时发生数据冲突。"
}
}
+26 -6
View File
@@ -30,7 +30,12 @@
"shippingCustomers": "貨代客戶",
"shippingConfig": "貨代設定",
"shippingInventory": "庫存設定",
"shippingIdentityRules": "客戶識別規則"
"shippingIdentityRules": "客戶識別規則",
"shippingOrderExtractionRuns": "訂單識別運行"
},
"shippingOrderExtractionRuns": {
"eyebrow": "唯讀執行診斷", "title": "訂單識別運行", "subtitle": "用於排查非同步訂單識別的運行、重試嘗試與脫敏節點生命週期;不顯示訂單正文、提示詞、輸入輸出或錯誤堆疊。", "refresh": "重新整理", "status": "狀態", "allStatuses": "全部狀態", "total": "共 {count} 筆", "runNo": "運行編號", "stage": "目前階段", "attempts": "嘗試次數", "createdAt": "建立時間", "totalDuration": "總耗時", "viewDetail": "查看詳情", "previous": "上一頁", "next": "下一頁", "loading": "正在載入...", "empty": "暫無運行記錄", "loadFailed": "載入訂單識別運行失敗", "detailFailed": "載入運行詳情失敗", "detailTitle": "運行診斷詳情", "workflowRunId": "Workflow Run ID", "errorCode": "錯誤碼", "jobAttempts": "Job 執行嘗試", "units": "文件單元診斷", "lifecycle": "脫敏節點生命週期",
"statuses": { "queued": "等待執行", "running": "執行中", "result_persisted": "結果已落庫", "completed": "已完成", "needs_review": "需使用者處理", "failed": "失敗", "cancelled": "已取消" }
},
"shippingOrderSchema": {
"eyebrow": "訂單欄位範本",
@@ -114,6 +119,12 @@
"searchFields": "搜尋顯示名稱或欄位編號",
"fieldCount": "{count} 個欄位",
"selectedInGroup": "目前欄位",
"dragToReorder": "拖曳調整欄位目錄的全域順序",
"dragGuide": "拖動欄位左側把手調整順序,僅支援同一分類內排序",
"globalOrderGuide": "拖動欄位左側把手調整全域順序;無需草稿或已發布版本,重新整理後仍保留",
"orderSaved": "欄位順序已儲存",
"orderSaveMismatch": "欄位順序儲存後不一致,請重新整理後再試",
"dragDisabledBySearch": "清除搜尋條件後即可拖曳排序",
"noMatchingFields": "沒有符合的欄位",
"cancelAddField": "收起新增",
"publishedRuleViewer": "已發佈欄位設定",
@@ -205,7 +216,9 @@
"difyExposurePolicy": "Dify 唯讀暴露策略",
"difyExposurePolicyOption": {"never":"永不暴露","redacted":"遮罩唯讀","confirmed_readonly":"凍結值唯讀"},
"difyExposurePolicyHint": {"never":"此欄位不會進入 Dify 輸入。","redacted":"僅傳入不可逆佔位值,不含原始電子郵件、網域或可恢復特徵。","confirmed_readonly":"傳入目前 Run 已凍結的 HXOPS 確定性值;不代表客戶已確認,Dify 不得回寫。"},
"availableForCustomerIdentity": "允許已發布版本用於客戶識別"
"availableForCustomerIdentity": "允許已發布版本用於客戶識別",
"orderHeaderIdentityTitle": "可作為客戶識別候選證據",
"orderHeaderIdentityHint": "訂單資訊屬於 Header 欄位,可作為客戶或送貨站點候選證據;系統不會只憑此欄位自動確認客戶。貨品明細不支援此設定。"
},
"shippingInventory": {
"title": "貨代設定",
@@ -641,6 +654,11 @@
"title": "應用配置",
"subtitle": "管理 AI 助手及其集成配置",
"new": "新建應用",
"newInternalExecutor": "新建內部執行器",
"editInternalExecutor": "編輯內部執行器",
"createInternalExecutor": "建立內部執行器",
"tabs": { "applications": "應用", "executors": "內部執行器" },
"executor": { "internalOnly": "僅供後台呼叫", "empty": "暫無內部執行器", "formSubtitle": "設定供後台能力綁定呼叫的內部執行器", "workflowExecutor": "Workflow 執行器" },
"edit": "編輯應用",
"create": "創建應用",
"noAgents": "暫無應用配置",
@@ -651,7 +669,9 @@
"config": "配置",
"status": "狀態",
"actions": "操作",
"aggregation": "聚合設定"
"aggregation": "聚合設定",
"executorType": "執行器類型",
"runtimeProtocol": "執行協議"
},
"fields": {
"name": "名稱",
@@ -838,7 +858,7 @@
"normalListHint": "僅目前應用"
}
,
"runtimeBinding": {"title":"後台業務能力綁定","subtitle":"為目前入口應用明確選擇後台業務 Provider,不按名稱或環境變數回退。","exposureMode":"應用可見性","exposureWorkspace":"工作台入口","exposureInternal":"內部業務 Provider","exposureHint":"內部應用僅供後台業務綁定,不向一般使用者顯示。","enabled":"啟用訂單抽取服務","provider":"訂單抽取服務 Provider","selectProvider":"請選擇內部 Dify Workflow","timeout":"逾時時間(秒)","maxAttempts":"最大嘗試次數","noProvider":"暫無符合條件的內部 Dify Workflow,請先建立並測試服務 Provider 應用。","providerRequired":"請先選擇訂單抽取服務 Provider。"}
"runtimeBinding": {"title":"後台業務能力綁定","subtitle":"為目前入口應用明確選擇後台業務 Provider,不按名稱或環境變數回退。","exposureMode":"應用可見性","exposureWorkspace":"工作台入口","exposureInternal":"內部業務 Provider","exposureHint":"內部應用僅供後台業務綁定,不向一般使用者顯示。","enabled":"啟用訂單抽取服務","provider":"訂單抽取服務 Provider","selectProvider":"請選擇內部 Dify Workflow","timeout":"逾時時間(秒)","maxAttempts":"最大嘗試次數","unitConcurrency":"文件並行數(2-4)","unitMaxAttempts":"單文件最大嘗試次數(1-3)","unitRetryBackoff":"單文件重試退避(毫秒)","maxModelUnits":"單次 Run 最大模型文件數","providerMaxConcurrency":"Provider 行程並行上限","circuitFailureThreshold":"熔斷連續失敗門檻","circuitCooldown":"熔斷冷卻時間(秒)","autoCreateEnabled":"通過全部業務門禁後允許自動建立任務","noProvider":"暫無符合條件的內部 Dify Workflow,請先建立並測試服務 Provider 應用。","providerRequired":"請先選擇訂單抽取服務 Provider。"}
},
"question": {
"title": "常用問題",
@@ -1635,10 +1655,10 @@
"loading": "正在載入識別規則...",
"definitions": "識別定義",
"definitionHint": "請選擇目前已發布 Schema 中允許客戶識別的 Header 欄位;執行時只使用該欄位的已裁決值。",
"code": "定義編碼", "target": "識別對象", "source": "來源", "automation": "自動化上限", "normalizer": "文字處理方式",
"code": "定義編碼", "target": "識別對象", "source": "來源", "automation": "自動化上限", "automationPolicy": "自動化上限(由使用者授權)", "automationPolicyHint": "預設僅作為候選;選擇受控自動確認後,仍須通過證據審核、唯一命中與系統品質門禁。", "normalizer": "文字處理方式",
"displayName": "規則名稱", "displayNamePlaceholder": "例如:美國客戶寄件者電子郵件", "evidenceLabel": "客戶主資料中的證據名稱", "evidenceLabelPlaceholder": "例如:客戶業務電子郵件", "description": "使用說明(可選)", "descriptionPlaceholder": "例如:用於識別美國區域的帳款客戶", "formGuide": "填寫業務名稱並選擇識別欄位;採集方式、格式與校驗規則全部繼承已發布訂單 Schema。", "emailType": "郵件識別內容", "identityAttribute": "用於識別什麼", "templateValue": "目前單據的版式特徵", "selectionResult": "本次規則將使用",
"selectField": "請選擇已發布識別欄位", "addDefinition": "新增業務定義", "definitionSaved": "識別定義已儲存", "workflowTitle": "設定順序", "workflowHint": "1. 新增識別定義;2. 建立、儲存並發布規則集;3. 返回客戶主資料維護客戶或送貨站點證據。", "openCustomerMaster": "前往客戶主資料維護證據",
"ruleSets": "規則集版本", "ruleSetHint": "發布後快照不可修改;退役訂單欄位前必須先替換或退役其引用定義。",
"ruleSets": "規則集版本", "ruleSetHint": "發布後快照不可修改;退役訂單欄位前必須先替換或退役其引用定義。", "publishedDefinitions": "本版本實際發布的識別定義", "publishedDefinitionsEmpty": "此版本未包含識別定義。",
"createDraft": "建立規則草稿", "saveDraft": "儲存草稿", "publish": "發布規則集", "ruleSetSaved": "規則草稿已儲存", "ruleSetPublished": "識別規則集已發布", "operationFailed": "客戶識別規則操作失敗",
"targets": { "customer": "客戶主體", "site": "送貨站點" }, "automations": { "none": "僅候選/人工確認", "conditional": "受控自動確認" }, "status": { "draft": "草稿", "published": "目前發布", "retired": "已退役" }
,
+23
View File
@@ -118,9 +118,31 @@
"shippingCandidateSelectRequired": "請至少選擇一個訂單候選後再確認建單。",
"shippingOrderExtractionDefaultPrompt": "請完整解析已上傳郵件及附件中的發貨訂單,並依規則自動建單。",
"shippingOrderExtractionProcessing": "正在識別郵件及附件中的訂單",
"shippingOrderExtractionElapsed": "已執行 {seconds} 秒",
"shippingOrderExtractionIdle": "暫未收到新的識別進度,系統仍在等待",
"shippingOrderExtractionSlow": "識別服務回應較慢,系統仍在等待",
"shippingOrderExtractionShowDetails": "查看詳情",
"shippingOrderExtractionHideDetails": "收起詳情",
"shippingOrderExtractionLoadingDetails": "正在載入階段詳情...",
"shippingOrderExtractionDetailsUnavailable": "暫時無法載入階段詳情,請稍後再試",
"shippingOrderExtractionNoDetails": "暫未收到新的階段資訊",
"shippingOrderExtractionUnread": "有 {count} 項訂單識別結果待查看",
"shippingOrderExtractionEventStatus": {
"started": "已開始",
"running": "進行中",
"completed": "已完成",
"failed": "發生異常",
"recovered": "已恢復",
"updated": "已更新"
},
"shippingOrderExtractionStage": {"queued":"等待背景執行","workflow_accepted":"已連接識別服務","document_processing":"正在解析郵件及附件","order_recognition":"正在識別訂單資訊","result_processing":"正在整理和校驗結果","provider_result_ready":"識別完成,正在儲存結果","hxops_persistence":"正在建立訂單任務","auto_recovering":"識別服務回應異常,系統正在自動恢復","generic_processing":"正在處理識別任務"},
"shippingOrderExtractionPartiallyCompleted": "部分訂單已處理,仍需補充或確認",
"shippingOrderExtractionCompleted": "訂單識別完成",
"shippingOrderExtractionFailed": "訂單識別失敗",
"shippingOrderExtractionFailureHint": "識別服務暫時無法使用,請稍後點選「重新識別」。",
"shippingOrderExtractionRetry": "重新識別",
"shippingOrderExtractionRetrying": "正在重新識別...",
"shippingOrderExtractionRetryFailed": "重新識別啟動失敗,請稍後再試。",
"shippingOrderExtractionCreatedCount": "新建 {count} 個任務",
"shippingOrderExtractionOpenedExistingCount": "開啟 {count} 個既有任務",
"shippingOrderExtractionPendingCount": "{count} 個待補充或確認",
@@ -167,6 +189,7 @@
"statusReady": "可繼續",
"statusEmpty": "暫無訂單行",
"impactHint": "內部料號與 Reservation ID 用於庫存匹配;客戶料號和 AWS 料號用於追溯,庫存源線索用於路由,缺失不阻斷。",
"orderInformation": "訂單資訊",
"missingFields": "待補欄位",
"sourceType": "Source Type",
"hubCode": "Hub Code",
+49 -2
View File
@@ -1,6 +1,12 @@
{
"generic": "請求失敗。",
"codes": {
"AGENT.EXPOSURE_ROLE_IMMUTABLE": "應用與內部執行器不可互相轉換。",
"AGENT.ADMIN_SCOPE_INVALID": "應用管理頁籤參數無效。",
"AGENT.INTERNAL_EXECUTOR_USER_ACCESS_FORBIDDEN": "內部執行器不能顯示、授權或透過一般使用者介面存取。",
"SHIPPING_NOTICE.ORDER_EXTRACTION_RUN_NOT_RETRYABLE": "只有識別失敗的訂單任務可以重新識別。",
"SHIPPING_NOTICE.ORDER_EXTRACTION_RUN_SNAPSHOT_OBSOLETE": "此識別任務使用舊版輸入契約,無法重試。請重新傳送郵件及附件以開始新的識別。",
"SHIPPING_NOTICE.ORDER_EXTRACTION_CONVERSATION_ACTIVE": "目前對話已有訂單識別任務正在處理,請等待完成後再繼續。",
"SHIPPING_ORDER_SCHEMA_NOT_FOUND": "尚未初始化訂單範本。",
"SHIPPING_ORDER_SCHEMA_EXISTS": "訂單範本已存在。",
"SHIPPING_ORDER_SCHEMA_DRAFT_EXISTS": "已有訂單範本草稿,請先完成或發布目前草稿。",
@@ -129,7 +135,11 @@
"SHIPPING_TEMP_INVENTORY_QUALITY_INVALID": "臨時庫存檔案未通過料號、預約號或可用庫存數量驗證。",
"SHIPPING_TEMP_INVENTORY_SESSION_EXPIRED": "臨時庫存會話已過期,請重新上傳檔案。",
"SHIPPING_TEMP_INVENTORY_TASK_NOT_FOUND": "目前對話中找不到可使用該臨時庫存的發貨任務。",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_INVALID": "請在庫存站點停用狀態下執行測試匯出。", "SHIPPING_INVENTORY_CONFIGURATION_TEST_UNAVAILABLE": "RPA Worker 目前不可用,無法發起測試匯出。", "SHIPPING_INVENTORY_CONFIGURATION_TEST_NOT_FOUND": "庫存站點測試匯出記錄不存在。", "SHIPPING_INVENTORY_CONFIGURATION_TEST_NOT_READY": "測試匯出尚未完成,暫時不能確認解析方案。", "SHIPPING_INVENTORY_CONFIGURATION_TEST_STALE": "庫存站點設定已變更,請重新測試匯出。",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_INVALID": "請在庫存站點停用狀態下執行測試匯出。",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_UNAVAILABLE": "RPA Worker 目前不可用,無法發起測試匯出。",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_NOT_FOUND": "庫存站點測試匯出記錄不存在。",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_NOT_READY": "測試匯出尚未完成,暫時不能確認解析方案。",
"SHIPPING_INVENTORY_CONFIGURATION_TEST_STALE": "庫存站點設定已變更,請重新測試匯出。",
"SHIPPING_RPA_PROFILE_CONFLICT": "貨代登入設定名稱已存在。",
"SHIPPING_RPA_PROFILE_DELETE_BLOCKED": "貨代登入設定仍被庫存來源引用,不能刪除。",
"SHIPPING_RPA_PROFILE_DISABLE_BLOCKED": "貨代登入設定仍被啟用的庫存來源引用,不能停用。",
@@ -257,6 +267,43 @@
"SHIPPING_ORDER_CUSTOMER_ROLE_INVALID": "客戶角色無效。",
"SHIPPING_ORDER_CUSTOMER_MATCH_NOT_FOUND": "訂單客戶匹配記錄不存在。",
"SHIPPING_ORDER_CUSTOMER_SITE_INVALID": "請選擇屬於該客戶的有效送貨站點。",
"SHIPPING_CUSTOMER_NOT_FOUND": "客戶不存在。", "SHIPPING_CUSTOMER_CHANGE_REASON_REQUIRED": "修改客戶狀態、簡碼或自動匹配授權時必須填寫原因。", "SHIPPING_CUSTOMER_NAME_REQUIRED": "標準客戶名稱必填。", "SHIPPING_CUSTOMER_SHORT_CODE_INVALID": "客戶簡碼必須為 2-6 位英文字母。", "SHIPPING_CUSTOMER_SHORT_CODE_EXISTS": "客戶簡碼已存在。", "SHIPPING_CUSTOMER_STATUS_INVALID": "客戶狀態無效。", "SHIPPING_CUSTOMER_CONFLICT": "客戶資料衝突。", "SHIPPING_CUSTOMER_IDENTIFIER_TYPE_INVALID": "識別證據類型無效。", "SHIPPING_CUSTOMER_IDENTIFIER_VALUE_REQUIRED": "識別證據值必填。", "SHIPPING_CUSTOMER_EMAIL_INVALID": "客戶郵箱格式無效。", "SHIPPING_CUSTOMER_DOMAIN_INVALID": "客戶網域格式無效。", "SHIPPING_CUSTOMER_IDENTIFIER_STATUS_INVALID": "識別證據狀態無效。", "SHIPPING_CUSTOMER_IDENTIFIER_NOT_FOUND": "識別證據不存在。", "SHIPPING_CUSTOMER_IDENTIFIER_EXISTS": "該識別證據已存在。", "SHIPPING_CUSTOMER_IDENTIFIER_NOT_APPROVED": "只有已審核證據才能啟用自動匹配。", "SHIPPING_CUSTOMER_PUBLIC_DOMAIN_AUTO_MATCH_FORBIDDEN": "公共郵箱網域不能用於自動匹配。", "SHIPPING_CUSTOMER_EXTERNAL_REF_CONFLICT": "歷史客戶鍵已綁定其他客戶。", "SHIPPING_CUSTOMER_IMPORT_FILE_REQUIRED": "請選擇匯入檔案。", "SHIPPING_CUSTOMER_IMPORT_FILE_TYPE_INVALID": "僅支援 .xlsx 檔案。", "SHIPPING_CUSTOMER_IMPORT_FILE_EMPTY": "匯入檔案為空。", "SHIPPING_CUSTOMER_IMPORT_FILE_TOO_LARGE": "匯入檔案超過 5 MB。", "SHIPPING_CUSTOMER_IMPORT_FILE_INVALID": "匯入 Excel 無效。", "SHIPPING_CUSTOMER_IMPORT_SHEET_MISSING": "匯入檔案缺少必要 Sheet。", "SHIPPING_CUSTOMER_IMPORT_COLUMNS_MISSING": "匯入檔案缺少必要欄位。", "SHIPPING_CUSTOMER_IMPORT_KEY_REQUIRED": "歷史客戶鍵必填。", "SHIPPING_CUSTOMER_IMPORT_DUPLICATE_KEY": "同一來源存在重複歷史客戶鍵。", "SHIPPING_CUSTOMER_IMPORT_SHORT_CODE_CONFLICT": "客戶簡碼與現有客戶衝突。", "SHIPPING_CUSTOMER_IMPORT_NAME_MATCH": "客戶名稱可能與現有客戶重複。", "SHIPPING_CUSTOMER_IMPORT_IDENTIFIER_CUSTOMER_MISSING": "識別證據找不到對應客戶。", "SHIPPING_CUSTOMER_IMPORT_NOT_FOUND": "匯入批次不存在。", "SHIPPING_CUSTOMER_IMPORT_ROW_NOT_FOUND": "匯入行不存在。", "SHIPPING_CUSTOMER_IMPORT_DECISION_INVALID": "匯入行處理動作無效。", "SHIPPING_CUSTOMER_IMPORT_TARGET_REQUIRED": "更新或合併時必須選擇目標客戶。", "SHIPPING_CUSTOMER_IMPORT_HAS_ERRORS": "匯入批次存在阻斷錯誤。", "SHIPPING_CUSTOMER_IMPORT_DECISIONS_REQUIRED": "請先處理全部警告行。", "SHIPPING_CUSTOMER_IMPORT_ALREADY_PUBLISHED": "匯入批次已發佈。", "SHIPPING_CUSTOMER_IMPORT_UPLOAD_CONFLICT": "上傳匯入批次時發生衝突。", "SHIPPING_CUSTOMER_IMPORT_PUBLISH_CONFLICT": "發佈匯入批次時發生資料衝突。"
"SHIPPING_CUSTOMER_NOT_FOUND": "客戶不存在。",
"SHIPPING_CUSTOMER_CHANGE_REASON_REQUIRED": "修改客戶狀態、簡碼或自動匹配授權時必須填寫原因。",
"SHIPPING_CUSTOMER_NAME_REQUIRED": "標準客戶名稱必填。",
"SHIPPING_CUSTOMER_SHORT_CODE_INVALID": "客戶簡碼必須為 2-6 位英文字母。",
"SHIPPING_CUSTOMER_SHORT_CODE_EXISTS": "客戶簡碼已存在。",
"SHIPPING_CUSTOMER_STATUS_INVALID": "客戶狀態無效。",
"SHIPPING_CUSTOMER_CONFLICT": "客戶資料衝突。",
"SHIPPING_CUSTOMER_IDENTIFIER_TYPE_INVALID": "識別證據類型無效。",
"SHIPPING_CUSTOMER_IDENTIFIER_VALUE_REQUIRED": "識別證據值必填。",
"SHIPPING_CUSTOMER_EMAIL_INVALID": "客戶郵箱格式無效。",
"SHIPPING_CUSTOMER_DOMAIN_INVALID": "客戶網域格式無效。",
"SHIPPING_CUSTOMER_IDENTIFIER_STATUS_INVALID": "識別證據狀態無效。",
"SHIPPING_CUSTOMER_IDENTIFIER_NOT_FOUND": "識別證據不存在。",
"SHIPPING_CUSTOMER_IDENTIFIER_EXISTS": "該識別證據已存在。",
"SHIPPING_CUSTOMER_IDENTIFIER_NOT_APPROVED": "只有已審核證據才能啟用自動匹配。",
"SHIPPING_CUSTOMER_PUBLIC_DOMAIN_AUTO_MATCH_FORBIDDEN": "公共郵箱網域不能用於自動匹配。",
"SHIPPING_CUSTOMER_EXTERNAL_REF_CONFLICT": "歷史客戶鍵已綁定其他客戶。",
"SHIPPING_CUSTOMER_IMPORT_FILE_REQUIRED": "請選擇匯入檔案。",
"SHIPPING_CUSTOMER_IMPORT_FILE_TYPE_INVALID": "僅支援 .xlsx 檔案。",
"SHIPPING_CUSTOMER_IMPORT_FILE_EMPTY": "匯入檔案為空。",
"SHIPPING_CUSTOMER_IMPORT_FILE_TOO_LARGE": "匯入檔案超過 5 MB。",
"SHIPPING_CUSTOMER_IMPORT_FILE_INVALID": "匯入 Excel 無效。",
"SHIPPING_CUSTOMER_IMPORT_SHEET_MISSING": "匯入檔案缺少必要 Sheet。",
"SHIPPING_CUSTOMER_IMPORT_COLUMNS_MISSING": "匯入檔案缺少必要欄位。",
"SHIPPING_CUSTOMER_IMPORT_KEY_REQUIRED": "歷史客戶鍵必填。",
"SHIPPING_CUSTOMER_IMPORT_DUPLICATE_KEY": "同一來源存在重複歷史客戶鍵。",
"SHIPPING_CUSTOMER_IMPORT_SHORT_CODE_CONFLICT": "客戶簡碼與現有客戶衝突。",
"SHIPPING_CUSTOMER_IMPORT_NAME_MATCH": "客戶名稱可能與現有客戶重複。",
"SHIPPING_CUSTOMER_IMPORT_IDENTIFIER_CUSTOMER_MISSING": "識別證據找不到對應客戶。",
"SHIPPING_CUSTOMER_IMPORT_NOT_FOUND": "匯入批次不存在。",
"SHIPPING_CUSTOMER_IMPORT_ROW_NOT_FOUND": "匯入行不存在。",
"SHIPPING_CUSTOMER_IMPORT_DECISION_INVALID": "匯入行處理動作無效。",
"SHIPPING_CUSTOMER_IMPORT_TARGET_REQUIRED": "更新或合併時必須選擇目標客戶。",
"SHIPPING_CUSTOMER_IMPORT_HAS_ERRORS": "匯入批次存在阻斷錯誤。",
"SHIPPING_CUSTOMER_IMPORT_DECISIONS_REQUIRED": "請先處理全部警告行。",
"SHIPPING_CUSTOMER_IMPORT_ALREADY_PUBLISHED": "匯入批次已發佈。",
"SHIPPING_CUSTOMER_IMPORT_UPLOAD_CONFLICT": "上傳匯入批次時發生衝突。",
"SHIPPING_CUSTOMER_IMPORT_PUBLISH_CONFLICT": "發佈匯入批次時發生資料衝突。"
}
}