import { axios } from '@/utils/request'

// 轮胎补贴配置列表  有分页
export const tireSubsidyRuleList = (params) => {
  const url = `/subsidyRule/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post',
    headers: {
      'module': encodeURIComponent('列表查询')
    }
  })
}

// 新增  根据客户名称获取运费金额/补贴金额
export const getSubsidyRuleList = (params) => {
  return axios({
    url: '/subsidyRule/getSubsidyRuleList',
    data: params,
    method: 'post'
  })
}

// 保存
export const subsidyRuleSave = (params) => {
  return axios({
    url: '/subsidyRule/save',
    data: params,
    method: 'post'
  })
}

// 新增保存  错误提示
export const createSubsidyRule = (params) => {
  return axios({
    url: '/subsidyRule/createSubsidyRule',
    data: params,
    method: 'post'
  })
}

// 删除
export const delSubsidyRule = (params) => {
  return axios({
    url: '/subsidyRule/delSubsidyRule',
    data: params,
    method: 'post'
  })
}

// 结束
export const endSubsidyRule = (params) => {
  return axios({
    url: '/subsidyRule/endSubsidyRule',
    data: params,
    method: 'post'
  })
}

// 编辑
export const editSubsidyRule = (params) => {
  return axios({
    url: '/subsidyRule/edit',
    data: params,
    method: 'post'
  })
}
