import request from '@/utils/request'
// 获取工单列表数据
export function getOrderLists(params) {
  return request({
    url: 'api/order/getorderlistbypage',
    method: 'post',
    params
  })
}
// 撤销工单
export function cancelOrder(data) {
  return request({
    url: 'api/order/cancelorder',
    method: 'post',
    data
  })
}
// 添加工单数据
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 orderPayMoney(params) {
  return request({
    url: 'api/order/ordermoney',
    method: 'post',
    params
  })
}
//获取积分
export function getintegral(params) {
  return request({
    url: 'api/VipInfo/getphonedetails',
    method: 'get',
    params
  })
}