fix(admin): unify inbound fee refresh controls

This commit is contained in:
2026-09-15 18:16:09 +08:00
parent ccc72be4b9
commit 55576a7c84
6 changed files with 36 additions and 9 deletions
@@ -182,6 +182,7 @@ describe('InboundFeeDetailManager', () => {
})
it('spins only the refresh icon while fee rows are loading', () => {
expect(source).toContain('class="fee-refresh-button" circle aria-label="刷新费用明细"')
expect(source).toContain(':aria-busy="loading" :disabled="loading"')
expect(source).toContain(`<RefreshCw :size="16" :class="{ 'is-spinning': loading }" />`)
expect(source).not.toMatch(/aria-label="刷新费用明细"[^>]*:loading=/)
@@ -276,7 +276,7 @@ onMounted(() => void load())
<div class="fee-toolbar">
<span>共 {{ rows.length }} 条应收应付费用明细</span>
<div>
<el-tooltip content="刷新费用明细" placement="top"><el-button circle aria-label="刷新费用明细" :aria-busy="loading" :disabled="loading" @click="load"><RefreshCw :size="16" :class="{ 'is-spinning': loading }" /></el-button></el-tooltip>
<el-tooltip content="刷新费用明细" placement="top"><el-button class="fee-refresh-button" circle aria-label="刷新费用明细" :aria-busy="loading" :disabled="loading" @click="load"><RefreshCw :size="16" :class="{ 'is-spinning': loading }" /></el-button></el-tooltip>
<el-button v-if="access.can('firstleg:inbound:fee-detail:edit') && canViewFeeItems" type="primary" @click="openEditor('create')"><Plus :size="16" />新增费用</el-button>
</div>
</div>
@@ -365,7 +365,7 @@ onMounted(() => void load())
.fee-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--admin-space-5); color: var(--el-text-color-secondary); font-size: var(--admin-font-body); }
.fee-toolbar > div { display: flex; flex-wrap: wrap; gap: var(--admin-space-3); }
.fee-toolbar :deep(.el-button + .el-button) { margin-left: 0; }
.fee-toolbar .is-spinning { animation: fee-refresh-spin 0.8s linear infinite; }
.fee-refresh-button .is-spinning { animation: fee-refresh-spin 0.8s linear infinite; }
.fee-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--admin-space-6); margin-top: var(--admin-space-5); }
.fee-form :deep(.el-select), .fee-form :deep(.el-date-editor), .fee-form :deep(.el-input-number) { width: 100%; }
.fee-form :deep(.el-form-item:last-child) { grid-column: 1 / -1; }
@@ -602,7 +602,7 @@ describe('UnifiedOrdersView contract', () => {
expect(source).toContain('display-only')
expect(source).toContain(':key="`fee-${normalizedInboundId}-${feePanelRevision}`"')
expect(source).toContain('feePanelRevision.value += 1')
expect(source).toContain('头程自动初算')
expect(source).not.toContain('<h3 class="fee-section-title">头程自动初算</h3>')
expect(source).toContain('其他费用明细')
expect(source).toContain('@changed="loadDetail(true)"')
expect(source).toContain('firstLegTransportModeLabel(detail.order.order?.transportMode)')
@@ -2387,7 +2387,6 @@ onBeforeUnmount(() => {
<div><dt>对客费用合计</dt><dd>{{ feeMoney(customerFeeTotal) }}</dd><small>已发布头程费用 + 已审核其他应收</small></div>
<div><dt>已审核其他应付</dt><dd>{{ feeMoney(otherFeeSummary.approvedPayable) }}</dd><small>单列展示,不计入对客费用</small></div>
</dl>
<h3 class="fee-section-title">头程自动初算</h3>
<InboundFeePanel
:key="`fee-${normalizedInboundId}-${feePanelRevision}`"
:customer-id="String(detail.summary.tenantId)"