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.
|
|
|
import request from '@/config/axios'
|
|
|
|
|
|
|
|
export interface WarehouseVO {
|
|
|
|
code: string
|
|
|
|
name: string
|
|
|
|
description: string
|
|
|
|
type: string
|
|
|
|
available: number
|
|
|
|
activeTime: Date
|
|
|
|
expireTime: Date
|
|
|
|
remark: string
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询仓库列表
|
|
|
|
export const getWarehousePage = async (params) => {
|
|
|
|
return await request.get({ url: `/wms/warehouse/page`, params })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询仓库详情
|
|
|
|
export const getWarehouse = async (id: number) => {
|
|
|
|
return await request.get({ url: `/wms/warehouse/get?id=` + id })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 新增仓库
|
|
|
|
export const createWarehouse = async (data: WarehouseVO) => {
|
|
|
|
return await request.post({ url: `/wms/warehouse/create`, data })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 修改仓库
|
|
|
|
export const updateWarehouse = async (data: WarehouseVO) => {
|
|
|
|
return await request.put({ url: `/wms/warehouse/update`, data })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 删除仓库
|
|
|
|
export const deleteWarehouse = async (id: number) => {
|
|
|
|
return await request.delete({ url: `/wms/warehouse/delete?id=` + id })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 导出仓库 Excel
|
|
|
|
export const exportWarehouse = async (params) => {
|
|
|
|
return await request.download({ url: `/wms/warehouse/export-excel`, params })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 下载用户导入模板
|
|
|
|
export const importTemplate = () => {
|
|
|
|
return request.download({ url: '/wms/warehouse/get-import-template' })
|
|
|
|
}
|