budgetEntity-update.jsp 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <title>预算主体</title>
  7. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  8. <style type="text/css">
  9. .combo_self{height: 22px !important;width: 150px !important;}
  10. .layout-header .btn {
  11. margin:0;
  12. float: none !important;
  13. }
  14. .btn-default {
  15. height: 35px;
  16. line-height: 35px;
  17. font-size:14px;
  18. }
  19. </style>
  20. <script type="text/javascript">
  21. $(function(){
  22. $(".combo").removeClass("combo").addClass("combo combo_self");
  23. $(".combo").each(function(){
  24. $(this).parent().css("line-height","0px");
  25. });
  26. });
  27. /**树形列表数据转换**/
  28. function convertTreeData(rows, textField) {
  29. for(var i = 0; i < rows.length; i++) {
  30. var row = rows[i];
  31. row.text = row[textField];
  32. if(row.children) {
  33. row.state = "open";
  34. convertTreeData(row.children, textField);
  35. }
  36. }
  37. }
  38. /**树形列表加入子元素**/
  39. function joinTreeChildren(arr1, arr2) {
  40. for(var i = 0; i < arr1.length; i++) {
  41. var row1 = arr1[i];
  42. for(var j = 0; j < arr2.length; j++) {
  43. if(row1.id == arr2[j].id) {
  44. var children = arr2[j].children;
  45. if(children) {
  46. row1.children = children;
  47. }
  48. }
  49. }
  50. }
  51. }
  52. </script>
  53. <script type="text/javascript">
  54. //编写自定义JS代码
  55. </script>
  56. </head>
  57. <body>
  58. <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="budgetEntityController.do?doUpdate" >
  59. <input id="id" name="id" type="hidden" value="${budgetDeptPage.id }"/>
  60. <table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
  61. <tr>
  62. <td align="right">
  63. <label class="Validform_label">
  64. 部门id:
  65. </label>
  66. </td>
  67. <td class="value">
  68. <input id="departId" name="departId" type="text" style="width: 150px" class="inputxt" ignore="ignore" value='${budgetDeptPage.departId}'/>
  69. <span class="Validform_checktip"></span>
  70. <label class="Validform_label" style="display: none;">部门id</label>
  71. </td>
  72. </tr>
  73. <tr>
  74. <td align="right">
  75. <label class="Validform_label">
  76. 部门名称:
  77. </label>
  78. </td>
  79. <td class="value">
  80. <input id="departName" name="departName" type="text" style="width: 150px" class="inputxt" ignore="ignore" value='${budgetDeptPage.departName}'/>
  81. <span class="Validform_checktip"></span>
  82. <label class="Validform_label" style="display: none;">部门名称</label>
  83. </td>
  84. </tr>
  85. <tr>
  86. <td align="right">
  87. <label class="Validform_label">
  88. 上级预算主体:
  89. </label>
  90. </td>
  91. <td class="value">
  92. <input id="parentId" name="parentId" type="text" style="width: 150px" class="inputxt easyui-combotree" ignore="ignore"
  93. value='${budgetDeptPage.parentId}'
  94. data-options="
  95. panelHeight:'220',
  96. url: 'budgetEntityController.do?datagrid&field=id,departName',
  97. loadFilter: function(data) {
  98. var rows = data.rows || data;
  99. var win = frameElement.api.opener;
  100. var listRows = win.getDataGrid().treegrid('getData');
  101. joinTreeChildren(rows, listRows);
  102. convertTreeData(rows, 'departName');
  103. return rows;
  104. },
  105. onSelect:function(node){
  106. $('#parentId').val(node.id);
  107. },
  108. onLoadSuccess: function() {
  109. var win = frameElement.api.opener;
  110. var currRow = win.getDataGrid().treegrid('getSelected');
  111. if(!'${budgetDeptPage.id}') {
  112. //增加时,选择当前父菜单
  113. if(currRow) {
  114. $('#parentId').combotree('setValue', currRow.id);
  115. }
  116. }else {
  117. //编辑时,选择当前父菜单
  118. if(currRow) {
  119. $('#parentId').combotree('setValue', currRow.parentId);
  120. }
  121. }
  122. }
  123. "
  124. >
  125. <span class="Validform_checktip"></span>
  126. <label class="Validform_label" style="display: none;">上级预算主体</label>
  127. </td>
  128. </tr>
  129. <tr>
  130. <td align="right">
  131. <label class="Validform_label">
  132. 预算主体名:
  133. </label>
  134. </td>
  135. <td class="value">
  136. <input id="entityName" name="entityName" type="text" style="width: 150px" class="inputxt" ignore="ignore" value='${budgetDeptPage.entityName}'/>
  137. <span class="Validform_checktip"></span>
  138. <label class="Validform_label" style="display: none;">预算主体名</label>
  139. </td>
  140. </tr>
  141. <tr>
  142. <td align="right">
  143. <label class="Validform_label">
  144. 负责人id:
  145. </label>
  146. </td>
  147. <td class="value">
  148. <input id="entityUserId" name="entityUserId" type="text" style="width: 150px" class="inputxt" ignore="ignore" value='${budgetDeptPage.entityUserId}'/>
  149. <span class="Validform_checktip"></span>
  150. <label class="Validform_label" style="display: none;">负责人id</label>
  151. </td>
  152. </tr>
  153. <tr>
  154. <td align="right">
  155. <label class="Validform_label">
  156. 负责人姓名:
  157. </label>
  158. </td>
  159. <td class="value">
  160. <input id="entityUserRealname" name="entityUserRealname" type="text" style="width: 150px" class="inputxt" ignore="ignore" value='${budgetDeptPage.entityUserRealname}'/>
  161. <span class="Validform_checktip"></span>
  162. <label class="Validform_label" style="display: none;">负责人姓名</label>
  163. </td>
  164. </tr>
  165. </table>
  166. </t:formvalid>
  167. </body>
  168. <script src = "webpage/cn/com/lzt/budget/entity/budgetDept.js"></script>