import request from "@/utils/request";

// 创建编号规则明细
export function createNumRuleDetails(data) {
  return request({
    url: "/infra/numRuleDetails/add",
    method: "post",
    data: data,
  });
}

// 更新编号规则明细
export function updateNumRuleDetails(data) {
  return request({
    url: "/infra/numRuleDetails/edit",
    method: "put",
    data: data,
  });
}

// 删除编号规则明细
export function deleteNumRuleDetails(id) {
  return request({
    url: "/infra/numRuleDetails/delete?id=" + id,
    method: "delete",
  });
}

// 获得编号规则明细
export function getNumRuleDetails(id) {
  return request({
    url: "/infra/numRuleDetails/query?id=" + id,
    method: "get",
  });
}

// 获得编号规则明细分页
export function getNumRuleDetailsPage(query) {
  return request({
    url: "/infra/numRuleDetails/list",
    method: "get",
    params: query,
  });
}

// 导出编号规则明细 Excel
export function exportNumRuleDetailsExcel(query) {
  return request({
    url: "/infra/numRuleDetails/export-excel",
    method: "get",
    params: query,
    responseType: "blob",
  });
}
