import type { PageParam, PageResult } from '@vben/request';
|
|
import type { SystemStorageApi } from '#/api/system/storage';
|
|
import { requestClient } from '#/api/request';
|
|
export namespace UmsApplicationApi {
|
/** 入会申请 */
|
export interface Application {
|
id?: number;
|
no?: string; // 申请编号,后端生成
|
memberType: number; // 会员类型,字典 ums_member_type
|
applicantName: string; // 申请人姓名(个人)或单位名称(单位)
|
contactPhone?: string; // 联系电话
|
contactEmail?: string; // 邮箱
|
legalPerson?: string; // 法定代表人(单位专有)
|
organizationCode?: string; // 统一社会信用代码(单位专有)
|
researchDirection?: string; // 研究方向
|
workUnit?: string; // 工作单位(个人专有)
|
title?: string; // 职称(个人专有)
|
memberGrade?: string; // 申请等级(按 memberType 取不同字典)
|
regionCode?: string; // 地区编码
|
industry?: string; // 行业,字典 ums_industry
|
status?: number; // 状态,字典 ums_application_status
|
processInstanceId?: string; // BPM 流程实例 ID
|
remark?: string; // 备注
|
creator?: string; // 创建人 ID
|
creatorName?: string; // 创建人姓名
|
createTime?: string; // 创建时间
|
updateTime?: string; // 更新时间
|
attachmentList?: SystemStorageApi.StorageBlob[]; // 附件列表
|
hasAttachment?: boolean; // 是否有附件
|
blobIds?: number[]; // 提交时的附件 ID 列表(全量)
|
}
|
|
/** 审批流程定义 */
|
export interface ProcessDefinition {
|
id: string;
|
key: string;
|
name: string;
|
}
|
}
|
|
/** 查询入会申请分页 */
|
export function getApplicationPage(params: PageParam) {
|
return requestClient.get<PageResult<UmsApplicationApi.Application>>(
|
'/ums/application/page',
|
{ params },
|
);
|
}
|
|
/** 查询入会申请详情 */
|
export function getApplication(id: number) {
|
return requestClient.get<UmsApplicationApi.Application>(
|
`/ums/application/get?id=${id}`,
|
);
|
}
|
|
/** 新增入会申请 */
|
export function createApplication(data: UmsApplicationApi.Application) {
|
return requestClient.post('/ums/application/create', data);
|
}
|
|
/** 修改入会申请(仅草稿、已驳回可改) */
|
export function updateApplication(data: UmsApplicationApi.Application) {
|
return requestClient.put('/ums/application/update', data);
|
}
|
|
/** 删除入会申请(仅草稿可删) */
|
export function deleteApplication(id: number) {
|
return requestClient.delete('/ums/application/delete', {
|
params: { id },
|
});
|
}
|
|
/** 提交入会申请审批 */
|
export function submitApplication(id: number, processDefinitionKey: string) {
|
return requestClient.post('/ums/application/submit', null, {
|
params: { id, processDefinitionKey },
|
});
|
}
|
|
/** 获取入会申请审批流程列表 */
|
export function getApplicationApproveProcessList() {
|
return requestClient.get<UmsApplicationApi.ProcessDefinition[]>(
|
'/ums/application/approve-process-list',
|
);
|
}
|