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 { TechnologyInfoVO, TechnologyInfoForm, TechnologyInfoQuery } from '@/api/mes/technologyInfo/types';
|
|
|
|
/**
|
|
* 查询工序工艺信息列表
|
|
* @param query
|
|
* @returns {*}
|
|
*/
|
|
|
|
export const listTechnologyInfo = (query?: TechnologyInfoQuery): AxiosPromise<TechnologyInfoVO[]> => {
|
|
return request({
|
|
url: '/mes/technologyInfo/list',
|
|
method: 'get',
|
|
params: query
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 查询工序工艺信息详细
|
|
* @param technologyId
|
|
*/
|
|
export const getTechnologyInfo = (technologyId: string | number): AxiosPromise<TechnologyInfoVO> => {
|
|
return request({
|
|
url: '/mes/technologyInfo/' + technologyId,
|
|
method: 'get'
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 新增工序工艺信息
|
|
* @param data
|
|
*/
|
|
export const addTechnologyInfo = (data: TechnologyInfoForm) => {
|
|
return request({
|
|
url: '/mes/technologyInfo',
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 修改工序工艺信息
|
|
* @param data
|
|
*/
|
|
export const updateTechnologyInfo = (data: TechnologyInfoForm) => {
|
|
return request({
|
|
url: '/mes/technologyInfo',
|
|
method: 'put',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 删除工序工艺信息
|
|
* @param technologyId
|
|
*/
|
|
export const delTechnologyInfo = (technologyId: string | number | Array<string | number>) => {
|
|
return request({
|
|
url: '/mes/technologyInfo/' + technologyId,
|
|
method: 'delete'
|
|
});
|
|
};
|
|
|
|
|
|
/**
|
|
* 下拉框查询工序工艺信息列表
|
|
* @param query
|
|
* @returns {*}
|
|
*/
|
|
export function getProdTechnologyInfoList (query) {
|
|
return request({
|
|
url: '/mes/technologyInfo/getProdTechnologyInfoList',
|
|
method: 'get',
|
|
params: query
|
|
});
|
|
};
|