import request from '@/utils/request'

// 查询工单主列表
export function listTicket(query) {
  return request({
    url: '/ticket/list',
    method: 'get',
    params: query
  })
}

// 查询工单主详细
export function getTicket(id) {
  return request({
    url: '/ticket/' + id,
    method: 'get'
  })
}

// 新增工单主
export function addTicket(data) {
  return request({
    url: '/ticket',
    method: 'post',
    data: data
  })
}

// 修改工单主
export function updateTicket(data) {
  return request({
    url: '/ticket',
    method: 'put',
    data: data
  })
}

// 删除工单主
export function delTicket(id) {
  return request({
    url: '/ticket/' + id,
    method: 'delete'
  })
}
