import request from '@/utils/request'

// 查询维修工单列表
export function listRepairOrder(query) {
	return request({
		url: '/device/repairOrder/list',
		method: 'get',
		params: query
	});
}

// 查询维修工单详细
export function getRepairOrder(workId) {
	return request({
		url: '/device/repairOrder/' + workId,
		method: 'get'
		});
}

// 快速工单
export function addRepairOrder(data) {
	return request({
		url: '/device/repairOrder',
		method: 'post',
		data: data
	});
}

// 修改维修工单
export function updateRepairOrder(data) {
	return request({
		url: '/device/repairOrder',
		method: 'put',
		data: data
	});
}

// 删除维修工单
export function delRepairOrder(workId) {
	return request({
		url: '/device/repairOrder/' + workId,
		method: 'delete'
	});
}

//申请委外
export function applyOutsource(data) {
  return request({
    url: '/device/repairOrder/apply',
    method: 'post',
    data: data
  });
}

//填写维修记录
export function writeRepairOrder(data) {
  return request({
    url: '/device/repairOrder/write',
    method: 'post',
    data: data
  });
}

// 查询维修人员列表
export function getMaintenancePersonList(query) {
  return request({
    url: '/device/repairOrder/getMaintenancePersonList',
    method: 'get',
    params: query
  });
}


