listSubjectConfig.jsp 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  6. <title>科目关联配置列表</title>
  7. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  8. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  9. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  10. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  11. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  12. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
  13. <script type="text/javascript" src="/shares/js/constant.js"></script>
  14. <script type="text/javascript" src="/shares/js/common.js"></script>
  15. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  16. <script type="text/javascript">
  17. var grid = null;
  18. $(function() {
  19. initTargetGrid();
  20. });
  21. var checkValue = new Array(); //定义一个数组
  22. var i = 0;
  23. function initTargetGrid(params) {
  24. var checkbox = false;
  25. if ("true" == 'false' || "true" == '') {
  26. checkbox = false;
  27. } else {
  28. checkbox = true;
  29. }
  30. var columns = [
  31. {
  32. display : '编号',
  33. name : 'subject_config_number',
  34. width : 200
  35. },{
  36. display : '名称',
  37. name : 'subject_config_name',
  38. width : 300
  39. // ,
  40. // render:function(row,index){
  41. // var html = '<a href=\"#\" onclick=\"addSubjectDetailConfig('+ row.universalid + ')\">'+"<font color=blue >"+row.subject_config_name+"</font>"+'</a>&nbsp;';
  42. // return html;
  43. // }
  44. }, {
  45. display : '说明',
  46. name : 'subject_config_remark',
  47. width : 300
  48. }];
  49. grid = $("#maingrid4")
  50. .ligerGrid(
  51. {
  52. columns : columns,
  53. pageSize : 20,
  54. url : 'fmSubjectConfigAction.do?task=subjectConfigList&time=' + new Date().getTime() + params,
  55. pageParmName : 'p', //页索引参数名,(提交给服务器)
  56. pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
  57. width : '99.9%',
  58. checkbox:checkbox,
  59. // single :true,
  60. // allowHideColumn: false, rownumbers: true, colDraggable: true, rowDraggable: true,
  61. height : '99%',
  62. isChecked: f_isChecked,
  63. onCheckRow: function(checked, rowdata, rowindex) {
  64. for (var rowid in this.records){
  65. this.unselect(rowid);
  66. }
  67. if(checked){
  68. // alert(rowdata.universalid);
  69. this.select(rowindex);
  70. dialog = $.ligerDialog.open({ height: 300,width:600, title:"新增科目表单配置详细",url: 'fmSubjectConfigAction.do?task=toSubjectConfigDetailList&universalid='+rowdata.universalid});
  71. }else{
  72. this.unselect(rowindex);
  73. }
  74. }
  75. });
  76. $("#pageloading").hide();
  77. $(".l-grid-hd-cell-btn-checkbox").css("display", "none"); //隱藏checkAll
  78. }
  79. function f_select() {
  80. var rows = grid.getCheckedRows();
  81. return rows;
  82. }
  83. //默认选中
  84. function f_isChecked(rowdata){
  85. if(checkValue != "" && typeof (checkValue) != "undefined"){
  86. if(checkValue[i]==rowdata.sid){
  87. i++;
  88. return true;
  89. }
  90. return false;
  91. }
  92. }
  93. //新增科目表单配置详细
  94. function addSubjectDetailConfig(universalid){
  95. // dialog = $.ligerDialog.open({ height: 250,width:520,url: 'hrTrainImpleTraineesAction.do?task=toEditImpleTrainees&universalid='+universalid + '&tabid=' + getCurrentTabId()});
  96. // alert(universalid);
  97. dialog = $.ligerDialog.open({ height: 300,width:1200, title:"新增科目表单配置详细",url: 'fmSubjectConfigAction.do?task=toSubjectConfigDetailList&universalid='+universalid});
  98. }
  99. function CloseWin() {
  100. window.parent.dialog.close();
  101. }
  102. </script>
  103. </head>
  104. <body>
  105. <%@ include file="/include/message.jsp"%>
  106. <div class="container-layout">
  107. <div id="title" class="form-button">
  108. <input type="button"
  109. value="关闭" class="l-button" onclick="closeWindow();" style="margin-bottom:10px;"/>
  110. <br/>
  111. <font color="blue">友情提示:表单的收支类型会显示关联科目的子级,没有关联会显示所有科目。</font>
  112. </div>
  113. <div style="clear:both;"></div>
  114. <div id="searchbar">
  115. <div style="overflow: hidden; clear: both;">
  116. <div id="maingrid4" style="margin-top:25px; padding: 0"></div>
  117. </div>
  118. </div>
  119. </div>
  120. </body>
  121. </html>