AddDocTempletMoveFlow.jsp
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:19k
源码类别:
OA系统
开发平台:
Java
- <%@ page contentType="text/html; charset=gb2312"%>
- <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
- <jsp:include page="/CheckLogin.jsp" flush="true"/>
- <%
- Session m_session = new Session(session);
- int intUserID = m_session.GetInt("UserID");
- Request m_request = new Request(request);
- String strIp = request.getRemoteAddr();
- int iSysDirID = m_request.GetInt("SysDirID");
- String strDocTempletTableName = m_request.GetString("DocTempletTableName");
- %>
- <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" src="/js/changestyle.js"></script>
- <script language="JavaScript" type="text/javascript">
- var MyArray = new Array();
- var MoveFlow = new Array();
- <%
- Vector MoveFlow_vt = MoveFlowTempletManager.getRecordBySearch("","","","","","","","a.FlowName",true,false);
- for (int i=0;i<MoveFlow_vt.size();i++)
- {
- out.println("MoveFlow[" + i + "]=new Array('" + ((Vector)MoveFlow_vt.get(i)).get(0) + "','" + ((Vector)MoveFlow_vt.get(i)).get(1).toString() + "','" + ((Vector)MoveFlow_vt.get(i)).get(2).toString() + "','" + ((Vector)MoveFlow_vt.get(i)).get(3).toString() + "','" + UserManager.getPersonnelNamesByUserIDs(((Vector)MoveFlow_vt.get(i)).get(2).toString()) + "','" + DepartmentManager.getDepartNamesByIDs(((Vector)MoveFlow_vt.get(i)).get(3).toString()).replaceAll("n",",") + "');");
- }
- %>
- var DocTemp = new Array();
- <%
- Vector Doc_vt = DocumentTempletManager.getRecordBySearch("",iSysDirID,"","","","","","","","","","","","","","","a.TempletName",true,false);
- for (int i=0;i<Doc_vt.size();i++)
- {
- out.println("DocTemp[" + i + "]=new Array('" + ((Vector)Doc_vt.get(i)).get(0) + "','" + ((Vector)Doc_vt.get(i)).get(3).toString() + "','" + ((Vector)Doc_vt.get(i)).get(6).toString() + "','" + ((Vector)Doc_vt.get(i)).get(7).toString() + "','" + UserManager.getPersonnelNamesByUserIDs(((Vector)Doc_vt.get(i)).get(6).toString()) + "','" + DepartmentManager.getDepartNamesByIDs(((Vector)Doc_vt.get(i)).get(7).toString()).replaceAll("n",",") + "','" + ((Vector)Doc_vt.get(i)).get(8).toString() + "','" + ((Vector)Doc_vt.get(i)).get(9).toString() + "','" + UserManager.getPersonnelNamesByUserIDs(((Vector)Doc_vt.get(i)).get(8).toString()) + "','" + DepartmentManager.getDepartNamesByIDs(((Vector)Doc_vt.get(i)).get(9).toString()).replaceAll("n",",") + "');");
- }
- %>
- function checkAddFields()
- {
- if(document.AddDocTempletMoveFlow.Name.value==0)
- {
- alert("请填写公文流转模板名称!");
- document.AddDocTempletMoveFlow.Name.focus();
- return false;
- }
- if(document.AddDocTempletMoveFlow.DocTempletID.value==0)
- {
- alert("请选择公文模板!");
- document.AddDocTempletMoveFlow.DocTempletID.focus();
- return false;
- }
- if(document.AddDocTempletMoveFlow.MoveFlowID.value==0)
- {
- alert("请选择流转模板!");
- document.AddDocTempletMoveFlow.MoveFlowID.focus();
- return false;
- }
- }
- function EditFields()
- {
- var StrMoveFlowWA_UIDs="";
- var StrMoveFlowWA_UNames="";
- var StrDocTempWA_UIDs="";
- var StrDocTempWA_UNames="";
- var StrDocTempWA_DIDs="";
- var StrDocTempWA_DNames="";
- var StrMoveFlowWA_DIDs="";
- var StrMoveFlowWA_DNames="";
- var WUName="";
- var WDName="";
- var StrDocTempOR_UIDs="";
- var StrDocTempOR_UNames="";
- var StrDocTempOR_DIDs="";
- var StrDocTempOR_DNames ="";
- var RUName="";
- var RDName="";
- iDocIndex=document.AddDocTempletMoveFlow.DocTempletID.selectedIndex-1;
- iMoveIndex=document.AddDocTempletMoveFlow.MoveFlowID.selectedIndex-1;
- if (iDocIndex<0)
- {
- StrDocTempWA_UIDs="";
- StrDocTempWA_DIDs="";
- StrDocTempWA_UNames = "";
- StrDocTempWA_DNames = "";
- StrDocTempOR_UIDs = "";
- StrDocTempOR_UNames = "";
- StrDocTempOR_DIDs = "";
- StrDocTempOR_DNames = "";
- }
- else
- {
- StrDocTempWA_UIDs = DocTemp[iDocIndex][2];
- StrDocTempWA_DIDs = DocTemp[iDocIndex][3];
- StrDocTempWA_UNames = DocTemp[iDocIndex][4];
- StrDocTempWA_DNames = DocTemp[iDocIndex][5];
- StrDocTempOR_UIDs = DocTemp[iDocIndex][6];
- StrDocTempOR_DIDs = DocTemp[iDocIndex][7];
- StrDocTempOR_UNames = DocTemp[iDocIndex][8];
- StrDocTempOR_DNames = DocTemp[iDocIndex][9];
- }
- if (iMoveIndex<0)
- {
- StrMoveFlowWA_UIDs="";
- StrMoveFlowWA_DIDs="";
- StrMoveFlowWA_UNames = "";
- StrMoveFlowWA_DNames = "";
- }
- else
- {
- StrMoveFlowWA_UIDs = MoveFlow[iMoveIndex][2];
- StrMoveFlowWA_DIDs = MoveFlow[iMoveIndex][3];
- StrMoveFlowWA_UNames = MoveFlow[iMoveIndex][4];
- StrMoveFlowWA_DNames = MoveFlow[iMoveIndex][5];
- }
- if (StrDocTempWA_UIDs.length<=StrMoveFlowWA_UIDs.length)
- {
- WUstring="";
- WUName = "";
- if (StrDocTempWA_UIDs.length>0)
- {
- if(StrDocTempWA_UIDs.indexOf(",")>0)
- {
- MyArray = StrDocTempWA_UIDs.split(",");
- MyArray1 = StrDocTempWA_UNames.split(",");
- StrMoveFlowWA_UIDs=","+StrMoveFlowWA_UIDs+",";
- for (var i=0;i<MyArray.length;i++)
- {
- if (StrMoveFlowWA_UIDs.indexOf(","+ MyArray[i] +",")>=0)
- {
- if(WUstring=="")
- {
- WUstring += MyArray[i];
- WUName += MyArray1[i];
- }
- else
- {
- WUstring += (","+MyArray[i]);
- WUName += (","+MyArray1[i]);
- }
- }
- }
- }
- else
- {
- WUstring=StrDocTempWA_UIDs;
- WUName = StrDocTempWA_UNames;
- }
- }
- }
- else
- {
- WUstring="";
- if (StrMoveFlowWA_UIDs.length>0)
- {
- if(StrMoveFlowWA_UIDs.indexOf(",")>0)
- {
- MyArray = StrMoveFlowWA_UIDs.split(",");
- MyArray1 = StrMoveFlowWA_UNames.split(",");
- StrDocTempWA_UIDs=","+StrDocTempWA_UIDs+",";
- for (var i=0;i<MyArray.length;i++)
- {
- if (StrDocTempWA_UIDs.indexOf(","+ MyArray[i] +",")>=0)
- {
- if(WUstring=="")
- {
- WUstring += MyArray[i];
- WUName += MyArray1[i];
- }
- else
- {
- WUstring += (","+MyArray[i]);
- WUName += (","+MyArray1[i]);
- }
- }
- }
- }
- else
- {
- WUstring=StrMoveFlowWA_UIDs;
- WUName=StrMoveFlowWA_UNames;
- }
- }
- }
- if (StrDocTempWA_DIDs.length<=StrMoveFlowWA_DIDs.length)
- {
- WDstring="";
- WDName="";
- if (StrDocTempWA_DIDs.length>0)
- {
- if(StrDocTempWA_DIDs.indexOf(",")>0)
- {
- MyArray = StrDocTempWA_DIDs.split(",");
- MyArray1 = StrDocTempWA_Dnames.split(",");
- StrMoveFlowWA_DIDs=","+StrMoveFlowWA_DIDs+",";
- for (var i=0;i<MyArray.length;i++)
- {
- if (StrMoveFlowWA_DIDs.indexOf(","+ MyArray[i] +",")>=0)
- {
- if(WDstring=="")
- {
- WDstring += MyArray[i];
- WDName += MyArray1[i];
- }
- else
- {
- WDstring += (","+MyArray[i]);
- WDName += ("n"+MyArray1[i]);
- }
- }
- }
- }
- else
- {
- WDstring=StrDocTempWA_DIDs;
- WDName=StrDocTempWA_DNames;
- }
- }
- }
- else
- {
- WDstring="";
- WDName = "";
- if (StrMoveFlowWA_DIDs.length>0)
- {
- if(StrMoveFlowWA_DIDs.indexOf(",")>0)
- {
- MyArray = StrMoveFlowWA_DIDs.split(",");
- MyArray1 = StrMoveFlowWA_DNames.split(",");
- StrDocTempWA_DIDs=","+StrDocTempWA_DIDs+",";
- for (var i=0;i<MyArray.length;i++)
- {
- if (StrDocTempWA_DIDs.indexOf(","+ MyArray[i] +",")>=0)
- {
- if (WDstring=="")
- {
- WDstring += MyArray[i];
- WDName += MyArray1[i];
- }
- else
- {
- WDstring += (","+MyArray[i]);
- WDName += ("n"+MyArray1[i]);
- }
- }
- }
- }
- else
- {
- WDstring=StrMoveFlowWA_DIDs;
- WDName=StrMoveFlowWA_DNames;
- }
- }
- }
- if (StrDocTempOR_UNames.length>0)
- {
- RUName = StrDocTempOR_UNames;
- }
- if (StrDocTempOR_DNames.length>0)
- {
- for(;;)
- {
- if (StrDocTempOR_DNames.indexOf(",")>0)
- {
- StrDocTempOR_DNames = StrDocTempOR_DNames.replace(",","n");
- }
- else
- {
- break;
- }
- }
- RDName = StrDocTempOR_DNames;
- }
- document.AddDocTempletMoveFlow.WritableUserIDs.value=WUstring;
- document.AddDocTempletMoveFlow.WritableUserNames.value=WUName;
- document.AddDocTempletMoveFlow.WritableDepartIDs.value=WDstring;
- document.AddDocTempletMoveFlow.WritableDepartNames.value=WDName;
- document.AddDocTempletMoveFlow.ReadOnlyUserIDs.value=StrDocTempOR_UIDs;
- document.AddDocTempletMoveFlow.ReadOnlyUserNames.value=RUName;
- document.AddDocTempletMoveFlow.ReadOnlyDepartIDs.value=StrDocTempOR_DIDs;
- document.AddDocTempletMoveFlow.ReadOnlyDepartNames.value=RDName;
- }
- function AddMoveFlow()
- {
- for(var i=0;i<MoveFlow.length;i++)
- {
- document.AddDocTempletMoveFlow.MoveFlowID.length++;
- document.AddDocTempletMoveFlow.MoveFlowID.options[document.AddDocTempletMoveFlow.MoveFlowID.length-1].text=MoveFlow[i][1];
- document.AddDocTempletMoveFlow.MoveFlowID.options[document.AddDocTempletMoveFlow.MoveFlowID.length-1].value=MoveFlow[i][0];
- }
- for(var i=0;i<DocTemp.length;i++)
- {
- document.AddDocTempletMoveFlow.DocTempletID.length++;
- document.AddDocTempletMoveFlow.DocTempletID.options[document.AddDocTempletMoveFlow.DocTempletID.length-1].text=DocTemp[i][1];
- document.AddDocTempletMoveFlow.DocTempletID.options[document.AddDocTempletMoveFlow.DocTempletID.length-1].value=DocTemp[i][0];
- }
- }
- </script>
- </head>
- <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0" onLoad="AddMoveFlow();document.AddDocTempletMoveFlow.Name.focus();">
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td height="50" valign="top" background="../images/dy-back.gif">
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr valign="middle">
- <td width="61" align="center" height="20"><img src="../images/dy-01.gif" width="38" height="36"></td>
- <td width="118" nowrap="nowrap" valign="middle"><strong><font color="#000000">新增流转模板</font></strong></td>
- <td align="right" nowrap="nowrap" valign="bottom">
- <!-- 群增<img src="../images/MulAdd.gif" onMouseOver="this.src='../images/MulAdd_a.gif';" onMouseOut="this.src='../images/MulAdd.gif';" border="0" height="22" width="59"> -->
- <!--<img src="../images/Single.gif" onMouseOver="this.src='../images/Single_a.gif';" onMouseOut="this.src='../images/Single.gif';" border="0" height="22" width="59"> -->
- <!-- 修改<img src="../images/Update.gif" onMouseOver="this.src='../images/Update_a.gif';" onMouseOut="this.src='../images/Update.gif';" border="0" height="22" width="59"> -->
- <!-- 删除<img src="../images/Del.gif" onMouseOver="this.src='../images/Del_a.gif';" onMouseOut="this.src='../images/Del.gif';" border="0" height="22" width="59"> -->
- <!-- 查看<img src="../images/Query.gif" onMouseOver="this.src='../images/Query_a.gif';" onMouseOut="this.src='../images/Query.gif';" border="0" height="22" width="59"> -->
- <!-- 组合查询<img src="../images/GroupQuery.gif" onMouseOver="this.src='../images/GroupQuery_a.gif';" onMouseOut="this.src='../images/GroupQuery.gif';" border="0" height="22" width="79"> -->
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <table width="100%" height="100%" border="0" align="center" cellspacing="0">
- <tr>
- <td align="center" valign="top"><p> </p>
- <form name="AddDocTempletMoveFlow" action="AddDocTempletMoveFlowAction.jsp?SysDirID=<%=iSysDirID%>" method="post" onSubmit="javascript:return checkAddFields();">
- <table border="1" cellpadding="1" cellspacing="1" width="90%">
- <tr>
- <td width="14%" align="center" valign="middle" nowrap><font color="#0A0A0A">公文流转模板名称: </font></td>
- <td colspan="3" align="left" valign="middle" nowrap> <input name="Name" type="text" maxlength="300" size="60"></td>
- </tr>
- <tr><td colspan="4"><p> </p></td></tr>
- <tr>
- <td width="14%" align="center" valign="middle" nowrap><font color="#0A0A0A">公文模板名称:</font></td>
- <td colspan="1" align="left" valign="middle" nowrap>
- <select name='DocTempletID' onChange="EditFields()"><option value=0 selected>无</option></select>
- </td>
- <td width="14%" align="left" valign="middle" nowrap><font color="#0A0A0A"> 流转模版名称:</font></td>
- <td colspan="1" align="left" valign="middle" nowrap>
- <select name='MoveFlowID' onChange="EditFields()"><option value=0 selected>无</option></select>
- <input name="DocTempletTableName" type="hidden" value="<%=strDocTempletTableName%>">
- <input name="UpdateUserID" type="hidden" value="<%=intUserID%>">
- <%java.util.Date t_Date = new java.util.Date();%>
- <input name="UpdateTime" type="hidden" value="<%=StringNew.GetDateString(t_Date,"yyyy-MM-dd HH:mm:ss")%>">
- <input name="UpdateFromIP" type="hidden" value="<%=strIp%>"></td>
- </tr>
- <tr><td colspan="4"><p> </p></td></tr>
- <tr>
- <td width="14%" align="center" valign="middle" nowrap><font color="#0A0A0A">可写用户姓名:</font></td>
- <td colspan="3" align="left" valign="middle" nowrap>
- <textarea name="WritableUserNames" cols="70" rows="3" readonly="true" onDblClick="GetUserIDAndNames(document.AddDocTempletMoveFlow.WritableUserIDs,this);"></textarea>
- <input name="WritableUserIDs" type="hidden">
- <a href="" onclick="GetUserIDAndNames(document.AddDocTempletMoveFlow.WritableUserIDs,document.AddDocTempletMoveFlow.WritableUserNames);return false;" title="选择用户"><img src="/images/couple.gif" border="0"></a>
- </td>
- </tr>
- <tr><td colspan="4"><p> </p></td></tr>
- <tr>
- <td width="14%" align="center" valign="middle" nowrap><font color="#0A0A0A">可写部门名称:</font></td>
- <td colspan="3" align="left" valign="middle" nowrap>
- <textarea name="WritableDepartNames" cols="70" rows="3" readonly="true" ondblclick="GetDepartIDAndNames(document.AddDocTempletMoveFlow.WritableDepartIDs, this);"></textarea>
- <input name="WritableDepartIDs" type="hidden">
- <a href="" onclick="GetDepartIDAndNames(document.AddDocTempletMoveFlow.WritableDepartIDs, document.AddDocTempletMoveFlow.WritableDepartNames);return false;" title="选择部门"><img src="/images/couple.gif" border="0"></a>
- </td>
- </tr>
- <tr><td colspan="4"><p> </p></td></tr>
- <tr>
- <td width="14%" align="center" valign="middle" nowrap><font color="#0A0A0A">只读用户姓名:</font></td>
- <td colspan="3" align="left" valign="middle" nowrap>
- <textarea name="ReadOnlyUserNames" cols="70" rows="3" readonly="true" onDblClick="GetUserIDAndNames(document.AddDocTempletMoveFlow.ReadOnlyUserIDs,this);"></textarea>
- <input name="ReadOnlyUserIDs" type="hidden">
- <a href="" onclick="GetUserIDAndNames(document.AddDocTempletMoveFlow.ReadOnlyUserIDs,document.AddDocTempletMoveFlow.ReadOnlyUserNames);return false;" title="选择用户"><img src="/images/couple.gif" border="0"></a>
- </td>
- </tr>
- <tr><td colspan="4"><p> </p></td></tr>
- <tr>
- <td width="14%" align="center" valign="middle" nowrap><font color="#0A0A0A">只读部门名称:</font></td>
- <td colspan="3" align="left" valign="middle" nowrap>
- <textarea name="ReadOnlyDepartNames" cols="70" rows="3" readonly="true" onDblClick="GetDepartIDAndNames(document.AddDocTempletMoveFlow.ReadOnlyDepartIDs,this);"></textarea>
- <input name="ReadOnlyDepartIDs" type="hidden">
- <a href="" onclick="GetDepartIDAndNames(document.AddDocTempletMoveFlow.ReadOnlyDepartIDs,document.AddDocTempletMoveFlow.ReadOnlyDepartNames);return false;" title="选择部门"><img src="/images/couple.gif" border="0"></a>
- </td>
- </tr>
- <table width="90%" border="0">
- <tr>
- <td width="30%"> </td><td width="70%"> </td>
- </tr>
- <tr>
- <td width="30%"> </td>
- <td align="left" valign="middle" nowrap><input type="submit" value="确定">
- <input type="reset" value="重填">
- <input type="button" value="返回" onclick="window.location='DocTempletMoveFlowManage.jsp?SysDirID=<%=iSysDirID%>';">
- </td>
- </tr>
- </table>
- </table>
- </form>
- </td>
- </tr>
- </table>
- </body>
- </html>