import { request } from "./request";
// 新建:
const addDeclareBill = (params) => {
  return request("/worn/declareBill/add", params, "POST");
};
// 列表
const declareList = (params) => {
  return request("/worn/declareBill/list", params, "get");
};
// 物资查询
const stockList = (params) => {
  return request("/worn/statistics/stock/list", params, "get");
};
// http://192.168.1.9:8081/worn/aging/stock/list?warehouseCode=101&keyword=蓄电池
// 详情
const declareBillDetail = (params) => {
  return request("/worn/declareBill/detail", params, "get");
};
// 编辑
const declareBillUpdate = (params) => {
  return request("/worn/declareBill/update", params, "put");
};
// 作废
const declareBillVoid = (params) => {
  return request(`/worn/declareBill/cancel/${params.id}`, params, "put");
};

export {
  addDeclareBill,
  declareList,
  declareBillDetail,
  declareBillVoid,
  declareBillUpdate,
  stockList,
};
