import request from '@/router/axios'

//查询当前人员任务列表
export function pageSettleTask(query) {
  return request({
    url: '/admin/settleNote/info/page',
    method: 'get',
    params: query
  })
}
export function pageTaskForSettle(query) {
  return request({
    url: '/admin/settleNote/settle/page',
    method: 'get',
    params: query
  })
}
//提交结算到财务
export function subSettleInfo(obj) {
  return request({
    url: '/admin/settleNote/subSettleInfo',
    method: 'post',
    data: obj
  })
}
export function saveSettleInfo(obj) {
  return request({
    url: '/admin/settleNote/saveSettleInfo',
    method: 'post',
    data: obj
  })
}

export function revokeSettle(obj) {
  return request({
    url: '/admin/settleNote/revokeSettle',
    method: 'post',
    data: obj
  })
}
export function singletSettle(obj) {
  return request({
    url: '/admin/settleNote/singletSettle',
    method: 'post',
    data: obj
  })
}
export function batchSettle(obj) {
  return request({
    url: '/admin/settleNote/batchSettle',
    method: 'post',
    data: obj
  })
}
export function getSettleInfo(obj) {
  return request({
    url: '/admin/settleNote/getSettleInfo',
    method: 'post',
    data: obj
  })
}

// 接单审核
export function selectSettleTask(query) {
  return request({
    url: '/admin/wmtask/selectSettleTask',
    method: 'get',
    params: query
  })
}

// 有效任务类型
export function getTaskTypeTree(query) {
  return request({
    url: '/admin/wmtasktype/getTaskTypeTree',
    method: 'get',
    params: query
  })
}

// 添加成员
export function saveTaskSettle(obj) {
  return request({
    url: '/admin/wmtask/saveTaskSettle',
    method: 'post',
    data: obj
  })
}

export function getTaskInfo(query) {
  return request({
    url: '/admin/wmtask/getTaskInfo',
    method: 'get',
    params: query
  })
}

// 任务类型展示
export function getListByScoreId(query) {
  return request({
    url: '/admin/wmscoretasktype/getListByScoreId',
    method: 'get',
    params: query
  })
}

// 根据id查询积分包
export function getPackageById(data) {
  return request({
    url: `/admin/wmscorepackage/${data.id}`,
    method: 'get'
  })
}

// 结算包结算记录-导出
export function exportSettlePackage(query) {
  return request({
    url: '/admin/settleNote/settle/export',
    method: 'get',
    params: query,
    responseType: 'arraybuffer'
  })
}
