feat(bx-mobile): complete P3 withdraw, proxy apply, history, and config pages
Align H5 with portal APIs for reimburse withdraw, approval history, applicant/date/title, and UUID-based expense/workflow config using portal user options. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
9750e1f39d
commit
96dbd3ccbc
12 files changed
+344
-87
No files matched your search
@@ -31,6 +31,7 @@ export const advanceApi = {
|
||||
bxClient.get('/advances/approved-by-me', { params }),
|
||||
getById: (id: BxId) => bxClient.get(`/advances/${id}`),
|
||||
getApprovals: (id: BxId) => bxClient.get(`/advances/${id}/approvals`),
|
||||
getApprovalHistory: (id: BxId) => bxClient.get(`/advances/${id}/approval-history`),
|
||||
create: (data: Record<string, any>) => bxClient.post('/advances/', data),
|
||||
update: (id: BxId, data: Record<string, any>) => bxClient.put(`/advances/${id}`, data),
|
||||
submit: (id: BxId) => bxClient.post(`/advances/${id}/submit`),
|
||||
@@ -42,7 +43,17 @@ export const advanceApi = {
|
||||
}
|
||||
|
||||
export const reimburseApi = {
|
||||
generateTitle: () => bxClient.get('/reimburses/generate-title'),
|
||||
generateTitle: (
|
||||
reimburseDate?: string,
|
||||
excludeApplyId?: BxId,
|
||||
applicantId?: BxId,
|
||||
) => {
|
||||
const params: Record<string, string> = {}
|
||||
if (reimburseDate) params.reimburseDate = reimburseDate
|
||||
if (excludeApplyId) params.excludeApplyId = String(excludeApplyId)
|
||||
if (applicantId) params.applicantId = String(applicantId)
|
||||
return bxClient.get('/reimburses/generate-title', { params })
|
||||
},
|
||||
list: (params?: Record<string, any>) => bxClient.get('/reimburses/', { params }),
|
||||
my: (params?: Record<string, any>) => bxClient.get('/reimburses/my', { params }),
|
||||
myStats: () => bxClient.get('/reimburses/my/stats'),
|
||||
@@ -52,10 +63,12 @@ export const reimburseApi = {
|
||||
bxClient.get('/reimburses/approved-by-me', { params }),
|
||||
getById: (id: BxId) => bxClient.get(`/reimburses/${id}`),
|
||||
getApprovals: (id: BxId) => bxClient.get(`/reimburses/${id}/approvals`),
|
||||
getApprovalHistory: (id: BxId) => bxClient.get(`/reimburses/${id}/approval-history`),
|
||||
create: (data: Record<string, any>) => bxClient.post('/reimburses/', data),
|
||||
update: (id: BxId, data: Record<string, any>) => bxClient.put(`/reimburses/${id}`, data),
|
||||
submit: (id: BxId, data?: Record<string, any>) =>
|
||||
bxClient.post(`/reimburses/${id}/submit`, data),
|
||||
withdraw: (id: BxId) => bxClient.post(`/reimburses/${id}/withdraw`),
|
||||
approve: (id: BxId, data: { approvalOpinion?: string }) =>
|
||||
bxClient.post(`/reimburses/${id}/approve`, data),
|
||||
reject: (id: BxId, data: { approvalOpinion?: string }) =>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import portalClient from './portalClient'
|
||||
|
||||
/** 门户用户下拉(与 web-admin fetchUserOptions 同源) */
|
||||
export const portalAdminApi = {
|
||||
userOptions: () => portalClient.get('/web/admin/users/options'),
|
||||
}
|
||||
Reference in new issue
Block a user