import server from '@/utils/request'

//新增
interface Addobj{
  pkId?:String,
  typeName:String,	        //类型名称
  typeCode:String,	        //类型编码
  manufacturer:String,	    //车辆厂商
  announceNum:String	      //公告号

}

export function adddicttype(data:Addobj) {
  return server.request({
    url: '/resource/cartype/add',
    method: 'post',
    data
  })
}

//修改
export function update(data:Addobj) {
  return server.request({
    url: '/resource/cartype/update',
    method: 'post',
    data
  })
}

//查询
interface Querydata{
  pageSize:String|number,	  //每页条数
  pageNo:String|number	    //页数
}
export function getdicttype(params:Querydata) {
  return server.request({
    url: '/resource/cartype/list',
    method: 'get',
    params
  })
}

//删除
export function deltype(id:string) {
  return server.request({
    url: '/resource/cartype/del',
    method: 'post',
    data:{
      id
    }
  })
}


