Browse Source

[fix]工程管理

修改bom新增页面设置备注字段,如果没有值默认为“empty”
bom修改页面加上型号字段,设置备注字段如果没有值默认为“empty”
dev
liuxiaoxu 4 weeks ago
parent
commit
92b5ba4d82
  1. 18
      ruoyi-admin/src/main/resources/templates/erp/bom/add.html
  2. 30
      ruoyi-admin/src/main/resources/templates/erp/bom/edit.html

18
ruoyi-admin/src/main/resources/templates/erp/bom/add.html

@ -402,6 +402,24 @@
return '备注不能为空'; 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;
}
} }
}] }]
}; };

30
ruoyi-admin/src/main/resources/templates/erp/bom/edit.html

@ -54,6 +54,12 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">型号:</label>
<div class="col-sm-8">
<input name="materialModel" th:field="*{materialModel}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">品牌:</label> <label class="col-sm-3 control-label">品牌:</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -203,6 +209,11 @@
align: 'center', align: 'center',
title: '描述' title: '描述'
}, },
{
field: 'materialModel',
align: 'center',
title: '型号'
},
{ {
field: 'brand', field: 'brand',
align: 'center', align: 'center',
@ -313,6 +324,24 @@
return '备注'; 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, materialName: rowData.materialName,
materialType: rowData.materialType, materialType: rowData.materialType,
describe: rowData.describe, describe: rowData.describe,
materialModel:rowData.materialModel,
brand: rowData.brand, brand: rowData.brand,
unit: rowData.unit, unit: rowData.unit,
processMethod: rowData.processMethod, processMethod: rowData.processMethod,

Loading…
Cancel
Save