fundlist.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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:"${ctx}/myconsole/complaint/fund/UpdateFundInfo",
  45. mtype : "POST",
  46. datatype : "json",
  47. multiselect: false,
  48. caption:'信息管理',
  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. rownumbers : true,//添加左侧行号
  64. viewrecords : true,//是否在浏览导航栏显示记录总数
  65. rowNum : 10,//每页显示记录数
  66. rowList : [10,20,30,40,50 ],//用于改变显示行数的下拉列表框的元素数组。
  67. autowidth : true,
  68. sortname : 'a.RecordTime',
  69. sortorder : 'desc',
  70. height : 'auto',
  71. pager : "#jqGridPager",
  72. //加载完成(初始加载),回调函数
  73. loadComplete: function(){
  74. //双引号替换为转义字符,否则后台不能接收到
  75. var res = html2Escape("${strSQL}");
  76. $("#strSQL").val(res);
  77. var page = $('#jqGrid').getGridParam('page');
  78. $("#page").val(page);
  79. var rows = $('#jqGrid').getGridParam('rowNum');
  80. $("#rows").val(rows);
  81. }
  82. })
  83. $('#jqGrid')
  84. .navGrid('#jqGridPager',
  85. {edit:true,add:false,del:false,search:false},
  86. //点击编辑触发的区域
  87. {
  88. closeAfterEdit : true,
  89. recreateForm : true,
  90. width:600,
  91. //在表单显示后触发此方法
  92. beforeShowForm:function(formid){
  93. },
  94. //在提交数据到服务器前触发
  95. beforeSubmit: function(postdata, formid){
  96. //获取组件主键 ID
  97. var userid = postdata.jqGrid_id;
  98. $.each(postdata,function (index, value) {
  99. if(index!="oper"){
  100. modifyJosnKey(postdata,index,"result."+index);
  101. }
  102. })
  103. //重新为主键赋值
  104. postdata["result.appealid"]=userid;
  105. return [true,'']; //返回值必须这么写 目前没找到原因,用true 和 返回对象都不好使。待查
  106. },
  107. //在提交数据到服务器后触发
  108. afterSubmit: function(response,postdata) //
  109. {
  110. var res=eval('(' + response.responseText + ')');
  111. if(res.flag)
  112. {
  113. parent.layer.alert(res.message, {
  114. skin: 'layui-layer-molv' //样式类名
  115. ,closeBtn: 0
  116. });
  117. return [true,res.message,''];
  118. }else{
  119. parent.layer.alert(res.message, {
  120. skin: 'layui-layer-molv' //样式类名
  121. ,closeBtn: 0
  122. });
  123. return [false,res.message,''];
  124. }
  125. },
  126. errorTextFormat : function(data) {
  127. return 'Error: ' + data.responseText
  128. }
  129. }
  130. )
  131. .navButtonAdd("#jqGridPager",
  132. { caption:"返回",
  133. buttonicon:"ui-icon-excel",
  134. onClickButton: function(){
  135. history.go(-1);
  136. }, position:"last" });
  137. //添加自定义按钮
  138. $("#jqGrid").navButtonAdd('#jqGridPager',{
  139. caption:"导出到excel",
  140. buttonicon:"ui-icon-document",
  141. onClickButton: function(){
  142. exportExcel();
  143. },
  144. position:"first"
  145. });
  146. });
  147. //新建或者修改信息页面调用函数
  148. function webinfo_init(title,keyid,strOper){
  149. var columnID = '',
  150. name = '',
  151. columnName = escape(name).replace(/%/g,"\\").toLowerCase();
  152. //alert('传递的主键'+id);
  153. fullOpen("${ctx}/myconsole/complaint/register/self");
  154. }
  155. //查看信息 2017-07-24
  156. function seeData(appealid){
  157. fullOpen("${ctx}/myconsole/complaint/register/seeData?appealid="+appealid);
  158. }
  159. <!--这里不能用ajax请求,ajax请求无法弹出下载保存对话框-->
  160. function exportExcel(){
  161. $('#form1').attr('action','${ctx}/myconsole/complaint/fund/exportExcelInfo');
  162. $('#form1').submit();
  163. }
  164. //普通字符转换成转义符
  165. function html2Escape(sHtml) {
  166. if(null == sHtml || sHtml == ''){
  167. return '';
  168. }
  169. return sHtml.replace(/["]/g,function(c){return {'"':'&quot;'}[c];});
  170. }
  171. </script>
  172. <title>我的桌面</title>
  173. </head>
  174. <form id="form1" method="post" class="form-horizontal" role="form">
  175. <input type="hidden" name="strSQL" id="strSQL" value="">
  176. <input type="hidden" name="strFrom" value="${strFrom}">
  177. <input type="hidden" name="strSelect" value="${strSelect}">
  178. <input type="hidden" name="rows" id="rows" value="">
  179. <input type="hidden" name="page" id="page" value="">
  180. </form>
  181. <body>
  182. <div>
  183. <div class="page-container">
  184. <table id="jqGrid"></table>
  185. <div id="jqGridPager"></div>
  186. </div>
  187. </div>
  188. </body>
  189. </html>