songguoqiang
7 months ago
16 changed files with 238 additions and 120 deletions
@ -0,0 +1,96 @@ |
|||||
|
import request from '@/config/axios' |
||||
|
|
||||
|
export interface ItemVO { |
||||
|
number : string |
||||
|
name : string |
||||
|
brand : string |
||||
|
specifications : string |
||||
|
isConstant : string |
||||
|
subject : string |
||||
|
classification : string |
||||
|
uom : string |
||||
|
singlePrice : number |
||||
|
reprocurement : number |
||||
|
safetyStock : number |
||||
|
cost : string |
||||
|
purchaser : string |
||||
|
financer : string |
||||
|
isFramework : string |
||||
|
isRadeIn : string |
||||
|
siteId : string |
||||
|
available : string |
||||
|
concurrencyStamp : number |
||||
|
} |
||||
|
|
||||
|
// 查询备件列表
|
||||
|
export const getItemPage = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = { ...params } |
||||
|
return await request.post({ url: '/eam/item/senior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/eam/item/page`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 查询备件列表
|
||||
|
export const getWarningPage = async (params) => { |
||||
|
if (params.isSearch) { |
||||
|
delete params.isSearch |
||||
|
const data = { ...params } |
||||
|
return await request.post({ url: '/eam/item/transaction/warningSenior', data }) |
||||
|
} else { |
||||
|
return await request.get({ url: `/eam/item/transaction/warningPage`, params }) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 生成标签
|
||||
|
export const genDevice = async (data) => { |
||||
|
return await request.post({ url: `/eam/item/transaction/genDevice`, data }) |
||||
|
} |
||||
|
|
||||
|
// 查询备件详情
|
||||
|
export const getItem = async (id : number) => { |
||||
|
return await request.get({ url: `/eam/item/transaction/get?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 新增备件
|
||||
|
export const createItem = async (data : ItemVO) => { |
||||
|
return await request.post({ url: `/eam/item/transaction/create`, data }) |
||||
|
} |
||||
|
|
||||
|
// 修改备件
|
||||
|
export const updateItem = async (data : ItemVO) => { |
||||
|
return await request.put({ url: `/eam/item/transaction/update`, data }) |
||||
|
} |
||||
|
|
||||
|
// 删除备件
|
||||
|
export const deleteItem = async (id : number) => { |
||||
|
return await request.delete({ url: `/eam/item/transaction/delete?id=` + id }) |
||||
|
} |
||||
|
|
||||
|
// 导出备件 Excel
|
||||
|
export const exportItem = async (params) => { |
||||
|
return await request.download({ url: `/eam/item/transaction/export-excel`, params }) |
||||
|
} |
||||
|
|
||||
|
// 修改备件
|
||||
|
export const getItemList = async (params) => { |
||||
|
return await request.get({ url: `/eam/item/transaction/getListByNumber`, params }) |
||||
|
} |
||||
|
|
||||
|
// // 删除备件
|
||||
|
// export const getaaa = async () => {
|
||||
|
// return await request.get({ url: `/eam/producePlan/produce`})
|
||||
|
// }
|
||||
|
|
||||
|
// 备件不分页
|
||||
|
|
||||
|
export const getItemNoPage = async (params) => { |
||||
|
return await request.get({ url: `/eam/item/transaction/noPage`, params }) |
||||
|
} |
||||
|
|
||||
|
// 下载用户导入模板
|
||||
|
export const importTemplate = () => { |
||||
|
return request.download({ url: '/eam/item/transaction/get-import-template' }) |
||||
|
} |
Loading…
Reference in new issue