fix(shipping-notice): 修复抽取续抽与 STP 入队并发死锁并幂等草稿校验
- 抽取 Job 续抽交接时 defer_stp_enqueue,STP 入队推迟到 run 收口统一触发,消除与续抽 Job 互抢行锁的死锁(2026-09-22 生产事故) - 草稿显式 validate 在内容未变时幂等短路:不递增版本、不写事件、不重复触发下游,防连点「保存并校验」产生版本/Job 风暴(事故根因) - STP 自动建单入队前 supersede 同文档过期排队 Job,防止旧版本 Job 抢跑 - 抽取 Job 异常收口识别 PostgreSQL 瞬时锁冲突(40P01/55P03)标记可重试,不再终态失败要求人工重新识别 - 订单凭据加密抽离为 app/core/credential_crypto 通用模块,shipping_notice 委托调用并保留原错误码 - 同步复核视图与测试:新增草稿校验幂等契约测试,更新 STP 入队与 Worker 重试用例
This commit is contained in:
1 parent
13c33d063c
commit
5df204fdea
12 files changed
+865
-87
No files matched your search
@@ -653,6 +653,22 @@ async function mountView(query: Record<string, string> = {}) {
|
||||
moreActions: '更多操作',
|
||||
inventorySource: '库存源',
|
||||
},
|
||||
lineActions: {
|
||||
closeLine: '结案(不再发货)',
|
||||
closeLineConfirm: '确认结案',
|
||||
editLine: '编辑',
|
||||
more: '更多操作',
|
||||
},
|
||||
inlineEdit: {
|
||||
save: '保存',
|
||||
cancel: '取消',
|
||||
busy: '系统处理中,请稍后再修改',
|
||||
},
|
||||
releaseBar: {
|
||||
label: '放行补录',
|
||||
missingPrefix: '缺 ',
|
||||
missingSuffix: ' 项放行信息',
|
||||
},
|
||||
workflowProgress: {
|
||||
automatingFooterHint: '系统自动推进中',
|
||||
},
|
||||
@@ -682,6 +698,9 @@ async function mountView(query: Record<string, string> = {}) {
|
||||
downloadInventory: '下载库存文件',
|
||||
retryInventory: '重新获取库存',
|
||||
releaseShortage: '库存缺口放行',
|
||||
releaseShortageHint: '放行后本次发货按缺口处理。',
|
||||
releaseReasonPlaceholder: '可填写放行原因(选填)',
|
||||
releaseConfirm: '确认放行',
|
||||
shortage: '库存不足',
|
||||
pending: '库存匹配或通知文件尚未生成。',
|
||||
},
|
||||
@@ -733,6 +752,9 @@ async function mountView(query: Record<string, string> = {}) {
|
||||
processGate: {
|
||||
inventoryActions: {
|
||||
retryInventoryPreparation: '重新获取库存(RPA)',
|
||||
retryInventoryMatching: '重新匹配库存',
|
||||
downloadInventoryFile: '下载库存文件',
|
||||
releaseInventoryShortage: '库存缺口放行',
|
||||
},
|
||||
actionCodes: {
|
||||
confirm_customer: '确认客户',
|
||||
@@ -792,6 +814,27 @@ async function mountView(query: Record<string, string> = {}) {
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开通知准备行的更多操作菜单(⋯)。
|
||||
* 核心逻辑:展示态行级动作(重试/放行/下载)已收纳进该菜单,入口按钮在表格行内。
|
||||
*/
|
||||
async function openLineOverflowMenu(wrapper: { get: (selector: string) => { trigger: (event: string) => Promise<void> } }, lineId: number | string) {
|
||||
await wrapper.get(`[data-testid="review-fulfillment-line-more-${lineId}"]`).trigger('click');
|
||||
await nextTick();
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言行级菜单项已渲染并触发点击。
|
||||
* 核心逻辑:菜单经 Teleport 渲染到 body,必须走 document.body 查询而不是 wrapper.find;
|
||||
* 点击后 flushPromises 等待菜单收起与异步动作(下载/门禁提交)落位。
|
||||
*/
|
||||
async function clickLineMenuItem(lineId: number | string, action: string) {
|
||||
const item = document.body.querySelector(`[data-testid="review-fulfillment-line-action-${action}-${lineId}"]`) as HTMLButtonElement | null;
|
||||
expect(item, `行级菜单项 ${action}-${lineId} 应已渲染`).toBeTruthy();
|
||||
item!.click();
|
||||
await flushPromises();
|
||||
}
|
||||
|
||||
/** 将共享 Case fixture 恢复为可编辑草稿,避免跨用例污染确认恢复态。 */
|
||||
function resetActiveCaseFixture() {
|
||||
activeCase.value = createActiveCaseFixture();
|
||||
@@ -2677,16 +2720,17 @@ describe('ShippingOrderReviewView layout phase 1', () => {
|
||||
expect(workspace.text()).toContain('PN-FROZEN');
|
||||
expect(workspace.text()).toContain('DBS');
|
||||
expect(wrapper.find('[data-testid="review-fulfillment-frozen-order"]').exists()).toBe(false);
|
||||
expect(wrapper.get('[data-testid="review-fulfillment-line-download-1001"]').attributes('title'))
|
||||
.toBeTruthy();
|
||||
expect(wrapper.get('[data-testid="review-fulfillment-line-retry-preparation-1001"]').attributes('title'))
|
||||
.toBeTruthy();
|
||||
expect(wrapper.get('[data-testid="review-fulfillment-line-retry-matching-1001"]').exists()).toBe(true);
|
||||
expect(wrapper.get('[data-testid="review-fulfillment-line-release-1001"]').exists()).toBe(true);
|
||||
// 展示态行级动作收纳进更多菜单(⋯):逐项断言授权动作入口存在,不再有常显按钮。
|
||||
await openLineOverflowMenu(wrapper, 1001);
|
||||
expect(document.body.querySelector('[data-testid="review-fulfillment-line-action-download_inventory_file-1001"]')).toBeTruthy();
|
||||
expect(document.body.querySelector('[data-testid="review-fulfillment-line-action-retry_inventory_preparation-1001"]')).toBeTruthy();
|
||||
expect(document.body.querySelector('[data-testid="review-fulfillment-line-action-retry_inventory_matching-1001"]')).toBeTruthy();
|
||||
expect(document.body.querySelector('[data-testid="review-fulfillment-line-action-release_inventory_shortage-1001"]')).toBeTruthy();
|
||||
expect(workspace.text()).toContain('库存不足');
|
||||
await wrapper.get('[data-testid="review-fulfillment-line-download-1001"]').trigger('click');
|
||||
await clickLineMenuItem(1001, 'download_inventory_file');
|
||||
expect(downloadWorkspaceShippingLineInventoryFileMock).toHaveBeenCalledWith('SN-FROZEN', 'SIF-LINE-DBS');
|
||||
await wrapper.get('[data-testid="review-fulfillment-line-retry-preparation-1001"]').trigger('click');
|
||||
await openLineOverflowMenu(wrapper, 1001);
|
||||
await clickLineMenuItem(1001, 'retry_inventory_preparation');
|
||||
expect(submitProcessGatePrimaryActionMock).toHaveBeenCalledWith(
|
||||
expect.any(Object),
|
||||
expect.objectContaining({
|
||||
@@ -2696,7 +2740,8 @@ describe('ShippingOrderReviewView layout phase 1', () => {
|
||||
);
|
||||
// Gate 恢复受理后立即启动五阶段轮询,不依赖浏览器手动刷新。
|
||||
expect(startWorkflowProgressPollingMock).toHaveBeenCalledTimes(1);
|
||||
await wrapper.get('[data-testid="review-fulfillment-line-release-1001"]').trigger('click');
|
||||
await openLineOverflowMenu(wrapper, 1001);
|
||||
await clickLineMenuItem(1001, 'release_inventory_shortage');
|
||||
expect(wrapper.get('[data-testid="review-release-inventory-dialog"]').text()).toContain('ODM ID');
|
||||
expect(wrapper.get('[data-testid="review-release-inventory-dialog"]').text()).toContain('ODM-001');
|
||||
const dialog = wrapper.get('[data-testid="review-release-inventory-dialog"]');
|
||||
@@ -2763,11 +2808,11 @@ describe('ShippingOrderReviewView layout phase 1', () => {
|
||||
|
||||
const wrapper = await mountView({ lifecycle_stage: 'fulfillment_prep' });
|
||||
await flushPromises();
|
||||
await wrapper.get('[data-testid="review-fulfillment-line-release-1001"]').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 openLineOverflowMenu(wrapper, 1001);
|
||||
await clickLineMenuItem(1001, 'release_inventory_shortage');
|
||||
await wrapper.get('[data-testid="review-fulfillment-release-input-1001-102"]').setValue('A-01');
|
||||
await wrapper.get('[data-testid="review-fulfillment-release-confirm-1001"]').trigger('click');
|
||||
await new Promise<void>((resolve) => setTimeout(resolve, 0));
|
||||
await nextTick();
|
||||
|
||||
@@ -2823,11 +2868,10 @@ describe('ShippingOrderReviewView layout phase 1', () => {
|
||||
|
||||
const wrapper = await mountView({ lifecycle_stage: 'fulfillment_prep' });
|
||||
await flushPromises();
|
||||
await wrapper.get('[data-testid="review-fulfillment-line-release-1002"]').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 openLineOverflowMenu(wrapper, 1002);
|
||||
await clickLineMenuItem(1002, 'release_inventory_shortage');
|
||||
await wrapper.get('[data-testid="review-fulfillment-release-input-1002-102"]').setValue('A-01');
|
||||
await wrapper.get('[data-testid="review-fulfillment-release-confirm-1002"]').trigger('click');
|
||||
await new Promise<void>((resolve) => setTimeout(resolve, 0));
|
||||
await nextTick();
|
||||
|
||||
@@ -2899,11 +2943,10 @@ describe('ShippingOrderReviewView layout phase 1', () => {
|
||||
});
|
||||
|
||||
const wrapper = await mountView({ lifecycle_stage: 'fulfillment_prep' });
|
||||
await wrapper.get('[data-testid="review-fulfillment-line-release-1003"]').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 openLineOverflowMenu(wrapper, 1003);
|
||||
await clickLineMenuItem(1003, 'release_inventory_shortage');
|
||||
await wrapper.get('[data-testid="review-fulfillment-release-input-1003-102"]').setValue('A-01');
|
||||
await wrapper.get('[data-testid="review-fulfillment-release-confirm-1003"]').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));
|
||||
|
||||
@@ -449,7 +449,18 @@ const isLifecycleFreightUpload = computed(() => lifecycleActiveStageCode.value =
|
||||
const isLifecycleUploadComplete = computed(() => lifecycleActiveStageCode.value === 'upload_complete');
|
||||
/** 正式任务已通知完成时,即使用户回看前置阶段也只能查看,不能再修改已产出通知。 */
|
||||
const isCompletedFormalTask = computed(() => lifecycleCurrentStageCode.value === 'upload_complete');
|
||||
const isReviewContentReadOnly = computed(() => isReadOnly.value || isCompletedFormalTask.value);
|
||||
/**
|
||||
* STP 自动建单进行中(等待入队/排队/执行):与 isProcessingAutomating 的 STP 分支同源。
|
||||
* 期间表单只读——后端 `_locked_case` 同步拒绝内容写入(REVIEW_DRAFT_LOCKED_BY_AUTOMATION),
|
||||
* 前端不再展示可编辑假象,避免用户误以为修改已生效。
|
||||
*/
|
||||
const isStpAutoCreateInProgress = computed(() => {
|
||||
const stpStatus = String(activeCase.value?.automation?.status || '').trim().toLowerCase();
|
||||
return !hasFormalOt.value && ['waiting_to_start', 'queued', 'running'].includes(stpStatus);
|
||||
});
|
||||
const isReviewContentReadOnly = computed(() => (
|
||||
isReadOnly.value || isCompletedFormalTask.value || isStpAutoCreateInProgress.value
|
||||
));
|
||||
|
||||
/** 二期编辑窗(D10):读正式任务 ui_state.edit_window;前端 fail-closed,锁定字段禁用/提示。 */
|
||||
const formalEditWindow = computed(() => formalTaskDetail.value?.ui_state?.edit_window ?? null);
|
||||
@@ -5319,7 +5330,7 @@ watch(
|
||||
<div class="overflow-x-auto overscroll-x-contain" data-testid="review-fulfillment-prep-table-scroll">
|
||||
<table class="review-fulfillment-prep-table min-w-[1060px] text-xs">
|
||||
<thead class="border-b border-default bg-surface-muted/50 text-left"><tr><th v-if="preparationEditable" class="w-10 px-3 py-2"><input type="checkbox" class="rounded border-default" :checked="allPreparationWaveSelected" :disabled="!preparationWaveSelectableLines.length || preparationWaveBusy" :aria-label="t('chat.shippingOrderReview.fulfillmentDecision.selectReady')" @change="toggleAllPreparationLineSelection(($event.target as HTMLInputElement).checked)"></th><th v-if="preparationCustomerPoLineVisible" class="whitespace-nowrap px-3 py-2">{{ preparationCustomerPoLineLabel() }}</th><th class="whitespace-nowrap px-3 py-2">{{ t('chat.shippingOrderReview.workbench.resultReservation') }}</th><th class="px-3 py-2">{{ t('chat.shippingOrderReview.workbench.resultPartNumber') }}</th><th class="whitespace-nowrap px-3 py-2">{{ t('chat.shippingOrderReview.lifecycle.prepare.requiredQty') }}</th><th class="px-3 py-2">{{ t('chat.shippingOrderReview.lifecycle.prepare.inventorySource') }}</th><th v-if="formalPreparationOdmColumnVisible" class="whitespace-nowrap px-3 py-2">{{ t('chat.shippingOrderReview.odmConflict.column') }}</th><th class="whitespace-nowrap px-3 py-2">{{ t('chat.shippingOrderReview.fulfillmentDecision.availableQty') }}</th><th class="whitespace-nowrap px-3 py-2">{{ t('chat.shippingOrderReview.fulfillmentDecision.shortage') }}</th><th class="whitespace-nowrap px-3 py-2">{{ t('chat.shippingOrderReview.lifecycle.prepare.lineStatus') }}</th><th class="review-fulfillment-sticky-action-head whitespace-nowrap px-3 py-2">{{ t('chat.shippingOrderReview.lineOps.moreActions') }}</th></tr></thead>
|
||||
<tbody><template v-for="(line, lineIndex) in formalPreparationDisplayLines" :key="line.snapshot_line_id || `${line.reservation_id}-${line.part_number}`"><tr :class="Number(line.shortage_qty || 0) > 0 ? 'border-b border-amber-100 bg-amber-50/40 last:border-0 dark:border-amber-950 dark:bg-amber-950/10' : 'border-b border-default last:border-0'"><td v-if="preparationEditable" class="w-10 px-3 py-2"><input type="checkbox" class="rounded border-default" :checked="selectedPreparationSnapshotLineIds.includes(String(line.snapshot_line_id))" :disabled="preparationWaveBusy || !preparationWaveSelectableLines.some((item) => String(item.snapshot_line_id) === String(line.snapshot_line_id))" :aria-label="`${t('chat.shippingOrderReview.fulfillmentDecision.selectReady')}: ${preparationLineCustomerPoLine(line)}`" :data-testid="`review-fulfillment-line-select-${line.snapshot_line_id || lineIndex}`" @change="togglePreparationLineSelection(String(line.snapshot_line_id || lineIndex), ($event.target as HTMLInputElement).checked)"></td><td v-if="preparationCustomerPoLineVisible" class="whitespace-nowrap px-3 py-2">{{ preparationLineCustomerPoLine(line) }}</td><td class="whitespace-nowrap px-3 py-2 font-medium text-primary"><template v-if="editingLine && isInlineEditing(line)"><input v-model="editingLine.reservation_id" type="text" class="w-28 rounded border border-default bg-surface px-1.5 py-1 text-xs" :disabled="inlineEditSaving" :aria-label="t('chat.shippingOrderReview.workbench.resultReservation')" :data-testid="`review-fulfillment-line-edit-reservation-${line.snapshot_line_id}`" @keyup.enter="saveInlineEdit(line)" @keyup.esc="cancelInlineEdit" /></template><span v-else>{{ line.reservation_id || '—' }}</span></td><td class="max-w-[220px] px-3 py-2"><template v-if="editingLine && isInlineEditing(line)"><input v-model="editingLine.part_number" type="text" class="w-full min-w-0 rounded border border-default bg-surface px-1.5 py-1 text-xs" :disabled="inlineEditSaving" :aria-label="t('chat.shippingOrderReview.workbench.resultPartNumber')" :data-testid="`review-fulfillment-line-edit-part-${line.snapshot_line_id}`" @keyup.enter="saveInlineEdit(line)" @keyup.esc="cancelInlineEdit" /></template><span v-else class="block max-w-[220px] truncate" :title="line.part_number || '—'">{{ line.part_number || '—' }}</span></td><td class="whitespace-nowrap px-3 py-2"><template v-if="editingLine && isInlineEditing(line)"><input :value="editingLine.required_qty" type="number" min="0" step="any" class="w-20 rounded border border-default bg-surface px-1.5 py-1 text-xs" :disabled="inlineEditSaving" :aria-label="t('chat.shippingOrderReview.lifecycle.prepare.requiredQty')" :data-testid="`review-fulfillment-line-edit-qty-${line.snapshot_line_id}`" @input="updateInlineEditQty(($event.target as HTMLInputElement).value)" @keyup.enter="saveInlineEdit(line)" @keyup.esc="cancelInlineEdit" /></template><span v-else>{{ line.required_qty ?? '—' }}</span></td><td class="max-w-[220px] px-3 py-2"><template v-if="isInlineEditing(line) && inlineSourceOptions(line).length"><select class="w-full min-w-0 rounded border border-default bg-surface px-1.5 py-1 text-xs" :data-testid="`review-fulfillment-line-edit-source-${line.snapshot_line_id}`" :aria-label="t('chat.shippingOrderReview.lifecycle.prepare.selectSource')" :value="editingLine?.source_code" :disabled="inlineEditSaving" @change="updateInlineEditSource(($event.target as HTMLSelectElement).value)"><option v-for="option in inlineSourceOptions(line)" :key="option.value" :value="option.value">{{ option.label }}</option></select></template><span v-else class="block max-w-[220px] truncate" :title="formalPreparationLineSource(line)">{{ formalPreparationLineSource(line) || '—' }}</span></td><td v-if="formalPreparationOdmColumnVisible" class="whitespace-nowrap px-3 py-2"><div v-if="(line.odm_values?.length || 0) > 1 && !formalPreparationSourceLocked" class="flex items-center gap-1" :data-testid="`review-line-odm-${line.snapshot_line_id || lineIndex}`"><select class="min-w-0 flex-1 rounded border border-default bg-surface px-1.5 py-1 text-xs" :data-testid="`review-line-odm-select-${line.snapshot_line_id || lineIndex}`" :aria-label="t('chat.shippingOrderReview.odmConflict.title')" :value="lineOdmSelections[String(line.snapshot_line_id || lineIndex)] || line.chosen_odm_id || ''" @change="lineOdmSelections[String(line.snapshot_line_id || lineIndex)] = ($event.target as HTMLSelectElement).value"><option value="" disabled>{{ t('chat.shippingOrderReview.odmConflict.placeholder') }}</option><option v-for="value in line.odm_values" :key="value" :value="value">{{ value }}</option></select><button type="button" class="rounded bg-brand-600 px-2 py-1 text-xs font-medium text-white disabled:opacity-50" :data-testid="`review-line-odm-confirm-${line.snapshot_line_id || lineIndex}`" :disabled="!lineOdmSelections[String(line.snapshot_line_id || lineIndex)] || lineOdmBusy" :aria-label="t('chat.shippingOrderReLine truncated
|
||||
<tbody><template v-for="(line, lineIndex) in formalPreparationDisplayLines" :key="line.snapshot_line_id || `${line.reservation_id}-${line.part_number}`"><tr :class="Number(line.shortage_qty || 0) > 0 ? 'border-b border-amber-100 bg-amber-50/40 last:border-0 dark:border-amber-950 dark:bg-amber-950/10' : 'border-b border-default last:border-0'"><td v-if="preparationEditable" class="w-10 px-3 py-2"><input type="checkbox" class="rounded border-default" :checked="selectedPreparationSnapshotLineIds.includes(String(line.snapshot_line_id))" :disabled="preparationWaveBusy || !preparationWaveSelectableLines.some((item) => String(item.snapshot_line_id) === String(line.snapshot_line_id))" :aria-label="`${t('chat.shippingOrderReview.fulfillmentDecision.selectReady')}: ${preparationLineCustomerPoLine(line)}`" :data-testid="`review-fulfillment-line-select-${line.snapshot_line_id || lineIndex}`" @change="togglePreparationLineSelection(String(line.snapshot_line_id || lineIndex), ($event.target as HTMLInputElement).checked)"></td><td v-if="preparationCustomerPoLineVisible" class="whitespace-nowrap px-3 py-2">{{ preparationLineCustomerPoLine(line) }}</td><td class="whitespace-nowrap px-3 py-2 font-medium text-primary"><template v-if="editingLine && isInlineEditing(line)"><input v-model="editingLine.reservation_id" type="text" class="w-28 rounded border border-default bg-surface px-1.5 py-1 text-xs" :disabled="inlineEditSaving" :aria-label="t('chat.shippingOrderReview.workbench.resultReservation')" :data-testid="`review-fulfillment-line-edit-reservation-${line.snapshot_line_id}`" @keyup.enter="saveInlineEdit(line)" @keyup.esc="cancelInlineEdit" /></template><span v-else>{{ line.reservation_id || '—' }}</span></td><td class="max-w-[220px] px-3 py-2"><template v-if="editingLine && isInlineEditing(line)"><input v-model="editingLine.part_number" type="text" class="w-full min-w-0 rounded border border-default bg-surface px-1.5 py-1 text-xs" :disabled="inlineEditSaving" :aria-label="t('chat.shippingOrderReview.workbench.resultPartNumber')" :data-testid="`review-fulfillment-line-edit-part-${line.snapshot_line_id}`" @keyup.enter="saveInlineEdit(line)" @keyup.esc="cancelInlineEdit" /></template><span v-else class="block max-w-[220px] truncate" :title="line.part_number || '—'">{{ line.part_number || '—' }}</span></td><td class="whitespace-nowrap px-3 py-2"><template v-if="editingLine && isInlineEditing(line)"><input :value="editingLine.required_qty" type="number" min="0" step="any" class="w-20 rounded border border-default bg-surface px-1.5 py-1 text-xs" :disabled="inlineEditSaving" :aria-label="t('chat.shippingOrderReview.lifecycle.prepare.requiredQty')" :data-testid="`review-fulfillment-line-edit-qty-${line.snapshot_line_id}`" @input="updateInlineEditQty(($event.target as HTMLInputElement).value)" @keyup.enter="saveInlineEdit(line)" @keyup.esc="cancelInlineEdit" /></template><span v-else>{{ line.required_qty ?? '—' }}</span></td><td class="max-w-[220px] px-3 py-2"><template v-if="isInlineEditing(line) && inlineSourceOptions(line).length"><select class="w-full min-w-0 rounded border border-default bg-surface px-1.5 py-1 text-xs" :data-testid="`review-fulfillment-line-edit-source-${line.snapshot_line_id}`" :aria-label="t('chat.shippingOrderReview.lifecycle.prepare.selectSource')" :value="editingLine?.source_code" :disabled="inlineEditSaving" @change="updateInlineEditSource(($event.target as HTMLSelectElement).value)"><option v-for="option in inlineSourceOptions(line)" :key="option.value" :value="option.value">{{ option.label }}</option></select></template><span v-else class="block max-w-[220px] truncate" :title="formalPreparationLineSource(line)">{{ formalPreparationLineSource(line) || '—' }}</span></td><td v-if="formalPreparationOdmColumnVisible" class="whitespace-nowrap px-3 py-2"><div v-if="(line.odm_values?.length || 0) > 1 && !formalPreparationSourceLocked" class="flex items-center gap-1" :data-testid="`review-line-odm-${line.snapshot_line_id || lineIndex}`"><select class="min-w-0 flex-1 rounded border border-default bg-surface px-1.5 py-1 text-xs" :data-testid="`review-line-odm-select-${line.snapshot_line_id || lineIndex}`" :aria-label="t('chat.shippingOrderReview.odmConflict.title')" :value="lineOdmSelections[String(line.snapshot_line_id || lineIndex)] || line.chosen_odm_id || ''" @change="lineOdmSelections[String(line.snapshot_line_id || lineIndex)] = ($event.target as HTMLSelectElement).value"><option value="" disabled>{{ t('chat.shippingOrderReview.odmConflict.placeholder') }}</option><option v-for="value in line.odm_values" :key="value" :value="value">{{ value }}</option></select><button type="button" class="rounded bg-brand-600 px-2 py-1 text-xs font-medium text-white disabled:opacity-50" :data-testid="`review-line-odm-confirm-${line.snapshot_line_id || lineIndex}`" :disabled="!lineOdmSelections[String(line.snapshot_line_id || lineIndex)] || lineOdmBusy" :aria-label="t('chat.shippingOrderReLine truncated
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -6143,6 +6154,8 @@ watch(
|
||||
@adjudicate="({ suggestion, body }) => decideSuggestion(suggestion.suggestion_no, body)"
|
||||
/>
|
||||
|
||||
<!-- 底栏只读不含 STP 运行锁(isStpAutoCreateInProgress):运行态已由 automating 单独承载
|
||||
(隐藏全部写按钮并显示运行提示);叠加会让 footer 整体隐藏,运行提示永远不可见。 -->
|
||||
<ReviewWorkbenchFooter
|
||||
v-if="showOrderReviewEditor || isLifecycleIntakeParse"
|
||||
:available-actions="availableActions"
|
||||
@@ -6152,7 +6165,7 @@ watch(
|
||||
:show-stp-retry="showObjectRetryOnFooter"
|
||||
:auto-gate-hint="t(autoGateHintKey)"
|
||||
:saving="saving"
|
||||
:is-read-only="isReviewContentReadOnly"
|
||||
:is-read-only="isReadOnly || isCompletedFormalTask"
|
||||
:has-draft="Boolean(displayCase?.draft) || isLifecycleIntakeParse"
|
||||
:unsaved-count="unsavedEditCount"
|
||||
:flow-presentation="flowPresentation"
|
||||
|
||||
Reference in new issue
Block a user