zhangwencui
7 天以前 f35825c1922149df154e3913d6dfebee57ee8cee
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
import type { PageParam, PageResult } from '@vben/request';
 
import { requestClient } from '#/api/request';
 
export namespace MesQcIndicatorApi {
  /** MES 质检指标 */
  export interface Indicator {
    id?: number; // 编号
    code?: string; // 检测项编码
    name?: string; // 检测项名称
    type?: number; // 检测项类型
    tool?: string; // 检测工具
    resultType?: number; // 结果值类型
    resultSpecification?: string; // 结果值属性
    remark?: string; // 备注
    createTime?: Date; // 创建时间
  }
}
 
/** 查询质检指标分页 */
export function getIndicatorPage(params: PageParam) {
  return requestClient.get<PageResult<MesQcIndicatorApi.Indicator>>(
    '/mes/qc/indicator/page',
    { params },
  );
}
 
/** 查询质检指标详情 */
export function getIndicator(id: number) {
  return requestClient.get<MesQcIndicatorApi.Indicator>(
    `/mes/qc/indicator/get?id=${id}`,
  );
}
 
/** 新增质检指标 */
export function createIndicator(data: MesQcIndicatorApi.Indicator) {
  return requestClient.post('/mes/qc/indicator/create', data);
}
 
/** 修改质检指标 */
export function updateIndicator(data: MesQcIndicatorApi.Indicator) {
  return requestClient.put('/mes/qc/indicator/update', data);
}
 
/** 删除质检指标 */
export function deleteIndicator(id: number) {
  return requestClient.delete(`/mes/qc/indicator/delete?id=${id}`);
}
 
/** 导出质检指标 */
export function exportIndicator(params: any) {
  return requestClient.download('/mes/qc/indicator/export-excel', { params });
}