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.
118 lines
3.2 KiB
118 lines
3.2 KiB
import request from '@/config/axios'
|
|
|
|
export interface LocationVO {
|
|
code: string
|
|
name: string
|
|
description: string
|
|
warehouseCode: string
|
|
areaCode: string
|
|
locationGroupCode: string
|
|
erpLocationCode: string
|
|
type: string
|
|
aisle: string
|
|
shelf: string
|
|
locationRow: number
|
|
locationColum: number
|
|
pickPriority: number
|
|
maxWeight: number
|
|
maxArea: number
|
|
maxVolume: number
|
|
userGroupCode: string
|
|
available: number
|
|
activeTime: Date
|
|
expireTime: Date
|
|
remark: string
|
|
}
|
|
|
|
// 查询库位列表
|
|
export const getLocationPage = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return request.post({ url: '/wms/location/senior', data })
|
|
} else {
|
|
return await request.get({ url: `/wms/location/page`, params })
|
|
}
|
|
}
|
|
// 查询库位所有列表
|
|
export const getLocationList = async (params) => {
|
|
return await request.get({ url: `/wms/location/list`, params })
|
|
}
|
|
|
|
// 查询库位详情
|
|
export const getLocation = async (id: number) => {
|
|
return await request.get({ url: `/wms/location/get?id=` + id })
|
|
}
|
|
|
|
// 新增库位
|
|
export const createLocation = async (data: LocationVO) => {
|
|
return await request.post({ url: `/wms/location/create`, data })
|
|
}
|
|
|
|
// 修改库位
|
|
export const updateLocation = async (data: LocationVO) => {
|
|
return await request.put({ url: `/wms/location/update`, data })
|
|
}
|
|
|
|
// 删除库位
|
|
export const deleteLocation = async (id: number) => {
|
|
return await request.delete({ url: `/wms/location/delete?id=` + id })
|
|
}
|
|
|
|
// 导出库位 Excel
|
|
export const exportLocation = async (params) => {
|
|
if (params.isSearch) {
|
|
const data = {...params}
|
|
return await request.downloadPost({ url: `/wms/location/export-excel-senior`, data })
|
|
} else {
|
|
return await request.download({ url: `/wms/location/export-excel`, params })
|
|
}
|
|
|
|
}
|
|
|
|
// 下载用户导入模板
|
|
export const importTemplate = () => {
|
|
return request.download({ url: '/wms/location/get-import-template' })
|
|
}
|
|
|
|
export const selectBusinessTypeToLocation = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return await request.post({ url: '/wms/location/pageBusinessTypeToLocationSenior', data })
|
|
} else {
|
|
return request.get({ url: `/wms/location/pageBusinessTypeToLocation`, params })
|
|
}
|
|
}
|
|
|
|
export const selectBusinessTypeOutLocation = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return await request.post({ url: '/wms/location/pageBusinessTypeOutLocationSenior', data })
|
|
} else {
|
|
return request.get({ url: `/wms/location/pageBusinessTypeOutLocation`, params })
|
|
}
|
|
}
|
|
|
|
|
|
export const selectPageItemAreaToLocation = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return await request.post({ url: '/wms/location/pageItemAreaToLocationSenior', data })
|
|
} else {
|
|
return request.get({ url: `/wms/location/pageItemAreaToLocation`, params })
|
|
}
|
|
}
|
|
|
|
|
|
export const selectConfigToLocation = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return await request.post({ url: '/wms/location/pageConfigToLocationSenior', data })
|
|
} else {
|
|
return request.get({ url: `/wms/location/pageConfigToLocation`, params })
|
|
}
|
|
}
|