import request from '@/utils/request'

// 查询清单列表信息
export function findchecknamelist(query) {
  return request({
    url: '/system/listselectlist/namelist',
    method: 'get',
    params: query
  })
}

// 查询清单信息
export function findchecklist(query) {
  return request({
    url: '/system/listselectlist/list',
    method: 'get',
    params: query
  })
}


//客户清单查询
export function findcheckcustomerlist(query) {
  return request({
    url: '/system/listselectlist/custlist',
    method: 'get',
    params: query
  })
}

//支行认领清单
export function orgClaimList(query) {
  return request({
    url: '/system/group/orgClaim',
    method: 'put',
    params: query
  })
}

//支行二次分配认领/system/campaign/allocate
export function allocateCustomerList(query) {
  return request({
    url: '/system/campaign/allocate',
    method: 'post',
    data: query
  })
}


// 根据groupid导出
export function exportCustData(query) {
  return request({
    url: '/system/listselectlist/export',
    method: 'POST',
    params: query,
    responseType: 'blob'
  })
}

//根据客户id查询客户详情
export function findCustDetail(query) {
  return request({
    url: '/system/grid/listSearch/CustomerDetail',
    method: 'get',
    params: query,
  })
}

//根据客户经理批量认领客户
export function custClaimCustomer(query) {
  return request({
    url: '/system/group/custIdsClaim',
    method: 'put',
    params: query,
  })
}
//个人详情
export function customerDetail(custId) {
  return request({
    url: `/system/grid/listSearch/CustomerDetail?custId=${custId}`,
    method: 'get',

  })
}
//商户详情
export function merchantDetail(custId) {
  return request({
    url: `/system/grid/listSearch/MerchantDetail?custId=${custId}`,
    method: 'get',

  })
}
//企业详情
export function businessDetail(custId) {
  return request({
    url: `/system/grid/listSearch/BusinessDetail?custId=${custId}`,
    method: 'get',

  })
}