import request from '@/utils/request'

// 查询隶属企业信息列表
export function listEnterprise(query) {
  return request({
    url: '/basicData/xcrAffiliatedEnterprise/findByPage',
    method: 'get',
    params: query
  })
}

// 查询隶属企业信息详细
export function getEnterprise(xhCodeId) {
  return request({
    url: '/basicData/xcrAffiliatedEnterprise/' + xhCodeId,
    method: 'get'
  })
}

// 新增隶属企业信息
export function addEnterprise(data) {
  return request({
    url: '/basicData/xcrAffiliatedEnterprise',
    method: 'post',
    data: data
  })
}

// 修改隶属企业信息
export function updateEnterprise(data) {
  return request({
    url: '/basicData/xcrAffiliatedEnterprise',
    method: 'put',
    data: data
  })
}

// 删除隶属企业信息
export function delEnterprise(xhCodeId) {
  return request({
    url: '/basicData/xcrAffiliatedEnterprise/deleteAll',
    method: 'delete'
  })
}
// 批量删除行政许可
export function delEnterpriseBatch(ids) {
  return request.post('/basicData/xcrAffiliatedEnterprise/delete',ids)
}
