import request, { postBlob, handleImport, getBlob } from '@/utils/request'
export function getListCodeV2(params) {
  return request({
    url: `/customer/code/list/v2?moduleId=${params.moduleId}`,
    method: 'post',
    data: params
  })
}

export function getListInstallCodeV2(params) {
  return request({
    url: `/customer/install/list?moduleId=${params.moduleId}`,
    method: 'post',
    data: params
  })
}
export function exportInstallListCodeV2(data, name) {
  return postBlob({
    url: '/customer/install/list/export',
    data,
    name
  })
}

export function exportListCodeV2(data, name) {
  return postBlob({
    url: '/customer/code/user/export/v2',
    data,
    name
  })
}

export function getListCustomerCodeV2(params) {
  return request({
    url: `/customer/code/listCustomer/v2?moduleId=${params.moduleId}`,
    method: 'post',
    data: params
  })
}

export function exportListCustomerCodeV2(data, name) {
  return postBlob({
    url: '/customer/code/listCustomer/export/v2',
    data,
    name
  })
}

export function importListCustomerCodeV2(data) {
  return handleImport('customer/code/import', data.formdata, data.id || '')
}

export function luBaoDownloadDownload(data, name) {
  return getBlob({
    url: '/customer/code/ShangJiaDownload',
    data,
    name
  })
}

export function getListCustomerCheckV2(params) {
  return request({
    url: `/customer/code/listCustomerCheck/v2?moduleId=${params.moduleId}`,
    method: 'post',
    data: params
  })
}

export function exportListCustomerCheck(data, name) {
  return postBlob({
    url: '/customer/code/listCustomerCheck/export/v2',
    data,
    name
  })
}

export function importListCustomerCheck(data) {
  return handleImport('customer/code/importCheck', data.formdata, data.id || '')
}

export function listCustomerCheckDownload(data, name) {
  return getBlob({
    url: '/customer/code/download',
    data,
    name
  })
}

export function getListDaCangV2(params) {
  return request({
    url: `/customer/code/listDaCang/v2?moduleId=${params.moduleId}`,
    method: 'post',
    data: params
  })
}

export function exportListDaCangV2(data, name) {
  return postBlob({
    url: '/customer/code/listDaCang/export/v2',
    data,
    name
  })
}
