feat: add BOM API and routing
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
This commit is contained in:
@ -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'
|
||||
})
|
||||
}
|
||||
|
||||
@ -120,6 +120,22 @@ const routes: Array<RouteRecordRaw> = [
|
||||
]
|
||||
},
|
||||
|
||||
// 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',
|
||||
|
||||
Reference in New Issue
Block a user