You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
1.6 KiB
TypeScript
78 lines
1.6 KiB
TypeScript
import request from '@/utils/request';
|
|
import { AxiosPromise } from 'axios';
|
|
import { QcTemplateItemVO, QcTemplateItemForm, QcTemplateItemQuery } from '@/api/qms/qcTemplateItem/types';
|
|
|
|
/**
|
|
* 查询检测模板子表列表
|
|
* @param query
|
|
* @returns {*}
|
|
*/
|
|
|
|
export const listQcTemplateItem = (query?: QcTemplateItemQuery): AxiosPromise<QcTemplateItemVO[]> => {
|
|
return request({
|
|
url: '/qms/qcTemplateItem/list',
|
|
method: 'get',
|
|
params: query
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 查询检测模板子表详细
|
|
* @param templateItemId
|
|
*/
|
|
export const getQcTemplateItem = (templateItemId: string | number): AxiosPromise<QcTemplateItemVO> => {
|
|
return request({
|
|
url: '/qms/qcTemplateItem/' + templateItemId,
|
|
method: 'get'
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 新增检测模板子表
|
|
* @param data
|
|
*/
|
|
export const addQcTemplateItem = (data: QcTemplateItemForm) => {
|
|
return request({
|
|
url: '/qms/qcTemplateItem',
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 修改检测模板子表
|
|
* @param data
|
|
*/
|
|
export const updateQcTemplateItem = (data: QcTemplateItemForm) => {
|
|
return request({
|
|
url: '/qms/qcTemplateItem',
|
|
method: 'put',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 删除检测模板子表
|
|
* @param templateItemId
|
|
*/
|
|
export const delQcTemplateItem = (templateItemId: string | number | Array<string | number>) => {
|
|
return request({
|
|
url: '/qms/qcTemplateItem/' + templateItemId,
|
|
method: 'delete'
|
|
});
|
|
};
|
|
|
|
|
|
/**
|
|
* 下拉框查询检测模板子表列表
|
|
* @param query
|
|
* @returns {*}
|
|
*/
|
|
export function getQcTemplateItemList (query) {
|
|
return request({
|
|
url: '/qms/qcTemplateItem/getQcTemplateItemList',
|
|
method: 'get',
|
|
params: query
|
|
});
|
|
};
|