fix(finance): show payable settlement progress in sources
This commit is contained in:
@@ -127,6 +127,26 @@ describe('FinanceCustomerArapView G2 operations', () => {
|
||||
}
|
||||
})
|
||||
|
||||
it.each([['PAYABLE_BILLED', '已生成应付单'], ['PARTIALLY_PAID', '部分付款'], ['PAID', '已付款']])(
|
||||
'shows payable progress and prevents editing occupied or paid sources: %s', async (status, label) => {
|
||||
const row = { ...feeSummary, direction: 'PAYABLE', sourceSystem: 'FINANCE', sourceType: 'MANUAL',
|
||||
reviewStatus: 'APPROVED', sourceStatus: status, status, statementGenerated: false } as FinanceFeeSourceSummary
|
||||
vi.mocked(listFinanceFeeSources).mockResolvedValue({ records: [row], total: 1, pages: 1 })
|
||||
const wrapper = await mountView(['platform:finance:customer-arap:list', 'platform:finance:fee-source:edit'])
|
||||
await loadRows(wrapper)
|
||||
const body = wrapper.get('.el-table__body-wrapper')
|
||||
expect(body.text()).toContain(label)
|
||||
expect(body.text()).not.toContain('可结算')
|
||||
expect(body.text()).not.toContain('未生成')
|
||||
expect(body.findAll('button').map(button => button.text().trim())).toEqual(['详情'])
|
||||
vi.mocked(getFinanceFeeSource).mockResolvedValueOnce({ ...detail, ...row })
|
||||
await body.get('button').trigger('click')
|
||||
await flushPromises()
|
||||
expect(wrapper.get('.arap-metrics').text()).toContain(label)
|
||||
expect(wrapper.get('.arap-settlement').text()).toContain('不适用')
|
||||
},
|
||||
)
|
||||
|
||||
it('shows detail from the list permission but keeps G2 operations independent', async () => {
|
||||
const wrapper = await mountView(['platform:finance:customer-arap:list'])
|
||||
await loadRows(wrapper)
|
||||
|
||||
Reference in New Issue
Block a user