import request from '@/utils/request'
/* 获取模版列表 */
export function getSMSList(params) {
    return request({
      url: '/admin/erp/SmsMailTemplate',
      method: 'get',
      loaidng: false,
      params
    })
  }
  /* 创建模版 */
  export function addTemplate(parmas) {
    return request({
      url: `/admin/erp/SmsMailTemplate/createTemplate`,
      method: 'post',
      headers: { 'Content-Type': 'application/json' },
      data: parmas
    })
  }

  /*编辑模版*/

export function editTemplate(id,parmas) {
  return request({
    url: `/admin/erp/SmsMailTemplate/updateTemplate/${id}`,
    method: 'post',
    headers: { 'Content-Type': 'application/json' },
    data: parmas
  })
}

/* 修改状态  */

export function editStatus(id) {
  return request({
    url: `/admin/erp/SmsMailTemplate/alterStatus/${id}`,
    method: 'post',
    headers: { 'Content-Type': 'application/json' },
  })
}

/* 删除模版 */
export function delTemplate(id,parmas) {
    return request({
      url: `/admin/erp/SmsMailTemplate/delete/${id}`,
      method: 'post',
      headers: { 'Content-Type': 'application/json' },
      data: parmas
    })
  }

/* 获取上级模板列表 */
export function getPidList(type) {
  return request({
    url: `/admin/erp/SmsMailTemplate/getSysNotBand/${type}`,
    method: 'get',
    loaidng: false,
  })
}
/* 获取套餐详情 */
export function companyPackage(id) {
  return request({
    url: `/admin/erp/companyPackage/${id}`,
    method: 'get',
    loaidng: false,
  })
}