1. 新增物料单位、物料类别、物料信息管理的API与页面 2. 新增工序单元管理的API、页面与弹窗组件 3. 新增可选参数管理组件与相关API 4. 补充对应国际化多语言配置 5. 新增生产主数据模块路由配置 6. 新增计量单位功能测试流程文档
58 lines
1.3 KiB
JavaScript
58 lines
1.3 KiB
JavaScript
import { request } from '@/api/_service'
|
||
|
||
// 注:BASE URL 与后台 method 名暂沿用旧项目命名,等待后台数据库路由表统一更新
|
||
const BASE = 'production_configuration/matetial_model/matetial_category/'
|
||
|
||
function apiParams (method, data = {}) {
|
||
return {
|
||
method: `production_configuration_matetial_model_matetial_category_${method}`,
|
||
platform: 'background',
|
||
...data
|
||
}
|
||
}
|
||
|
||
// 获取全部物料类别
|
||
export function getMaterialCategoryAll (data) {
|
||
return request({
|
||
url: BASE + 'all',
|
||
method: 'get',
|
||
params: apiParams('all', data)
|
||
})
|
||
}
|
||
|
||
// 获取物料类别列表
|
||
export function getMaterialCategoryList (data) {
|
||
return request({
|
||
url: BASE + 'list',
|
||
method: 'get',
|
||
params: apiParams('list', data)
|
||
})
|
||
}
|
||
|
||
// 创建物料类别
|
||
export function createMaterialCategory (data) {
|
||
return request({
|
||
url: BASE + 'create',
|
||
method: 'post',
|
||
data: apiParams('create', data)
|
||
})
|
||
}
|
||
|
||
// 编辑物料类别
|
||
export function editMaterialCategory (data) {
|
||
return request({
|
||
url: BASE + 'edit',
|
||
method: 'put',
|
||
data: apiParams('edit', data)
|
||
})
|
||
}
|
||
|
||
// 删除物料类别
|
||
export function deleteMaterialCategory (data) {
|
||
return request({
|
||
url: BASE + 'delete',
|
||
method: 'delete',
|
||
data: apiParams('delete', data)
|
||
})
|
||
}
|