import request from '@/utils/request'
// 获取工单列表数据
export function getOrderLists(params) {
  return request({
    url: 'api/order/getorderlistbypage',
    method: 'post',
    params
  })
}
// 删除工单数据
export function cancelOrder(ids) {
  return request({
    url: 'callcenterapi/api/BusOrder/delete',
    method: 'post',
    data: {
      ids
    }
  })
}
// 添加工单数据
export function addOrder(data) {
  return request({
    headers: {
      'Content-Type': 'application/json'
    },
    transformRequest: [function(data) {
      data = JSON.stringify(data)
      return data
    }],
    url: 'api/order/addorder',
    method: 'post',
    data
  })
}
// 获取活动核算
export function getActivityAccount(data) {
  return request({
    headers: {
      'Content-Type': 'application/json'
    },
    transformRequest: [function(data) {
      data = JSON.stringify(data)
      return data
    }],
    url: 'api/order/getact',
    method: 'post',
    data,
  })
}
// 获取工单数据
export function getOrder(orderid) {
  return request({
    url: 'api/order/getorderdetail',
    method: 'post',
    params: {
      orderid
    }
  })
}
// 编辑工单数据
export function editOrder(data) {
  return request({
    headers: {
      'Content-Type': 'application/json'
    },
    transformRequest: [function(data) {
      data = JSON.stringify(data)
      return data
    }],
    url: 'api/order/editorder',
    method: 'post',
    data
  })
}

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

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


// 获取库管订单列表
export function getOrderListCustodian(data) {
  return request({
    url: 'api/order/getorderlistbykgpage',
    method: 'post',
    data
  })
}