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.
54 lines
1.5 KiB
54 lines
1.5 KiB
9 months ago
|
import request from '@/config/axios'
|
||
|
|
||
|
export interface TransactionVO {
|
||
|
itemNumber: string
|
||
|
locationNumber: string
|
||
|
transactionType: string
|
||
|
inventoryAction: string
|
||
|
businessType: string
|
||
|
inventoryStatus: string
|
||
|
uom: string
|
||
|
qty: number
|
||
|
}
|
||
|
|
||
|
// 查询库存事务列表
|
||
|
export const getTransactionPage = async (params) => {
|
||
|
if (params.isSearch) {
|
||
|
delete params.isSearch
|
||
|
const data = {...params}
|
||
|
return await request.post({ url: '/eam/transaction/senior', data })
|
||
|
} else {
|
||
|
return await request.get({ url: `/eam/transaction/page`, params })
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// 查询库存事务详情
|
||
|
export const getTransaction = async (id: number) => {
|
||
|
return await request.get({ url: `/eam/transaction/get?id=` + id })
|
||
|
}
|
||
|
|
||
|
// 新增库存事务
|
||
|
export const createTransaction = async (data: TransactionVO) => {
|
||
|
return await request.post({ url: `/eam/transaction/create`, data })
|
||
|
}
|
||
|
|
||
|
// 修改库存事务
|
||
|
export const updateTransaction = async (data: TransactionVO) => {
|
||
|
return await request.put({ url: `/eam/transaction/update`, data })
|
||
|
}
|
||
|
|
||
|
// 删除库存事务
|
||
|
export const deleteTransaction = async (id: number) => {
|
||
|
return await request.delete({ url: `/eam/transaction/delete?id=` + id })
|
||
|
}
|
||
|
|
||
|
// 导出库存事务 Excel
|
||
|
export const exportTransaction = async (params) => {
|
||
|
return await request.download({ url: `/eam/transaction/export-excel`, params })
|
||
|
}
|
||
|
|
||
|
// 下载用户导入模板
|
||
|
export const importTemplate = () => {
|
||
|
return request.download({ url: '/eam/transaction/get-import-template' })
|
||
|
}
|