bpmNodeButtonGetByNode.jsp 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  6. <title>操作按钮设置</title>
  7. <%@include file="/commons/include/get.jsp" %>
  8. <base target="_self">
  9. <script type="text/javascript">
  10. $(function(){
  11. $("a.add").click(function(){
  12. var url=__ctx + "/platform/bpm/bpmNodeButton/edit.ht?defId=${defId}&nodeId=${nodeId}&buttonFlag=${buttonFlag}";
  13. $.gotoDialogPage(url);
  14. });
  15. $("a.save").unbind("click").click(save);
  16. $("a.link.init").unbind("click");
  17. init();
  18. });
  19. function save(){
  20. var aryId=[];
  21. $("tr.trNodeBtn").each(function(){
  22. aryId.push($(this).attr("id"));
  23. });
  24. if(aryId.length==0){
  25. $.ligerDialog.warn("没有定义按钮!",'提示信息');
  26. return;
  27. }
  28. var ids=aryId.join(",");
  29. var url="sort.ht";
  30. $.post(url,{ids:ids},function(responseText){
  31. var obj=new com.hotent.form.ResultMessage(responseText);
  32. if(obj.isSuccess()){//成功
  33. $.ligerDialog.success("修改排序成功!",'提示信息',function(){
  34. var nurl =__ctx + "/platform/bpm/bpmNodeButton/getByNode.ht?defId=${defId}&nodeId=${nodeId}&buttonFlag=${buttonFlag}";
  35. $.gotoDialogPage(nurl);
  36. });
  37. }
  38. else{
  39. $.ligerDialog.err("出错信息","修改排序失败",obj.getMessage());
  40. }
  41. })
  42. }
  43. function sortTr(obj,isUp) {
  44. var thisTr = $(obj).parents("tr");
  45. if(isUp){
  46. var prevTr = $(thisTr).prev();
  47. if(prevTr){
  48. thisTr.insertBefore(prevTr);
  49. }
  50. }
  51. else{
  52. var nextTr = $(thisTr).next();
  53. if(nextTr){
  54. thisTr.insertAfter(nextTr);
  55. }
  56. }
  57. };
  58. function init(){
  59. $("a.link.init").click(function(){
  60. var ele=this;
  61. $.ligerDialog.confirm('确认初始化按钮吗?','提示信息',function(rtn) {
  62. if(rtn){
  63. var url =__ctx + "/platform/bpm/bpmNodeButton/init.ht?defId=${defId}&nodeId=${nodeId}&buttonFlag=${buttonFlag}";
  64. $.gotoDialogPage(url);
  65. }
  66. });
  67. return false;
  68. });
  69. }
  70. </script>
  71. </head>
  72. <body>
  73. <c:if test="${buttonFlag}">
  74. <jsp:include page="incDefinitionHead.jsp">
  75. <jsp:param value="节点操作按钮" name="title"/>
  76. </jsp:include>
  77. <f:tab curTab="button" tabName="flow"/>
  78. </c:if>
  79. <div class="panel">
  80. <div class="hide-panel">
  81. <div class="panel-top">
  82. <div class="tbar-title">
  83. <span class="tbar-label">操作按钮列表</span>
  84. </div>
  85. <div class="panel-toolbar">
  86. <div class="toolBar">
  87. <div class="group"><a class="link add" href="javascript:;"><span></span>添加</a></div>
  88. <div class="l-bar-separator"></div>
  89. <div class="group"><a class="link save" id="btnUpd" action="sort.ht"><span></span>保存排序</a></div>
  90. <div class="l-bar-separator"></div>
  91. <div class="group"><a class="link init" id="bntInit" href="javascript:;"><span></span>初始化按钮</a></div>
  92. <div class="l-bar-separator"></div>
  93. <div class="group"><a class="link clean" href="deByDefNodeId.ht?defId=${defId}&nodeId=${nodeId}&buttonFlag=${buttonFlag}"><span></span>删除所有</a></div>
  94. <c:if test="${buttonFlag}">
  95. <div class="l-bar-separator"></div>
  96. <div class="group"><a class="link back" href="list.ht?defId=${defId}"><span></span>返回</a></div>
  97. </c:if>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. <div class="panel-body">
  103. <table cellpadding="1" cellspacing="1" class="table-grid table-list">
  104. <thead>
  105. <tr>
  106. <th>序号</th>
  107. <th>按钮名</th>
  108. <th>操作类型</th>
  109. <th>排序</th>
  110. <th>
  111. 管理
  112. </th>
  113. </tr>
  114. </thead>
  115. <c:forEach items="${btnList}" var="item" varStatus="status">
  116. <tr class="trNodeBtn" id="${item.id}">
  117. <td>
  118. ${status.index +1}
  119. </td>
  120. <td>
  121. ${item.btnname }
  122. </td>
  123. <td nowrap="nowrap">
  124. <c:choose>
  125. <c:when test="${item.isstartform==1 }">
  126. <c:choose>
  127. <c:when test="${item.operatortype==1 }">启动流程</c:when>
  128. <c:when test="${item.operatortype==2 }">流程示意图</c:when>
  129. <c:when test="${item.operatortype==3 }">打印</c:when>
  130. <c:when test="${item.operatortype==4 }">短信</c:when>
  131. <c:when test="${item.operatortype==5 }">邮件</c:when>
  132. <c:when test="${item.operatortype==6 }">保存草稿</c:when>
  133. <c:when test="${item.operatortype==14 }">Web签章</c:when>
  134. <c:when test="${item.operatortype==15 }">手写签章</c:when>
  135. <c:when test="${item.operatortype==19 }">在线拟文</c:when>
  136. </c:choose>
  137. </c:when>
  138. <c:otherwise>
  139. <c:choose>
  140. <c:when test="${item.operatortype==1 }">同意</c:when>
  141. <c:when test="${item.operatortype==2 }">反对</c:when>
  142. <c:when test="${item.operatortype==3 }">弃权</c:when>
  143. <c:when test="${item.operatortype==4 }">驳回</c:when>
  144. <c:when test="${item.operatortype==5 }">驳回到发起人</c:when>
  145. <c:when test="${item.operatortype==6 }">交办</c:when>
  146. <c:when test="${item.operatortype==7 }">补签</c:when>
  147. <c:when test="${item.operatortype==8 }">保存表单</c:when>
  148. <c:when test="${item.operatortype==9 }">流程示意图</c:when>
  149. <c:when test="${item.operatortype==10 }">打印</c:when>
  150. <c:when test="${item.operatortype==11}">审批历史</c:when>
  151. <c:when test="${item.operatortype==14 }">Web签章</c:when>
  152. <c:when test="${item.operatortype==15 }">手写签章</c:when>
  153. <c:when test="${item.operatortype==16 }">沟通</c:when>
  154. <c:when test="${item.operatortype==17 }">加签</c:when>
  155. <c:when test="${item.operatortype==19 }">在线拟文</c:when>
  156. <c:when test="${item.operatortype==20 }">正文审核</c:when>
  157. </c:choose>
  158. </c:otherwise>
  159. </c:choose>
  160. </td>
  161. <td>
  162. <a alt='上移' href='#' class='link moveup' onclick='sortTr(this,true)'>&nbsp;</a>
  163. <a alt='下移' href='#' class='link movedown' onclick='sortTr(this,false)'>&nbsp;</a>
  164. </td>
  165. <td>
  166. <a class="link edit" href="edit.ht?id=${item.id}&defId=${defId}&nodeId=${nodeId}&buttonFlag=${buttonFlag}">编辑</a>
  167. <a class="link del" href="del.ht?id=${item.id}&buttonFlag=${buttonFlag}">删除</a>
  168. </td>
  169. </tr>
  170. </c:forEach>
  171. </table>
  172. </div>
  173. </div><!-- end of panel-body -->
  174. </div> <!-- end of panel -->
  175. </body>
  176. </html>