import request from '@/utils/request'

// 获取订单列表
export function getList(data) {
  return request({
    url: '/order/getorderlist',
    method: 'get',
    params: data
  })
}

// 获取商品列表
export function getGoodsList(data) {
  return request({
    url: '/goods/getgoodsinfo',
    method: 'get',
    params: data
  })
}

// 代下单
export function addOrder(data) {
  return request({
    url: '/order/uploadorder',
    method: 'post',
    data
  })
}

// 删除订单
export function deleteOrder(data) {
  return request({
    url: '/order/destoryorder',
    method: 'post',
    data
  })
}

// 导出
export function exportOrder(data) {
  return request({
    url: '/order/exportorderlist',
    method: 'get',
    params: data
  })
}

// 下载
export function downOrder(data) {
  return request({
    url: '/orders/down_load',
    method: 'post',
    data
  })
}
// 导出金额
export function downList(params) {
  return request({
    url: '/data/order_list_down',
    method: 'get',
    params
  })
}

// 拆单
export function toExport(params) {
  return request({
    url: '/data/get_info',
    method: 'get',
    params
  })
}

// 审核通过
export function orderPass(data) {
  return request({
    url: '/orders/order_pass',
    method: 'get',
    params: data
  })
}

// 审核驳回
export function orderreJect(data) {
  return request({
    url: '/orders/order_reject',
    method: 'get',
    params: data
  })
}

// 发货
export function orderSpend(data) {
  return request({
    url: '/orders/send_order',
    method: 'post',
    data
  })
}

// 更新物流
export function UpdateExpress(data) {
  return request({
    url: '/orders/UpdateExpress',
    method: 'post',
    data
  })
}
// 导入赠品信息
export function UploadOrderGift(data) {
  return request({
    url: '/UploadOrderGift',
    method: 'post',
    data
  })
}

// 高级搜索
export function highSearch(params) {
  return request({
    url: '/orders/get_conditions_order_list',
    method: 'get',
    params
  })
}

// 批量审核
export function machAuditOrder(data) {
  return request({
    url: '/orders/many_audit_order',
    method: 'post',
    data
  })
}

// 获取体验店
export function getStore() {
  return request({
    url: '/orders/get_storename',
    method: 'get'
  })
}

// 添加体验店订单
export function addStoreOrder(params) {
  return request({
    url: '/orders/add_store',
    method: 'get',
    params
  })
}

// 取消体验店订单
export function cancelStoreOrder(data) {
  return request({
    url: '/orders/cancel_store',
    method: 'post',
    data
  })
}

// 获取需要合并的订单
export function mergeOrderInfo(params) {
  return request({
    url: '/orders/merge_order_detail',
    method: 'get',
    params
  })
}

// 提交合并
export function toMergeOrder(data) {
  return request({
    url: '/orders/merge_order',
    method: 'post',
    data
  })
}

// 合并订单详情
export function GetOrderDetail(params) {
  return request({
    url: '/order/GetOrderDetail',
    method: 'get',
    params
  })
}

// 获取作废申请
export function GetApplyOrder(params) {
  return request({
    url: '/order/GetApplyOrder',
    method: 'get',
    params
  })
}

// 审核作废申请
export function UpdateApplyStatus(params) {
  return request({
    url: '/order/UpdateApplyStatus',
    method: 'get',
    params
  })
}

// 删除单号上传
export function GetDelExpressInfo(data) {
  return request({
    url: '/GetDelExpressInfo',
    method: 'post',
    data
  })
}

// 删除单号
export function DelExpressInfo(data) {
  return request({
    url: '/DelExpressInfo',
    method: 'post',
    data
  })
}

// 获取作废订单数量
export function GetApplyCount(data) {
  return request({
    url: '/order/GetApplyCount',
    method: 'get',
    data
  })
}
