diff --git a/ruoyi-admin/src/main/resources/templates/erp/bom/add.html b/ruoyi-admin/src/main/resources/templates/erp/bom/add.html index 2f0726a0..1f7b53c6 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/bom/add.html +++ b/ruoyi-admin/src/main/resources/templates/erp/bom/add.html @@ -402,6 +402,24 @@ return '备注不能为空'; } } + }, + formatter: function (value, row) { + // 检查 row 是否存在 + if (!row) { + return ""; + } + + // 检查 storageLocation 是否存在 + if (row.storageLocation === undefined || row.storageLocation === null) { + return ""; + } + + // 根据 storageLocation 的值决定返回值 + if (row.storageLocation) { + return row.storageLocation; + } else { + return value; + } } }] }; diff --git a/ruoyi-admin/src/main/resources/templates/erp/bom/edit.html b/ruoyi-admin/src/main/resources/templates/erp/bom/edit.html index f9572aaf..84d1c0e5 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/bom/edit.html +++ b/ruoyi-admin/src/main/resources/templates/erp/bom/edit.html @@ -54,6 +54,12 @@ +
+ +
+ +
+
@@ -203,6 +209,11 @@ align: 'center', title: '描述' }, + { + field: 'materialModel', + align: 'center', + title: '型号' + }, { field: 'brand', align: 'center', @@ -313,6 +324,24 @@ return '备注'; } } + }, + formatter: function (value, row) { + // 检查 row 是否存在 + if (!row) { + return ""; + } + + // 检查 storageLocation 是否存在 + if (row.storageLocation === undefined || row.storageLocation === null) { + return ""; + } + + // 根据 storageLocation 的值决定返回值 + if (row.storageLocation) { + return row.storageLocation; + } else { + return value; + } } } ] @@ -369,6 +398,7 @@ materialName: rowData.materialName, materialType: rowData.materialType, describe: rowData.describe, + materialModel:rowData.materialModel, brand: rowData.brand, unit: rowData.unit, processMethod: rowData.processMethod,