import server from '@/utils/request'

//新增
interface Addobj{
  stationCode:String	              //换电站编码
  dayBegin:String	                  //开始时间
  dayEnd:String	                    //结束时间
  name:String	                      //费用标准名称
  pkId?:String
  stationName:String	              //换电站名称
  commonRemainFee?:String	          //正常换电服务费
  commonRemainSocRange?:String	    //换电时正常电量范围
  moreRemainSoc?:String	            //换电时电量剩余过多的soc界定
  moreRemainFee?:String	            //换电时电量剩余过多的服务费
  fewRemainSoc?:String	            //换电时电量剩余一般的soc界定
  fewRemainFee?:String	            //换电时电量剩余一般的服务费
  eachKmFee?:String	                //每公里收费
  eachSocFee?:String	              //每SOC收费
  eachKwhFee?:String	              //每度电收费
}

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

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

//查询
interface Querydata{
  stationCode:String          //换电站编码  
}
export function getjqrlist(params:Querydata) {
  return server.request({
    url: '/cloud/battery/station/fee/list',
    method: 'get',
    params
  })
}

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


