优化
This commit is contained in:
@@ -115,6 +115,13 @@ describe('InboundFeeDetailManager', () => {
|
||||
expect(source).toContain('<el-table :data="rows" border stripe')
|
||||
})
|
||||
|
||||
it('spins only the refresh icon while fee rows are loading', () => {
|
||||
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=/)
|
||||
expect(source).toContain('@keyframes fee-refresh-spin')
|
||||
})
|
||||
|
||||
it('loads RECEIVABLE fee items without requesting counterparties', async () => {
|
||||
const wrapper = mountManager(['firstleg:inbound:fee-detail:view', 'firstleg:inbound:fee-detail:edit', 'firstleg:fee-item:view'])
|
||||
await flushPromises()
|
||||
|
||||
@@ -182,7 +182,7 @@ onMounted(() => void load())
|
||||
<div class="fee-toolbar">
|
||||
<span>共 {{ rows.length }} 条应收应付费用明细</span>
|
||||
<div>
|
||||
<el-tooltip content="刷新费用明细" placement="top"><el-button circle aria-label="刷新费用明细" :loading="loading" @click="load"><RefreshCw :size="16" /></el-button></el-tooltip>
|
||||
<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-button v-if="access.can('firstleg:inbound:fee-detail:edit') && canViewFeeItems" type="primary" @click="openEditor('create')"><Plus :size="16" />新增费用</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -255,10 +255,12 @@ onMounted(() => void load())
|
||||
.fee-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--el-text-color-secondary); font-size: 13px; }
|
||||
.fee-toolbar > div { display: flex; flex-wrap: wrap; gap: 8px; }
|
||||
.fee-toolbar :deep(.el-button + .el-button) { margin-left: 0; }
|
||||
.fee-toolbar .is-spinning { animation: fee-refresh-spin 0.8s linear infinite; }
|
||||
.fee-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin-top: 14px; }
|
||||
.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; }
|
||||
.fee-table-shell { min-width: 0; max-width: 100%; overflow: hidden; }
|
||||
.fee-table-shell :deep(.el-table) { width: 100%; max-width: 100%; }
|
||||
@keyframes fee-refresh-spin { to { transform: rotate(360deg); } }
|
||||
@media (max-width: 720px) { .fee-toolbar { align-items: flex-start; flex-direction: column; } .fee-form { grid-template-columns: 1fr; } .fee-form :deep(.el-form-item:last-child) { grid-column: auto; } }
|
||||
</style>
|
||||
|
||||
@@ -286,6 +286,9 @@ describe('UnifiedOrdersView contract', () => {
|
||||
expect(source).not.toContain("partyValue(detail.order.parties, 'CONSIGNEE'")
|
||||
expect(source).toContain("cargoTotal(detail.order.cargoes, 'netWeightKg')")
|
||||
expect(source).toContain('InboundFeeDetailManager')
|
||||
expect(source).toContain('InboundFeePanel')
|
||||
expect(source).toContain(':customer-id="String(detail.summary.tenantId)"')
|
||||
expect(source).toContain('费用明细与审核')
|
||||
expect(source).toContain('@changed="loadDetail(true)"')
|
||||
expect(source).toContain('firstLegTransportModeLabel(detail.order.order?.transportMode)')
|
||||
expect(source).toContain('firstLegPickupMethodLabel(detail.order.order?.pickupMethod)')
|
||||
|
||||
@@ -51,6 +51,7 @@ import {
|
||||
import {
|
||||
downloadWeightImage,
|
||||
getInboundMeasurement,
|
||||
InboundFeePanel,
|
||||
InboundMeasurementDialog,
|
||||
MeasurementEvidenceThumbnail,
|
||||
type InboundMeasurementDetail,
|
||||
@@ -977,6 +978,12 @@ onBeforeUnmount(() => {
|
||||
|
||||
<template v-else-if="activeDetailTab === 'fees'">
|
||||
<div class="panel-title"><div><h2>费用信息</h2><p>维护运单与入库单应收应付费用</p></div><WalletCards :size="19" /></div>
|
||||
<InboundFeePanel
|
||||
:customer-id="String(detail.summary.tenantId)"
|
||||
:inbound-id="String(detail.summary.inboundId)"
|
||||
@changed="loadDetail(true)"
|
||||
/>
|
||||
<el-divider content-position="left">费用明细与审核</el-divider>
|
||||
<InboundFeeDetailManager
|
||||
:account-id="String(detail.summary.tenantId)"
|
||||
:inbound-id="String(detail.summary.inboundId)"
|
||||
|
||||
Reference in New Issue
Block a user