diff --git a/src/modules/first-leg/views/FirstLegOrdersView.test.mjs b/src/modules/first-leg/views/FirstLegOrdersView.test.mjs index 99b3632..351c9c9 100644 --- a/src/modules/first-leg/views/FirstLegOrdersView.test.mjs +++ b/src/modules/first-leg/views/FirstLegOrdersView.test.mjs @@ -493,6 +493,7 @@ test('loads merchant inbound billing as an isolated read-only detail section', ( assert.match(source, /error instanceof ApiError && error\.code === 'A0404'/) assert.match(source, /error\.message \|\| unavailableMessage/) assert.match(source, /order\.status === 'DRAFT'/) + assert.match(source, /feeConfirmationOpen\.value[\s\S]*\? '未推送计费重'[\s\S]*: '订单提交后可查看入库结果'/) assert.match(source, /订单提交后可查看入库结果/) assert.doesNotMatch(source, /confirmMerchantInbound|adjustMerchantInbound|sendMerchantInbound/) }) @@ -511,6 +512,13 @@ test('opens billing-weight confirmation independently from order details', () => assert.match(source, /unavailable-message="未推送计费重"/) }) +test('shows the standalone billing-weight entry at every order node', () => { + const templateSource = source.slice(source.indexOf('')) + const entries = templateSource.match(/确认计费重<\/el-button>/g) ?? [] + assert.equal(entries.length, 2) + assert.doesNotMatch(templateSource, /v-if="[^"]*status === 'WAIT_SPLIT'[^"]*"[^>]*>确认计费重/) +}) + test('discards stale inbound billing responses when billing views close or the user changes orders', () => { assert.match(source, /let inboundBillingRequestSequence = 0/) assert.match(source, /const sequence = \+\+inboundBillingRequestSequence/) diff --git a/src/modules/first-leg/views/FirstLegOrdersView.vue b/src/modules/first-leg/views/FirstLegOrdersView.vue index 02b1f9d..8037391 100644 --- a/src/modules/first-leg/views/FirstLegOrdersView.vue +++ b/src/modules/first-leg/views/FirstLegOrdersView.vue @@ -1259,7 +1259,9 @@ async function loadInboundBilling(order: FirstLegOrder, unavailableMessage = ' if (order.status === 'DRAFT') { inboundBillingUnavailable.value = true - inboundBillingUnavailableMessage.value = '订单提交后可查看入库结果' + inboundBillingUnavailableMessage.value = feeConfirmationOpen.value + ? '未推送计费重' + : '订单提交后可查看入库结果' return } @@ -1798,7 +1800,7 @@ async function searchOrders(model: QueryModel) {