feat(miniprogram): migrate invoice wallet mine and admin from bx-mobile.
Reuse invoice-wallets/invoices APIs with summary, upload, ledgers, and admin proxy upload. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
4c24f58b63
commit
1bd0503409
5 files changed
+1491
-7
No files matched your search
+11
-3
@@ -1,4 +1,4 @@
|
||||
import { bxRequest, bxUploadFile } from '@/utils/bxRequest'
|
||||
import { bxRequest, bxUploadFile, bxUploadInvoice } from '@/utils/bxRequest'
|
||||
|
||||
export const advanceApi = {
|
||||
list: (params) => bxRequest({ url: '/advances/', method: 'GET', params }),
|
||||
@@ -34,11 +34,19 @@ export const expenseItemApi = {
|
||||
|
||||
export const invoiceWalletApi = {
|
||||
mineSummary: (params) =>
|
||||
bxRequest({ url: '/invoice-wallets/mine/summary', method: 'GET', params })
|
||||
bxRequest({ url: '/invoice-wallets/mine/summary', method: 'GET', params }),
|
||||
list: (params) => bxRequest({ url: '/invoice-wallets', method: 'GET', params })
|
||||
}
|
||||
|
||||
export const invoiceApi = {
|
||||
list: (params) => bxRequest({ url: '/invoices', method: 'GET', params })
|
||||
list: (params) => bxRequest({ url: '/invoices', method: 'GET', params }),
|
||||
/**
|
||||
* 上传发票(multipart)。uni-app 用 uni.uploadFile,单次一张图。
|
||||
* @param {{ amount: number|string, remark?: string, filePath: string, targetUserId?: string|number }} opts
|
||||
*/
|
||||
upload: (opts) => bxUploadInvoice(opts),
|
||||
delete: (id) => bxRequest({ url: `/invoices/${id}`, method: 'DELETE' }),
|
||||
ledgers: (params) => bxRequest({ url: '/invoice-ledgers', method: 'GET', params })
|
||||
}
|
||||
|
||||
/** 附件:申请页图片上传所需最小集合 */
|
||||
|
||||
Reference in new issue
Block a user