feat(miniprogram): migrate reimburse apply list/form/detail from bx-mobile.

Reuse /reimburses APIs with bx envelope; support multi-line details and draft actions.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
wuzilongandCursor committed 2026-09-11 23:25:58 +08:00
1 parent 2ff754d572
commit 006e94ad33
8 files changed
+1861 -9

No files matched your search

+37 -2
View File
@@ -11,7 +11,35 @@ export const advanceApi = {
delete: (id) => bxRequest({ url: `/advances/${id}`, method: 'DELETE' })
}
/** 附件:Batch2 申请页图片上传所需最小集合 */
export const reimburseApi = {
generateTitle: (params) =>
bxRequest({ url: '/reimburses/generate-title', method: 'GET', params }),
my: (params) => bxRequest({ url: '/reimburses/my', method: 'GET', params }),
getById: (id) => bxRequest({ url: `/reimburses/${id}`, method: 'GET' }),
getApprovals: (id) => bxRequest({ url: `/reimburses/${id}/approvals`, method: 'GET' }),
getApprovalHistory: (id) =>
bxRequest({ url: `/reimburses/${id}/approval-history`, method: 'GET' }),
create: (data) => bxRequest({ url: '/reimburses/', method: 'POST', data }),
update: (id, data) => bxRequest({ url: `/reimburses/${id}`, method: 'PUT', data }),
submit: (id, data) =>
bxRequest({ url: `/reimburses/${id}/submit`, method: 'POST', data }),
delete: (id) => bxRequest({ url: `/reimburses/${id}`, method: 'DELETE' })
}
export const expenseItemApi = {
tree: () => bxRequest({ url: '/expense-items/tree', method: 'GET' })
}
export const invoiceWalletApi = {
mineSummary: (params) =>
bxRequest({ url: '/invoice-wallets/mine/summary', method: 'GET', params })
}
export const invoiceApi = {
list: (params) => bxRequest({ url: '/invoices', method: 'GET', params })
}
/** 附件:申请页图片上传所需最小集合 */
export const attachmentApi = {
upload: (filePath, bizType = '', bizId = 0) =>
bxUploadFile(filePath, { bizType, bizId }),
@@ -35,4 +63,11 @@ export const attachmentApi = {
})
}
export default { advanceApi, attachmentApi }
export default {
advanceApi,
reimburseApi,
expenseItemApi,
invoiceWalletApi,
invoiceApi,
attachmentApi
}