diff --git a/src/modules/finance/pages/FinanceCustomerAccountsView.test.ts b/src/modules/finance/pages/FinanceCustomerAccountsView.test.ts index e754c37e..71921b49 100644 --- a/src/modules/finance/pages/FinanceCustomerAccountsView.test.ts +++ b/src/modules/finance/pages/FinanceCustomerAccountsView.test.ts @@ -80,7 +80,8 @@ describe('FinanceCustomerAccountsView delivery', () => { const wrapper = mount(FinanceCustomerAccountsView, { global: { plugins: [pinia, ElementPlus, router] } }) await flushPromises() - expect(wrapper.text()).toContain('客户A · C-001') + expect(wrapper.text()).toContain('客户A') + expect(wrapper.text()).not.toContain('C-001') expect(listFinanceAccounts).toHaveBeenCalledWith({ page: 1, size: 200 }) expect(listFinanceAccountLedger).toHaveBeenCalledWith('10001', expect.objectContaining({ page: 1, size: 20 })) wrapper.unmount() diff --git a/src/modules/finance/pages/FinanceCustomerAccountsView.vue b/src/modules/finance/pages/FinanceCustomerAccountsView.vue index 7bb68076..a1459ba7 100644 --- a/src/modules/finance/pages/FinanceCustomerAccountsView.vue +++ b/src/modules/finance/pages/FinanceCustomerAccountsView.vue @@ -56,9 +56,6 @@ const queryFields = computed(() => [ const columns: DataTableColumn[] = [ { key: 'actions', label: '操作', width: 150, fixed: 'left', slotName: 'actions' }, { key: 'customerName', label: '客户', minWidth: 180, slotName: 'customerName' }, - { key: 'customerCode', label: '客户编号', width: 150 }, - { key: 'contactName', label: '联系人', width: 120 }, - { key: 'contactPhone', label: '联系电话', width: 140 }, { key: 'outstandingReceivable', label: '待收(CNY)', width: 130 }, { key: 'pendingBilling', label: '待开账(CNY)', width: 140 }, { key: 'receivedInPeriod', label: '本期已收(CNY)', width: 140 }, @@ -175,7 +172,7 @@ function downloadCsv(fileName: string, headers: string[], data: unknown[][]) { const url = URL.createObjectURL(new Blob([content], { type: 'text/csv;charset=utf-8' })) const link = document.createElement('a'); link.href = url; link.download = fileName; link.click(); URL.revokeObjectURL(url) } -function exportAccounts() { downloadCsv('客户账户.csv', columns.slice(1).map((item) => String(item.label)), rows.value.map((row) => [customerName(row.customerId, row.customerName), row.customerCode, row.contactName, row.contactPhone, row.outstandingReceivable, row.pendingBilling, row.receivedInPeriod, row.outstandingPayable, row.status, row.lastChangedAt])) } +function exportAccounts() { downloadCsv('客户账户.csv', columns.slice(1).map((item) => String(item.label)), rows.value.map((row) => [customerName(row.customerId, row.customerName), row.outstandingReceivable, row.pendingBilling, row.receivedInPeriod, row.outstandingPayable, row.status, row.lastChangedAt])) } function exportLedger() { downloadCsv(`${selected.value ? customerName(selected.value.customerId, selected.value.customerName) : '客户'}-账户流水.csv`, ledgerColumns.map((item) => String(item.label)), ledger.value.map((row) => [row.ledgerId, formatDateTime(row.occurredAt), ledgerBusinessType(row.businessType), row.documentNo, row.receivableChange, row.payableChange, row.outstandingReceivableAfter, displayOperator(row.operatorName), row.remark])) } async function closeDetail() { detailOpen.value = false; selected.value = null; editing.value = false; ledger.value = [] @@ -223,10 +220,10 @@ watch(() => [route.name, String(route.params.customerId || '')], ([name, custome -
返回客户账户

{{ editing ? '维护客户账期' : '客户账户详情' }}

{{ customerName(selected.customerId, selected.customerName) }} · {{ selected.customerCode }}

+
返回客户账户

{{ editing ? '维护客户账期' : '客户账户详情' }}

{{ customerName(selected.customerId, selected.customerName) }}

diff --git a/src/modules/finance/pages/FinanceCustomerArapView.vue b/src/modules/finance/pages/FinanceCustomerArapView.vue index 8aefe123..bda59063 100644 --- a/src/modules/finance/pages/FinanceCustomerArapView.vue +++ b/src/modules/finance/pages/FinanceCustomerArapView.vue @@ -243,7 +243,7 @@ watch(() => [route.name, String(route.params.feeSourceId || '')], ([name, feeSou
返回客户应收应付

费用来源详情

{{ selected?.documentNo || '费用来源' }} · {{ selected ? customerName(selected.customerId, selected.customerName) : '客户名称暂不可用' }}

审核参与结算
diff --git a/src/modules/finance/pages/FinanceCustomerStatementsView.test.ts b/src/modules/finance/pages/FinanceCustomerStatementsView.test.ts index 5b0c5e72..6515b5c7 100644 --- a/src/modules/finance/pages/FinanceCustomerStatementsView.test.ts +++ b/src/modules/finance/pages/FinanceCustomerStatementsView.test.ts @@ -74,8 +74,8 @@ describe('FinanceCustomerStatementsView', () => { expect(document.body.textContent).toContain('REC-501') expect(document.body.textContent).toContain('CONT-31') expect(document.body.textContent).toContain('IN-21') - expect(document.body.textContent).toContain('来源版本') - expect(document.body.textContent).toContain('hash-81') + expect(document.body.textContent).not.toContain('来源版本') + expect(document.body.textContent).not.toContain('hash-81') expect(document.body.textContent).toContain('优惠调整') expect(document.body.textContent).toContain('创建人A') expect(document.body.textContent).toContain('2026-08-20 11:00') @@ -150,13 +150,13 @@ describe('FinanceCustomerStatementsView', () => { expect(listPlatformTenants).not.toHaveBeenCalled() }) - it('uses statement list permission for fee-source details and keeps frozen trace fields visible', async () => { + it('uses statement list permission for fee-source details without exposing technical trace fields', async () => { const wrapper = await mountPage(['platform:finance:customer-statement:list']) await (wrapper.vm as unknown as { openDetail(row: FinanceStatementReadModel): Promise }).openDetail(statement) await flushPromises() expect(getFinanceFeeSource).toHaveBeenCalledWith('81') expect(document.body.textContent).toContain('CONT-31') - expect(document.body.textContent).toContain('hash-81') + expect(document.body.textContent).not.toContain('hash-81') }) it('surfaces detail hydration failures instead of silently returning an empty filtered list', async () => { diff --git a/src/modules/finance/pages/FinanceCustomerStatementsView.vue b/src/modules/finance/pages/FinanceCustomerStatementsView.vue index 80cff479..95f1f53a 100644 --- a/src/modules/finance/pages/FinanceCustomerStatementsView.vue +++ b/src/modules/finance/pages/FinanceCustomerStatementsView.vue @@ -429,20 +429,14 @@ onMounted(() => { if (canListCustomers.value) void loadCustomers(); void load()