import server from '@/utils/request'

//新增
interface Addobj{
    stationCode:String	             //换电站编码
    standardId:String	             //收费规则ID
    timeBegin:String	             //开始时间
    timeEnd:String	                 //结束时间
    pkId?:String
    eachKmFee?:String|Number	     //每公里收费
    eachSocFee?:String|Number	     //每SOC收费
    eachKwhFee?:String|Number	     //每度电收费
    serviceFee?:String|Number	      //谷段服务费
}

export function addhdz(data:Addobj) {
  return server.request({
    url: '/cloud/battery/station/fee/detail/add',
    method: 'post',
    data
  })
}

//修改
export function update(data:Addobj) {
  return server.request({
    url: '/cloud/battery/station/fee/detail/update',
    method: 'post',
    data
  })
}

//查询
interface Querydata{
  standardId:String           //收费规则id  
}
export function getmxlist(params:Querydata) {
  return server.request({
    url: '/cloud/battery/station/fee/detail/list',
    method: 'get',
    params
  })
}

//删除
export function delhdz(id:string) {
  return server.request({
    url: '/cloud/battery/station/fee/detail/del',
    method: 'post',
    data:{
      id
    }
  })
}


