严智鑫
2024-05-13 cedce4883f0d204f5bf7bf87c0bf4858dabb0c23
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
<%@ 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/styles/default.css" type="text/css" rel="stylesheet" />
 
<script src="${ctx}/static/jquery/jquery-3.1.0.min.js" type="text/javascript"></script>
<script src="${ctx}/static/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" type="text/javascript"></script>
<script src="${ctx}/static/holder.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript" src="${ctx}/static/util.js"></script>  
<title>单机</title>
<script type="text/javascript">
$(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 modifyload(loadMachineRackId) {
    $("#modify-info").modal('show');
    $("#midifyRawPackage").val(loadMachineRackId);
}
    function checkData(){
        var shelfid = document.getElementById("fromShelfId").value;
        var rankid = document.getElementById("toRankId").value;
        
        if(shelfid=="" || shelfid==null || rankid=="" || rankid==null){
            $.MsgBox.Alert("WARM PROMPT", "库位号和上片位号不能为空!");
            return false;
        }else{
            $.ajax({ 
                async: false, 
            
                type:"POST", 
 
                 url:"${ctx}/shelfmanager/addtask?shelfid=" + shelfid
                + "&rankid=" + rankid,/* "${ctx}/standalonemanage/loadranktaskcheck2?shelfid="+shelfid+"&rankid="+rankid, */ 
 
                dataType:"text", 
 
                success:function(data){
                    if(data=="errStartPosition"){
                        $.MsgBox.Alert("WARM PROMPT", "起始位错误!");
                        return false;
                    }else if(data=="errEndPosition"){
                        $.MsgBox.Alert("WARM PROMPT", "到达位错误!");
                        return false;
                    }else if(data=="ok"){
                        window.location.href = "${ctx}/standalonemanage/intopage2";
                        /* window.location.href="${ctx}/standalonemanage/createloadtask2?shelfid="+shelfid+"&rankid="+rankid; */
                    }else{
                        $.MsgBox.Alert("WARM PROMPT", data);
                        return false;
                    }
                    
                },
                error: function (XMLHttpRequest,textStatus,errorThrown) {
                    /* alert(XMLHttpRequest.status);
                    alert(XMLHttpRequest.readyState);
                    alert(textStatus); */
                    alert("解析出现问题!")
                },
            });
            
        }
        
    }
    
    
    function checkleftpieces(loadMachineRackId){
        var leftpieces = document.getElementById("leftpieces").value;
        var  id= loadMachineRackId;
        alert("leftpieces"+leftpieces);
        alert("id"+id);
        if(leftpieces==null || ""==leftpieces){
            $.MsgBox.Alert("WARM PROMPT", "请输入当前退库料架上原片数量!");
            return false;
        }else{
            window.location.href="${ctx}/standalonemanage/exitshelf2?rankid="+id+"&leftpieces="+leftpieces;
        }
        
    }
    
    
    function endSingleMachine(){
         $('#deleteConfirm').modal('toggle');
         $('#deleteConfirmForm').attr('action', '${ctx}/standalonemanage/endSingleMachine2');
         $('#deleteConfirmInput').attr('name', 'prodLine');
         $('#deleteConfirmInput').attr('value', '2');
    }
</script>
</head>
 
<body>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div>
        <section class="content-header">
        </section>
    </div>
    <div>
    <!-- Main content -->
    <section class="content container-fluid">
    <div class="box" style="margin-top: 20px;">
         <div style="overflow: auto;height:100%;" class="box-body no-padding">
        <table class="table table-striped" style="font-size: medium; width: 100%; " id="table">
        <tr>
            <td style="width: 50%; border: 1px solid white; vertical-align: top;">
            <div>
                <fieldset>
                <legend>&nbsp;&nbsp;<span class="glyphicon glyphicon-list"></span>&nbsp;&nbsp;筛选条件</legend>
                    <div style="margin-left: 10px;">
                    <form action="${ctx }/standalonemanage/getpagebycondition2" method="get" >
                        <table style="font-weight: bolder; height: 250px;">
                        <tr>
                            <td>玻璃ID:</td><td><input type="text" id="glassid" name="glassid" placeholder="Input glassId"/></td>
                        </tr>
                        <tr>
                            <td>宽度:</td><td><input type="text" id="width" name="width" placeholder="输入宽度" onkeyup="if(isNaN(this.value)){alert('illegal character!');this.value='';}"/></td>
                        </tr>
                        <tr>
                            <td>高度:</td><td><input type="text" id="height" name="height" placeholder="输入高度" onkeyup="if(isNaN(this.value)){alert('illegal character!');this.value='';}"/></td>
                        </tr>
                        <tr>
                            <td>厚度:</td><td><input type="text" id="thickness" name="thickness" placeholder="输入厚度" onkeyup="if(isNaN(this.value)){alert('illegal character!');this.value='';}"/></td>
                        </tr>
                        <tr>
                            <td>颜色:</td><td><input type="text" id="color" name="color" placeholder="输入颜色"/></td>
                        </tr>
                        <tr>
                        <td><input type="submit" value="查询"/></td>
                        </tr>
                        </table>
                        </form>
                        </div>
                        </fieldset>
            </div>
            <fieldset>
                <legend>&nbsp;&nbsp;<span class="glyphicon glyphicon-list"></span>&nbsp;&nbsp;料架信息</legend>
                    <div style="width: 100%;overflow: auto; height: 210px;">
                         ${shelfRanksHtml}
                    </div>
            </fieldset>        
            </td>
            
            <td style="width: 50%; border: 1px solid white; vertical-align: top;">
            <fieldset>
                <legend>&nbsp;&nbsp;<span class="glyphicon glyphicon-list"></span>&nbsp;&nbsp;上片位状态</legend>
                <table class="table table-striped table-hover" style="height: 113px;">
                    <thead><tr><th width="20%">上片位</th><th width="60%">上片位信息</th></tr></thead>
                    <tbody>${loadMachineHtml}</tbody>
                </table>
            </fieldset>
            <br><br><br><br><br><br><br>
                <fieldset>
                <legend>&nbsp;&nbsp;<span class="glyphicon glyphicon-list"></span>&nbsp;&nbsp;创建任务</legend>
                    <div style="overflow: auto; height: 200px;">
                        <form action="#">
                            <table style="font-weight: bolder; margin-left: 10px; ">
                                <tr style="height: 30px;">
                                    <td>
                                        起始位:<input type="text" id="fromShelfId" name="fromShelfId" placeholder="输入仓位号"
                                        onkeyup="if(isNaN(this.value)){alert('illegal character!');this.value='';}">
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        到达位:<input type="text" id="toRankId" name="toRankId" placeholder="选择上片位"
                                        readonly="readonly">
                                    </td>
                                    <td>
                                        <div class="btn-group">
                                              <button class="btn dropdown-toggle" data-toggle="dropdown">选择&nbsp;<span class="caret"></span></button>
                                               <ul class="dropdown-menu">
                                                   <li><a href="#" onclick="$('#toRankId').val('103')">103</a></li>
                                                   <li><a href="#" onclick="$('#toRankId').val('104')">104</a></li>
                                              </ul>
                                         </div>
                                      </td>
                                </tr>
                            </table>
                        </form>
                    </div>
                </fieldset>
                <br>
                    <div style="overflow: auto;margin-right: 60px; margin-bottom: 10px;" align="right">
                    <input type="button" value="创建任务" onclick="checkData()" class="btn btn-info"/>
                    <input type="button" value="结束单机模式" onclick="endSingleMachine()" class="btn btn-danger"/>
                    </div>
            </td>
        </tr>
    </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}/shelfmanager/modifyAction2" 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 type="text" class=" sortNumber form-control"
                                                value="${addrawPackage.pieces}" name="pieces" id="pieces"
                                                onclick="this.value=''"
                                                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 type="submit" class="btn btn-primary btn-lg"
                                        id="addbtnsubmit">提交</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
    <div id="deleteConfirm" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="height: 190px;">
        <form id="deleteConfirmForm" method="get">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 style="color: white;" id="myModalLabel">确定退出单机模式?</h3>
            </div>
            <div class="modal-body">
                <input type="hidden" id="deleteConfirmInput">
            </div>
            <div class="modal-footer">
                <button type="submit" class="btn btn-primary">确定</button>
                <button type="button" class="btn" data-dismiss="modal">关闭</button>
            </div>
        </form>
    </div>
     </section>
    </div>
    <!-- /.content -->
  </div>
</body>
</html>