// 系统专项设置api文件
import request from '@/utils/request'
import request2 from '@/utils/request2'

import qs from 'qs'
let api = '/api-web'
// 订单列表
export function orderQueryPage (data) {
  return request({
    url: api + '/order/queryPage',
    method: 'get',
    params: data
  })
}

// 订单列表
export function orderQueryPage1 (data) {
  return request({
    url: api + '/order/queryPage1',
    method: 'get',
    params: data
  })
}

// 订单列表
export function orderQueryPage2 (data) {
  return request({
    url: api + '/order/queryPage2',
    method: 'get',
    params: data
  })
}

// 财务列表
export function orderFinance (data) {
  return request({
    url: api + '/order/finance',
    method: 'get',
    params: data
  })
}

// 财务列表
export function routeOrderFinance (data) {
  return request({
    url: api + '/routeOrder/finance',
    method: 'get',
    params: data
  })
}

// 添加财务列表
export function routeOrderAdd (data) {
  return request({
    url: api + '/routeOrder/add',
    method: 'post',

    headers: {
      'Content-Type': 'application/json',
    },
    data,
  })
}

// 退费管理
export function studentRefundsQueryPage (data) {
  return request({
    url: api + '/studentRefunds/queryPage',
    method: 'get',
    params: data
  })
}

// 退费
export function applyRefundAudit (data) {
  return request({
    url: api + '/vipGroupManage/applyRefundAudit',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 提现
export function studentWithdraw (data) {
  return request({
    url: api + '/studentWithdraw/queryPage',
    method: 'get',
    params: data
  })
}

// 确认提现
export function studentWithdrawConfirm (data) {
  return request({
    url: api + '/studentWithdraw/confirm',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 发放清单
export function verifyMusicalList (data) {
  return request({
    url: api + '/order/verifyMusicalList',
    method: 'GET',
    params: data
  })
}

// 充值列表分页查询
export function studentRechargeList (data) {
  return request({
    url: api + '/studentRecharge/queryPage',
    method: 'GET',
    params: data
  })
}

// 对外订单 orderQueryPage
export function tenantPaymentOrder (data) {
  return request({
    url: api + '/tenantPaymentOrder/queryPage',
    method: 'GET',
    params: data
  })
}

// 查询订单状态
export function getOrderStatus (data) {
  return request({
    url: api + '/order/getOrderStatus',
    method: 'GET',
    params: data
  })
}

// 财务支出列表
export function getFinancialExpenditure (data) {
  return request({
    url: api + '/financialExpenditure/queryPage',
    method: 'GET',
    params: data
  })
}

// 财务支出删除
export function removeFinancialExpenditure (data) {
  return request({
    url: api + '/financialExpenditure/batchDel',
    method: 'POST',
    params: data
  })
}

// 财务支出更新
export function updateFinancialExpenditure (data) {
  return request({
    url: api + '/financialExpenditure/update',
    method: 'POST',
    data
  })
}

// 经营报表列表
export function getOperatingReport (data) {
  return request({
    url: api + '/operatingReport/queryPage',
    method: 'GET',
    params: data
  })
}

// 销售列表
export function getSellOrder (data) {
  return request({
    url: api + '/sellOrder/queryPage',
    method: 'GET',
    params: data
  })
}

// 销售列表修改成本
export function updateSellOrder (data) {
  return request({
    url: api + '/sellOrder/update',
    method: 'POST',
    params: data
  })
}

// 销售列表退费
export function refundSellOrder (data) {
  return request2({
    url: api + '/sellOrder/refund',
    method: 'POST',
    params: data,
    hint: true
  })
}

// 获取订单详情
export function getOrderInfo (data) {
  return request({
    url: api + '/routeOrder/getOrderInfo',
    method: 'GET',
    params: data
  })
}

// 删除订单
export function orderDelete (data) {
  return request({
    url: api + '/routeOrder/delete',
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 审核列表查询
export function getRouteOrderList (data) {
  return request({
    url: api + '/routeOrder/queryPage',
    method: 'get',
    params: data
  })
}

// 审核详情
export function getRouteOrderInfo (data) {
  return request({
    url: api + '/routeOrder/query',
    method: 'get',
    params: data
  })
}

// 订单审核
export function auditOutOrder (data) {
  return request({
    url: api + '/routeOrder/auditOutOrder',
    method: 'post',
    data: qs.stringify(data)
  })
}


// 修改审核订单
export function updateRouteOrder (data) {
  return request({
    url: api + '/routeOrder/update',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'application/json',
    },
  })
}

