<%@ page contentType="text/html; charset=GBK"%> <%@ include file="/IncludeBeginMD.jsp"%> <%@page import="com.amarsoft.app.accounting.product.ProductManage"%> <%@page import="com.amarsoft.app.accounting.config.loader.ProductConfig"%> <% //产品编号 String objectNo = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ObjectNo")); if(objectNo == null) objectNo = ""; String objectType = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("ObjectType")); if(objectType == null) objectType = ""; //取已配置的条件信息 ASValuePool as = new ASValuePool(); ASResultSet rs = Sqlca.getASResultSet(new SqlObject("select * from CONDITION_RULE where ObjectNo = :ObjectNo and ObjectType = :ObjectType order by RuleID asc,SerialNo asc").setParameter("ObjectNo",objectNo).setParameter("ObjectType",objectType)); while(rs.next()){ BusinessObject bo = new BusinessObject("jbo.app.CONDITION_RULE",rs.getRS()); List lsbo = (List)as.getAttribute(bo.getString("RuleID")); if(lsbo == null) { lsbo = new ArrayList(); as.setAttribute(bo.getString("RuleID"),lsbo); } lsbo.add(bo); } rs.getStatement().close(); //数组表示 :字段ID,字段名,字段类型,字段值来源 StringBuffer fieldsArray = new StringBuffer(); fieldsArray.append("var term = new Array();"); int m =0; ArrayList itemList = new ArrayList(); com.amarsoft.dict.als.object.Item[] items = com.amarsoft.dict.als.cache.CodeCache.getItems("TermAttribute"); for(com.amarsoft.dict.als.object.Item item:items) { if(item.getItemAttribute().indexOf("OH") >=0 && item.getItemDescribe().indexOf("BAS") >= 0) { fieldsArray.append(" term["+m+"]=new Array(\""+item.getItemNo()+"\",\""+item.getItemName()+"\",\""+DataConvert.toString(item.getBankNo())+"\",\""+DataConvert.toString(item.getRelativeCode())+"\");"); m++; itemList.add(item); } } %>
<% int row = 0; for(;row < as.getKeys().length+8;row++) { String key = ""; if(row < as.getKeys().length) key = (String)as.getKeys()[row]; String tabDisplay = "",imgDisplay=""; if(row > as.getKeys().length) { tabDisplay = "display:none"; } if(row >= as.getKeys().length) { imgDisplay = "display:none"; } if(row!=0) { %> <% } %> <% if(row <% } else { %> <% } %> <% } %>

方案条件

(逻辑框内各个条件是且关系,框与框之间是或关系)
TITLE style='WIDTH: 100%;'>

) style='CURSOR: hand' width='15' height='15'/> ) style='CURSOR: hand; display:none;' width='15' height='15'/> ) style='CURSOR: hand;display:none;' width='15' height='15'/> ) style='CURSOR: hand;' width='15' height='15'/>
<% List boList = (List)as.getAttribute(key); if(boList == null) boList = new ArrayList(); for(int col=0;col"); for(com.amarsoft.dict.als.object.Item item:items) { if(item.getItemNo().equals(compareType)) compareOption.append(""); else compareOption.append(""); } StringBuffer fieldsOption = new StringBuffer(); fieldsOption.append(""); for(com.amarsoft.dict.als.object.Item item:itemList) { if(item.getItemNo().equals(colID)) fieldsOption.append(""); else fieldsOption.append(""); } //判断区域展示 String textareaStyle = "display:none" ; String inputareaStyle = ""; if(compareType != null && (compareType.equalsIgnoreCase("Contain")||compareType.equalsIgnoreCase("NoContain") ||compareType.equalsIgnoreCase("in") || compareType.equalsIgnoreCase("notin"))) { inputareaStyle = "style=' display:none '"; textareaStyle = ""; } String display=""; if(col>boList.size()) { display="style=' display:none '"; } %> > <% display=""; if(col <% } else { display="style=' display:none '"; %> <% } %> <% col++; } %>
,<%=col%>) style='CURSOR: hand' width='15' height='15'/> ,<%=col%>) style='CURSOR: hand; display:none;' width='15' height='15'/> ,<%=col%>) style='CURSOR: hand;display:none;' width='15' height='15'/> ,<%=col%>) style='CURSOR: hand;' width='15' height='15'/> value="<%=serialNo %>" id="SerialNoR<%=row%>C<%=col%>"/> value="<%=colName %>" id="ColNameR<%=row%>C<%=col%>"/> value="<%=colType %>" id="ColTypeR<%=row%>C<%=col%>"/> value="<%=colSource %>" id="ColSourceR<%=row%>C<%=col%>"/> <% if(colSource!=null && !colSource.equals("")) { StringBuffer sb = new StringBuffer(); sb.append(""); if(colSource.toUpperCase().startsWith("CODE:")) { items = com.amarsoft.dict.als.cache.CodeCache.getItems(colSource.substring(5)); for(com.amarsoft.dict.als.object.Item item:items) { if(item.getItemNo().equals(valueList)) sb.append(""); else sb.append(""); } } else { ASResultSet rsTemp = Sqlca.getASResultSet(colSource.substring(4)); while(rsTemp.next()) { if(rsTemp.getString(1).equals(valueList)) sb.append(""); else sb.append(""); } rsTemp.close(); } %> value="<%=valueList %>" style="display:none" onchange=ChangeValue(<%=row%>,<%=col%>)> <% }else { %> value="<%=valueList %>" <%=inputareaStyle%> id="ValueListBR<%=row%>C<%=col%>" onchange=ChangeValue(<%=row%>,<%=col%>)> <% } %> ,<%=col%>) style="<%=textareaStyle%>" type=button value='...'>
<%@ include file="/IncludeEnd.jsp"%>