import type { PageParam, PageResult } from '@vben/request';
|
|
import { requestClient } from '#/api/request';
|
|
export namespace HrmCertificateApi {
|
/** 证书资质 */
|
export interface Certificate {
|
id?: number;
|
employeeId?: number; // 员工编号
|
employeeName?: string; // 员工姓名
|
certType?: number; // 证书类型:1特种作业 2从业资质 3技能等级 4安全培训
|
certTypeName?: string; // 证书类型名称
|
certName?: string; // 证书名称
|
certNo?: string; // 证书编号
|
issueOrg?: string; // 发证机构
|
issueDate?: string; // 发证日期
|
expireDate?: string; // 有效期至
|
expireStatus?: number; // 到期状态:0有效 1即将到期 2已过期
|
remark?: string; // 备注
|
createTime?: string;
|
}
|
}
|
|
/** 创建证书资质 */
|
export function createCertificate(data: HrmCertificateApi.Certificate) {
|
return requestClient.post('/hrm/certificate/create', data);
|
}
|
|
/** 更新证书资质 */
|
export function updateCertificate(data: HrmCertificateApi.Certificate) {
|
return requestClient.put('/hrm/certificate/update', data);
|
}
|
|
/** 删除证书资质 */
|
export function deleteCertificate(ids: number[]) {
|
return requestClient.delete('/hrm/certificate/delete', { params: { ids: ids.join(',') } });
|
}
|
|
/** 获取证书资质详情 */
|
export function getCertificate(id: number) {
|
return requestClient.get<HrmCertificateApi.Certificate>(
|
`/hrm/certificate/get?id=${id}`,
|
);
|
}
|
|
/** 获取证书资质分页 */
|
export function getCertificatePage(params: PageParam) {
|
return requestClient.get<PageResult<HrmCertificateApi.Certificate>>(
|
'/hrm/certificate/page',
|
{ params },
|
);
|
}
|