diff --git a/src/api/erp/productCategory.js b/src/api/erp/productCategory.js
new file mode 100644
index 0000000..0c3a57e
--- /dev/null
+++ b/src/api/erp/productCategory.js
@@ -0,0 +1,48 @@
+import request from '@/utils/request'
+
+export function getProductCategoryList(params) {
+ return request({
+ url: '/admin-api/erp/product-category/list',
+ method: 'get',
+ params
+ })
+}
+
+export function getProductCategorySimpleList() {
+ return request({
+ url: '/admin-api/erp/product-category/simple-list',
+ method: 'get'
+ })
+}
+
+export function getProductCategory(id) {
+ return request({
+ url: '/admin-api/erp/product-category/get',
+ method: 'get',
+ params: { id }
+ })
+}
+
+export function createProductCategory(data) {
+ return request({
+ url: '/admin-api/erp/product-category/create',
+ method: 'post',
+ data
+ })
+}
+
+export function updateProductCategory(data) {
+ return request({
+ url: '/admin-api/erp/product-category/update',
+ method: 'put',
+ data
+ })
+}
+
+export function deleteProductCategory(id) {
+ return request({
+ url: '/admin-api/erp/product-category/delete',
+ method: 'delete',
+ params: { id }
+ })
+}
diff --git a/src/api/erp/productInfo.js b/src/api/erp/productInfo.js
new file mode 100644
index 0000000..78f98c2
--- /dev/null
+++ b/src/api/erp/productInfo.js
@@ -0,0 +1,70 @@
+import request from '@/utils/request'
+
+export function getProductPage(params) {
+ return request({
+ url: '/admin-api/erp/product/page',
+ method: 'get',
+ params
+ })
+}
+
+export function getProductSimpleList(params) {
+ return request({
+ url: '/admin-api/erp/product/simple-list-all',
+ method: 'get',
+ params
+ })
+}
+
+export function getMesProductSimpleList() {
+ return request({
+ url: '/admin-api/erp/product/simple-list-product',
+ method: 'get'
+ })
+}
+
+export function getItemSimpleList() {
+ return request({
+ url: '/admin-api/erp/product/simple-list-item',
+ method: 'get'
+ })
+}
+
+export function getProduct(id) {
+ return request({
+ url: '/admin-api/erp/product/get',
+ method: 'get',
+ params: { id }
+ })
+}
+
+export function createProduct(data) {
+ return request({
+ url: '/admin-api/erp/product/create',
+ method: 'post',
+ data
+ })
+}
+
+export function updateProduct(data) {
+ return request({
+ url: '/admin-api/erp/product/update',
+ method: 'put',
+ data
+ })
+}
+
+export function deleteProduct(id) {
+ return request({
+ url: '/admin-api/erp/product/delete',
+ method: 'delete',
+ params: { id }
+ })
+}
+
+export function getProductUnitSimpleList() {
+ return request({
+ url: '/admin-api/erp/product-unit/simple-list',
+ method: 'get'
+ })
+}
diff --git a/src/api/mes/productBom.js b/src/api/mes/productBom.js
new file mode 100644
index 0000000..d4714b5
--- /dev/null
+++ b/src/api/mes/productBom.js
@@ -0,0 +1,49 @@
+import request from '@/utils/request'
+
+export function getBomPage(params) {
+ return request({
+ url: '/admin-api/mes/bom/page',
+ method: 'get',
+ params
+ })
+}
+
+export function getBom(id) {
+ return request({
+ url: '/admin-api/mes/bom/get',
+ method: 'get',
+ params: { id }
+ })
+}
+
+export function createBom(data) {
+ return request({
+ url: '/admin-api/mes/bom/create',
+ method: 'post',
+ data
+ })
+}
+
+export function updateBom(data) {
+ return request({
+ url: '/admin-api/mes/bom/update',
+ method: 'put',
+ data
+ })
+}
+
+export function deleteBom(id) {
+ return request({
+ url: '/admin-api/mes/bom/delete',
+ method: 'delete',
+ params: { id }
+ })
+}
+
+export function getBomDetailListByBomId(bomId) {
+ return request({
+ url: '/admin-api/mes/bom/bom-detail/list-by-bom-id',
+ method: 'get',
+ params: { bomId }
+ })
+}
diff --git a/src/locales/en-US.js b/src/locales/en-US.js
index 1e03bed..0db0859 100644
--- a/src/locales/en-US.js
+++ b/src/locales/en-US.js
@@ -542,5 +542,117 @@ export default {
},
avatar: {
chooseAvatar: 'Choose Avatar'
+ },
+ materialCategory: {
+ moduleName: 'Product Category',
+ subTitle: 'Product material category management',
+ detailTitle: 'Category Detail',
+ basicInfo: 'Basic Info',
+ code: 'Category Code',
+ name: 'Category Name',
+ parentName: 'Parent Category',
+ rootCategory: 'None (Top Level)',
+ sort: 'Sort',
+ status: 'Status',
+ statusEnable: 'Enable',
+ statusDisable: 'Disable',
+ createTime: 'Created At',
+ searchPlaceholder: 'Enter category code/name',
+ createTitle: 'Create Category',
+ editTitle: 'Edit Category',
+ empty: 'No category data',
+ loadEditFailed: 'Failed to load edit data',
+ noId: 'Missing category ID',
+ loadFailed: 'Failed to load category detail',
+ placeholderCode: 'Enter category code',
+ placeholderName: 'Enter category name',
+ placeholderParent: 'Select parent category',
+ placeholderSort: 'Enter sort order',
+ placeholderStatus: 'Select status',
+ validatorCodeRequired: 'Category code is required',
+ validatorNameRequired: 'Category name is required',
+ validatorSortRequired: 'Sort order is required',
+ validatorStatusRequired: 'Status is required',
+ confirmDeleteContent: 'Confirm delete category [{name}]?'
+ },
+ materialInfo: {
+ moduleName: 'Product Material',
+ subTitle: 'Product material information management',
+ detailTitle: 'Material Detail',
+ basicInfo: 'Basic Info',
+ barCode: 'Barcode',
+ name: 'Material Name',
+ category: 'Category',
+ unit: 'Unit',
+ standard: 'Specification',
+ expiryDay: 'Shelf Life (Days)',
+ status: 'Status',
+ statusEnable: 'Enable',
+ statusDisable: 'Disable',
+ remark: 'Remark',
+ createTime: 'Created At',
+ autoCode: 'Auto Generate',
+ searchPlaceholder: 'Enter material name/barcode',
+ createTitle: 'Create Material',
+ editTitle: 'Edit Material',
+ empty: 'No material data',
+ loadEditFailed: 'Failed to load edit data',
+ noId: 'Missing material ID',
+ loadFailed: 'Failed to load material detail',
+ placeholderBarCode: 'Enter barcode',
+ placeholderName: 'Enter material name',
+ placeholderCategory: 'Select category',
+ placeholderUnit: 'Select unit',
+ placeholderStandard: 'Enter specification',
+ placeholderExpiryDay: 'Enter shelf life days',
+ placeholderStatus: 'Select status',
+ placeholderRemark: 'Enter remark',
+ validatorBarCodeRequired: 'Barcode is required',
+ validatorNameRequired: 'Material name is required',
+ validatorCategoryRequired: 'Category is required',
+ validatorUnitRequired: 'Unit is required',
+ confirmDeleteContent: 'Confirm delete material [{name}]?'
+ },
+ productBom: {
+ moduleName: 'Product BOM',
+ subTitle: 'Product BOM management',
+ detailTitle: 'BOM Detail',
+ basicInfo: 'Basic Info',
+ code: 'BOM Code',
+ version: 'Version',
+ product: 'Product',
+ unit: 'Unit',
+ yieldRate: 'Yield Rate',
+ isEnable: 'Enabled',
+ enableYes: 'Yes',
+ enableNo: 'No',
+ remark: 'Remark',
+ createTime: 'Created At',
+ searchPlaceholder: 'Enter BOM code',
+ createTitle: 'Create BOM',
+ editTitle: 'Edit BOM',
+ empty: 'No BOM data',
+ loadEditFailed: 'Failed to load edit data',
+ noId: 'Missing BOM ID',
+ loadFailed: 'Failed to load BOM detail',
+ placeholderCode: 'Enter BOM code',
+ placeholderVersion: 'Enter version',
+ placeholderProduct: 'Select product',
+ placeholderUnit: 'Select unit',
+ placeholderYieldRate: 'Enter yield rate',
+ placeholderEnable: 'Select enabled status',
+ placeholderRemark: 'Enter remark',
+ validatorCodeRequired: 'BOM code is required',
+ validatorVersionRequired: 'Version is required',
+ validatorProductRequired: 'Product is required',
+ validatorUnitRequired: 'Unit is required',
+ validatorEnableRequired: 'Enabled status is required',
+ confirmDeleteContent: 'Confirm delete BOM [{code}]?',
+ detailTab: 'BOM Details',
+ detailUsageNumber: 'Usage Qty',
+ detailUnit: 'Unit',
+ detailLossRate: 'Loss Rate',
+ detailRemark: 'Remark',
+ detailEmpty: 'No BOM detail data'
}
}
diff --git a/src/locales/zh-CN.js b/src/locales/zh-CN.js
index d4127e5..d6de4c0 100644
--- a/src/locales/zh-CN.js
+++ b/src/locales/zh-CN.js
@@ -542,5 +542,117 @@ export default {
},
avatar: {
chooseAvatar: '选择头像'
+ },
+ materialCategory: {
+ moduleName: '产品物料分类',
+ subTitle: '产品物料分类管理',
+ detailTitle: '分类详情',
+ basicInfo: '基础信息',
+ code: '分类编码',
+ name: '分类名称',
+ parentName: '上级分类',
+ rootCategory: '无(顶级分类)',
+ sort: '排序',
+ status: '状态',
+ statusEnable: '启用',
+ statusDisable: '禁用',
+ createTime: '创建时间',
+ searchPlaceholder: '请输入分类编码/名称',
+ createTitle: '新增分类',
+ editTitle: '编辑分类',
+ empty: '暂无分类数据',
+ loadEditFailed: '加载编辑数据失败',
+ noId: '缺少分类ID',
+ loadFailed: '加载分类详情失败',
+ placeholderCode: '请输入分类编码',
+ placeholderName: '请输入分类名称',
+ placeholderParent: '请选择上级分类',
+ placeholderSort: '请输入排序',
+ placeholderStatus: '请选择状态',
+ validatorCodeRequired: '分类编码不能为空',
+ validatorNameRequired: '分类名称不能为空',
+ validatorSortRequired: '排序不能为空',
+ validatorStatusRequired: '状态不能为空',
+ confirmDeleteContent: '确认删除分类【{name}】吗?'
+ },
+ materialInfo: {
+ moduleName: '产品物料信息',
+ subTitle: '产品物料信息管理',
+ detailTitle: '物料详情',
+ basicInfo: '基础信息',
+ barCode: '物料条码',
+ name: '物料名称',
+ category: '物料分类',
+ unit: '单位',
+ standard: '规格',
+ expiryDay: '保质期天数',
+ status: '状态',
+ statusEnable: '启用',
+ statusDisable: '禁用',
+ remark: '备注',
+ createTime: '创建时间',
+ autoCode: '自动生成',
+ searchPlaceholder: '请输入物料名称/条码',
+ createTitle: '新增物料',
+ editTitle: '编辑物料',
+ empty: '暂无物料数据',
+ loadEditFailed: '加载编辑数据失败',
+ noId: '缺少物料ID',
+ loadFailed: '加载物料详情失败',
+ placeholderBarCode: '请输入物料条码',
+ placeholderName: '请输入物料名称',
+ placeholderCategory: '请选择物料分类',
+ placeholderUnit: '请选择单位',
+ placeholderStandard: '请输入规格',
+ placeholderExpiryDay: '请输入保质期天数',
+ placeholderStatus: '请选择状态',
+ placeholderRemark: '请输入备注',
+ validatorBarCodeRequired: '物料条码不能为空',
+ validatorNameRequired: '物料名称不能为空',
+ validatorCategoryRequired: '物料分类不能为空',
+ validatorUnitRequired: '单位不能为空',
+ confirmDeleteContent: '确认删除物料【{name}】吗?'
+ },
+ productBom: {
+ moduleName: '产品BOM',
+ subTitle: '产品BOM管理',
+ detailTitle: 'BOM详情',
+ basicInfo: '基础信息',
+ code: 'BOM编码',
+ version: '版本',
+ product: '产品',
+ unit: '单位',
+ yieldRate: '良品率',
+ isEnable: '是否启用',
+ enableYes: '是',
+ enableNo: '否',
+ remark: '备注',
+ createTime: '创建时间',
+ searchPlaceholder: '请输入BOM编码',
+ createTitle: '新增BOM',
+ editTitle: '编辑BOM',
+ empty: '暂无BOM数据',
+ loadEditFailed: '加载编辑数据失败',
+ noId: '缺少BOM ID',
+ loadFailed: '加载BOM详情失败',
+ placeholderCode: '请输入BOM编码',
+ placeholderVersion: '请输入版本',
+ placeholderProduct: '请选择产品',
+ placeholderUnit: '请选择单位',
+ placeholderYieldRate: '请输入良品率',
+ placeholderEnable: '请选择是否启用',
+ placeholderRemark: '请输入备注',
+ validatorCodeRequired: 'BOM编码不能为空',
+ validatorVersionRequired: '版本不能为空',
+ validatorProductRequired: '产品不能为空',
+ validatorUnitRequired: '单位不能为空',
+ validatorEnableRequired: '是否启用不能为空',
+ confirmDeleteContent: '确认删除BOM【{code}】吗?',
+ detailTab: 'BOM明细',
+ detailUsageNumber: '用量',
+ detailUnit: '单位',
+ detailLossRate: '损耗率',
+ detailRemark: '备注',
+ detailEmpty: '暂无BOM明细数据'
}
}
diff --git a/src/pages.json b/src/pages.json
index 3bc99d5..fb9df7e 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -386,6 +386,13 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "materialCategory/detail",
+ "style": {
+ "navigationBarTitleText": "分类详情",
+ "navigationStyle": "custom"
+ }
+ },
{
"path": "materialInfo/index",
"style": {
@@ -393,6 +400,13 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "materialInfo/detail",
+ "style": {
+ "navigationBarTitleText": "物料详情",
+ "navigationStyle": "custom"
+ }
+ },
{
"path": "productBom/index",
"style": {
@@ -400,6 +414,13 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "productBom/detail",
+ "style": {
+ "navigationBarTitleText": "BOM详情",
+ "navigationStyle": "custom"
+ }
+ },
{
"path": "equipmentCategory/index",
"style": {
diff --git a/src/pages_function/pages/materialCategory/detail.vue b/src/pages_function/pages/materialCategory/detail.vue
new file mode 100644
index 0000000..a75b40d
--- /dev/null
+++ b/src/pages_function/pages/materialCategory/detail.vue
@@ -0,0 +1,155 @@
+
+
+
+
+
+
+
+
+ {{ t('materialCategory.basicInfo') }}
+
+
+ {{ t('materialCategory.code') }}
+ {{ fieldValue('code') }}
+
+
+ {{ t('materialCategory.name') }}
+ {{ fieldValue('name') }}
+
+
+ {{ t('materialCategory.parentName') }}
+ {{ parentNameText }}
+
+
+ {{ t('materialCategory.sort') }}
+ {{ fieldValue('sort') }}
+
+
+ {{ t('materialCategory.status') }}
+ {{ statusText }}
+
+
+ {{ t('materialCategory.createTime') }}
+ {{ formatDateTime(detailData?.createTime) }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/materialCategory/index.vue b/src/pages_function/pages/materialCategory/index.vue
index c402ca0..4a02b6e 100644
--- a/src/pages_function/pages/materialCategory/index.vue
+++ b/src/pages_function/pages/materialCategory/index.vue
@@ -1,125 +1,111 @@
-
-
-
-
-
-
-
-
-
- ×
+
+
+
+
+
+
+
+
+ {{ t('functionCommon.search') }}
-
-
-
+
+
+
+
-
- 状态
-
- {{ item.status }}
-
+
+ {{ t('materialCategory.parentName') }}
+ {{ getParentName(item.parentId) }}
+
+
+ {{ t('materialCategory.sort') }}
+ {{ textValue(item.sort) }}
+
+
+ {{ t('materialCategory.status') }}
+ {{ statusLabel(item.status) }}
+
+
+
+
+
+
+
+
+
+ {{ t('functionCommon.loading') }}
+ {{ t('materialCategory.empty') }}
-
+
+
+
+
+
+
+
+
-
+
+
@@ -127,482 +113,308 @@
-
diff --git a/src/pages_function/pages/materialInfo/detail.vue b/src/pages_function/pages/materialInfo/detail.vue
new file mode 100644
index 0000000..483be65
--- /dev/null
+++ b/src/pages_function/pages/materialInfo/detail.vue
@@ -0,0 +1,153 @@
+
+
+
+
+
+
+
+
+ {{ t('materialInfo.basicInfo') }}
+
+
+ {{ t('materialInfo.barCode') }}
+ {{ fieldValue('barCode') }}
+
+
+ {{ t('materialInfo.name') }}
+ {{ fieldValue('name') }}
+
+
+ {{ t('materialInfo.category') }}
+ {{ fieldValue('subCategoryName') }}
+
+
+ {{ t('materialInfo.unit') }}
+ {{ fieldValue('unitName') }}
+
+
+ {{ t('materialInfo.standard') }}
+ {{ fieldValue('standard') }}
+
+
+ {{ t('materialInfo.expiryDay') }}
+ {{ fieldValue('expiryDay') }}
+
+
+ {{ t('materialInfo.status') }}
+ {{ statusText }}
+
+
+ {{ t('materialInfo.createTime') }}
+ {{ formatDateTime(detailData?.createTime) }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/materialInfo/index.vue b/src/pages_function/pages/materialInfo/index.vue
index 64018ae..946ff30 100644
--- a/src/pages_function/pages/materialInfo/index.vue
+++ b/src/pages_function/pages/materialInfo/index.vue
@@ -1,902 +1,522 @@
-
-
-
-
-
- {{ selectedParentCategory || '请选择父分类筛选' }}
-
- ›
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
- ×
+ {{ t('functionCommon.search') }}
+
+
+
+
+ {{ item.name }}
-
-
-
+
+
+
+
-
- 规格
- {{ item.standard || '-' }}
+
+ {{ t('materialInfo.standard') }}
+ {{ textValue(item.standard) }}
+
+
+ {{ t('materialInfo.category') }}
+ {{ textValue(item.subCategoryName) }}
-
- 分类
- {{ item.subCategoryName }}
+
+ {{ t('materialInfo.unit') }}
+ {{ textValue(item.unitName) }}
-
- 单位
- {{ item.unitName || '-' }}
+
+ {{ t('materialInfo.status') }}
+ {{ statusLabel(item.status) }}
-
- 备注
- {{ item.remark || '-' }}
+
+
+
+
+
+
+
+
+ {{ t('functionCommon.loading') }}
+ {{ t('materialInfo.empty') }}
+ {{ t('functionCommon.loadingMore') }}
+ {{ t('functionCommon.noMoreData') }}
-
+
+
+
+
+
+
+
+
-
+
+
-
-
-
-
-
-
- {{ item }}
- ✓
-
-
-
-
-
-
-
-
-
-
- {{ item }}
- ✓
-
-
-
-
-
-
-
-
-
-
- {{ item }}
- ✓
-
-
-
-
diff --git a/src/pages_function/pages/productBom/detail.vue b/src/pages_function/pages/productBom/detail.vue
new file mode 100644
index 0000000..86cf21f
--- /dev/null
+++ b/src/pages_function/pages/productBom/detail.vue
@@ -0,0 +1,209 @@
+
+
+
+
+
+
+
+
+ {{ t('productBom.basicInfo') }}
+
+
+ {{ t('productBom.code') }}
+ {{ fieldValue('code') }}
+
+
+ {{ t('productBom.version') }}
+ {{ fieldValue('version') }}
+
+
+ {{ t('productBom.product') }}
+ {{ fieldValue('productName') }}
+
+
+ {{ t('productBom.unit') }}
+ {{ fieldValue('unitName') }}
+
+
+ {{ t('productBom.yieldRate') }}
+ {{ fieldValue('yieldRate') }}%
+
+
+ {{ t('productBom.isEnable') }}
+ {{ enableText }}
+
+
+ {{ t('productBom.createTime') }}
+ {{ formatDateTime(detailData?.createTime) }}
+
+
+
+
+
+
+
+ {{ t('productBom.detailTab') }}
+
+
+
+
+
+ {{ t('productBom.detailUsageNumber') }}
+ {{ textValue(item.usageNumber) }}
+
+
+ {{ t('productBom.detailUnit') }}
+ {{ textValue(item.unitName) }}
+
+
+ {{ t('productBom.detailLossRate') }}
+ {{ textValue(item.yieldRate) }}%
+
+
+ {{ t('productBom.detailRemark') }}
+ {{ textValue(item.remark) }}
+
+
+
+
+ {{ t('productBom.detailEmpty') }}
+
+
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/productBom/index.vue b/src/pages_function/pages/productBom/index.vue
index 185e11b..81319ca 100644
--- a/src/pages_function/pages/productBom/index.vue
+++ b/src/pages_function/pages/productBom/index.vue
@@ -1,1295 +1,467 @@
-
-
-
-
-
-
-
-
-
- ×
+
+
+
+
+
+
+
+
+ {{ t('functionCommon.search') }}
-
-
-
+
+
+
+
-
- 单位
- {{ item.unitName || '-' }}
+
+ {{ t('productBom.product') }}
+ {{ textValue(item.productName) }}
-
- 成品率
- {{ item.yieldRate || '-' }}%
+
+ {{ t('productBom.unit') }}
+ {{ textValue(item.unitName) }}
-
- 状态
-
- {{ item.isEnable ? '启用' : '禁用' }}
-
+
+ {{ t('productBom.yieldRate') }}
+ {{ textValue(item.yieldRate) }}%
-
- 备注
- {{ item.remark || '-' }}
+
+ {{ t('productBom.isEnable') }}
+ {{ enableLabel(item.isEnable) }}
-
-
+
+ {{ t('functionCommon.loading') }}
+ {{ t('productBom.empty') }}
+ {{ t('functionCommon.loadingMore') }}
+ {{ t('functionCommon.noMoreData') }}
-
+
+
+
+
+
+
+
+
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
- {{ item.standard }}
-
- ✓
-
-
-
-