You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

119 lines
3.8 KiB

import http from '../http'
// 添加工单
export function repairOrderCreate(data,type) {
if (type == 'DEVICE') {
return http.post('/eam/equipment-repair-job-main/create', data)
} else if (type == 'EQUIPMENT') {
return http.post('/eam/equipment-repair-job-main/create', data)
}
}
// 编辑工单
export function repairOrderUpdate(data,type) {
if (type == 'DEVICE') {
return http.put('/eam/equipment-repair-job-main/update', data)
} else if (type == 'EQUIPMENT') {
return http.put('/eam/equipment-repair-job-main/update', data)
}
}
// 工单列表
export function repairOrderPage(params,type) {
if (type == 'DEVICE') {
return http.get('/eam/equipment-repair-job-main/page', {params})
} else if (type == 'EQUIPMENT') {
return http.get('/eam/equipment-repair-job-main/page', {params})
}
}
// 获取维修工单详情信息
export function getDeviceRepairDetail(params,type) {
if (type == 'DEVICE') {
return http.get('eam/equipment-repair-job-main/page', {params})
} else if (type == 'EQUIPMENT') {
return http.get('eam/equipment-repair-job-main/page', {params})
}
}
// 接单
export function orderClick(params,type) {
if (type == 'DEVICE') {
return http.post('/eam/equipment-repair-job-main/updateOrder', params)
} else if (type == 'EQUIPMENT') {
return http.post('/eam/equipment-repair-job-main/updateOrder', params)
}
}
// 完成
export function orderClickFinish(params,type) {
if (type == 'DEVICE') {
return http.get('/eam/equipment-repair-job-main/orderClickFinish', {params})
} else if (type == 'EQUIPMENT') {
return http.get('/eam/equipment-repair-job-main/orderClickFinish', {params})
}
}
// 确认
export function orderClickConfirm(params,type) {
if (type == 'DEVICE') {
return http.get('/eam/equipment-repair-job-main/orderClickConfirm', {params})
} else if (type == 'EQUIPMENT') {
return http.get('/eam/equipment-repair-job-main/orderClickConfirm', {params})
}
}
// 验证
export function orderClickVerify(params,type) {
if (type == 'DEVICE') {
return http.get('/eam/equipment-repair-job-main/orderClickVerify', {params})
} else if (type == 'EQUIPMENT') {
return http.get('/eam/equipment-repair-job-main/orderClickVerify', {params})
}
}
// 添加维修工单子项维修内容
export function repairOrderDetailCreate(data,type) {
if (type == 'DEVICE') {
return http.post('/eam/equipment-repair-job-detail/create', data)
} else if (type == 'EQUIPMENT') {
return http.post('/eam/equipment-repair-job-detail/create', data)
}
}
// 编辑维修工单子项维修内容
export function repairOrderDetailUpdate(data,type) {
if (type == 'DEVICE') {
return http.put('/eam/equipment-repair-job-detail/update', data)
} else if (type == 'EQUIPMENT') {
return http.put('/eam/equipment-repair-job-detail/update', data)
}
}
// 获得维修工单子列表
export function repairOrderDetailList(params,type) {
if (type == 'DEVICE') {
return http.get('/eam/equipment-repair-job-detail/noPage', {params})
} else if (type == 'EQUIPMENT') {
return http.get('/eam/equipment-repair-job-detail/noPage', {params})
}
}
// 删除维修工单子
export function repairOrderDetailDelete(id,type) {
if (type == 'DEVICE') {
return http.delete('/eam/equipment-repair-job-detail/delete?id=' + id)
} else if (type == 'EQUIPMENT') {
return http.delete('/eam/equipment-repair-job-detail/delete?id=' + id)
}
}
//转办
export function transfer(params,type) {
if (type == 'DEVICE') {
return http.get('/eam/equipment-repair-job-main/turnTo', {params})
} else if (type == 'EQUIPMENT') {
return http.get('/eam/equipment-repair-job-main/turnTo', {params})
}
}
// 获取采取临时措施的维修工单
export function repairOrderList(params) {
return http.get('/eam/equipment-repair-job-main/getList', {
params
})
}
// 获取维修工单的报修信息
export function getDeviceRepairDetailsByNumber(params) {
return http.get('/eam/equipment-repair-job-main/detail', {
params
})
}