123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
- <%@include file="/pages/includes/taglibs.jsp" %>
- <head>
- <script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/jquery-1.8.3.js"></script>
- <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/jquery.jqGrid.min.js"></script>
- <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/i18n/grid.locale-cn.js"></script>
-
- <script type="text/ecmascript" src="<%=request.getContextPath()%>/resource/js/system/jqdatagrid.js"></script>
- <script src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js" type="text/javascript"></script>
- <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
- <link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath() %>/resource/plugin/jqgrid/css/ui.jqgrid.css" />
- <style type="text/css">
- </style>
- <script type="text/javascript">
- function queryData(){
- // 对日期进行校验
- var checkboolean = checkEndTime();
- if(!checkboolean){
- return false;
- }
- var r=confirm("您确认要生成这段时间的数据吗?")
- if (r==true) {
- // 日期
- var startDate = $("#startDate").val();
- var endDate = $("#endDate").val();
- $("#formView").attr("action", "/statisticsAnalysisBranch/maintaingenerate.action?startDate="+startDate+"&endDate="+endDate).submit();
- }
-
- }
- function queryClear(){
- $("#startDate").val("");
- $("#endDate").val("");
- }
- function checkEndTime(){
- var startDate=$("#startDate").val();
- var start=new Date(startDate.replace("-", "/").replace("-", "/"));
- var endDate=$("#endDate").val();
- var end=new Date(endDate.replace("-", "/").replace("-", "/"));
-
- // 非空验证
- if(startDate==null || startDate==""){
- alert('开始时间不能为空');
- return false;
- }
- if(endDate==null || endDate==""){
- alert('结束时间不能为空');
- return false;
- }
-
- // 开始结束日期大小验证
- if(end<start){
- alert('开始日期不能大于结束日期');
- return false;
- }
-
- // 结束日期必须小于当前日期
- var dd = new Date();
- dd.setDate(dd.getDate()-1)
- if(end>dd){
- alert('结束日期必须小于当前日期,不能生成当天的数据');
- return false;
- }
-
- return true;
- }
- $(document).ready(function(){
- });
- </script>
- </head>
- <body>
- <form action="" method="post" id="formView">
- </form>
- <table width="100%">
- <tr>
- <td align="left" class="navbar" style="font-size: 12px;">分公司统计分析批量生成</td>
- </tr>
- </table>
- <hr/>
- <hk:panel id="queryDiv" title="生成时间段" collapsible="true" display="true" colsePanel="false">
- <table width="100%" cellpadding="0" cellspacing="0" class="dataform">
- <tr>
- <td align="left" >
- 开始日期:<s:textfield
- cssClass="Wdate"
- onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
- id="startDate" name="startDate" title="开始日期"/>
- 结束日期:<s:textfield
- cssClass="Wdate"
- onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
- id="endDate" name="endDate" title="结束日期"/>
- <input type="button" class="button" onclick="javascript:queryData();" value="执行"/>
- <input type="button" class="button" onclick="javascript:queryClear();" value="清空"/>
- </td>
- </tr>
- <tr>
- <td align="left" >
- <font style="color: red;">执行该操作前,请先确保执行时间段内的风场统计分析数据已经生成。分公司统计分析数据是在风场统计分析的基础上计算生成的</font>
- </td>
- </tr>
- </table>
- </hk:panel>
- </form>
- </body>
|