wuzhen update-cw

This commit is contained in:
wuzhen committed 2025-09-07 14:58:44 +08:00
1 parent f625777484
commit edaf8dbacf
45 files changed
+7626 -104

No files matched your search

+216
View File
@@ -0,0 +1,216 @@
import request from '@/utils/request';
import type { AxiosPromise } from 'axios';
import type { PageQuery, TableDataInfo } from '@/api/types';
/**
* 项目审批流程查询参数
*/
export interface CwProjectApprovalQuery extends PageQuery {
applicationNo?: string;
projectName?: string;
processStatus?: string;
submitterName?: string;
startTime?: string[];
}
/**
* 项目审批流程VO
*/
export interface CwProjectApprovalProcessVO {
id: string | number;
applicationId: string | number;
applicationNo: string;
processName: string;
processStatus: string;
totalNodes: number;
currentNode: number;
startTime: string;
endTime: string;
submitterId: string | number;
submitterName: string;
createTime: string;
updateTime: string;
}
/**
* 审批记录VO
*/
export interface CwApprovalRecordVO {
id: string | number;
applicationId: string | number;
applicationNo: string;
processId: string | number;
nodeCode: string;
nodeName: string;
customNodeName: string;
nodeOrder: number;
approverId: string | number;
approverName: string;
nodeStatus: string;
approveAction: string;
approveOpinion: string;
startTime: string;
endTime: string;
isCustomProcess: boolean;
createTime: string;
updateTime: string;
}
/**
* 自定义审批流程启动请求
*/
export interface CwCustomApprovalRequest {
applicationId: string | number;
auditorIds: Array<string | number>;
processName: string;
submitterId: string | number;
submitterName: string;
}
/**
* 审批操作请求
*/
export interface CwApprovalActionRequest {
recordId: string | number;
action: string; // approve | reject
opinion: string;
}
/**
* 查询项目审批流程列表
*/
export function listProjectApproval(query: CwProjectApprovalQuery): AxiosPromise<TableDataInfo<CwProjectApprovalProcessVO>> {
return request({
url: '/cw/projectApproval/list',
method: 'get',
params: query
});
}
/**
* 获取项目审批流程详细信息
*/
export function getProjectApproval(id: string | number): AxiosPromise<CwProjectApprovalProcessVO> {
return request({
url: '/cw/projectApproval/' + id,
method: 'get'
});
}
/**
* 启动自定义审批流程
*/
export function startCustomApprovalProcess(data: CwCustomApprovalRequest): AxiosPromise<void> {
return request({
url: '/cw/projectApproval/start',
method: 'post',
data: data
});
}
/**
* 执行审批操作(统一接口)
*/
export function approveProcess(data: CwApprovalActionRequest): AxiosPromise<void> {
return request({
url: '/cw/projectApproval/approve',
method: 'put',
data: data
});
}
/**
* 打回申请(统一接口)
*/
export function rejectProcess(data: CwApprovalActionRequest): AxiosPromise<void> {
return request({
url: '/cw/projectApproval/approve',
method: 'put',
data: data
});
}
/**
* 终止审批流程
*/
export function terminateProcess(id: string | number): AxiosPromise<void> {
return request({
url: '/cw/projectApproval/' + id,
method: 'delete'
});
}
/**
* 获取我的待审批列表
*/
export function getMyPendingApprovals(query?: CwProjectApprovalQuery): AxiosPromise<any> {
return request({
url: '/cw/projectApproval/pending',
method: 'get',
params: query
});
}
/**
* 获取我的已审批列表
*/
export function getMyProcessedApprovals(query?: CwProjectApprovalQuery): AxiosPromise<any> {
return request({
url: '/cw/projectApproval/processed',
method: 'get',
params: query
});
}
/**
* 获取审批记录
*/
export function getApprovalRecords(applicationId: string | number): AxiosPromise<CwApprovalRecordVO[]> {
return request({
url: '/cw/projectApproval/records/' + applicationId,
method: 'get'
});
}
/**
* 验证审批流程
*/
export function validateApprovalProcess(data: CwCustomApprovalRequest): AxiosPromise<any> {
return request({
url: '/cw/projectApproval/validate',
method: 'post',
data: data
});
}
/**
* 获取审批流程统计数据
*/
export function getApprovalStatistics(): AxiosPromise<any> {
return request({
url: '/cw/projectApproval/statistics',
method: 'get'
});
}
/**
* 导出项目审批流程
*/
export function exportProjectApproval(query: CwProjectApprovalQuery): AxiosPromise<void> {
return request({
url: '/cw/projectApproval/export',
method: 'post',
data: query,
responseType: 'blob'
});
}
/**
* 获取可用审核人选项
*/
export function getAuditorOptions(): AxiosPromise<any[]> {
return request({
url: '/cw/projectAuditor/options',
method: 'get'
});
}
+244
View File
@@ -0,0 +1,244 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
/**
* 项目审核人配置VO对象
*/
export interface CwProjectAuditorVO {
id: string | number;
userId: string | number;
userName: string;
nickName: string;
deptId: string | number;
deptName: string;
phoneNumber: string;
email: string;
status: string;
remark: string;
configBy: string | number;
configByName: string;
createTime: string;
updateTime: string;
createBy: string | number;
updateBy: string | number;
}
/**
* 项目审核人配置表单对象
*/
export interface CwProjectAuditorForm {
id?: string | number;
userId: string | number;
userName: string;
nickName: string;
deptId: string | number;
deptName: string;
phoneNumber?: string;
email?: string;
status: string;
remark?: string;
configBy?: string | number;
configByName?: string;
}
/**
* 项目审核人配置查询对象
*/
export interface CwProjectAuditorQuery {
pageNum: number;
pageSize: number;
userName?: string;
nickName?: string;
deptId?: string | number;
status?: string;
configBy?: string | number;
createTime?: string[];
}
/**
* 批量添加请求对象
*/
export interface BatchAddRequest {
userIds: Array<string | number>;
remark?: string;
}
/**
* 状态更新请求对象
*/
export interface StatusUpdateRequest {
ids: Array<string | number>;
status: string;
}
/**
* 部门用户对象
*/
export interface DeptUserVO {
userId: string | number;
userName: string;
nickName: string;
deptId: string | number;
deptName: string;
phonenumber: string;
email: string;
status: string;
}
/**
* 查询项目审核人配置列表
*/
export function listProjectAuditor(query: CwProjectAuditorQuery): AxiosPromise<{ rows: CwProjectAuditorVO[]; total: number }> {
return request({
url: '/cw/projectAuditor/list',
method: 'get',
params: query
});
}
/**
* 查询项目审核人配置详细
*/
export function getProjectAuditor(id: string | number): AxiosPromise<CwProjectAuditorVO> {
return request({
url: '/cw/projectAuditor/' + id,
method: 'get'
});
}
/**
* 新增项目审核人配置
*/
export function addProjectAuditor(data: CwProjectAuditorForm): AxiosPromise<void> {
return request({
url: '/cw/projectAuditor',
method: 'post',
data: data
});
}
/**
* 修改项目审核人配置
*/
export function updateProjectAuditor(data: CwProjectAuditorForm): AxiosPromise<void> {
return request({
url: '/cw/projectAuditor',
method: 'put',
data: data
});
}
/**
* 删除项目审核人配置
*/
export function delProjectAuditor(ids: Array<string | number>): AxiosPromise<void> {
return request({
url: '/cw/projectAuditor/' + ids.join(','),
method: 'delete'
});
}
/**
* 批量添加审核人
*/
export function batchAddProjectAuditor(data: BatchAddRequest): AxiosPromise<void> {
return request({
url: '/cw/projectAuditor/batchAdd',
method: 'post',
data: data
});
}
/**
* 获取可用审核人列表
*/
export function listAvailableAuditors(): AxiosPromise<CwProjectAuditorVO[]> {
return request({
url: '/cw/projectAuditor/available',
method: 'get'
});
}
/**
* 根据部门ID获取用户列表
*/
export function listUserByDeptId(deptId: string | number): AxiosPromise<DeptUserVO[]> {
return request({
url: '/cw/projectAuditor/deptUsers/' + deptId,
method: 'get'
});
}
/**
* 批量更新状态
*/
export function updateAuditorStatus(data: StatusUpdateRequest): AxiosPromise<void> {
return request({
url: '/cw/projectAuditor/status',
method: 'put',
data: data
});
}
/**
* 我配置的审核人
*/
export function listMyConfigAuditors(query: CwProjectAuditorQuery): AxiosPromise<{ rows: CwProjectAuditorVO[]; total: number }> {
return request({
url: '/cw/projectAuditor/myConfig',
method: 'get',
params: query
});
}
/**
* 获取审核人选项(用于下拉选择)
*/
export function listAuditorOptions(): AxiosPromise<CwProjectAuditorVO[]> {
return request({
url: '/cw/projectAuditor/options',
method: 'get'
});
}
/**
* 批量启用
*/
export function enableAuditors(ids: Array<string | number>): AxiosPromise<void> {
return request({
url: '/cw/projectAuditor/enable/' + ids.join(','),
method: 'put'
});
}
/**
* 批量停用
*/
export function disableAuditors(ids: Array<string | number>): AxiosPromise<void> {
return request({
url: '/cw/projectAuditor/disable/' + ids.join(','),
method: 'put'
});
}
/**
* 导出项目审核人配置
*/
export function exportProjectAuditor(query: CwProjectAuditorQuery): AxiosPromise<void> {
return request({
url: '/cw/projectAuditor/export',
method: 'post',
data: query,
responseType: 'blob'
});
}
/**
* 获取审核人统计数据
*/
export function getAuditorStatistics(): AxiosPromise<any> {
return request({
url: '/cw/projectAuditor/statistics',
method: 'get'
});
}
+180
View File
@@ -203,3 +203,183 @@ export interface StatusDistribution {
count: number;
percentage: number;
}
// ==================== 项目审批人配置相关类型 ====================
// 项目审批人配置查询对象
export interface CwProjectAuditorQuery {
pageNum?: number;
pageSize?: number;
userName?: string;
nickName?: string;
deptId?: string | number;
status?: string;
configTime?: [string, string];
configBy?: string | number;
}
// 项目审批人配置视图对象
export interface CwProjectAuditorVO {
id?: string | number;
userId?: string | number;
userName?: string;
nickName?: string;
deptId?: string | number;
deptName?: string;
phoneNumber?: string;
email?: string;
status?: string;
remark?: string;
configBy?: string | number;
configByName?: string;
createBy?: string | number;
createTime?: string;
updateBy?: string | number;
updateTime?: string;
}
// 项目审批人配置表单对象
export interface CwProjectAuditorForm {
id?: string | number;
userId?: string | number;
userName?: string;
nickName?: string;
deptId?: string | number;
deptName?: string;
phoneNumber?: string;
email?: string;
status?: string;
remark?: string;
}
// 批量添加审批人业务对象
export interface CwProjectAuditorBatchBo {
userIds: Array<string | number>;
configBy: string | number;
configByName: string;
remark?: string;
}
// ==================== 项目审批流程相关类型 ====================
// 审批流程查询对象
export interface CwProjectApprovalProcessQuery {
pageNum?: number;
pageSize?: number;
applicationNo?: string;
processName?: string;
processStatus?: string;
submitterId?: string | number;
submitterName?: string;
startTime?: [string, string];
endTime?: [string, string];
}
// 审批流程视图对象
export interface CwProjectApprovalProcessVO {
id?: string | number;
applicationId?: string | number;
applicationNo?: string;
processName?: string;
processStatus?: string;
totalNodes?: number;
currentNode?: number;
startTime?: string;
endTime?: string;
submitterId?: string | number;
submitterName?: string;
createBy?: string | number;
createTime?: string;
updateBy?: string | number;
updateTime?: string;
}
// 审批流程表单对象
export interface CwProjectApprovalProcessForm {
id?: string | number;
applicationId?: string | number;
applicationNo?: string;
processName?: string;
processStatus?: string;
totalNodes?: number;
currentNode?: number;
startTime?: string;
endTime?: string;
submitterId?: string | number;
submitterName?: string;
}
// 审批记录查询对象
export interface CwApprovalRecordQuery {
pageNum?: number;
pageSize?: number;
applicationId?: string | number;
applicationNo?: string;
processId?: string | number;
approverId?: string | number;
nodeStatus?: string;
approveAction?: string;
isCustomProcess?: boolean;
startTime?: [string, string];
endTime?: [string, string];
}
// 审批记录视图对象
export interface CwApprovalRecordVO {
id?: string | number;
applicationId?: string | number;
applicationNo?: string;
processId?: string | number;
nodeCode?: string;
nodeName?: string;
customNodeName?: string;
nodeOrder?: number;
approverId?: string | number;
approverName?: string;
nodeStatus?: string;
approveAction?: string;
approveOpinion?: string;
startTime?: string;
endTime?: string;
isCustomProcess?: boolean;
createBy?: string | number;
createTime?: string;
updateBy?: string | number;
updateTime?: string;
// 关联的申请信息
projectName?: string;
submitterName?: string;
totalInvestment?: number;
}
// 自定义审批业务对象
export interface CwCustomApprovalBo {
applicationId: string | number;
auditorIds: Array<string | number>;
processName?: string;
submitterId?: string | number;
submitterName?: string;
}
// 审批操作业务对象
export interface CwApprovalActionBo {
recordId: string | number;
action: string; // 'approve' | 'reject'
opinion: string;
approverId?: string | number;
approverName?: string;
}
// =====================================================
// 扩展审批记录视图对象
// =====================================================
export interface CwApprovalRecordExtendedVO extends CwApprovalRecordVO {
processId?: string | number;
customNodeName?: string;
isCustomProcess?: boolean;
// 关联项目信息(用于显示)
projectName?: string;
totalInvestment?: number;
applicantName?: string;
}
+8
View File
@@ -71,3 +71,11 @@ export const delDept = (deptId: number | string) => {
method: 'delete'
});
};
// 查询部门选项列表 (实际调用 list 接口)
export const listDeptOptions = (): AxiosPromise<DeptVO[]> => {
return request({
url: '/system/dept/list',
method: 'get'
});
};
+8
View File
@@ -67,6 +67,14 @@ export interface R<T = any> {
data: T;
}
/**
* 分页查询基础接口
*/
export interface PageQuery {
pageNum?: number;
pageSize?: number;
}
/**
* 分页数据信息
*/