bpmNodeUserFormVar.jsp 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <%@page 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/platform/form/CommonDialog.js"></script>
  9. <script type="text/javascript" src="${ctx}/js/util/easyTemplate.js"></script>
  10. <script type="text/javascript">
  11. /*KILLDIALOG*/
  12. var dialog = frameElement.dialog; //调用页面的dialog对象(ligerui对象)
  13. $(function(){
  14. $("input[name='varType']").click(function(){
  15. checkType(this);
  16. });
  17. });
  18. //点击人员参照单选项时
  19. function checkType(ck){
  20. var objTr=$(ck).closest("tr");
  21. $("select", objTr).attr('disabled',false);
  22. $('select', objTr.siblings('tr')).attr('disabled',true);
  23. }
  24. function save(){
  25. var objType=$("[name='varType']:checked");
  26. if(objType.length==0){
  27. $.ligerDialog.warn("请选择表单变量类型!",'提示');
  28. return ;
  29. }
  30. var varType=objType.val();
  31. var varTypeName=objType.attr("memo");
  32. var objTr=objType.closest("tr");
  33. var objSelect=$("select[name='varName'] option",objTr);
  34. var len=objSelect.length;
  35. if(len==0){
  36. $.ligerDialog.warn("没有表单变量!",'提示');
  37. return ;
  38. }
  39. var objSelect=$("select[name='varName'] option:selected",objTr);
  40. len=objSelect.length;
  41. if(len==0){
  42. $.ligerDialog.warn("没有选择表单变量!",'提示');
  43. return ;
  44. }
  45. var varName=objSelect.get(0).value;
  46. var varText=objSelect.get(0).text;
  47. var obj={};
  48. var userType,userText;
  49. if(varType=='6') {
  50. var userSelect = $("select[name='userType'] option:selected",objTr);
  51. userType = userSelect.get(0).value;
  52. userText = userSelect.get(0).text;
  53. obj.json="{type:"+ varType +",userType:" + userType + ",varName:\""+varName+"\"}";
  54. obj.description=varTypeName +",类型【"+userText+"】,变量名【"+varText +"】";
  55. }
  56. else {
  57. obj.json="{type:"+ varType +",varName:\""+varName+"\"}";
  58. obj.description=varTypeName +",变量名【"+varText +"】";
  59. }
  60. //window.returnValue= obj;
  61. dialog.get("sucCall")(obj);
  62. dialog.close();
  63. }
  64. </script>
  65. </head>
  66. <body style="overflow: hidden;">
  67. <div class="panel">
  68. <div class="hide-panel">
  69. <div class="panel-top">
  70. <div class="tbar-title">
  71. <span class="tbar-label">人员表单变量</span>
  72. </div>
  73. <div class="panel-toolbar">
  74. <div class="toolBar">
  75. <div class="group"><a class="link save" id="dataFormSave" onclick="save();" href="javascript:;"><span></span>保存</a></div>
  76. <div class="l-bar-separator"></div>
  77. <div class="group"><a class="link close" onclick="dialog.close()" href="javascript:;"><span></span>关闭</a></div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <div style="text-align: center;padding-top: 10px;">
  83. <fieldset>
  84. <legend><b>表单变量类型</b></legend>
  85. <table class="table-grid" width="90%">
  86. <tr>
  87. <th style="width: 20px"></th>
  88. <th>执行人表单类型</th>
  89. <th>表单变量</th>
  90. </tr>
  91. <tr>
  92. <td><input type="radio" name="varType" value="1" memo="用户" <c:if test="${varType==1}">checked="checked"</c:if> /></td>
  93. <td>用户</td>
  94. <td>
  95. <select name="varName" <c:if test="${varType!=1}">disabled="disabled"</c:if> >
  96. <c:forEach items="${userVarList}" var="item">
  97. <option value="${item.fieldName}" <c:if test="${varName==item.fieldName}">selected="selected"</c:if> >${item.fieldDesc}</option>
  98. </c:forEach>
  99. </select>
  100. </td>
  101. </tr>
  102. <tr>
  103. <td><input type="radio" name="varType" value="2" memo="组织" <c:if test="${varType==2}">checked="checked"</c:if> /></td>
  104. <td>组织</td>
  105. <td>
  106. <select name="varName" <c:if test="${varType!=2}">disabled="disabled"</c:if>>
  107. <c:forEach items="${orgVarList}" var="item">
  108. <option value="${item.fieldName}" <c:if test="${varName==item.fieldName}">selected="selected"</c:if> >${item.fieldDesc}</option>
  109. </c:forEach>
  110. </select>
  111. </td>
  112. </tr>
  113. <tr>
  114. <td><input type="radio" name="varType" value="3" memo="组织负责人" <c:if test="${varType==3}">checked="checked"</c:if>/></td>
  115. <td>组织负责人</td>
  116. <td>
  117. <select name="varName" <c:if test="${varType!=3}">disabled="disabled"</c:if> >
  118. <c:forEach items="${orgVarList}" var="item">
  119. <option value="${item.fieldName}" <c:if test="${varName==item.fieldName}">selected="selected"</c:if> >${item.fieldDesc}</option>
  120. </c:forEach>
  121. </select>
  122. </td>
  123. </tr>
  124. <tr>
  125. <td><input type="radio" name="varType" value="4" memo="角色" <c:if test="${varType==4}">checked="checked"</c:if>/></td>
  126. <td>角色</td>
  127. <td>
  128. <select name="varName" <c:if test="${varType!=4}">disabled="disabled"</c:if>>
  129. <c:forEach items="${roleVarList}" var="item">
  130. <option value="${item.fieldName}" <c:if test="${varName==item.fieldName}">selected="selected"</c:if> >${item.fieldDesc}</option>
  131. </c:forEach>
  132. </select>
  133. </td>
  134. </tr>
  135. <tr>
  136. <td><input type="radio" name="varType" value="5" memo="岗位" <c:if test="${varType==5}">checked="checked"</c:if>/></td>
  137. <td>岗位</td>
  138. <td>
  139. <select name="varName" <c:if test="${varType!=5}">disabled="disabled"</c:if>>
  140. <c:forEach items="${posVarList}" var="item">
  141. <option value="${item.fieldName}" <c:if test="${varName==item.fieldName}">selected="selected"</c:if> >${item.fieldDesc}</option>
  142. </c:forEach>
  143. </select>
  144. </td>
  145. </tr>
  146. <tr>
  147. <td><input type="radio" name="varType" value="6" memo="普通变量" <c:if test="${varType==6}">checked="checked"</c:if>/></td>
  148. <td>普通变量</td>
  149. <td>
  150. <select name="userType" <c:if test="${varType!=6}">disabled="disabled"</c:if>>
  151. <option value="1" <c:if test="${userType eq '1'}">selected='selected'</c:if> >用户</option>
  152. <option value="2" <c:if test="${userType eq '2'}">selected='selected'</c:if> >组织</option>
  153. <option value="3" <c:if test="${userType eq '3'}">selected='selected'</c:if> >组织负责人</option>
  154. <option value="4" <c:if test="${userType eq '4'}">selected='selected'</c:if> >角色</option>
  155. <option value="5" <c:if test="${userType eq '5'}">selected='selected'</c:if> >岗位</option>
  156. </select>
  157. <select name="varName" <c:if test="${varType!=6}">disabled="disabled"</c:if>>
  158. <c:forEach items="${otherList}" var="item">
  159. <option value="${item.fieldName}" <c:if test="${varName==item.fieldName}">selected="selected"</c:if> >${item.fieldDesc}</option>
  160. </c:forEach>
  161. </select>
  162. </td>
  163. </tr>
  164. </table>
  165. </fieldset>
  166. </div>
  167. </div>
  168. </body>
  169. </html>