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 @@ +