严智鑫
2025-03-14 c41e1c8b82b8f4c7b149e0576c9a37bc5b2dbb85
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<%@ page contentType="text/html;charset=UTF-8"%>
 
<html>
<head>
<link rel="stylesheet" href="../static/AdminLTE/bower_components/bootstrap/dist/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="../static/AdminLTE/bower_components/font-awesome/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="../static/AdminLTE/bower_components/Ionicons/css/ionicons.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="../static/AdminLTE/dist/css/AdminLTE.min.css">
<link rel="stylesheet" href="../static/AdminLTE/dist/css/skins/skin-blue.min.css">
<link type="text/css" rel="stylesheet" href="../static/AdminLTE/bower_components/bootstrap/dist/css/bootstrap.css">
<script type="text/javascript"
    src="../static/jquery/jquery-3.1.0.min.js"></script>
    
<script type="text/javascript">
  var interval = setInterval('refreshStatus()', 20000);
   $(document).ready(function(){
        var info = $("#info").attr("info");
        $("#infos").html(info);
   });
  // 设备页面自动刷新
  /* function refreshStatus() {
    window.location.reload();
   } */
  // 停止页面自动刷新
  function disableAutoRefresh() {
    clearInterval(interval);
   }
   function test0() {
       let exportFileContent = document.getElementById('mtable').outerHTML;
       let blob = new Blob([exportFileContent], { type: 'text/plain;charset=utf-8' }); // 解决中文乱码问题
       blob = new Blob([String.fromCharCode(0xFEFF), blob], { type: blob.type });
       // 设置链接
       let link = window.URL.createObjectURL(blob);
       let a = document.createElement('a'); // 创建a标签
       a.download = '冷加工半成品报表.xls'; // 设置被下载的超链接目标(文件名)
       a.href = link; // 设置a标签的链接
       document.body.appendChild(a); // a标签添加到页面
       a.click(); // 设置a标签触发单击事件
       document.body.removeChild(a); // 移除a标签
     }
</script>
<style>
    .box table tr th,.box table tr td{
        text-align:center;
    }
    .table-stripeds > tbody > tr:nth-of-type(odd) {
  background-color: lightblue;
 
            /* 设置最外层容器可以左右滚动*/
            .mtable {
                overflow-x: scroll;
                overflow-y: hidden;
                position: relative;
                width: 100%;
                height: 700px;
                font-size: 13px;
            }
 
            table {
                border: 1px solid #eee;
            }
 
            /* 调节表头宽度 */
            table thead {
                background-color: #f5f5f5;
                width: calc(100%);
            }
 
            table thead tr th {
                background: #5CADFE;
            }
 
            /* 固定表头 */
            table thead,
            tbody tr {
                display: table;
                width: 100%;
                table-layout: fixed;
            }
 
            /* 控制表格滑动 */
            table tbody {
                display: block;
                height: 600px;
                overflow-y: scroll;
            }
 
            /* 隐藏  y轴的滚动条,仍然可以上下滚动 */
            table tbody::-webkit-scrollbar {
                display: none;
            }
 
            th,
            td {
                white-space: nowrap;
                width: 130px;
                height: 30px;
                text-align: center;
                overflow: hidden;
                border: 1px solid #f5f5f5;
                border-width: thin;
            }
 
        
</style>    
<title>冷加工半成品报表</title>
</head>
<body style="padding: 20px;background-color:#D5EAFF;height:100%">
    <div id='app'>
    <!-- <div style='height:20px;width:300px;background-color:#3C8DBC;float:right;'><span style = 'color:#fff;' >故障情况:</span><span id='infos'></span></div> -->
        <section class="content-header">
            <h1>冷加工半成品报表</small></h1>
            
            <ol class="breadcrumb">
            
                
            </ol>
        </section>
    <div id = "allstatu" allstatu = "${allstatu}"></div>
           <div id = "info" info = "${info}"></div>
        <!-- Main content -->
        <section class="content container-fluid">
            <div style="margin-top: 20px;">
            流程卡:<input  v-model="liuchengka" type="text" id="engineeringid" name="engineeringid" />&nbsp;&nbsp;&nbsp;
            线路:<input  v-model="gongchenghao" type="text" id="processcardid" name="processcardid" />&nbsp;&nbsp;&nbsp;
            开始时间:<input v-model="stateTime" type="datetime-local" id="starttime" name="starttime" />&nbsp;&nbsp;&nbsp;
            结束时间:<input  v-model="endTime" type="datetime-local" id="findtime" name="findtime" />&nbsp;&nbsp;&nbsp;
            <input @click="selectGlass" type="button"  class="btn btn-primary " value="查询"/>    &nbsp;&nbsp;&nbsp;
            <button type="button" onclick="test0()" class="btn btn-primary ">导出表格</button>
            </div>
        <h3>总面积:{{countGlass[0][0]}}平方米&nbsp;&nbsp;&nbsp;总周长:{{countGlass[0][1]}}米&nbsp;&nbsp;&nbsp;总片数:{{countGlass[0][2]}}</h3>
            
            <div class="box" style="height: 700px;width:100%; overflow: auto;margin-top: 10px;">
                    <table class="table table-stripeds table-hover" id="mtable"
                        style="overflow-x: auto">
                        <thead>
                            <tr>
                                <th>序号</th>
                                <th>玻璃ID</th>
                                <th>长度</th>
                                <th>宽度</th>
                                <th>厚度</th>
                                <th>颜色</th>
                                <th>流程卡</th>
                                <th>工程号</th>
                                <th>批次号</th>
                                <th>完成时间</th>
                                
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-show="Object.keys(items).length!=0"  v-for="(items,index) in shuzu">
                                <td>{{index+1}}</td>
                                <td     v-for="(item,key,index) in items">
                                    {{item}}
                                </td>
                            </tr>
                        </tbody>
                    </table>
            </div>
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
</body>
<script src="../js/vue.min.js"></script>
<script src="../js/mixins.js"></script>
<script>
 let app = new Vue({
      el:'#app',
      mixins:[mixin],
      data:{
          shuzu:[],
          stateTime:"",
          endTime:"",
          liuchengka:'',
          gongchenghao:"",
          countGlass:[]
      },
      methods:{
          selectGlass:function(){
              let canshu={
                      stateTime:this.stateTime,
                        endTime:this.endTime,
                        liuchengka:this.liuchengka,
                        gongchenghao:this.gongchenghao     
                 }
              let sql="{call AXJ_baobiao_lengjiagong_chaxun(?,?,?,?,?)}~"+JSON.stringify(canshu);
              loadAjxs('报表冷加工',sql,2,"shuzu");
              sql="{call AXJ_baobiao_lengjiagong_zhouchangchaxun(?,?,?,?,?)}~"+JSON.stringify(canshu);
              loadAjxs('报表冷加工',sql,2,"countGlass");
          }
      },
      mounted:function(){
          let canshu={
                  stateTime:'',
                    endTime:'',
                    liuchengka:'',
                    gongchenghao:''
             }
         let sql="{call AXJ_baobiao_lengjiagong_chaxun(?,?,?,?,?)}~"+JSON.stringify(canshu);
         loadAjxs('报表冷加工',sql,2,"shuzu");
         sql="{call AXJ_baobiao_lengjiagong_zhouchangchaxun(?,?,?,?,?)}~"+JSON.stringify(canshu);
         loadAjxs('报表冷加工',sql,2,"countGlass");
      }
})
 </script>
</html>