SelectSystemDirectory.jsp
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:17k
源码类别:
OA系统
开发平台:
Java
- <%@ page contentType="text/html; charset=gb2312"%>
- <%@ page import="java.util.*,com.gforce.gfoa.*,com.gforce.currency.*" %>
- <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
- <title>系统目录选择页面——GForce OA 2.0</title>
- <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
- <script language="javascript" type="text/javascript">
- function showtree(jibie,shangjiID,bline)
- {
- if(jibie<1)
- {
- document.write("<div id="t" + jibie + "_" + shangjiID +"" style="display:;line-height: 10px;">");
- }
- else
- {
- document.write("<div id="t" + jibie + "_" + shangjiID +"" style="display:none;line-height: 10px;">");
- }
- var i,notislast,j,haschild;
- notislast=false;
- haschild=false;
- for(i=0;i<jsArray.length;i++)
- {
- if((jsArray[i][3]==jibie + 1)&&(jsArray[i][2]==shangjiID.toString()))
- {
- if(jsArray[i][12]=="true")
- {
- var j,maxorder=0;
- haschild=false;
- for(j=0;j<jsArray.length;j++)
- {
- if((jsArray[j][3]==jibie + 1)&&(jsArray[j][2]==shangjiID.toString())&&parseInt(maxorder)<parseInt(jsArray[j][5]))
- {
- maxorder=jsArray[j][5];
- }
- }
- for(j=0;j<jsArray.length;j++)
- {
- if((jsArray[j][3]==jibie + 2)&&(jsArray[j][2]==jsArray[i][0]))
- {
- haschild=true;
- break;
- }
- }
- bline = bline.substr(0,jibie);
- for(j=0;j<bline.length;j++)
- if(bline.substr(j,1)=="1")
- document.write("<img align="absbottom" src="/images/tree/i.gif" border="0" width="19" height="19">");
- else
- document.write("<img align="absbottom" src="/images/tree/white.gif" border="0" width="19" height="19">");
- if(parseInt(maxorder)>parseInt(jsArray[i][5]))
- {
- if(haschild)
- {
- if(jsArray[i][10]=="true")
- if(jsArray[i][7]=="")
- document.write("<a href="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ");" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom" src="/images/tree/tplus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom" src="/images/tree/folderclosed.gif" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><input type="radio" name="SystemDirectory" onchange="checkdepart(this.value)" value="" + jsArray[i][0] + "">" + jsArray[i][1] + "</a><br>");
- else
- document.write("<a href="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ");" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom" src="/images/tree/tplus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom" src=""+jsArray[i][7] +"" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><input type="radio" name="SystemDirectory" onchange="checkdepart(this.value)" value="" + jsArray[i][0] + "">" + jsArray[i][1] + "</a><br>");
- else
- if(jsArray[i][7]=="")
- document.write("<a href="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ")" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom" src="/images/tree/tplus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom" src="/images/tree/folderclosed.gif" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><input type="radio" name="SystemDirectory" onchange="checkdepart(this.value)" value="" + jsArray[i][0] + "">" + jsArray[i][1] + "</a><br>");
- else
- document.write("<a href="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ")" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom" src="/images/tree/tplus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom" src=""+jsArray[i][7] +"" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><input type="radio" name="SystemDirectory" onchange="checkdepart(this.value)" value="" + jsArray[i][0] + "">" + jsArray[i][1] + "</a><br>");
- }
- else
- {
- if(jsArray[i][10]=="true")
- if(jsArray[i][7]=="")
- document.write("<img align="absbottom" src="/images/tree/t.gif" border="0" width="19" height="19"><img align="absbottom" src="/images/tree/book.gif" border="0" width="19" height="19" title=""+ jsArray[i][11] +""><input type="radio" name="SystemDirectory" onchange="checkdepart(this.value)" value="" + jsArray[i][0] + "">" + jsArray[i][1] + "<br>");
- else
- document.write("<img align="absbottom" src="/images/tree/t.gif" border="0" width="19" height="19"><img align="absbottom" src="" + jsArray[i][7] +"" border="0" width="19" height="19" title=""+ jsArray[i][11] +""><input type="radio" name="SystemDirectory" onchange="checkdepart(this.value)" value="" + jsArray[i][0] + "">" + jsArray[i][1] + "<br>");
- else
- if(jsArray[i][7]=="")
- document.write("<img align="absbottom" src="/images/tree/t.gif" border="0" width="19" height="19"><img align="absbottom" src="/images/tree/book.gif" border="0" width="19" height="19" title=""+ jsArray[i][11] +""><input type="radio" name="SystemDirectory" onchange="checkdepart(this.value)" value="" + jsArray[i][0] + "">" + jsArray[i][1] + "<br>");
- else
- document.write("<img align="absbottom" src="/images/tree/t.gif" border="0" width="19" height="19"><img align="absbottom" src="" + jsArray[i][7] +"" border="0" width="19" height="19" title=""+ jsArray[i][11] +""><input type="radio" name="SystemDirectory" onchange="checkdepart(this.value)" value="" + jsArray[i][0] + "">" + jsArray[i][1] + "<br>");
- }
- bline += "1".toString();
- showtree(jibie + 1,jsArray[i][0],bline);
- }
- else
- {
- if(haschild)
- {
- if(jsArray[i][10]=="true")
- if(jsArray[i][7]=="")
- document.write("<a href="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ");" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom" src="/images/tree/lplus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom" src="/images/tree/folderclosed.gif" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><input type="radio" name="SystemDirectory" onchange="checkdepart(this.value)" value="" + jsArray[i][0] + "">" + jsArray[i][1] + "</a><br>");
- else
- document.write("<a href="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ");" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom" src="/images/tree/lplus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom" src=""+jsArray[i][7] +"" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><input type="radio" name="SystemDirectory" onchange="checkdepart(this.value)" value="" + jsArray[i][0] + "">" + jsArray[i][1] + "</a><br>");
- else
- if(jsArray[i][7]=="")
- document.write("<a href="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ")" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom" src="/images/tree/lplus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom" src="/images/tree/folderclosed.gif" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><input type="radio" name="SystemDirectory" onchange="checkdepart(this.value)" value="" + jsArray[i][0] + "">" + jsArray[i][1] + "</a><br>");
- else
- document.write("<a href="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ")" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom" src="/images/tree/lplus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom" src=""+jsArray[i][7] +"" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><input type="radio" name="SystemDirectory" onchange="checkdepart(this.value)" value="" + jsArray[i][0] + "">" + jsArray[i][1] + "</a><br>");
- }
- else
- {
- if(jsArray[i][10]=="true")
- if(jsArray[i][7]=="")
- document.write("<img align="absbottom" src="/images/tree/l.gif" border="0" width="19" height="19"><img align="absbottom" src="/images/tree/book.gif" border="0" width="19" height="19" title=""+ jsArray[i][11] +""><input type="radio" name="SystemDirectory" onchange="checkdepart(this.value)" value="" + jsArray[i][0] + "">" + jsArray[i][1] + "<br>");
- else
- document.write("<img align="absbottom" src="/images/tree/l.gif" border="0" width="19" height="19"><img align="absbottom" src="" + jsArray[i][7] +"" border="0" width="19" height="19" title=""+ jsArray[i][11] +""><input type="radio" name="SystemDirectory" onchange="checkdepart(this.value)" value="" + jsArray[i][0] + "">" + jsArray[i][1] + "<br>");
- else
- if(jsArray[i][7]=="")
- document.write("<img align="absbottom" src="/images/tree/l.gif" border="0" width="19" height="19"><img align="absbottom" src="/images/tree/book.gif" border="0" width="19" height="19" title=""+ jsArray[i][11] +""><input type="radio" name="SystemDirectory" onchange="checkdepart(this.value)" value="" + jsArray[i][0] + "">" + jsArray[i][1] + "<br>");
- else
- document.write("<img align="absbottom" src="/images/tree/l.gif" border="0" width="19" height="19"><img align="absbottom" src="" + jsArray[i][7] +"" border="0" width="19" height="19" title=""+ jsArray[i][11] +""><input type="radio" name="SystemDirectory" onchange="checkdepart(this.value)" value="" + jsArray[i][0] + "">" + jsArray[i][1] + "<br>");
- }
- bline += "0".toString();
- showtree(jibie + 1,jsArray[i][0],bline);
- }
- }
- }
- }
- document.write("</div>");
- }
- function clicktree(jibie,shangjiID)
- {
- if(shangjiID>0)
- if(eval("t" + jibie + "_" + shangjiID).style.display=="none")
- {
- eval("t" + jibie + "_" + shangjiID).style.display="";
- if(eval("document.n" + jibie + "_" + shangjiID).src.toLowerCase().indexOf("tplus.gif")>0)
- eval("document.n" + jibie + "_" + shangjiID).src="/images/tree/tminus.gif";
- else
- eval("document.n" + jibie + "_" + shangjiID).src="/images/tree/lminus.gif";
- folderOpenString = "";
- for(j=0;j<jsArray.length;j++)
- {
- if((jsArray[j][0]==shangjiID))
- {
- folderOpenString = jsArray[j][6];
- break;
- }
- }
- if(folderOpenString=="")
- eval("document.f" + jibie + "_" + shangjiID).src="/images/tree/folderopen.gif";
- else
- eval("document.f" + jibie + "_" + shangjiID).src=folderOpenString;
- }
- else
- {
- eval("t" + jibie + "_" + shangjiID).style.display="none";
- if(eval("document.n" + jibie + "_" + shangjiID).src.toLowerCase().indexOf("tminus.gif")>0)
- eval("document.n" + jibie + "_" + shangjiID).src="/images/tree/tplus.gif";
- else
- eval("document.n" + jibie + "_" + shangjiID).src="/images/tree/lplus.gif";
- folderClosedString = "";
- for(j=0;j<jsArray.length;j++)
- {
- if((jsArray[j][0]==shangjiID))
- {
- folderClosedString = jsArray[j][7];
- break;
- }
- }
- if(folderClosedString=="")
- eval("document.f" + jibie + "_" + shangjiID).src="/images/tree/folderclosed.gif";
- else
- eval("document.f" + jibie + "_" + shangjiID).src=folderClosedString;
- }
- }
- function checkdepart(systemdirectoryid)
- {
- if(systemdirectoryid=="0")
- {
- window.parent.self.document.all.Station.value="_0_";
- window.parent.self.document.all.LevelNumber.value="1";
- var maxorder = 0;
- for(var i=0;i<jsArray.length;i++)
- {
- if(jsArray[i][2]=="0" && jsArray[i][3]=="1")
- {
- maxorder++;
- }
- }
- window.parent.self.document.all.OrderNumber.value=maxorder + 1;
- }
- else
- {
- for(var i=0;i<jsArray.length;i++)
- {
- if(jsArray[i][0]==systemdirectoryid)
- {
- window.parent.self.document.all.Station.value=jsArray[i][13] + jsArray[i][0] + "_";
- window.parent.self.document.all.LevelNumber.value= parseInt(jsArray[i][3]) + 1;
- var maxorder = 0;
- for(var j=0;j<jsArray.length;j++)
- {
- if(jsArray[j][13]==jsArray[i][13] +jsArray[i][0] + "_" && parseInt(jsArray[i][3]) + 1 == parseInt(jsArray[j][3]))
- {
- maxorder++;
- }
- }
- window.parent.self.document.all.OrderNumber.value=maxorder + 1;
- break;
- }
- }
- }
- window.parent.self.document.all.SystemDirectoryID.value=systemdirectoryid;
- }
- </script>
- <style type="text/css">
- <!--
- a {
- color: #0A0A0A;
- }
- body {
- color: #0A0A0A;
- }
- -->
- </style>
- </head>
- <body leftmargin="5" topmargin="0" bgcolor="<%=m_session.GetString("BackColor")%>">
- <form name="SelectSystemDirectory">
- <table width="98%" height="100%" border="0" align="center" cellspacing="0">
- <tr>
- <td align="left" valign="top">
- <img src="/images/tree/home.gif" align="absbottom" border="0" width="19" height="19"><input type="radio" name="SystemDirectory" value="0" checked="true" onchange="checkdepart(this.value);"><a><%=SystemParament.GetSystemName()%></a><br>
- <script language="javascript">
- var jsArray = new Array();
- <%
- SystemDirectoryManager systemdirectorymanager = new SystemDirectoryManager();
- Vector vc = systemdirectorymanager.getSystemDirectoryData();
- for(int row=0;row<vc.size();row++)
- {
- String strTemp = "";
- Vector hashtab = (Vector)vc.get(row);
- for(int i=0;i<hashtab.size();i++)
- {
- if(i==2)
- {
- String strFarther = hashtab.get(i).toString();
- strFarther = strFarther.substring(0,strFarther.length() - 1);
- strFarther = strFarther.substring(strFarther.lastIndexOf("_") + 1);
- strTemp += ","" + strFarther + """;
- }
- else
- strTemp += ","" + hashtab.get(i).toString() + """;
- }
- out.println("jsArray[" + (row) + "]=new Array(" + strTemp.substring(1) + ","" + hashtab.get(2).toString() + "");");
- }
- %>
- showtree(0,0,"");
- if(window.parent.self.document.all.SystemDirectoryID.value=="")
- {
- checkdepart(0);
- }
- else
- {
- // alert(window.parent.self.document.all.SystemDirectoryID.value);
- checkdepart(window.parent.self.document.all.SystemDirectoryID.value);
- for(var i=0;i<document.SelectSystemDirectory.elements.length;i++)
- {
- // alert(document.SelectSystemDirectory.elements[i].name);
- if(document.SelectSystemDirectory.elements[i].name=="SystemDirectory" && document.SelectSystemDirectory.elements[i].value==window.parent.self.document.all.SystemDirectoryID.value)
- document.SelectSystemDirectory.elements[i].checked=true;
- }
- }
- </script>
- </td>
- </tr>
- </table>
- </form>
- </body>
- </html>