xiaoyi
4 天以前 5c243d9d05da668a32b1bc9a4f543ea081488d11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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 },
  );
}