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

//政策列表V2-导出
export function exportFinanceOtherReceListV2(data, name) {
  return postBlob({
    url: '/finance/other/rece/listExport/v2',
    method: 'post',
    data,
    name
  })
}
// 其他应收单-新增
export function getFinanceOtherReceAdd(data) {
  return request({
    url: '/finance/other/rece/add',
    method: 'post',
    data
  })
}
// 经销商列表
export function getCustomerList(params) {
  return request({
    url: '/customer/list',
    method: 'get',
    params
  })
}
// 经销商钱包列表
export function getFinanceCustomerList(params) {
  return request({
    url: '/finance/customer/list',
    method: 'get',
    params
  })
}
// 其他应收单-列表
export function getFinanceOtherReceList(params) {
  return request({
    url: '/finance/other/rece/list',
    method: 'get',
    params
  })
}

// 其他应收单-提审
export function getFinanceOtherReceApply(params) {
  return request({
    url: '/finance/other/rece/apply',
    method: 'post',
    params
  })
}
// 其他应收单-详情
export function getFinanceOtherReceDetail(params) {
  return request({
    url: '/finance/other/rece/detail',
    method: 'get',
    params
  })
}
// 其他应收单-审核
export function getFinanceOtherReceExamine(params) {
  return request({
    url: '/finance/other/rece/examine',
    method: 'post',
    params
  })
}
// 其他应收单-删除
export function getFinanceOtherReceDelete(params) {
  return request({
    url: '/finance/other/rece/delete',
    method: 'post',
    params
  })
}
// 其他应收单-弃审
export function getFinanceOtherReceAbandon(params) {
  return request({
    url: '/finance/other/rece/abandon',
    method: 'post',
    params
  })
}
// 其他应收单-修改
export function getFinanceOtherReceUpdate(data) {
  return request({
    url: '/finance/other/rece/update',
    method: 'post',
    data
  })
}
// 其他应收单-关闭
export function financeOtherReceClose(data) {
  return request({
    url: '/finance/other/rece/close',
    method: 'get',
    params: data
  })
}

export function financeReceImportDataImport(data) {
  return handleImport('finance/rece/import/dataImport', data.formdata, data.id || '')
}

export function financeOtherReceCancelApply(params) {
  return request({
    url: '/finance/other/rece/cancelApply',
    method: 'post',
    params: params
  })
}
