应付单成本中心取委托了当前财务组织的成本中心DEP方案
1.写一个com.kingdee.eas.fi.ap.client.OtherBillEditUI的二次开发扩展类com.kingdee.eas.fi.ap.client.OtherBillEditUIPIEx
2.重写父类的com.kingdee.eas.fi.ap.client.OtherBillEditUI.afterLoadFields()方法
3.在调用父类方法之后加入以下代码 NewCostCenterF7 costf7 = (NewCostCenterF7) prmtCostCenterUnit.getSelector(); //获取组织id对应的CU的id Set ids = new HashSet() ; ids = SCMUtils.getCostCenterByCompanyOrgInfo(null,cache.getCompanyId()); if(ids != null && ids.size() > 0){ //有结果集 String idsin = ""; StringBuilder sb = new StringBuilder("'"); Iterator it = ids.iterator(); while(it.hasNext()){ sb.append(it.next()).append("','"); } //为左树添加组织过滤 StringBuffer extraFilters = new StringBuffer(""); if(sb.length() > 2){ idsin = sb.substring(0,sb.length()-2); extraFilters.append(OrgTableAliasConstants.OUPART).append(".FUnitId in (").append(idsin).append(")"); } costf7.setContainSealUp(true); costf7.setNeedAddOrgRange(false); costf7.setCumulate(false); //设置左树过滤 if(extraFilters.length()>1){ costf7.setExtraTreeFilters(extraFilters.toString()); } //设置右树 FilterInfo filterInfo = new FilterInfo(); FilterItemInfo filterItemInfo = new FilterItemInfo("unit.id", ids , CompareType.INCLUDE); filterInfo.getFilterItems().add(filterItemInfo); costf7.setOuterFilterInfo(filterInfo); } prmtCostCenterUnit.setSelector(costf7);
4.至此实现了成本中心只取委托了当前财务组织的成本中心功能
应付单成本中心取委托了当前财务组织的成本中心DEP方案
本文2024-09-22 19:05:34发表“eas cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-eas-104993.html