import { request } from 'umi';

//获取设备配方
export async function getpage(params, options) {
  return request('/kitchen/api/Device/GetDeviceBOM', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
//添加设备配方
export async function add(params) {
  return request('/kitchen/api/Device/AddDeviceBOM', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
//删除设备配方
export async function DelDeviceBOM(data) {
  return request(`​/kitchen/api/Device/DelDeviceBOM`, {
   method: 'POST',
   data: data,
 });
}

export async function gettree(params) {
  return request('/kitchen/api/Device/StoreDeviceTree?isTMC=true', {
    data: {
      ...params,
    },
  });
}
//获取配方
export async function GetBOMs(params) {
  return request('/kitchen/api/bom/getpage', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
