import request from '@/utils/request'

// 查询小微企业名录基本信息列表
export function listEnterprises(query) {
  return request({
    url: '/basicData/xcrSmallAndMicroEnterprises/findByPage',
    method: 'get',
    params: query
  })
}

// 查询小微企业名录基本信息详细
export function getEnterprises(xhCodeId) {
  return request({
    url: '/basicData/xcrSmallAndMicroEnterprises/' + xhCodeId,
    method: 'get'
  })
}

// 新增小微企业名录基本信息
export function addEnterprises(data) {
  return request({
    url: '/basicData/xcrSmallAndMicroEnterprises',
    method: 'post',
    data: data
  })
}

// 修改小微企业名录基本信息
export function updateEnterprises(data) {
  return request({
    url: '/basicData/xcrSmallAndMicroEnterprises',
    method: 'put',
    data: data
  })
}

// 删除小微企业名录基本信息
export function delEnterprises(xhCodeId) {
  return request({
    url: '/basicData/xcrSmallAndMicroEnterprises/deleteAll',
    method: 'delete'
  })
}
// 批量删除行政许可
export function delEnterprisesBatch(ids) {
  return request.post('/basicData/xcrSmallAndMicroEnterprises/delete',ids)
}
