import request from '@/utils/request';

/**
 * 信息
 */
export async function getInfo (params) {
  const res = await request.get('/mes/ordercontrol/getInfo');
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
/**
 * 保存
 */
export async function controlSave (data) {
  const res = await request.post('/mes/ordercontrol/save', data);
  if (res.data.code == 0) {
    return res.data.message;
  }
  return Promise.reject(new Error(res.data.message));
}
/**
 * 修改
 */
export async function controlUpdate (data) {
  const res = await request.put('/mes/ordercontrol/update', data);
  if (res.data.code == 0) {
    return res.data.message;
  }
  return Promise.reject(new Error(res.data.message));
}


