import request from '@/utils/request'

// 查询收费模板列表
export function listRule(query) {
  return request({
    url: '/system/rule/list',
    method: 'get',
    params: query
  })
}

// 查询收费模板详细
export function getRule(ruleId) {
  return request({
    url: '/system/rule/' + ruleId,
    method: 'get'
  })
}

// 新增收费模板
export function addRule(data) {
  return request({
    url: '/system/rule',
    method: 'post',
    data: data
  })
}

// 修改收费模板
export function updateRule(data) {
  return request({
    url: '/system/rule',
    method: 'put',
    data: data
  })
}

// 删除收费模板
export function delRule(ruleId) {
  return request({
    url: '/system/rule/' + ruleId,
    method: 'delete'
  })
}
