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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8" %>
  2. <%@ page import="cn.js.fan.util.*" %>
  3. <%@ page import="com.redmoon.oa.person.*" %>
  4. <%@ page import="com.redmoon.oa.dept.*" %>
  5. <%@ page import="com.redmoon.oa.flow.*" %>
  6. <HTML><HEAD><TITLE>流程动作设定</TITLE>
  7. <link href="common.css" rel="stylesheet" type="text/css">
  8. <%
  9. String op = ParamUtil.get(request, "op");
  10. int flowId = ParamUtil.getInt(request, "flowId");
  11. String fieldWrite = ParamUtil.get(request, "hidFieldWrite");
  12. WorkflowDb wfd = new WorkflowDb();
  13. wfd = wfd.getWorkflowDb(flowId);
  14. String title = ParamUtil.get(request, "hidTitle");
  15. %>
  16. <script language="JavaScript">
  17. function openWin(url,width,height)
  18. {
  19. var newwin=window.open(url,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=50,left=120,width="+width+",height="+height);
  20. }
  21. function OpenFormFieldSelWin() {
  22. openWin("flow_form_field_sel.jsp?flowId=<%=flowId%>&fieldWrite=" + getFieldWriteValue(), 500, 340);
  23. }
  24. function setPerson(deptCode, deptName, user)
  25. {
  26. jobCode.value = deptCode;
  27. jobName.value = deptName;
  28. userName.value = user;
  29. form1.hidTitle.value = title.value;
  30. form1.hidJobCode.value = deptCode;
  31. form1.hidUserName.value = user;
  32. form1.hidFieldWrite.value = fieldWrite.value;
  33. form1.submit();
  34. }
  35. function getFieldWriteValue() {
  36. return fieldWrite.value;
  37. }
  38. function setFieldWriteValue(v) {
  39. fieldWrite.value = v;
  40. }
  41. function setFieldWriteText(v) {
  42. fieldWriteText.value = v;
  43. }
  44. function setDeptName(v) {
  45. deptName.value = v;
  46. }
  47. function getDept() {
  48. return dept.value;
  49. }
  50. function ModifyAction() {
  51. window.opener.ModifyAction(userName.value, title.value, OfficeColorIndex.value, userRealName.value, jobCode.value, jobName.value, proxyJobCode.value, proxyJobName.value, proxyUserName.value, proxyUserRealName.value, fieldWrite.value, checkState.value);
  52. window.close();
  53. }
  54. function onload_win() {
  55.     var STATE_NOTDO = <%=WorkflowActionDb.STATE_NOTDO%>;
  56.     var STATE_IGNORED = <%=WorkflowActionDb.STATE_IGNORED%>;
  57. var STATE_DOING = <%=WorkflowActionDb.STATE_DOING%>;
  58.     var STATE_RETURN = <%=WorkflowActionDb.STATE_RETURN%>;
  59.     var STATE_FINISHED = <%=WorkflowActionDb.STATE_FINISHED%>;
  60. var chkState = window.opener.getActionCheckState();
  61. if (chkState==STATE_FINISHED || chkState==STATE_DOING) {
  62. alert("动作已完成或者正在处理中时,不能被编辑!");
  63. window.close();
  64. return;
  65. }
  66. userName.value = window.opener.getActionUser();
  67. form1.hidUserName.value = userName.value;
  68. title.value = window.opener.getActionTitle();
  69. OfficeColorIndex.value = window.opener.getActionColorIndex();
  70. userRealName.value = window.opener.getActionUserRealName();
  71. jobCode.value = window.opener.getActionJobCode();
  72. jobName.value = window.opener.getActionJobName();
  73. proxyJobCode.value = window.opener.getActionProxyJobCode();
  74. proxyJobName.value = window.opener.getActionProxyJobName();
  75. proxyUserName.value = window.opener.getActionProxyUserName();
  76. proxyUserRealName.value = window.opener.getActionProxyUserRealName();
  77. fieldWrite.value = window.opener.getActionFieldWrite();
  78. checkState.value = window.opener.getActionCheckState();
  79. dept.value = window.opener.getActionDept();
  80. nodeMode.value = window.opener.getActionNodeMode();
  81. document.frames["hiddenframe"].location.replace("flow_action_modify_getfieldtitle.jsp?flowTypeCode=<%=StrUtil.UrlEncode(wfd.getTypeCode())%>&fieldWrite=" + fieldWrite.value + "&dept=" + dept.value + "&nodeMode=" + nodeMode.value); // 获取可写表单域的名称
  82. }
  83. // 当用模式对话框打开本页时,已放弃
  84. function onload_modwin() {
  85. userName.value = dialogArguments.getActionUser();
  86. form1.hidUserName.value = userName.value;
  87. title.value = dialogArguments.getActionTitle();
  88. OfficeColorIndex.value = dialogArguments.getActionColorIndex();
  89. }
  90. function window_onload() {
  91. <%if (!op.equals("load")) {%>
  92. onload_win();
  93. <%}else{%>
  94. fieldWrite.value = "<%=fieldWrite%>";
  95. dept.value = window.opener.getActionDept();
  96. nodeMode.value = window.opener.getActionNodeMode();
  97. document.frames["hiddenframe"].location.replace("flow_action_modify_getfieldtitle.jsp?flowTypeCode=<%=StrUtil.UrlEncode(wfd.getTypeCode())%>&fieldWrite=" + fieldWrite.value + "&dept=" + dept.value + "&nodeMode=" + nodeMode.value); // 获取可写表单域的名称
  98. <%}%>
  99. }
  100. function selPost() {
  101. if (nodeMode.value=="1")
  102. showModalDialog('post_sel.jsp',window.self,'dialogWidth:500px;dialogHeight:480px;status:no;help:no;');
  103. else
  104. showModalDialog('post_sel_one.jsp?posts=' + dept.value,window.self,'dialogWidth:500px;dialogHeight:280px;status:no;help:no;');
  105. }
  106. </script>
  107. <META content="Microsoft FrontPage 4.0" name=GENERATOR><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  108. </HEAD>
  109. <BODY bgColor=#FBFAF0 leftMargin=4 topMargin=8 rightMargin=0 class=menubar onLoad="window_onload()">
  110. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  111. <jsp:useBean id="cfg" scope="page" class="com.redmoon.oa.Config"/>
  112. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  113. <%
  114. String priv="read";
  115. if (!privilege.isUserPrivValid(request,priv))
  116. {
  117. // out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  118. // return;
  119. }
  120. String userName = "";
  121. String userRealName = "";
  122. String jobCode = "";
  123. String jobName = "";
  124. String proxy = ""; // 代理者
  125. String proxyJobName = "";
  126. String proxyUserName = "";
  127. String proxyUserRealName = "";
  128. if (op.equals("load")) {
  129. String userName1 = ParamUtil.get(request, "hidUserName");
  130. String jobCode1 = ParamUtil.get(request, "hidJobCode");
  131. PostMgr pm = new PostMgr();
  132. PostDb pd = pm.getPostDb(jobCode1);
  133. jobCode = jobCode1;
  134. jobName = pd.getName();
  135. UserDb ud = null;
  136. UserMgr um = new UserMgr();
  137. ud = um.getUserDb(userName1);
  138. if (ud!=null && ud.isLoaded()) {
  139. userName = ud.getName();
  140. userRealName = ud.getRealName();
  141. proxy = ud.getProxyNow();
  142. // System.out.println("proxy:" + proxy);
  143. if (proxy!=null && !proxy.equals("")) {
  144. // 检查是否在代理时段内
  145. pd = pm.getPostDb(proxy);
  146. proxyJobName = pd.getName();
  147. proxyUserName = pd.getUserName();
  148. ud = um.getUserDb(proxyUserName);
  149. proxyUserRealName = ud.getRealName();
  150. }
  151. }
  152. }
  153. %>
  154. <table width="100%" height="293"  border="0" align="center" cellpadding="0" cellspacing="0" class="tableframe">
  155.   <tr>
  156.     <td height="23" colspan="4" background="images/top-right.gif" class="right-title">&nbsp;<img src="images/icon.gif" width="10" height="10">&nbsp;流程动作设定</td>
  157.   </tr>
  158.   <tr>
  159.     <td width="6%" align="center">&nbsp;</td>
  160.     <td width="20%" height="22" align="left">真实姓名</td>
  161.     <td width="63%" height="22"><input name="userRealName" type="text" id="userRealName" value="<%=userRealName%>" readonly>
  162.     <input id="userName" name="userName" value="<%=userName%>" type="hidden">
  163.     <a href="#" onClick="selPost()">选择用户</a></td>
  164.     <td width="11%"><form id="form1" name="form1" action="?op=load" method="post" target="_self">
  165.       <input type=hidden name="hidTitle" value="<%=title%>">
  166.       <input type=hidden name="hidJobCode" value="<%=jobCode%>">
  167.   <input type=hidden name="hidUserName" value="<%=userName%>">
  168.   <input type=hidden name="hidFieldWrite" value="<%=fieldWrite%>">
  169.   <input type="hidden" name="flowId" value="<%=flowId%>">
  170.     </form></td>
  171.   </tr>
  172.   
  173.   <tr>
  174.     <td align="center">&nbsp;</td>
  175.     <td height="22" align="left">动作标题</td>
  176.     <td height="22" colspan="2"><input type="text" name="title" value="<%=title%>"></td>
  177.   </tr>
  178.   <tr>
  179.     <td align="center">&nbsp;</td>
  180.     <td height="22" align="left">审批颜色</td>
  181.     <td height="22" colspan="2">
  182.       <SELECT name="OfficeColorIndex" style="width:80px">
  183.         <option selected style="BACKGROUND: red" value="6"></option>
  184.         <option style="BACKGROUND: Turquoise" value="3"></option>
  185.         <option style="BACKGROUND: #00ff00" value="4"></option>
  186.         <option style="BACKGROUND: Pink" value="5"></option>
  187.         <option style="BACKGROUND: yellow" value="7"></option>
  188.         <option style="BACKGROUND: black" value="1"></option>
  189.         <option style="BACKGROUND: blue" value="2"></option>
  190.         <option style="BACKGROUND: white" value="8"></option>
  191.         <option style="BACKGROUND: DarkBlue" value="9"></option>
  192.         <option style="BACKGROUND: Teal" value="10"></option>
  193.         <option style="BACKGROUND: green" value="11"></option>
  194.         <option style="BACKGROUND: Violet" value="12"></option>
  195.         <option style="BACKGROUND: DarkRed" value="13"></option>
  196.         <option style="BACKGROUND: #FFCC67" value="14"></option>
  197.         <option style="BACKGROUND: #808080" value="15"></option>
  198.         <option style="BACKGROUND: #C0C0C0" value="16"></option>
  199.     </SELECT>
  200.       <input name="checkState" type="hidden" value="<%=WorkflowActionDb.STATE_NOTDO%>">
  201.   </td>
  202.   </tr>
  203.   <tr>
  204.     <td align="center">&nbsp;</td>
  205.     <td height="22" align="left">职位名称</td>
  206.     <td height="22" colspan="2"><input name="jobName" type="text" id="jobName" value="<%=jobName%>" readonly>
  207.     <input name="jobCode" type="hidden" id="jobCode" value="<%=jobCode%>"></td>
  208.   </tr>
  209.   
  210.   <tr>
  211.     <td align="center">&nbsp;</td>
  212.     <td height="22" align="left">代理职位名称</td>
  213.     <td height="22" colspan="2"><input name="proxyJobName" type="text" id="proxyJobName" value="<%=proxyJobName%>" readonly>
  214.     <input name="proxyJobCode" type="hidden" id="proxyJobCode" value="<%=proxy%>"></td>
  215.   </tr>
  216.   <tr>
  217.     <td align="center">&nbsp;</td>
  218.     <td height="22" align="left">代理人用户名</td>
  219.     <td height="22" colspan="2"><input name="proxyUserName" type="text" id="proxyUserName" value="<%=proxyUserName%>" readonly></td>
  220.   </tr>
  221.   <tr>
  222.     <td align="center">&nbsp;</td>
  223.     <td height="22" align="left">代理人真实姓名</td>
  224.     <td height="22" colspan="2"><input name="proxyUserRealName" readonly type="text" id="proxyUserRealName" value="<%=proxyUserRealName%>"></td>
  225.   </tr>
  226.   <tr>
  227.     <td align="center">&nbsp;</td>
  228.     <td height="22" align="left">可写表单域</td>
  229.     <td height="22" colspan="2">
  230.   <input name="fieldWrite" type="hidden" id="fieldWrite" value="<%=fieldWrite%>">
  231.       <input name="fieldWriteText" type="text" id="fieldWriteText" value="" readonly style="width: 200px">
  232.   </td>
  233.   </tr>
  234.   <tr>
  235.     <td align="center">&nbsp;</td>
  236.     <td height="22" align="left">可选职位 / 部门</td>
  237.     <td height="22" colspan="2"><input name="dept" type="hidden" id="dept" value="">
  238.         <input name="deptName" type="text" id="deptName" value="" readonly style="width: 200px;background-color:#eeeeee">
  239.         <input name="nodeMode" type="hidden" size="5" readonly></td>
  240.   </tr>
  241.   <tr align="center">
  242.     <td height="28" colspan="4"><input name="okbtn" type="button" class="button1" onClick="ModifyAction()" value=" 确 定 ">
  243. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  244. <input name="cancelbtn" type="button" class="button1" onClick="window.close()" value=" 取 消 ">
  245. <iframe id=hiddenframe name=hiddenframe src="flow_action_modify_getfieldtitle.jsp?flowId=<%=flowId%>&fieldWrite=<%=fieldWrite%>" width="0" height="0"></iframe></td>
  246.   </tr>
  247. </table>
  248. </BODY></HTML>