WorkFlowofFormIFrame.jsp
2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<%@ page language="java" contentType="text/html; charset=UTF-8" %> 
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<HTML>
<HEAD>
    <LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
    <%
  		String isBill = request.getParameter("isBill");
  	
	  	String formID = request.getParameter("formID");
	  	
	  	List workFlowIDList = new ArrayList();
	  	
	  	List workflowNameList = new ArrayList();
  	
	  	if(("0".equals(isBill) || "1".equals(isBill)) && (!"".equals(formID) && null != formID))
	  	{
	  	    RecordSet.execute("SELECT * FROM WorkFlow_Base WHERE formID = " + formID + " AND isBill = '" + isBill + "' AND isValid = '1'");
	  	
	  	    //System.out.println("SELECT * FROM WorkFlow_Base WHERE formID = " + formID + " AND isBill = '" + isBill + "' AND isValid = '1'");
	  	    
	  		while(RecordSet.next())
	  		{
	  		    workFlowIDList.add(RecordSet.getString("ID"));
	  		    workflowNameList.add(RecordSet.getString("workFlowName"));
	  		}
	  	}
  	  	  
    %>
</HEAD>
<BODY>
</BODY>
</HTML>
<SCRIPT LANGUAGE="JavaScript">
function init()
{	
<%
	int rowCount = (workFlowIDList.size() / 4 == workFlowIDList.size() / 4.0) ? workFlowIDList.size() / 4 : workFlowIDList.size() / 4 + 1;	
    for(int i = 0; i < rowCount; i++)
    {     
%>
        var oRow = parent.document.all("oTable").insertRow();
        var oCell;
        var oDiv;
        
<%
        for (int j = 0; j < 4; j++)
        //生成一行中的每一列
        {
			if(i * 4 + j < workFlowIDList.size())
			{
%>
				oCell = oRow.insertCell();
	            oDiv = parent.document.createElement("div");
            	oDiv.innerHTML="<input class='inputStyle' type='checkbox' name='workflowID' value='" + <%= (String)workFlowIDList.get(i * 4 + j) %> + "'>";            
                oCell.appendChild(oDiv);
                
                oCell = oRow.insertCell();
	            oDiv = parent.document.createElement("div");
            	oDiv.innerHTML="<%= (String)workflowNameList.get(i * 4 + j) %>";            
                oCell.appendChild(oDiv);
<%
            }
            else
            {
%>
            	oCell = oRow.insertCell();
	            oDiv = parent.document.createElement("div");            
            	oDiv.innerHTML="";            	
            	oCell.appendChild(oDiv);
            	
            	oCell = oRow.insertCell();
	            oDiv = parent.document.createElement("div");            
            	oDiv.innerHTML="";            	
            	oCell.appendChild(oDiv);
<%
            }
        }          
    }
%>
}
function removeValue()
{
    var length = parent.document.all("oTable").rows.length;
    
    for (var i = length - 1; i >= 0; i--)
    {
        parent.document.all("oTable").deleteRow(i)
    }
}
removeValue();
init();
</SCRIPT>