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.
104 lines
3.7 KiB
104 lines
3.7 KiB
import http from './http'
|
|
|
|
|
|
// 添加工单
|
|
export function upkeepOrderCreate(data,type) {
|
|
if (type == 'DEVICE') {
|
|
return http.post('/eam/device-maintain-job-main/create',data)
|
|
} else if (type == 'MOLD') {
|
|
return http.post('/eam/mold-maintain-job-main/create',data)
|
|
} else if (type == 'TECH') {
|
|
return http.post('/eam/tech-maintain-job-main/create',data)
|
|
}
|
|
}
|
|
// 编辑工单
|
|
export function upkeepOrderUpdate(data,type) {
|
|
if (type == 'DEVICE') {
|
|
return http.put('/eam/device-maintain-job-main/update',data)
|
|
} else if (type == 'MOLD') {
|
|
return http.put('/eam/mold-maintain-job-main/update',data)
|
|
} else if (type == 'TECH') {
|
|
return http.put('/eam/tech-maintain-job-main/update',data)
|
|
}
|
|
}
|
|
// 工单列表
|
|
export function upkeepOrderPage(params,type) {
|
|
if (type == 'DEVICE') {
|
|
return http.get('/eam/device-maintain-job-main/getAppPage',{params})
|
|
} else if (type == 'MOLD') {
|
|
return http.get('/eam/mold-maintain-job-main/getAppPage',{params})
|
|
} else if (type == 'TECH') {
|
|
return http.get('/eam/tech-maintain-job-main/getAppPage',{params})
|
|
}
|
|
}
|
|
// 接单
|
|
export function orderClick(params,type) {
|
|
if (type == 'DEVICE') {
|
|
return http.get('/eam/device-maintain-job-main/orderClick',{params})
|
|
} else if (type == 'MOLD') {
|
|
return http.get('/eam/mold-maintain-job-main/orderClick',{params})
|
|
} else if (type == 'TECH') {
|
|
return http.get('/eam/tech-maintain-job-main/orderClick',{params})
|
|
}
|
|
}
|
|
|
|
export function orderClickVerify(params,type) {
|
|
if (type == 'DEVICE') {
|
|
return http.get('/eam/device-maintain-job-main/orderClickVerify',{params})
|
|
} else if (type == 'MOLD') {
|
|
return http.get('/eam/mold-maintain-job-main/orderClickVerify',{params})
|
|
} else if (type == 'TECH') {
|
|
return http.get('/eam/tech-maintain-job-main/orderClickVerify',{params})
|
|
}
|
|
}
|
|
|
|
// 完成保养工单
|
|
export function orderClickFinish(params,type) {
|
|
if (type == 'DEVICE') {
|
|
return http.get('/eam/device-maintain-job-main/orderClickFinish',{params})
|
|
} else if (type == 'MOLD') {
|
|
return http.get('/eam/mold-maintain-job-main/orderClickFinish',{params})
|
|
} else if (type == 'TECH') {
|
|
return http.get('/eam/tech-maintain-job-main/orderClickFinish',{params})
|
|
}
|
|
}
|
|
// 添加维修工单子项维修内容
|
|
export function upkeepOrderDetailCreate(data,type) {
|
|
if (type == 'DEVICE') {
|
|
return http.post('/eam/device-maintain-job-detail/create',data)
|
|
} else if (type == 'MOLD') {
|
|
return http.post('/eam/mold-maintain-job-detail/create',data)
|
|
} else if (type == 'TECH') {
|
|
return http.post('/eam/tech-maintain-job-detail/create',data)
|
|
}
|
|
}
|
|
// 编辑维修工单子项维修内容
|
|
export function upkeepOrderDetailUpdate(data,type) {
|
|
if (type == 'DEVICE') {
|
|
return http.put('/eam/device-maintain-job-detail/update',data)
|
|
} else if (type == 'MOLD') {
|
|
return http.put('/eam/mold-maintain-job-detail/update',data)
|
|
} else if (type == 'TECH') {
|
|
return http.put('/eam/tech-maintain-job-detail/update',data)
|
|
}
|
|
}
|
|
// 获得维修工单子列表
|
|
export function upkeepOrderDetailList(params,type) {
|
|
if (type == 'DEVICE') {
|
|
return http.get('/eam/device-maintain-job-detail/selectListByNumber',{params})
|
|
} else if (type == 'MOLD') {
|
|
return http.get('/eam/mold-maintain-job-detail/selectListByNumber',{params})
|
|
} else if (type == 'TECH') {
|
|
return http.get('/eam/tech-maintain-job-detail/selectListByNumber',{params})
|
|
}
|
|
}
|
|
// 删除维修工单子
|
|
export function upkeepOrderDetailDelete(id,type) {
|
|
if (type == 'DEVICE') {
|
|
return http.delete('/eam/device-maintain-job-detail/delete?id='+id)
|
|
} else if (type == 'MOLD') {
|
|
return http.delete('/eam/mold-maintain-job-detail/delete?id='+id)
|
|
} else if (type == 'TECH') {
|
|
return http.delete('/eam/tech-maintain-job-detail/delete?id='+id)
|
|
}
|
|
}
|
|
|