import request from "@/api";

// 获取表头数据
export function getInPage(data: any) {
  return request({
    url: `/admin/in/page`,
    method: "get",
    params: data
  });
}

// 添加数据
export function addInData(data: any) {
  return request({
    url: `/admin/in`,
    method: "post",
    data
  });
}

// 修改数据
export function updateInData(data: any) {
  return request({
    url: `/admin/in`,
    method: "put",
    data
  });
}
// 删除数据
export function deleteInData(id: string) {
  return request({
    url: `/admin/in/${id}`,
    method: "delete"
  });
}
// 查看数据
export function lookInData(id: string) {
  return request({
    url: `/admin/in/indound/${id}`,
    method: "get"
  });
}

// 物资类别
export function dictTree(data: any) {
  return request({
    url: `/admin/sys/dict/tree/1`,
    method: "get",
    params: data
  });
}
// 预览
export function sysFile(filePart: string) {
  return request({
    url: `/admin/sysFile/${filePart}`,
    method: "get",
    responseType: "blob"
  });
}
