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.
75 lines
1.9 KiB
75 lines
1.9 KiB
11 months ago
|
import request from '@/config/axios'
|
||
|
|
||
|
export interface SparePartVO {
|
||
|
id: number
|
||
|
code: string
|
||
|
name: string
|
||
|
brand: string
|
||
|
specifications: string
|
||
|
isOverall: string
|
||
|
isConstant: string
|
||
|
subject: string
|
||
|
subjectCode: string
|
||
|
category: string
|
||
|
region: string
|
||
|
classification: string
|
||
|
uom: string
|
||
|
singlePrice: number
|
||
|
stockAge: number
|
||
|
reprocurement: number
|
||
|
safetyStock: number
|
||
|
cost: string
|
||
|
purchaser: string
|
||
|
financer: string
|
||
|
purchaseTime: Date
|
||
|
isFramework: string
|
||
|
isRadeIn: string
|
||
|
departmentCode: string
|
||
|
remark: string
|
||
|
siteId: string
|
||
|
available: string
|
||
|
deletionTime: Date
|
||
|
deleterId: byte[]
|
||
|
concurrencyStamp: number
|
||
|
}
|
||
|
|
||
|
// 查询备件基础列表
|
||
|
export const getSparePartPage = async (params) => {
|
||
|
if (params.isSearch) {
|
||
|
delete params.isSearch
|
||
|
const data = {...params}
|
||
|
return await request.post({ url: '/eam/sparepart/spare-part/senior', data })
|
||
|
} else {
|
||
|
return await request.get({ url: `/eam/sparepart/spare-part/page`, params })
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// 查询备件基础详情
|
||
|
export const getSparePart = async (id: number) => {
|
||
|
return await request.get({ url: `/eam/sparepart/spare-part/get?id=` + id })
|
||
|
}
|
||
|
|
||
|
// 新增备件基础
|
||
|
export const createSparePart = async (data: SparePartVO) => {
|
||
|
return await request.post({ url: `/eam/sparepart/spare-part/create`, data })
|
||
|
}
|
||
|
|
||
|
// 修改备件基础
|
||
|
export const updateSparePart = async (data: SparePartVO) => {
|
||
|
return await request.put({ url: `/eam/sparepart/spare-part/update`, data })
|
||
|
}
|
||
|
|
||
|
// 删除备件基础
|
||
|
export const deleteSparePart = async (id: number) => {
|
||
|
return await request.delete({ url: `/eam/sparepart/spare-part/delete?id=` + id })
|
||
|
}
|
||
|
|
||
|
// 导出备件基础 Excel
|
||
|
export const exportSparePart = async (params) => {
|
||
|
return await request.download({ url: `/eam/sparepart/spare-part/export-excel`, params })
|
||
|
}
|
||
|
|
||
|
// 下载用户导入模板
|
||
|
export const importTemplate = () => {
|
||
|
return request.download({ url: '/eam/sparepart/spare-part/get-import-template' })
|
||
|
}
|