var easImporter = JavaImporter();
easImporter.importPackage(Packages.com.kingdee.bos.dao.query);
easImporter.importPackage(Packages.com.kingdee.bos.ctrl.extendcontrols);
easImporter.importPackage(Packages.com.kingdee.bos.metadata.entity);
easImporter.importPackage(Packages.com.kingdee.bos.metadata.query.util);
easImporter.importPackage(Packages.com.kingdee.bos.util);
with(easImporter){
var prmtDept = pluginCtx.getKDBizPromptBox("prmtmaterialobject");//
var filterInfo = new FilterInfo();
var entityViewInfo = new EntityViewInfo();
var org = pluginCtx.getUIContext().get("sysContext").getCurrentCtrlUnit();//获取当前CU
var orgid=org.get("Id");
// filterInfo.getFilterItems().add(new FilterItemInfo("id"," select fid from CT_DUC_Materialobject where FCREATORID='"+orgid+"'",CompareType.INNER));//按CU过滤
filterInfo.getFilterItems().add(new FilterItemInfo("CU.id",org.get("Id"),CompareType.EQUALS));//按CU过滤
entityViewInfo.setFilter(filterInfo);
prmtDept.setEntityViewInfo(entityViewInfo);
pluginCtx.getKDBizPromptBox("prmtmaterialobject");
}