前台根据单据类型编码获取节点编号 String funNode = PfUIDataCache.getBillType(new BillTypeCacheKey().buildBilltype(context.getSrcBillType()).buildPkGroup(context.getPk_group())).getNodecode(); IPfExchangeService exchangeService=NCLocator.getInstance().lookup(IPfExchangeService.class);
ExchangeVO changeVO=exchangeService.queryMostSuitableExchangeVO(context.getSrcBillType(),context.getCurrBilltype(), null, PfUtilUITools.getLoginGroup(), null); if (changeVO != null) { src_qrytemplate = changeVO.getSrc_qrytemplate(); src_qrytemplate = src_qrytemplate == null ? null : src_qrytemplate.trim(); src_billui = changeVO.getSrc_billui(); src_nodekey = changeVO.getSrc_nodekey(); }
IBillReferQuery qcDLG = null; if (StringUtil.isEmptyWithTrim(src_qrytemplate)) { Logger.debug("使用来源单据类型对应节点使用的查询模板对话框"); src_qrytemplate = PfUtilUITools.getTemplateId(ITemplateStyle.queryTemplate, context.getPk_group(), funNode, context.getUserId(), src_nodekey); qcDLG = setConditionClient(src_qrytemplate, context.getParent(), context.getUserId(), funNode, context.getPk_group()); } else if (src_qrytemplate.startsWith("<")) { Logger.debug("使用产品组定制的来源单据查询对话框"); src_qrytemplate = src_qrytemplate.substring(1, src_qrytemplate.length() - 1); qcDLG = loadUserQuery(context.getParent(), src_qrytemplate, context.getPk_group(), context.getUserId(), funNode, context.getCurrBilltype(), context.getSrcBillType(), src_nodekey, context.getUserObj()); } else { Logger.debug("使用注册的查询模板的查询对话框"); qcDLG = setConditionClient(src_qrytemplate, context.getParent(), context.getUserId(), funNode, context.getPk_group()); }
if(context.getBusiTypes()!= null && qcDLG instanceof IBillReferQueryWithBusitype) ((IBillReferQueryWithBusitype)qcDLG).setBusitypes(context.getBusiTypes());
if(context.getTransTypes()!= null && qcDLG instanceof IBillReferQueryWithTranstype) ((IBillReferQueryWithTranstype)qcDLG).setTranstypes(context.getTransTypes()); if (context.getSrcBillId() == null) { if (qcDLG.showModal() == UIDialog.ID_OK) { refBillSource(context.getPk_group(), funNode, context.getUserId(), context.getCurrBilltype(), context.getParent(), context.getUserObj(), context.getSrcBillType(), src_qrytemplate, src_billui, src_nodekey, null, qcDLG); } else { m_isOk = false; return; } } else { refBillSource(context.getPk_group(), funNode, context.getUserId(), context.getCurrBilltype(), context.getParent(), context.getUserObj(), context.getSrcBillType(), src_qrytemplate, src_billui, src_nodekey, context.getSrcBillId(), qcDLG); return; }
|