import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listInfo(query) {
  return request({
    url: '/finance/reward/list',
    method: 'get',
    params: query
  })
}

export function totalListInfo(query) {
  return request({
    url: '/finance/reward/totalListInfo',
    method: 'get',
    params: query
  })
}


export function getItemName(query) {
  return request({
    url: '/finance/reward/getItemName',
    method: 'get',
    params: query
  })
}

export function getPromoterName(query) {
  return request({
    url: '/finance/reward/getPromoterName',
    method: 'get',
    params: query
  })
}

export function getTotalSettlementNum(query) {
  return request({
    url: '/finance/reward/getTotalSettlementNum',
    method: 'get',
    params: query
  })
}

export function getTotalAmount(query) {
  return request({
    url: '/finance/reward/getTotalAmount',
    method: 'get',
    params: query
  })
}


export function updateStatus(data) {
  return request({
    url: '/finance/reward/updateStatus',
    method: 'post',
    data: data
  })
}


export function getTotal(query) {
  return request({
    url: '/finance/reward/getTotal',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getInfo(id) {
  return request({
    url: '/finance/reward/' + id,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addInfo(data) {
  return request({
    url: '/finance/reward/add',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateInfo(data) {
  return request({
    url: '/finance/reward',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delInfo(id) {
  return request({
    url: '/finance/reward/' + id,
    method: 'delete'
  })
}



export function importData(query) {
  return request({
    url: '/isv/supply_chain/insertRewardBaseInfoByExcel',
    method: 'post',
    data: query
  })
}
