flow_predefine_init.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:8k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8"%>
  2. <%@ page import="java.net.URLEncoder"%>
  3. <%@ page import="cn.js.fan.util.*"%>
  4. <%@ page import="com.redmoon.oa.flow.*"%>
  5. <%@ page import="com.redmoon.oa.dept.*"%>
  6. <%@ page import="com.redmoon.oa.person.*"%>
  7. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  8. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  9. <%
  10. String flowTypeCode = ParamUtil.get(request, "flowTypeCode");
  11. String op = ParamUtil.get(request, "op");
  12. WorkflowPredefineMgr wpm = new WorkflowPredefineMgr();
  13. WorkflowPredefineDb wpd = null;
  14. if (op.equals("edit")) {
  15. int id = ParamUtil.getInt(request, "id");
  16. wpd = wpm.getWorkflowPredefineDb(request, id);
  17. flowTypeCode = wpd.getTypeCode();
  18. }
  19. %>
  20. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  21. <html>
  22. <head>
  23. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  24. <title>预定义流程</title>
  25. <link href="../common.css" rel="stylesheet" type="text/css">
  26. <%@ include file="../inc/nocache.jsp"%>
  27. <script language="JavaScript" type="text/JavaScript">
  28. <!--
  29. function MM_preloadImages() { //v3.0
  30.   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  31.     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  32.     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  33. }
  34. //-->
  35. </script>
  36. <script language=javascript>
  37. <!--
  38. function openWin(url,width,height)
  39. {
  40. window.open(url, "pre_action_modify", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=50,left=120,width="+width+",height="+height);
  41. }
  42. function ModifyAction(user, title, clrindex, userRealName, jobCode, jobName, proxyJobCode, proxyJobName, proxyUserName, proxyUserRealName, fieldWrite, checkState, dept, flag, nodeMode, strategy) {
  43. Designer.ActionUser = user;
  44. Designer.ActionTitle = title;
  45. Designer.ActionColorIndex = clrindex;
  46. Designer.ActionUserRealName = userRealName;
  47. Designer.ActionJobCode = jobCode;
  48. Designer.ActionJobName = jobName;
  49. Designer.ActionProxyJobCode = proxyJobCode;
  50. Designer.ActionProxyJobName = proxyJobName;
  51. Designer.ActionProxyUserName = proxyUserName;
  52. Designer.ActionProxyUserRealName = proxyUserRealName;
  53. Designer.ActionFieldWrite = fieldWrite;
  54. Designer.ActionCheckState = checkState;
  55. Designer.ActionDept = dept;
  56. Designer.ActionFlag = flag;
  57. Designer.ActionDeptMode = Number(nodeMode);
  58. Designer.ActionStrategy = strategy;
  59. Designer.ModifyAction();
  60. }
  61. function getActionUser() {
  62. return Designer.ActionUser;
  63. }
  64. function getActionTitle() {
  65. return Designer.ActionTitle;
  66. }
  67. function getActionColorIndex() {
  68. return Designer.ActionColorIndex;
  69. }
  70. function getActionUserRealName() {
  71. return Designer.ActionUserRealName;
  72. }
  73. function getActionCheckState() {
  74. return Designer.ActionCheckState;
  75. }
  76. function getActionJobCode() {
  77. return Designer.ActionJobCode;
  78. }
  79. function getActionJobName() {
  80. return Designer.ActionJobName;
  81. }
  82. function getActionProxyJobCode() {
  83. return Designer.ActionProxyJobCode;
  84. }
  85. function getActionProxyJobName() {
  86. return Designer.ActionProxyJobName;
  87. }
  88. function getActionProxyUserName() {
  89. return Designer.ActionProxyUserName;
  90. }
  91. function getActionProxyUserRealName() {
  92. return Designer.ActionProxyUserRealName;
  93. }
  94. function getActionFieldWrite() {
  95. return Designer.ActionFieldWrite;
  96. }
  97. function getActionDept() {
  98. return Designer.ActionDept;
  99. }
  100. function getActionFlag() {
  101. return Designer.ActionFlag;
  102. }
  103. function getActionNodeMode() {
  104. return Designer.ActionDeptMode;
  105. }
  106. function getActionType() {
  107. return Designer.ActionType;
  108. }
  109. function getActionStrategy() {
  110. return Designer.ActionStrategy;
  111. }
  112. function OpenModifyWin() {
  113. var isActionSelected = Designer.isActionSelected
  114. if (isActionSelected) {
  115. // showModalDialog('flow_predefine_action_modify.jsp',window.self,'dialogWidth:480px;dialogHeight:400px;status:no;help:no;')
  116. // alert(getActionFieldWrite());
  117. openWin("flow_predefine_action_modify.jsp?flowTypeCode=<%=flowTypeCode%>" + "&hidFieldWrite=" + getActionFieldWrite(), 620, 475);
  118. }
  119. else
  120. alert("请选择一个动作!");
  121. }
  122. function Operate() {
  123. OpenModifyWin();
  124. }
  125. function SetSelectedLinkProperty(propItem, propValue) {
  126. Designer.SetSelectedLinkProperty(propItem, propValue);
  127. }
  128. function GetSelectedLinkProperty(propItem) {
  129. return Designer.GetSelectedLinkProperty(propItem);
  130. }
  131. function OpenLinkPropertyWin() {
  132. var t = GetSelectedLinkProperty("title");
  133. var conditionType = GetSelectedLinkProperty("conditionType");
  134. t = encodeURI(t);
  135. openWin("flow_predefine_link_modify.jsp?flowTypeCode=<%=flowTypeCode%>&conditionType=" + conditionType + "&title=" + t, 620, 248);
  136. }
  137. function form1_onsubmit() {
  138. if (form1.title.value=="") {
  139. alert("请填写名称!");
  140. return false;
  141. }
  142. form1.flowString.value =  Designer.Workflow;
  143. }
  144. //-->
  145. </script>
  146. <style type="text/css">
  147. <!--
  148. .style1 {color: #FFFFFF}
  149. -->
  150. </style>
  151. </head>
  152. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  153. <%
  154. String priv="flow.init";
  155. if (!privilege.isUserPrivValid(request, priv))
  156. {
  157. out.println(fchar.makeErrMsg("对不起,您不具有发起流程的权限!"));
  158. return;
  159. }
  160. UserDb ud = new UserDb();
  161. ud = ud.getUserDb(privilege.getUser(request));
  162. %>
  163. <table height="89" border="0" align="center" cellpadding="0" cellspacing="0">
  164.   <tr> 
  165.     <td height="23" class="right-title">&nbsp;&nbsp;预定义流程</td>
  166.   </tr>
  167.   <tr> 
  168.     <td valign="top">
  169. <table width="100%"  border="0" cellspacing="0" cellpadding="0">
  170.       <tr>
  171.         <td align="center">
  172. <%
  173. String mode = "define"; // "initiate";
  174. String flowString = "";
  175. String title = "";
  176. int id = 0;
  177. String returnBackChecked = "checked";
  178. String dirCode = "";
  179. int examine = 0;
  180. if (op.equals("edit")) {
  181. // mode = "user";
  182. flowString = wpd.getFlowString();
  183. title = wpd.getTitle();
  184. id = wpd.getId();
  185. dirCode = wpd.getDirCode();
  186. if (!wpd.isReturnBack())
  187. returnBackChecked = "";
  188. examine = wpd.getExamine();
  189. }
  190. %>
  191. <OBJECT ID="Designer" CLASSID="CLSID:ADF8C3A0-8709-4EC6-A783-DD7BDFC299D7" codebase="<%=request.getContextPath()%>/activex/Designer.CAB" width=740 height=338>
  192.     <param name="Workflow" value="<%=flowString%>">
  193. <param name="Mode" value="<%=mode%>"><!--debug user initiate complete-->
  194. <param name="CurrentUser" value="<%=privilege.getUser(request)%>">
  195. <param name="CurrentUserRealName" value="<%=ud.getRealName()%>">
  196. <param name="CurrentJobCode" value="">
  197. <param name="CurrentJobName" value="">
  198. </OBJECT></td>
  199.       </tr>
  200.   <form action="flow_predefine_init_do.jsp?op=<%=op%>" method="post" id="form1" name="form1" onSubmit="form1_onsubmit()">
  201.       <tr>
  202.         <td height="35" align="center">
  203. 流程名称:
  204.   <input name="id" type="hidden" value="<%=id%>">
  205. <input name="title" value="<%=title%>">
  206. <input type=hidden name="flowString" value="">
  207. <input type=hidden name="typeCode" value="<%=flowTypeCode%>">
  208. <input type="hidden" name="returnBack" value="true" <%=returnBackChecked%>>
  209. <!--允许打回-->
  210.  &nbsp;自动存档目录:
  211.          <select name="dirCode" onChange="if(this.options[this.selectedIndex].value=='not'){alert(this.options[this.selectedIndex].text+' 不能被选择!'); return false;}">
  212.            <option value="" selected>无</option>
  213.            <%
  214.    cn.js.fan.module.cms.Directory dir = new cn.js.fan.module.cms.Directory();
  215. cn.js.fan.module.cms.Leaf lf = dir.getLeaf("root");
  216. cn.js.fan.module.cms.DirectoryView dv = new cn.js.fan.module.cms.DirectoryView(lf);
  217. dv.ShowDirectoryAsOptions(out, lf, lf.getLayer());
  218.   %>
  219.          </select>
  220. &nbsp;审核状态:
  221. <select name="examine">
  222.   <option value="<%=cn.js.fan.module.cms.Document.EXAMINE_NOT%>">未审核</option>
  223.   <option value="<%=cn.js.fan.module.cms.Document.EXAMINE_PASS%>">已通过</option>
  224. </select>
  225. <script>
  226. form1.dirCode.value = "<%=dirCode%>";
  227. form1.examine.value = "<%=examine%>";
  228. </script>
  229. &nbsp;
  230. <input name="submit" type="submit" value=" 确 定 "></td>
  231.       </tr>
  232.       <tr>
  233.         <td height="35" align="center">&nbsp;</td>
  234.       </tr>
  235.   </form>
  236.     </table></td>
  237.   </tr>
  238.   <tr> 
  239.     <td height="9">&nbsp;</td>
  240.   </tr>
  241. </table>
  242. <br>
  243. <br>
  244. </body>
  245. </html>