
import { request } from 'umi';

export async function GetGoodsBom(data) {
  return request(`/kitchen/api/goodes/GetGoodsBomPage`, {
    method: 'Post',
    data: data,
  });
}
export async function getbompage (data) {
  return request(`/kitchen/api/bom/getpage`, {
    method: 'Post',
    data: data,
  });
}

export async function GetCosRequestURL(data) {
  return request(`/kitchen/api/systemconfig/GetCosRequestSignURL`, {
   method: 'POST',
   data: data,
 });
}

export async function AddBomApi (data) {
  return request(`/kitchen/api/GoodsBom/AddBom`, {
    method: 'Post',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}

export async function DelGoodsBom (data) {
  return request(`/kitchen/api/goodes/DelGoodsBom?Id=${data}`, {
    method: 'DELETE',
    //data: data,
  });
}


export async function unitList(data) {
  return request(`/kitchen/api/goods-unit/type`, {
    method: 'Post',
    data: data,
  });
}
export async function getbygoodsidattribute (data) {
  return request(`/kitchen/api/goodsattribute/getbygoodsidattribute?id=`+data, {
    method: 'Get',
    // params: { ...params },
    // ...(options || {}),
  });
}
export async function getproductpage(params) {
  return request('/kitchen/api/product/product-list', {
    method: 'Post',
    data: params,
  });
}
export async function getbomtypepage(data) {
  return request(`/kitchen/api/bom/getbomtypepage`, {
    method: 'Post',
    data: data,
  });
}
export async function addgoodsbomattribute(data) {
  return request(`/kitchen/api/goodsattribute/addgoodsbomattribute`, {
    method: 'Post',
    data: data,
  });
}
export async function getbyidgoods (data) {
  return request(`/kitchen/api/goodes/getbyidgoods?id=`+data, {
    method: 'Get'
    // params: { ...params },
    // ...(options || {}),
  });
}
export async function GetGoodsTechnology(data) {
  return request(`/kitchen/api/goodstechnology/GetGoodsTechnology`, {
    method: 'Post',
    data: data,
  });
}
export async function GetTechnologyactionList(data) {
  return request(`/kitchen/api/goodstechnology/gettechnologyactionList?GoodstechnologyId=`+data, {
    method: 'Get',
  });
}
export async function GetTechnologyActionListAll() {
  return request(`/kitchen/api/goodstechnology/gettechnologyactionlistall`, {
    method: 'Get',
  });
}
export async function AddGoodsTechnologyAction(data) {
  return request(`/kitchen/api/goodstechnology/addgoodstechnologyaction`, {
    method: 'Post',
    data: data,
  });
}
export async function UpdateGoodsTechnologyAction(data) {
  return request(`/kitchen/api/goodstechnology/updategoodstechnologyaction`, {
    method: 'Post',
    data: data,
  });
}
export async function GetGoodsTechnologyAction(data) {
  return request(`/kitchen/api/goodstechnology/getGoodstechnologyaction?goodsId=`+data, {
    method: 'Get',
  });
}
export async function DeleteGoodsTechnologyAction(data) {
  return request(`/kitchen/api/goodstechnology/deletegoodstechnologyaction?id=`+data, {
    method: 'Get',
  });
}
export async function deletebydevidegoodstechnologyaction(data) {
  return request(`/kitchen/api/goodstechnology/deletebydevidegoodstechnologyaction`, {
    method: 'Post',
    data: data,
  });
}
export async function GetDeviceTechnology() {
  return request(`/kitchen/api/goodstechnology/getdevicetechnology`, {
    method: 'Get',
  });
}
export async function GetByTypebatching() {
  return request(`/kitchen/api/goodes/getbytypebatching`, {
    method: 'Get',
  });
}