import request from '@/utils/request'

//获取工单列表
export function getorderList(query) {
  return request({
    url: '/deviceRepair/order/list',
    method: 'get',
    baseURL: "/afterSales-api",
    params: query
  })
}
//获取工单详情
export function orderDetailByid(orderId) {
  return request({
    url: '/deviceRepair/order/orderDetail/'+orderId,
    baseURL: "/afterSales-api",
    method: 'get',

  })
}

//获取工单操作
export function orderactionByid(orderId) {
  return request({
    url: '/deviceRepair/order/action/'+orderId,
    baseURL: "/afterSales-api",
    method: 'get',

  })
}

//工单评价
export function companyRating(data) {
  return request({
    url: '/deviceRepair/order/companyRating/'+data.orderId,
    baseURL: "/afterSales-api",
    method: 'post',
    data

  })
}
//获取待结算工单列表
export function settlementList(query) {
  return request({
    url: '/deviceRepairOrder/settlementList',
    baseURL: "/afterSales-api",
    method: 'get',
    params: query

  })
}

//结算
export function settlementAction(data) {
  return request({
    url: '/deviceRepairOrder/settlementAction/'+data.orderId,
    baseURL: "/afterSales-api",
    method: 'post',
    data: data

  })
}

export function upload(data) {
  return request({
    url:'/support/oss/upload',
    method: 'post',
    baseURL: "/afterSales-api",
    data,
    headers:{
      'Content-Type': 'multipart/form-data'
    },
    isNosessionObj:true,
    isNoLoading:true
  })
}
export function uploadDel(ossIds) {
  return request({
    url:'/support/oss/'+ossIds,
    baseURL: "/afterSales-api",
    method: 'DELETE',
  })
}
//查看银行付款回单
export function bankReceip(orderId) {
  return request({
    url:'/deviceRepairOrder/bankReceip/'+orderId,
    baseURL: "/afterSales-api",
    method: 'get',
  })
}


