zhangwencui
6 天以前 7619c19a67c2ac824f803090bab753fc5ea14408
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
53
54
55
56
57
58
59
60
61
62
63
64
65
import type { PageParam, PageResult } from '@vben/request';
 
import { requestClient } from '#/api/request';
 
export namespace MesDvCheckPlanApi {
  /** MES 点检保养方案 */
  export interface CheckPlan {
    id?: number; // 方案编号
    code?: string; // 方案编码
    name?: string; // 方案名称
    type?: number; // 方案类型
    startDate?: Date | number; // 开始日期
    endDate?: Date | number; // 结束日期
    cycleType?: number; // 周期类型
    cycleCount?: number; // 周期数量
    status?: number; // 状态
    remark?: string; // 备注
    createTime?: Date; // 创建时间
  }
}
 
/** 查询点检保养方案分页 */
export function getCheckPlanPage(params: PageParam) {
  return requestClient.get<PageResult<MesDvCheckPlanApi.CheckPlan>>(
    '/mes/dv/check-plan/page',
    { params },
  );
}
 
/** 查询点检保养方案详情 */
export function getCheckPlan(id: number) {
  return requestClient.get<MesDvCheckPlanApi.CheckPlan>(
    `/mes/dv/check-plan/get?id=${id}`,
  );
}
 
/** 新增点检保养方案 */
export function createCheckPlan(data: MesDvCheckPlanApi.CheckPlan) {
  return requestClient.post<number>('/mes/dv/check-plan/create', data);
}
 
/** 修改点检保养方案 */
export function updateCheckPlan(data: MesDvCheckPlanApi.CheckPlan) {
  return requestClient.put('/mes/dv/check-plan/update', data);
}
 
/** 启用点检保养方案 */
export function enableCheckPlan(id: number) {
  return requestClient.put(`/mes/dv/check-plan/enable?id=${id}`);
}
 
/** 停用点检保养方案 */
export function disableCheckPlan(id: number) {
  return requestClient.put(`/mes/dv/check-plan/disable?id=${id}`);
}
 
/** 删除点检保养方案 */
export function deleteCheckPlan(id: number) {
  return requestClient.delete(`/mes/dv/check-plan/delete?id=${id}`);
}
 
/** 导出点检保养方案 */
export function exportCheckPlan(params: any) {
  return requestClient.download('/mes/dv/check-plan/export-excel', { params });
}