feat(bx): add list Excel export for reimbursement module pages
Wire ListExportDropdown on advance/reimburse/payment/expense/view/wallet lists, with matching POST export endpoints. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
fe15a130cb
commit
dbba755fd8
16 files changed
+901
-11
No files matched your search
@@ -23,6 +23,9 @@ export const expenseItemApi = {
|
||||
},
|
||||
delete(id: BxId) {
|
||||
return bxRequest.delete(`/expense-items/${id}`)
|
||||
},
|
||||
export(data: Record<string, any>) {
|
||||
return bxRequest.post('/expense-items/export', data, { responseType: 'blob' })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +66,12 @@ export const advanceApi = {
|
||||
my(params: { page: number; pageSize: number; status?: string; keyword?: string } & BxApplyDateFilter) {
|
||||
return bxRequest.get('/advances/my', { params })
|
||||
},
|
||||
exportMy(data: Record<string, any>) {
|
||||
return bxRequest.post('/advances/my/export', data, { responseType: 'blob' })
|
||||
},
|
||||
exportList(data: Record<string, any>) {
|
||||
return bxRequest.post('/advances/export', data, { responseType: 'blob' })
|
||||
},
|
||||
myStats() {
|
||||
return bxRequest.get('/advances/my/stats')
|
||||
},
|
||||
@@ -77,6 +86,9 @@ export const advanceApi = {
|
||||
} & BxApplyDateFilter) {
|
||||
return bxRequest.get('/advances/pending-approval', { params })
|
||||
},
|
||||
exportPendingApproval(data: Record<string, any>) {
|
||||
return bxRequest.post('/advances/pending-approval/export', data, { responseType: 'blob' })
|
||||
},
|
||||
pendingApprovalStats() {
|
||||
return bxRequest.get('/advances/pending-approval/stats')
|
||||
},
|
||||
@@ -88,6 +100,9 @@ export const advanceApi = {
|
||||
} & BxApplyDateFilter) {
|
||||
return bxRequest.get('/advances/approved-by-me', { params })
|
||||
},
|
||||
exportApprovedByMe(data: Record<string, any>) {
|
||||
return bxRequest.post('/advances/approved-by-me/export', data, { responseType: 'blob' })
|
||||
},
|
||||
getById(id: BxId) {
|
||||
return bxRequest.get(`/advances/${id}`)
|
||||
},
|
||||
@@ -135,6 +150,18 @@ export const reimburseApi = {
|
||||
} & BxApplyDateFilter) {
|
||||
return bxRequest.get('/reimburses/', { params })
|
||||
},
|
||||
exportMy(data: Record<string, any>) {
|
||||
return bxRequest.post('/reimburses/my/export', data, { responseType: 'blob' })
|
||||
},
|
||||
exportList(data: Record<string, any>) {
|
||||
return bxRequest.post('/reimburses/export', data, { responseType: 'blob' })
|
||||
},
|
||||
exportPendingApproval(data: Record<string, any>) {
|
||||
return bxRequest.post('/reimburses/pending-approval/export', data, { responseType: 'blob' })
|
||||
},
|
||||
exportApprovedByMe(data: Record<string, any>) {
|
||||
return bxRequest.post('/reimburses/approved-by-me/export', data, { responseType: 'blob' })
|
||||
},
|
||||
my(params: { page: number; pageSize: number; status?: string; keyword?: string } & BxApplyDateFilter) {
|
||||
return bxRequest.get('/reimburses/my', { params })
|
||||
},
|
||||
@@ -222,6 +249,15 @@ export const paymentApi = {
|
||||
} & BxApplyDateFilter) {
|
||||
return bxRequest.get('/payments/pending', { params })
|
||||
},
|
||||
exportPending(data: Record<string, any>) {
|
||||
return bxRequest.post('/payments/pending/export', data, { responseType: 'blob' })
|
||||
},
|
||||
exportProcessed(data: Record<string, any>) {
|
||||
return bxRequest.post('/payments/processed/export', data, { responseType: 'blob' })
|
||||
},
|
||||
exportAdvanceIssuesXlsx(data: Record<string, any>) {
|
||||
return bxRequest.post('/payments/advance-issues/export-xlsx', data, { responseType: 'blob' })
|
||||
},
|
||||
pay(id: BxId, data?: { payRemark?: string; actualAmount?: number }) {
|
||||
return bxRequest.post(`/payments/${id}/pay`, data)
|
||||
},
|
||||
@@ -297,6 +333,9 @@ export const invoiceWalletApi = {
|
||||
},
|
||||
list(params: { page: number; pageSize: number; keyword?: string }) {
|
||||
return bxRequest.get('/invoice-wallets', { params })
|
||||
},
|
||||
export(data: Record<string, any>) {
|
||||
return bxRequest.post('/invoice-wallets/export', data, { responseType: 'blob' })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user