严智鑫
2025-11-13 945bc394f40d8af1072a53da9a94f24207124e6d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="${ctx}/static/bootstrap/2.3.2/css/bootstrap.min.css" type="text/css" rel="stylesheet"/>
<script src="${ctx}/static/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript" src="${ctx}/static/util.js"></script>
<title>任务统计</title>
 
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script language="javascript" type="text/javascript" src="${ctx}/static/util2.js"></script>
  <script>
  $(document).ready(function(){
        var allstatu = $("#allstatu").attr("allstatu");
        var info = $("#info").attr("info");
        $("#infos").html("<img src=\"/gmms2/static/images/danger.jpg\">"+"  "+info);
        if(allstatu == 0){
             $("#allstatus").attr("style","background-color:#f00"); 
        }
    });
  $( function() {
    $( "#completetime" ).datepicker({
      showOn: "button",
      buttonImage: "../static/images/time.png",
      buttonImageOnly: true,
      buttonText: "Select date"
    });
    
    $( "#starttime" ).datepicker({
        showOn: "button",
        buttonImage: "../static/images/time.png",
        buttonImageOnly: true,
        buttonText: "Select date"
      });
  } );
  </script>
  
  <script type="text/javascript">
      function checkData(){
          //主要是对时间的校验
          var starttime = document.getElementById("starttime").value;
          var completetime = document.getElementById("completetime").value;
          //转换成日期类型(只是为了比较大小)
          var startTime = new Date(starttime);
          var completeTime = new Date(completetime);
          
          //两个时间都是空
          if(startTime == null || completeTime == null){
              window.location.href = "${ctx }/reportmanage/selectreport2?starttime=no&completetime=no"
          }
          //开始时间不为空
          else if(startTime != null && completeTime == null){
              window.location.href = "${ctx }/reportmanage/selectreport2?starttime="+starttime+"&completetime=no"
              
          }
          //完成时间不为空
          else if(startTime == null && completeTime != null){
              window.location.href = "${ctx }/reportmanage/selectreport2?starttime=no&completetime="+completetime;
              
          }
          //都不为空
          else{
              //当起始时间大于完成时间
              if(startTime.getTime() > completeTime.getTime()){
                  //非法输入
                  $.MsgBox.Alert("WARM PROMPT", "开始时间不能大于完成时间!");
                  return false;
              }
              //当起始时间小于等于完成时间,都是合法的
              else {
                  window.location.href = "${ctx }/reportmanage/selectreport2?starttime="+starttime+"&completetime="+completetime;
              }
          }
      }
  
  </script>
  <script type="text/javascript">
      $(function(){
          $(".download").click(function(){
              window.location.href="${ctx}/reportmanage/downloadExcel?loadmachineid=2";
          })
      })
  </script>
</head>
<body>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div>
        <section class="content-header">
              <h1>
            任务统计
                <small></small>
              </h1>
          <ol class="breadcrumb">
            <li><a href="${ctx }/reportmanage/taskreport2"><i class="fa fa-reply"></i>任务统计</a></li>
            <li class="active">统计信息</li>
          </ol>
        </section>
        <div id = "allstatu" allstatu = "${allstatu}"></div>
           <div id = "info" info = "${info}"></div>
    </div>
    <div>
    <!-- Main content -->
    <section class="content container-fluid">
    <div class="box" style="margin-top: 10px;">
           <div class="box-header" align="center">
               <h3 class="box-title">筛选条件</h3>
           </div>
         <div style="overflow: auto;height:220px;" class="box-body no-padding">
        <table class="table table-striped" style="font-size: medium; width: 100%;" id="table">
        <tr>
            <td style="width: 40%; border: 1px solid white; vertical-align: top;">
            <div>
                <fieldset>
                    <div>
                        <form action="#">
                            <table style="font-size: large;">
                                <tr style="height: 60px;">
                                    <td>文件名:</td><td style="padding-left: 20px;"><input type="text" id="optname" name="optname" placeholder="文件名" style="height: 28px;"/></td>
                                    <td style="padding-left: 150px;">状态:</td><td style="padding-left: 20px;"><input type="text" id="state" name="state" placeholder="状态" style="height: 28px;"
                                    onkeyup="if(isNaN(this.value)){alert('illegal character!');this.value='';}"/></td>
                                    <td style="padding-left: 150px;">理由:</td><td style="padding-left: 20px;"><input type="text" id="reason" name="reason" placeholder="理由" style="height: 28px;"/></td>
                                </tr>
                                <tr>
                                    <td>开始时间:</td><td style="padding-left: 20px;"><input type="text" id="starttime" name="starttime" style="height: 28px;" readonly="readonly"></td>    
                                    <td style="padding-left: 150px;">完成时间:</td><td style="padding-left: 20px;"><input type="text" id="completetime" name="completetime" style="height: 28px;" readonly="readonly"></td>    
                                    </tr>
                                <tr>
                                        <td><input type="button" value="查询" onclick="checkData()" class="btn btn-large btn-info"/></td>
                                        <td style="padding-left: 100px;">
                                            <input type="button" value="下载" class="download btn btn-large btn-info"/>
                                        </td>
                                    </tr>
                                </table>
                            </form>
                        </div>
                        </fieldset>
                </div>
            </td>
        </tr>
    </table>    
    </div>
    </div>
 
<div class="box" style="margin-top: 10px;">
           <div class="box-header" align="center">
               <h3 class="box-title">任务统计</h3>
           </div>
         <div style="overflow: auto;height:320px;" class="box-body no-padding">
        <table class="table table-striped" style="font-size: medium; width: 100%;" id="table">
        <tr>
            <td style="width: 100%; border: 1px solid white; vertical-align: top;">
                <fieldset>
                        <div style="overflow: auto;">
                            <table class="table table-striped table-hover">
                                   <tr>
                                   <th width="200px" height="40px" align="left">文件名</th>
                                   <th width="200px" height="40px" align="left">GlassId</th>
                                   <th width="200px" height="40px" align="left">总片数</th>
                                   <th width="200px" height="40px" align="left">完成片数</th>
                                   <th width="200px" height="40px" align="left">状态</th>
                                   <th width="200px" height="40px" align="left">开始时间</th>
                                   <th width="200px" height="40px" align="left">完成时间</th>
                                   <th width="200px" height="40px" align="left">理由</th>
                                   </tr>
                                       <c:forEach items="${reportTasks}" var="reportTask" varStatus="status1">
                                           <tr>
                                           <td height="30px"><a type ='button' class='btn btn-info' href="${ctx}/reportmanage/lookinfobyoptname?optname=${reportTask.opt_name}">${reportTask.opt_name}</a></td>
                                           <td height="30px">${reportTask.optPattern.glassId}</td>
                                           <td height="30px">${reportTask.piece}</td>
                                           <td height="30px">${reportTask.complete_piece}</td>
                                           <td height="30px">${reportTask.state}</td>
                                           <td height="30px">${reportTask.start_time}</td>
                                           <td height="30px">${reportTask.complete_time}</td>
                                           <td height="30px">${reportTask.reson}</td>
                                            </tr>
                                       </c:forEach>
                            </table>
                            </div>
                    </fieldset>
               </td>
        </tr>
    </table>
    </div>
    </div>
     </section>
    </div>
    <!-- /.content -->
  </div>
</body>
</html>