import request from '@/config/axios' export interface SparePartsInLocationDetailVO { id: number number: string masterId: number sparePartsCode: string isRadeIn: string applyQty: number departmentCode: string remark: string siteId: string available: string deletionTime: Date deleterId: byte[] concurrencyStamp: number } // 查询备件入库记录子列表 export const getSparePartsInLocationDetailPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} return await request.post({ url: '/eam/spare-parts-in-location-detail/senior', data }) } else { return await request.get({ url: `/eam/spare-parts-in-location-detail/page`, params }) } } // 查询备件入库记录子详情 export const getSparePartsInLocationDetail = async (id: number) => { return await request.get({ url: `/eam/spare-parts-in-location-detail/get?id=` + id }) } // 新增备件入库记录子 export const createSparePartsInLocationDetail = async (data: SparePartsInLocationDetailVO) => { return await request.post({ url: `/eam/spare-parts-in-location-detail/create`, data }) } // 修改备件入库记录子 export const updateSparePartsInLocationDetail = async (data: SparePartsInLocationDetailVO) => { return await request.put({ url: `/eam/spare-parts-in-location-detail/update`, data }) } // 删除备件入库记录子 export const deleteSparePartsInLocationDetail = async (id: number) => { return await request.delete({ url: `/eam/spare-parts-in-location-detail/delete?id=` + id }) } // 导出备件入库记录子 Excel export const exportSparePartsInLocationDetail = async (params) => { return await request.download({ url: `/eam/spare-parts-in-location-detail/export-excel`, params }) } // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/eam/spare-parts-in-location-detail/get-import-template' }) }