import request from '@/utils/request'

// 查询工单评分列表
export function listOrderScore(query) {
  return request({
    url: '/gxt/orderScore/list',
    method: 'get',
    params: query
  })
}

// 查询工单评分详细
export function getOrderScore(orderType, orderId) {
  return request({
    url: '/gxt/orderScore/' + orderType + '/' + orderId,
    method: 'get'
  })
}

// 保存自评信息
export function selfEvaluation(data) {
  return request({
    url: '/gxt/orderScore/selfEvaluation',
    method: 'put',
    data: data
  })
}

// 保存复评信息
export function review(data) {
  return request({
    url: '/gxt/orderScore/review',
    method: 'put',
    data: data
  })
}

// 保存确认信息
export function confirm(data) {
  return request({
    url: '/gxt/orderScore/confirm',
    method: 'put',
    data: data
  })
}

// 保存终评信息
export function finalEvaluation(data) {
  return request({
    url: '/gxt/orderScore/finalEvaluation',
    method: 'put',
    data: data
  })
}

// 发起申诉
export function appeal(data) {
  return request({
    url: '/gxt/orderScore/appeal',
    method: 'put',
    data: data
  })
}