feat(shipping-notice): 添加订单文档 Profile 盲测集和样本管理功能,支持创建、执行和批准盲测,增强订单冻结和库存核验功能

This commit is contained in:
hugo committed 2026-07-23 00:15:34 +08:00
1 parent c35223d49d
commit abd8fc1e16
98 files changed
+4629 -528

No files matched your search

@@ -10,6 +10,7 @@ import { getAuthHeaders } from '@/shared/utils/auth';
import type {
CreateOrderProfileFromSampleInput,
OrderProfileSampleDocument,
OrderProfileSampleIntake,
OrderProfileSamplePreview,
ShippingOrderDocumentProfile,
} from '../types/shipping-order-document-profile.types';
@@ -25,6 +26,19 @@ export const listOrderDocumentProfiles = () =>
export const listOrderProfileSamples = () =>
requestJson<OrderProfileSampleDocument[]>('/api/admin/shipping-notice/order-document-profile-samples', auth());
/** 将已上传 PDF/EML 创建为隔离模板样本,不创建发货任务。 */
export const createOrderProfileSample = (assetNo: string) =>
requestJson<OrderProfileSampleIntake>('/api/admin/shipping-notice/order-document-profile-samples', {
method: 'POST', body: JSON.stringify({ asset_no: assetNo }), ...jsonAuth(),
});
/** 轮询模板样本解析状态;响应不含正文、HTML 或坐标。 */
export const getOrderProfileSampleStatus = (intakeNo: string) =>
requestJson<OrderProfileSampleIntake>(
`/api/admin/shipping-notice/order-document-profile-samples/intakes/${encodeURIComponent(intakeNo)}`,
auth(),
);
/** 读取一个样本文档的网格预览,不返回 HTML 或 bbox。 */
export const getOrderProfileSampleTables = (documentId: number) =>
requestJson<OrderProfileSamplePreview>(
@@ -303,7 +303,7 @@
<div class="filename-pattern-field full">
<span>{{ t('admin.shippingInventory.filenamePattern') }}</span>
<div class="filename-input-wrap">
<input ref="filenamePatternInput" v-model="excelTemplate.filename_pattern" :disabled="templateReadOnly" required @input="updateFilenameVariableMenu" @keydown="handleFilenamePatternKeydown" @blur="closeFilenameVariableMenu">
<input ref="filenamePatternInput" v-model="excelTemplate.filename_pattern" :disabled="templateReadOnly" @input="updateFilenameVariableMenu" @keydown="handleFilenamePatternKeydown" @blur="closeFilenameVariableMenu">
<div v-if="filenameVariableMenuOpen" class="filename-variable-menu" role="listbox" :aria-label="t('admin.shippingInventory.filenameVariablesTitle')">
<button v-for="(variable, index) in filenameVariableCandidates" :key="variable.key" type="button" :class="{ active: index === filenameVariableActiveIndex }" role="option" :aria-selected="index === filenameVariableActiveIndex" @mousedown.prevent @click="insertFilenameVariable(variable)">
<code>{{ variable.key }}</code><span>{{ t(variable.labelKey) }}</span>
@@ -11,15 +11,18 @@ import { BusinessError } from '@/shared/api/client';
import { useMessage } from '@/shared/composables/useMessage';
import {
cloneOrderDocumentProfile,
createOrderProfileSample,
createOrderProfileFromSample,
deleteOrderDocumentProfile,
getOrderProfileSampleTables,
getOrderProfileSampleStatus,
listOrderDocumentProfiles,
listOrderProfileSamples,
publishOrderDocumentProfile,
retireOrderDocumentProfile,
updateOrderProfileFromSample,
} from '@/features/admin/api/shipping-order-document-profile.api';
import { uploadFileAsset } from '@/shared/api/file-assets.api';
import { getShippingOrderSchemaState } from '@/features/admin/api/shipping-order-schema.api';
import type {
OrderProfileSampleDocument,
@@ -40,6 +43,8 @@ const { t } = useI18n();
const message = useMessage();
const loading = ref(false);
const saving = ref(false);
const sampleUploading = ref(false);
const sampleInput = ref<HTMLInputElement | null>(null);
const editingProfileId = ref<number | null>(null);
const editingLockVersion = ref<number | null>(null);
const profiles = ref<ShippingOrderDocumentProfile[]>([]);
@@ -75,6 +80,7 @@ const duplicateTargets = computed(() => {
const canSave = computed(() => Boolean(
form.profile_code.trim() && form.display_name.trim() && form.schema_version_id
&& form.document_id && form.table_id && selectedTable.value
&& selectedTable.value.profile_creation_allowed
&& form.data_start_row_index > form.header_row_index
&& form.header_row_index >= 0
&& form.data_start_row_index < (selectedTable.value?.row_count || 0)
@@ -119,6 +125,35 @@ const loadPreview = async () => {
}
};
/** 上传管理员专用 PDF/EML 样本并轮询预解析;此入口不创建发货任务或调用 Dify。 */
const uploadSample = async (event: Event) => {
const file = (event.target as HTMLInputElement).files?.[0];
if (!file) return;
const extension = file.name.split('.').pop()?.toLowerCase();
if (extension !== 'pdf' && extension !== 'eml') {
message.error(t('admin.shippingOrderProfiles.sampleFileTypeInvalid'));
return;
}
sampleUploading.value = true;
try {
const asset = await uploadFileAsset(file);
const intake = await createOrderProfileSample(asset.asset_no);
for (let attempt = 0; attempt < 30; attempt += 1) {
const state = await getOrderProfileSampleStatus(intake.intake_no);
if (state.parse_status === 'parsed') break;
if (state.parse_status === 'parse_failed') throw new Error(state.error_code || 'sample parse failed');
await new Promise((resolve) => window.setTimeout(resolve, 1000));
}
await load();
message.success(t('admin.shippingOrderProfiles.sampleUploaded'));
} catch (error) {
showError(error);
} finally {
sampleUploading.value = false;
if (sampleInput.value) sampleInput.value.value = '';
}
};
/** 表格变化时按真实列数初始化受控列映射。 */
const resetColumns = () => {
const count = selectedTable.value?.column_count || 0;
@@ -271,6 +306,13 @@ onMounted(load);
</option>
</select>
</label>
<div class="rounded-lg border border-dashed border-slate-300 p-3">
<p class="text-sm text-slate-600">{{ t('admin.shippingOrderProfiles.uploadSampleHint') }}</p>
<input ref="sampleInput" class="sr-only" type="file" accept=".pdf,.eml,application/pdf,message/rfc822" @change="uploadSample" />
<button type="button" :disabled="sampleUploading" class="mt-2 rounded border border-blue-300 px-3 py-1.5 text-sm text-blue-700 disabled:opacity-50" @click="sampleInput?.click()">
{{ sampleUploading ? t('common.loading') : t('admin.shippingOrderProfiles.uploadSample') }}
</button>
</div>
<label class="block text-sm">
<span class="mb-1 block text-slate-600">{{ t('admin.shippingOrderProfiles.table') }}</span>
<select v-model="form.table_id" class="w-full rounded-lg border border-slate-300 px-3 py-2" :disabled="!preview">
@@ -309,6 +351,9 @@ onMounted(load);
<p v-if="duplicateTargets.length" class="rounded-lg bg-red-50 px-3 py-2 text-sm text-red-700">
{{ t('admin.shippingOrderProfiles.duplicateTargets', { fields: duplicateTargets.join(', ') }) }}
</p>
<p v-if="selectedTable && !selectedTable.profile_creation_allowed" class="rounded-lg bg-amber-50 px-3 py-2 text-sm text-amber-800">
{{ t('admin.shippingOrderProfiles.structureBlocked') }}
</p>
<button type="submit" :disabled="!canSave || saving" class="w-full rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white disabled:opacity-50">
{{ saving ? t('admin.shippingOrderProfiles.saving') : t(editingProfileId ? 'admin.shippingOrderProfiles.updateDraft' : 'admin.shippingOrderProfiles.createDraft') }}
</button>
@@ -58,6 +58,8 @@ export interface OrderProfileSampleTable {
row_count: number;
column_count: number;
rows: string[][];
issues: string[];
profile_creation_allowed: boolean;
}
export interface OrderProfileSamplePreview {
@@ -65,6 +67,13 @@ export interface OrderProfileSamplePreview {
tables: OrderProfileSampleTable[];
}
export interface OrderProfileSampleIntake {
intake_no: string;
parse_status: string;
document_count: number;
error_code?: string | null;
}
export interface CreateOrderProfileFromSampleInput {
profile_code: string;
display_name: string;
+40 -2
View File
@@ -449,6 +449,24 @@ export async function updateWorkspaceShippingNoticeFields(
return assertShippingOk(body);
}
/**
* 冻结已复核的订单数据为后续库存、Excel 与上传唯一读取的履约快照。
* @param taskNo - 当前任务编号
* @param expectedOrderDataVersion - 用户看到的订单版本,用于拒绝并发覆盖
*/
export async function freezeWorkspaceShippingOrder(
taskNo: string,
expectedOrderDataVersion: number,
) {
const body = await requestJson<ShippingApiStatusPayload & {
data?: { task_no: string; snapshot_id: number; order_data_version: number; frozen_at: string };
}>(
`/api/workspace/shipping-tasks/${encodeURIComponent(taskNo)}/freeze-order`,
jsonPost({ expected_order_data_version: expectedOrderDataVersion }),
);
return assertShippingOk(body);
}
/**
* 更新指定订单行。
* @param taskNo - 发货任务编号
@@ -580,6 +598,22 @@ export async function matchWorkspaceShippingInventory(taskNo: string) {
return assertShippingOk(body);
}
/**
* 上传当前任务使用的正式库存文件。
* @param taskNo - 发货任务编号
* @param file - 已按库存源发布方案导出的 xls/xlsx/csv 文件
* @returns 库存解析与后续匹配结果
*/
export async function uploadWorkspaceShippingInventory(taskNo: string, file: File) {
const form = new FormData();
form.append('file', file);
const body = await requestJson<ShippingDecisionResponse & ShippingApiStatusPayload>(
`/api/workspace/shipping-tasks/${encodeURIComponent(taskNo)}/upload-inventory`,
{ method: 'POST', body: form },
);
return assertShippingOk(body);
}
/**
* 以用户态触发自动推进,作为聊天前端兜底入口。
* @param taskNo - 发货任务编号
@@ -597,12 +631,16 @@ export async function autoProgressWorkspaceShippingTask(taskNo: string, lang?: s
/**
* 标记货代系统已人工上传完成。
* @param taskNo - 发货任务编号
* @param payload - 当前 Artifact、人工回执 FileAsset 编号及可选货代参考号;回执编号必填。
* @returns 上传确认结果
*/
export async function markWorkspaceShippingManualUploaded(taskNo: string) {
export async function markWorkspaceShippingManualUploaded(
taskNo: string,
payload: { evidence_asset_no: string; artifact_id?: number; freight_ref_no?: string },
) {
const body = await requestJson<ShippingDecisionResponse & ShippingApiStatusPayload>(
`/api/workspace/shipping-tasks/${encodeURIComponent(taskNo)}/mark-manual-uploaded`,
jsonPost(),
jsonPost(payload),
);
return assertShippingOk(body);
}
@@ -3,7 +3,7 @@
* 用途:验证建批 Chat Turn payload 包含幂等键与会话映射。
*/
import { describe, expect, it } from 'vitest';
import { buildShippingCreateBatchFromIntakesTurn, buildShippingCreateBatchTurn } from './shippingTurnActions';
import { buildShippingCreateBatchFromIntakesTurn, buildShippingCreateBatchTurn, resolveShippingChatTurn } from './shippingTurnActions';
describe('shippingTurnActions', () => {
it('buildShippingCreateBatchTurn includes idempotency_key in payload', () => {
@@ -32,4 +32,12 @@ describe('shippingTurnActions', () => {
expect(turn.payload.intake_nos).toEqual(['SNI-001']);
expect(turn.payload.candidate_nos).toEqual(['SNC-001', 'SNC-003']);
});
it('maps freeze_order only with the version shown to the user', () => {
expect(resolveShippingChatTurn('freeze_order', 'sn-freeze-001')).toBeNull();
expect(resolveShippingChatTurn('freeze_order', 'sn-freeze-001', { expectedOrderDataVersion: 7 })).toEqual({
actionType: 'shipping.freeze_order',
payload: { task_no: 'SN-FREEZE-001', expected_order_data_version: 7 },
});
});
});
@@ -21,7 +21,7 @@ export interface ShippingChatTurnSpec {
export function resolveShippingChatTurn(
actionId: string,
taskNo: string,
extra?: { sourceCode?: string },
extra?: { sourceCode?: string; expectedOrderDataVersion?: number },
): ShippingChatTurnSpec | null {
const normalizedTaskNo = String(taskNo || '').trim().toUpperCase();
if (!normalizedTaskNo) return null;
@@ -36,6 +36,16 @@ export function resolveShippingChatTurn(
}
switch (id) {
case 'freeze_order':
const expectedOrderDataVersion = extra?.expectedOrderDataVersion;
if (!Number.isInteger(expectedOrderDataVersion) || !expectedOrderDataVersion || expectedOrderDataVersion < 1) return null;
return {
actionType: 'shipping.freeze_order',
payload: {
task_no: normalizedTaskNo,
expected_order_data_version: expectedOrderDataVersion,
},
};
case 'generate_excel':
return { actionType: 'shipping.generate_excel', payload: { task_no: normalizedTaskNo } };
case 'retry_upload':
@@ -6,6 +6,7 @@
*/
import { buildShippingSubmitDecisionTurn, buildShippingTurnRefs } from './shippingTurnActions';
import { reportShippingDebugEvent } from './shippingDebugReporter';
import { uploadFileAsset } from '@/shared/api/file-assets.api';
import type { StartChatTurnOptions } from '../types/chat-turn.types';
import type { ChatMessage, ChatSessionItem } from '../types/chat.types';
import type { ComputedRef, Ref } from 'vue';
@@ -57,6 +58,30 @@ export function createShippingDecisionHandlers(ctx: ShippingDecisionContext) {
void ctx.refreshShippingActions();
};
/**
* 在 Chat 操作中选择并上传人工货代回执,返回当前用户私有的 FileAsset 编号。
* 取消选择不会提交“已手工上传”动作,确保后端的证据门禁没有绕过路径。
*/
const selectManualUploadEvidence = () => new Promise<File | null>((resolve) => {
const picker = document.createElement('input');
picker.type = 'file';
picker.accept = 'image/*,.pdf';
picker.style.display = 'none';
document.body.appendChild(picker);
let settled = false;
const finish = (file: File | null) => {
if (settled) return;
settled = true;
picker.remove();
resolve(file);
};
picker.addEventListener('change', () => finish(picker.files?.[0] || null), { once: true });
picker.addEventListener('cancel', () => finish(null), { once: true });
// 部分浏览器不会触发 cancel;窗口重新获得焦点后仍未选择文件即视为取消。
window.addEventListener('focus', () => setTimeout(() => finish(picker.files?.[0] || null), 0), { once: true });
picker.click();
});
/**
* 提交发货人工决策,经 Chat Turn 统一 SSE 返回。
*/
@@ -108,12 +133,18 @@ export function createShippingDecisionHandlers(ctx: ShippingDecisionContext) {
manualUploadInFlightTaskIds.add(normalizedTaskId);
const userText = (displayText || '我已在货代系统完成上传').trim();
try {
const evidenceFile = await selectManualUploadEvidence();
if (!evidenceFile) {
ctx.msg.warning('请先选择货代上传截图或回执文件');
return false;
}
const evidence = await uploadFileAsset(evidenceFile);
const ok = await ctx.startChatTurn({
agentId: ctx.currentAgentId.value,
inputType: 'action',
displayText: userText,
actionType: 'shipping.mark_manual_uploaded',
payload: { task_no: normalizedTaskId },
payload: { task_no: normalizedTaskId, evidence_asset_no: evidence.asset_no },
refs: buildShippingTurnRefs(normalizedTaskId, ctx.getActiveShippingBatchNo()),
hooks: {
onAssistantMessageFinished: async (assistantMsg) => {
@@ -101,6 +101,23 @@ describe('useChatShippingMenuHandler', () => {
);
});
it('reads the displayed order version before freezing through Chat Turn', async () => {
getWorkspaceShippingTask.mockResolvedValue({ order_data_version: 9 });
const ctx = createContext();
const { handleShippingMenuAction } = createShippingMenuHandlers(ctx);
await handleShippingMenuAction(
{ id: 'freeze_order', label: '冻结订单', message: '冻结已复核订单' },
undefined,
{ taskId: 'sn-freeze-901' },
);
expect(ctx.startChatTurn).toHaveBeenCalledWith(expect.objectContaining({
actionType: 'shipping.freeze_order',
payload: { task_no: 'SN-FREEZE-901', expected_order_data_version: 9 },
}));
});
it('passes explicit taskId into inventory picker actions', async () => {
const ctx = createContext();
const { handleShippingMenuAction } = createShippingMenuHandlers(ctx);
@@ -90,7 +90,7 @@ export function createShippingMenuHandlers(ctx: ShippingMenuHandlerContext) {
const runShippingActionTurn = async (
action: ShippingActionButton | { id?: string; message: string; label?: string },
taskId: string,
extra?: { sourceCode?: string },
extra?: { sourceCode?: string; expectedOrderDataVersion?: number },
) => {
const actionId = String(action.id || '').trim();
const turnSpec = resolveShippingChatTurn(actionId, taskId, extra);
@@ -153,6 +153,7 @@ export function createShippingMenuHandlers(ctx: ShippingMenuHandlerContext) {
}
const chatTurnActionIds = new Set([
'freeze_order',
'generate_excel',
'retry_upload',
'match_inventory',
@@ -171,6 +172,17 @@ export function createShippingMenuHandlers(ctx: ShippingMenuHandlerContext) {
}
try {
let sourceCode = '';
let expectedOrderDataVersion: number | undefined;
if (action.id === 'freeze_order') {
const detail = await getWorkspaceShippingTask(taskId);
const version = Number(detail.order_data_version);
if (!Number.isInteger(version) || version < 1) {
ctx.msg.warning(ctx.t('chat.shippingNoticeRefreshRequired'));
if (chatMsg) chatMsg.shipping_actions_used = false;
return;
}
expectedOrderDataVersion = version;
}
if (action.id === 'confirm_inventory_source') {
sourceCode = String((action as { source_code?: unknown }).source_code || '').trim().toUpperCase();
if (!sourceCode) {
@@ -193,7 +205,7 @@ export function createShippingMenuHandlers(ctx: ShippingMenuHandlerContext) {
await runShippingActionTurn(
{ ...action, message: displayMessage },
taskId,
sourceCode ? { sourceCode } : undefined,
sourceCode ? { sourceCode } : { expectedOrderDataVersion },
);
} catch (e: unknown) {
ctx.msg.warning(e instanceof Error ? e.message : '操作失败');
@@ -357,8 +357,13 @@ export interface ShippingTaskDetail extends ShippingTaskSummary {
parse_validation?: ShippingParseValidation | null;
process_field_gate?: ShippingProcessFieldGate | null;
source_candidate?: ShippingSourceCandidateProjection | null;
/** 非空表示订单已冻结,后续履约链只读取该 Snapshot。 */
order_snapshot_id?: number | null;
order_data_version?: number | null;
field_conflicts?: ShippingFieldConflict[] | null;
inventory_verifications?: ShippingInventoryVerification[];
export_artifacts?: ShippingExportArtifact[];
upload_attempts?: ShippingUploadAttempt[];
events: ShippingTaskEvent[];
ui_state?: ShippingTaskUiState;
}
@@ -551,6 +556,49 @@ export interface ShippingNoticeIntakeResponse {
candidate_count?: number;
}
export interface ShippingInventoryVerificationLine {
reservation_id: number;
required_qty: string;
available_qty: string;
status: 'available' | 'shortage' | 'invalid' | string;
}
export interface ShippingInventoryVerification {
id: number;
status: string;
inventory_snapshot_id?: number | null;
source_config_version?: string | null;
created_at?: string | null;
lines: ShippingInventoryVerificationLine[];
}
export interface ShippingExportArtifact {
id: number;
artifact_no: string;
status: string;
file_name: string;
file_size: number;
created_at?: string | null;
reservation_ids: number[];
}
export interface ShippingUploadAttempt {
id: number;
artifact_id: number;
attempt_no: number;
mode: 'rpa' | 'manual' | string;
status: string;
callback_id?: string | null;
freight_ref_no?: string | null;
error_code?: string | null;
error_message?: string | null;
evidence_asset_id?: number | null;
operator_id?: number | null;
started_at?: string | null;
finished_at?: string | null;
created_at?: string | null;
}
export type ShippingOrderExtractionRunStatus =
| 'queued'
| 'running'
@@ -1,42 +1,29 @@
<script setup lang="ts">
/**
* features/workspace/views/ShippingNoticeView.vue
* 用途:货代发货任务只读工作台,提供任务筛选、详情查看与跳转 Chat 继续处理入口。
* 用途:货代发货任务工作台,提供任务筛选、履约审计与跳转对话入口。
* 依赖:ShippingWorkflowStepper、ShippingMatchResultCard、ShippingTaskParsedResultCard、shipping.api。
* 逻辑:先拉取任务列表与详情,再以只读方式展示步骤、匹配结果、解析行和事件记录;所有写操作回到 Chat 主路径完成。
* 逻辑:先拉取任务列表与详情,再展示步骤、匹配结果、解析行和事件记录;所有用户写操作仅由对话界面执行。
*/
import { computed, onMounted, ref, watch } from 'vue';
import { useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { useAuthStore } from '@/features/auth';
import { Archive, ArrowLeft, Download, ExternalLink, RefreshCw, RotateCcw, Trash2 } from 'lucide-vue-next';
import { ArrowLeft, 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 { useMessage } from '@/shared/composables/useMessage';
import {
getWorkspaceShippingTask,
archiveWorkspaceShippingTasks,
deleteWorkspaceShippingTasks,
downloadWorkspaceShippingExportArchive,
listShippingChatAgents,
listWorkspaceShippingTasks,
purgeWorkspaceShippingTasks,
restoreWorkspaceShippingTasks,
SHIPPING_NOTICE_AGENT_CODE,
workspaceShippingExportUrl,
type ShippingCurrentStepProgress,
type ShippingTaskDetail,
type ShippingTaskSummary,
} from '@/features/chat/api/shipping.api';
import { getAuthHeaders } from '@/shared/utils/auth';
import { resolveShippingWorkflowSteps } from '@/features/chat/shipping';
import { sanitizeShippingRuntimeStatusText } from '@/features/chat/shipping/shippingText';
import {
selectVisibleShippingExports,
updateShippingExportSelection,
} from '@/features/shipping-notice/utils/exportSelection';
import { SHIPPING_TASK_STATUS_FILTERS } from '../shippingTaskStatuses';
const props = defineProps<{
@@ -45,17 +32,10 @@ const props = defineProps<{
const router = useRouter();
const { t, te } = useI18n();
const msg = useMessage();
const authStore = useAuthStore();
const isAdmin = computed(() => authStore.isAdmin);
const loading = ref(false);
const detailLoading = ref(false);
const tasks = ref<ShippingTaskSummary[]>([]);
const selectedTaskNo = ref<string | null>(null);
const selectedTaskNos = ref<string[]>([]);
const archiveDownloading = ref(false);
const dispositionSubmitting = ref(false);
const detail = ref<ShippingTaskDetail | null>(null);
const statusFilter = ref('all');
const lifecycleFilter = ref('active');
@@ -222,7 +202,6 @@ const loadCases = async (resetPage = false) => {
}
tasks.value = result.items;
totalTasks.value = result.total;
selectedTaskNos.value = [];
selectedTaskNo.value = null;
} catch {
tasks.value = [];
@@ -232,7 +211,7 @@ const loadCases = async (resetPage = false) => {
}
};
/** 切换分页时清空仅当前页有效的下载选择,防止跨页误下载。 */
/** 切换页码并重新读取只读任务列表。 */
const changePage = async (page: number) => {
const normalized = Math.max(1, Math.min(page, totalPages.value));
if (normalized === currentPage.value || loading.value) return;
@@ -271,93 +250,6 @@ const openInChat = (taskNo: string, conversationId?: string | null, batchNo?: st
router.push({ path: `/chat/${chatAgentId.value}`, query });
};
const downloadExport = async (taskNo: string) => {
const url = workspaceShippingExportUrl(taskNo);
const res = await fetch(url, { headers: getAuthHeaders() });
if (!res.ok) return;
const blob = await res.blob();
const a = document.createElement('a');
a.href = URL.createObjectURL(blob);
a.download = detail.value?.export_file_name || `${taskNo}.xlsx`;
a.click();
URL.revokeObjectURL(a.href);
};
/** 下载当前任务所属批次的所有有效 Artifact;缺失票据记录在 ZIP manifest。 */
const downloadBatchExports = async (batchNo: string) => {
await downloadExportArchive({ batch_no: batchNo });
};
/** 下载批次或显式任务集合,并确保临时对象 URL 在点击后释放。 */
const downloadExportArchive = async (payload: { batch_no?: string; task_nos?: string[] }) => {
archiveDownloading.value = true;
try {
const { blob, filename } = await downloadWorkspaceShippingExportArchive(payload);
const a = document.createElement('a');
a.href = URL.createObjectURL(blob); a.download = filename; a.click(); URL.revokeObjectURL(a.href);
} catch {
msg.error(t('workspace.shippingNotice.archiveDownloadFailed'));
} finally {
archiveDownloading.value = false;
}
};
/** 更新单票勾选;数量门禁与后端 100 票限制一致。 */
const toggleTask = (taskNo: string, checked: boolean) => {
selectedTaskNos.value = updateShippingExportSelection(selectedTaskNos.value, taskNo, checked);
};
/** 全选或清空当前页结果,切页后不保留选择。 */
const toggleAllVisibleTasks = (checked: boolean) => {
selectedTaskNos.value = checked
? selectVisibleShippingExports(tasks.value.map((item) => item.task_no))
: [];
};
const allVisibleTasksSelected = computed(() => (
tasks.value.length > 0 && tasks.value.every((item) => selectedTaskNos.value.includes(item.task_no))
));
/** 按用户显式选择下载,后端仍逐票执行权限与 Artifact 当前性校验。 */
const downloadSelectedExports = async () => {
if (!selectedTaskNos.value.length) return;
await downloadExportArchive({ task_nos: selectedTaskNos.value });
};
/** 批量执行回收站、归档或恢复;删除必须显式录入原因,服务端仍逐票重算资格。 */
const applyTaskDisposition = async (action: 'delete' | 'archive' | 'restore' | 'purge') => {
if (!selectedTaskNos.value.length || dispositionSubmitting.value) return;
let reason = '';
if (action === 'delete' || action === 'purge') {
const promptKey = action === 'purge'
? 'workspace.shippingNotice.disposition.purgeReasonPrompt'
: 'workspace.shippingNotice.disposition.reasonPrompt';
reason = window.prompt(t(promptKey))?.trim() || '';
if (!reason) return;
}
if (!window.confirm(t('workspace.shippingNotice.disposition.confirm', {
action: t(`workspace.shippingNotice.disposition.actions.${action}`), count: selectedTaskNos.value.length,
}))) return;
dispositionSubmitting.value = true;
try {
const result = action === 'delete'
? await deleteWorkspaceShippingTasks(selectedTaskNos.value, reason)
: action === 'archive'
? await archiveWorkspaceShippingTasks(selectedTaskNos.value)
: action === 'restore'
? await restoreWorkspaceShippingTasks(selectedTaskNos.value)
: await purgeWorkspaceShippingTasks(selectedTaskNos.value, reason);
const blocked = result.results.filter((item) => item.status === 'blocked').length;
if (blocked) msg.error(t('workspace.shippingNotice.disposition.partial', { success: result.results.length - blocked, blocked }));
else msg.success(t('workspace.shippingNotice.disposition.success', { count: result.results.length }));
await loadCases();
} catch {
msg.error(t('workspace.shippingNotice.disposition.failed'));
} finally {
dispositionSubmitting.value = false;
}
};
const shortageLines = computed(() => detail.value?.shortage?.lines || []);
const hasMatchCard = computed(() =>
!!detail.value && (
@@ -393,14 +285,16 @@ onMounted(async () => {
<p class="text-sm text-muted">{{ $t('workspace.shippingNotice.subtitle') }}</p>
</div>
</div>
<button
type="button"
class="inline-flex items-center gap-1.5 rounded-xl border border-default px-3 py-1.5 text-sm font-medium text-secondary transition-colors hover:bg-surface-soft"
@click="loadCases(true)"
>
<RefreshCw class="h-3.5 w-3.5" />
{{ $t('workspace.shippingNotice.refresh') }}
</button>
<div class="flex gap-2">
<button
type="button"
class="inline-flex items-center gap-1.5 rounded-xl border border-default px-3 py-1.5 text-sm font-medium text-secondary transition-colors hover:bg-surface-soft"
@click="loadCases(true)"
>
<RefreshCw class="h-3.5 w-3.5" />
{{ $t('workspace.shippingNotice.refresh') }}
</button>
</div>
</div>
<div class="flex flex-wrap items-end gap-3 rounded-2xl border border-default/80 bg-surface/70 px-4 py-3 shadow-sm">
@@ -423,67 +317,6 @@ onMounted(async () => {
>
{{ $t('workspace.shippingNotice.search') }}
</button>
<label class="ml-auto inline-flex items-center gap-2 text-sm text-secondary">
<input
type="checkbox"
:checked="allVisibleTasksSelected"
:disabled="tasks.length === 0"
@change="toggleAllVisibleTasks(($event.target as HTMLInputElement).checked)"
>
{{ $t('workspace.shippingNotice.selectAllVisible') }}
</label>
<span class="text-sm text-muted">
{{ $t('workspace.shippingNotice.selectedCount', { count: selectedTaskNos.length }) }}
</span>
<button
type="button"
class="inline-flex items-center gap-1.5 rounded-xl border border-default px-3 py-2 text-sm font-medium text-secondary hover:bg-surface-soft disabled:cursor-not-allowed disabled:opacity-50"
:disabled="selectedTaskNos.length === 0 || archiveDownloading"
@click="downloadSelectedExports"
>
<Download class="h-3.5 w-3.5" />
{{ $t('workspace.shippingNotice.downloadSelected') }}
</button>
<button
v-if="lifecycleFilter === 'active'"
type="button"
class="inline-flex items-center gap-1.5 rounded-xl border border-default px-3 py-2 text-sm font-medium text-secondary hover:bg-surface-soft disabled:cursor-not-allowed disabled:opacity-50"
:disabled="selectedTaskNos.length === 0 || dispositionSubmitting"
@click="applyTaskDisposition('archive')"
>
<Archive class="h-3.5 w-3.5" />
{{ $t('workspace.shippingNotice.disposition.actions.archive') }}
</button>
<button
v-if="lifecycleFilter === 'active'"
type="button"
class="inline-flex items-center gap-1.5 rounded-xl border border-rose-300 px-3 py-2 text-sm font-medium text-rose-700 hover:bg-rose-50 disabled:cursor-not-allowed disabled:opacity-50"
:disabled="selectedTaskNos.length === 0 || dispositionSubmitting"
@click="applyTaskDisposition('delete')"
>
<Trash2 class="h-3.5 w-3.5" />
{{ $t('workspace.shippingNotice.disposition.actions.delete') }}
</button>
<button
v-if="lifecycleFilter === 'deleted'"
type="button"
class="inline-flex items-center gap-1.5 rounded-xl border border-default px-3 py-2 text-sm font-medium text-secondary hover:bg-surface-soft disabled:cursor-not-allowed disabled:opacity-50"
:disabled="selectedTaskNos.length === 0 || dispositionSubmitting"
@click="applyTaskDisposition('restore')"
>
<RotateCcw class="h-3.5 w-3.5" />
{{ $t('workspace.shippingNotice.disposition.actions.restore') }}
</button>
<button
v-if="lifecycleFilter === 'deleted' && isAdmin"
type="button"
class="inline-flex items-center gap-1.5 rounded-xl border border-rose-300 px-3 py-2 text-sm font-medium text-rose-700 hover:bg-rose-50 disabled:cursor-not-allowed disabled:opacity-50"
:disabled="selectedTaskNos.length === 0 || dispositionSubmitting"
@click="applyTaskDisposition('purge')"
>
<Trash2 class="h-3.5 w-3.5" />
{{ $t('workspace.shippingNotice.disposition.actions.purge') }}
</button>
</div>
<div class="grid gap-5 lg:grid-cols-5">
@@ -500,13 +333,6 @@ onMounted(async () => {
class="flex w-full items-start gap-3 rounded-2xl border px-4 py-3 transition-colors"
:class="selectedTaskNo === item.task_no ? 'border-brand-400 bg-brand-50/60' : 'border-default hover:bg-surface-soft/70'"
>
<input
type="checkbox"
class="mt-1"
:aria-label="$t('workspace.shippingNotice.selectForDownload', { taskNo: item.task_no })"
:checked="selectedTaskNos.includes(item.task_no)"
@change="toggleTask(item.task_no, ($event.target as HTMLInputElement).checked)"
>
<button type="button" class="min-w-0 flex-1 text-left" @click="selectedTaskNo = item.task_no">
<div class="flex items-center justify-between gap-2">
<span class="font-mono text-sm font-semibold text-primary">{{ item.task_no }}</span>
@@ -585,25 +411,6 @@ onMounted(async () => {
<ExternalLink class="h-3.5 w-3.5" />
{{ $t('workspace.shippingNotice.openChat') }}
</button>
<button
v-if="detail.export_file_name"
type="button"
class="inline-flex items-center gap-1 rounded-xl border border-default px-3 py-1.5 text-sm font-medium text-secondary hover:bg-surface-soft"
@click="downloadExport(detail.task_no)"
>
<Download class="h-3.5 w-3.5" />
{{ $t('workspace.shippingNotice.download') }}
</button>
<button
v-if="detail.batch_no"
type="button"
class="inline-flex items-center gap-1 rounded-xl border border-default px-3 py-1.5 text-sm font-medium text-secondary hover:bg-surface-soft"
:disabled="archiveDownloading"
@click="downloadBatchExports(detail.batch_no)"
>
<Download class="h-3.5 w-3.5" />
{{ $t('workspace.shippingNotice.downloadBatch') }}
</button>
</div>
</div>
@@ -743,6 +550,59 @@ onMounted(async () => {
:action-busy="false"
/>
<section
v-if="detail.inventory_verifications?.length"
class="rounded-2xl border border-default/80 bg-surface px-4 py-3 text-sm"
>
<h3 class="mb-2 text-sm font-semibold text-secondary">{{ $t('workspace.shippingNotice.fulfillmentTimeline.inventoryTitle') }}</h3>
<div v-for="verification in detail.inventory_verifications" :key="verification.id" class="border-t border-default/70 py-2 first:border-t-0 first:pt-0">
<div class="flex flex-wrap gap-x-3 gap-y-1 text-xs">
<span class="font-medium text-secondary">#{{ verification.id }} · {{ verification.status }}</span>
<span>{{ formatLocalDateTime(verification.created_at) }}</span>
</div>
<div class="mt-1 text-xs text-muted">
<span v-for="line in verification.lines" :key="line.reservation_id" class="mr-3 inline-block">
{{ $t('workspace.shippingNotice.fulfillmentTimeline.verificationLine', { reservationId: line.reservation_id, availableQty: line.available_qty, requiredQty: line.required_qty, status: line.status }) }}
</span>
</div>
</div>
</section>
<section
v-if="detail.export_artifacts?.length"
class="rounded-2xl border border-default/80 bg-surface px-4 py-3 text-sm"
>
<h3 class="mb-2 text-sm font-semibold text-secondary">{{ $t('workspace.shippingNotice.fulfillmentTimeline.artifactTitle') }}</h3>
<div v-for="artifact in detail.export_artifacts" :key="artifact.id" class="border-t border-default/70 py-2 first:border-t-0 first:pt-0">
<div class="flex flex-wrap gap-x-3 gap-y-1 text-xs">
<span class="font-mono font-medium text-secondary">{{ artifact.artifact_no }}</span>
<span>{{ artifact.status }}</span>
<span>{{ artifact.file_name }}</span>
<span>{{ formatLocalDateTime(artifact.created_at) }}</span>
</div>
<p class="mt-1 text-xs text-muted">{{ $t('workspace.shippingNotice.fulfillmentTimeline.reservationIds', { reservationIds: artifact.reservation_ids.join(', ') || '—' }) }}</p>
</div>
</section>
<section
v-if="detail.upload_attempts?.length"
class="rounded-2xl border border-default/80 bg-surface px-4 py-3 text-sm"
>
<h3 class="mb-2 text-sm font-semibold text-secondary">{{ $t('workspace.shippingNotice.fulfillmentTimeline.uploadTitle') }}</h3>
<div v-for="attempt in detail.upload_attempts" :key="attempt.id" class="border-t border-default/70 py-2 first:border-t-0 first:pt-0">
<div class="flex flex-wrap gap-x-3 gap-y-1 text-xs">
<span class="font-medium text-secondary">{{ $t('workspace.shippingNotice.fulfillmentTimeline.uploadAttempt', { artifactId: attempt.artifact_id, attemptNo: attempt.attempt_no }) }}</span>
<span>{{ attempt.mode }}</span><span>{{ attempt.status }}</span>
<span>{{ formatLocalDateTime(attempt.finished_at || attempt.created_at) }}</span>
</div>
<p v-if="attempt.freight_ref_no || attempt.error_message || attempt.evidence_asset_id" class="mt-1 text-xs text-muted">
{{ attempt.freight_ref_no ? $t('workspace.shippingNotice.fulfillmentTimeline.freightRef', { freightRefNo: attempt.freight_ref_no }) : '' }}
{{ attempt.error_message ? ` ${attempt.error_message}` : '' }}
{{ attempt.evidence_asset_id ? ` ${$t('workspace.shippingNotice.fulfillmentTimeline.evidenceAsset', { assetId: attempt.evidence_asset_id })}` : '' }}
</p>
</div>
</section>
<ShippingTaskParsedResultCard
v-if="detail.lines?.length || detail.process_field_gate || detail.parse_validation || detail.source_candidate || detail.field_conflicts?.length"
class="mt-3"
+5
View File
@@ -2468,6 +2468,11 @@
"shippingOrderProfiles": {
"title": "Order Document Profiles",
"subtitle": "Configure exact column mappings from MinerU table samples without editing JSON or fingerprints.",
"structureBlocked": "This table has a structural error and cannot create a profile. Wait for coordinate-evidence reconstruction and review it; do not repair the raw grid with field mappings.",
"uploadSample": "Upload Template Sample",
"uploadSampleHint": "PDF or EML only. It is used only for profile configuration and structural review; no shipping task is created.",
"sampleFileTypeInvalid": "Only PDF or EML files are supported as profile samples.",
"sampleUploaded": "The template sample is parsed. Select its document from the sample list to continue.",
"createTitle": "Create Draft from Sample",
"editTitle": "Update Draft from Sample",
"sample": "Sample document",
+3
View File
@@ -1,6 +1,7 @@
{
"generic": "Request failed.",
"codes": {
"SHIPPING_NOTICE.BATCH_FILE_LIMIT_EXCEEDED": "The number of uploaded files exceeds the system limit. Split the batch and try again.",
"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.",
@@ -23,6 +24,8 @@
"SHIPPING_ORDER_DOCUMENT_PROFILE_INVALID": "The order document parsing profile is invalid.",
"SHIPPING_ORDER_DOCUMENT_PROFILE_SCHEMA_INVALID": "The profile must bind to a published or retired order schema version.",
"SHIPPING_ORDER_DOCUMENT_PROFILE_FIELD_INVALID": "The profile references an unavailable order line field.",
"SHIPPING_ORDER_DOCUMENT_PROFILE_HEADER_CONTAMINATED": "The sample header contains order line data. Rebuild the table structure before creating a profile.",
"SHIPPING_ORDER_DOCUMENT_PROFILE_SAMPLE_FILE_TYPE_INVALID": "Only PDF or EML files are supported as profile samples.",
"SHIPPING_ORDER_DOCUMENT_PROFILE_IMMUTABLE": "A published order document parsing profile cannot be modified.",
"SHIPPING_ORDER_DOCUMENT_PROFILE_LOCK_VERSION_REQUIRED": "The profile lock version is missing. Refresh and try again.",
"SHIPPING_ORDER_DOCUMENT_PROFILE_VERSION_CONFLICT": "Another administrator changed the profile. Refresh and try again.",
+29 -1
View File
@@ -113,6 +113,7 @@
"schedule": {
"title": "Schedule Runs",
"refresh": "Refresh",
"uploadNotices": "Upload shipping notices",
"search": "Search",
"reset": "Reset",
"loading": "Loading...",
@@ -158,8 +159,9 @@
},
"shippingNotice": {
"title": "Shipping Notice Tasks",
"subtitle": "Read-only view. Continue processing in Chat.",
"subtitle": "Review and perform controlled fulfillment actions independently.",
"refresh": "Refresh",
"uploadNotices": "Upload shipping notices",
"search": "Search",
"loading": "Loading...",
"empty": "No shipping tasks yet",
@@ -173,6 +175,22 @@
"downloadSelected": "Download selected ZIP",
"selectForDownload": "Select task {taskNo} for batch download",
"archiveDownloadFailed": "Batch download failed. Refresh the tasks and try again.",
"actions": {
"title": "Available actions",
"freezeOrder": "Freeze order",
"freezeConfirm": "Freeze the reviewed order? The frozen order becomes the fulfillment fact for inventory, Excel, and upload.",
"freezeFailed": "Order freezing failed or its version changed. Refresh and review it again.",
"inventorySourcePrompt": "Enter the published inventory source code:",
"customerPrompt": "Enter a customer short code or name to search:",
"customerNotFound": "No enabled customer is available to confirm.",
"customerConfirm": "Bind this task to customer {name} ({code})?",
"failed": "Action failed. Refresh the task and try again."
},
"candidateReview": {
"title": "Candidates awaiting batch creation",
"hint": "Select, revise, and resolve duplicates here. Only selected candidates that pass backend gates can create a batch.",
"createBatch": "Create batch from selected"
},
"lifecycle": {
"active": "Active",
"deleted": "Recycle bin",
@@ -246,6 +264,16 @@
"fileNo": "Snapshot ID",
"expired": "Snapshot expired; system will re-trigger RPA or wait for manual upload"
},
"fulfillmentTimeline": {
"inventoryTitle": "Inventory verification history",
"verificationLine": "Reservation {reservationId}: {availableQty}/{requiredQty} ({status})",
"artifactTitle": "Excel artifact timeline",
"reservationIds": "Reservation IDs: {reservationIds}",
"uploadTitle": "Upload attempt timeline",
"uploadAttempt": "Artifact #{artifactId} / Attempt {attemptNo}",
"freightRef": "Freight reference: {freightRefNo}",
"evidenceAsset": "Receipt asset: {assetId}"
},
"status": {
"all": "All",
"created": "Created",
+5
View File
@@ -2336,6 +2336,11 @@
"shippingOrderProfiles": {
"title": "โปรไฟล์เอกสารคำสั่งซื้อ",
"subtitle": "ตั้งค่าการแมปคอลัมน์จากตัวอย่างตาราง MinerU โดยไม่ต้องแก้ไข JSON หรือลายนิ้วมือโครงสร้าง",
"structureBlocked": "ตารางนี้มีข้อผิดพลาดด้านโครงสร้างและไม่สามารถสร้างโปรไฟล์ได้ โปรดรอการสร้างใหม่จากหลักฐานพิกัดแล้วตรวจทาน ห้ามแก้กริดต้นฉบับด้วยการแมปฟิลด์",
"uploadSample": "อัปโหลดตัวอย่างเทมเพลต",
"uploadSampleHint": "รองรับเฉพาะ PDF หรือ EML ใช้สำหรับตั้งค่าโปรไฟล์และตรวจทานโครงสร้างเท่านั้น และไม่สร้างงานจัดส่ง",
"sampleFileTypeInvalid": "ตัวอย่างโปรไฟล์รองรับเฉพาะไฟล์ PDF หรือ EML",
"sampleUploaded": "แยกวิเคราะห์ตัวอย่างเทมเพลตแล้ว โปรดเลือกเอกสารจากรายการตัวอย่างเพื่อดำเนินการต่อ",
"createTitle": "สร้างฉบับร่างจากตัวอย่าง",
"editTitle": "อัปเดตฉบับร่างจากตัวอย่าง",
"sample": "เอกสารตัวอย่าง",
+3
View File
@@ -1,6 +1,7 @@
{
"generic": "คำขอล้มเหลว",
"codes": {
"SHIPPING_NOTICE.BATCH_FILE_LIMIT_EXCEEDED": "จำนวนไฟล์ที่อัปโหลดเกินขีดจำกัดของระบบ โปรดแบ่งชุดแล้วลองใหม่",
"AGENT.EXPOSURE_ROLE_IMMUTABLE": "ไม่สามารถแปลงแอปพลิเคชันเป็นตัวดำเนินการภายในหรือกลับกันได้",
"AGENT.ADMIN_SCOPE_INVALID": "พารามิเตอร์แท็บการจัดการแอปพลิเคชันไม่ถูกต้อง",
"AGENT.INTERNAL_EXECUTOR_USER_ACCESS_FORBIDDEN": "ไม่สามารถแสดง มอบสิทธิ์ หรือเข้าถึงตัวดำเนินการภายในผ่าน API สำหรับผู้ใช้ได้",
@@ -23,6 +24,8 @@
"SHIPPING_ORDER_DOCUMENT_PROFILE_INVALID": "การตั้งค่าโปรไฟล์การแยกข้อมูลเอกสารคำสั่งซื้อไม่ถูกต้อง",
"SHIPPING_ORDER_DOCUMENT_PROFILE_SCHEMA_INVALID": "โปรไฟล์ต้องผูกกับเวอร์ชันสคีมาคำสั่งซื้อที่เผยแพร่หรือเลิกใช้งานแล้ว",
"SHIPPING_ORDER_DOCUMENT_PROFILE_FIELD_INVALID": "โปรไฟล์อ้างอิงฟิลด์รายการคำสั่งซื้อที่ไม่พร้อมใช้งาน",
"SHIPPING_ORDER_DOCUMENT_PROFILE_HEADER_CONTAMINATED": "ส่วนหัวของตัวอย่างมีข้อมูลรายการคำสั่งซื้อ ต้องสร้างโครงสร้างตารางใหม่ก่อนจึงจะสร้างโปรไฟล์ได้",
"SHIPPING_ORDER_DOCUMENT_PROFILE_SAMPLE_FILE_TYPE_INVALID": "ตัวอย่างโปรไฟล์รองรับเฉพาะไฟล์ PDF หรือ EML",
"SHIPPING_ORDER_DOCUMENT_PROFILE_IMMUTABLE": "ไม่สามารถแก้ไขโปรไฟล์เอกสารคำสั่งซื้อที่เผยแพร่แล้ว",
"SHIPPING_ORDER_DOCUMENT_PROFILE_LOCK_VERSION_REQUIRED": "ไม่มีเวอร์ชันล็อกของโปรไฟล์ โปรดรีเฟรชแล้วลองใหม่",
"SHIPPING_ORDER_DOCUMENT_PROFILE_VERSION_CONFLICT": "ผู้ดูแลระบบรายอื่นแก้ไขโปรไฟล์แล้ว โปรดรีเฟรชแล้วลองใหม่",
+28 -1
View File
@@ -100,8 +100,9 @@
},
"shippingNotice": {
"title": "ใบแจ้งส่งสินค้า",
"subtitle": "พื้นที่ทำงานแบบอ่านอย่างเดียว โปรดดำเนินการต่อใน Chat",
"subtitle": "ตรวจสอบและดำเนินการตามขั้นตอนการจัดส่งที่ควบคุมได้อย่างอิสระ",
"refresh": "รีเฟรช",
"uploadNotices": "อัปโหลดใบแจ้งการจัดส่ง",
"search": "ค้นหา",
"loading": "กำลังโหลด...",
"empty": "ยังไม่มีงานส่งสินค้า",
@@ -115,6 +116,22 @@
"downloadSelected": "ดาวน์โหลด ZIP ที่เลือก",
"selectForDownload": "เลือกงาน {taskNo} สำหรับดาวน์โหลดแบบกลุ่ม",
"archiveDownloadFailed": "ดาวน์โหลดแบบกลุ่มไม่สำเร็จ โปรดรีเฟรชงานแล้วลองอีกครั้ง",
"actions": {
"title": "การดำเนินการที่ทำได้",
"freezeOrder": "ตรึงคำสั่งซื้อ",
"freezeConfirm": "ยืนยันการตรึงคำสั่งซื้อที่ตรวจทานแล้วหรือไม่ หลังตรึงแล้วจะเป็นข้อเท็จจริงสำหรับสต็อก Excel และการอัปโหลด",
"freezeFailed": "ตรึงคำสั่งซื้อไม่สำเร็จหรือเวอร์ชันเปลี่ยนแล้ว โปรดรีเฟรชและตรวจทานอีกครั้ง",
"inventorySourcePrompt": "ป้อนรหัสแหล่งสต็อกที่เผยแพร่แล้ว:",
"customerPrompt": "ป้อนรหัสย่อลูกค้าหรือชื่อเพื่อค้นหา:",
"customerNotFound": "ไม่พบลูกค้าที่เปิดใช้งานสำหรับการยืนยัน",
"customerConfirm": "ผูกงานนี้กับลูกค้า {name} ({code}) หรือไม่?",
"failed": "การดำเนินการล้มเหลว โปรดรีเฟรชงานแล้วลองใหม่"
},
"candidateReview": {
"title": "ผู้สมัครที่รอสร้างแบตช์",
"hint": "เลือก แก้ไข และจัดการรายการซ้ำที่นี่ เฉพาะผู้สมัครที่เลือกและผ่านเงื่อนไขฝั่งเซิร์ฟเวอร์จึงสร้างแบตช์ได้",
"createBatch": "สร้างแบตช์จากรายการที่เลือก"
},
"lifecycle": {
"active": "กำลังดำเนินการ",
"deleted": "ถังรีไซเคิล",
@@ -188,6 +205,16 @@
"fileNo": "รหัสสแนปช็อต",
"expired": "สแนปช็อตหมดอายุ ระบบจะเรียก RPA ใหม่หรือรอการอัปโหลดด้วยตนเอง"
},
"fulfillmentTimeline": {
"inventoryTitle": "ประวัติการตรวจสอบสต็อก",
"verificationLine": "ใบจอง {reservationId}: {availableQty}/{requiredQty} ({status})",
"artifactTitle": "ไทม์ไลน์ Excel Artifact",
"reservationIds": "รหัสใบจอง: {reservationIds}",
"uploadTitle": "ไทม์ไลน์ความพยายามอัปโหลด",
"uploadAttempt": "Artifact #{artifactId} / Attempt {attemptNo}",
"freightRef": "หมายเลขอ้างอิงผู้ขนส่ง: {freightRefNo}",
"evidenceAsset": "ไฟล์หลักฐาน: {assetId}"
},
"status": {
"all": "ทั้งหมด",
"created": "สร้างแล้ว",
+5
View File
@@ -2446,6 +2446,11 @@
"shippingOrderProfiles": {
"title": "订单文档模板",
"subtitle": "从 MinerU 表格样本可视化配置精确列映射;无需编辑 JSON 或结构指纹。",
"structureBlocked": "该表格结构异常,不能创建模板。请等待坐标证据重建后再复核,勿通过字段映射修复原始网格。",
"uploadSample": "上传模板样本",
"uploadSampleHint": "仅支持 PDF 或 EML,仅用于模板配置和结构复核,不创建发货任务。",
"sampleFileTypeInvalid": "模板样本仅支持 PDF 或 EML 文件。",
"sampleUploaded": "模板样本已解析,请从样本列表选择文档继续配置。",
"createTitle": "从样本创建草稿",
"editTitle": "用样本更新草稿",
"sample": "样本文档",
+3
View File
@@ -1,6 +1,7 @@
{
"generic": "请求失败。",
"codes": {
"SHIPPING_NOTICE.BATCH_FILE_LIMIT_EXCEEDED": "本次上传文件数超过系统限制,请拆分后重试。",
"AGENT.EXPOSURE_ROLE_IMMUTABLE": "应用与内部执行器不可互相转换。",
"AGENT.ADMIN_SCOPE_INVALID": "应用管理页签参数无效。",
"AGENT.INTERNAL_EXECUTOR_USER_ACCESS_FORBIDDEN": "内部执行器不能展示、授权或通过普通用户接口访问。",
@@ -23,6 +24,8 @@
"SHIPPING_ORDER_DOCUMENT_PROFILE_INVALID": "订单文档解析模板配置无效。",
"SHIPPING_ORDER_DOCUMENT_PROFILE_SCHEMA_INVALID": "订单文档解析模板必须绑定已发布或已退役的订单字段版本。",
"SHIPPING_ORDER_DOCUMENT_PROFILE_FIELD_INVALID": "订单文档解析模板引用了不可用的订单明细字段。",
"SHIPPING_ORDER_DOCUMENT_PROFILE_HEADER_CONTAMINATED": "样本表头混入订单明细,必须先重建表格结构,不能创建模板。",
"SHIPPING_ORDER_DOCUMENT_PROFILE_SAMPLE_FILE_TYPE_INVALID": "模板样本仅支持 PDF 或 EML 文件。",
"SHIPPING_ORDER_DOCUMENT_PROFILE_IMMUTABLE": "已发布的订单文档解析模板不可修改。",
"SHIPPING_ORDER_DOCUMENT_PROFILE_LOCK_VERSION_REQUIRED": "订单文档解析模板缺少版本锁,请刷新后重试。",
"SHIPPING_ORDER_DOCUMENT_PROFILE_VERSION_CONFLICT": "订单文档解析模板已被其他管理员修改,请刷新后重试。",
+29 -1
View File
@@ -114,6 +114,7 @@
"schedule": {
"title": "排程记录",
"refresh": "刷新",
"uploadNotices": "上传发货通知",
"search": "查询",
"reset": "重置",
"loading": "正在加载...",
@@ -159,8 +160,9 @@
},
"shippingNotice": {
"title": "货代发货通知",
"subtitle": "只读工作台,请在 Chat 中继续处理。",
"subtitle": "可独立查看、复核与执行受控履约操作。",
"refresh": "刷新",
"uploadNotices": "上传发货通知",
"search": "查询",
"loading": "正在加载...",
"empty": "暂无发货任务",
@@ -174,6 +176,22 @@
"downloadSelected": "下载所选 ZIP",
"selectForDownload": "选择任务 {taskNo} 用于批量下载",
"archiveDownloadFailed": "批量下载失败,请刷新任务后重试。",
"actions": {
"title": "当前可执行操作",
"freezeOrder": "冻结订单",
"freezeConfirm": "确认冻结当前已复核订单吗?冻结后将作为库存、Excel 和上传的履约事实。",
"freezeFailed": "订单冻结失败或版本已变化,请刷新后复核。",
"inventorySourcePrompt": "请输入已发布的库存源编码:",
"customerPrompt": "请输入客户简码或名称以搜索:",
"customerNotFound": "未找到可确认的启用客户。",
"customerConfirm": "确认将当前任务绑定到客户 {name}({code})吗?",
"failed": "操作失败,请刷新任务后重试。"
},
"candidateReview": {
"title": "待建单候选复核",
"hint": "在此完成候选选择、人工修订和重复处理;仅已选择且通过后端门禁的候选可以建批。",
"createBatch": "按已选候选建批"
},
"lifecycle": {
"active": "进行中/活动",
"deleted": "回收站",
@@ -247,6 +265,16 @@
"fileNo": "快照编号",
"expired": "快照已过期,系统将重新触发 RPA 或等待人工上传"
},
"fulfillmentTimeline": {
"inventoryTitle": "库存核验历史",
"verificationLine": "预约 {reservationId}:{availableQty}/{requiredQty}({status})",
"artifactTitle": "Excel Artifact 时间线",
"reservationIds": "包含预约单 ID:{reservationIds}",
"uploadTitle": "上传 Attempt 时间线",
"uploadAttempt": "Artifact #{artifactId} / Attempt {attemptNo}",
"freightRef": "货代参考号:{freightRefNo}",
"evidenceAsset": "回执资产:{assetId}"
},
"status": {
"all": "全部",
"created": "已创建",
+5
View File
@@ -2336,6 +2336,11 @@
"shippingOrderProfiles": {
"title": "訂單文件範本",
"subtitle": "從 MinerU 表格樣本視覺化設定精確欄位對應;無需編輯 JSON 或結構指紋。",
"structureBlocked": "此表格結構異常,不能建立範本。請等待座標證據重建後再複核,勿以欄位對應修復原始網格。",
"uploadSample": "上傳範本樣本",
"uploadSampleHint": "僅支援 PDF 或 EML,僅用於範本設定與結構複核,不會建立發貨任務。",
"sampleFileTypeInvalid": "範本樣本僅支援 PDF 或 EML 檔案。",
"sampleUploaded": "範本樣本已解析,請從樣本清單選擇文件繼續設定。",
"createTitle": "從樣本建立草稿",
"editTitle": "使用樣本更新草稿",
"sample": "樣本文件",
+3
View File
@@ -1,6 +1,7 @@
{
"generic": "請求失敗。",
"codes": {
"SHIPPING_NOTICE.BATCH_FILE_LIMIT_EXCEEDED": "本次上傳檔案數超過系統限制,請拆分後重試。",
"AGENT.EXPOSURE_ROLE_IMMUTABLE": "應用與內部執行器不可互相轉換。",
"AGENT.ADMIN_SCOPE_INVALID": "應用管理頁籤參數無效。",
"AGENT.INTERNAL_EXECUTOR_USER_ACCESS_FORBIDDEN": "內部執行器不能顯示、授權或透過一般使用者介面存取。",
@@ -23,6 +24,8 @@
"SHIPPING_ORDER_DOCUMENT_PROFILE_INVALID": "訂單文件解析範本設定無效。",
"SHIPPING_ORDER_DOCUMENT_PROFILE_SCHEMA_INVALID": "訂單文件解析範本必須綁定已發布或已退役的訂單欄位版本。",
"SHIPPING_ORDER_DOCUMENT_PROFILE_FIELD_INVALID": "訂單文件解析範本引用了不可用的訂單明細欄位。",
"SHIPPING_ORDER_DOCUMENT_PROFILE_HEADER_CONTAMINATED": "樣本表頭混入訂單明細,必須先重建表格結構,不能建立範本。",
"SHIPPING_ORDER_DOCUMENT_PROFILE_SAMPLE_FILE_TYPE_INVALID": "範本樣本僅支援 PDF 或 EML 檔案。",
"SHIPPING_ORDER_DOCUMENT_PROFILE_IMMUTABLE": "已發布的訂單文件解析範本不可修改。",
"SHIPPING_ORDER_DOCUMENT_PROFILE_LOCK_VERSION_REQUIRED": "訂單文件解析範本缺少版本鎖,請重新整理後再試。",
"SHIPPING_ORDER_DOCUMENT_PROFILE_VERSION_CONFLICT": "訂單文件解析範本已被其他管理員修改,請重新整理後再試。",
+29 -1
View File
@@ -114,6 +114,7 @@
"schedule": {
"title": "排程記錄",
"refresh": "刷新",
"uploadNotices": "上傳發貨通知",
"search": "查詢",
"reset": "重置",
"loading": "正在載入...",
@@ -159,8 +160,9 @@
},
"shippingNotice": {
"title": "貨代發貨通知",
"subtitle": "只讀工作台,請在 Chat 中繼續處理。",
"subtitle": "可獨立檢視、覆核並執行受控履約操作。",
"refresh": "刷新",
"uploadNotices": "上傳發貨通知",
"search": "查詢",
"loading": "正在載入...",
"empty": "暫無發貨任務",
@@ -174,6 +176,22 @@
"downloadSelected": "下載所選 ZIP",
"selectForDownload": "選擇任務 {taskNo} 用於批次下載",
"archiveDownloadFailed": "批次下載失敗,請重新整理任務後再試。",
"actions": {
"title": "目前可執行操作",
"freezeOrder": "凍結訂單",
"freezeConfirm": "確認凍結目前已覆核訂單嗎?凍結後將作為庫存、Excel 與上傳的履約事實。",
"freezeFailed": "訂單凍結失敗或版本已變更,請重新整理後覆核。",
"inventorySourcePrompt": "請輸入已發布的庫存源編碼:",
"customerPrompt": "請輸入客戶簡碼或名稱以搜尋:",
"customerNotFound": "找不到可確認的啟用客戶。",
"customerConfirm": "確認將目前任務綁定至客戶 {name}({code})嗎?",
"failed": "操作失敗,請重新整理任務後再試。"
},
"candidateReview": {
"title": "待建單候選覆核",
"hint": "在此完成候選選擇、人工修訂與重複處理;只有已選擇且通過後端門檻的候選可以建批。",
"createBatch": "依已選候選建批"
},
"lifecycle": {
"active": "進行中/活動",
"deleted": "回收站",
@@ -247,6 +265,16 @@
"fileNo": "快照編號",
"expired": "快照已過期,系統將重新觸發 RPA 或等待人工上傳"
},
"fulfillmentTimeline": {
"inventoryTitle": "庫存核驗歷史",
"verificationLine": "預約 {reservationId}:{availableQty}/{requiredQty}({status})",
"artifactTitle": "Excel Artifact 時間線",
"reservationIds": "包含預約單 ID:{reservationIds}",
"uploadTitle": "上傳 Attempt 時間線",
"uploadAttempt": "Artifact #{artifactId} / Attempt {attemptNo}",
"freightRef": "貨代參考號:{freightRefNo}",
"evidenceAsset": "回執資產:{assetId}"
},
"status": {
"all": "全部",
"created": "已建立",