var setPurchaseGroupF7Funcation = function(event,methodName){
if(methodName == "equals"){ return this == event;}
var kdtEntrys = pluginCtx.getKDTable("detailTable");
var rowIndex = kdtEntrys.getSelectManager().getActiveRowIndex();
var colIndex = kdtEntrys.getSelectManager().getActiveColumnIndex();
if (rowIndex < 0) { return; }
if(methodName == "editStarting"){
if (kdtEntrys.getColumn("hesuan").getColumnIndex() == colIndex) {
var purchaseOrgUnitId = "null";
var company = pluginCtx.getUIContext().get("sysContext").getCurrentFIUnit();
if (company !=null){
purchaseOrgUnitId = company.getId().toString();}
//com.kingdee.eas.util.client.MsgBox.showInfo(purchaseOrgUnitId);
//F7的过滤条件
var viewInfo = new com.kingdee.bos.metadata.entity.EntityViewInfo();
var filterInfo = new com.kingdee.bos.metadata.entity.FilterInfo();
filterInfo.getFilterItems().add(new FilterItemInfo("id"," select FID from T_BD_GeneralAsstActType where FGroupID='5uUAAAAAMVsF0s0M'",CompareType.INNER));
// filterInfo.appendFilterItem("CU.id", purchaseOrgUnitId);
viewInfo.setFilter(filterInfo);
var bizBox = pluginCtx.getKDTable("detailTable").getColumn("hesuan").getEditor().getComponent();
bizBox.setEntityViewInfo(viewInfo);
bizBox.getQueryAgent().resetRuntimeEntityView(); }
}
};
pluginCtx.getKDTable("detailTable").addKDTEditListener(setPurchaseGroupF7Funcation);