import request from "@/utils/request";
import { Product_BaseUrl } from "@/api/config";
const baseURL = Product_BaseUrl + "/admin/product/stock";
// 耗材
const Api = {
  /** 耗材入库*/
  in(data: any) {
    return request<any>({
      url: `${baseURL}/in`,
      method: "post",
      data,
    });
  },
  //出库
  out(data: any) {
    return request<any>({
      url: `${baseURL}/out`,
      method: "post",
      data,
    });
  },
  // 库存盘点记录
  checkRecord(params: any) {
    return request<any>({
      url: `${baseURL}/checkRecord`,
      method: "get",
      params,
    });
  },
  //库存盘点
  check(data: any) {
    return request<any>({
      url: `${baseURL}/check`,
      method: "post",
      data,
    });
  },
  //耗材报损
  reportDamage(data: any) {
    return request<any>({
      url: `${baseURL}/reportDamage`,
      method: "post",
      data,
    });
  },
  //耗材库存变动记录
  flow(params: any) {
    return request<any>({
      url: `${baseURL}/flow`,
      method: "get",
      params,
    });
  },
};

export default Api;
