import request from '@/utils/request'

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

// 查询订单详细
export function getOrder(orderCode) {
  return request({
    url: '/order/orderDetail/' + orderCode,
    method: 'get'
  })
}

// 新增订单
export function addOrder(data) {
  return request({
    url: '/order/order',
    method: 'post',
    data: data
  })
}

// 修改订单
export function updateOrder(data) {
  return request({
    url: '/order/order',
    method: 'put',
    data: data
  })
}

// 删除订单
export function delOrder(id) {
  return request({
    url: '/order/order/' + id,
    method: 'delete'
  })
}

// 获取订单总金额
export function totalData(query) {
  return request({
    url: '/order/order/totalData',
    method: 'get',
    params: query
  })
}

export function manualSettlementOrder(data) {
  return request({
    url: '/order/manualSettlementOrder',
    method: 'post',
    data: data
  })
}
