import request from "@/utils/request";

// 创建不良代码
export function createBadTemsM(data) {
  return request({
    url: "/rtkqms/bad-code/create",
    method: "post",
    data: data,
  });
}

// 更新不良代码
export function updateBadTemsM(data) {
  return request({
    url: "/rtkqms/bad-code/update",
    method: "put",
    data: data,
  });
}

// 删除不良代码
export function deleteBadTemsM(id) {
  return request({
    url: "/rtkqms/bad-code/delete?id=" + id,
    method: "delete",
  });
}

// 获得不良代码
export function getBadTemsM(id) {
  return request({
    url: "/rtkqms/bad-code/get?id=" + id,
    method: "get",
  });
}

// 获得不良代码	分页
export function getBadTemsMPage(query) {
  return request({
    url: "/rtkqms/bad-code/page",
    method: "get",
    params: query,
  });
}

// 导出不良代码	 Excel
export function exportBadTemsMExcel(query) {
  return request({
    url: "/rtkqms/bad-code/export-excel",
    method: "get",
    params: query,
    responseType: "blob",
  });
}
