严智鑫
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
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript"
    src="${ctx}/static/jquery/jquery-3.1.0.min.js"></script>
<%-- <script language="javascript" type="text/javascript"
    src="${ctx}/static/util/util.js"></script> --%>
 
<script type="text/javascript">
    var interval = setInterval('refreshStatus()', 10000);
    $(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 refreshStatus() {
        window.location.reload();
    }
 
    // 停止页面自动刷新
    function disableAutoRefresh() {
        clearInterval(interval);
    }
 
    function commit() {
        var $pieces = $("#keywords").val();
        if ($pieces.trim() == "") {
            return "";
        }
        //发送ajax请求
        $
                .ajax({
                    url : "${pageContext.request.contextPath}/shelfmanager/pieces?ajax=true&pieces="
                            + $pieces,
                    success : function(data) {
                        if (data.trim() == "success") {
                            $("#keywords").css("color", "red");
                            window.location.replace("${pageContext.request.contextPath}/shelfmanager/hmi")
                        }
                    }
                })
 
    }
</script>
<style type="text/css">
#keywords {
    border: 1px solid black;
    width: 150px;
    font-size: 20px;
}
 
#blockdiv {
    width: 700px;
    font-size: 35px;
    background: rgba(0, 0, 0, 0);
    text-align: center;
    position: absolute;
    left: 40%;
    top: 25%;
    margin-left: -100px;
    margin-top: -100px;
}
</style>
</head>
<body style="padding: 40px">
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
        <h1>
            人机界面 <small>操作显示</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="${ctx }/shelfmanager/hmi"><i
                    class="fa fa-reply"></i>人机界面</a></li>
            <li class="active"></li>
        </ol>
        </section>
        <!-- Main content -->
        <section class="content container-fluid">
        <div id = "allstatu" allstatu = "${allstatu}"></div>
           <div id = "info" info = "${info}"></div>
        <div class="blockdiv" id="blockdiv" align="center">
            <div class="panel-heading">吊装详情</div>
            <table class="table table-bordered table-condensed">
                <tbody>
                    <tr>
                        <td>起始位置</td>
                        <td style="color: #f00;">${shelfTask.shelfHoist.number}</td>
                    </tr>
                    <tr>
                        <td>到达位置</td>
                        <td style="color: #f00;">${shelfTask.shelfRank.id}</td>
                    </tr>
                    <tr>
                        <td>玻璃ID</td>
                        <td style="color: #f00;">${rawPackage.glassId}</td>
                    </tr>
                    <tr>
                        <td>长度</td>
                        <td style="color: #f00;">${rawPackage.width}</td>
                    </tr>
                    <tr>
                        <td>宽度</td>
                        <td style="color: #f00;">${rawPackage.height}</td>
                    </tr>
                    <tr>
                        <td>厚度</td>
                        <td style="color: #f00;">${rawPackage.thickness}</td>
                    </tr>
                    <tr>
                        <td>膜系</td>
                        <td style="color: #f00;">${rawPackage.color}</td>
                    </tr>
                    <tr>
                        <td>数量</td>
                        <td style="color: #f00;">${rawPackage.pieces}</td>
                    </tr>
                    <c:choose>
                        <c:when test="${isok}">
                            <tr>
                                <td>实际数量</td>
                                <td id="sta">${rawPackage.leftPieces}</td>
                            </tr>
                        </c:when>
                        <c:otherwise>
                            <tr>
                                <td>实际数量</td>
                                <td id="sta"><input type="text" name="keywords"
                                    id="keywords" style="width: 150px" onclick="this.value=''"></td>
                            </tr>
                            <tr>
                                <td>确认按钮</td>
                                <td id="sta"><button class="btn btn-primary btn-lg"
                                        id="comm" onclick="commit()">确认</button></td>
                            </tr>
                        </c:otherwise>
                    </c:choose>
 
                </tbody>
            </table>
        </div>
        </section>
    </div>
    <!-- /.content -->
    <!-- /.content-wrapper -->
</body>
</html>