import axios from './axios'

export function getOrderTree() {
  return axios.get('platform/platformWorkOrder/findStateGroupList')
}

export function workConfirmed(id) {
  return axios.post('platform/platformWorkOrder/confirmed', {
    id: id,
  })
}

export function workAssigned(id, user) {
  return axios.post('platform/platformWorkOrder/assign', {
    id: id,
    leader: user,
  })
}

export function startWorder(id) {
  return axios.post('platform/platformWorkOrder/start', {
    id: id,
  })
}

export function archiveWorkOrder(id) {
  return axios.post('platform/platformWorkOrder/archive', {
    id: id,
  })
}

export function replyTocustomer(id, msg) {
  return axios.post('platform/platformWorkOrderChat/add', {
    msg: msg,
    workOrderId: id,
  })
}

export function getOrderType() {
  return axios.get('platform/platformWorkOrder/orderTypeList')
}
