import request from '@/utils/request'

// 查询订单列表
export function payMiwp(data) {
  return request({
    url: '/gift/order/payMiwp',
    method: 'post',
    data: data
  })
}

// 查询订单列表
export function listOrder(query) {
  return request({
    url: '/gift/order/list',
    method: 'get',
    params: query
  })
}

// 查询订单列表
export function getPlace(data) {
  return request({
    url: '/app/getPlace',
    method: 'post',
    data: data
  })
}


// 查询订单详细
export function getOrder(orderId) {
  return request({
    url: '/gift/order/' + orderId,
    method: 'get'
  })
}
// 修改订单
export function updateOrder(data) {
  return request({
    url: '/gift/order',
    method: 'put',
    data: data
  })
}

// 修改订单
export function takeOrder(data) {
  return request({
    url: '/gift/order/takeOrder',
    method: 'post',
    data: data
  })
}
// 因错退还订单
export function partbackOrder(data) {
  return request({
    url: '/gift/order/partback',
    method: 'post',
    data: data
  })
}

// 删除订单
export function delOrder(orderId) {
  return request({
    url: '/gift/order/' + orderId,
    method: 'delete'
  })
}
// 导出订单
export function tjdcExport(query) {
  return request({
    url: '/gift/order/tjdcExport',
    method: 'get',
    params: query
  })
}

// 导出订单
export function exportOrder(query) {
  return request({
    url: '/gift/order/export',
    method: 'get',
    params: query
  })
}

// 作废订单
export function backOrder(data) {
  return request({
    url: '/gift/order/back' ,
    method: 'post',
    data:data
  })
}

// 查询订单汇总
export function listOrders(query) {
  return request({
    url: '/gift/order/lists',
    method: 'get',
    params: query
  })
}

export function sumOrderPay(query) {
  return request({
    url: '/gift/order/sumpay',
    method: 'get',
    params: query
  })
}

export function sumOrderNum(query) {
  return request({
    url: '/gift/order/sumordernum',
    method: 'get',
    params: query
  })
}
