diff --git a/inventory-web/src/api/bom.ts b/inventory-web/src/api/bom.ts index e69de29..ba29f61 100644 --- a/inventory-web/src/api/bom.ts +++ b/inventory-web/src/api/bom.ts @@ -0,0 +1,35 @@ +import request from '@/utils/request' + +// 获取BOM列表 +export function getBomList(params?: any) { + return request({ + url: '/v1/bom/list', + method: 'get', + params + }) +} + +// 获取BOM详情 +export function getBomDetail(bomNo: string) { + return request({ + url: `/v1/bom/detail/${bomNo}`, + method: 'get' + }) +} + +// 保存BOM +export function saveBom(data: any) { + return request({ + url: '/v1/bom/save', + method: 'post', + data + }) +} + +// 删除BOM(暂未实现,预留) +export function deleteBom(bomNo: string) { + return request({ + url: `/v1/bom/${bomNo}`, + method: 'delete' + }) +} diff --git a/inventory-web/src/router/index.ts b/inventory-web/src/router/index.ts index 4da7b88..a0a20c7 100644 --- a/inventory-web/src/router/index.ts +++ b/inventory-web/src/router/index.ts @@ -120,6 +120,22 @@ const routes: Array = [ ] }, + // 5. BOM 管理 + { + path: '/bom', + component: Layout, + meta: { title: 'BOM管理', icon: 'Document' }, + redirect: '/bom/manage', + children: [ + { + path: 'manage', + name: 'BomManage', + component: () => import('@/views/bom/BomManage.vue'), + meta: { title: '配方管理' } + } + ] + }, + // 6. 业务操作 { path: '/operation', @@ -214,4 +230,4 @@ router.beforeEach((to, from, next) => { } }) -export default router \ No newline at end of file +export default router