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.
59 lines
1.5 KiB
59 lines
1.5 KiB
import request from '@/config/axios'
|
|
|
|
export interface LocationVO {
|
|
number: string
|
|
name: string
|
|
description: string
|
|
areaNumber: string
|
|
type: string
|
|
isInAccount: string
|
|
siteId: string
|
|
available: string
|
|
concurrencyStamp: number
|
|
}
|
|
|
|
// 查询库位列表
|
|
export const getLocationPage = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return await request.post({ url: '/eam/location/senior', data })
|
|
} else {
|
|
return await request.get({ url: `/eam/location/page`, params })
|
|
}
|
|
}
|
|
|
|
// 查询库位详情
|
|
export const getLocation = async (id: number) => {
|
|
return await request.get({ url: `/eam/location/get?id=` + id })
|
|
}
|
|
|
|
// 新增库位
|
|
export const createLocation = async (data: LocationVO) => {
|
|
return await request.post({ url: `/eam/location/create`, data })
|
|
}
|
|
|
|
// 修改库位
|
|
export const updateLocation = async (data: LocationVO) => {
|
|
return await request.put({ url: `/eam/location/update`, data })
|
|
}
|
|
|
|
// 删除库位
|
|
export const deleteLocation = async (id: number) => {
|
|
return await request.delete({ url: `/eam/location/delete?id=` + id })
|
|
}
|
|
|
|
// 导出库位 Excel
|
|
export const exportLocation = async (params) => {
|
|
return await request.download({ url: `/eam/location/export-excel`, params })
|
|
}
|
|
|
|
// 查询库位列表
|
|
export const getLocationNoPage = async (params) => {
|
|
return await request.get({ url: `/eam/location/noPage`, params })
|
|
}
|
|
|
|
// 下载用户导入模板
|
|
export const importTemplate = () => {
|
|
return request.download({ url: '/eam/location/get-import-template' })
|
|
}
|
|
|