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.
64 lines
1.9 KiB
64 lines
1.9 KiB
import request from '@/config/axios'
|
|
|
|
export interface DeviceInspectionMainVO {
|
|
number: string
|
|
maintenanceNumber: string
|
|
deviceNumber: string
|
|
factoryAreaNumber: string
|
|
describe: string
|
|
maintenance: number
|
|
maintenancePhone: string
|
|
status: string
|
|
type: string
|
|
siteId: string
|
|
available: string
|
|
concurrencyStamp: number
|
|
}
|
|
|
|
// 查询检修工单主列表
|
|
export const getDeviceInspectionMainPage = async (params) => {
|
|
params.type = 'DEVICE'
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return await request.post({ url: '/eam/device-inspection-job-main/senior', data })
|
|
} else {
|
|
return await request.get({ url: `/eam/device-inspection-job-main/page`, params })
|
|
}
|
|
}
|
|
|
|
// 查询检修工单主详情
|
|
export const getDeviceInspectionMain = async (id: number) => {
|
|
return await request.get({ url: `/eam/device-inspection-job-main/get?id=` + id })
|
|
}
|
|
|
|
// 新增检修工单主
|
|
export const createDeviceInspectionMain = async (data: DeviceInspectionMainVO) => {
|
|
return await request.post({ url: `/eam/device-inspection-job-main/createPC`, data })
|
|
}
|
|
|
|
// 修改检修工单主
|
|
export const updateDeviceInspectionMain = async (data: DeviceInspectionMainVO) => {
|
|
return await request.put({ url: `/eam/device-inspection-job-main/update`, data })
|
|
}
|
|
|
|
// 删除检修工单主
|
|
export const deleteDeviceInspectionMain = async (id: number) => {
|
|
return await request.delete({ url: `/eam/device-inspection-job-main/delete?id=` + id })
|
|
}
|
|
|
|
// 导出检修工单主 Excel
|
|
export const exportDeviceInspectionMain = async (params) => {
|
|
return await request.download({ url: `/eam/device-inspection-job-main/export-excel`, params })
|
|
}
|
|
|
|
// 下载用户导入模板
|
|
export const importTemplate = () => {
|
|
return request.download({ url: `/eam/device-inspection-job-main/get-import-template` })
|
|
}
|
|
|
|
|
|
// 检修完成
|
|
export const finishInspection = (id: number) => {
|
|
return request.get({ url: `/eam/device-inspection-job-main/onClick?id=` + id })
|
|
}
|