feat(shipping-freight-auto-upload): 新增货代发货Excel连接级自动上传全链路功能
为提升货代上传的自动化程度,减少人工操作,本提交实现完整的连接级自动上传功能,包含以下变更: - 新增数据库迁移与ShippingRpaProfile模型字段,存储连接级上传配置 - 完善RPA自动上传触发、回调与状态管理逻辑,支持三态结果与人工兜底 - 优化聊天界面任务卡片加载与按钮渲染,修复无文案幽灵按钮问题
This commit is contained in:
1 parent
06c18b3c7c
commit
434c04ed2d
30 files changed
+1574
-185
No files matched your search
@@ -98,6 +98,24 @@
|
||||
<label><span>{{ t('admin.shippingInventory.username') }}</span><input v-model="profile.username" class="input-field" name="shipping-rpa-credential-user" autocomplete="one-time-code" readonly :placeholder="t('admin.shippingInventory.writeOnlyHint')" @focus="unlockCredentialField"></label>
|
||||
<label><span>{{ t('admin.shippingInventory.password') }}</span><input v-model="profile.password" class="input-field" name="shipping-rpa-credential-password" type="password" autocomplete="new-password" readonly :placeholder="t('admin.shippingInventory.writeOnlyHint')" @focus="unlockCredentialField"></label>
|
||||
<div class="switch-field"><span>{{ t('admin.shippingInventory.enabled') }}</span><button type="button" class="status-switch" :class="{ on: profile.enabled }" role="switch" :aria-checked="profile.enabled" @click="profile.enabled = !profile.enabled"><i></i><b>{{ profile.enabled ? t('admin.shippingInventory.enabledState') : t('admin.shippingInventory.disabledState') }}</b></button></div>
|
||||
|
||||
<section class="upload-config-section full">
|
||||
<header class="upload-config-heading">
|
||||
<b>{{ t('admin.shippingInventory.uploadConfigTitle') }}</b>
|
||||
<small>{{ t('admin.shippingInventory.uploadConfigHint') }}</small>
|
||||
</header>
|
||||
<div class="switch-field"><span>{{ t('admin.shippingInventory.uploadAutoEnabled') }}</span><button type="button" class="status-switch" :class="{ on: profile.upload_config_json.enabled }" role="switch" :aria-checked="profile.upload_config_json.enabled" @click="profile.upload_config_json.enabled = !profile.upload_config_json.enabled"><i></i><b>{{ profile.upload_config_json.enabled ? t('admin.shippingInventory.enabledState') : t('admin.shippingInventory.disabledState') }}</b></button></div>
|
||||
<label><span>{{ t('admin.shippingInventory.uploadEntryUrl') }}</span><input v-model="profile.upload_config_json.entry_url" class="input-field" type="url"></label>
|
||||
<label><span>{{ t('admin.shippingInventory.uploadFileSelector') }}</span><input v-model="profile.upload_config_json.file_input_selector" class="input-field"></label>
|
||||
<label><span>{{ t('admin.shippingInventory.uploadSubmitMode') }}</span><select v-model="profile.upload_config_json.submit_mode" class="select-field"><option value="auto_after_file">{{ t('admin.shippingInventory.uploadSubmitAuto') }}</option><option value="click_submit">{{ t('admin.shippingInventory.uploadSubmitClick') }}</option></select></label>
|
||||
<label v-if="profile.upload_config_json.submit_mode === 'click_submit'"><span>{{ t('admin.shippingInventory.uploadSubmitSelector') }}</span><input v-model="profile.upload_config_json.submit_selector" class="input-field"></label>
|
||||
<label><span>{{ t('admin.shippingInventory.uploadResultMode') }}</span><select v-model="profile.upload_config_json.result_mode" class="select-field"><option value="page_notice">{{ t('admin.shippingInventory.uploadResultPageNotice') }}</option><option value="history_record">{{ t('admin.shippingInventory.uploadResultHistory') }}</option></select></label>
|
||||
<label><span>{{ t('admin.shippingInventory.uploadResultSelector') }}</span><input v-model="profile.upload_config_json.result_selector" class="input-field"></label>
|
||||
<label><span>{{ t('admin.shippingInventory.uploadSuccessTexts') }}</span><textarea v-model="successTextsInput" class="input-field" rows="2" :placeholder="t('admin.shippingInventory.uploadSuccessTextsHint')"></textarea></label>
|
||||
<label><span>{{ t('admin.shippingInventory.uploadTimeout') }}</span><input v-model.number="profile.upload_config_json.timeout_seconds" class="input-field" type="number" min="1"></label>
|
||||
<div class="form-tip full">{{ t('admin.shippingInventory.uploadConfigBoundary') }}</div>
|
||||
</section>
|
||||
|
||||
<div class="form-tip full">{{ t('admin.shippingInventory.connectionBoundary') }}</div>
|
||||
</template>
|
||||
|
||||
@@ -565,7 +583,33 @@ const filenameVariableCandidates = computed(() => {
|
||||
return filenameVariables.filter((item) => item.key.toLowerCase().includes(query) || t(item.labelKey).toLowerCase().includes(query));
|
||||
});
|
||||
|
||||
const profile = reactive({ profile_code: '', display_name: '', connector_type: 'dbs', login_url: '', username: '', password: '', login_config_json: { auth_mode: 'password' }, enabled: true });
|
||||
/** 连接级“发货 Excel 自动上传”配置的受控 JSON 形状(字段与后端白名单一致)。 */
|
||||
interface ProfileUploadConfig {
|
||||
enabled: boolean;
|
||||
entry_url: string;
|
||||
file_input_selector: string;
|
||||
submit_mode: 'auto_after_file' | 'click_submit';
|
||||
submit_selector: string | null;
|
||||
result_mode: 'page_notice' | 'history_record';
|
||||
result_selector: string | null;
|
||||
success_texts: string[];
|
||||
timeout_seconds: number;
|
||||
}
|
||||
|
||||
/** 连接级“发货 Excel 自动上传”默认配置:DSV 为已确认 URL+input#file2;Crane 保持未启用待管理员补全。 */
|
||||
function defaultUploadConfig(connectorType: string): ProfileUploadConfig {
|
||||
if (connectorType === 'crane') {
|
||||
return { enabled: false, entry_url: 'https://wms-portal.craneww.com/#/shipping-order-upload', file_input_selector: 'input[name="OrderFileUpload"]', submit_mode: 'click_submit', submit_selector: null, result_mode: 'page_notice', result_selector: null, success_texts: [], timeout_seconds: 120 };
|
||||
}
|
||||
return { enabled: true, entry_url: 'https://s360.dbschenker.com/main/portal/frame/WMSUpload2', file_input_selector: 'input#file2', submit_mode: 'auto_after_file', submit_selector: null, result_mode: 'page_notice', result_selector: null, success_texts: [], timeout_seconds: 120 };
|
||||
}
|
||||
|
||||
const profile = reactive({ profile_code: '', display_name: '', connector_type: 'dbs', login_url: '', username: '', password: '', login_config_json: { auth_mode: 'password' }, enabled: true, upload_config_json: defaultUploadConfig('dbs') });
|
||||
/** 成功文本以换行分隔的输入视图,写回 success_texts 数组。 */
|
||||
const successTextsInput = computed<string>({
|
||||
get: () => (profile.upload_config_json.success_texts || []).join('\n'),
|
||||
set: (value) => { profile.upload_config_json.success_texts = String(value || '').split(/\r?\n/).map((item) => item.trim()).filter(Boolean); },
|
||||
});
|
||||
const parsing = reactive({ profile_code: '', display_name: '', file_format: 'xlsx', sheet_name: '', header_row_index: 1, field_mappings: [] as ParsingFieldMapping[], match_keys: [] as ParsingMatchKey[] });
|
||||
const inventoryField = reactive<InventoryFieldForm>({ display_name: '', description: '', value_type: 'text', usage_type: 'general', sort_order: 100, status: 'active' });
|
||||
const excelTemplate = reactive({ template_code: '', display_name: '', filename_pattern: '{business_no}.xlsx', mappings: [] as TemplateMapping[], file: null as File | null });
|
||||
@@ -868,6 +912,14 @@ watch(
|
||||
{ immediate: true },
|
||||
);
|
||||
|
||||
/** 新建连接时按货代类型切换上传配置默认值;编辑既有连接不覆盖已保存配置。 */
|
||||
watch(
|
||||
() => profile.connector_type,
|
||||
(nextType) => {
|
||||
if (!selectedId.value) profile.upload_config_json = defaultUploadConfig(nextType);
|
||||
},
|
||||
);
|
||||
|
||||
/** 在库存映射内切换解析方案与字段目录,保持左侧业务入口不分裂。 */
|
||||
function selectInventoryMappingTab(tab: 'parsing' | 'inventoryFields'): void {
|
||||
activeTab.value = tab;
|
||||
@@ -877,7 +929,7 @@ function selectInventoryMappingTab(tab: 'parsing' | 'inventoryFields'): void {
|
||||
/** 重置当前工作区的编辑表单,作为创建新对象的入口。 */
|
||||
function createNew(): void {
|
||||
selectedId.value = null;
|
||||
if (activeTab.value === 'profiles') Object.assign(profile, { profile_code: '', display_name: '', connector_type: 'dbs', login_url: '', username: '', password: '', login_config_json: { auth_mode: 'password' }, enabled: true });
|
||||
if (activeTab.value === 'profiles') Object.assign(profile, { profile_code: '', display_name: '', connector_type: 'dbs', login_url: '', username: '', password: '', login_config_json: { auth_mode: 'password' }, enabled: true, upload_config_json: defaultUploadConfig('dbs') });
|
||||
if (activeTab.value === 'parsing') { Object.assign(parsing, { profile_code: '', display_name: '', file_format: 'xlsx', sheet_name: '', header_row_index: 1, field_mappings: [], match_keys: [] }); structureAnalysis.value = null; pendingSampleReplacement.value = null; sampleReplacementConfirmed.value = false; selectedTemporaryInventorySession.value = ''; }
|
||||
if (activeTab.value === 'inventoryFields') Object.assign(inventoryField, { display_name: '', description: '', value_type: 'text', usage_type: 'general', sort_order: 100, status: 'active' });
|
||||
if (activeTab.value === 'templates') {
|
||||
@@ -898,7 +950,7 @@ function createNew(): void {
|
||||
/** 将列表对象复制到当前编辑表单,凭据字段永远不从列表回填。 */
|
||||
function selectItem(item: Item): void {
|
||||
selectedId.value = Number(item.id);
|
||||
if (activeTab.value === 'profiles') Object.assign(profile, { ...item, username: '', password: '', login_config_json: item.login_config_json || { auth_mode: 'password' } });
|
||||
if (activeTab.value === 'profiles') Object.assign(profile, { ...item, username: '', password: '', login_config_json: item.login_config_json || { auth_mode: 'password' }, upload_config_json: item.upload_config_json || defaultUploadConfig(item.connector_type) });
|
||||
if (activeTab.value === 'parsing') Object.assign(parsing, {
|
||||
profile_code: item.profile_code, display_name: item.display_name, file_format: item.file_format,
|
||||
sheet_name: item.definition?.sheet_name || '', header_row_index: item.definition?.header_row_index ?? 0,
|
||||
@@ -1067,7 +1119,7 @@ function closeDrawer(): void {
|
||||
async function saveCurrent(): Promise<void> {
|
||||
saving.value = true;
|
||||
try {
|
||||
if (activeTab.value === 'profiles') await saveShippingRpaProfile({ ...profile, display_name: profile.display_name || profile.profile_code }, selectedId.value || undefined);
|
||||
if (activeTab.value === 'profiles') await saveShippingRpaProfile({ ...profile, display_name: profile.display_name || profile.profile_code, upload_config_json: profile.upload_config_json }, selectedId.value || undefined);
|
||||
if (activeTab.value === 'parsing') {
|
||||
const payload = {
|
||||
profile_code: parsing.profile_code, display_name: parsing.display_name || parsing.profile_code, file_format: parsing.file_format,
|
||||
@@ -1598,6 +1650,7 @@ onMounted(load);
|
||||
.readiness-optional { border-top: 1px solid #e4edf2; padding-top: 10px; }.readiness-optional summary, .readiness-audit summary { display: flex; align-items: baseline; gap: 8px; color: #61798a; cursor: pointer; list-style: none; }.readiness-optional summary::-webkit-details-marker, .readiness-audit summary::-webkit-details-marker { display: none; }.readiness-optional summary::before, .readiness-audit summary::before { color: #4d849f; content: '›'; font-size: 16px; line-height: .8; transition: transform .15s; }.readiness-optional[open] summary::before, .readiness-audit[open] summary::before { transform: rotate(90deg); }.readiness-optional summary span { color: #516b7d; font-size: 12px; font-weight: 700; }.readiness-optional summary small { color: #8797a5; font-size: 11px; }.readiness-optional .readiness-steps { margin-top: 8px; }
|
||||
.readiness-action { border: 0; border-radius: 5px; background: #e8f3f9; padding: 6px 8px; color: #16759f; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }.readiness-action:hover { background: #d8edf7; }.readiness-run { margin: 0; border-left: 3px solid #74b8d8; background: #f0f8fc; padding: 8px 10px; color: #547185; font-size: 11px; line-height: 1.5; }.readiness-run.failed { border-left-color: #e06a58; background: #fff5f3; color: #9d382b; }.readiness-audit { margin: 0; border-top: 1px solid #e4edf2; padding-top: 10px; }.readiness-audit summary { color: #61798a; font-size: 11px; font-weight: 700; }.readiness-audit dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 9px 0 0; overflow: hidden; border: 1px solid #dce8ef; border-radius: 7px; background: #dce8ef; }.readiness-audit dl > div { min-width: 0; background: #fff; padding: 8px 9px; }.readiness-audit dt { color: #7b8998; font-size: 11px; font-weight: 700; }.readiness-audit dd { overflow: hidden; margin: 4px 0 0; color: #3d5366; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }.readiness-footer { display: flex; justify-content: flex-end; border-top: 1px solid #e6eef4; padding-top: 11px; }
|
||||
.form-tip { border-radius: 8px; background: #f1f6fa; padding: 11px; color: #5d7084; font-size: 12px; line-height: 1.55; }
|
||||
.upload-config-section { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border: 1px solid #e1edf2; border-radius: 9px; background: #fff; padding: 0 12px 12px; }.upload-config-heading { display: grid; gap: 2px; grid-column: 1 / -1; padding: 11px 0 8px; }.upload-config-heading b { color: #385166; font-size: 12px; }.upload-config-heading small { color: #8192a0; font-size: 11px; }.upload-config-section .full { grid-column: 1 / -1; }.upload-config-section textarea.input-field { resize: vertical; }
|
||||
.configuration-test-verified { margin: 0; border-left: 3px solid #34a56b; background: #effaf3; padding: 9px 10px; color: #256b43; font-size: 12px; font-weight: 600; line-height: 1.45; }
|
||||
.sample-evidence-card { display: grid; gap: 12px; border: 1px solid #d7e3ed; border-radius: 8px; background: #f8fbfd; padding: 14px; }
|
||||
.sample-evidence-card > div { display: grid; gap: 3px; }.sample-evidence-card strong { color: #334155; font-size: 13px; }.sample-evidence-card p, .sample-evidence-card > small { margin: 0; color: #6b7f91; font-size: 12px; line-height: 1.55; }
|
||||
|
||||
+77
-1
@@ -2,7 +2,8 @@
|
||||
* features/chat/components/shipping-review/ReviewCurrentProcessingCard.spec.ts
|
||||
* 用途:验证工作台右侧当前任务卡只在需要人工处理时渲染业务动作。
|
||||
* 依赖:Vitest、Vue Test Utils、Vue I18n、ReviewCurrentProcessingCard。
|
||||
* 逻辑:库存自动处理中即使遗留 primary_action,也不得显示编辑正式任务;可重试状态仍保留重试入口。
|
||||
* 逻辑:库存自动处理中即使遗留 primary_action,也不得显示编辑正式任务;可重试状态仍保留重试入口;
|
||||
* loading 是「权威投影读取中」占位:已知阶段照常展示,状态/下一步给中性加载文案(非系统处理中)。
|
||||
*/
|
||||
import { mount } from '@vue/test-utils';
|
||||
import { createI18n } from 'vue-i18n';
|
||||
@@ -38,9 +39,25 @@ const i18n = createI18n({
|
||||
saveOrderAndValidate: '提交订单',
|
||||
currentProcessing: {
|
||||
waitingStart: '等待系统启动',
|
||||
stageLoading: '正在获取最新状态…',
|
||||
statusIdle: '待机',
|
||||
status: '状态',
|
||||
stages: {
|
||||
excel_generating: 'Excel 生成',
|
||||
},
|
||||
},
|
||||
currentTask: {
|
||||
title: '当前任务',
|
||||
labelStage: '当前门禁',
|
||||
statusRunning: '系统处理中',
|
||||
statusWaitingHuman: '待人工处理',
|
||||
statusRetryable: '可重试',
|
||||
statusFailed: '自动处理失败',
|
||||
statusCompleted: '已完成',
|
||||
statusCancelled: '已取消',
|
||||
nextStepTitle: '下一步',
|
||||
nextStepRunning: '系统正在处理,暂不需要人工操作',
|
||||
nextStepUnknown: '状态待确认',
|
||||
nextStepWaitingExternal: '等待外部系统回执,暂不需要人工操作',
|
||||
},
|
||||
},
|
||||
@@ -180,6 +197,23 @@ describe('ReviewCurrentProcessingCard', () => {
|
||||
expect(wrapper.text()).not.toContain('edit_draft');
|
||||
});
|
||||
|
||||
it('hides an unlabeled primary action instead of rendering an icon-only ghost button', () => {
|
||||
const wrapper = mount(ReviewCurrentProcessingCard, {
|
||||
props: {
|
||||
stageCode: 'fulfillment_prep',
|
||||
userStatus: 'waiting_human',
|
||||
// 后端下发了动作码,但前端无受控文案(缺失 i18n 映射 / 未登记),
|
||||
// 必须整体隐藏按钮,不能渲染成只有 Bot/RefreshCw 图标的“幽灵按钮”。
|
||||
primaryAction: { code: 'unknown_system_action', i18nKey: 'workspace.shippingNotice.processGate.actionCodes.unknown_system_action' },
|
||||
},
|
||||
global: { plugins: [i18n] },
|
||||
});
|
||||
|
||||
expect(wrapper.find('[data-testid="review-current-task-actions"]').exists()).toBe(false);
|
||||
expect(wrapper.find('[data-testid="review-current-task-primary-action"]').exists()).toBe(false);
|
||||
expect(wrapper.text()).not.toContain('unknown_system_action');
|
||||
});
|
||||
|
||||
it('renders a localized reason instead of an internal blocking code in the next step', () => {
|
||||
const wrapper = mount(ReviewCurrentProcessingCard, {
|
||||
props: {
|
||||
@@ -233,4 +267,46 @@ describe('ReviewCurrentProcessingCard', () => {
|
||||
['retry_inventory_preparation', {}],
|
||||
]);
|
||||
});
|
||||
|
||||
it('keeps the known stage and status while the authoritative projection is still loading', () => {
|
||||
// Case 先到、Projection 后到的过渡窗口:阶段与投影同源(project_stage_for_task),
|
||||
// status 也来自后端 automation 运行态,必须照常展示,不能退回骨架/「正在更新状态」占位。
|
||||
const wrapper = mount(ReviewCurrentProcessingCard, {
|
||||
props: {
|
||||
loading: true,
|
||||
stageCode: 'excel_generating',
|
||||
stageLabelKey: 'excel_generating',
|
||||
userStatus: 'running',
|
||||
},
|
||||
global: { plugins: [i18n] },
|
||||
});
|
||||
|
||||
expect(wrapper.get('[data-testid="review-current-task-stage"]').text()).toBe('Excel 生成');
|
||||
// loading 只抑制动作,不掩盖真值:运行态照常显示「系统处理中」。
|
||||
expect(wrapper.get('[data-testid="review-current-task-status"]').text()).toBe('系统处理中');
|
||||
expect(wrapper.get('[data-testid="review-current-task-next-step-text"]').text())
|
||||
.toBe('系统正在处理,暂不需要人工操作');
|
||||
});
|
||||
|
||||
it('shows the neutral idle value instead of a skeleton when nothing is actionable yet', () => {
|
||||
const wrapper = mount(ReviewCurrentProcessingCard, {
|
||||
props: { loading: true, stageCode: 'excel_generating', stageLabelKey: 'excel_generating' },
|
||||
global: { plugins: [i18n] },
|
||||
});
|
||||
|
||||
// 空用户态自然落到「待机 / 状态待确认」,与投影稳态一致——不做骨架→真值的二次刷新。
|
||||
expect(wrapper.get('[data-testid="review-current-task-stage"]').text()).toBe('Excel 生成');
|
||||
expect(wrapper.get('[data-testid="review-current-task-status"]').text()).toBe('待机');
|
||||
expect(wrapper.get('[data-testid="review-current-task-next-step-text"]').text()).toBe('状态待确认');
|
||||
});
|
||||
|
||||
it('falls back to a neutral stage placeholder only when no stage is known', () => {
|
||||
const wrapper = mount(ReviewCurrentProcessingCard, {
|
||||
props: { loading: true },
|
||||
global: { plugins: [i18n] },
|
||||
});
|
||||
|
||||
expect(wrapper.get('[data-testid="review-current-task-stage"]').text()).toBe('正在获取最新状态…');
|
||||
expect(wrapper.get('[data-testid="review-current-task-status"]').text()).toBe('待机');
|
||||
});
|
||||
});
|
||||
+25
-7
@@ -4,6 +4,11 @@
|
||||
依赖:vue-i18n、ShippingProcessingBlockingReason/PrimaryAction 类型、resolveShippingProcessingStageLabel。
|
||||
逻辑:主卡内部 section = 「当前阶段/状态/正式OT → 下一步 → 动作区」;
|
||||
状态文案严格绑定 user_status;blocking_reason 只作下一步问题说明;按钮显隐由后端 retryable + primary_action.parameters 决定;
|
||||
主动作按钮文案 fail-closed:后端下发动作码但无受控 i18n 文案时整体隐藏该按钮(含图标),禁止渲染无文字裸按钮;
|
||||
loading 仅代表「权威投影读取中」而非系统运行态:已知阶段/状态/阻断仍照常展示
|
||||
(与投影同源或后端 automation 运行态),空态自然落到「待机/状态待确认」,
|
||||
禁止把读取占位误述为「系统处理中」,也不做骨架→真值的二次刷新;
|
||||
loading 仅在挂载期抑制可执行动作,等权威投影到达后再放行(fail-closed);
|
||||
由 ShippingOrderReviewView 在 mountCurrentProcessingCard 时挂载。
|
||||
-->
|
||||
<script setup lang="ts">
|
||||
@@ -67,9 +72,15 @@ const { t, te } = useI18n();
|
||||
|
||||
/**
|
||||
* 当前阶段展示文案:优先消费 stage_label_key,禁止直接展示 stage 码。
|
||||
* 核心逻辑:loading 是「权威投影读取中」占位,不是业务运行态——只要已有可展示的
|
||||
* 阶段(Case 快照 current_stage 与投影同源,见 currentProcessingStageDisplay),
|
||||
* 照常展示真实阶段;仅在连降级阶段都没有时才回退 stageLoading 占位文案。
|
||||
*/
|
||||
const stageLabel = computed(() => {
|
||||
if (props.loading) {
|
||||
const hasKnownStage = Boolean(
|
||||
String(props.stageCode || '').trim() || String(props.stageLabelKey || '').trim(),
|
||||
);
|
||||
if (props.loading && !hasKnownStage) {
|
||||
return t('chat.shippingOrderReview.currentProcessing.stageLoading');
|
||||
}
|
||||
if (props.stageInconsistent) {
|
||||
@@ -85,11 +96,11 @@ const stageLabel = computed(() => {
|
||||
|
||||
/**
|
||||
* 「状态」行用户态文案:严格绑定 user_status,不再由前端推断。
|
||||
* loading 只是「权威投影读取中」:只要已有后端下发的 user_status(如 Case automation
|
||||
* 运行态)就照常展示真实/待机文案,禁止再退回「正在获取最新状态」骨架造成二次刷新
|
||||
* (状态空时 statusIdle 即中性「待机」,与投影稳态一致)。
|
||||
*/
|
||||
const statusLabel = computed(() => {
|
||||
if (props.loading) {
|
||||
return t('chat.shippingOrderReview.currentTask.statusRunning');
|
||||
}
|
||||
const s = String(props.userStatus || '').trim() as ReviewCurrentUserStatus | '';
|
||||
const map: Record<ReviewCurrentUserStatus, string> = {
|
||||
running: t('chat.shippingOrderReview.currentTask.statusRunning'),
|
||||
@@ -129,9 +140,10 @@ const nextStepText = computed(() => {
|
||||
}
|
||||
return raw;
|
||||
};
|
||||
if (props.loading) {
|
||||
return safeMessage(props.automation?.message) || t('chat.shippingOrderReview.currentTask.nextStepRunning');
|
||||
}
|
||||
// 加载占位不等于系统运行态:只透传后端 automation.message(若有);
|
||||
// 其余按 user_status/blocking_reason 照常渲染,空态自然落在「状态待确认」,不做骨架二次刷新。
|
||||
const automationMessage = props.loading ? safeMessage(props.automation?.message) : '';
|
||||
if (automationMessage) return automationMessage;
|
||||
// 1) blocking_reason → 用后端给的 i18n_key 渲染具体阻断
|
||||
const br = props.blockingReason;
|
||||
if (br) {
|
||||
@@ -216,6 +228,10 @@ function isNonTaskCapabilityAction(code: string): boolean {
|
||||
|
||||
/**
|
||||
* 业务动作按钮只消费 primary_action;retryable 是状态,不是授权。
|
||||
*
|
||||
* 核心逻辑:除既有授权过滤外,文案必须是后端下发且经受控映射解析出的非空文案
|
||||
* (businessActionLabel 已 fail-closed 为 '');无文案时整体隐藏按钮,防止
|
||||
* 渲染成只有图标/空壳的“幽灵按钮”误导用户以为是开关或其他控件。
|
||||
*/
|
||||
const showBusinessAction = computed(() => {
|
||||
if (props.loading) return false;
|
||||
@@ -230,6 +246,8 @@ const showBusinessAction = computed(() => {
|
||||
if (isHiddenWorkbenchNavigationAction(code)) return false;
|
||||
// 无对象边界的泛化 retry 永不展示。
|
||||
if (code === 'retry') return false;
|
||||
// [AUTHORITY] 无受控文案的动作码 fail-closed:连图标一起隐藏,不渲染空壳按钮。
|
||||
if (!businessActionLabel.value) return false;
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
@@ -1630,6 +1630,16 @@ export interface ShippingFreightNoticeGroup {
|
||||
business_no: string;
|
||||
po_number: string | null;
|
||||
upload_status?: string | null;
|
||||
/** 上传方式:rpa / manual,用于逐单状态展示。 */
|
||||
upload_mode?: string | null;
|
||||
/** 已发起的上传尝试次数,用于逐单状态展示。 */
|
||||
upload_attempt?: number | null;
|
||||
/** 最近一次上传的稳定错误码(如 RPA_UPLOAD_FAILED / FREIGHT_REJECTED / UPLOAD_RESULT_UNKNOWN)。 */
|
||||
upload_error_code?: string | null;
|
||||
/** 最近一次上传的用户可见失败原因;仅后端事实,禁止前端按状态猜测。 */
|
||||
upload_error_message?: string | null;
|
||||
/** 需人工接管的原因码(如 upload_rpa_pending / manual_upload_pending)。 */
|
||||
pending_human_reason?: string | null;
|
||||
export_file_name?: string | null;
|
||||
available_actions?: string[];
|
||||
lines: Array<{
|
||||
|
||||
@@ -594,6 +594,7 @@ async function mountView(query: Record<string, string> = {}) {
|
||||
waiting_to_start: '等待系统启动',
|
||||
order_creating: '等待系统启动',
|
||||
inventory_matching: '库存匹配',
|
||||
excel_generating: 'Excel 生成',
|
||||
},
|
||||
},
|
||||
currentTask: {
|
||||
@@ -680,7 +681,14 @@ async function mountView(query: Record<string, string> = {}) {
|
||||
},
|
||||
progress: {
|
||||
step: { profile_matching: '正在匹配订单模板' },
|
||||
lifecycleReason: { processing_slow: '当前步骤耗时较长,系统仍在继续。' },
|
||||
lifecycleReason: {
|
||||
processing_slow: '当前步骤耗时较长,系统仍在继续。',
|
||||
review_required: '当前结果需要人工复核。',
|
||||
failed: '当前步骤处理失败,请查看详情后重试。',
|
||||
cancelled: '本次处理已取消。',
|
||||
},
|
||||
systemProcessingNeed: '系统正在自动处理,请稍候或刷新进度',
|
||||
lifecycleWaitingNeed: '当前步骤需要人工处理',
|
||||
},
|
||||
},
|
||||
shippingSessionWorkItem: {
|
||||
@@ -873,6 +881,54 @@ describe('ShippingOrderReviewView layout phase 1', () => {
|
||||
expect(wrapper.get('[data-testid="review-run-lifecycle-progress"]').text()).toContain('正在匹配订单模板');
|
||||
});
|
||||
|
||||
it('does not claim automatic processing when the run is waiting at a human gate', async () => {
|
||||
// 关键断言:门禁待机(waiting)时不得声称「系统正在自动处理」,也不得渲染呼吸点;
|
||||
// 后端此时通常没有 current_step_i18n_key,旧逻辑会落入自动处理兜底文案。
|
||||
activeCase.value = null as any;
|
||||
reviewRun.value = { run_no: 'RUN-WAITING-GATE', items: [] };
|
||||
extractionLifecycleProgress.value = {
|
||||
lifecycle_stage: 'order_review', lifecycle_status: 'waiting',
|
||||
current_step_i18n_key: null,
|
||||
blocking_reason_i18n_key: 'chat.shippingProcessing.progress.lifecycleReason.review_required',
|
||||
completed_step_codes: [], health_status: 'normal',
|
||||
};
|
||||
const wrapper = await mountView();
|
||||
const banner = wrapper.get('[data-testid="review-run-lifecycle-current-step"]');
|
||||
expect(banner.text()).not.toContain('系统正在自动处理');
|
||||
expect(banner.text()).toContain('当前结果需要人工复核');
|
||||
expect(banner.html()).not.toContain('animate-pulse');
|
||||
});
|
||||
|
||||
it('shows a waiting fallback without the auto-processing claim when no reason is provided', async () => {
|
||||
// 关键断言:waiting 且后端未给原因/步骤时,只展示「需要人工处理」,禁止回到自动处理文案。
|
||||
activeCase.value = null as any;
|
||||
reviewRun.value = { run_no: 'RUN-WAITING-FALLBACK', items: [] };
|
||||
extractionLifecycleProgress.value = {
|
||||
lifecycle_stage: 'order_review', lifecycle_status: 'waiting',
|
||||
current_step_i18n_key: null,
|
||||
blocking_reason_i18n_key: null,
|
||||
completed_step_codes: [], health_status: 'normal',
|
||||
};
|
||||
const wrapper = await mountView();
|
||||
const banner = wrapper.get('[data-testid="review-run-lifecycle-current-step"]');
|
||||
expect(banner.text()).not.toContain('系统正在自动处理');
|
||||
expect(banner.text()).toContain('当前步骤需要人工处理');
|
||||
});
|
||||
|
||||
it('does not render the run progress banner for a completed run', async () => {
|
||||
// 关键断言:Run 已完成时无待办,横幅直接隐藏,避免「已完成仍显示处理中」的矛盾。
|
||||
activeCase.value = null as any;
|
||||
reviewRun.value = { run_no: 'RUN-COMPLETED', items: [] };
|
||||
extractionLifecycleProgress.value = {
|
||||
lifecycle_stage: 'order_review', lifecycle_status: 'completed',
|
||||
current_step_i18n_key: null,
|
||||
blocking_reason_i18n_key: null,
|
||||
completed_step_codes: ['review_ready'], health_status: 'normal',
|
||||
};
|
||||
const wrapper = await mountView();
|
||||
expect(wrapper.find('[data-testid="review-run-lifecycle-current-step"]').exists()).toBe(false);
|
||||
});
|
||||
|
||||
it('loads a cross-Run file once through the route watcher', async () => {
|
||||
const originalQueue = reviewQueue.value;
|
||||
try {
|
||||
@@ -1211,6 +1267,30 @@ describe('ShippingOrderReviewView layout phase 1', () => {
|
||||
expect(wrapper.find('[data-testid="review-current-task-primary-action"]').exists()).toBe(false);
|
||||
});
|
||||
|
||||
it('keeps the known Case stage while the authoritative projection is still loading', async () => {
|
||||
// Case 先到、Projection 后到的过渡窗口:阶段与投影同源(project_stage_for_task),
|
||||
// 必须直接展示「Excel 生成」,禁止退回自动建单阶段或“正在更新状态”占位。
|
||||
activeCase.value = {
|
||||
...activeCase.value,
|
||||
status: 'confirmed',
|
||||
has_formal_ot: true,
|
||||
task_missing: false,
|
||||
confirmed_task_id: 91,
|
||||
confirmed_task_no: 'SN-STAGE-PENDING',
|
||||
current_stage: { code: 'excel_generating', label_key: 'excel_generating', inconsistent: false },
|
||||
automation: { status: 'running', retryable: false, can_auto_create: false, can_build: true },
|
||||
};
|
||||
shippingProcessingProjection.value = null;
|
||||
shippingProcessingLoading.value = true;
|
||||
|
||||
const wrapper = await mountView();
|
||||
await flushPromises();
|
||||
|
||||
expect(wrapper.get('[data-testid="review-current-task-stage"]').text()).toContain('Excel 生成');
|
||||
// 状态列:loading 只抑制动作,不掩盖后端 automation 运行态真值(系统处理中)。
|
||||
expect(wrapper.get('[data-testid="review-current-task-status"]').text()).toContain('系统处理中');
|
||||
});
|
||||
|
||||
it('does not render legacy reparse failure stage as a separate progress source', async () => {
|
||||
reviewProgressContext.value = {
|
||||
item_no: 'WFI-1',
|
||||
@@ -2047,6 +2127,120 @@ describe('ShippingOrderReviewView layout phase 1', () => {
|
||||
expect(startWorkflowProgressPollingMock).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
|
||||
it('advances to freight upload after an accepted shortage release', async () => {
|
||||
const taskApi = await import('@/features/chat/api/shipping.api');
|
||||
let releaseAccepted = false;
|
||||
activeCase.value = {
|
||||
...activeCase.value,
|
||||
status: 'confirmed', confirmed_task_id: 903, confirmed_task_no: 'SN-FROZEN', has_formal_ot: true,
|
||||
line_fulfillment: {
|
||||
lines: [{
|
||||
line_key: 'line-frozen',
|
||||
inventory_source: { code: 'DBS', label: 'DBS', status: 'resolved' },
|
||||
line_allowed_actions: ['release_inventory_shortage'],
|
||||
release_template_fields: [
|
||||
{ field_id: '101', display_name: 'ODM ID', value: 'ODM-001', value_source: 'inventory_snapshot', requires_manual: false },
|
||||
{ field_id: '102', display_name: '库位', value: null, value_source: 'manual_required', requires_manual: true },
|
||||
],
|
||||
release_required_fields: [{ field_id: '102', display_name: '库位' }],
|
||||
}],
|
||||
},
|
||||
};
|
||||
vi.mocked(taskApi.decideWorkspaceShippingOrderReviewLineFulfillment).mockImplementation(async () => {
|
||||
releaseAccepted = true;
|
||||
return { status: 'ok' } as any;
|
||||
});
|
||||
vi.mocked(taskApi.getWorkspaceShippingTask).mockImplementation(async () => ({
|
||||
task_no: 'SN-FROZEN', status: 'waiting_human', lines: [], events: [],
|
||||
ui_state: {
|
||||
process_gate: {
|
||||
execution_no: 'EXEC-FROZEN-LINE',
|
||||
current_blocking_gate: { gate_code: 'manual_upload_handoff', status: 'blocked_manual' },
|
||||
},
|
||||
actions: { primary: null, secondary: [] },
|
||||
lifecycle_stage: releaseAccepted ? 'freight_upload' : 'fulfillment_prep',
|
||||
lifecycle_entries: releaseAccepted
|
||||
? [
|
||||
{ code: 'fulfillment_prep', state: 'available' },
|
||||
{ code: 'freight_upload', state: 'current' },
|
||||
]
|
||||
: [{ code: 'fulfillment_prep', state: 'current' }],
|
||||
stage_context: { upload: {} },
|
||||
},
|
||||
} as any));
|
||||
|
||||
const wrapper = await mountView({ lifecycle_stage: 'fulfillment_prep' });
|
||||
await flushPromises();
|
||||
await wrapper.get('[data-testid="review-fulfillment-line-release-line-frozen"]').trigger('click');
|
||||
const dialog = wrapper.get('[data-testid="review-release-inventory-dialog"]');
|
||||
await dialog.find('textarea').setValue('客户确认分批发货');
|
||||
await dialog.find('input').setValue('A-01');
|
||||
await dialog.get('button.bg-amber-600').trigger('click');
|
||||
await new Promise<void>((resolve) => setTimeout(resolve, 0));
|
||||
await nextTick();
|
||||
|
||||
// 放行后的首个权威刷新抵达目标阶段时,页面必须同步深链。
|
||||
expect((wrapper.vm as { $route: { query: Record<string, string> } }).$route.query.lifecycle_stage)
|
||||
.toBe('freight_upload');
|
||||
});
|
||||
|
||||
it('keeps notification preparation when the user navigates there while a shortage release is advancing', async () => {
|
||||
const taskApi = await import('@/features/chat/api/shipping.api');
|
||||
let releaseAccepted = false;
|
||||
let resolvePostReleaseTask: ((detail: any) => void) | null = null;
|
||||
activeCase.value = {
|
||||
...activeCase.value,
|
||||
status: 'confirmed', confirmed_task_id: 904, confirmed_task_no: 'SN-MANUAL', has_formal_ot: true,
|
||||
line_fulfillment: {
|
||||
lines: [{
|
||||
line_key: 'line-manual',
|
||||
inventory_source: { code: 'DBS', label: 'DBS', status: 'resolved' },
|
||||
line_allowed_actions: ['release_inventory_shortage'],
|
||||
release_template_fields: [
|
||||
{ field_id: '101', display_name: 'ODM ID', value: 'ODM-001', value_source: 'inventory_snapshot', requires_manual: false },
|
||||
{ field_id: '102', display_name: '库位', value: null, value_source: 'manual_required', requires_manual: true },
|
||||
],
|
||||
release_required_fields: [{ field_id: '102', display_name: '库位' }],
|
||||
}],
|
||||
},
|
||||
};
|
||||
const taskDetail = () => ({
|
||||
task_no: 'SN-MANUAL', status: 'waiting_human', lines: [], events: [],
|
||||
ui_state: {
|
||||
process_gate: { execution_no: 'EXEC-MANUAL-LINE', current_blocking_gate: { gate_code: 'manual_upload_handoff', status: 'blocked_manual' } },
|
||||
actions: { primary: null, secondary: [] },
|
||||
lifecycle_stage: releaseAccepted ? 'freight_upload' : 'fulfillment_prep',
|
||||
lifecycle_entries: releaseAccepted
|
||||
? [{ code: 'fulfillment_prep', state: 'available' }, { code: 'freight_upload', state: 'current' }]
|
||||
: [{ code: 'fulfillment_prep', state: 'current' }],
|
||||
stage_context: { upload: {} },
|
||||
},
|
||||
});
|
||||
vi.mocked(taskApi.decideWorkspaceShippingOrderReviewLineFulfillment).mockImplementation(async () => {
|
||||
releaseAccepted = true;
|
||||
return { status: 'ok' } as any;
|
||||
});
|
||||
vi.mocked(taskApi.getWorkspaceShippingTask).mockImplementation(async () => {
|
||||
if (!releaseAccepted) return taskDetail() as any;
|
||||
return new Promise((resolve) => { resolvePostReleaseTask = resolve; });
|
||||
});
|
||||
|
||||
const wrapper = await mountView({ lifecycle_stage: 'fulfillment_prep' });
|
||||
await wrapper.get('[data-testid="review-fulfillment-line-release-line-manual"]').trigger('click');
|
||||
const dialog = wrapper.get('[data-testid="review-release-inventory-dialog"]');
|
||||
await dialog.find('textarea').setValue('客户确认分批发货');
|
||||
await dialog.find('input').setValue('A-01');
|
||||
await dialog.get('button.bg-amber-600').trigger('click');
|
||||
await wrapper.get('[data-testid="review-lifecycle-stage-fulfillment_prep"]').findAll('button')[1].trigger('click');
|
||||
resolvePostReleaseTask?.(taskDetail());
|
||||
await new Promise<void>((resolve) => setTimeout(resolve, 0));
|
||||
await nextTick();
|
||||
|
||||
// 用户显式回看通知准备会消费本次自动推进许可,后端异步投影不得抢回焦点。
|
||||
expect((wrapper.vm as { $route: { query: Record<string, string> } }).$route.query.lifecycle_stage)
|
||||
.toBe('fulfillment_prep');
|
||||
});
|
||||
|
||||
it('keeps the manual notice-generation entry in the main workspace for an editable formal task', async () => {
|
||||
const taskApi = await import('@/features/chat/api/shipping.api');
|
||||
reviewEditable.value = false;
|
||||
|
||||
@@ -193,7 +193,8 @@ const {
|
||||
const msg = useMessage();
|
||||
|
||||
/**
|
||||
* 右侧主卡阶段:优先 Progress 投影(与顶部同源);Case current_stage 仅降级。
|
||||
* 右侧主卡阶段:优先 Progress 投影(与顶部同源);正式 OT 投影未到时用
|
||||
* Case.current_stage(与投影同源 project_stage_for_task),建单前 automation 仅作降级。
|
||||
* 无论哪一路都带 label_key,禁止把 code 当用户文案。
|
||||
*/
|
||||
const currentProcessingStageDisplay = computed(() => {
|
||||
@@ -206,6 +207,19 @@ const currentProcessingStageDisplay = computed(() => {
|
||||
inconsistent: false,
|
||||
};
|
||||
}
|
||||
const caseStage = activeCase.value?.current_stage;
|
||||
const caseCode = String(caseStage?.code || '').trim();
|
||||
// 正式 OT 的 Case.current_stage 与统一投影同源(project_stage_for_task):
|
||||
// 投影读取中(正式任务已存在、投影在途)也必须先展示真实阶段,
|
||||
// 禁止被下方 automation 分支降级为“创建正式订单”自动建单阶段。
|
||||
if (hasFormalOt.value && caseCode) {
|
||||
return {
|
||||
code: caseCode,
|
||||
labelKey: caseStage?.label_key
|
||||
|| (caseCode === 'order_creating' ? 'waiting_system_start' : caseCode),
|
||||
inconsistent: Boolean(caseStage?.inconsistent),
|
||||
};
|
||||
}
|
||||
// STP 建单前尚无正式 OT/processing projection;自动建单 Job 仍属于“创建正式订单”阶段。
|
||||
const automationStatus = String(activeCase.value?.automation?.status || '').trim().toLowerCase();
|
||||
if (['queued', 'running', 'failed', 'manual_fallback'].includes(automationStatus)) {
|
||||
@@ -215,12 +229,10 @@ const currentProcessingStageDisplay = computed(() => {
|
||||
inconsistent: false,
|
||||
};
|
||||
}
|
||||
const caseStage = activeCase.value?.current_stage;
|
||||
const code = String(caseStage?.code || '').trim() || null;
|
||||
return {
|
||||
code,
|
||||
code: caseCode || null,
|
||||
labelKey: caseStage?.label_key
|
||||
|| (code === 'order_creating' ? 'waiting_system_start' : code),
|
||||
|| (caseCode === 'order_creating' ? 'waiting_system_start' : caseCode),
|
||||
inconsistent: Boolean(caseStage?.inconsistent),
|
||||
};
|
||||
});
|
||||
@@ -407,6 +419,34 @@ async function retryCurrentIntakeParse(): Promise<void> {
|
||||
* 只切换前端工作面并同步可分享深链;禁止在导航点击中修改任何订单生命周期字段。
|
||||
*/
|
||||
const lifecycleStagePinnedByUserForCase = ref<string | null>(null);
|
||||
/** 仅库存短缺放行可建立一次性自动推进许可,避免通用 Gate 恢复抢占用户导航。 */
|
||||
const pendingReleaseAutoAdvanceCaseNo = ref<string | null>(null);
|
||||
|
||||
/**
|
||||
* 消费库存短缺放行后的自动推进许可。
|
||||
*
|
||||
* 仅当同一 Case 仍停留在放行前的通知准备路由、用户未在放行后手动选阶段,且后端
|
||||
* 权威投影已推进时替换深链。异步 Job 的首个投影可直接到目标阶段,不能依赖 watch
|
||||
* 是否曾观察到旧阶段。
|
||||
*/
|
||||
async function syncPendingReleaseAutoAdvance(): Promise<boolean> {
|
||||
const caseNo = String(activeCase.value?.case_no || '').trim();
|
||||
if (!caseNo || pendingReleaseAutoAdvanceCaseNo.value !== caseNo) return false;
|
||||
const requested = String(route.query.lifecycle_stage || '').trim();
|
||||
if (
|
||||
requested !== 'fulfillment_prep'
|
||||
|| lifecycleStagePinnedByUserForCase.value === caseNo
|
||||
) {
|
||||
pendingReleaseAutoAdvanceCaseNo.value = null;
|
||||
return false;
|
||||
}
|
||||
const current = lifecycleCurrentStageCode.value;
|
||||
const currentIndex = current ? LIFECYCLE_STAGE_CODES.indexOf(current) : -1;
|
||||
if (currentIndex <= LIFECYCLE_STAGE_CODES.indexOf('fulfillment_prep')) return false;
|
||||
pendingReleaseAutoAdvanceCaseNo.value = null;
|
||||
await selectLifecycleStage(current!, { replace: true });
|
||||
return true;
|
||||
}
|
||||
|
||||
async function selectLifecycleStage(code: ReviewLifecycleStageCode, options: { replace?: boolean } = {}) {
|
||||
const target = lifecycleStageItems.value.find((item) => item.code === code);
|
||||
@@ -414,7 +454,11 @@ async function selectLifecycleStage(code: ReviewLifecycleStageCode, options: { r
|
||||
// 用户主动回看已完成阶段时,异步投影抵达不得将其强制带回当前阶段。
|
||||
// 自动推进均使用 replace,不会写入该意图。
|
||||
if (!options.replace) {
|
||||
lifecycleStagePinnedByUserForCase.value = String(activeCase.value?.case_no || '').trim() || null;
|
||||
const caseNo = String(activeCase.value?.case_no || '').trim() || null;
|
||||
lifecycleStagePinnedByUserForCase.value = caseNo;
|
||||
if (pendingReleaseAutoAdvanceCaseNo.value === caseNo) {
|
||||
pendingReleaseAutoAdvanceCaseNo.value = null;
|
||||
}
|
||||
}
|
||||
if (code === 'intake_parse' && intakeParseContextAuthorized.value && activeCase.value?.case_no) {
|
||||
void ensureIntakeParseContextLoaded(activeCase.value.case_no);
|
||||
@@ -472,7 +516,10 @@ watch(activeCase, (value) => {
|
||||
watch(
|
||||
() => String(activeCase.value?.case_no || '').trim(),
|
||||
(caseNo, previousCaseNo) => {
|
||||
if (caseNo !== previousCaseNo) lifecycleStagePinnedByUserForCase.value = null;
|
||||
if (caseNo !== previousCaseNo) {
|
||||
lifecycleStagePinnedByUserForCase.value = null;
|
||||
pendingReleaseAutoAdvanceCaseNo.value = null;
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
@@ -628,7 +675,9 @@ const currentTaskPrimaryAction = computed(() => {
|
||||
return null;
|
||||
});
|
||||
const currentTaskUserStatus = computed(() => {
|
||||
if (formalTaskProjectionPending.value) return null;
|
||||
// 已确认 OT 且权威投影在途时,先消费后端 automation 运行态(queued/running → running,
|
||||
// failed/manual_fallback → failed),状态行即显真实值,不应退回「正在获取最新状态」骨架;
|
||||
// authority 仍以右侧投影为准,投影到达后覆盖。
|
||||
if (currentTaskUiState.value?.status) return currentTaskUiState.value.status;
|
||||
// 建单前没有正式 OT 投影时,直接消费后端 Case automation 状态,避免页面看起来卡死。
|
||||
const status = String(activeCase.value?.automation?.status || '').trim().toLowerCase();
|
||||
@@ -1458,16 +1507,23 @@ async function retryFormalUploadRpa(taskNo: string) {
|
||||
* 处理 Gate 恢复已被后端受理后的页面同步。
|
||||
*
|
||||
* 核心逻辑:恢复 Job 尚未完成时立即恢复用户交互,并重启五阶段轮询;三个只读投影
|
||||
* 在后台刷新,避免把网络读取时间误表现为“恢复按钮卡住”。
|
||||
* 在后台刷新,避免把网络读取时间误表现为“恢复按钮卡住”。库存短缺放行可额外建立
|
||||
* 一次性自动推进许可,待后端生命周期投影确认后才更新深链。
|
||||
*/
|
||||
function handleGateRecoveryAccepted() {
|
||||
function handleGateRecoveryAccepted(options: { releaseAutoAdvance?: boolean } = {}) {
|
||||
const caseNo = String(activeCase.value?.case_no || '').trim();
|
||||
if (options.releaseAutoAdvance && caseNo) {
|
||||
// 放行前可能是用户手动进入通知准备;该历史意图不能阻止本次放行后的自动推进。
|
||||
lifecycleStagePinnedByUserForCase.value = null;
|
||||
pendingReleaseAutoAdvanceCaseNo.value = caseNo;
|
||||
}
|
||||
page.bumpWorkflowRefresh?.();
|
||||
startWorkflowProgressPolling();
|
||||
void Promise.allSettled([
|
||||
loadFormalTaskDetail(),
|
||||
reloadLatestDraft(),
|
||||
refreshShippingProcessing(),
|
||||
]);
|
||||
]).then(() => { void syncPendingReleaseAutoAdvance(); });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1998,6 +2054,48 @@ const lifecycleProgressReasonText = computed(() => {
|
||||
if (!progress?.blocking_reason_i18n_key || !te(progress.blocking_reason_i18n_key)) return null;
|
||||
return t(progress.blocking_reason_i18n_key);
|
||||
});
|
||||
/**
|
||||
* Run 级进度横幅的统一展示消息。
|
||||
*
|
||||
* 核心逻辑:只有后端裁决 lifecycle_status == 'running' 才能声称「系统正在自动处理」;
|
||||
* waiting(门禁待机)/ failed / cancelled 只展示等待/失败原因或步骤文本,禁止自动处理文案
|
||||
* 与门禁状态自相矛盾;completed 时 Run 已无待办,横幅直接隐藏。
|
||||
* 注意:后端仅在 running 下才有 current_step_i18n_key,因此旧逻辑在 waiting 时
|
||||
* 会落入「系统正在自动处理」兜底文案,这正是本函数要消除的错误展示。
|
||||
* 该横幅是「提取 Run(建单前流水线)」的运行提示,只在未有正式 OT 时展示
|
||||
* (模板 v-if !hasFormalOt);正式 OT 后进度与操作指引由右栏当前任务卡承载。
|
||||
*/
|
||||
const lifecycleProgressMessage = computed<{
|
||||
auto: boolean;
|
||||
text: string;
|
||||
reason: string | null;
|
||||
} | null>(() => {
|
||||
const progress = lifecycleProgressForView.value;
|
||||
if (!progress) return null;
|
||||
const status = String(progress.lifecycle_status || '').trim().toLowerCase();
|
||||
const stepText = lifecycleProgressStepText.value;
|
||||
const reasonText = lifecycleProgressReasonText.value;
|
||||
if (status === 'running') {
|
||||
return {
|
||||
auto: true,
|
||||
text: stepText || t('chat.shippingProcessing.progress.systemProcessingNeed'),
|
||||
reason: reasonText,
|
||||
};
|
||||
}
|
||||
if (status === 'completed') return null;
|
||||
if (status === 'failed') {
|
||||
return { auto: false, text: reasonText || t('chat.shippingProcessing.progress.lifecycleReason.failed'), reason: null };
|
||||
}
|
||||
if (status === 'cancelled') {
|
||||
return { auto: false, text: reasonText || t('chat.shippingProcessing.progress.lifecycleReason.cancelled'), reason: null };
|
||||
}
|
||||
// waiting 或未知状态:绝不声称自动处理,优先展示后端原因,其次步骤文本。
|
||||
return {
|
||||
auto: false,
|
||||
text: reasonText || stepText || t('chat.shippingProcessing.progress.lifecycleWaitingNeed'),
|
||||
reason: null,
|
||||
};
|
||||
});
|
||||
const lifecycleProgressActiveCode = computed<ReviewLifecycleStageCode | null>(() => {
|
||||
const code = lifecycleProgressForView.value?.lifecycle_stage;
|
||||
return LIFECYCLE_STAGE_CODES.includes(code as ReviewLifecycleStageCode)
|
||||
@@ -2161,7 +2259,10 @@ const formalPreparationContext = computed(() => {
|
||||
if (!fallbackLines.length) return preparation;
|
||||
return {
|
||||
...(preparation || {}),
|
||||
status: preparation?.status || 'processing',
|
||||
// [B1] 回退展示(任务详情未到、仅有 Case line_fulfillment)时不得伪造 status='processing':
|
||||
// 那会让「processing → ready / blocked」看起来像二次刷新;真实状态由任务详情到达后显示,
|
||||
// 徽章在状态为空时保持隐藏。
|
||||
status: preparation?.status ?? null,
|
||||
frozen_order: preparation?.frozen_order || {
|
||||
task_no: confirmedNoticeTaskNo.value || null,
|
||||
snapshot_id: null,
|
||||
@@ -2274,7 +2375,7 @@ async function confirmReleaseInventoryShortage() {
|
||||
// 放行写入成功即结束用户交互;Notice/Excel 由后端 Job 异步创建,不能让只读刷新
|
||||
// 持续占用确认按钮。重启工作台轮询以立即接住新 Notice 的处理投影。
|
||||
releaseInventoryBusy.value = false;
|
||||
handleGateRecoveryAccepted();
|
||||
handleGateRecoveryAccepted({ releaseAutoAdvance: true });
|
||||
} catch (error) {
|
||||
msg.warning(error instanceof Error ? error.message : t('chat.shippingOrderReview.workbench.resultNotReady'));
|
||||
} finally {
|
||||
@@ -2356,8 +2457,11 @@ async function loadFormalTaskDetail() {
|
||||
formalTaskDetailLoadFailed.value = false;
|
||||
return;
|
||||
}
|
||||
// 请求在途期间不保留上一文件详情,生命周期导航会自然回退至当前 Case/实时 Projection。
|
||||
formalTaskDetail.value = null;
|
||||
// 仅任务切换时清空旧详情。同一任务的刷新若先清空,会让 lifecycle_stage 在
|
||||
// freight_upload 与空值之间来回跳,进而触发工作面 watcher 的重复拉取循环。
|
||||
if (formalTaskDetail.value?.task_no !== taskNo) {
|
||||
formalTaskDetail.value = null;
|
||||
}
|
||||
formalTaskDetailLoadFailed.value = false;
|
||||
formalTaskDetailLoading.value = true;
|
||||
try {
|
||||
@@ -2668,6 +2772,71 @@ function freightLineNoDisplay(line: { line_no?: string | number | null; line_no_
|
||||
return { text: String(value), muted: false, title: '' };
|
||||
}
|
||||
|
||||
/**
|
||||
* 逐发货通知单的货代上传状态展示。
|
||||
* 核心逻辑:upload_status 为后端事实;把 uploaded/uploading/failed/pending 映射为文案与色阶,
|
||||
* 并携带 upload_error_code/upload_error_message 作为逐单失败原因。前端禁止按 upload_status 之外的状态猜原因,
|
||||
* 未知状态一律回落 pending,避免把内部执行字段当作用户原因。
|
||||
* @param group - 当前发货通知单聚合行(含 upload_status 与逐单错误字段)。
|
||||
*/
|
||||
function freightUploadStatusDisplay(group: ShippingFreightNoticeGroup): {
|
||||
state: 'uploaded' | 'uploading' | 'failed' | 'needs_human' | 'pending';
|
||||
label: string;
|
||||
chipClass: string;
|
||||
reason: string | null;
|
||||
} {
|
||||
const status = String(group.upload_status || '').trim().toLowerCase();
|
||||
const pendingHuman = String(group.pending_human_reason || '').trim().toLowerCase();
|
||||
const reason = group.upload_error_message || group.upload_error_code || null;
|
||||
if (['uploaded', 'succeeded', 'success'].includes(status)) {
|
||||
return {
|
||||
state: 'uploaded',
|
||||
label: t('chat.shippingOrderReview.lifecycle.freightUpload.uploadStatus.uploaded'),
|
||||
chipClass: 'bg-emerald-100 text-emerald-800 dark:bg-emerald-950/50 dark:text-emerald-200',
|
||||
reason: null,
|
||||
};
|
||||
}
|
||||
if (status === 'failed') {
|
||||
return {
|
||||
state: 'failed',
|
||||
label: t('chat.shippingOrderReview.lifecycle.freightUpload.uploadStatus.failed'),
|
||||
chipClass: 'bg-rose-100 text-rose-700 dark:bg-rose-950/50 dark:text-rose-300',
|
||||
reason: reason ? t('chat.shippingOrderReview.lifecycle.freightUpload.uploadError', { reason }) : null,
|
||||
};
|
||||
}
|
||||
// 存在错误码但状态未置 failed(如超时/结果未知):按“需人工”展示并始终带出逐单原因。
|
||||
if (reason) {
|
||||
return {
|
||||
state: 'needs_human',
|
||||
label: t('chat.shippingOrderReview.lifecycle.freightUpload.uploadStatus.needsHuman'),
|
||||
chipClass: 'bg-amber-100 text-amber-800 dark:bg-amber-950/50 dark:text-amber-200',
|
||||
reason: t('chat.shippingOrderReview.lifecycle.freightUpload.uploadError', { reason }),
|
||||
};
|
||||
}
|
||||
if (['uploading', 'upload_rpa_pending'].includes(status) || pendingHuman === 'upload_rpa_pending') {
|
||||
return {
|
||||
state: 'uploading',
|
||||
label: t('chat.shippingOrderReview.lifecycle.freightUpload.uploadStatus.uploading'),
|
||||
chipClass: 'bg-blue-100 text-blue-800 dark:bg-blue-950/50 dark:text-blue-200',
|
||||
reason: null,
|
||||
};
|
||||
}
|
||||
if (pendingHuman) {
|
||||
return {
|
||||
state: 'needs_human',
|
||||
label: t('chat.shippingOrderReview.lifecycle.freightUpload.uploadStatus.needsHuman'),
|
||||
chipClass: 'bg-amber-100 text-amber-800 dark:bg-amber-950/50 dark:text-amber-200',
|
||||
reason: reason ? t('chat.shippingOrderReview.lifecycle.freightUpload.uploadError', { reason }) : null,
|
||||
};
|
||||
}
|
||||
return {
|
||||
state: 'pending',
|
||||
label: t('chat.shippingOrderReview.lifecycle.freightUpload.uploadStatus.pending'),
|
||||
chipClass: 'bg-slate-100 text-slate-600 dark:bg-slate-800/60 dark:text-slate-300',
|
||||
reason: null,
|
||||
};
|
||||
}
|
||||
|
||||
async function confirmPreparationWave() {
|
||||
const caseNo = String(activeCase.value?.case_no || '').trim();
|
||||
const draftVersion = activeCase.value?.draft?.draft_version;
|
||||
@@ -3666,6 +3835,7 @@ watch(
|
||||
watch(
|
||||
lifecycleCurrentStageCode,
|
||||
async (current, previous) => {
|
||||
if (await syncPendingReleaseAutoAdvance()) return;
|
||||
if (!current || !previous || current === previous) return;
|
||||
// 只响应后端 current 阶段的真实推进:用户点击已完成阶段只会改路由,
|
||||
// 绝不能触发自动跳转而被带回当前阶段。
|
||||
@@ -3891,15 +4061,18 @@ watch(
|
||||
@retry-parse="() => void retryCurrentIntakeParse()"
|
||||
/>
|
||||
<p
|
||||
v-if="lifecycleProgressForView"
|
||||
v-if="lifecycleProgressMessage && !hasFormalOt"
|
||||
class="mt-2 rounded-md border-l-2 border-brand-500 bg-surface-soft px-2.5 py-1.5 text-xs text-secondary"
|
||||
data-testid="review-run-lifecycle-current-step"
|
||||
aria-live="polite"
|
||||
>
|
||||
<span class="mr-1 inline-block h-2 w-2 animate-pulse rounded-full bg-brand-500" aria-hidden="true" />
|
||||
<span v-if="lifecycleProgressStepText">{{ lifecycleProgressStepText }}</span>
|
||||
<span v-else>{{ t('chat.shippingProcessing.progress.systemProcessingNeed') }}</span>
|
||||
<span v-if="lifecycleProgressReasonText" class="ml-1 text-warning">· {{ lifecycleProgressReasonText }}</span>
|
||||
<span
|
||||
v-if="lifecycleProgressMessage.auto"
|
||||
class="mr-1 inline-block h-2 w-2 animate-pulse rounded-full bg-brand-500"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<span>{{ lifecycleProgressMessage.text }}</span>
|
||||
<span v-if="lifecycleProgressMessage.reason" class="ml-1 text-warning">· {{ lifecycleProgressMessage.reason }}</span>
|
||||
</p>
|
||||
</section>
|
||||
</div>
|
||||
@@ -4038,9 +4211,10 @@ watch(
|
||||
<h3 class="text-sm font-semibold text-primary">{{ t('chat.shippingOrderReview.lifecycle.prepare.title') }}</h3>
|
||||
<p class="mt-1 text-xs text-secondary">{{ t('chat.shippingOrderReview.lifecycle.prepare.subtitle') }}</p>
|
||||
</div>
|
||||
<span class="rounded-full bg-brand-50 px-2.5 py-1 text-xs font-medium text-brand-700 dark:bg-brand-950/30 dark:text-brand-300">
|
||||
{{ formalPreparationContext.status || '-' }}
|
||||
</span>
|
||||
<span
|
||||
v-if="formalPreparationContext.status"
|
||||
class="rounded-full bg-brand-50 px-2.5 py-1 text-xs font-medium text-brand-700 dark:bg-brand-950/30 dark:text-brand-300"
|
||||
>{{ formalPreparationContext.status }}</span>
|
||||
</div>
|
||||
<div v-if="formalPreparationContext.has_match_result && formalPreparationLines.length" class="review-fulfillment-prep-workspace mt-4 overflow-x-auto rounded-lg border border-default" data-testid="review-fulfillment-prep-workspace">
|
||||
<div class="flex items-center justify-between gap-3 border-b border-default bg-surface-muted/30 px-3 py-2">
|
||||
@@ -4100,15 +4274,7 @@ watch(
|
||||
<h2 class="text-sm font-semibold text-primary">{{ t('chat.shippingOrderReview.lifecycle.freightUpload.title') }}</h2>
|
||||
<p class="mt-1 text-xs text-secondary">{{ t('chat.shippingOrderReview.lifecycle.freightUpload.subtitle') }}</p>
|
||||
</div>
|
||||
<span class="rounded-full bg-surface-muted px-2 py-1 text-xs text-secondary">{{ formalTaskDetail.upload_status || '-' }}</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="formalTaskDetail.ui_state?.stage_context?.upload?.latest_attempt || formalTaskDetail.ui_state?.stage_context?.upload?.latest_attempt?.error_code"
|
||||
class="mt-3 rounded-lg border border-default bg-surface-muted/50 p-3 text-xs text-secondary"
|
||||
data-testid="review-upload-attempt-summary"
|
||||
>
|
||||
<p v-if="formalTaskDetail.ui_state?.stage_context?.upload?.latest_attempt" class="mt-1">{{ t('chat.shippingOrderReview.lifecycle.upload.attempt', { status: formalTaskDetail.ui_state.stage_context.upload.latest_attempt.status || '-', mode: formalTaskDetail.ui_state.stage_context.upload.latest_attempt.mode || '-' }) }}</p>
|
||||
<p v-if="formalTaskDetail.ui_state?.stage_context?.upload?.latest_attempt?.error_code" class="mt-1 text-rose-700 dark:text-rose-300">{{ formalTaskDetail.ui_state.stage_context.upload.latest_attempt.error_code }}</p>
|
||||
<span class="rounded-full bg-surface-muted px-2 py-1 text-xs text-secondary">{{ t('chat.shippingOrderReview.lifecycle.freightUpload.noticeCount', { count: freightNoticeGroups.length }) }}</span>
|
||||
</div>
|
||||
<div v-if="freightNoticeGroupsLoading" class="mt-3 text-xs text-secondary">{{ t('chat.shippingOrderReview.lifecycle.freightUpload.loading') }}</div>
|
||||
<p v-else-if="freightNoticeGroupsLoadFailed" class="mt-3 rounded-lg border border-rose-200 bg-rose-50/70 p-3 text-xs text-rose-700 dark:border-rose-900 dark:bg-rose-950/20 dark:text-rose-200">{{ t('chat.shippingOrderReview.lifecycle.freightUpload.loadFailed') }}</p>
|
||||
@@ -4120,8 +4286,9 @@ watch(
|
||||
<div v-for="group in freightNoticeGroups" :key="group.business_no" class="rounded-lg border border-default" data-testid="review-freight-upload-notice">
|
||||
<div class="flex flex-wrap items-center justify-between gap-3 border-b border-default bg-surface-muted/40 px-3 py-2 text-xs">
|
||||
<label class="flex items-center gap-2 font-semibold text-primary"><input type="checkbox" :checked="selectedFreightBusinessNos.includes(group.business_no)" :aria-label="group.business_no" @change="toggleFreightNoticeSelection(group.business_no, ($event.target as HTMLInputElement).checked)"><span>{{ group.business_no }}</span></label>
|
||||
<span class="text-secondary">PO: {{ group.po_number || '—' }} · {{ group.upload_status || '—' }} · {{ group.export_file_name || '—' }}</span>
|
||||
<span class="text-secondary">PO: {{ group.po_number || '—' }} · {{ group.export_file_name || '—' }}</span>
|
||||
<div class="flex items-center gap-2">
|
||||
<span :class="freightUploadStatusDisplay(group).chipClass" class="rounded-full px-2 py-0.5 font-medium">{{ freightUploadStatusDisplay(group).label }}</span>
|
||||
<button type="button" class="rounded border border-brand-200 px-2 py-1 font-medium text-brand-700 hover:bg-brand-50" data-testid="review-freight-upload-download" :disabled="saving" @click="void downloadFreightNotice(group.business_no)">{{ t('chat.shippingOrderReview.lifecycle.freightUpload.download') }}</button>
|
||||
<details class="relative">
|
||||
<summary class="list-none rounded border border-default p-1 text-secondary hover:bg-surface" :aria-label="t('chat.shippingProcessing.action.more')"><MoreHorizontal class="h-3.5 w-3.5" aria-hidden="true" /></summary>
|
||||
@@ -4133,6 +4300,7 @@ watch(
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="freightUploadStatusDisplay(group).reason" class="border-b border-default bg-rose-50/50 px-3 py-2 text-xs text-rose-700 dark:bg-rose-950/10 dark:text-rose-300" data-testid="review-freight-upload-error">{{ freightUploadStatusDisplay(group).reason }}</div>
|
||||
<table class="min-w-full text-left text-xs"><thead class="border-b border-default bg-surface-muted/30"><tr><th class="px-3 py-2">{{ t('chat.shippingOrderReview.lifecycle.freightUpload.lineNo') }}</th><th class="px-3 py-2">{{ t('chat.shippingOrderReview.workbench.resultPartNumber') }}</th><th class="px-3 py-2">{{ t('chat.shippingOrderReview.workbench.resultReservation') }}</th><th class="px-3 py-2">{{ t('chat.shippingOrderReview.lifecycle.prepare.requiredQty') }}</th></tr></thead><tbody><tr v-for="line in group.lines" :key="`${group.business_no}-${line.line_no}-${line.part_number}`" class="border-b border-default last:border-0" data-testid="review-freight-upload-line"><td class="px-3 py-2"><span :class="freightLineNoDisplay(line).muted ? 'text-muted' : ''" :title="freightLineNoDisplay(line).title">{{ freightLineNoDisplay(line).text }}</span></td><td class="px-3 py-2">{{ line.part_number || '—' }}</td><td class="px-3 py-2">{{ line.reservation_id || '—' }}</td><td class="px-3 py-2">{{ line.shipment_qty || '—' }}</td></tr></tbody></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -992,6 +992,23 @@
|
||||
"failed": "Test failed"
|
||||
},
|
||||
"connectionBoundary": "Enter only the login information here. The system handles the required page actions, downloads, and waiting for the selected freight platform.",
|
||||
"uploadConfigTitle": "Shipping Excel Auto Upload",
|
||||
"uploadConfigHint": "Edited from this System Connection and stored as a restricted JSON. No free JavaScript, scripts, URL templates, cookies, or arbitrary browser actions are allowed.",
|
||||
"uploadAutoEnabled": "Enable auto-upload (admin has reviewed this connection's upload behavior)",
|
||||
"uploadEntryUrl": "Upload entry URL",
|
||||
"uploadFileSelector": "File input selector",
|
||||
"uploadSubmitMode": "Submit mode",
|
||||
"uploadSubmitAuto": "Auto submit after file",
|
||||
"uploadSubmitClick": "Click submit button",
|
||||
"uploadSubmitSelector": "Submit button selector",
|
||||
"uploadResultMode": "Result determination mode",
|
||||
"uploadResultPageNotice": "Page notice",
|
||||
"uploadResultHistory": "Upload history",
|
||||
"uploadResultSelector": "Result selector",
|
||||
"uploadSuccessTexts": "Success texts (one per line)",
|
||||
"uploadSuccessTextsHint": "Matching any success text marks success",
|
||||
"uploadTimeout": "Timeout (seconds)",
|
||||
"uploadConfigBoundary": "Upload config changes do not increment the inventory RPA config_version; used only for this connection's freight upload, not propagated to inventory/receipt RPA.",
|
||||
"platform": {
|
||||
"dbs": "DBS",
|
||||
"crane": "Crane"
|
||||
|
||||
@@ -1485,7 +1485,7 @@
|
||||
"descriptions": {"intake_parse": "Review the email body and current attachment, then resolve intake parsing issues.", "order_review": "Verify fields and evidence, resolve conflicts, and freeze the order.", "fulfillment_prep": "Complete inventory matching and generate the notice Excel.", "freight_upload": "Download the notice, run RPA or register a manual upload, and reconcile unknown results.", "upload_complete": "Shown only after complete upload-success evidence is verified."},
|
||||
"intakeParse": {"title": "Intake and parsing", "email": "Email body", "emailPreviewTitle": "Safe email body preview", "noEmail": "No email context", "attachment": "Current attachment", "fileName": "File name", "fileType": "File type", "preview": "Attachment preview", "previewLoading": "Loading attachment preview…", "loadPreview": "Load attachment preview", "previewUnsupported": "The current attachment is not a PDF and cannot be previewed here.", "loading": "Loading intake parsing context…", "loadFailed": "Failed to load intake parsing context.", "retry": "Retry"},
|
||||
"prepare": {"title": "Notice preparation", "subtitle": "Handle inventory candidates, matching issues, and notice generation here.", "frozenOrder": "Frozen order", "inventorySource": "Inventory source", "excel": "Shipping Excel", "downloadInventory": "Download inventory file", "retryInventory": "Re-fetch inventory", "releaseShortage": "Release shortage", "releaseShortageHint": "Release allows shipping Excel generation. State the reason for this shortage release.", "releaseReasonPlaceholder": "Enter release reason (required)", "releaseConfirm": "Confirm release", "requiredQty": "Required quantity", "matchWorkspace": "Inventory matching", "lineCount": "{count} inventory results", "lineStatus": "Match status", "matched": "Matched", "shortage": "Inventory shortage", "matchStatus": {"not_found": "Inventory not found", "preparing": "Preparing inventory", "mapping_failed": "Inventory mapping failed", "unavailable": "Inventory unavailable", "source_conflict": "Inventory source conflict", "invalid_key": "Invalid match key", "result_missing": "Awaiting match result", "unknown": "Unknown status"}, "pending": "Inventory matching or the shipping file is not ready yet. Use the current processing card to continue.", "loadFailed": "Failed to load notice preparation details; current data could not be confirmed.", "detailUnavailable": "Notice preparation details have not returned yet, so frozen order and inventory matching data cannot be shown.", "retry": "Reload"},
|
||||
"freightUpload": {"title": "Freight upload", "subtitle": "Grouped by shipping notice; each shipping notice has one Excel.", "loading": "Loading shipping notices…", "loadFailed": "Failed to load shipping notices. Refresh and try again.", "poMissing": "The current task has no recognized PO, so notices cannot be grouped yet.", "empty": "No uploadable shipping notices for this PO.", "download": "Download Excel", "lineNo": "Line", "lineNoSourceCustomerPo": "Customer PO line no.", "lineNoSourceSequence": "System sequence (internal line no. not recognized)", "selected": "{count} notices selected", "batchDownload": "Download selected", "batchRpa": "Batch RPA upload", "batchConfirm": "Confirm selected uploaded"},
|
||||
"freightUpload": {"title": "Freight upload", "subtitle": "Grouped by shipping notice; each shipping notice has one Excel.", "loading": "Loading shipping notices…", "loadFailed": "Failed to load shipping notices. Refresh and try again.", "poMissing": "The current task has no recognized PO, so notices cannot be grouped yet.", "empty": "No uploadable shipping notices for this PO.", "download": "Download Excel", "lineNo": "Line", "lineNoSourceCustomerPo": "Customer PO line no.", "lineNoSourceSequence": "System sequence (internal line no. not recognized)", "selected": "{count} notices selected", "batchDownload": "Download selected", "batchRpa": "Batch RPA upload", "batchConfirm": "Confirm selected uploaded", "noticeCount": "{count} shipping notice(s)", "uploadError": "Upload error reason: {reason}", "uploadStatus": {"pending": "Pending upload", "uploading": "Uploading", "failed": "Upload failed", "uploaded": "Uploaded", "needsHuman": "Manual upload needed"}},
|
||||
"uploadComplete": {"title": "Notification completion", "subtitle": "Upload-success evidence is verified. This view is read only.", "batchCount": "{count} shipping notice(s) uploaded in this batch", "batchDownload": "Download batch ZIP", "batchDownloading": "Packaging…", "uploaded": "Uploaded", "uploadedAt": "{time}", "exportFile": "File: {file}", "expand": "Show line details", "collapse": "Hide line details", "uploadMode": "Upload method: {mode}", "uploadModeManual": "Manual confirmation", "uploadModeRpa": "RPA upload", "empty": "No uploaded shipping notices in this batch."},
|
||||
"upload": {"title": "Freight upload", "subtitle": "Download the notice Excel, upload it on the freight platform and confirm the manual upload, or run RPA.", "manualUpload": "Confirm manual upload", "attempt": "Latest upload attempt: {mode} · {status}"},
|
||||
"stages": {
|
||||
@@ -2218,7 +2218,7 @@
|
||||
"adminDiagnosisStatus": "Status: task_missing",
|
||||
"adminDiagnosisHint": "Use task audit / data repair. This page does not auto-recover.",
|
||||
"stateInconsistent": "State syncing / inconsistent state data",
|
||||
"stageLoading": "Updating status…",
|
||||
"stageLoading": "Fetching latest status…",
|
||||
"statusRunning": "System processing",
|
||||
"statusFailedRetryable": "Failed — retry available",
|
||||
"statusCompleted": "Completed",
|
||||
@@ -2740,6 +2740,7 @@
|
||||
"domainFulfillmentShip": "Fulfillment",
|
||||
"currentNeedLabel": "Current need: ",
|
||||
"systemProcessingNeed": "The system is processing automatically. Wait or refresh progress.",
|
||||
"lifecycleWaitingNeed": "The current step requires manual handling",
|
||||
"progressTitleWithStage": "Order processing · {stage}",
|
||||
"systemProcessingWithStage": "System processing · {stage}",
|
||||
"viewProcessDetails": "View process details",
|
||||
|
||||
@@ -992,6 +992,23 @@
|
||||
"failed": "ทดสอบล้มเหลว"
|
||||
},
|
||||
"connectionBoundary": "กรอกเฉพาะข้อมูลเข้าสู่ระบบ ระบบจะดำเนินการหน้าเว็บ ดาวน์โหลด และรอตามแพลตฟอร์มผู้ให้บริการที่เลือกโดยอัตโนมัติ",
|
||||
"uploadConfigTitle": "อัปโหลด Excel การจัดส่งอัตโนมัติ",
|
||||
"uploadConfigHint": "แก้ไขจากหน้าการเชื่อมต่อระบบนี้และบันทึกเป็น JSON แบบจำกัด; ห้ามใช้ JavaScript/สคริปต์/URL template/Cookie หรือการกระทำเบราว์เซอร์โดยอิสระ",
|
||||
"uploadAutoEnabled": "เปิดใช้งานอัปโหลดอัตโนมัติ (ผู้ดูแลตรวจสอบพฤติกรรมการอัปโหลดของการเชื่อมต่อนี้แล้ว)",
|
||||
"uploadEntryUrl": "URL หน้าอัปโหลด",
|
||||
"uploadFileSelector": "ตัวเลือกไฟล์ (selector)",
|
||||
"uploadSubmitMode": "โหมดส่ง",
|
||||
"uploadSubmitAuto": "ส่งอัตโนมัติหลังเลือกไฟล์",
|
||||
"uploadSubmitClick": "คลิกปุ่มส่ง",
|
||||
"uploadSubmitSelector": "ตัวเลือกปุ่มส่ง",
|
||||
"uploadResultMode": "โหมดตรวจสอบผล",
|
||||
"uploadResultPageNotice": "ข้อความแจ้งบนหน้า",
|
||||
"uploadResultHistory": "ประวัติการอัปโหลด",
|
||||
"uploadResultSelector": "ตัวเลือกผลลัพธ์",
|
||||
"uploadSuccessTexts": "ข้อความสำเร็จ (หนึ่งรายการต่อบรรทัด)",
|
||||
"uploadSuccessTextsHint": "หากตรงกับข้อความสำเร็จข้อใดข้อหนึ่งถือว่าสำเร็จ",
|
||||
"uploadTimeout": "ระยะเวลารอ (วินาที)",
|
||||
"uploadConfigBoundary": "การเปลี่ยนค่าอัปโหลดไม่เพิ่ม config_version ของ RPA คลัง; ใช้เฉพาะการอัปโหลดของสายการขนส่งนี้เท่านั้น ไม่แพร่ไปยัง RPA คลัง/รับของ",
|
||||
"platform": {
|
||||
"dbs": "DBS",
|
||||
"crane": "Crane"
|
||||
|
||||
@@ -1485,7 +1485,7 @@
|
||||
"descriptions": {"intake_parse": "ตรวจสอบเนื้อหาอีเมลและไฟล์แนบปัจจุบัน แล้วจัดการปัญหาการแยกวิเคราะห์ขาเข้า", "order_review": "ตรวจสอบข้อมูลและหลักฐาน แก้ข้อขัดแย้ง และตรึงคำสั่งซื้อ", "fulfillment_prep": "จับคู่สต็อกและสร้าง Excel แจ้งงาน", "freight_upload": "ดาวน์โหลดไฟล์แจ้งงาน รัน RPA หรือลงทะเบียนการอัปโหลดด้วยตนเอง และตรวจสอบผลลัพธ์ที่ไม่ทราบ", "upload_complete": "แสดงเมื่อยืนยันหลักฐานความสำเร็จของการอัปโหลดครบถ้วนแล้วเท่านั้น"},
|
||||
"intakeParse": {"title": "รับและแยกวิเคราะห์", "email": "เนื้อหาอีเมล", "emailPreviewTitle": "ตัวอย่างเนื้อหาอีเมลแบบปลอดภัย", "noEmail": "ไม่มีบริบทอีเมล", "attachment": "ไฟล์แนบปัจจุบัน", "fileName": "ชื่อไฟล์", "fileType": "ประเภทไฟล์", "preview": "ตัวอย่างไฟล์แนบ", "previewLoading": "กำลังโหลดตัวอย่างไฟล์แนบ…", "loadPreview": "โหลดตัวอย่างไฟล์แนบ", "previewUnsupported": "ไฟล์แนบปัจจุบันไม่ใช่ PDF และไม่สามารถแสดงตัวอย่างที่นี่ได้", "loading": "กำลังโหลดบริบทการแยกวิเคราะห์ขาเข้า…", "loadFailed": "โหลดบริบทการแยกวิเคราะห์ขาเข้าไม่สำเร็จ", "retry": "ลองอีกครั้ง"},
|
||||
"prepare": {"title": "เตรียมการแจ้ง", "subtitle": "จัดการตัวเลือกสต็อก ปัญหาการจับคู่ และการสร้างไฟล์แจ้งงานที่นี่", "frozenOrder": "คำสั่งซื้อที่ตรึงแล้ว", "inventorySource": "แหล่งสต็อก", "excel": "Excel การจัดส่ง", "downloadInventory": "ดาวน์โหลดไฟล์สินค้าคงคลัง", "retryInventory": "ดึงข้อมูลสต็อกอีกครั้ง", "releaseShortage": "อนุมัติส่วนขาดสต็อก", "releaseShortageHint": "การอนุมัติทำให้สร้าง Excel การจัดส่งได้ โปรดระบุเหตุผลสำหรับส่วนขาดนี้", "releaseReasonPlaceholder": "กรอกเหตุผลการอนุมัติ (จำเป็น)", "releaseConfirm": "ยืนยันการอนุมัติ", "requiredQty": "จำนวนที่ต้องการ", "matchWorkspace": "การจับคู่สต็อก", "lineCount": "ผลลัพธ์สต็อก {count} รายการ", "lineStatus": "สถานะการจับคู่", "matched": "จับคู่แล้ว", "shortage": "สต็อกไม่เพียงพอ", "matchStatus": {"not_found": "ไม่พบสต็อก", "preparing": "กำลังเตรียมสต็อก", "mapping_failed": "จับคู่ฟิลด์สต็อกไม่สำเร็จ", "unavailable": "สต็อกไม่พร้อมใช้", "source_conflict": "แหล่งสต็อกขัดแย้ง", "invalid_key": "คีย์จับคู่ไม่ถูกต้อง", "result_missing": "กำลังรอผลการจับคู่", "unknown": "ไม่ทราบสถานะ"}, "pending": "การจับคู่สต็อกหรือไฟล์แจ้งการจัดส่งยังไม่พร้อม โปรดดำเนินการจากบัตรงานปัจจุบัน", "loadFailed": "โหลดรายละเอียดการเตรียมการแจ้งไม่สำเร็จ จึงยังยืนยันข้อมูลปัจจุบันไม่ได้", "detailUnavailable": "ยังไม่ได้รับรายละเอียดการเตรียมการแจ้ง จึงยังแสดงคำสั่งซื้อที่ตรึงและข้อมูลการจับคู่สต็อกไม่ได้", "retry": "โหลดอีกครั้ง"},
|
||||
"freightUpload": {"title": "อัปโหลดให้ผู้ให้บริการขนส่ง", "subtitle": "จัดกลุ่มตามใบแจ้งส่งสินค้า; แต่ละใบแจ้งส่งสินค้ามี Excel หนึ่งไฟล์", "loading": "กำลังโหลดใบแจ้งส่งสินค้า…", "loadFailed": "โหลดใบแจ้งส่งสินค้าไม่สำเร็จ โปรดลองรีเฟรช", "poMissing": "งานปัจจุบันยังไม่พบ PO จึงยังจัดกลุ่มใบแจ้งส่งสินค้าไม่ได้", "empty": "ไม่มีใบแจ้งส่งสินค้าที่อัปโหลดได้สำหรับ PO นี้", "download": "ดาวน์โหลด Excel", "lineNo": "รายการ", "lineNoSourceCustomerPo": "เลขบรรทัด PO ของลูกค้า", "lineNoSourceSequence": "ลำดับระบบ (ไม่พบเลขรายการภายใน)", "selected": "เลือกแล้ว {count} ใบแจ้งส่งสินค้า", "batchDownload": "ดาวน์โหลดที่เลือก", "batchRpa": "อัปโหลด RPA แบบกลุ่ม", "batchConfirm": "ยืนยันว่าอัปโหลดแล้ว"},
|
||||
"freightUpload": {"title": "อัปโหลดให้ผู้ให้บริการขนส่ง", "subtitle": "จัดกลุ่มตามใบแจ้งส่งสินค้า; แต่ละใบแจ้งส่งสินค้ามี Excel หนึ่งไฟล์", "loading": "กำลังโหลดใบแจ้งส่งสินค้า…", "loadFailed": "โหลดใบแจ้งส่งสินค้าไม่สำเร็จ โปรดลองรีเฟรช", "poMissing": "งานปัจจุบันยังไม่พบ PO จึงยังจัดกลุ่มใบแจ้งส่งสินค้าไม่ได้", "empty": "ไม่มีใบแจ้งส่งสินค้าที่อัปโหลดได้สำหรับ PO นี้", "download": "ดาวน์โหลด Excel", "lineNo": "รายการ", "lineNoSourceCustomerPo": "เลขบรรทัด PO ของลูกค้า", "lineNoSourceSequence": "ลำดับระบบ (ไม่พบเลขรายการภายใน)", "selected": "เลือกแล้ว {count} ใบแจ้งส่งสินค้า", "batchDownload": "ดาวน์โหลดที่เลือก", "batchRpa": "อัปโหลด RPA แบบกลุ่ม", "batchConfirm": "ยืนยันว่าอัปโหลดแล้ว", "noticeCount": "รวม {count} ใบแจ้งส่งสินค้า", "uploadError": "สาเหตุการอัปโหลดล้มเหลว: {reason}", "uploadStatus": {"pending": "รออัปโหลด", "uploading": "กำลังอัปโหลด", "failed": "อัปโหลดล้มเหลว", "uploaded": "อัปโหลดแล้ว", "needsHuman": "ต้องอัปโหลดด้วยตนเอง"}},
|
||||
"uploadComplete": {"title": "แจ้งเสร็จสิ้น", "subtitle": "ยืนยันหลักฐานความสำเร็จของการอัปโหลดแล้ว หน้านี้อ่านได้อย่างเดียว", "batchCount": "ชุดนี้ได้อัปโหลดใบแจ้งส่งสินค้าแล้ว {count} ใบ", "batchDownload": "ดาวน์โหลด ZIP ทั้งชุด", "batchDownloading": "กำลังแพ็ก…", "uploaded": "อัปโหลดแล้ว", "uploadedAt": "{time}", "exportFile": "ไฟล์: {file}", "expand": "แสดงรายละเอียด", "collapse": "ซ่อนรายละเอียด", "uploadMode": "วิธีอัปโหลด: {mode}", "uploadModeManual": "ยืนยันด้วยตนเอง", "uploadModeRpa": "อัปโหลด RPA", "empty": "ชุดนี้ยังไม่มีใบแจ้งส่งสินค้าที่อัปโหลดแล้ว"},
|
||||
"upload": {"title": "อัปโหลดให้ผู้ให้บริการขนส่ง", "subtitle": "ดาวน์โหลด Excel แจ้งงาน อัปโหลดบนแพลตฟอร์มขนส่งแล้วยืนยันการอัปโหลดด้วยตนเอง หรือรัน RPA", "manualUpload": "ยืนยันการอัปโหลดด้วยตนเอง", "attempt": "ความพยายามอัปโหลดล่าสุด: {mode} · {status}"},
|
||||
"stages": {
|
||||
@@ -2218,7 +2218,7 @@
|
||||
"adminDiagnosisStatus": "สถานะ: task_missing",
|
||||
"adminDiagnosisHint": "ใช้การตรวจสอบงาน/ซ่อมข้อมูล ไม่กู้คืนอัตโนมัติในหน้านี้",
|
||||
"stateInconsistent": "กำลังซิงก์สถานะ / ข้อมูลไม่สอดคล้อง",
|
||||
"stageLoading": "กำลังอัปเดตสถานะ…",
|
||||
"stageLoading": "กำลังโหลดสถานะล่าสุด…",
|
||||
"statusRunning": "ระบบกำลังประมวลผล",
|
||||
"statusFailedRetryable": "ล้มเหลว — ลองใหม่ได้",
|
||||
"statusCompleted": "เสร็จสิ้น",
|
||||
@@ -2740,6 +2740,7 @@
|
||||
"domainFulfillmentShip": "จัดส่ง",
|
||||
"currentNeedLabel": "ความต้องการปัจจุบัน: ",
|
||||
"systemProcessingNeed": "ระบบกำลังประมวลผลอัตโนมัติ รอสักครู่หรือรีเฟรชความคืบหน้า",
|
||||
"lifecycleWaitingNeed": "ขั้นตอนปัจจุบันต้องดำเนินการด้วยตนเอง",
|
||||
"progressTitleWithStage": "ความคืบหน้าการประมวลผลคำสั่ง · {stage}",
|
||||
"systemProcessingWithStage": "ระบบกำลังประมวลผล · {stage}",
|
||||
"viewProcessDetails": "ดูรายละเอียดกระบวนการ",
|
||||
|
||||
@@ -1120,6 +1120,23 @@
|
||||
"failed": "测试失败"
|
||||
},
|
||||
"connectionBoundary": "连接配置只填写登录所需信息;系统会按货代平台自动执行页面操作、下载和等待。",
|
||||
"uploadConfigTitle": "发货 Excel 自动上传",
|
||||
"uploadConfigHint": "该配置由系统连接管理端编辑,后端保存为受限 JSON;禁止自由 JavaScript、脚本、URL 模板、Cookie 或任意浏览器动作。",
|
||||
"uploadAutoEnabled": "启用自动上传(代表管理员已审核该连接的上传行为)",
|
||||
"uploadEntryUrl": "上传入口 URL",
|
||||
"uploadFileSelector": "文件选择器",
|
||||
"uploadSubmitMode": "提交方式",
|
||||
"uploadSubmitAuto": "选择文件后自动提交",
|
||||
"uploadSubmitClick": "点击提交按钮",
|
||||
"uploadSubmitSelector": "提交按钮选择器",
|
||||
"uploadResultMode": "成功判定方式",
|
||||
"uploadResultPageNotice": "页面提示",
|
||||
"uploadResultHistory": "上传历史记录",
|
||||
"uploadResultSelector": "结果选择器",
|
||||
"uploadSuccessTexts": "成功文本(每行一条)",
|
||||
"uploadSuccessTextsHint": "命中任一条成功文本即判定成功",
|
||||
"uploadTimeout": "超时时间(秒)",
|
||||
"uploadConfigBoundary": "上传配置变更不递增库存 RPA config_version;仅该连接的货代上传使用,不向库存/收料 RPA 扩散。",
|
||||
"platform": {
|
||||
"dbs": "DBS 平台",
|
||||
"crane": "Crane 平台"
|
||||
|
||||
@@ -1592,7 +1592,7 @@
|
||||
"descriptions": {"intake_parse": "核对邮件正文和当前附件,处置接收解析异常。", "order_review": "核实字段和证据,处理冲突并冻结订单。", "fulfillment_prep": "完成库存匹配并生成通知 Excel。", "freight_upload": "下载通知文件、执行 RPA 或登记人工上传,并核对未知结果。", "upload_complete": "仅在上传成功证据完整时展示通知完成。"},
|
||||
"intakeParse": {"title": "接收解析", "email": "邮件正文", "emailPreviewTitle": "邮件正文安全预览", "noEmail": "无邮件上下文", "attachment": "当前附件", "fileName": "文件名", "fileType": "文件类型", "preview": "附件预览", "previewLoading": "正在加载附件预览…", "loadPreview": "加载附件预览", "previewUnsupported": "当前附件不是 PDF,不能在此预览。", "loading": "正在加载接收解析上下文…", "loadFailed": "接收解析上下文加载失败。", "retry": "重试"},
|
||||
"prepare": {"title": "通知准备", "subtitle": "库存候选、匹配异常和通知文件生成均在此阶段处理。", "frozenOrder": "冻结订单", "inventorySource": "库存源", "excel": "通知 Excel", "downloadInventory": "下载库存文件", "retryInventory": "重新获取库存", "releaseShortage": "库存缺口放行", "releaseShortageHint": "放行后可生成发货 Excel;请填写本次缺口放行原因。", "releaseReasonPlaceholder": "请输入放行原因(必填)", "releaseConfirm": "确认放行", "requiredQty": "需求数量", "matchWorkspace": "库存匹配", "lineCount": "{count} 行库存结果", "lineStatus": "匹配状态", "matched": "已匹配", "shortage": "库存不足", "matchStatus": {"not_found": "未匹配到库存", "preparing": "库存准备中", "mapping_failed": "库存映射失败", "unavailable": "库存不可用", "source_conflict": "库存源冲突", "invalid_key": "匹配键无效", "result_missing": "等待匹配结果", "unknown": "状态未知"}, "pending": "库存匹配或通知文件尚未生成。请查看右侧当前处理,按当前门禁继续。", "loadFailed": "通知准备任务详情加载失败,当前数据未能确认。", "detailUnavailable": "通知准备任务详情尚未返回,暂时无法展示冻结订单和库存匹配数据。", "retry": "重新加载"},
|
||||
"freightUpload": {"title": "货代上传", "subtitle": "按发货通知单聚合展示;每张发货通知单对应一张 Excel。", "loading": "正在加载发货通知…", "loadFailed": "发货通知加载失败,请刷新后重试。", "poMissing": "当前任务尚未识别到 PO,暂时无法聚合发货通知。", "empty": "当前 PO 暂无可上传的发货通知。", "download": "下载 Excel", "lineNo": "项次", "lineNoSourceCustomerPo": "客户 PO 行号", "lineNoSourceSequence": "系统行序(未识别到内部项次)", "selected": "已选 {count} 个发货通知", "batchDownload": "批量下载", "batchRpa": "批量 RPA 上传", "batchConfirm": "批量确认已上传"},
|
||||
"freightUpload": {"title": "货代上传", "subtitle": "按发货通知单聚合展示;每张发货通知单对应一张 Excel。", "loading": "正在加载发货通知…", "loadFailed": "发货通知加载失败,请刷新后重试。", "poMissing": "当前任务尚未识别到 PO,暂时无法聚合发货通知。", "empty": "当前 PO 暂无可上传的发货通知。", "download": "下载 Excel", "lineNo": "项次", "lineNoSourceCustomerPo": "客户 PO 行号", "lineNoSourceSequence": "系统行序(未识别到内部项次)", "selected": "已选 {count} 个发货通知", "batchDownload": "批量下载", "batchRpa": "批量 RPA 上传", "batchConfirm": "批量确认已上传", "noticeCount": "共 {count} 张发货通知", "uploadError": "上传失败原因:{reason}", "uploadStatus": {"pending": "待上传", "uploading": "上传中", "failed": "上传失败", "uploaded": "已上传", "needsHuman": "需人工上传"}},
|
||||
"uploadComplete": {"title": "通知完成", "subtitle": "上传成功证据已核验,以下内容仅供查看。", "batchCount": "本批已上传 {count} 张发货通知", "batchDownload": "下载本批 ZIP", "batchDownloading": "正在打包…", "uploaded": "已上传", "uploadedAt": "{time}", "exportFile": "文件:{file}", "expand": "展开明细", "collapse": "收起明细", "uploadMode": "上传方式:{mode}", "uploadModeManual": "人工确认", "uploadModeRpa": "RPA 上传", "empty": "本批暂无已上传的发货通知。"},
|
||||
"upload": {"title": "货代上传", "subtitle": "下载已生成的通知 Excel,上传至货代平台后确认人工上传,或执行 RPA。", "manualUpload": "确认人工上传", "attempt": "最近上传尝试:{mode} · {status}"},
|
||||
"stages": {
|
||||
@@ -2337,7 +2337,7 @@
|
||||
"adminDiagnosisStatus": "状态:task_missing",
|
||||
"adminDiagnosisHint": "请通过任务审计/数据修复流程处理;本页不提供自动恢复。",
|
||||
"stateInconsistent": "状态同步中 / 状态数据不一致",
|
||||
"stageLoading": "正在更新状态…",
|
||||
"stageLoading": "正在获取最新状态…",
|
||||
"statusRunning": "系统处理中",
|
||||
"statusFailedRetryable": "失败可重试",
|
||||
"statusCompleted": "已完成",
|
||||
@@ -2814,6 +2814,7 @@
|
||||
"domainFulfillmentShip": "发货履约",
|
||||
"currentNeedLabel": "当前需要:",
|
||||
"systemProcessingNeed": "系统正在自动处理,请稍候或刷新进度",
|
||||
"lifecycleWaitingNeed": "当前步骤需要人工处理",
|
||||
"progressTitleWithStage": "订单处理进度 · {stage}",
|
||||
"systemProcessingWithStage": "系统处理中 · {stage}",
|
||||
"viewProcessDetails": "查看流程详情",
|
||||
|
||||
@@ -992,6 +992,23 @@
|
||||
"failed": "測試失敗"
|
||||
},
|
||||
"connectionBoundary": "連線設定只填寫登入所需資訊;系統會依貨代平台自動執行頁面操作、下載與等待。",
|
||||
"uploadConfigTitle": "發貨 Excel 自動上傳",
|
||||
"uploadConfigHint": "本設定由系統連線管理端編輯,後端儲存為受限 JSON;禁止自由 JavaScript、腳本、URL 範本、Cookie 或任意瀏覽器動作。",
|
||||
"uploadAutoEnabled": "啟用自動上傳(代表管理員已審核該連線的上傳行為)",
|
||||
"uploadEntryUrl": "上傳入口 URL",
|
||||
"uploadFileSelector": "檔案選擇器",
|
||||
"uploadSubmitMode": "提交方式",
|
||||
"uploadSubmitAuto": "選擇檔案後自動提交",
|
||||
"uploadSubmitClick": "點擊提交按鈕",
|
||||
"uploadSubmitSelector": "提交按鈕選擇器",
|
||||
"uploadResultMode": "成功判定方式",
|
||||
"uploadResultPageNotice": "頁面提示",
|
||||
"uploadResultHistory": "上傳歷史記錄",
|
||||
"uploadResultSelector": "結果選擇器",
|
||||
"uploadSuccessTexts": "成功文字(每行一條)",
|
||||
"uploadSuccessTextsHint": "命中任一條成功文字即判定成功",
|
||||
"uploadTimeout": "逾時時間(秒)",
|
||||
"uploadConfigBoundary": "上傳設定變更不遞增庫存 RPA config_version;僅該連線的貨代上傳使用,不擴散至庫存/收料 RPA。",
|
||||
"platform": {
|
||||
"dbs": "DBS 平台",
|
||||
"crane": "Crane 平台"
|
||||
|
||||
@@ -1485,7 +1485,7 @@
|
||||
"descriptions": {"intake_parse": "核對郵件正文和目前附件,處理接收解析異常。", "order_review": "核實欄位與證據、處理衝突並凍結訂單。", "fulfillment_prep": "完成庫存匹配並產生通知 Excel。", "freight_upload": "下載通知檔案、執行 RPA 或登記人工上傳,並核對未知結果。", "upload_complete": "僅在上傳成功證據完整時顯示通知完成。"},
|
||||
"intakeParse": {"title": "接收解析", "email": "郵件正文", "emailPreviewTitle": "郵件正文安全預覽", "noEmail": "無郵件上下文", "attachment": "目前附件", "fileName": "檔案名稱", "fileType": "檔案類型", "preview": "附件預覽", "previewLoading": "正在載入附件預覽…", "loadPreview": "載入附件預覽", "previewUnsupported": "目前附件不是 PDF,無法在此預覽。", "loading": "正在載入接收解析上下文…", "loadFailed": "接收解析上下文載入失敗。", "retry": "重試"},
|
||||
"prepare": {"title": "通知準備", "subtitle": "在此處處理庫存候選、匹配異常與通知檔產生。", "frozenOrder": "凍結訂單", "inventorySource": "庫存來源", "excel": "發貨 Excel", "downloadInventory": "下載庫存檔案", "retryInventory": "重新取得庫存", "releaseShortage": "放行庫存缺口", "releaseShortageHint": "放行後可產生發貨 Excel;請填寫本次缺口放行原因。", "releaseReasonPlaceholder": "請輸入放行原因(必填)", "releaseConfirm": "確認放行", "requiredQty": "需求數量", "matchWorkspace": "庫存匹配", "lineCount": "{count} 行庫存結果", "lineStatus": "匹配狀態", "matched": "已匹配", "shortage": "庫存不足", "matchStatus": {"not_found": "未匹配到庫存", "preparing": "庫存準備中", "mapping_failed": "庫存對應失敗", "unavailable": "庫存不可用", "source_conflict": "庫存來源衝突", "invalid_key": "匹配鍵無效", "result_missing": "等待匹配結果", "unknown": "狀態未知"}, "pending": "庫存匹配或通知檔案尚未產生。請查看右側目前處理,依目前門禁繼續。", "loadFailed": "通知準備任務詳情載入失敗,目前資料無法確認。", "detailUnavailable": "通知準備任務詳情尚未返回,暫時無法展示凍結訂單和庫存匹配資料。", "retry": "重新載入"},
|
||||
"freightUpload": {"title": "貨代上傳", "subtitle": "按發貨通知單聚合展示;每張發貨通知單對應一張 Excel。", "loading": "正在載入發貨通知…", "loadFailed": "發貨通知載入失敗,請重新整理後重試。", "poMissing": "目前任務尚未識別到 PO,暫時無法聚合發貨通知。", "empty": "目前 PO 沒有可上傳的發貨通知。", "download": "下載 Excel", "lineNo": "項次", "lineNoSourceCustomerPo": "客戶 PO 行號", "lineNoSourceSequence": "系統行序(未識別到內部項次)", "selected": "已選 {count} 個發貨通知", "batchDownload": "批量下載", "batchRpa": "批量 RPA 上傳", "batchConfirm": "批量確認已上傳"},
|
||||
"freightUpload": {"title": "貨代上傳", "subtitle": "按發貨通知單聚合展示;每張發貨通知單對應一張 Excel。", "loading": "正在載入發貨通知…", "loadFailed": "發貨通知載入失敗,請重新整理後重試。", "poMissing": "目前任務尚未識別到 PO,暫時無法聚合發貨通知。", "empty": "目前 PO 沒有可上傳的發貨通知。", "download": "下載 Excel", "lineNo": "項次", "lineNoSourceCustomerPo": "客戶 PO 行號", "lineNoSourceSequence": "系統行序(未識別到內部項次)", "selected": "已選 {count} 個發貨通知", "batchDownload": "批量下載", "batchRpa": "批量 RPA 上傳", "batchConfirm": "批量確認已上傳", "noticeCount": "共 {count} 張發貨通知", "uploadError": "上傳失敗原因:{reason}", "uploadStatus": {"pending": "待上傳", "uploading": "上傳中", "failed": "上傳失敗", "uploaded": "已上傳", "needsHuman": "需人工上傳"}},
|
||||
"uploadComplete": {"title": "通知完成", "subtitle": "上傳成功證據已核驗,以下內容僅供查看。", "batchCount": "本批已上傳 {count} 張發貨通知", "batchDownload": "下載本批 ZIP", "batchDownloading": "正在打包…", "uploaded": "已上傳", "uploadedAt": "{time}", "exportFile": "檔案:{file}", "expand": "展開明細", "collapse": "收合明細", "uploadMode": "上傳方式:{mode}", "uploadModeManual": "人工確認", "uploadModeRpa": "RPA 上傳", "empty": "本批暫無已上傳的發貨通知。"},
|
||||
"upload": {"title": "貨代上傳", "subtitle": "下載通知 Excel、上傳至貨代平台後確認人工上傳,或執行 RPA。", "manualUpload": "確認人工上傳", "attempt": "最近上傳嘗試:{mode} · {status}"},
|
||||
"stages": {
|
||||
@@ -2218,7 +2218,7 @@
|
||||
"adminDiagnosisStatus": "狀態:task_missing",
|
||||
"adminDiagnosisHint": "請透過任務審計/資料修復流程處理;本頁不提供自動恢復。",
|
||||
"stateInconsistent": "狀態同步中 / 狀態資料不一致",
|
||||
"stageLoading": "正在更新狀態…",
|
||||
"stageLoading": "正在取得最新狀態…",
|
||||
"statusRunning": "系統處理中",
|
||||
"statusFailedRetryable": "失敗可重試",
|
||||
"statusCompleted": "已完成",
|
||||
@@ -2740,6 +2740,7 @@
|
||||
"domainFulfillmentShip": "發貨履約",
|
||||
"currentNeedLabel": "目前需要:",
|
||||
"systemProcessingNeed": "系統正在自動處理,請稍候或重新整理進度",
|
||||
"lifecycleWaitingNeed": "目前步驟需要人工處理",
|
||||
"progressTitleWithStage": "訂單處理進度 · {stage}",
|
||||
"systemProcessingWithStage": "系統處理中 · {stage}",
|
||||
"viewProcessDetails": "查看流程詳情",
|
||||
|
||||
Reference in new issue
Block a user