index.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import request from '@/config/axios'
  2. export interface CommonBomMaterialVO {
  3. id: number
  4. name: string
  5. code: string
  6. deviceCategoryId: number
  7. bomNodeId: number
  8. materialId: number
  9. quantity: number
  10. status: number
  11. remark: string
  12. createTime: Date
  13. }
  14. export const CommonBomMaterialApi = {
  15. getCommonBomMaterialPage: async (params: PageParam) => {
  16. return await request.get({ url: '/pms/iot-common-bom-material/page', params })
  17. },
  18. getCommonBomMaterial: async (id: number) => {
  19. return await request.get({ url: '/pms/iot-common-bom-material/get?id=' + id })
  20. },
  21. createCommonBomMaterial: async (data: CommonBomMaterialVO) => {
  22. return await request.post({ url: '/pms/iot-common-bom-material/create', data })
  23. },
  24. updateCommonBomMaterial: async (data: CommonBomMaterialVO) => {
  25. return await request.put({ url: '/pms/iot-common-bom-material/update', data })
  26. },
  27. deleteCommonBomMaterial: async (id: number) => {
  28. return await request.delete({ url: '/pms/iot-common-bom-material/delete?id=' + id })
  29. },
  30. deleteBomMaterial: async (bomNodeId: number, code: string) => {
  31. return await request.delete({ url: '/pms/iot-common-bom-material/deleteBomMaterial?bomNodeId=' + bomNodeId + '&code=' + code })
  32. }
  33. }