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.5 KiB
TypeScript
78 lines
1.5 KiB
TypeScript
6 months ago
|
import request from '@/utils/request';
|
||
|
import { AxiosPromise } from 'axios';
|
||
|
import { PlanInfoVO, PlanInfoForm, PlanInfoQuery } from '@/api/mes/planInfo/types';
|
||
|
|
||
|
/**
|
||
|
* 查询生产工单信息列表
|
||
|
* @param query
|
||
|
* @returns {*}
|
||
|
*/
|
||
|
|
||
|
export const listPlanInfo = (query?: PlanInfoQuery): AxiosPromise<PlanInfoVO[]> => {
|
||
|
return request({
|
||
|
url: '/mes/planInfo/list',
|
||
|
method: 'get',
|
||
|
params: query
|
||
|
});
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* 查询生产工单信息详细
|
||
|
* @param planId
|
||
|
*/
|
||
|
export const getPlanInfo = (planId: string | number): AxiosPromise<PlanInfoVO> => {
|
||
|
return request({
|
||
|
url: '/mes/planInfo/' + planId,
|
||
|
method: 'get'
|
||
|
});
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* 新增生产工单信息
|
||
|
* @param data
|
||
|
*/
|
||
|
export const addPlanInfo = (data: PlanInfoForm) => {
|
||
|
return request({
|
||
|
url: '/mes/planInfo',
|
||
|
method: 'post',
|
||
|
data: data
|
||
|
});
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* 修改生产工单信息
|
||
|
* @param data
|
||
|
*/
|
||
|
export const updatePlanInfo = (data: PlanInfoForm) => {
|
||
|
return request({
|
||
|
url: '/mes/planInfo',
|
||
|
method: 'put',
|
||
|
data: data
|
||
|
});
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* 删除生产工单信息
|
||
|
* @param planId
|
||
|
*/
|
||
|
export const delPlanInfo = (planId: string | number | Array<string | number>) => {
|
||
|
return request({
|
||
|
url: '/mes/planInfo/' + planId,
|
||
|
method: 'delete'
|
||
|
});
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* 下拉框查询生产工单信息列表
|
||
|
* @param query
|
||
|
* @returns {*}
|
||
|
*/
|
||
|
export function getPlanInfoList (query) {
|
||
|
return request({
|
||
|
url: '/mes/planInfo/getPlanInfoList',
|
||
|
method: 'get',
|
||
|
params: query
|
||
|
});
|
||
|
};
|