diff --git a/src/modules/customers/pages/CustomerDetailView.test.ts b/src/modules/customers/pages/CustomerDetailView.test.ts index f8e10c08..cdc63615 100644 --- a/src/modules/customers/pages/CustomerDetailView.test.ts +++ b/src/modules/customers/pages/CustomerDetailView.test.ts @@ -109,7 +109,7 @@ describe('CustomerDetailView', () => { await flushPromises() expect([...document.querySelectorAll('.detail-tabs button')].map((button) => button.getAttribute('aria-label'))).toEqual([ - '基本信息', '业务概况', '运单记录', '财务账单', '计费规则', '操作日志', + '基本信息', '运单记录', '财务账单', '计费规则', '操作日志', ]) expect(document.body.textContent).not.toContain('累计运单') expect(document.body.textContent).not.toContain('累计应收') @@ -125,6 +125,7 @@ describe('CustomerDetailView', () => { await flushPromises() expect(document.body.textContent).toContain('BY20260807001') expect(document.body.textContent).toContain('海运整箱 FCL') + expect(document.body.textContent).not.toContain('暂无尺寸计算规则查看权限') expect(listPlatformFirstLegOrders).toHaveBeenCalledWith({ tenantId: tenant.id, page: 1, size: 10 }) const billingTab = document.querySelector('.detail-tabs button[aria-label="计费规则"]') diff --git a/src/modules/customers/pages/CustomerDetailView.vue b/src/modules/customers/pages/CustomerDetailView.vue index e7e0f166..28b500d3 100644 --- a/src/modules/customers/pages/CustomerDetailView.vue +++ b/src/modules/customers/pages/CustomerDetailView.vue @@ -2,7 +2,7 @@ import { computed, onBeforeUnmount, ref, watch } from 'vue' import { useRoute, useRouter } from 'vue-router' import { - ArrowLeft, BarChart3, Building2, Eye, + ArrowLeft, Building2, Eye, FileCheck2, FileText, Pencil, Power, Ship, UserRound, UsersRound, } from '@lucide/vue' @@ -39,7 +39,7 @@ import CustomerOverseasStorageFeePanel from '@/modules/customers/CustomerOversea import { CustomerStatementsPanel } from '@/modules/finance' import { CustomerAuditLogsPanel } from '@/modules/audit' -type DetailTab = 'basic' | 'business' | 'orders' | 'statements' | 'billing' | 'logs' +type DetailTab = 'basic' | 'orders' | 'statements' | 'billing' | 'logs' type PreviewState = { url: string; kind: 'image' | 'pdf'; loading: boolean; failed: boolean } const route = useRoute() @@ -72,7 +72,6 @@ const tabList = ref(null) const tabs: Array<{ key: DetailTab; label: string; icon: string }> = [ { key: 'basic', label: '基本信息', icon: '📋' }, - // { key: 'business', label: '业务概况', icon: '📊' }, { key: 'orders', label: '运单记录', icon: '📦' }, { key: 'statements', label: '财务账单', icon: '🧾' }, { key: 'billing', label: '计费规则', icon: '⚖️' }, @@ -391,11 +390,6 @@ watch(orderPage, (page, previousPage) => { - +
diff --git a/src/modules/finance/components/CustomerStatementsPanel.test.ts b/src/modules/finance/components/CustomerStatementsPanel.test.ts index 226094ec..de59c01a 100644 --- a/src/modules/finance/components/CustomerStatementsPanel.test.ts +++ b/src/modules/finance/components/CustomerStatementsPanel.test.ts @@ -1,4 +1,6 @@ import ElementPlus from 'element-plus' +import { readFileSync } from 'node:fs' +import { resolve } from 'node:path' import { createPinia, setActivePinia } from 'pinia' import { flushPromises, mount } from '@vue/test-utils' import { beforeEach, describe, expect, it, vi } from 'vitest' @@ -68,4 +70,10 @@ describe('CustomerStatementsPanel', () => { expect(getReconciliationStatement).toHaveBeenCalledWith('statement-1') expect(wrapper.text()).toContain('入库操作费') }) + + it('uses a small primary entity button for the embedded statement detail action', () => { + const source = readFileSync(resolve(process.cwd(), 'src/modules/finance/components/CustomerStatementsPanel.vue'), 'utf8') + expect(source).toContain(' props.customerId, () => { void load() }, { immediate: true })
暂无财务账单查看权限

请联系管理员开通客户对账单查看权限。

- + diff --git a/src/modules/finance/pages/FinanceCustomerAccountsView.test.ts b/src/modules/finance/pages/FinanceCustomerAccountsView.test.ts index 42dbd240..c575fcc2 100644 --- a/src/modules/finance/pages/FinanceCustomerAccountsView.test.ts +++ b/src/modules/finance/pages/FinanceCustomerAccountsView.test.ts @@ -90,6 +90,15 @@ describe('FinanceCustomerAccountsView delivery', () => { expect(page).not.toContain('max-width: 520px') }) + it('renders every account row operation as a small plain primary button with an icon', () => { + expect(page).toContain("{ key: 'actions', label: '操作', width: 160, fixed: 'left', slotName: 'actions' }") + expect(page).toContain('查看') + expect(page).toContain('账期') + expect(page).not.toMatch(/