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.
71 lines
1.8 KiB
71 lines
1.8 KiB
1 year ago
|
import request from '@/config/axios'
|
||
|
|
||
|
export interface TransactionVO {
|
||
|
number: string
|
||
|
transactionType: string
|
||
|
inventoryAction: string
|
||
|
worker: string
|
||
|
businessType: string
|
||
|
recordNumber: string
|
||
|
activeTime: Date
|
||
|
itemCode: string
|
||
|
batch: string
|
||
|
inventoryStatus: string
|
||
|
uom: string
|
||
|
qty: number
|
||
|
singlePrice: number
|
||
|
amount: number
|
||
|
altBatch: string
|
||
|
arriveDate: Date
|
||
|
produceDate: Date
|
||
|
expireDate: Date
|
||
|
packingNumber: string
|
||
|
containerNumber: string
|
||
|
locationCode: string
|
||
|
warehouseCode: string
|
||
|
areaCode: string
|
||
|
locationGroupCode: string
|
||
|
erpLocationCode: string
|
||
|
ownerCode: string
|
||
|
}
|
||
|
|
||
|
// 查询库存事务列表
|
||
|
export const getTransactionPage = async (params) => {
|
||
|
if (params.isSearch) {
|
||
|
delete params.isSearch
|
||
|
const data = {...params}
|
||
|
return await request.post({ url: '/wms/transaction/senior', data })
|
||
|
} else {
|
||
|
return await request.get({ url: `/wms/transaction/page`, params })
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// 查询库存事务详情
|
||
|
export const getTransaction = async (id: number) => {
|
||
|
return await request.get({ url: `/wms/transaction/get?id=` + id })
|
||
|
}
|
||
|
|
||
|
// 新增库存事务
|
||
|
export const createTransaction = async (data: TransactionVO) => {
|
||
|
return await request.post({ url: `/wms/transaction/create`, data })
|
||
|
}
|
||
|
|
||
|
// 修改库存事务
|
||
|
export const updateTransaction = async (data: TransactionVO) => {
|
||
|
return await request.put({ url: `/wms/transaction/update`, data })
|
||
|
}
|
||
|
|
||
|
// 删除库存事务
|
||
|
export const deleteTransaction = async (id: number) => {
|
||
|
return await request.delete({ url: `/wms/transaction/delete?id=` + id })
|
||
|
}
|
||
|
|
||
|
// 导出库存事务 Excel
|
||
|
export const exportTransaction = async (params) => {
|
||
|
return await request.download({ url: `/wms/transaction/export-excel`, params })
|
||
|
}
|
||
|
|
||
|
// 下载用户导入模板
|
||
|
export const importTemplate = () => {
|
||
|
return request.download({ url: '/wms/transaction/get-import-template' })
|
||
|
}
|