querylist.html 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="renderer" content="webkit|ie-comp|ie-stand">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="Cache-Control" content="no-siteapp" />
  9. <!--[if lt IE 9]>
  10. <script type="text/javascript" src="${ctx}/assets/lib/html5.js"></script>
  11. <script type="text/javascript" src="${ctx}/assets/lib/respond.min.js"></script>
  12. <script type="text/javascript" src="${ctx}/assets/lib/PIE_IE678.js"></script>
  13. <![endif]-->
  14. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui/css/H-ui.min.css" />
  15. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/H-ui.admin.css" />
  16. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/Hui-iconfont/1.0.7/iconfont.css" />
  17. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/icheck/icheck.css" />
  18. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/skin/default/skin.css" id="skin" />
  19. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/style.css" />
  20. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" >
  21. <script type="text/javascript" src="${ctx}/assets/lib/My97DatePicker/WdatePicker.js"></script>
  22. <script type="text/ecmascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.js"></script>
  23. <script type="text/javascript" src="${ctx}/assets/lib/layer/3.0.3/layer.js"></script>
  24. <script type="text/javascript" src="${ctx}/assets/static/h-ui/js/H-ui.js"></script>
  25. <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqueryui/jquery-ui.css" />
  26. <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqgrid/css/ui.jqgrid.css" />
  27. <script type="text/ecmascript" src="${ctx}/assets/lib/jqueryui/jquery-ui.js"></script>
  28. <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/i18n/grid.locale-cn.js"></script>
  29. <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/jquery.jqGrid.min.js"></script>
  30. <script type="text/javascript" src="${ctx}/assets/js/base.js"></script>
  31. <script type="text/javascript" src="${ctx}/assets/lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>
  32. <!--[if IE 6]>
  33. <script type="text/javascript" src="${ctx}/assets/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
  34. <script>DD_belatedPNG.fix('*');</script>
  35. <![endif]-->
  36. <script type="text/javascript">
  37. $(function() {
  38. $(window).resize(function(){
  39. $("#jqGrid").setGridWidth($(window).width()-41);
  40. });
  41. $("#jqGrid").jqGrid({
  42. url : '${ctx}/myconsole/complaint/query/getQueryPage',
  43. postData :{"strFrom":"${strFrom}","strSQL":"${strSQL}","strSelect":"${strSelect}"},
  44. editurl:"",
  45. mtype : "POST",
  46. datatype : "json",
  47. multiselect: false,
  48. caption1:'信息管理',
  49. prmNames : { //定义表单的主键 // Default valuesprmNames: {page:“page”,rows:“rows”, sort: “sidx”,order: “sord”, search:“_search”, nd:“nd”, npage:null} 当参数为null时不会被发到服务器端
  50. id: "appealid",
  51. oper:"oper",
  52. addoper:"add",
  53. editoper:"edit",
  54. deloper:"del"
  55. },
  56. colModel : [ {
  57. label : '数据编号',
  58. name : 'appealid',
  59. key : true,
  60. editable: false,
  61. hidden:true
  62. }, ${fieldLine}{
  63. label : '操作',
  64. name:'operMod',
  65. index:'operMod',
  66. align:'center',
  67. width:"50",
  68. sortable:false,
  69. formatter: function (cellvalue, options, rowdata) {
  70. var html ="";
  71. html = "<button class='btn btn-success radius size-S' onclick=seeData('"+rowdata.appealid+"')>查看</button>";
  72. return html;
  73. }
  74. }],
  75. rownumbers : true,//添加左侧行号
  76. viewrecords : true,//是否在浏览导航栏显示记录总数
  77. rowNum : 10,//每页显示记录数
  78. rowList : [10,15,20,30,40,50 ],//用于改变显示行数的下拉列表框的元素数组。
  79. autowidth : true,
  80. sortname : 'a.RecordTime',
  81. sortorder : 'desc',
  82. height : 'auto',
  83. pager : "#jqGridPager",
  84. //加载完成(初始加载),回调函数
  85. loadComplete: function(){
  86. //双引号替换为转义字符,否则后台不能接收到
  87. var res = html2Escape("${strSQL}");
  88. $("#strSQL").val(res);
  89. var page = $('#jqGrid').getGridParam('page');
  90. $("#page").val(page);
  91. var rows = $('#jqGrid').getGridParam('rowNum');
  92. $("#rows").val(rows);
  93. },
  94. //屏蔽点击任意单元格选中checkbox的问题
  95. beforeSelectRow: function (rowid, e) {
  96. var $myGrid = $(this),
  97. i = $.jgrid.getCellIndex($(e.target).closest('td')[0]),
  98. cm = $myGrid.jqGrid('getGridParam', 'colModel');
  99. return (cm[i].name === 'cb');
  100. }
  101. })
  102. $('#jqGrid')
  103. .navGrid('#jqGridPager',{edit:false,add:false,del:false,search:false})
  104. .navButtonAdd("#jqGridPager", { caption:"返回", buttonicon:"ui-icon-excel",
  105. onClickButton: function(){
  106. history.go(-1);
  107. },
  108. position:"last"
  109. });
  110. //添加自定义按钮
  111. // $("#jqGrid").navButtonAdd('#jqGridPager',{
  112. // caption:"导出到excel",
  113. // buttonicon:"ui-icon-document",
  114. // onClickButton: function(){
  115. // exportExcel();
  116. // },
  117. // position:"first"
  118. // });
  119. });
  120. //下载附件
  121. function downFile(filePath,fileName)
  122. {
  123. window.open('${serverURL!}/downloadFile.do?FileDownloadPath='+filePath+'&FileDownloadName='+fileName,'Derek','resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no');
  124. }
  125. //新建或者修改信息页面调用函数
  126. function webinfo_init(title,keyid,strOper){
  127. var columnID = '',
  128. name = '',
  129. columnName = escape(name).replace(/%/g,"\\").toLowerCase();
  130. //alert('传递的主键'+id);
  131. fullOpen("${ctx}/myconsole/complaint/register/self");
  132. }
  133. //查看信息 2017-07-24
  134. function seeData(appealid){
  135. fullOpen("${ctx}/myconsole/complaint/register/seeData?appealid="+appealid);
  136. }
  137. <!--这里不能用ajax请求,ajax请求无法弹出下载保存对话框-->
  138. function exportExcel(){
  139. //window.location.href="${ctx}/myconsole/complaint/fund/exportExcel";
  140. $('#form1').attr('action','${ctx}/myconsole/complaint/query/exportExcel');
  141. $('#form1').submit();
  142. }
  143. //普通字符转换成转义符
  144. function html2Escape(sHtml) {
  145. if(null == sHtml || sHtml == ''){
  146. return '';
  147. }
  148. return sHtml.replace(/["]/g,function(c){return {'"':'&quot;'}[c];});
  149. }
  150. </script>
  151. <title>我的桌面</title>
  152. </head>
  153. <form id="form1" method="post" class="form-horizontal" role="form">
  154. <input type="hidden" name="strSQL" id="strSQL" value="">
  155. <input type="hidden" name="strSelect" value="${strSelect}">
  156. <input type="hidden" name="strFrom" value="${strFrom}">
  157. <input type="hidden" name="fieldList" value="${fieldList}">
  158. <input type="hidden" name="rows" id="rows" value="">
  159. <input type="hidden" name="page" id="page" value="">
  160. </form>
  161. <body>
  162. <div>
  163. <div class="page-container">
  164. <table id="jqGrid"></table>
  165. <div id="jqGridPager"></div>
  166. </div>
  167. </div>
  168. </body>
  169. </html>