analysisbranchmain.jsp 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
  2. <%@include file="/pages/includes/taglibs.jsp" %>
  3. <head>
  4. <script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/jquery-1.8.3.js"></script>
  5. <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/jquery.jqGrid.min.js"></script>
  6. <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/i18n/grid.locale-cn.js"></script>
  7. <script type="text/ecmascript" src="<%=request.getContextPath()%>/resource/js/system/jqdatagrid.js"></script>
  8. <script src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js" type="text/javascript"></script>
  9. <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
  10. <link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath() %>/resource/plugin/jqgrid/css/ui.jqgrid.css" />
  11. <script type="text/javascript">
  12. function queryData(){
  13. // 日期
  14. var recordDate = $("#recordDate").val();
  15. $("#recordDateQ").val(recordDate);
  16. jQuery("#gridTable").jqGrid('setGridParam',{url:"/statisticsAnalysisBranch/analysisBranchMainList.action?recordDate="+recordDate}).trigger("reloadGrid");
  17. }
  18. function sendRequest(passData){
  19. $("#formView").attr("action", passData).submit();
  20. }
  21. function queryClear(){
  22. $("#recordDate").val("");
  23. }
  24. $(function(){
  25. showJqGrid();
  26. });
  27. // 加载jqgrid表格
  28. function showJqGrid(){
  29. // 日期
  30. var recordDate = $("#recordDate").val();
  31. $("#recordDateQ").val(recordDate);
  32. var recordDateQ = $("#recordDateQ").val();
  33. jQuery("#gridTable").jqGrid({
  34. url:"/statisticsAnalysisBranch/analysisBranchMainList.action?recordDate="+recordDate,
  35. datatype: "json",
  36. colNames:['编号', '名称','日期','操作'],
  37. colModel:[
  38. { name: 'id', index: 'id', width: 200, align: 'center', hidden: true},
  39. { name: 'wpName', index: 'wpName', width: 200, align: 'center'},
  40. { name: 'recordDate', index: 'recordDate', width: 200, align: 'center'},
  41. { name: 'operate', index: 'operate', width: 200, align: 'center'}
  42. ],
  43. rowNum:10,
  44. height:'670',
  45. width:'1610',
  46. rowList:[10,20,30],
  47. pager: '#gridPager',
  48. sortname: 'recordDate',
  49. viewrecords: true,
  50. autowidth: true,
  51. sortorder: "desc",
  52. caption: "统计分析列表",
  53. afterInsertRow:function(rowid,rowdata,rowelem){
  54. var operateLink = "<a href=\"#\" onclick=\"requestAction('/statisticsAnalysisBranch/index.action?id=" + rowdata.id + "&recordDateQ=" + recordDateQ + "&recordDate=" + rowdata.recordDate + "')\">查看</a>";
  55. jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{operate:operateLink});
  56. }
  57. });
  58. }
  59. function requestAction(url){
  60. $("#f1").attr("action",url);
  61. $("#f1").submit();
  62. }
  63. </script>
  64. </head>
  65. <body>
  66. <form action="" method="post" id="formView">
  67. </form>
  68. <table width="100%">
  69. <tr>
  70. <td align="left" class="navbar" style="font-size: 12px;">分公司统计分析</td>
  71. </tr>
  72. </table>
  73. <hr/>
  74. <fieldset style="height: 60px" id="fst">
  75. <legend class="item_Name">统计分析查询项</legend>
  76. <table width="1000px" cellpadding="0" cellspacing="0" class="dataform">
  77. <tr>
  78. <td width="6%">
  79. 日期:
  80. </td>
  81. <td width="20%">
  82. <s:textfield
  83. cssClass="Wdate"
  84. onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
  85. id="recordDate" name="recordDate" title="日期" />
  86. <s:textfield
  87. cssClass="Wdate"
  88. onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
  89. id="recordDateQ" name="recordDateQ" title="日期" style="display:none"/>
  90. </td>
  91. <td style="text-align: right">
  92. <input type="button" class="button" onclick="javascript:queryData();" value="查询"/>
  93. <input type="button" class="button" onclick="javascript:queryClear();" value="清空"/>
  94. </td>
  95. </tr>
  96. </table>
  97. </fieldset>
  98. <br/>
  99. <table id='gridTable'></table>
  100. <div id='gridPager'></div>
  101. <form action="" method="post" id="f1">
  102. </body>