import request from '@/utils/request'

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

// 查询订单详细
export function getMallOrderOrder(id) {
  return request({
    url: '/mall/mallOrderOrder/' + id,
    method: 'get'
  })
}

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

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

// 批量发货
export function deliveryByOrderIds(data) {
  return request({
    url: '/mall/mallOrderOrder/deliveryByOrderIds',
    method: 'post',
    data:data
  })
}

// 批量打印
export function batchPrintData(data) {
  return request({
    url: '/mall/mallOrderOrder/batchPrintData',
    method: 'post',
    data:data
  })
}

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

// 导出订单
export function exportMallOrderOrder(query) {
  return request({
    url: '/mall/mallOrderOrder/export',
    method: 'get',
    params: query
  })
}

// 查询订单详细
export function getOrderBackInfo(orderBackId) {
  return request({
    url: '/mall/mallOrderOrder/orderBack/' + orderBackId,
    method: 'get'
  })
}

// 导出
export function exportOrder(data) {
  return request({
    url: '/mall/mallOrderOrder/exportOrder',
    method: 'post',
    data:data
  })
}
