From 855d8c0d5df41a77615e6646aae1d57dbed1590e Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Sun, 27 Sep 2026 20:48:19 +0800 Subject: [PATCH] fix(admin): create declaration batch after broker handoff --- .../components/ContainerCustomsPanel.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/modules/container-loading/components/ContainerCustomsPanel.vue b/src/modules/container-loading/components/ContainerCustomsPanel.vue index 8d78aff2..5de21e11 100644 --- a/src/modules/container-loading/components/ContainerCustomsPanel.vue +++ b/src/modules/container-loading/components/ContainerCustomsPanel.vue @@ -50,7 +50,6 @@ const missingInbounds = computed(() => customs.value?.inbounds.filter((item) => const missingCoverageCount = computed(() => Math.max(0, (customs.value?.taxRefundCount || 0) - (customs.value?.coveredTaxRefundCount || 0))) const allBuy = computed(() => customs.value?.hasActualCargo === true && customs.value.taxRefundCount === 0) const brokerSubmitted = computed(() => Boolean(customs.value?.brokerSubmittedAt)) -const latestDeclarationBatch = computed(() => declarationBatches.value[0] || null) const openDeclarationBatch = computed(() => declarationBatches.value.find((item) => ['READY', 'SUBMITTED', 'ACKNOWLEDGED', 'RESULT_PENDING'].includes(item.status)) || null) const statusText: Record = { WAITING_CUSTOMER_DOCUMENTS: '待客户补齐退税资料', READY_TO_START: '可开始报关', DECLARING: '报关中', COMPLETED: '报关已完成', @@ -89,8 +88,8 @@ function declarationStatusLabel(value: DeclarationBatch['status']) { } async function createFormalDeclaration() { - if (!customs.value || customs.value.status !== 'COMPLETED' || openDeclarationBatch.value) return - try { await ElMessageBox.confirm('当前柜的资料、回执和真实报关完税文件已完成,确认创建正式申报批次?', '创建正式申报批次', { customClass: 'admin-density-confirm', type: 'warning', confirmButtonText: '确认创建' }) } catch { return } + if (!customs.value || !['DECLARING', 'COMPLETED'].includes(customs.value.status) || !brokerSubmitted.value || openDeclarationBatch.value) return + try { await ElMessageBox.confirm('当前柜的资料、回执已确认并已发送报关行执行,确认创建正式申报批次?完税文件仍按报关行完成后回传。', '创建正式申报批次', { customClass: 'admin-density-confirm', type: 'warning', confirmButtonText: '确认创建' }) } catch { return } actionLoading.value = true; actionError.value = null try { await createDeclarationBatch(props.loadingPlanId, customs.value.version); await load(); ElMessage.success('正式申报批次已创建') } catch (error) { actionError.value = getApiErrorDetails(error, '正式申报批次创建失败') } @@ -274,8 +273,8 @@ onMounted(load) -
-

正式申报与海关结果

正式申报批次建立在退税资料、回执确认和真实完税文件完成之后,与船期和 PDA 节点独立。

创建正式申报批次
+
+

正式申报与海关结果

回执确认并发送报关行执行后建立正式申报批次;完税文件、船期和 PDA 节点保持独立。

创建正式申报批次