var materialBiz = pluginCtx.getKDTable("kdtEntry").getColumn("materialNum").getEditor().getComponent();
var materialChangeEvent = function(event,methodName){
if(methodName == "equals"){ return this == event;}
if(methodName == "editStopping"){
var kdtEntrys = pluginCtx.getKDTable("kdtEntry");
var rowIndex = kdtEntrys.getSelectManager().getActiveRowIndex();
var colIndex = kdtEntrys.getSelectManager().getActiveColumnIndex();
//如果是物料改变,则携带包装规格
if (kdtEntrys.getColumn("materialNum").getColumnIndex() == colIndex) {
var material = kdtEntrys.getCell(rowIndex,colIndex).getValue();
if (material != null){
kdtEntrys.getCell(rowIndex,"wlbzgg").setValue(material.getObjectValue("bzflag"));
}else{
kdtEntrys.getCell(rowIndex,"").setValue(null);
}
}
}
};
pluginCtx.getKDTable("kdtEntry").addKDTEditListener(materialChangeEvent);
错误提示:getColumn为空
推荐阅读