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.

137 lines
2.7 KiB
TypeScript

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
});
};
// 获取工艺路线的所有工艺步骤
export function getBaseRouteProcesses(query) {
return request({
url: '/mes/planInfo/getBaseRouteProcesses' ,
method: 'get',
params: query
})
}
// 获取派工编号
export function getDispatchCode() {
return request({
url: '/mes/planInfo/getDispatchCode',
method: 'get'
})
}
// 查询生产派工列表
export function selectProductPlans(query) {
return request({
url: '/mes/planInfo/selectProductPlans',
method: 'get',
params: query
})
}
// 生产工单新增生产派工List
export function orderAddProductPlanList(data) {
return request({
url: '/mes/planInfo/orderAddProductPlanList',
method: 'post',
data: data
})
}
/**
* 下发选中计划
* @param planId
*/
export const issuePlanInfo = (workshopId: string | number, planId: string | number | Array<string | number>) => {
return request({
url: '/mes/planInfo/issuePlanInfo/' + workshopId + "/" + planId,
method: 'get'
});
};
/**
* 查询生产工单信息列表
* @param query
* @returns {*}
*/
export const queryMoritorPageList = (query?: PlanInfoQuery): AxiosPromise<PlanInfoVO[]> => {
return request({
url: '/mes/planInfo/queryMoritorPageList',
method: 'get',
params: query
});
};