import request, { postBlob, handleImport } from "@/utils/request";

export function partsTransList(data) {
  return request({
    url: `/parts/trans/list?moduleId=${data.moduleId}`,
    method: "post",
    data
  });
}

export function partsTransDel(params) {
  return request({
    url: `/parts/trans/del`,
    method: "post",
    params
  });
}

export function partsTransExport(data, name) {
  return postBlob({
    url: "/parts/trans/list/export",
    data,
    name
  });
}

export function partsTransImport(data) {
  return handleImport("parts/trans/import", data.formdata, data.id || "");
}
