import { request } from 'umi';
/**获取位置配置 */
export async function getloc(data) {
  return request(`/kitchen/api/deviceconfig/getlocs?Code=${data}`, {
    method: 'GET',
  });
}
/** 获取商品物料库存  */
export async function GetStoreBatchingStockPageAsync(data) {
  return request(`/kitchen/api/Device/GetDeviceStorePage`, {
    method: 'POST',
    data: data,
  });
}

/** 同步库存  */
export async function PushDeviceTMC(data) {
  return request(`/kitchen/api/Device/PushDeviceTMC?DeviceId=${data}`, {
    method: 'post',
  });
}

/** 同步库存  */
export async function PushStockAsync(data) {
  return request(`/kitchen/api/Device/PushDevice?DeviceId=${data}`, {
    method: 'post',
  });
}

/** 同步库存  */
export async function PushDeviceTMC_MT(data) {
  return request(`/kitchen/api/Device/PushDeviceTMC_MT?DeviceId=${data}`, {
    method: 'post',
  });
}

/** 获取实时库存  */
export async function CheckStockAdjust(data) {
  return request(`/kitchen/api/Device/CheckStockAdjust?DeviceId=${data}`, {
    method: 'POST',
  });
}
/** 获取实时库存  */
export async function CheckStockTMCAdjust(data) {
  return request(`/kitchen/api/Device/CheckStockTMCAdjust?DeviceId=${data}`, {
    method: 'POST',
  });
}



/** 添加商品物料库存  */
export async function AddStoreBatchingStocAsync(data) {
  return request(`/kitchen/api/Device/AddUpdateDeviceStocAsync`, {
    method: 'POST',
    data: data,
  });
}

/** 获取原料  */
export async function GetProductListByBom(data) {
  return request(`/kitchen/api/Device/GetProductListByBom`, {
    method: 'post',
    data: data,
  });
}

/** 获取原料  */
export async function GetBatchingAsync(data) {
  return request(`/kitchen/api/Device/GetProductList`, {
    method: 'post',
    data: data,
  });
}

/** 修改商品物料库存  */
export async function UpdateStoreBatchingStocAsync(data) {
  return request(`/kitchen/api/Device/AddUpdateDeviceStocAsync`, {
    method: 'put',
    data: data,
  });
}
export async function removeSingleStockAdjust(data) {
  return request(`/kitchen/api/Device/DelStockAdjust?Id=${data}`, {
    method: 'DELETE',
    // data: data,
    // ...(options || {}),
  });
}


