import request from '@/utils/new-request'
import { exportExcelNew } from '@/utils/filedown'

export function GetPager(data) {
  return request({
    url: 'CustomerAccount/GetPager',
    method: 'post',
    data
  })
}
export function Update(data) {
  return request({
    url: 'CustomerAccount/Update',
    method: 'post',
    data
  })
}

export function GetLogs(Id) {
  return request({
    url: 'CustomerAccount/GetLogs',
    params: { Id }
  })
}
export function GetAccountQuotaPager(data) {
  return request({
    url: 'CustomerAccount/GetAccountQuotaPager',
    method: 'post',
    data
  })
}
export function ApplySubmit(data) {
  console.log(data)
  return request({
    url: 'CustomerAccount/ApplySubmit',
    method: 'post',
    data
  })
}

export function QueryCustomerIncome(data) {
  console.log(data)
  return request({
    url: 'CustomerAccount/QueryCustomerIncome',
    method: 'post',
    data,
    timeout: 10 * 60 * 1000
  })
}

export function _outFinanceReport(data, name) {
  return exportExcelNew('/CustomerAccount/DownloadData', data, 'post', name)
}
