Files
mes-ui-d2/src/api/production-master-data/material-category.js
sheng a0192d9567
Some checks failed
Release pipeline / publish (push) Has been cancelled
Release pipeline / Always run job (push) Has been cancelled
feat(production-master-data): 新增生产主数据模块下物料与工序相关功能
1. 新增物料单位、物料类别、物料信息管理的API与页面
2. 新增工序单元管理的API、页面与弹窗组件
3. 新增可选参数管理组件与相关API
4. 补充对应国际化多语言配置
5. 新增生产主数据模块路由配置
6. 新增计量单位功能测试流程文档
2026-06-02 11:25:26 +08:00

58 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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)
})
}