import request from '@/utils/request'

// 获取客服订单列表
export function getOrderListCustomerService(data) {
  return request({
    url: 'api/order/getorderlistbykfpage',
    method: 'post',
    data
  })
}

// 编辑客服工单数据
export function editOrderCustomerService(data) {
  return request({
    headers: {
      'Content-Type': 'application/json'
    },
    transformRequest: [function(data) {
      data = JSON.stringify(data)
      return data
    }],
    url: 'api/order/editorderkf',
    method: 'post',
    data
  })
}

// 客服审核
export function checkOrderCustomerService(data) {
  return request({
    url: 'api/order/checkorderbykf',
    method: 'post',
    data
  })
}

// 客服打标签
export function labelOrderCustomerService(data) {
  return request({
    url: 'api/kforder/addordertag',
    method: 'post',
    data
  })
}

// 客服获取合并订单
export function getConsolidateOrderListCustomerService(params) {
  return request({
    url: 'api/OrderMerge/getordermergebypage',
    method: 'post',
    params
  })
}

// 客服获取合并订单审核
export function auditConsolidateOrderListCustomerService(params) {
  return request({
    url: 'api/OrderMerge/checkordermerge',
    method: 'post',
    params
  })
}

//客服订单批量选物流
export function orderListCustomerServiceBulkExpress(params) {
  return request({
    url: 'api/kforder/updateexpress',
    method: 'post',
    params
  })
}

//财务退款客服录入
export function financialRefundCustomerServiceEntry(params) {
  return request({
    url: 'api/kforder/ordermoney',
    method: 'post',
    params
  })
}

//用户订单支付审核列表
export function userOrderPaymentReviewList(params) {
  return request({
    url: 'api/kforder/getordermoney',
    method: 'post',
    params
  })
}

//用户订单付款审核
export function userOrderPaymentReview(params) {
  return request({
    url: 'api/kforder/checkordermoney',
    method: 'post',
    params
  })
}

//售后退款列表
export function getAfterSaleRefundList(params) {
  return request({
    url: 'api/kforder/getaftersalebypage',
    method: 'post',
    params
  })
}

//售后退款操作
export function afterSaleRefundOperation(params) {
  return request({
    url: 'api/kforder/updatestate',
    method: 'post',
    params
  })
}

//物流状态
export function logisticsStatusOrderCustomerService(data) {
  return request({
    url: 'api/kforder/updatestatus',
    method: 'post',
    data
  })
}
  

