feat:【bpm】oa 请假:10% 初始化

This commit is contained in:
YunaiV
2025-12-24 09:22:36 +08:00
parent 5e457b4afe
commit fd723685d9
5 changed files with 776 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
import type { PageParam, PageResult } from '@/http/types'
import { http } from '@/http/http'
/** 请假申请 */
export interface Leave {
id: number
status: number
type: number
reason: string
processInstanceId: string
startTime: number
endTime: number
createTime: number
startUserSelectAssignees?: Record<string, string[]>
}
/** 创建请假申请 */
export function createLeave(data: Partial<Leave>) {
return http.post<number>('/bpm/oa/leave/create', data)
}
/** 更新请假申请 */
export function updateLeave(data: Partial<Leave>) {
return http.put<boolean>('/bpm/oa/leave/update', data)
}
/** 获得请假申请 */
export function getLeave(id: number) {
return http.get<Leave>(`/bpm/oa/leave/get?id=${id}`)
}
/** 获得请假申请分页 */
export function getLeavePage(params: PageParam) {
return http.get<PageResult<Leave>>('/bpm/oa/leave/page', params)
}