import request from '@/utils/request'

// 创建订单
export function createOrder(data) {
  return request({
    url: '/ecw/order/create',
    method: 'post',
    data: data
  })
}

// 更新订单
export function updateOrder(data) {
  return request({
    url: '/ecw/order/update',
    method: 'put',
    data: data
  })
}

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

// 获得订单
export function getOrder(orderId) {
  return request({
    url: '/ecw/order/info/' + orderId,
    method: 'get'
  })
}

// 获得订单分页
export function getOrderPage(query) {
  return request({
    url: '/ecw/order/page',
    method: 'get',
    params: query
  })
}

// 导出订单 Excel
export function exportOrderExcel(query) {
  return request({
    url: '/ecw/order/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 打印标签
export function printTag(id) {
  return request({
    url: '/order/print/orderTagPrint?orderId=' + id,
    method: 'get',
  })
}
//根据订单号获得订单费用申请列表
export function feeApplicationListByOrderId(query){
  return request({
    url:'/order/fee-application/listByOrderId',
    method: 'get',
    params: query,
  })
}
//费用申请提交
 export function feeApplicationCreate(data){
  return request({
    url:'order/fee-application/create',
    method:'post',
    data:data,
  })
 }
// 创建特殊
export  function specialNeedCreate(data){
  return request({
     url:'ecw/order-special-need/create',
    method:'post',
    data:data,
  })
}
