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
2.0 KiB
71 lines
2.0 KiB
import request from '@/config/axios'
|
|
|
|
export interface CallmaterialsVO {
|
|
id: number
|
|
itemCode: string
|
|
batch: string
|
|
isRecive: string
|
|
packUnit: string
|
|
location: string
|
|
qty: number
|
|
uom: string
|
|
available: string
|
|
}
|
|
|
|
// 查询叫料标签列表
|
|
export const getCallmaterialsPage = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return await request.post({ url: '/wms/callmaterials/senior', data })
|
|
} else {
|
|
return await request.get({ url: `/wms/callmaterials/page`, params })
|
|
}
|
|
}
|
|
|
|
// 查询叫料标签详情
|
|
export const getCallmaterials = async (id: number) => {
|
|
return await request.get({ url: `/wms/callmaterials/get?id=` + id })
|
|
}
|
|
|
|
// 新增叫料标签
|
|
export const createCallmaterials = async (data: CallmaterialsVO) => {
|
|
data.available = 'TRUE'
|
|
return await request.post({ url: `/wms/callmaterials/create`, data })
|
|
}
|
|
|
|
// 修改叫料标签
|
|
export const updateCallmaterials = async (data: CallmaterialsVO) => {
|
|
return await request.put({ url: `/wms/callmaterials/update`, data })
|
|
}
|
|
|
|
// 删除叫料标签
|
|
export const deleteCallmaterials = async (id: number) => {
|
|
return await request.delete({ url: `/wms/callmaterials/delete?id=` + id })
|
|
}
|
|
|
|
// 导出叫料标签 Excel
|
|
export const exportCallmaterials = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return await request.downloadPost({ url: '/wms/callmaterials/export-excel-senior', data })
|
|
} else {
|
|
return await request.download({ url: `/wms/callmaterials/export-excel`, params })
|
|
}
|
|
}
|
|
|
|
// 下载用户导入模板
|
|
export const importTemplate = () => {
|
|
return request.download({ url: '/wms/callmaterials/get-import-template' })
|
|
}
|
|
|
|
|
|
// 启用
|
|
export const enableOption = async (id: number) => {
|
|
return await request.enable({ url: `/wms/callmaterials/enable?id=` + id })
|
|
}
|
|
// 禁用
|
|
export const disableOption = async (id: number) => {
|
|
return await request.disable({ url: `/wms/callmaterials/disable?id=` + id })
|
|
}
|