feat(bx): invoice wallet UI and reimburse apply invoice select
Add mine/admin wallet pages, select dialog, routes/icons, and switch apply form from local invoice upload to optional wallet association with balance gate; approve detail shows linked invoices. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
6092b685de
commit
dadf903bff
8 files changed
+1000
-58
No files matched your search
@@ -171,14 +171,20 @@ export const reimburseApi = {
|
||||
getApprovalHistory(id: BxId) {
|
||||
return bxRequest.get(`/reimburses/${id}/approval-history`)
|
||||
},
|
||||
/** body 可含 invoiceIds: string[] 关联发票夹发票(草稿保存时同步关联) */
|
||||
create(data: Record<string, any>) {
|
||||
return bxRequest.post('/reimburses/', data)
|
||||
},
|
||||
/** body 可含 invoiceIds: string[] 关联发票夹发票(草稿保存时同步关联) */
|
||||
update(id: BxId, data: Record<string, any>) {
|
||||
return bxRequest.put(`/reimburses/${id}`, data)
|
||||
},
|
||||
submit(id: BxId) {
|
||||
return bxRequest.post(`/reimburses/${id}/submit`)
|
||||
/** body 可含 invoiceIds: string[] 提交时同步关联并扣减发票余额 */
|
||||
submit(id: BxId, data?: Record<string, any>) {
|
||||
return bxRequest.post(`/reimburses/${id}/submit`, data)
|
||||
},
|
||||
withdraw(id: BxId) {
|
||||
return bxRequest.post(`/reimburses/${id}/withdraw`)
|
||||
},
|
||||
approve(id: BxId, data: { approvalOpinion?: string }) {
|
||||
return bxRequest.post(`/reimburses/${id}/approve`, data)
|
||||
@@ -276,6 +282,33 @@ export const paymentApi = {
|
||||
}
|
||||
}
|
||||
|
||||
export const invoiceWalletApi = {
|
||||
mineSummary() {
|
||||
return bxRequest.get('/invoice-wallets/mine/summary')
|
||||
},
|
||||
list(params: { page: number; pageSize: number; keyword?: string }) {
|
||||
return bxRequest.get('/invoice-wallets', { params })
|
||||
}
|
||||
}
|
||||
|
||||
export const invoiceApi = {
|
||||
list(params: { page?: number; pageSize?: number; userId?: BxId }) {
|
||||
return bxRequest.get('/invoices', { params })
|
||||
},
|
||||
/** FormData 字段:file, amount, remark?, targetUserId?(管理员代传) */
|
||||
upload(formData: FormData) {
|
||||
return bxRequest.post('/invoices', formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
},
|
||||
delete(id: BxId) {
|
||||
return bxRequest.delete(`/invoices/${id}`)
|
||||
},
|
||||
ledgers(params?: { userId?: BxId }) {
|
||||
return bxRequest.get('/invoice-ledgers', { params })
|
||||
}
|
||||
}
|
||||
|
||||
export const attachmentApi = {
|
||||
upload(file: File, bizType: string = '', bizId: BxId = 0) {
|
||||
const formData = new FormData()
|
||||
|
||||
Reference in new issue
Block a user