
import { request } from 'umi';

export async function GetGoodsBom(data) {
  return request(`/saasbase/api/goods/getgoodsbompage`, {
    method: 'Post',
    data: data,
  });
}
export async function getbompage (data) {
  return request(`/saasbase/api/bom/getpage`, {
    method: 'Post',
    data: data,
  });
}

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

export async function AddBomApi (data) {
  return request(`/saasbase/api/GoodsBom/AddBom`, {
    method: 'Post',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}
export async function GetbomTypelist (data) {
  return request(`/saasbase/api/bom/getbomtypelist`, {
    method: 'Get',
    // params: { ...params },
    // ...(options || {}),
  });
}
export async function AddBomType (data) {
  return request(`/saasbase/api/bom/addbomtype`, {
    method: 'Post',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}
export async function DelGoodsBom (data) {
  return request(`/saasbase/api/goods/delgoodsbom?Ids=${data}`, {
    method: 'GET',
    //data: data,
  });
}
export async function gettree(params) {
  return request('​/saasbase/api​/goodstype/tree', {
    method: 'GET',
    data: {
      ...params,
    },
  });
}

export async function unitList() {
  return request(`/saasbase/api/goods/getgoodsuintlist`, {
    method: 'Get',
  });
}
export async function addunit(data) {
  return request(`/saasbase/api/goods/addgoodsuint`, {
    method: 'Post',
    data: data,
  });
}
export async function getbygoodsidattribute (data) {
  return request(`/saasbase/api/goodsattribute/getbygoodsidattribute?id=`+data, {
    method: 'Get',
    // params: { ...params },
    // ...(options || {}),
  });
}export async function getbomlist() {
  return request('/saasbase/api/bom/getbomlist', {
    method: 'Get',
  });
}
export async function getproductpage(params) {
  return request('/saasbase/api/batching/getbatchingselectlist', {
    method: 'Get',
  });
}
export async function getbomtypepage(data) {
  return request(`/saasbase/api/bom/getbomtypepage`, {
    method: 'Post',
    data: data,
  });
}
export async function addgoodsbomattribute(data) {
  return request(`/saasbase/api/goods/addgoodsbomattribute`, {
    method: 'Post',
    data: data,
  });
}
export async function addgoodsbom(data) {
  return request(`/saasbase/api/goods/addgoodsbom`, {
    method: 'Post',
    data: data,
  });
}
export async function getbyidgoods (data) {
  return request(`/saasbase/api/goods/getbyidgoods?id=`+data, {
    method: 'Get'
    // params: { ...params },
    // ...(options || {}),
  });
}
export async function GetGoodsTechnology(data) {
  return request(`/saasbase/api/goodstechnology/GetGoodsTechnology`, {
    method: 'Post',
    data: data,
  });
}
export async function GetTechnologyactionList(data) {
  return request(`/saasbase/api/productfunction/getproductfunctionaction?productFunctionId=`+data, {
    method: 'Get',
  });
}
export async function GetTechnologyActionListAll() {
  return request(`/saasbase/api/productfunction/getproductfunctionactionlist`, {
    method: 'Get',
  });
}
export async function AddGoodsTechnologyAction(data) {
  return request(`/saasbase/api/goodstechnology/addgoodstechnologyaction`, {
    method: 'Post',
    data: data,
  });
}
export async function UpdateGoodsTechnologyAction(data) {
  return request(`/saasbase/api/goodstechnology/updategoodstechnologyaction`, {
    method: 'Post',
    data: data,
  });
}
export async function GetGoodsTechnologyAction(data) {
  return request(`/saasbase/api/goodstechnology/getGoodstechnologyaction?goodsId=`+data, {
    method: 'Get',
  });
}
export async function DeleteGoodsTechnologyAction(data) {
  return request(`/saasbase/api/goodstechnology/deletegoodstechnologyaction?id=`+data, {
    method: 'Get',
  });
}
export async function deletebydevidegoodstechnologyaction(data) {
  return request(`/saasbase/api/goodstechnology/deletebydevidegoodstechnologyaction`, {
    method: 'Post',
    data: data,
  });
}
export async function GetDeviceTechnology() {
  return request(`/saasbase/api/goodstechnology/getdevicetechnology`, {
    method: 'Get',
  });
}
export async function GetByTypebatching() {
  return request(`/saasbase/api/batching/getbytypebatching`, {
    method: 'Get',
  });
}