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.
 
 
 

73 lines
1.8 KiB

import request from '@/config/axios'
export interface BomVO {
productItemCode: string
componentItemCode: string
componentUom: string
componentQty: number
processCode: string
version: string
layer: number
available: string
activeTime: Date
expireTime: Date
remark: string
}
// 查询物料清单列表
export const getBomPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/bom/senior', data })
} else {
return await request.get({ url: `/wms/bom/page`, params })
}
}
// 查询物料清单详情
export const getBom = async (id: number) => {
return await request.get({ url: `/wms/bom/get?id=` + id })
}
// 新增物料清单
export const createBom = async (data: BomVO) => {
data.available = 'TRUE'
return await request.post({ url: `/wms/bom/create`, data })
}
// 修改物料清单
export const updateBom = async (data: BomVO) => {
return await request.put({ url: `/wms/bom/update`, data })
}
// 删除物料清单
export const deleteBom = async (id: number) => {
return await request.delete({ url: `/wms/bom/delete?id=` + id })
}
// 导出物料清单 Excel
export const exportBom = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/bom/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/bom/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/bom/get-import-template' })
}
// 启用
export const enableOption = async (id: number) => {
return await request.enable({ url: `/wms/bom/enable?id=` + id })
}
// 禁用
export const disableOption = async (id: number) => {
return await request.disable({ url: `/wms/bom/disable?id=` + id })
}