print.js 1.52 KB
/*
 * @Description: 模板管理
 * @Autor: renchao
 * @LastEditTime: 2023-05-16 16:02:32
 */

import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))

/**
 * @description: 获取打印模板列表
 * @param {*} data
 * @author: renchao
 */
export function selectPrintTemplateList (data) {
  return request({
    url: SERVER.SERVERAPI + '/rest/system/print/selectPrintTemplateList',
    method: 'post',
    data
  })
}

/**
 * @description: 新增打印模板列表
 * @param {*} data
 * @author: renchao
 */
export function addPrintTemplate (data) {
  return request({
    url: SERVER.SERVERAPI + '/rest/system/print/addPrintTemplate',
    method: 'post',
    data
  })
}

/**
 * @description: 编辑打印模板列表
 * @param {*} data
 * @author: renchao
 */
export function editPrintTemplate (data) {
  return request({
    url: SERVER.SERVERAPI + '/rest/system/print/editPrintTemplate',
    method: 'post',
    data
  })
}

/**
 * @description: 删除打印模板列表
 * @param {*} params
 * @author: renchao
 */
export function delPrintTemplate (params) {
  return request({
    url: SERVER.SERVERAPI + '/rest/system/print/delPrintTemplate',
    method: 'get',
    params: params
  })
}

/**
 * @description: 根据模板编号获取打印模板
 * @param {*} params
 * @author: renchao
 */
export function getPrintTemplateByCode (params) {
  return request({
    url: SERVER.SERVERAPI + '/rest/system/print/getPrintTemplateByCode',
    method: 'get',
    params: params
  })
}