import { axios } from '@/utils/request'

// 经销商账户列表   有分页
export const dealerAccountList = (params) => {
  const url = `/dealerAccount/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post',
    headers: {
      'module': encodeURIComponent('经销商账户列表查询')
    }
  })
}
//  经销商账户  轮胎补贴金额详情列表   有分页
export const dealerAccountFlowList = (params) => {
  const url = `/dealerAccountFlow/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post',
    headers: {
      'module': encodeURIComponent('轮胎补贴金额列表查询')
    }
  })
}

// 调账  保存
export const dealerAccountSubmit = (params) => {
  return axios({
    url: '/dealerAccountChange/submit',
    data: params,
    method: 'post',
    headers: {
      'module': encodeURIComponent('保存')
    }
  })
}

// 调账记录  列表  有分页
export const dealerAccountRecordList = (params) => {
  const url = `/dealerAccountChange/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post',
    headers: {
      'module': encodeURIComponent('调账记录列表查询')
    }
  })
}
//  轮胎补贴金额 导出
export const dealerAccountFlowExport = (params) => {
  return axios({
    url: '/dealerAccountFlow/exportExcel',
    data: params,
    method: 'post',
    responseType: 'blob',
    headers: {
      'module': encodeURIComponent('导出')
    }
  })
}

// 经销商账户  列表导出
export const dealerAccountExport = (params) => {
  return axios({
    url: '/dealerAccount/exportExcel',
    data: params,
    method: 'post',
    responseType: 'blob',
    headers: {
      'module': encodeURIComponent('导出')
    }
  })
}

// 经销商账户  统计
export const queryDealerAccount = (params) => {
  return axios({
    url: '/dealerAccount/queryDealerAccount',
    data: params,
    method: 'post',
    headers: {
      'module': encodeURIComponent('保存')
    }
  })
}
