From e75a0eb46392c5caf99787518e622af216075b89 Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Thu, 20 Aug 2026 19:20:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/FinanceCustomerArapView.test.ts | 20 +++++++++++++++++-- .../finance/pages/FinanceCustomerArapView.vue | 13 ++++++++++-- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/src/modules/finance/pages/FinanceCustomerArapView.test.ts b/src/modules/finance/pages/FinanceCustomerArapView.test.ts index e41b5bf1..9cb1ddd5 100644 --- a/src/modules/finance/pages/FinanceCustomerArapView.test.ts +++ b/src/modules/finance/pages/FinanceCustomerArapView.test.ts @@ -114,6 +114,21 @@ describe('FinanceCustomerArapView G2 operations', () => { expect(editFinanceFeeSource).not.toHaveBeenCalled() }) + it('treats inbound and container fee types as Firstleg sources when sourceSystem is missing', async () => { + const legacyFirstleg = { ...feeSummary, sourceSystem: '', sourceType: 'CONTAINER_FEE', reviewStatus: 'APPROVED' as const } + vi.mocked(listFinanceFeeSources).mockResolvedValue({ records: [legacyFirstleg], total: 1, pages: 1 }) + const wrapper = await mountView(['platform:finance:customer-arap:list', 'platform:finance:fee-source:edit']) + await loadRows(wrapper) + + const buttonLabels = wrapper.findAll('button').map((button) => button.text()) + expect(buttonLabels).not.toContain('编辑') + expect(buttonLabels).not.toContain('调整') + const vm = wrapper.vm as unknown as { openMutation(row: Record, mode: 'ADJUST'): Promise } + await vm.openMutation(legacyFirstleg as unknown as Record, 'ADJUST') + expect(getFinanceFeeSource).not.toHaveBeenCalled() + expect(adjustFinanceFeeSource).not.toHaveBeenCalled() + }) + it('loads all customers by default and keeps explicit customer filtering', async () => { const wrapper = await mountView(['platform:finance:customer-arap:list', 'platform:customer:list']) expect(listFinanceFeeSources).toHaveBeenCalledWith(expect.objectContaining({ page: 1, size: 20, customerId: undefined, direction: undefined })) @@ -209,8 +224,9 @@ describe('FinanceCustomerArapView G2 operations', () => { expect(page).toContain('详情') expect(page).toContain("@click=\"openMutation(row, 'SUBMIT')\"") expect(page).toContain("@click=\"openMutation(row, 'ADJUST')\"") - expect(page).toContain("row.sourceSystem !== 'FIRSTLEG'") - expect(page).toContain("detail.sourceSystem !== 'FIRSTLEG'") + expect(page).toContain('!isFirstlegSource(row)') + expect(page).toContain('!isFirstlegSource(detail)') + expect(page).toContain("['INBOUND_FEE', 'CONTAINER_FEE'].includes(type)") expect(page).not.toMatch(/