feat: 新建采购申请、个人中心菜单

This commit is contained in:
fyy
2025-07-25 12:00:49 +08:00
parent 007bda30bc
commit d96d906392
18 changed files with 2221 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
import type { LeaveApplicationVO, LeaveApplicationForm, LeaveApplicationQuery } from './model';
import type { ID, IDS } from '#/api/common';
import type { PageResult } from '#/api/common';
import { commonExport } from '#/api/helper';
import { requestClient } from '#/api/request';
/**
* 查询请假申请列表
* @param params
* @returns 请假申请列表
*/
export function leaveApplicationList(params?: LeaveApplicationQuery) {
return requestClient.get<PageResult<LeaveApplicationVO>>('/property/leaveApplication/list', { params });
}
/**
* 导出请假申请列表
* @param params
* @returns 请假申请列表
*/
export function leaveApplicationExport(params?: LeaveApplicationQuery) {
return commonExport('/property/leaveApplication/export', params ?? {});
}
/**
* 查询请假申请详情
* @param id id
* @returns 请假申请详情
*/
export function leaveApplicationInfo(id: ID) {
return requestClient.get<LeaveApplicationVO>(`/property/leaveApplication/${id}`);
}
/**
* 新增请假申请
* @param data
* @returns void
*/
export function leaveApplicationAdd(data: LeaveApplicationForm) {
return requestClient.postWithMsg<void>('/property/leaveApplication', data);
}
/**
* 更新请假申请
* @param data
* @returns void
*/
export function leaveApplicationUpdate(data: LeaveApplicationForm) {
return requestClient.putWithMsg<void>('/property/leaveApplication', data);
}
/**
* 删除请假申请
* @param id id
* @returns void
*/
export function leaveApplicationRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/leaveApplication/${id}`);
}

View File

@@ -0,0 +1,189 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface LeaveApplicationVO {
/**
*
*/
id: string | number;
/**
* 用户ID关联用户表
*/
userId: string | number;
/**
* 申请人姓名
*/
username: string;
/**
* 部门ID关联部门表
*/
departmentId: string | number;
/**
* 部门名称
*/
departmentName: string;
/**
* 请假类型
*/
leaveType: number;
/**
* 开始时间
*/
startTime: string;
/**
* 结束时间
*/
endTime: string;
/**
* 合计时间如3天5个小时
*/
totalDuration: string;
/**
* 请假事由
*/
reason: string;
/**
* 申请状态1'草稿',2'待审批',3'已批准',4'已拒绝':5'已取消'
*/
status: number;
/**
* 搜索值
*/
searchValue: string;
}
export interface LeaveApplicationForm extends BaseEntity {
/**
*
*/
id?: string | number;
/**
* 用户ID关联用户表
*/
userId?: string | number;
/**
* 申请人姓名
*/
username?: string;
/**
* 部门ID关联部门表
*/
departmentId?: string | number;
/**
* 部门名称
*/
departmentName?: string;
/**
* 请假类型
*/
leaveType?: number;
/**
* 开始时间
*/
startTime?: string;
/**
* 结束时间
*/
endTime?: string;
/**
* 合计时间如3天5个小时
*/
totalDuration?: string;
/**
* 请假事由
*/
reason?: string;
/**
* 申请状态1'草稿',2'待审批',3'已批准',4'已拒绝':5'已取消'
*/
status?: number;
/**
* 搜索值
*/
searchValue?: string;
}
export interface LeaveApplicationQuery extends PageQuery {
/**
* 用户ID关联用户表
*/
userId?: string | number;
/**
* 申请人姓名
*/
username?: string;
/**
* 部门ID关联部门表
*/
departmentId?: string | number;
/**
* 部门名称
*/
departmentName?: string;
/**
* 请假类型
*/
leaveType?: number;
/**
* 开始时间
*/
startTime?: string;
/**
* 结束时间
*/
endTime?: string;
/**
* 合计时间如3天5个小时
*/
totalDuration?: string;
/**
* 请假事由
*/
reason?: string;
/**
* 申请状态1'草稿',2'待审批',3'已批准',4'已拒绝':5'已取消'
*/
status?: number;
/**
* 搜索值
*/
searchValue?: string;
/**
* 日期范围参数
*/
params?: any;
}

View File

@@ -0,0 +1,61 @@
import type { WorkflowDefinitionVO, WorkflowDefinitionForm, WorkflowDefinitionQuery } from './model';
import type { ID, IDS } from '#/api/common';
import type { PageResult } from '#/api/common';
import { commonExport } from '#/api/helper';
import { requestClient } from '#/api/request';
/**
* 查询流程定义列表
* @param params
* @returns 流程定义列表
*/
export function workflowDefinitionList(params?: WorkflowDefinitionQuery) {
return requestClient.get<PageResult<WorkflowDefinitionVO>>('/property/workflowDefinition/list', { params });
}
/**
* 导出流程定义列表
* @param params
* @returns 流程定义列表
*/
export function workflowDefinitionExport(params?: WorkflowDefinitionQuery) {
return commonExport('/property/workflowDefinition/export', params ?? {});
}
/**
* 查询流程定义详情
* @param id id
* @returns 流程定义详情
*/
export function workflowDefinitionInfo(id: ID) {
return requestClient.get<WorkflowDefinitionVO>(`/property/workflowDefinition/${id}`);
}
/**
* 新增流程定义
* @param data
* @returns void
*/
export function workflowDefinitionAdd(data: WorkflowDefinitionForm) {
return requestClient.postWithMsg<void>('/property/workflowDefinition', data);
}
/**
* 更新流程定义
* @param data
* @returns void
*/
export function workflowDefinitionUpdate(data: WorkflowDefinitionForm) {
return requestClient.putWithMsg<void>('/property/workflowDefinition', data);
}
/**
* 删除流程定义
* @param id id
* @returns void
*/
export function workflowDefinitionRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/workflowDefinition/${id}`);
}

View File

@@ -0,0 +1,129 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface WorkflowDefinitionVO {
/**
* 主键id
*/
id: string | number;
/**
* 流程编号
*/
code: string;
/**
* 流程名称
*/
name: string;
/**
* 流程状态(0审批不通过1审批通过2审批中3已取消)
*/
status: number;
/**
* 当前审批人
*/
currentApprover: string;
/**
* 审批建议
*/
workflowSuggestion: string;
/**
* 结束时间
*/
endTime: string;
/**
* 搜索值
*/
searchValue: string;
}
export interface WorkflowDefinitionForm extends BaseEntity {
/**
* 主键id
*/
id?: string | number;
/**
* 流程编号
*/
code?: string;
/**
* 流程名称
*/
name?: string;
/**
* 流程状态(0审批不通过1审批通过2审批中3已取消)
*/
status?: number;
/**
* 当前审批人
*/
currentApprover?: string;
/**
* 审批建议
*/
workflowSuggestion?: string;
/**
* 结束时间
*/
endTime?: string;
/**
* 搜索值
*/
searchValue?: string;
}
export interface WorkflowDefinitionQuery extends PageQuery {
/**
* 流程编号
*/
code?: string;
/**
* 流程名称
*/
name?: string;
/**
* 流程状态(0审批不通过1审批通过2审批中3已取消)
*/
status?: number;
/**
* 当前审批人
*/
currentApprover?: string;
/**
* 审批建议
*/
workflowSuggestion?: string;
/**
* 结束时间
*/
endTime?: string;
/**
* 搜索值
*/
searchValue?: string;
/**
* 日期范围参数
*/
params?: any;
}