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.

77 lines
2.0 KiB

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) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/transaction/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/transaction/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/transaction/get-import-template' })
}