import server from '@/utils/request'

//新增
interface Addobj{
    pkId?:String
    stationCode:String	   //换电站编码
    dccNo:String|Number	   //电池仓序号
    status:String|Number   //状态：1-正常，2-检修， 3-坏
}

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

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

//查询
interface Querydata{
  pageSize:String|number,	    //每页条数
  pageNo:String|number	        //页数
  stationCode?:String            //换电站编码  
  proxyId?:String	            //归属运营商ID
}
export function getjqrlist(params:Querydata) {
  return server.request({
    url: '/cloud/battery/station/dcc/list',
    method: 'get',
    params
  })
}

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


