This commit is contained in:
2026-09-03 10:46:14 +08:00
parent 12424281c7
commit 6780228f86
6 changed files with 145 additions and 13 deletions
@@ -198,7 +198,8 @@ const detailCargoPageSize = ref(5)
const inboundBilling = ref<MerchantInboundBilling | null>(null)
const inboundBillingLoading = ref(false)
const inboundBillingUnavailable = ref(false)
const inboundBillingUnavailableMessage = ref('入库及费用结果尚未发布')
const inboundBillingUnavailableMessage = ref('还未测量推送')
const openFeeDialogWithDetail = ref(false)
const inboundBillingError = ref('')
const customsByOrder = reactive<Record<string, MerchantCustomsContainer | null | undefined>>({})
const customsEligibilityPending = new Set<string>()
@@ -1192,7 +1193,8 @@ async function openEdit(order: FirstLegOrder) {
}
}
async function openDetail(order: FirstLegOrder) {
async function openDetail(order: FirstLegOrder, showFeeDialog = false) {
openFeeDialogWithDetail.value = showFeeDialog
detailId.value = order.id
detailCargoPage.value = 1
detailOpen.value = true
@@ -1211,6 +1213,10 @@ async function openDetail(order: FirstLegOrder) {
}
}
function openFeeConfirmation(order: FirstLegOrder) {
void openDetail(order, true)
}
async function retryDetail() {
const order = detailId.value ? store.getById(detailId.value) : undefined
if (order) await openDetail(order)
@@ -1221,7 +1227,7 @@ function resetInboundBillingState() {
inboundBilling.value = null
inboundBillingLoading.value = false
inboundBillingUnavailable.value = false
inboundBillingUnavailableMessage.value = '入库及费用结果尚未发布'
inboundBillingUnavailableMessage.value = '还未测量推送'
inboundBillingError.value = ''
}
@@ -1236,7 +1242,7 @@ async function loadInboundBilling(order: FirstLegOrder) {
inboundBilling.value = null
inboundBillingLoading.value = false
inboundBillingUnavailable.value = false
inboundBillingUnavailableMessage.value = '入库及费用结果尚未发布'
inboundBillingUnavailableMessage.value = '还未测量推送'
inboundBillingError.value = ''
if (order.status === 'DRAFT') {
@@ -1254,7 +1260,7 @@ async function loadInboundBilling(order: FirstLegOrder) {
if (!isCurrentInboundBillingRequest(sequence, order.id)) return
if (error instanceof ApiError && error.code === 'A0404') {
inboundBillingUnavailable.value = true
inboundBillingUnavailableMessage.value = error.message || '入库及费用结果尚未发布'
inboundBillingUnavailableMessage.value = error.message || '还未测量推送'
} else {
inboundBillingError.value = error instanceof Error ? error.message : '入库与费用加载失败'
}
@@ -1769,6 +1775,7 @@ async function searchOrders(model: QueryModel) {
<template #actions="{ row }">
<div class="order-row-actions">
<el-button link type="primary" @click="openDetail(row as FirstLegOrder)"><Eye :size="15" />详情</el-button>
<el-button v-if="(row as FirstLegOrder).status === 'WAIT_SPLIT'" link type="primary" @click="openFeeConfirmation(row as FirstLegOrder)">确认费用</el-button>
<el-button v-if="canEditOrder && canClientEditFirstLegOrder((row as FirstLegOrder).status)" link type="primary" :loading="openingEditor" @click="openEdit(row as FirstLegOrder)"><Pencil :size="15" />编辑</el-button>
<el-button v-if="eligibleCustomsDetail(row as FirstLegOrder)" link type="primary" @click="openCustomsDocuments(row as FirstLegOrder)"><FileText :size="15" />报关资料</el-button>
</div>
@@ -1834,6 +1841,7 @@ async function searchOrders(model: QueryModel) {
<span>更新于 {{ formatDateTime(order.updatedAt) }}</span>
<div>
<el-button link type="primary" @click="openDetail(order)"><Eye :size="15" />详情</el-button>
<el-button v-if="order.status === 'WAIT_SPLIT'" link type="primary" @click="openFeeConfirmation(order)">确认费用</el-button>
<el-button v-if="canEditOrder && canClientEditFirstLegOrder(order.status)" link type="primary" :loading="openingEditor" @click="openEdit(order)"><Pencil :size="15" />编辑</el-button>
<el-button v-if="eligibleCustomsDetail(order)" link type="primary" @click="openCustomsDocuments(order)"><FileText :size="15" />报关资料</el-button>
</div>
@@ -2135,6 +2143,7 @@ async function searchOrders(model: QueryModel) {
<OrderProgressPanel :order="detailOrder" />
<InboundBillingPanel
:data="inboundBilling"
:auto-open="openFeeDialogWithDetail"
:loading="inboundBillingLoading"
:unavailable="inboundBillingUnavailable"
:unavailable-message="inboundBillingUnavailableMessage"