迁移BOM物料清单功能

This commit is contained in:
sheng
2026-06-22 23:10:00 +08:00
parent 964cf0b6ad
commit cf90981c5d
8 changed files with 690 additions and 3 deletions

View File

@@ -0,0 +1,56 @@
import { request } from '@/api/_service'
const BASE = 'production_configuration/matetial_model/bom/'
const RELATION_BASE = 'production_configuration/matetial_model/bom_relationship/'
function apiParams (method, data = {}) {
return {
method: `production_configuration_matetial_model_bom_${method}`,
platform: 'background',
...data
}
}
function relationApiParams (method, data = {}) {
return {
method: `production_configuration_matetial_model_bom_relationship_${method}`,
platform: 'background',
...data
}
}
export function getBomAll (data) {
return request({ url: BASE + 'all', method: 'get', params: apiParams('all', data) })
}
export function getBomList (data) {
return request({ url: BASE + 'list', method: 'get', params: apiParams('list', data) })
}
export function createBom (data) {
return request({ url: BASE + 'create', method: 'post', data: apiParams('create', data) })
}
export function editBom (data) {
return request({ url: BASE + 'edit', method: 'put', data: apiParams('edit', data) })
}
export function deleteBom (data) {
return request({ url: BASE + 'delete', method: 'delete', data: apiParams('delete', data) })
}
export function getBomRelationshipList (data) {
return request({ url: RELATION_BASE + 'list', method: 'get', params: relationApiParams('list', data) })
}
export function createBomRelationship (data) {
return request({ url: RELATION_BASE + 'create', method: 'post', data: relationApiParams('create', data) })
}
export function editBomRelationship (data) {
return request({ url: RELATION_BASE + 'edit', method: 'put', data: relationApiParams('edit', data) })
}
export function deleteBomRelationship (data) {
return request({ url: RELATION_BASE + 'delete', method: 'delete', data: relationApiParams('delete', data) })
}