import axios from '@/utils/request'

// 获取列表
export function systemPDFTemplateList(query) {
  return axios({
    url: "/system/pdf/template/list",
    method: "get",
    params: query
  });
}

export function systemPDFModuleList(query) {
  return axios({
    url: "/system/pdf/module/list",
    method: "get",
    params: query
  });
}

export function getSystemPDFModules(query) {
  return axios({
    url: "/system/pdf/module/pdfModules",
    method: "get",
    params: query
  });
}

export function getSystemPDFTemplates(query) {
  return axios({
    url: "/system/pdf/template/pdfTemplates",
    method: "get",
    params: query
  });
}

export function systemPDFTemplateSave(data, formName, method = "post") {
  let url = formName === "add" ? "/system/pdf/template/save" : "/system/pdf/template/update";
  return axios({
    url: url,
    method: method,
    data: data
  });
}

export function systemPDFModuleSave(data, formName, method = "post") {
  let url = formName === "add" ? "/system/pdf/module/save" : "/system/pdf/module/update";
  return axios({
    url: url,
    method: method,
    data: data
  });
}

export function systemPDFTemplateDeleteById(query) {
  return axios({
    url: "/system/pdf/template/delete",
    method: "post",
    data: query
  });
}

export function moduleBizDetail(query) {
  return axios({
    url: "/system/pdf/templateRelevanceBiz/getListByModelId",
    method: "post",
    data: query
  });
}


export function updateDetailRel(query) {
  return axios({
    url: "/system/pdf/templateRelevanceBiz/updateRl",
    method: "post",
    data: query
  });
}

export function moduleCodeDetail(query) {
  return axios({
    url: "/system/pdf/templateRelevanceCode/getListByModelId",
    method: "post",
    data: query
  });
}


export function updateCodeDetailRel(query) {
  return axios({
    url: "/system/pdf/templateRelevanceCode/updateRl",
    method: "post",
    data: query
  });
}

export function moduleLabelDetail(query) {
  return axios({
    url: "/system/pdf/templateRelevanceLabel/getListByModelId",
    method: "post",
    data: query
  });
}


export function updateLabelDetailRel(query) {
  return axios({
    url: "/system/pdf/templateRelevanceLabel/updateRl",
    method: "post",
    data: query
  });
}


export function moduleStatementDetail(query) {
  return axios({
    url: "/system/pdf/templateRelevanceStatement/getListByModelId",
    method: "post",
    data: query
  });
}


export function updateStatementDetailRel(query) {
  return axios({
    url: "/system/pdf/templateRelevanceStatement/updateRl",
    method: "post",
    data: query
  });
}

