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.8 KiB
64 lines
1.8 KiB
11 months ago
|
import request from '@/config/axios'
|
||
|
|
||
|
export interface ItemAccountsVO {
|
||
|
itemNumber: string
|
||
|
qty: number
|
||
|
areaNumber: string
|
||
|
isInAccount: string
|
||
|
siteId: string
|
||
|
available: string
|
||
|
concurrencyStamp: number
|
||
|
}
|
||
|
|
||
|
// 查询备件台账列表
|
||
|
export const getItemAccountsPage = async (params) => {
|
||
|
if (params.isSearch) {
|
||
|
delete params.isSearch
|
||
|
const data = {...params}
|
||
|
return await request.post({ url: '/eam/item-accounts/senior', data })
|
||
|
} else {
|
||
|
return await request.get({ url: `/eam/item-accounts/page`, params })
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// 查询备件台账详情
|
||
|
export const getItemAccounts = async (id: number) => {
|
||
|
return await request.get({ url: `/eam/item-accounts/get?id=` + id })
|
||
|
}
|
||
|
|
||
|
// 新增备件台账
|
||
|
export const createItemAccounts = async (data: ItemAccountsVO) => {
|
||
|
return await request.post({ url: `/eam/item-accounts/create`, data })
|
||
|
}
|
||
|
|
||
|
// 修改备件台账
|
||
|
export const updateItemAccounts = async (data: ItemAccountsVO) => {
|
||
|
return await request.put({ url: `/eam/item-accounts/update`, data })
|
||
|
}
|
||
|
|
||
|
// 删除备件台账
|
||
|
export const deleteItemAccounts = async (id: number) => {
|
||
|
return await request.delete({ url: `/eam/item-accounts/delete?id=` + id })
|
||
|
}
|
||
|
|
||
|
// 导出备件台账 Excel
|
||
|
export const exportItemAccounts = async (params) => {
|
||
|
return await request.download({ url: `/eam/item-accounts/export-excel`, params })
|
||
|
}
|
||
|
|
||
|
// 下载用户导入模板
|
||
|
export const importTemplate = () => {
|
||
|
return request.download({ url: '/eam/item-accounts/get-import-template' })
|
||
|
}
|
||
|
|
||
|
// 更改备件库位
|
||
|
export const replaceLocation = async (data: Array<ItemAccountsVO>) => {
|
||
|
return await request.post({url: `/eam/item-accounts/replaceLocation `, data });
|
||
|
};
|
||
|
|
||
|
// 备件不分页
|
||
|
|
||
|
export const getItemAccountsNoPage = async (params) => {
|
||
|
return await request.get({ url: `/eam/item-accounts/noPage`, params })
|
||
|
}
|