如何在 WO 列表页面的同一列中显示值和描述,
示例:ZIST- OPC 和 LPC 的设备安装
您必须向您的工作订单资源添加一个新的本地属性,我建议您在该对象的 onInitialize() 方法中填充它。然后将该本地属性添加到工作订单列表中,就像任何其他属性一样。看看我们如何在现有代码中使用assetnum 和assetdescription 来做到这一点。
onInitialize : function(workOrder) {
workOrder.set("locationdesc", workOrder.get('maxlocationdesc'));
if(workOrder.get('assetdesc')==null){
workOrder.set("assetnumanddescription",'');
}
workOrder.set("assetdesc", workOrder.get('maxassetdesc'));
if(workOrder.get('locationdesc')==null){
workOrder.set("locationanddescription",'');
}
fieldUtil.initCompositeField("wonum", "description", "wonumanddescription", workOrder);
fieldUtil.initCompositeField("asset", "assetdesc", "assetnumanddescription", workOrder);
fieldUtil.initCompositeField("location", "locationdesc", "locationanddescription", workOrder);