import { request } from 'umi';

/** 获取商品物料库存  */
export async function GetStoreBatchingStockPageAsync(data) {
  return request(`/kitchen/api/store-info/store-batching-stock-page`, {
    method: 'POST',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}

/** 添加商品物料库存  */
export async function AddStoreBatchingStocAsync(data) {
  return request(`/kitchen/api/store-info/store-batching-stoc`, {
    method: 'POST',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}

/** 修改商品物料库存  */
export async function UpdateStoreBatchingStocAsync(data) {
  return request(`/kitchen/api/store-info/store-batching-stoc`, {
    method: 'put',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}

/** 获取商品  */
export async function GetGoodsAsync(data) {
  data = {
    current: 1,
    pageSize: 1000,
  };
  return request(`/kitchen/api/goods/goodss`, {
    method: 'post',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}

/** 获取原料  */
export async function GetBatchingAsync(data) {
  //params

  return request(`/kitchen/api/frachisee-stock-adjust/product-lists`, {
    method: 'post',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}

/** 同步库存  */
export async function PushStockAsync(data) {
  return request(`/kitchen/api/store-info/push-stock/${data}`, {
    method: 'post',
    // params: { ...params },
    // ...(options || {}),
  });
}

/** 获取实时库存  */
export async function CheckStockAdjust(data) {
  return request(`/kitchen/api/frachisee-stock-adjust/check-stock-adjust/${data}`, {
    method: 'POST',
    // params: { ...params },
    // ...(options || {}),
  });
}
export async function removeSingleStockAdjust(data) {
  return request(`/kitchen/api/store-info/${data}`, {
    method: 'DELETE',
    // data: data,
    // ...(options || {}),
  });
}
