import { request } from 'umi';



export default {

  add(data) {
    return request(`/kitchen/api/bom/add`, {
      method: 'Post',
      data: data,
      // params: { ...params },
      // ...(options || {}),
    });
  },
  update(data) {
    return request(`/kitchen/api/bom/update`, {
      method: 'Post',
      data: data,
      // params: { ...params },
      // ...(options || {}),
    });
  },

  delete(data) {
    return request(`/kitchen/api/bom/delete`, {
      method: 'Post',
      data: data,
      // params: { ...params },
      // ...(options || {}),
    });
  },

  getpage(data) {
    return request(`/kitchen/api/bom/getpage`, {
      method: 'Post',
      data: data,
      // params: { ...params },
      // ...(options || {}),
    });
  },
  postStockGoods() {
    return request(`/kitchen/api/frachisee-stock-adjust/product-list`, {
      method: 'Get',
      // ...(options || {}),
    });
  },

  addentry(data) {
    return request(`/kitchen/api/bom/addentry`, {
      method: 'Post',
      data: data,
    });
  },

  deleteentry(data) {
    return request(`/kitchen/api/bom/deleteentry`, {
      method: 'Post',
      data: data,
    });
  },
  Enable(data) {
    return request(`/kitchen/api/GoodsBom/enable`, {
      method: 'Post',
      data: data,
    });
  },

  getentrypage(data) {
    return request(`/kitchen/api/bom/getentrypage`, {
      method: 'Post',
      data: data,
    });
  },

  //获取菜谱分类
  getbomtypepage(data) {
    return request(`/kitchen/api/bom/getbomtypepage`, {
      method: 'Post',
      data: data,
    });
  },


  //添加菜谱物料用量
  addBomConsumptionInfo(data) {
    return request(`/kitchen/api/bom/addBomConsumptionInfo`, {
      method: 'Post',
      data: data,
    });
  },

  //获取菜谱物料用量
  getomConsumptionInfo(data) {
    return request(`/kitchen/api/bom/getomConsumptionInfo?bomId=${data}`, {
      method: 'get',
      data: data,
    });
  }

};


