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
<%@page import="ng.db.DBHelper"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!-- 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 rel="stylesheet" href="..//static/AdminLTE/bower_components/bootstrap/dist/css/bootstrap.min.css">
<link href="../static/bootstrap/2.3.2/css/bootstrap.min.css" type="text/css" rel="stylesheet"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>仓储任务信息</title>
<!-- jQuery 3 -->
<script src="../js/jquery-3.4.1.min.js"></script>
<!-- Bootstrap 3.3.7 -->
 
<!-- DataTables -->
<!-- SlimScroll -->
<!-- FastClick -->
 <script type="text/javascript">
    /* var interval = setInterval('refreshStatus()', 5000);
    $(document).ready(function(){
        var info = $("#info").attr("info");
        $("#infos").html(info);
}); */
    // 设备页面自动刷新
    /* function refreshStatus() {
        window.location.reload();
    } */
    
    // 停止页面自动刷新
    function disableAutoRefresh() {
        clearInterval(interval);
    }
    
    
/*     function delAll(type){
        var checkboxs=document.getElementsByName('id');
          for(var i=0;i<checkboxs.length;i++){
          var checkbox=checkboxs[i];
          if(checkbox.checked){               
            var RowHtml=checkbox.parentNode.parentNode;
            var taskid=RowHtml.getElementsByClassName("rankid")[0].innerHTML;
              
                $.ajax({
                  cache:false,
                  type:"POST",
                  dataType : "json", 
                   url:"${ctx}/shelfmanager/updateshelftask",
                   data:{
                       "taskid":taskid,
                       "type":type
                   },success:function(data){ 
                       window.location.href="${ctx}/shelfmanager/shelftask";
                  }
              }); 
          }         
      } 
    } */
    </script>
</head>
 
<body style="background-color:#D5EAFF;height:100%">
    <!-- Content Wrapper. Contains page content -->
    <div class="" id='app' style='background-color:#D5EAFF;height:100%'>
        <!-- Content Header (Page header) -->
        <section class="content-header">
        <h1>
            仓储任务 <small>详情</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="../shelfmanager/taskimport"><i
                    class="fa fa-reply"></i>仓储任务</a></li>
            <li class="active">详情</li>
        </ol>
        </section>
        <div id = "allstatu" ></div>
           <div id = "info" ></div>
        <div>
 
            <!-- Main content -->
            <section class="content container-fluid">
            <div class="box box-default" style="background-color:#D5EAFF;">
                <div class="box-header with-border">
                    <h3 class="box-title">仓储</h3>
                <span :class="classname">{{connect[0]['0_connect_state']}}</span> 
                </div>
                <!-- /.box-header -->
                <button type="button" @click="delAll('重新开始')" class="btn btn-primary ">重新开始</button>
                <button type="button" @click="delAll('完成')" class="btn btn-primary ">任务完成</button>
                <button type="button" @click="delAll('删除')" class="btn btn-primary ">删除任务</button>
                <div class="box-body" style="height:365px;overflow-y:auto;">
                    <table class="table table-striped table-hover"
                    style="font-size: 18px;" id="example2">
                    <thead>
                        <tr>
                            <th>选择</th>
                            <th>任务编号</th>
                            <th>任务描述</th>
                            <th>任务状态</th>
                            <th>玻璃厚度</th>
                            <th>玻璃膜系</th>
                            <th>创建时间</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="items in shuzu">
                            <td><input v-model="shelftaskids" type='checkbox'  :value="items['0_id']"/></td>
                            <td>{{items['0_id']}}</td>
                             <td>{{items['1_task_type']}}</td> 
                            <td>{{items['2_task_state']}}</td>
                            <td>{{items['8_raw_thickness']}}</td>
                            <td>{{items['9_color']}}</td>
                            <td>{{items['6_start_time']}}</td> 
                        </tr> 
                    </tbody>
                </table>
             </div>
             </div>
                </section>
            </div>
            <div class="callout callout-warning" style="background-color:#D5EAFF !important; border-left:0px">
            <div style='text-align: center;color:red;font-size:30px;border-left:0;'>${lackGlassHtml}</div>
                <h4 style="color: black;">故障操作</h4>
                <p style="color: black;">当小车发生故障时,导致我们的任务没有完成就失败了。小车回零点,这样我们的任务就会一直堵在刚才的那个任务,完成与否我们都不清楚,需要去手动解决,任务完成的话,点击任务完成按钮,没有完成点击重新开始按钮</p>
                <br>
                <div style='text-align: center;'>
                    <!-- <span style='font-size: 30px;color: black;'>
                      当前任务:{{shuzu[1]["3"]!="正在工作"?"无":shuzu[1]["2"].replace("到","【"+shuzu[1][4]+"】到【")+shuzu[1][5]+"】"  }}
                </span>
                <br> 
                    
                    
                
                </div>
            </div>
            
        </div>
        <!-- /.content -->
    <!-- /.content-wrapper -->
    <!-- page script -->
 
<script src="../js/main.js"></script>
<script
    src="../static/AdminLTE/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
 
<script>
 let app = new Vue({
      el:'#app',
      mixins:[mixin],
      data:{
          shuzu:[],
          connect:"",
          shelftaskids:[],
          classname:''
      },
      methods:{
          delAll:function(types){
              console.log(this);
             if(this.shelftaskids.length<1){
                 alert("请至少选择一条!");
                 return false;
             }
             let sql="";
             for(let taskid of this.shelftaskids){
                 sql="{call AXJ_liaojiaguanli_cangchurenwu_dianji(?,?,?)}~"+"{'taskid':'"+taskid+"','type':'"+types+"'}";
                 this.connects(types,sql,2,1);
             }
          }
      },
      watch:{
          shuzu(newVal){
                for(let i=0;i<newVal.length;i++){
                    switch (newVal[i]['1_task_type']) {
                        case "从仓位到上片位": 
                            newVal[i]['1_task_type']="从【"+newVal[i]['3_shelf_rack']+"】仓位到【"+newVal[i]['4_load_rack']+"】上片位";
                            break;
                        case "从上片位到仓位":
                            newVal[i]['1_task_type']="从【"+newVal[i]['4_load_rack']+"】上片位到【"+newVal[i]['3_shelf_rack']+"】仓位";
                            break;
 
                        case "从仓位到吊装位":
                            newVal[i]['1_task_type']="从【"+newVal[i]['3_shelf_rack']+"】仓位到【"+newVal[i]['4_load_rack']+"】吊装位";
                            break;
                        case "从吊装位到仓位":
                            newVal[i]['1_task_type']="从【"+newVal[i]['4_load_rack']+"】吊装位到【"+newVal[i]['3_shelf_rack']+"】仓位";
                            break;
                    
                        default:
                            break;
                    }
                }
          }
      },
     async mounted(){
         let sql="{call AXJ_liaojiaguanli_cangchurenwuxiangxi(?)}";
         let flag=2;
         this.loadAjxss('仓储任务上面查询',sql,flag,"shuzu");
          sql="{call AXJ_liaojiaguanli_cangchurenwu_lianjie(?)}";
         await this.loadAjxss('仓储任务连接',sql,flag,"connect");
         this.classname=this.connect[0]['1_classname']
      }
 
})
 
</script>
</body>
</html>