严智鑫
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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
<%@ 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">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link type="text/css" rel="stylesheet" href="../static/AdminLTE/bower_components/bootstrap/dist/css/bootstrap.css">
 
<link href="../static/styles/default.css" type="text/css" rel="stylesheet" />
 
<script src="../static/holder.js" type="text/javascript"></script>
 
<script type="text/javascript" src="../static/jquery/jquery-3.1.0.min.js"></script>
<script type="text/javascript" src="../static/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<title>下片位</title>
<script type="text/javascript">
 var interval = setInterval('refreshStatus()', 10000);
$(document).ready(function(){
        var info = $("#info").attr("info");
        $("#infos").html(info);
});
/*
// 设备页面自动刷新
 function refreshStatus() {
    window.location.reload();
} */
 
// 停止页面自动刷新
function disableAutoRefresh() {
    clearInterval(interval);
 
/**
 * 添加原片
 */
 function addload1(loadMachineRackId){
         disableAutoRefresh()
        $("#add-info").modal('show');
        $("#addRawPackage").val(loadMachineRackId);
}
 
 /**
  * 添加固定料架信息
  */
  function addinfo(loadMachineRackId){
          disableAutoRefresh()
         $("#add-fix-info").modal('show');
          $("#fixrack").val("固定料架"+loadMachineRackId);
         $("#add-fix").val(loadMachineRackId);
 }
 
 
  /**
   * 删除固定料架信息
   */
   function deleteinfo(loadMachineRackId){
           disableAutoRefresh()
           $('#deletefixinfo').modal('toggle');
            $("#fixlinenumber").val(loadMachineRackId);
  }
 /**
  * 修改原片
  */
  function modifyload(loadMachineRackId){
          disableAutoRefresh()
         $("#modify-info").modal('show');
         $("#midifyRawPackage").val(loadMachineRackId);
 }
 
  function tuikuload(dropFrameid){
      var groups=document.getElementsByName('groups')[0].value;
          $.ajax({ 
              cache:false,
              type:"POST",
              dataType : "json", 
               url:"${ctx}/countmachine/tuikuinfo",
               data:{
                   "dropFrameid":dropFrameid
               },success:function(data){
                window.location.href="${ctx}/countmachine/loadmachinerack/"+groups;
            }
        });
}
  
  function updateload(dropFrameid){
      var groups=document.getElementsByName('groups')[0].value;
          $.ajax({ 
              cache:false,
            type:"POST",
            dataType : "json", 
             url:"${ctx}/countmachine/updateinfo",
             data:{
                 "dropFrameid":dropFrameid
             },success:function(data){
                window.location.href="${ctx}/countmachine/loadmachinerack/"+groups;
            }
        });
}
 
  function deleteload(id){
      disableAutoRefresh();
      $('#taskFinish').modal('toggle');
      $("#lineprint").val(id);
  }
  
  $(document).delegate('#surefinish','click',function(){
      var groups=document.getElementsByName('groups')[0].value;
           var id = $("#lineprint").val();
      $.ajax({ 
            async: false, 
        
            type:"GET", 
 
             url:"${ctx}/cutmanage/deleteinfo/"+id, 
 
            dataType:"text", 
 
            success:function(data){
                alert(id+"号位信息清除完成!");
                window.location.href="${ctx}/cutmanage/loadmachinerack/"+groups;
                }
            });
    });
  
  $(document).delegate('#deletefixinfo','click',function(){
      var groups=document.getElementsByName('groups')[0].value;
         var id = $("#fixlinenumber").val();
      $.ajax({ 
            async: false, 
        
            type:"GET", 
 
             url:"${ctx}/cutmanage/deletefixinfo/"+id, 
 
            dataType:"text", 
 
            success:function(data){
                alert(data);
                alert(id+"号切割机固定料架信息清除完成!");
                window.location.href="${ctx}/loadmachine/loadmachinerack/"+groups;
                }
            });
    });
  
  
  </script>
</head>
<body style="padding: 20px;background-color:#D5EAFF;height:100%">
      <div id='app'>
    <div>
        <section class="content-header">
              <h1>
            下片设备信息
                <small></small>
              </h1>
          <ol class="breadcrumb">
            <li><a href="${ctx }/loadmachine/loadmachinerack"><i class="fa fa-reply"></i>下片机信息</a></li>
            <li class="active"></li>
          </ol>
        </section>
        <input style="display:none" type="text" name="groups" value="${groups}" />
           <div id = "info" info = "${info}"></div>
    </div>
    <div>
    <!-- Main content -->
    <section class="content container-fluid">
        <div class="box" style="height: 525px; overflow: auto;">
              <div class="box-header">
              </div>
              <!-- /.box-header -->
              <div class="box-body no-padding">
                 <table class="table table-striped" style="font-size: large;">
                       <thead>
                           <tr>
                               <th style="text-align: center;" width="15%">下片位</th>
                               <th style="text-align: center;" width="10%">架号</th>
                               <th style="text-align: center;" width="15%">状态</th>
                               <th style="text-align: center;" width="10%">流程卡号</th>
                               <th style="text-align: center;" width="10%">工程号</th>
                               <th style="text-align: center;" width="10%">完成数量</th>
                               <th style="text-align: center;" width="10%">总数</th>
                               <th style="text-align: center;" width="20%">操作</th>
                           </tr>
                       </thead>
                       <tbody>
                           <tr v-show="Object.keys(items).length!=0"  v-for="items in shuzu" style='text-align: center;'>
                            <td >{{items[1]}}</td>
                            <td >{{items[2]}}</td>
                            <td >{{items[3]=='使用中'?items[3]:''}}</td>
                            <td >{{items[4]}}</td>
                            <td >{{items[5]}}</td>
                            <td >{{items[3]=='使用中'?items[6]:''}}</td>
                            <td >{{items[3]=='使用中'?items[7]:''}}</td>
                            
                            <td v-if="items[3]=='使用中'">
                                <button @click='updateNum(items[0])' class='btn btn-large btn-warning' >修改数量</button>&nbsp;&nbsp;&nbsp;
                                <button @click='clearMeg(items[0])' class='btn btn-large btn-danger' >清空信息</button>
                            </td>
                            <td v-else-if="items[3]==='空闲'">
                                <button @click="addLoad(items[0])" class='btn btn-large btn-warning' >绑定架子</button>&nbsp;&nbsp;&nbsp;
                                <button @click="updateDropState(items[0])" class='btn btn-large btn-danger' >添加架子</button>
                            </td>
                            <td v-else>
                                <button @click="addLoad(items[0])" class='btn btn-large btn-warning' >绑定架子</button>
                            </td>
                            
                        </tr>
                       </tbody>
                   </table>
               </div>
           </div>
           
           <div class="modal fade" id="modify-info" tabindex="-1" role="dialog"
                aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true" data-backdrop="static">&times;</button>
                            <h3 class="modal-title" id="myModalLabel"
                                style="font-weight: bolder;">修改原片数量</h3>
                        </div>
                        <form class="form-horizontal" role="form" id="category_add"
                            action="${ctx}/countmachine/modifyAction" method="post">
                            <input type="hidden" id="midifyRawPackage" name="Ids">
                            <div class="modal-body">
 
                                <div class="form-group">
                                    <h4>
                                        <label class="col-sm-3 control-label no-padding-right"
                                            style="font-weight: bolder;">数量 </label>
                                    </h4>
 
                                    <div class="col-sm-9">
                                        <input v-model="updateNums.num" type="number" class=" sortNumber form-control"
                                             name="pieces" id="pieces"
                                            onclick="app.$data.updateNums.num=''" style="width: 250px; font-size: 20px" />
                                    </div>
                                </div>
 
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default btn-lg"
                                    data-dismiss="modal">关闭</button>
                                <button @click='updateNumSub' type="button" class="btn btn-primary btn-lg"
                                    >提交</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            
            <div class="modal fade" id="add-info" tabindex="-1" role="dialog"
                aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true" data-backdrop="static">&times;</button>
                            <h3 class="modal-title" id="myModalLabel"
                                style="font-weight: bolder;">添加料架</h3>
                        </div>
                        <form class="form-horizontal" role="form" id="category_add"
                            action="${ctx}/countmachine/addAction/${groups}" method="post">
                            <input type="hidden" id="addRawPackage" name="Ids">
                            <div class="modal-body">
                                <div class="form-group">
                                    <h4>
                                        <label class="col-sm-3 control-label no-padding-right"
                                            style="font-weight: bolder;">料架号 </label>
                                    </h4>
 
                                    <div class="col-sm-9">
                                        <input v-model="updateRack.inRack" type="text" 
                                                style="width: 250px; height: 35px; font-size: 20px"
                                                readonly="readonly">
                                            <div class="btn-group" style="margin-top: -10px">
                                                <button class="btn btn-primary dropdown-toggle"
                                                    data-toggle="dropdown">
                                                    选择&nbsp;<span class="caret"></span>
                                                </button>
                                                <ul class="dropdown-menu"
                                                    style="height: 320px; overflow: auto;">
                                                        <li v-for='rack in racks' style="font-size: 20px"><a href="#"
                                                        onclick="app.$data.updateRack.inRack=$(this).text()">{{rack[0]}}</a></li>
                                                    
                                                </ul>
                                            </div>
                                    </div>
                                </div>
    
 
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default btn-lg"
                                    data-dismiss="modal">关闭</button>
                                <button @click="addLoadSub" type="button" class="btn btn-primary btn-lg"
                                    id="addbtnsubmit">提交</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
   
    </section>
    </div>
    <!-- /.content -->
  </div>
</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:[],
          racks:[],
           updateNums:{
               id:"",
               num:""
           },
           updateRack:{
               inGroup:<%= request.getParameter("id") %>,
               inId:"",
               inRack:""
           }
      },
      methods:{
          updateNum:function(id){
              this.updateNums.id=id;
              $("#modify-info").modal('show');
          },
          updateNumSub:function(){
              if(!confirm('确认修改数量')){
                return
              }
             let sql="{call AXJ_xiapianguanli_xiapianweixinxi_updateNum(?,?,?)}~"+JSON.stringify(this.updateNums);
            this.connects("下片位详情更新数量",sql,1,1);
          },
         clearMeg:function(id){
             if(!confirm('确认清除消息')){
                    return
                  }
             let canshu = {
                dropID:id
             }
             let sql="{call AXJ_xiapianguanli_xiapianweixinxi_claerMsg(?,?)}~"+JSON.stringify(canshu);
             this.connects("下片位详情清除消息",sql,1,1);
         },
         addLoad:function(id){
             $("#add-info").modal('show');
             this.updateRack.inId=id;
             
             
         },
         addLoadSub:function(){
             const inRack=this.updateRack.inRack;
             if(inRack.trim()==""){
                 alert('请先选择架号')
                 return false
             }
             if(!confirm("确认为"+this.updateRack.inId+"的下片位添加"+this.updateRack.inRack+"架号")){
                 return false
             }
             
             let sql="{call AXJ_xiapianguanli_xiapianweixinxi_addRackMsg(?,?,?,?)}~"+JSON.stringify(this.updateRack);
             this.connects("下片位详情绑定架子",sql,1,1);
         },
         updateDropState:function(id){
             if(!confirm("确认添加架子")){
                 return false
             }
             let canshu={
                     dropId:id
             }
             let sql="{call AXJ_xiapianguanli_xiapianweixinxi_addRack(?,?)}~"+JSON.stringify(canshu);
             this.connects("下片位详情添加架子",sql,1,1);
         }
      },
      mounted:function(){
         let canshu={
             line:<%= request.getParameter("id") %>,
         }
         let sql="{call AXJ_xiapianguanli_xiapianweixinxi_chaxun(?,?)}~"+JSON.stringify(canshu);
         let flag=2;
         loadAjxs('下片任务队列查询',sql,flag,"shuzu");
         sql="{call AXJ_xiapianguanli_xiapianweixinxi_dropList_chaxun(?,?)}~"+JSON.stringify(canshu);
         loadAjxs('下片任务队列架子查询',sql,flag,"racks");
      }
})
</script>
</html>