优化
This commit is contained in:
@@ -132,7 +132,7 @@ describe('formal settlement download-center exports', () => {
|
||||
expect(router.currentRoute.value.name).toBe('download-center')
|
||||
})
|
||||
|
||||
it('uses the payable detail type without a direction parameter', async () => {
|
||||
it('removes the payable detail export while retaining list exports', async () => {
|
||||
vi.mocked(getFinanceSettlement).mockResolvedValueOnce({ ...detail, id: '801', settlementNo: 'AP-801', direction: 'PAYABLE' })
|
||||
vi.mocked(createPlatformExportTask).mockResolvedValueOnce({ taskName: '应付结算单详情', taskNo: 'EXP-DETAIL-2' } as never)
|
||||
const router = testRouter()
|
||||
@@ -143,9 +143,8 @@ describe('formal settlement download-center exports', () => {
|
||||
|
||||
await (wrapper.vm as unknown as { exportDetail(): Promise<void> }).exportDetail()
|
||||
|
||||
expect(createPlatformExportTask).toHaveBeenCalledWith({
|
||||
exportType: 'FINANCE_PAYABLE_SETTLEMENT_DETAIL', format: 'XLSX', taskName: '应付结算单详情', parameters: { settlementId: '801' },
|
||||
})
|
||||
expect(wrapper.find('.finance-detail-actions').text()).not.toContain('导出')
|
||||
expect(createPlatformExportTask).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('hides export actions unless both export and download-list permissions are present', async () => {
|
||||
|
||||
Reference in New Issue
Block a user