fix(shipping-notice): 修复发货单审核视图重试逻辑及RPA回调缺仓库的处理

This commit is contained in:
hugo committed 2026-08-17 21:24:04 +08:00
1 parent fac960aa16
commit d7b9b9c5ff
4 files changed
+154 -8

No files matched your search

@@ -1978,6 +1978,40 @@ describe('ShippingOrderReviewView audit and progress recovery', () => {
expect(retryWorkspaceShippingTask).toHaveBeenCalledWith('SN-OT-FAIL-1');
}, 15000);
it('disables the formal Gate retry while inventory preparation is waiting for RPA callback', async () => {
// 关键断言:Gate 仍为 blocked_retryable 时,PreparationAttempt 的等待事实优先禁用重试。
activeCase.value = {
...activeCase.value,
status: 'confirmed',
has_formal_ot: true,
confirmed_task_id: 43,
confirmed_task_no: 'SN-OT-WAITING-INVENTORY',
automation: { status: 'failed', retryable: true, can_auto_create: false, can_build: true },
};
shippingProcessingProjection.value = {
shippingNoticeNo: 'SN-OT-WAITING-INVENTORY',
retryable: true,
userStatus: 'retryable',
primaryAction: { code: 'retry_inventory_preparation' },
currentGate: { status: 'blocked_retryable' },
inventoryPreparation: {
activeAttemptCount: 1,
gateAttemptActive: true,
pendingSources: ['CRANE'],
},
uiState: {
status: 'retryable',
primary_action: { code: 'retry_inventory_preparation' },
secondary_actions: [],
},
};
const wrapper = await mountView();
await flushPromises();
expect(wrapper.get('[data-testid="review-current-task-primary-action"]').attributes('disabled')).toBeDefined();
}, 15000);
it('keeps top / wide / narrow stage labels identical via Progress projection (waiting_system_start)', async () => {
// 关键断言:Case.current_stage 故意降级为误导码;三处必须消费 Progress label_key 文案。
shippingProcessingProjection.value = {
@@ -3747,9 +3747,7 @@ watch(
:gate-status="currentTaskGateStatus"
:primary-action="currentTaskPrimaryAction"
:recovery-actions="currentTaskRecoveryActions"
:retrying="displayCase?.process_gate?.current_blocking_gate
? (progressRetrying || caseSwitchLoading)
: (taskRetryButtonDisabled || progressRetrying || caseSwitchLoading)"
:retrying="taskRetryButtonDisabled || progressRetrying || caseSwitchLoading"
:retry-exhausted-sources="taskInventoryExhaustedSources"
:loading="caseContentSkeleton"
@retry="() => void (hasFormalOt ? retryFormalOtAutoProgress() : retryStpAutoCreate())"
@@ -4343,9 +4341,7 @@ watch(
:gate-status="currentTaskGateStatus"
:primary-action="currentTaskPrimaryAction"
:recovery-actions="currentTaskRecoveryActions"
:retrying="displayCase?.process_gate?.current_blocking_gate
? (progressRetrying || caseSwitchLoading)
: (taskRetryButtonDisabled || progressRetrying || caseSwitchLoading)"
:retrying="taskRetryButtonDisabled || progressRetrying || caseSwitchLoading"
:retry-exhausted-sources="taskInventoryExhaustedSources"
:loading="caseContentSkeleton"
@retry="() => void (hasFormalOt ? retryFormalOtAutoProgress() : retryStpAutoCreate())"