bpmProTransToAddDialog.jsp 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/commons/include/html_doctype.html" %>
  3. <html>
  4. <head>
  5. <%@include file="/commons/include/form.jsp" %>
  6. <title>任务流转</title>
  7. <script type="text/javascript" src="${ctx}/js/hotent/platform/system/SysDialog.js"></script>
  8. <script type="text/javascript" src="${ctx}/js/hotent/CustomValid.js"></script>
  9. <style type="text/css">
  10. th{width:15%;}
  11. </style>
  12. <script type="text/javascript">
  13. /*KILLDIALOG*/
  14. var dialog = frameElement.dialog; //调用页面的dialog对象(ligerui对象)
  15. var taskId=${param.taskId};
  16. var curUserId=${param.curUserId};
  17. function callBack(rtn) {
  18. if(!rtn) return;
  19. var cmpIds=$("#cmpIds").val();
  20. var taskOpinion=$("#opinion").val();
  21. var informType=$.getChkValue("informType");
  22. var params= {cmpIds:cmpIds,
  23. opinion:taskOpinion,
  24. informType:informType,
  25. taskId:taskId};
  26. var url="${ctx}/platform/bpm/bpmProTransTo/add.ht";
  27. $.post(url,params,function(msg){
  28. var obj=new com.hotent.form.ResultMessage(msg);
  29. if(obj.isSuccess()){
  30. $.ligerDialog.success("添加流转人成功!",function(){
  31. //window.returnValue="ok";
  32. dialog.get("sucCall")("ok");
  33. dialog.close();
  34. });
  35. }else{
  36. $.ligerDialog.err("提示信息","任务流转保存失败!",obj.getMessage());
  37. }
  38. });
  39. };
  40. function save(){
  41. var rtn=$("#frmComm").form().valid();
  42. if(!rtn) return;
  43. $.ligerDialog.confirm("确定添加流转人员?",callBack);
  44. };
  45. function dlgCallBack(userIds, fullnames) {
  46. if (userIds.length > 0 && isNotContainCurUser(userIds)) {
  47. var cmpIds=$("#cmpIds");
  48. var cmpNames=$("#cmpNames");
  49. cmpIds.val(userIds);
  50. cmpNames.val(fullnames);
  51. }
  52. };
  53. function isNotContainCurUser(userIds){
  54. var ids = userIds.split(",");
  55. for(var i=0;i<ids.length;i++){
  56. var userId = ids[i];
  57. if(userId==curUserId){
  58. $.ligerDialog.warn("流转人员不能包含自己!" ,$lang.tip.warn);
  59. return false;
  60. }
  61. }
  62. return true;
  63. };
  64. function add() {
  65. UserDialog({
  66. selectUserIds:$("#cmpIds").val(),
  67. selectUserNames:$("#cmpNames").val(),
  68. callback : dlgCallBack,
  69. isSingle : false
  70. });
  71. };
  72. </script>
  73. </head>
  74. <body>
  75. <div class="panel">
  76. <div class="panel-top">
  77. <div class="tbar-title">
  78. <span class="tbar-label">任务流转</span>
  79. </div>
  80. <div class="panel-toolbar">
  81. <div class="toolBar">
  82. <div class="group"><a class="link save" id="dataFormSave" href="javascript:;" onclick="save()"><span></span>提交</a></div>
  83. <div class="l-bar-separator"></div>
  84. <div class="group"><a class="link close" href="javascript:;" onclick="dialog.close();"><span></span>关闭</a></div>
  85. </div>
  86. </div>
  87. </div>
  88. <div class="panel-body">
  89. <form id="frmComm">
  90. <table class="table-detail" cellpadding="0" cellspacing="0" border="0">
  91. <tr>
  92. <th nowrap="nowrap">添加用户</th>
  93. <td>
  94. <input type="hidden" id="cmpIds" />
  95. <textarea id="cmpNames" cols="50" style="width:300px" rows="2" class="textarea" readonly="readonly" validate="{required:true}"></textarea>
  96. <a class="link grant" onclick="add(this);"><span></span><span>选择人员</span></a>
  97. </td>
  98. </tr>
  99. <tr>
  100. <th>会签</th>
  101. <td>
  102. <c:if test="${bpmProTransTo.transType==1}">
  103. <input type="text" value="非会签" readonly="readonly"/>
  104. </c:if>
  105. <c:if test="${bpmProTransTo.transType==2}">
  106. <input type="text" value="会签" readonly="readonly"/>
  107. </c:if>
  108. </td>
  109. </tr>
  110. <tr>
  111. <th>流转结束后</th>
  112. <td>
  113. <c:if test="${bpmProTransTo.action==1}">
  114. <input type="text" value="返回" readonly="readonly"/>
  115. </c:if>
  116. <c:if test="${bpmProTransTo.action==2}">
  117. <input type="text" value="提交" readonly="readonly"/>
  118. </c:if>
  119. </td>
  120. </tr>
  121. <tr>
  122. <th>备注</th>
  123. <td>
  124. <textarea rows="5" cols="50" style="width:300px" id="opinion" name="opinion" validate="{required:true,maxLength:1000}" maxLength="1000"></textarea>
  125. </td>
  126. </tr>
  127. <tr>
  128. <th>提醒消息方式</th>
  129. <td>
  130. <c:forEach items="${handlersMap}" var="item">
  131. <input type="checkbox" name="informType" value="${item.key }" <c:if test="${item.value.isDefaultChecked}">checked="checked"</c:if> />
  132. ${item.value.title }
  133. </c:forEach>
  134. </td>
  135. </tr>
  136. <tr>
  137. <th>流转操作说明</th>
  138. <td>
  139. <div class="content" style=" background: none repeat scroll 0 0 #EFEFEF;">
  140. <ul class="help">
  141. <li>1、添加用户:选择流转人员,可多选(其中会签状态下必须选多人)。</li>
  142. <li>2、会签:选择非会签,则其中一个人审批完成流程就返回或提交;选择会签,则所选人员全部审批完成流程才返回或提交。</li>
  143. <li>3、流转结束后,返回:流转结束后,原来的任务将会回到您的待办事项中;提交:流转结束后,流转人不需要执行原来的任务,流程就往下执行。</li>
  144. </ul>
  145. </div>
  146. </td>
  147. </tr>
  148. </table>
  149. </form>
  150. </div>
  151. </div>
  152. </body>
  153. </html>