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.
91 lines
3.0 KiB
91 lines
3.0 KiB
import request from '@/config/axios'
|
|
|
|
export interface SparePartsInLocationMainVO {
|
|
id: number
|
|
number: string
|
|
theme: string
|
|
status: string
|
|
applyer: string
|
|
approver: number
|
|
approveContent: string
|
|
approveTime: Date
|
|
autoExamine: string
|
|
autoAgree: string
|
|
directCreateRecord: string
|
|
areaCode: string
|
|
locationCode: string
|
|
departmentCode: string
|
|
remark: string
|
|
siteId: string
|
|
available: string
|
|
deletionTime: Date
|
|
deleterId: byte[]
|
|
concurrencyStamp: number
|
|
}
|
|
|
|
// 查询备件入库记录主列表
|
|
export const getSparePartsInLocationMainPage = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return await request.post({ url: '/eam/spare-parts-in-location-main/senior', data })
|
|
} else {
|
|
return await request.get({ url: `/eam/spare-parts-in-location-main/page`, params })
|
|
}
|
|
}
|
|
|
|
// 查询备件入库记录主详情
|
|
export const getSparePartsInLocationMain = async (id: number) => {
|
|
return await request.get({ url: `/eam/spare-parts-in-location-main/get?id=` + id })
|
|
}
|
|
|
|
// 新增备件入库记录主
|
|
export const createSparePartsInLocationMain = async (data: SparePartsInLocationMainVO) => {
|
|
return await request.post({ url: `/eam/spare-parts-in-location-main/create`, data })
|
|
}
|
|
|
|
// 修改备件入库记录主
|
|
export const updateSparePartsInLocationMain = async (data: SparePartsInLocationMainVO) => {
|
|
return await request.put({ url: `/eam/spare-parts-in-location-main/update`, data })
|
|
}
|
|
|
|
// 删除备件入库记录主
|
|
export const deleteSparePartsInLocationMain = async (id: number) => {
|
|
return await request.delete({ url: `/eam/spare-parts-in-location-main/delete?id=` + id })
|
|
}
|
|
|
|
// 导出备件入库记录主 Excel
|
|
export const exportSparePartsInLocationMain = async (params) => {
|
|
if (params.isSearch) {
|
|
const data = {...params}
|
|
return await request.downloadPost({ url: `/eam/spare-parts-in-location-main/export-excel-senior`, data })
|
|
}else{
|
|
return await request.download({ url: `/eam/spare-parts-in-location-main/export-excel`, params })
|
|
}
|
|
}
|
|
|
|
// 下载用户导入模板
|
|
export const importTemplate = () => {
|
|
return request.download({ url: '/eam/spare-parts-in-location-main/get-import-template' })
|
|
}
|
|
|
|
// 撤回
|
|
export const cancelSparePartsInLocation = async (id) => {
|
|
return await request.get({ url: `/eam/spare-parts-in-location-main/cancel?id=` + id })
|
|
}
|
|
// 审核
|
|
export const submitExamineSparePartsInLocation = async (id) => {
|
|
return await request.get({ url: `/eam/spare-parts-in-location-main/submitExamine?id=` + id })
|
|
}
|
|
// 审核驳回
|
|
export const rejectSparePartsInLocation = async (id) => {
|
|
return await request.get({ url: `/eam/spare-parts-in-location-main/reject?id=` + id })
|
|
}
|
|
// 审核通过
|
|
export const approveSparePartsInLocation = async (data) => {
|
|
return await request.post({ url: `/eam/spare-parts-in-location-main/approve`,data })
|
|
}
|
|
// 完成
|
|
export const finishSparePartsInLocation = async (id) => {
|
|
return await request.post({ url: `/eam/spare-parts-in-location-main/finish?id=` + id })
|
|
}
|