feat(shipping-notice): 新增订单行与字段冲突管理功能,支持字段冲突查询与解决
This commit is contained in:
1 parent
4fbaed2b4c
commit
9da0481fc3
74 files changed
+4861
-375
No files matched your search
@@ -352,10 +352,18 @@ export async function updateWorkspaceShippingNoticeFields(
|
||||
taskNo: string,
|
||||
fields: Partial<ShippingNoticeHeader>,
|
||||
comment?: string,
|
||||
options?: { expectedOrderDataVersion?: number; idempotencyKey?: string },
|
||||
) {
|
||||
const body = await requestJson<ShippingDecisionResponse & ShippingApiStatusPayload>(
|
||||
`/api/workspace/shipping-tasks/${encodeURIComponent(taskNo)}/update-notice-fields`,
|
||||
jsonPost({ fields, ...(comment ? { comment } : {}) }),
|
||||
jsonPost({
|
||||
fields,
|
||||
...(comment ? { comment } : {}),
|
||||
...(options?.expectedOrderDataVersion != null
|
||||
? { expected_order_data_version: options.expectedOrderDataVersion }
|
||||
: {}),
|
||||
...(options?.idempotencyKey ? { idempotency_key: options.idempotencyKey } : {}),
|
||||
}),
|
||||
);
|
||||
return assertShippingOk(body);
|
||||
}
|
||||
@@ -373,14 +381,73 @@ export async function updateWorkspaceShippingNoticeLine(
|
||||
lineIndex: number,
|
||||
patch: Partial<ShippingNoticeLine> & { quantity?: number },
|
||||
comment?: string,
|
||||
options?: { expectedOrderDataVersion?: number; idempotencyKey?: string },
|
||||
) {
|
||||
const body = await requestJson<ShippingDecisionResponse & ShippingApiStatusPayload>(
|
||||
`/api/workspace/shipping-tasks/${encodeURIComponent(taskNo)}/update-notice-line`,
|
||||
jsonPost({ line_index: lineIndex, patch, ...(comment ? { comment } : {}) }),
|
||||
jsonPost({
|
||||
line_index: lineIndex,
|
||||
patch,
|
||||
...(comment ? { comment } : {}),
|
||||
...(options?.expectedOrderDataVersion != null
|
||||
? { expected_order_data_version: options.expectedOrderDataVersion }
|
||||
: {}),
|
||||
...(options?.idempotencyKey ? { idempotency_key: options.idempotencyKey } : {}),
|
||||
}),
|
||||
);
|
||||
return assertShippingOk(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列出任务未解决字段冲突。
|
||||
* @param taskNo - 发货任务编号
|
||||
*/
|
||||
export async function listWorkspaceShippingFieldConflicts(taskNo: string) {
|
||||
return requestJson<{
|
||||
task_no: string;
|
||||
order_data_version: number;
|
||||
open_count: number;
|
||||
items: import('@/features/chat/types/shipping.api.types').ShippingFieldConflict[];
|
||||
}>(`/api/workspace/shipping-tasks/${encodeURIComponent(taskNo)}/field-conflicts`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解决字段冲突(keep_existing / take_incoming / custom)。
|
||||
*/
|
||||
export async function resolveWorkspaceShippingFieldConflict(
|
||||
taskNo: string,
|
||||
conflictId: number,
|
||||
payload: {
|
||||
resolution: 'keep_existing' | 'take_incoming' | 'custom' | string;
|
||||
resolvedValue?: string;
|
||||
expectedConflictVersion?: number;
|
||||
expectedOrderDataVersion?: number;
|
||||
reason?: string;
|
||||
idempotencyKey?: string;
|
||||
},
|
||||
) {
|
||||
return requestJson<{
|
||||
conflict: import('@/features/chat/types/shipping.api.types').ShippingFieldConflict;
|
||||
order_data_version: number;
|
||||
open_conflict_count: number;
|
||||
idempotent_replay?: boolean;
|
||||
}>(
|
||||
`/api/workspace/shipping-tasks/${encodeURIComponent(taskNo)}/field-conflicts/${conflictId}/resolve`,
|
||||
jsonPost({
|
||||
resolution: payload.resolution,
|
||||
...(payload.resolvedValue != null ? { resolved_value: payload.resolvedValue } : {}),
|
||||
...(payload.expectedConflictVersion != null
|
||||
? { expected_conflict_version: payload.expectedConflictVersion }
|
||||
: {}),
|
||||
...(payload.expectedOrderDataVersion != null
|
||||
? { expected_order_data_version: payload.expectedOrderDataVersion }
|
||||
: {}),
|
||||
...(payload.reason ? { reason: payload.reason } : {}),
|
||||
...(payload.idempotencyKey ? { idempotency_key: payload.idempotencyKey } : {}),
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 为发货通知新增订单行。
|
||||
* @param taskNo - 发货任务编号
|
||||
|
||||
@@ -27,6 +27,7 @@ import type {
|
||||
ShippingTaskDetail,
|
||||
ShippingTaskSummary,
|
||||
} from '@/features/chat/api/shipping.api';
|
||||
import ShippingTaskParsedResultCard from '@/features/chat/components/ShippingTaskParsedResultCard.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
open: boolean;
|
||||
@@ -631,6 +632,21 @@ const handleSwitchBatch = (batchNo: string) => {
|
||||
</ul>
|
||||
<div class="mt-1 font-normal text-slate-600">{{ diagnosis.advice }}</div>
|
||||
</div>
|
||||
<ShippingTaskParsedResultCard
|
||||
v-if="isCurrentTask(task.task_no) && activeTaskDetail"
|
||||
class="mb-3"
|
||||
:task-no="activeTaskDetail.task_no"
|
||||
:po-number="activeTaskDetail.po_number"
|
||||
:lines="activeTaskDetail.lines"
|
||||
: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"
|
||||
:field-conflicts="activeTaskDetail.field_conflicts || []"
|
||||
:order-data-version="activeTaskDetail.order_data_version"
|
||||
:default-expanded="isAbnormalTask(task) || isWaitingHumanTask(task)"
|
||||
compact
|
||||
@refreshed="emit('focus-task', activeTaskDetail.task_no)"
|
||||
/>
|
||||
<div v-if="!resolveWorkspaceActionButtons(task).length" class="mb-3 text-xs leading-5 text-muted">
|
||||
<span class="font-semibold text-secondary">{{ t('chat.shippingNoticeUi.suggestedAction') }}</span>
|
||||
{{ resolveSuggestedAction(task) }}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<!--
|
||||
features/chat/components/ShippingFieldEvidencePanel.vue
|
||||
用途:只读展开订单字段级原文证据(Document + quote)。
|
||||
依赖:shipping.api.types、vue-i18n。
|
||||
逻辑:由 ShippingTaskParsedResultCard / Candidate 审核区传入 evidence;本组件不推导业务结论。
|
||||
-->
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { ShippingFieldEvidenceItem } from '@/features/chat/types/shipping.api.types';
|
||||
|
||||
const props = defineProps<{
|
||||
evidence?: ShippingFieldEvidenceItem[] | null;
|
||||
compact?: boolean;
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const items = computed(() =>
|
||||
(props.evidence || []).filter((item) => item && typeof item === 'object'),
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="items.length" class="space-y-2">
|
||||
<div class="text-[11px] font-semibold uppercase tracking-wide text-muted">
|
||||
{{ t('chat.shippingParsedResult.evidenceTitle') }}
|
||||
</div>
|
||||
<details
|
||||
v-for="(item, index) in items"
|
||||
:key="`${item.field || 'field'}-${item.document_id || index}`"
|
||||
class="rounded-lg border border-default bg-surface px-2.5 py-2 text-xs"
|
||||
:open="!compact && index === 0"
|
||||
>
|
||||
<summary class="cursor-pointer font-medium text-secondary">
|
||||
<span class="font-mono">{{ item.field || t('chat.shippingParsedResult.unknownField') }}</span>
|
||||
<span v-if="item.reservation_id" class="ml-2 text-muted">{{ item.reservation_id }}</span>
|
||||
</summary>
|
||||
<div class="mt-2 space-y-1 text-muted">
|
||||
<div v-if="item.document_id != null">
|
||||
{{ t('chat.shippingParsedResult.documentId', { id: item.document_id }) }}
|
||||
</div>
|
||||
<blockquote
|
||||
v-if="item.quote"
|
||||
class="rounded border border-slate-200 bg-slate-50 px-2 py-1.5 font-mono text-[11px] leading-5 text-slate-700"
|
||||
>
|
||||
{{ item.quote }}
|
||||
</blockquote>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
</template>
|
||||
@@ -15,6 +15,7 @@ interface EditableCandidateLine {
|
||||
qty: string;
|
||||
reservation_id: string;
|
||||
source_type: string;
|
||||
hub_code: string;
|
||||
uom: string;
|
||||
}
|
||||
|
||||
@@ -46,7 +47,7 @@ watch(() => props.attachment.candidates, () => {
|
||||
|
||||
/**
|
||||
* 将 Candidate 摘要投影为可编辑的 PO 与订单行。
|
||||
* 核心逻辑:保留原始扩展字段,并显式映射 SKU、数量、Reservation ID、Source Type 与单位。
|
||||
* 核心逻辑:保留原始扩展字段,并显式映射 SKU、数量、Reservation ID、Source Type、Hub Code 与单位。
|
||||
* @param candidateNo - 待编辑的 Candidate 编号
|
||||
* @returns 无返回值;Candidate 不存在时保持当前编辑状态
|
||||
*/
|
||||
@@ -64,6 +65,7 @@ function startEdit(candidateNo: string): void {
|
||||
qty: String(line.qty ?? ''),
|
||||
reservation_id: String(line.reservation_id || ''),
|
||||
source_type: String(line.source_type || ''),
|
||||
hub_code: String(line.hub_code || ''),
|
||||
uom: String(line.uom || 'EA'),
|
||||
})));
|
||||
if (!editLines.length) addLine();
|
||||
@@ -72,16 +74,16 @@ function startEdit(candidateNo: string): void {
|
||||
|
||||
/**
|
||||
* 新增一条待修订订单行。
|
||||
* 核心逻辑:创建带可选 Source Type 路由线索的空白草稿。
|
||||
* 核心逻辑:创建带可选 Source Type / Hub Code 路由线索的空白草稿。
|
||||
* @returns 无返回值
|
||||
*/
|
||||
function addLine(): void {
|
||||
editLines.push({ source: {}, sku: '', qty: '', reservation_id: '', source_type: '', uom: 'EA' });
|
||||
editLines.push({ source: {}, sku: '', qty: '', reservation_id: '', source_type: '', hub_code: '', uom: 'EA' });
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并提交 Candidate 修订。
|
||||
* 核心逻辑:保留原始扩展字段,并将 Source Type 作为唯一可选库存路由线索提交。
|
||||
* 核心逻辑:保留原始扩展字段;Source Type 与 Hub Code 分开提交,避免编辑时静默丢失 Hub Code。
|
||||
* @returns 无返回值;校验失败时写入本地错误提示
|
||||
*/
|
||||
function saveEdit(): void {
|
||||
@@ -95,6 +97,7 @@ function saveEdit(): void {
|
||||
qty: Number(line.qty),
|
||||
reservation_id: line.reservation_id.trim() || undefined,
|
||||
source_type: line.source_type.trim() || undefined,
|
||||
hub_code: line.hub_code.trim() || undefined,
|
||||
uom: line.uom.trim() || 'EA',
|
||||
};
|
||||
});
|
||||
@@ -116,6 +119,23 @@ function saveEdit(): void {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 非编辑态展示 Candidate 订单行摘要。
|
||||
* @param candidate - 当前 Candidate
|
||||
*/
|
||||
function readonlyLines(candidate: typeof candidates.value[number]): Array<Record<string, unknown>> {
|
||||
const lines = candidate.businessSummary?.lines;
|
||||
return Array.isArray(lines)
|
||||
? lines.filter((item): item is Record<string, unknown> => !!item && typeof item === 'object')
|
||||
: [];
|
||||
}
|
||||
|
||||
/** 将未知值格式化为表格占位文本。 */
|
||||
function displayCell(value: unknown): string {
|
||||
const text = String(value ?? '').trim();
|
||||
return text || '—';
|
||||
}
|
||||
|
||||
/** 对当前首个重复目标应用决策;强制新建时要求填写原因。 */
|
||||
function resolveDuplicate(candidateNo: string, action: ShippingDuplicateAction): void {
|
||||
const candidate = candidates.value.find((item) => item.candidateNo === candidateNo);
|
||||
@@ -178,6 +198,38 @@ function submitForceCreate(candidateNo: string): void {
|
||||
<div v-if="candidate.conflicts.length" class="mt-1 text-amber-700">
|
||||
{{ t('chat.shippingCandidateConflictCount', { count: candidate.conflicts.length }) }}
|
||||
</div>
|
||||
<div
|
||||
v-if="editingCandidateNo !== candidate.candidateNo && readonlyLines(candidate).length"
|
||||
class="mt-2 overflow-x-auto rounded-lg border border-default bg-surface"
|
||||
>
|
||||
<table class="min-w-full text-[11px]">
|
||||
<thead class="bg-surface-soft text-left text-muted">
|
||||
<tr>
|
||||
<th class="px-2 py-1">{{ t('chat.shippingCandidateSku') }}</th>
|
||||
<th class="px-2 py-1">{{ t('chat.shippingCandidateQty') }}</th>
|
||||
<th class="px-2 py-1">{{ t('chat.shippingCandidateReservation') }}</th>
|
||||
<th class="px-2 py-1">{{ t('chat.shippingCandidateSourceType') }}</th>
|
||||
<th class="px-2 py-1">{{ t('chat.shippingCandidateHubCode') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr
|
||||
v-for="(line, index) in readonlyLines(candidate)"
|
||||
:key="`${candidate.candidateNo}-line-${index}`"
|
||||
class="border-t border-default/60"
|
||||
>
|
||||
<td class="px-2 py-1 font-mono">{{ displayCell(line.sku) }}</td>
|
||||
<td class="px-2 py-1">{{ displayCell(line.qty) }}</td>
|
||||
<td class="px-2 py-1 font-mono">{{ displayCell(line.reservation_id) }}</td>
|
||||
<td class="px-2 py-1">{{ displayCell(line.source_type) }}</td>
|
||||
<td class="px-2 py-1 font-mono">{{ displayCell(line.hub_code) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div v-if="(candidate.missingFields || []).length" class="mt-1 text-amber-700">
|
||||
{{ t('chat.shippingCandidateMissingFields', { fields: (candidate.missingFields || []).join(', ') }) }}
|
||||
</div>
|
||||
<div v-if="candidate.duplicate?.blocking && !candidate.duplicateResolution" class="mt-2 flex flex-wrap items-center gap-2 text-amber-700">
|
||||
<span>{{ t('chat.shippingCandidateDuplicate', { task: candidate.duplicate.matches[0]?.taskNo || '-' }) }}</span>
|
||||
<button
|
||||
@@ -212,11 +264,12 @@ function submitForceCreate(candidateNo: string): void {
|
||||
<span class="text-muted">{{ t('chat.shippingCandidatePoNumber') }}</span>
|
||||
<input v-model="editPoNumber" class="mt-1 w-full rounded border border-default bg-surface px-2 py-1 text-primary" />
|
||||
</label>
|
||||
<div v-for="(line, index) in editLines" :key="index" class="grid grid-cols-2 gap-2 rounded border border-default bg-surface p-2 md:grid-cols-5">
|
||||
<div v-for="(line, index) in editLines" :key="index" class="grid grid-cols-2 gap-2 rounded border border-default bg-surface p-2 md:grid-cols-6">
|
||||
<input v-model="line.sku" :placeholder="t('chat.shippingCandidateSku')" class="rounded border border-default px-2 py-1" />
|
||||
<input v-model="line.qty" type="number" min="0.0001" step="any" :placeholder="t('chat.shippingCandidateQty')" class="rounded border border-default px-2 py-1" />
|
||||
<input v-model="line.reservation_id" :placeholder="t('chat.shippingCandidateReservation')" class="rounded border border-default px-2 py-1" />
|
||||
<input v-model="line.source_type" :placeholder="t('chat.shippingCandidateSourceType')" class="rounded border border-default px-2 py-1" />
|
||||
<input v-model="line.hub_code" :placeholder="t('chat.shippingCandidateHubCode')" class="rounded border border-default px-2 py-1" />
|
||||
<div class="flex gap-1">
|
||||
<input v-model="line.uom" :placeholder="t('chat.shippingCandidateUom')" class="min-w-0 flex-1 rounded border border-default px-2 py-1" />
|
||||
<button v-if="editLines.length > 1" type="button" class="text-red-600" @click="editLines.splice(index, 1)">×</button>
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
<!--
|
||||
features/chat/components/ShippingTaskFieldConflictPanel.vue
|
||||
用途:展示并解决任务级订单字段冲突(keep / take incoming)。
|
||||
依赖:shipping.api.resolveWorkspaceShippingFieldConflict、vue-i18n、useMessage。
|
||||
逻辑:由 ShippingTaskParsedResultCard 挂载;解决成功后 emit refreshed 让父级重拉 Task Detail。
|
||||
-->
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { resolveWorkspaceShippingFieldConflict } from '@/features/chat/api/shipping.api';
|
||||
import type { ShippingFieldConflict } from '@/features/chat/types/shipping.api.types';
|
||||
import { useMessage } from '@/shared/composables/useMessage';
|
||||
|
||||
const props = defineProps<{
|
||||
taskNo: string;
|
||||
conflicts?: ShippingFieldConflict[] | null;
|
||||
orderDataVersion?: number | null;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
refreshed: [];
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
const msg = useMessage();
|
||||
const resolvingId = ref<number | null>(null);
|
||||
|
||||
const openConflicts = computed(() =>
|
||||
(props.conflicts || []).filter((item) => String(item.status || '') === 'open'),
|
||||
);
|
||||
|
||||
/**
|
||||
* 解决单条冲突。
|
||||
* 核心逻辑:携带 conflict_version 与 order_data_version;409 时提示刷新。
|
||||
*/
|
||||
async function resolveConflict(
|
||||
conflict: ShippingFieldConflict,
|
||||
resolution: 'keep_existing' | 'take_incoming',
|
||||
) {
|
||||
if (!props.taskNo || resolvingId.value != null) return;
|
||||
resolvingId.value = conflict.id;
|
||||
try {
|
||||
await resolveWorkspaceShippingFieldConflict(props.taskNo, conflict.id, {
|
||||
resolution,
|
||||
expectedConflictVersion: conflict.conflict_version,
|
||||
expectedOrderDataVersion: props.orderDataVersion ?? undefined,
|
||||
idempotencyKey: `conflict-${conflict.id}-${resolution}-${conflict.conflict_version}`,
|
||||
});
|
||||
msg.success(t('chat.shippingFieldConflict.resolveSuccess'));
|
||||
emit('refreshed');
|
||||
} catch (err) {
|
||||
msg.error(err instanceof Error ? err.message : t('chat.shippingFieldConflict.resolveFailed'));
|
||||
} finally {
|
||||
resolvingId.value = null;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
v-if="openConflicts.length"
|
||||
class="space-y-2 rounded-lg border border-rose-200 bg-rose-50/80 px-2.5 py-2"
|
||||
>
|
||||
<div class="text-[11px] font-semibold text-rose-900">
|
||||
{{ t('chat.shippingFieldConflict.title', { count: openConflicts.length }) }}
|
||||
</div>
|
||||
<div class="text-[11px] leading-5 text-rose-800">
|
||||
{{ t('chat.shippingFieldConflict.hint') }}
|
||||
</div>
|
||||
<ul class="space-y-2">
|
||||
<li
|
||||
v-for="conflict in openConflicts"
|
||||
:key="conflict.id"
|
||||
class="rounded-md border border-rose-200 bg-white/90 px-2.5 py-2 text-[11px]"
|
||||
>
|
||||
<div class="font-medium text-rose-900">
|
||||
<span v-if="conflict.position != null">#{{ Number(conflict.position) + 1 }} · </span>
|
||||
<span class="font-mono">{{ conflict.field_name }}</span>
|
||||
</div>
|
||||
<div class="mt-1 grid gap-1 text-slate-700 sm:grid-cols-2">
|
||||
<div>
|
||||
<span class="text-muted">{{ t('chat.shippingFieldConflict.existing') }}:</span>
|
||||
<span class="ml-1 font-mono">{{ conflict.existing_value || '—' }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="text-muted">{{ t('chat.shippingFieldConflict.incoming') }}:</span>
|
||||
<span class="ml-1 font-mono">{{ conflict.incoming_value || '—' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-2 flex flex-wrap gap-2">
|
||||
<button
|
||||
type="button"
|
||||
class="rounded border border-slate-300 bg-white px-2 py-1 text-[11px] font-medium hover:bg-slate-50 disabled:opacity-50"
|
||||
:disabled="resolvingId != null"
|
||||
@click="resolveConflict(conflict, 'keep_existing')"
|
||||
>
|
||||
{{ t('chat.shippingFieldConflict.keepExisting') }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="rounded border border-rose-300 bg-rose-100 px-2 py-1 text-[11px] font-medium text-rose-900 hover:bg-rose-200 disabled:opacity-50"
|
||||
:disabled="resolvingId != null"
|
||||
@click="resolveConflict(conflict, 'take_incoming')"
|
||||
>
|
||||
{{ t('chat.shippingFieldConflict.takeIncoming') }}
|
||||
</button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,210 @@
|
||||
<!--
|
||||
features/chat/components/ShippingTaskParsedResultCard.vue
|
||||
用途:任务详情持久只读展示订单解析行、流转门禁、字段冲突与来源证据。
|
||||
依赖:ShippingFieldEvidencePanel、ShippingTaskFieldConflictPanel、shipping.api.types、vue-i18n。
|
||||
逻辑:Drawer / ShippingNoticeView 共用;只解释后端 Gate,不自行推导可继续状态。
|
||||
-->
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import ShippingFieldEvidencePanel from '@/features/chat/components/ShippingFieldEvidencePanel.vue';
|
||||
import ShippingTaskFieldConflictPanel from '@/features/chat/components/ShippingTaskFieldConflictPanel.vue';
|
||||
import type {
|
||||
ShippingFieldConflict,
|
||||
ShippingNoticeLine,
|
||||
ShippingParseIssue,
|
||||
ShippingParseValidation,
|
||||
ShippingProcessFieldGate,
|
||||
ShippingSourceCandidateProjection,
|
||||
} from '@/features/chat/types/shipping.api.types';
|
||||
|
||||
const props = defineProps<{
|
||||
taskNo?: string | null;
|
||||
poNumber?: string | null;
|
||||
lines?: ShippingNoticeLine[] | null;
|
||||
parseValidation?: ShippingParseValidation | null;
|
||||
processFieldGate?: ShippingProcessFieldGate | null;
|
||||
sourceCandidate?: ShippingSourceCandidateProjection | null;
|
||||
fieldConflicts?: ShippingFieldConflict[] | null;
|
||||
orderDataVersion?: number | null;
|
||||
/** 阻断时默认展开;非阻断可折叠。 */
|
||||
defaultExpanded?: boolean;
|
||||
compact?: boolean;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
refreshed: [];
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
const expanded = ref(true);
|
||||
|
||||
watch(
|
||||
() => props.defaultExpanded,
|
||||
(value) => {
|
||||
if (typeof value === 'boolean') expanded.value = value;
|
||||
},
|
||||
{ immediate: true },
|
||||
);
|
||||
|
||||
const orderLines = computed(() => (props.lines || []).filter((line) => line && typeof line === 'object'));
|
||||
|
||||
const gateIssues = computed(() => {
|
||||
const fromGate = Array.isArray(props.processFieldGate?.issues) ? props.processFieldGate?.issues : [];
|
||||
const fromValidation = Array.isArray(props.parseValidation?.issues) ? props.parseValidation?.issues : [];
|
||||
return [...fromGate, ...fromValidation] as ShippingParseIssue[];
|
||||
});
|
||||
|
||||
const missingFields = computed(() => {
|
||||
const gateMissing = Array.isArray(props.processFieldGate?.missing_fields)
|
||||
? props.processFieldGate?.missing_fields || []
|
||||
: [];
|
||||
const candidateMissing = Array.isArray(props.sourceCandidate?.missing_fields)
|
||||
? props.sourceCandidate?.missing_fields || []
|
||||
: [];
|
||||
return Array.from(new Set([...gateMissing, ...candidateMissing].map((item) => String(item)).filter(Boolean)));
|
||||
});
|
||||
|
||||
const hasBlocking = computed(() =>
|
||||
gateIssues.value.some((issue) => String(issue.severity || '') === 'blocking')
|
||||
|| missingFields.value.includes('reservation_id')
|
||||
|| String(props.processFieldGate?.status || '') === 'needs_enrichment'
|
||||
|| String(props.parseValidation?.status || '') === 'needs_review'
|
||||
|| (props.fieldConflicts || []).some((item) => String(item.status || '') === 'open'),
|
||||
);
|
||||
|
||||
const statusLabel = computed(() => {
|
||||
if (hasBlocking.value) return t('chat.shippingParsedResult.statusBlocked');
|
||||
if (orderLines.value.length) return t('chat.shippingParsedResult.statusReady');
|
||||
return t('chat.shippingParsedResult.statusEmpty');
|
||||
});
|
||||
|
||||
const displayValue = (value: unknown) => {
|
||||
const text = String(value ?? '').trim();
|
||||
return text || '—';
|
||||
};
|
||||
|
||||
/**
|
||||
* 将门禁 reason 映射为用户可读文案。
|
||||
* @param reason - 后端 issue.reason
|
||||
*/
|
||||
function issueReasonLabel(reason?: string | null): string {
|
||||
const key = String(reason || '').trim();
|
||||
if (key === 'missing') return t('chat.shippingParsedResult.issueMissing');
|
||||
if (key === 'invalid_format') return t('chat.shippingParsedResult.issueInvalid');
|
||||
if (key === 'source_conflict' || key === 'field_conflict') return t('chat.shippingParsedResult.issueConflict');
|
||||
if (key === 'value_corrected') return t('chat.shippingParsedResult.issueCorrected');
|
||||
return key || t('chat.shippingParsedResult.issueUnknown');
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section
|
||||
class="rounded-xl border p-3 text-xs"
|
||||
:class="hasBlocking
|
||||
? 'border-amber-200 bg-amber-50/70'
|
||||
: 'border-slate-200 bg-surface-soft/80'"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
class="flex w-full items-start justify-between gap-2 text-left"
|
||||
@click="expanded = !expanded"
|
||||
>
|
||||
<div>
|
||||
<div class="text-[11px] font-bold uppercase tracking-wider text-muted">
|
||||
{{ t('chat.shippingParsedResult.title') }}
|
||||
</div>
|
||||
<div v-if="taskNo" class="mt-0.5 font-mono text-[11px] text-secondary">{{ taskNo }}</div>
|
||||
<div v-if="poNumber" class="mt-0.5 text-muted">PO {{ poNumber }}</div>
|
||||
</div>
|
||||
<span
|
||||
class="rounded-full px-2 py-0.5 text-[10px] font-semibold"
|
||||
:class="hasBlocking ? 'bg-amber-100 text-amber-800' : 'bg-emerald-100 text-emerald-700'"
|
||||
>
|
||||
{{ statusLabel }}
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<div v-if="expanded" class="mt-3 space-y-3">
|
||||
<div class="rounded-lg border border-slate-200/80 bg-white/80 px-2.5 py-2 text-[11px] leading-5 text-slate-700">
|
||||
{{ t('chat.shippingParsedResult.impactHint') }}
|
||||
</div>
|
||||
|
||||
<ShippingTaskFieldConflictPanel
|
||||
v-if="taskNo"
|
||||
:task-no="taskNo"
|
||||
:conflicts="fieldConflicts || []"
|
||||
:order-data-version="orderDataVersion"
|
||||
@refreshed="emit('refreshed')"
|
||||
/>
|
||||
|
||||
<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">
|
||||
<span
|
||||
v-for="field in missingFields"
|
||||
:key="field"
|
||||
class="rounded border border-amber-200 bg-amber-100 px-1.5 py-0.5 font-mono text-[10px] text-amber-900"
|
||||
>
|
||||
{{ field }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul v-if="gateIssues.length" class="space-y-1.5">
|
||||
<li
|
||||
v-for="(issue, index) in gateIssues"
|
||||
:key="`${issue.field}-${issue.line_index ?? index}`"
|
||||
class="rounded-lg border px-2.5 py-2"
|
||||
:class="String(issue.severity) === 'blocking'
|
||||
? 'border-rose-200 bg-rose-50 text-rose-800'
|
||||
: String(issue.reason) === 'value_corrected'
|
||||
? 'border-sky-200 bg-sky-50 text-sky-800'
|
||||
: 'border-amber-200 bg-amber-50 text-amber-800'"
|
||||
>
|
||||
<div class="font-medium">
|
||||
<span v-if="issue.line_index != null">#{{ Number(issue.line_index) + 1 }} · </span>
|
||||
<span class="font-mono">{{ issue.field }}</span>
|
||||
<span class="ml-1">{{ issueReasonLabel(issue.reason) }}</span>
|
||||
</div>
|
||||
<div v-if="issue.sku" class="mt-0.5 text-[11px] opacity-80">SKU {{ issue.sku }}</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div v-if="orderLines.length" class="overflow-x-auto rounded-xl border border-default bg-white/90">
|
||||
<table class="min-w-full text-sm">
|
||||
<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.sku') }}</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.shippingParsedResult.sourceType') }}</th>
|
||||
<th class="px-2.5 py-2">{{ t('chat.shippingParsedResult.hubCode') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr
|
||||
v-for="(line, index) in orderLines"
|
||||
:key="`${line.sku}-${index}`"
|
||||
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.sku) }}</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.source_type) }}</td>
|
||||
<td class="px-2.5 py-2 font-mono">{{ displayValue(line.hub_code) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div v-else class="text-muted">{{ t('chat.shippingParsedResult.noLines') }}</div>
|
||||
|
||||
<ShippingFieldEvidencePanel
|
||||
:evidence="sourceCandidate?.evidence || []"
|
||||
:compact="compact"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
import {
|
||||
addWorkspaceShippingNoticeLine,
|
||||
getWorkspaceShippingTask,
|
||||
removeWorkspaceShippingNoticeLine,
|
||||
updateWorkspaceShippingNoticeFields,
|
||||
updateWorkspaceShippingNoticeLine,
|
||||
@@ -33,6 +34,16 @@ export interface ShippingParseReviewContext {
|
||||
* @returns 复核卡片同步与编辑处理函数集合
|
||||
*/
|
||||
export function createShippingParseReviewHandlers(ctx: ShippingParseReviewContext) {
|
||||
/**
|
||||
* 读取任务当前 order_data_version,供改单乐观锁使用。
|
||||
* @param taskId - 任务编号
|
||||
*/
|
||||
const resolveOrderDataVersion = async (taskId: string): Promise<number | undefined> => {
|
||||
const detail = await getWorkspaceShippingTask(taskId).catch(() => null);
|
||||
const version = detail?.order_data_version;
|
||||
return typeof version === 'number' ? version : undefined;
|
||||
};
|
||||
|
||||
const removeParseReviewMessageForTask = (taskId: string) => {
|
||||
const normalized = String(taskId || '').trim().toUpperCase();
|
||||
if (!normalized) return;
|
||||
@@ -63,7 +74,11 @@ export function createShippingParseReviewHandlers(ctx: ShippingParseReviewContex
|
||||
payload.saving = true;
|
||||
const taskId = String(payload.taskId || '').trim().toUpperCase();
|
||||
try {
|
||||
await updateWorkspaceShippingNoticeFields(taskId, fields, '聊天区订单表修订');
|
||||
const expectedOrderDataVersion = await resolveOrderDataVersion(taskId);
|
||||
await updateWorkspaceShippingNoticeFields(taskId, fields, '聊天区订单表修订', {
|
||||
expectedOrderDataVersion,
|
||||
idempotencyKey: `parse-review-header-${taskId}-${expectedOrderDataVersion ?? 'na'}-${Date.now()}`,
|
||||
});
|
||||
await syncShippingParseReviewCard(taskId);
|
||||
await ctx.refreshShippingActions();
|
||||
return true;
|
||||
@@ -86,7 +101,11 @@ export function createShippingParseReviewHandlers(ctx: ShippingParseReviewContex
|
||||
payload.saving = true;
|
||||
const taskId = String(payload.taskId || '').trim().toUpperCase();
|
||||
try {
|
||||
await updateWorkspaceShippingNoticeLine(taskId, lineIndex, patch, '聊天区订单表修订');
|
||||
const expectedOrderDataVersion = await resolveOrderDataVersion(taskId);
|
||||
await updateWorkspaceShippingNoticeLine(taskId, lineIndex, patch, '聊天区订单表修订', {
|
||||
expectedOrderDataVersion,
|
||||
idempotencyKey: `parse-review-line-${taskId}-${lineIndex}-${expectedOrderDataVersion ?? 'na'}`,
|
||||
});
|
||||
await syncShippingParseReviewCard(taskId);
|
||||
await ctx.refreshShippingActions();
|
||||
return true;
|
||||
|
||||
@@ -127,6 +127,11 @@ function mapServerCandidate(remote: ShippingNoticeCandidateResponse): ShippingNo
|
||||
validationStatus: remote.validation_status,
|
||||
selected: Boolean(remote.selected),
|
||||
conflicts: remote.conflicts || [],
|
||||
missingFields: Array.isArray(remote.missing_fields) ? remote.missing_fields.map((item) => String(item)) : [],
|
||||
fieldConfidence: remote.field_confidence && typeof remote.field_confidence === 'object'
|
||||
? remote.field_confidence
|
||||
: {},
|
||||
evidence: Array.isArray(remote.evidence) ? remote.evidence : [],
|
||||
businessSummary: remote.business_summary || {},
|
||||
duplicate,
|
||||
duplicateResolution: remote.duplicate_resolution
|
||||
|
||||
@@ -179,12 +179,54 @@ export interface ShippingNoticeLine {
|
||||
reservation_id?: string | null;
|
||||
/** 可选库存路由线索,不代表任务通知来源或已确认的库存连接器类型。 */
|
||||
source_type?: string | null;
|
||||
/** 站点/Hub 线索;与 source_type 独立,编辑时必须显式保留。 */
|
||||
hub_code?: string | null;
|
||||
qty: number;
|
||||
required_date?: string | null;
|
||||
uom?: string | null;
|
||||
line_no?: string | null;
|
||||
}
|
||||
|
||||
export interface ShippingProcessFieldGate {
|
||||
status?: 'needs_enrichment' | 'ready' | string;
|
||||
missing_fields?: string[];
|
||||
issues?: ShippingParseIssue[];
|
||||
contract_version?: string;
|
||||
}
|
||||
|
||||
export interface ShippingFieldEvidenceItem {
|
||||
field?: string;
|
||||
line_index?: number;
|
||||
reservation_id?: string | null;
|
||||
quote?: string | null;
|
||||
document_id?: number | null;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface ShippingSourceCandidateProjection {
|
||||
candidate_no?: string | null;
|
||||
missing_fields?: string[];
|
||||
field_confidence?: Record<string, number | null | undefined>;
|
||||
evidence?: ShippingFieldEvidenceItem[];
|
||||
conflicts?: Array<Record<string, unknown>>;
|
||||
}
|
||||
|
||||
export interface ShippingFieldConflict {
|
||||
id: number;
|
||||
task_id: number;
|
||||
line_id?: number | null;
|
||||
position?: number | null;
|
||||
field_name: string;
|
||||
existing_value?: string | null;
|
||||
incoming_value?: string | null;
|
||||
existing_source?: string | null;
|
||||
incoming_source?: string | null;
|
||||
status: 'open' | 'resolved' | 'dismissed' | string;
|
||||
conflict_version: number;
|
||||
resolved_value?: string | null;
|
||||
resolution_reason?: string | null;
|
||||
}
|
||||
|
||||
export interface ShippingMatchLineResult {
|
||||
sku: string;
|
||||
reservation_id?: string | null;
|
||||
@@ -216,6 +258,12 @@ export interface ShippingTaskDetail extends ShippingTaskSummary {
|
||||
line_results?: ShippingMatchLineResult[];
|
||||
parse_confidence?: number | null;
|
||||
error_message?: string | null;
|
||||
/** 顶层稳定投影;同时仍可能出现在 step_payload 中。 */
|
||||
parse_validation?: ShippingParseValidation | null;
|
||||
process_field_gate?: ShippingProcessFieldGate | null;
|
||||
source_candidate?: ShippingSourceCandidateProjection | null;
|
||||
order_data_version?: number | null;
|
||||
field_conflicts?: ShippingFieldConflict[] | null;
|
||||
events: ShippingTaskEvent[];
|
||||
ui_state?: ShippingTaskUiState;
|
||||
}
|
||||
@@ -426,6 +474,9 @@ export interface ShippingNoticeCandidateResponse {
|
||||
validation_status: string;
|
||||
selected: boolean;
|
||||
conflicts?: Array<Record<string, unknown>>;
|
||||
missing_fields?: string[];
|
||||
field_confidence?: Record<string, number | null | undefined>;
|
||||
evidence?: ShippingFieldEvidenceItem[];
|
||||
business_summary?: Record<string, unknown> | null;
|
||||
duplicate?: ShippingDuplicateResult | null;
|
||||
duplicate_resolution?: {
|
||||
|
||||
@@ -73,6 +73,9 @@ export interface ShippingNoticeCandidate {
|
||||
validationStatus: string;
|
||||
selected: boolean;
|
||||
conflicts: Array<Record<string, unknown>>;
|
||||
missingFields?: string[];
|
||||
fieldConfidence?: Record<string, number | null | undefined>;
|
||||
evidence?: Array<Record<string, unknown>>;
|
||||
businessSummary: Record<string, unknown>;
|
||||
duplicate?: ShippingDuplicateResult;
|
||||
duplicateResolution?: ShippingDuplicateResolution;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* features/workspace/views/ShippingNoticeView.vue
|
||||
* 用途:货代发货任务只读工作台,提供任务筛选、详情查看与跳转 Chat 继续处理入口。
|
||||
* 依赖:ShippingWorkflowStepper、ShippingMatchResultCard、shipping.api。
|
||||
* 逻辑:先拉取任务列表与详情,再以只读方式展示步骤、匹配结果和事件记录;所有写操作回到 Chat 主路径完成。
|
||||
* 依赖:ShippingWorkflowStepper、ShippingMatchResultCard、ShippingTaskParsedResultCard、shipping.api。
|
||||
* 逻辑:先拉取任务列表与详情,再以只读方式展示步骤、匹配结果、解析行和事件记录;所有写操作回到 Chat 主路径完成。
|
||||
*/
|
||||
import { computed, onMounted, ref, watch } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
@@ -11,6 +11,7 @@ import { useI18n } from 'vue-i18n';
|
||||
import { ArrowLeft, Download, ExternalLink, RefreshCw } from 'lucide-vue-next';
|
||||
import ShippingWorkflowStepper from '@/features/chat/components/ShippingWorkflowStepper.vue';
|
||||
import ShippingMatchResultCard from '@/features/chat/components/messages/ShippingMatchResultCard.vue';
|
||||
import ShippingTaskParsedResultCard from '@/features/chat/components/ShippingTaskParsedResultCard.vue';
|
||||
import { formatLocalDateTime } from '@/shared/utils/dateTime';
|
||||
import {
|
||||
getWorkspaceShippingTask,
|
||||
@@ -510,25 +511,20 @@ onMounted(async () => {
|
||||
:action-busy="false"
|
||||
/>
|
||||
|
||||
<div v-if="detail.lines?.length">
|
||||
<h3 class="mb-2 text-sm font-semibold text-secondary">{{ $t('workspace.shippingNotice.lines') }}</h3>
|
||||
<div class="overflow-x-auto rounded-xl border border-default">
|
||||
<table class="min-w-full text-sm">
|
||||
<thead class="bg-surface-soft text-left text-xs text-muted">
|
||||
<tr>
|
||||
<th class="px-3 py-2">{{ $t('workspace.shippingNotice.columns.sku') }}</th>
|
||||
<th class="px-3 py-2">{{ $t('workspace.shippingNotice.qty') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(line, idx) in detail.lines" :key="idx" class="border-t border-default/60">
|
||||
<td class="px-3 py-2 font-mono">{{ line.sku || '—' }}</td>
|
||||
<td class="px-3 py-2">{{ line.qty ?? '—' }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<ShippingTaskParsedResultCard
|
||||
v-if="detail.lines?.length || detail.process_field_gate || detail.parse_validation || detail.source_candidate || detail.field_conflicts?.length"
|
||||
class="mt-3"
|
||||
:task-no="detail.task_no"
|
||||
:po-number="detail.po_number"
|
||||
:lines="detail.lines"
|
||||
:parse-validation="detail.parse_validation || detail.step_payload?.parse_validation || null"
|
||||
:process-field-gate="detail.process_field_gate || null"
|
||||
:source-candidate="detail.source_candidate || null"
|
||||
:field-conflicts="detail.field_conflicts || []"
|
||||
:order-data-version="detail.order_data_version"
|
||||
:default-expanded="true"
|
||||
@refreshed="detail?.task_no && loadDetail(detail.task_no)"
|
||||
/>
|
||||
|
||||
<div v-if="detail.events?.length">
|
||||
<h3 class="mb-2 text-sm font-semibold text-secondary">{{ $t('workspace.shippingNotice.events') }}</h3>
|
||||
|
||||
@@ -107,6 +107,8 @@
|
||||
"shippingCandidateQty": "Quantity",
|
||||
"shippingCandidateReservation": "Reservation ID",
|
||||
"shippingCandidateSourceType": "Source Type (routing hint)",
|
||||
"shippingCandidateHubCode": "Hub Code",
|
||||
"shippingCandidateMissingFields": "Missing fields: {fields}",
|
||||
"shippingCandidateUom": "UOM",
|
||||
"shippingCandidateAddLine": "Add order line",
|
||||
"shippingCandidateUpdateDone": "Order candidate changes were saved.",
|
||||
@@ -161,6 +163,35 @@
|
||||
"empty": "(empty)",
|
||||
"unrecognized": "(unrecognized)"
|
||||
},
|
||||
"shippingParsedResult": {
|
||||
"title": "Parsed order result",
|
||||
"statusBlocked": "Blocked",
|
||||
"statusReady": "Ready",
|
||||
"statusEmpty": "No order lines",
|
||||
"impactHint": "Reservation ID drives inventory matching; missing or invalid values block inventory and fulfillment. Source Type / Hub Code are optional routing hints for inventory-source selection and do not block when absent.",
|
||||
"missingFields": "Missing fields",
|
||||
"sourceType": "Source Type",
|
||||
"hubCode": "Hub Code",
|
||||
"noLines": "This task has no persisted order lines yet.",
|
||||
"evidenceTitle": "Field evidence",
|
||||
"unknownField": "Unknown field",
|
||||
"documentId": "Document #{id}",
|
||||
"issueMissing": "Missing",
|
||||
"issueInvalid": "Invalid format",
|
||||
"issueConflict": "Source conflict",
|
||||
"issueCorrected": "Auto-corrected",
|
||||
"issueUnknown": "Needs attention"
|
||||
},
|
||||
"shippingFieldConflict": {
|
||||
"title": "Field conflicts to review ({count})",
|
||||
"hint": "Non-empty differing values are never auto-overwritten. Keep the current value or take the candidate; the task returns to parse review.",
|
||||
"existing": "Current",
|
||||
"incoming": "Incoming",
|
||||
"keepExisting": "Keep current",
|
||||
"takeIncoming": "Take incoming",
|
||||
"resolveSuccess": "Conflict resolved. Please reconfirm the parse result.",
|
||||
"resolveFailed": "Failed to resolve conflict. Refresh and try again."
|
||||
},
|
||||
"shippingNoticeUi": {
|
||||
"rpaModeBrowser": "Real RPA",
|
||||
"rpaModeMock": "Mock RPA",
|
||||
|
||||
@@ -87,6 +87,11 @@
|
||||
"SHIPPING_CUSTOMER_CONFIRMATION_LEGACY_UNSUPPORTED": "Customer confirmation is not supported for this legacy task.",
|
||||
"SHIPPING_CUSTOMER_INACTIVE": "The selected customer is inactive.",
|
||||
"SHIPPING_CUSTOMER_NUMBERED_CASE_LOCKED": "A numbered business case cannot silently change customer.",
|
||||
"SHIPPING_FIELD_CONFLICT_NOT_FOUND": "Order field conflict not found.",
|
||||
"SHIPPING_FIELD_CONFLICT_ALREADY_RESOLVED": "This field conflict is already resolved.",
|
||||
"SHIPPING_FIELD_CONFLICT_VERSION_MISMATCH": "Field conflict version changed. Refresh and try again.",
|
||||
"SHIPPING_ORDER_DATA_VERSION_MISMATCH": "Order data version changed. Refresh and try again.",
|
||||
"SHIPPING_INVALID_CONFLICT_RESOLUTION": "Invalid conflict resolution.",
|
||||
"SHIPPING_CASE_NOT_FOUND": "Shipping case not found.",
|
||||
"SHIPPING_BUSINESS_NUMBER_DAILY_LIMIT_REACHED": "The customer's two-digit daily sequence is exhausted (01-99).",
|
||||
"SHIPPING_BUSINESS_NUMBER_CUSTOMER_REQUIRED": "Confirm the standard customer before assigning a business number.",
|
||||
|
||||
@@ -107,6 +107,8 @@
|
||||
"shippingCandidateQty": "จำนวน",
|
||||
"shippingCandidateReservation": "Reservation ID",
|
||||
"shippingCandidateSourceType": "ประเภทแหล่งที่มา (ข้อมูลช่วยกำหนดเส้นทาง)",
|
||||
"shippingCandidateHubCode": "Hub Code",
|
||||
"shippingCandidateMissingFields": "ฟิลด์ที่ต้องเติม: {fields}",
|
||||
"shippingCandidateUom": "หน่วย",
|
||||
"shippingCandidateAddLine": "เพิ่มรายการคำสั่งซื้อ",
|
||||
"shippingCandidateUpdateDone": "บันทึกการแก้ไขรายการคำสั่งซื้อแล้ว",
|
||||
@@ -161,6 +163,35 @@
|
||||
"empty": "(ว่าง)",
|
||||
"unrecognized": "(ไม่รู้จัก)"
|
||||
},
|
||||
"shippingParsedResult": {
|
||||
"title": "ผลลัพธ์การแยกคำสั่งซื้อ",
|
||||
"statusBlocked": "ถูกบล็อก",
|
||||
"statusReady": "พร้อมดำเนินการ",
|
||||
"statusEmpty": "ยังไม่มีรายการคำสั่งซื้อ",
|
||||
"impactHint": "Reservation ID ใช้จับคู่สต็อก หากขาดหรือไม่ถูกต้องจะบล็อกขั้นตอนสต็อกและการส่งมอบ; Source Type / Hub Code เป็นข้อมูลช่วยเลือกแหล่งสต็อกแบบเลือกได้ หากขาดจะไม่บล็อก",
|
||||
"missingFields": "ฟิลด์ที่ต้องเติม",
|
||||
"sourceType": "Source Type",
|
||||
"hubCode": "Hub Code",
|
||||
"noLines": "งานนี้ยังไม่มีรายการคำสั่งซื้อที่บันทึกไว้",
|
||||
"evidenceTitle": "หลักฐานฟิลด์",
|
||||
"unknownField": "ฟิลด์ไม่ทราบ",
|
||||
"documentId": "เอกสาร #{id}",
|
||||
"issueMissing": "ขาดหาย",
|
||||
"issueInvalid": "รูปแบบไม่ถูกต้อง",
|
||||
"issueConflict": "แหล่งข้อมูลขัดแย้ง",
|
||||
"issueCorrected": "แก้ไขอัตโนมัติแล้ว",
|
||||
"issueUnknown": "ต้องตรวจสอบ"
|
||||
},
|
||||
"shippingFieldConflict": {
|
||||
"title": "ฟิลด์ขัดแย้งที่ต้องตรวจ ({count})",
|
||||
"hint": "ค่าเดิมและค่าใหม่ที่ไม่ว่างและต่างกันจะไม่ถูกเขียนทับอัตโนมัติ เลือกรักษาค่าเดิมหรือใช้ค่าใหม่ แล้วระบบจะกลับไปยืนยันการแยกวิเคราะห์",
|
||||
"existing": "ค่าปัจจุบัน",
|
||||
"incoming": "ค่าใหม่",
|
||||
"keepExisting": "เก็บค่าปัจจุบัน",
|
||||
"takeIncoming": "ใช้ค่าใหม่",
|
||||
"resolveSuccess": "แก้ความขัดแย้งแล้ว กรุณายืนยันผลแยกวิเคราะห์อีกครั้ง",
|
||||
"resolveFailed": "แก้ความขัดแย้งไม่สำเร็จ กรุณารีเฟรชแล้วลองใหม่"
|
||||
},
|
||||
"shippingNoticeUi": {
|
||||
"rpaModeBrowser": "RPA จริง",
|
||||
"rpaModeMock": "Mock RPA",
|
||||
|
||||
@@ -87,6 +87,11 @@
|
||||
"SHIPPING_CUSTOMER_CONFIRMATION_LEGACY_UNSUPPORTED": "งานเดิมนี้ยังไม่รองรับการยืนยันลูกค้า",
|
||||
"SHIPPING_CUSTOMER_INACTIVE": "ลูกค้าที่เลือกถูกปิดใช้งาน",
|
||||
"SHIPPING_CUSTOMER_NUMBERED_CASE_LOCKED": "รายการธุรกิจที่มีเลขแล้วไม่สามารถเปลี่ยนลูกค้าโดยเงียบได้",
|
||||
"SHIPPING_FIELD_CONFLICT_NOT_FOUND": "ไม่พบความขัดแย้งของฟิลด์คำสั่งซื้อ",
|
||||
"SHIPPING_FIELD_CONFLICT_ALREADY_RESOLVED": "ความขัดแย้งนี้ถูกแก้ไขแล้ว",
|
||||
"SHIPPING_FIELD_CONFLICT_VERSION_MISMATCH": "เวอร์ชันความขัดแย้งเปลี่ยนแล้ว กรุณารีเฟรชแล้วลองใหม่",
|
||||
"SHIPPING_ORDER_DATA_VERSION_MISMATCH": "เวอร์ชันข้อมูลคำสั่งซื้อเปลี่ยนแล้ว กรุณารีเฟรชแล้วลองใหม่",
|
||||
"SHIPPING_INVALID_CONFLICT_RESOLUTION": "วิธีแก้ความขัดแย้งไม่ถูกต้อง",
|
||||
"SHIPPING_CASE_NOT_FOUND": "ไม่พบรายการธุรกิจ",
|
||||
"SHIPPING_BUSINESS_NUMBER_DAILY_LIMIT_REACHED": "ลำดับรายวันแบบสองหลักของลูกค้าถูกใช้ครบแล้ว (01-99)",
|
||||
"SHIPPING_BUSINESS_NUMBER_CUSTOMER_REQUIRED": "โปรดยืนยันลูกค้ามาตรฐานก่อนกำหนดหมายเลขธุรกิจ",
|
||||
|
||||
@@ -107,6 +107,8 @@
|
||||
"shippingCandidateQty": "数量",
|
||||
"shippingCandidateReservation": "Reservation ID",
|
||||
"shippingCandidateSourceType": "来源类型(路由线索)",
|
||||
"shippingCandidateHubCode": "Hub Code",
|
||||
"shippingCandidateMissingFields": "待补字段:{fields}",
|
||||
"shippingCandidateUom": "单位",
|
||||
"shippingCandidateAddLine": "新增订单行",
|
||||
"shippingCandidateUpdateDone": "订单候选修订已保存。",
|
||||
@@ -161,6 +163,35 @@
|
||||
"empty": "(空)",
|
||||
"unrecognized": "(未识别)"
|
||||
},
|
||||
"shippingParsedResult": {
|
||||
"title": "订单解析结果",
|
||||
"statusBlocked": "流转阻断",
|
||||
"statusReady": "可继续",
|
||||
"statusEmpty": "暂无订单行",
|
||||
"impactHint": "Reservation ID 用于库存匹配,缺失或非法时会阻断进入库存与履约;Source Type / Hub Code 是可选路由线索,用于库存源选择,缺失不阻断。",
|
||||
"missingFields": "待补字段",
|
||||
"sourceType": "Source Type",
|
||||
"hubCode": "Hub Code",
|
||||
"noLines": "当前任务尚无持久订单行。",
|
||||
"evidenceTitle": "字段证据",
|
||||
"unknownField": "未知字段",
|
||||
"documentId": "文档 #{id}",
|
||||
"issueMissing": "缺失",
|
||||
"issueInvalid": "格式非法",
|
||||
"issueConflict": "来源冲突",
|
||||
"issueCorrected": "已自动纠正",
|
||||
"issueUnknown": "需关注"
|
||||
},
|
||||
"shippingFieldConflict": {
|
||||
"title": "字段冲突待复核({count})",
|
||||
"hint": "新旧值均非空且不一致时不会自动覆盖。请选择保留原值或采用新值;解决后将回到解析确认。",
|
||||
"existing": "当前值",
|
||||
"incoming": "候选值",
|
||||
"keepExisting": "保留当前值",
|
||||
"takeIncoming": "采用候选值",
|
||||
"resolveSuccess": "冲突已解决,请重新确认解析结果",
|
||||
"resolveFailed": "解决冲突失败,请刷新后重试"
|
||||
},
|
||||
"shippingNoticeUi": {
|
||||
"rpaModeBrowser": "真实 RPA",
|
||||
"rpaModeMock": "Mock RPA",
|
||||
|
||||
@@ -87,6 +87,11 @@
|
||||
"SHIPPING_CUSTOMER_CONFIRMATION_LEGACY_UNSUPPORTED": "该历史任务暂不支持客户确认。",
|
||||
"SHIPPING_CUSTOMER_INACTIVE": "所选客户已停用。",
|
||||
"SHIPPING_CUSTOMER_NUMBERED_CASE_LOCKED": "已编号业务单不能静默更换客户。",
|
||||
"SHIPPING_FIELD_CONFLICT_NOT_FOUND": "订单字段冲突不存在。",
|
||||
"SHIPPING_FIELD_CONFLICT_ALREADY_RESOLVED": "该字段冲突已解决。",
|
||||
"SHIPPING_FIELD_CONFLICT_VERSION_MISMATCH": "字段冲突版本已变更,请刷新后重试。",
|
||||
"SHIPPING_ORDER_DATA_VERSION_MISMATCH": "订单数据版本已变更,请刷新后重试。",
|
||||
"SHIPPING_INVALID_CONFLICT_RESOLUTION": "冲突解决方式无效。",
|
||||
"SHIPPING_CASE_NOT_FOUND": "业务单不存在。",
|
||||
"SHIPPING_BUSINESS_NUMBER_DAILY_LIMIT_REACHED": "该客户当天两位业务流水已用完(01-99)。",
|
||||
"SHIPPING_BUSINESS_NUMBER_CUSTOMER_REQUIRED": "请先确认标准客户再生成业务编号。",
|
||||
|
||||
@@ -107,6 +107,8 @@
|
||||
"shippingCandidateQty": "數量",
|
||||
"shippingCandidateReservation": "Reservation ID",
|
||||
"shippingCandidateSourceType": "來源類型(路由線索)",
|
||||
"shippingCandidateHubCode": "Hub Code",
|
||||
"shippingCandidateMissingFields": "待補欄位:{fields}",
|
||||
"shippingCandidateUom": "單位",
|
||||
"shippingCandidateAddLine": "新增訂單行",
|
||||
"shippingCandidateUpdateDone": "訂單候選修訂已儲存。",
|
||||
@@ -161,6 +163,35 @@
|
||||
"empty": "(空)",
|
||||
"unrecognized": "(未辨識)"
|
||||
},
|
||||
"shippingParsedResult": {
|
||||
"title": "訂單解析結果",
|
||||
"statusBlocked": "流轉阻斷",
|
||||
"statusReady": "可繼續",
|
||||
"statusEmpty": "暫無訂單行",
|
||||
"impactHint": "Reservation ID 用於庫存匹配,缺失或非法時會阻斷進入庫存與履約;Source Type / Hub Code 是可選路由線索,用於庫存源選擇,缺失不阻斷。",
|
||||
"missingFields": "待補欄位",
|
||||
"sourceType": "Source Type",
|
||||
"hubCode": "Hub Code",
|
||||
"noLines": "目前任務尚無持久訂單行。",
|
||||
"evidenceTitle": "欄位證據",
|
||||
"unknownField": "未知欄位",
|
||||
"documentId": "文件 #{id}",
|
||||
"issueMissing": "缺失",
|
||||
"issueInvalid": "格式非法",
|
||||
"issueConflict": "來源衝突",
|
||||
"issueCorrected": "已自動糾正",
|
||||
"issueUnknown": "需關注"
|
||||
},
|
||||
"shippingFieldConflict": {
|
||||
"title": "欄位衝突待覆核({count})",
|
||||
"hint": "新舊值均非空且不一致時不會自動覆蓋。請選擇保留原值或採用新值;解決後將回到解析確認。",
|
||||
"existing": "目前值",
|
||||
"incoming": "候選值",
|
||||
"keepExisting": "保留目前值",
|
||||
"takeIncoming": "採用候選值",
|
||||
"resolveSuccess": "衝突已解決,請重新確認解析結果",
|
||||
"resolveFailed": "解決衝突失敗,請重新整理後再試"
|
||||
},
|
||||
"shippingNoticeUi": {
|
||||
"rpaModeBrowser": "真實 RPA",
|
||||
"rpaModeMock": "Mock RPA",
|
||||
|
||||
@@ -87,6 +87,11 @@
|
||||
"SHIPPING_CUSTOMER_CONFIRMATION_LEGACY_UNSUPPORTED": "該歷史任務暫不支援客戶確認。",
|
||||
"SHIPPING_CUSTOMER_INACTIVE": "所選客戶已停用。",
|
||||
"SHIPPING_CUSTOMER_NUMBERED_CASE_LOCKED": "已編號業務單不能靜默更換客戶。",
|
||||
"SHIPPING_FIELD_CONFLICT_NOT_FOUND": "訂單欄位衝突不存在。",
|
||||
"SHIPPING_FIELD_CONFLICT_ALREADY_RESOLVED": "該欄位衝突已解決。",
|
||||
"SHIPPING_FIELD_CONFLICT_VERSION_MISMATCH": "欄位衝突版本已變更,請重新整理後再試。",
|
||||
"SHIPPING_ORDER_DATA_VERSION_MISMATCH": "訂單資料版本已變更,請重新整理後再試。",
|
||||
"SHIPPING_INVALID_CONFLICT_RESOLUTION": "衝突解決方式無效。",
|
||||
"SHIPPING_CASE_NOT_FOUND": "業務單不存在。",
|
||||
"SHIPPING_BUSINESS_NUMBER_DAILY_LIMIT_REACHED": "該客戶當天兩位業務流水已用完(01-99)。",
|
||||
"SHIPPING_BUSINESS_NUMBER_CUSTOMER_REQUIRED": "請先確認標準客戶再產生業務編號。",
|
||||
|
||||
Reference in new issue
Block a user