import request from '@/utils/request'

// 查询委派代信息列表
export function listDelegates(query) {
  return request({
    url: '/basicData/xcrAppointDelegates/findByPage',
    method: 'get',
    params: query
  })
}

// 查询委派代信息详细
export function getDelegates(xhCodeId) {
  return request({
    url: '/basicData/xcrAppointDelegates/' + xhCodeId,
    method: 'get'
  })
}

// 新增委派代信息
export function addDelegates(data) {
  return request({
    url: '/basicData/xcrAppointDelegates',
    method: 'post',
    data: data
  })
}

// 修改委派代信息
export function updateDelegates(data) {
  return request({
    url: '/basicData/xcrAppointDelegates',
    method: 'put',
    data: data
  })
}

// 删除委派代信息
export function delDelegates(xhCodeId) {
  return request({
    url: '/basicData/xcrAppointDelegates/deleteAll',
    method: 'delete'
  })
}
// 批量删除行政许可
export function delDelegatesBatch(ids) {
  return request.post('/basicData/xcrAppointDelegates/delete',ids)
}
