import request from "@/utils/request";

// 采购退料列表
export function getPurchaseBadRrteurnPage(query) {
  return request({
    url: "/rtkwms/purchase-bad-return/page",
    method: "get",
    params: query,
  });
}

// 取走采购退料
export function takeAwayBadReturn(data) {
  return request({
    url: "/rtkwms/purchase-bad-return/takeAway",
    method: "put",
    data,
  });
}

// 扫描物料信息
export function getMaterialToReturn(query) {
  return request({
    url: "/rtkwms/purchase-bad-return/getMaterialToReturn",
    method: "get",
    params: query,
  });
}

// 保存
export function createBatch(data) {
  return request({
    url: "/rtkwms/purchase-bad-return/createBatch",
    method: "post",
    data,
  });
}

// 删除
export function deleteBadReturn(id) {
  return request({
    url: "rtkwms/purchase-bad-return/delete?id=" + id,
    method: "delete",
  });
}
