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,
    });
  },
/**获取分页数据 */
GetBomTechnologypage(data) {
  return request(`/kitchen/api/goodstechnology/getbomtechnologypage`, {
    method: 'POST',
    data: data,
  });
},
GetGoodstechnologypage(data) {
  return request(`/kitchen/api/goodstechnology/getGoodstechnologypage`, {
    method: 'Post',
    data: data,
  });
},
addBomtechnology(data) {
  return request(`/kitchen/api/goodstechnology/addBomtechnology`, {
    method: 'Post',
    data: data,
  });
},
updatebomtechnology(data) {
  return request(`/kitchen/api/goodstechnology/updatebomtechnology`, {
    method: 'Post',
    data: data,
  });
},
deletebomtechnology(data) {
  return request(`/kitchen/api/goodstechnology/deletebomtechnology`, {
    method: 'Post',
    data: data,
  });
},
gettechnologyactionList(data) {
  return request(`/kitchen/api/goodstechnology/gettechnologyactionList?GoodstechnologyId=`+data, {
    method: 'Get',
  });
},
GetGoodsTechnology(data) {
  return request(`/kitchen/api/goodstechnology/GetGoodsTechnology`, {
    method: 'Post',
    data: data,
  });
},
getbomtechnologyactionList(data) {
  return request(`/kitchen/api/goodstechnology/getbomtechnologyactionList`, {
    method: 'Post',
    data: data,
  });
},
addbomtechnologyaction(data) {
  return request(`/kitchen/api/goodstechnology/addbomtechnologyaction`, {
    method: 'Post',
    data: data,
  });
},
getbomtechnologyaction(data) {
  return request(`/kitchen/api/goodstechnology/getbomtechnologyaction`, {
    method: 'Post',
    data: data,
  });
},
getbomtechnologyactionbybom(data) {
  return request(`/kitchen/api/goodstechnology/getbomtechnologyactionbybom?bomId=`+data, {
    method: 'Get',
  });
},
getbomtechnologyactionbyid(data) {
  return request(`/kitchen/api/goodstechnology/getbomtechnologyactionbyid?id=`+data, {
    method: 'Get',
  });
},
deletebomtechnologyaction(data) {
  return request(`/kitchen/api/goodstechnology/deletebomtechnologyaction?ids=`+data, {
    method: 'Get',
  });
},
updatesortbomtechnologyaction(data) {
  return request(`/kitchen/api/goodstechnology/updatesortbomtechnologyaction`, {
    method: 'Post',
    data: data,
  });
},
};


