heli-mes/mes-ui/mes-ui-admin-vue3/src/api/heli/storagemat/index.ts
2025-01-09 18:29:48 +08:00

60 lines
1.8 KiB
TypeScript

import request from '@/config/axios'
export interface StorageMatVO {
id: number
stockId: number
matId: number
whId: number
rgId: number
pnId: number
storageOkQty: number
lotNo: string
projectNo: string
description: string
wareHouseId:string
}
// 查询入/出库物料详情
export const getStorageMatList = async (whId:number) => {
return await request.get({ url: `/heli/storage-mat/get-materials?whId=`+whId})
}
// 查询入/出库物料分页
export const getStorageMatPage = async (params) => {
return await request.get({ url: `/heli/storage-mat/page`, params })
}
// 查询入/出库物料详情
export const getStorageMat = async (id: number) => {
return await request.get({ url: `/heli/storage-mat/get?id=` + id })
}
// 新增入/出库物料
export const createStorageMat = async (data: StorageMatVO) => {
return await request.post({ url: `/heli/storage-mat/create`, data })
}
// 订单全部发货后剩余零件如非标仓库
export const createStorageMatBatchs = async (data: StorageMatVO[],id:number) => {
return await request.post({ url: `/heli/storage-mat/create-sy?stockid=`+id, data })
}
// 批量新增入/出库物料
export const createStorageMatBatch = async (data: StorageMatVO[],id:number) => {
return await request.post({ url: `/heli/storage-mat/create-batch?stockid=`+id, data })
}
// 修改入/出库物料
export const updateStorageMat = async (data: StorageMatVO) => {
return await request.put({ url: `/heli/storage-mat/update`, data })
}
// 删除入/出库物料
export const deleteStorageMat = async (id: number) => {
return await request.delete({ url: `/heli/storage-mat/delete?id=` + id })
}
// 导出入/出库物料 Excel
export const exportStorageMat = async (params) => {
return await request.download({ url: `/heli/storage-mat/export-excel`, params })
}