严智鑫
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
158
159
160
161
162
163
164
165
166
167
168
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page import="com.northglass.service.device.DeviceService" %>
 
<c:set var="ctx" value="${pageContext.request.contextPath}" />
 
<html>
 
<head>
<title>设备管理</title>
<style>
.example-modal .modal {
    position: relative;
    top: auto;
    bottom: auto;
    right: auto;
    left: auto;
    display: block;
    z-index: -1;
}
 
.example-modal .modal {
    background: transparent !important;
}
</style>
<link type="text/css" rel="stylesheet"
    href="${pageContext.request.contextPath}/static/css/dataTables.bootstrap.css" />
<link type="text/css" rel="stylesheet"
    href="${pageContext.request.contextPath}/static/css/dataTables.tableTools.css" />
 
<script type="text/javascript"
    src="${pageContext.request.contextPath}/static/js/jquery.min.js"></script>
<script type="text/javascript"
    src="${pageContext.request.contextPath}/static/js/jquery.dataTables.min.js"></script>
<script type="text/javascript"
    src="${pageContext.request.contextPath}/static/js/dataTables.bootstrap.js"></script>
<script type="text/javascript"
    src="${pageContext.request.contextPath}/static/js/dataTables.tableTools.js"></script>
<script type="text/javascript"
    src="${pageContext.request.contextPath}/static/js/moment.js"></script>
<script type="text/javascript"
    src="${pageContext.request.contextPath}/static/js/sucaijiayuan.js"></script>
<script type="text/javascript"
    src="${pageContext.request.contextPath}/static/laydate/laydate.js"></script>
<script type="text/javascript" src="${ctx}/static/util/utilAlert.js"></script>
<script type="text/javascript">
    function switchLanguage(language) {
        $.ajax({
              url:"${ctx}/shelfmanager/languageSwitch?language="+language,
             async:true,
             type:"GET",
             dataType:"json",
             cache:false, 
             success: function(data){
                 window.location.reload();
             },
             error:function(data){
                 alert("语言切换失败:" + res);
             }
        });
    }
</script>
</head>
 
<body>
    <div class="content-wrapper">
        <!-- 加载对应的资源文件 -->
        <fmt:setBundle basename="<%= DeviceService.language %>" var="mesI18n" />
 
        <!-- 语言切换链接(改为JS触发,而非直接跳转) -->
        <a href="javascript:switchLanguage('messages_zh_CN')">中文</a> | 
        <a href="javascript:switchLanguage('messages_vi_VN')">Tiếng Việt</a>
        
        <div>
            <section class="content-header">
                <h1>
                    <fmt:message key="glassColorInformation" bundle="${mesI18n}"/>
                </h1>
                <ol class="breadcrumb">
                    <li><a href="#"><i class="fa fa-reply"></i>
                    <fmt:message key="glassColorInformation" bundle="${mesI18n}"/></a></li>
                    <li class="active"></li>
                </ol>
            </section>
        </div>
        <div>
            <!-- Main content -->
            <section class="content container-fluid">
                <div class="box box-info" style='width: 50%;'>
                    <div class="box-header with-border">
                        <h3 class="box-title">
                            <fmt:message key="glassColorInformation" bundle="${mesI18n}"/>
                        </h3>
 
                        <div class="box-tools pull-right"></div>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <div class="table-responsive">
                            <table class="table no-margin">
                                <thead>
                                    <tr>
                                        <th><fmt:message key="serialNumber" bundle="${mesI18n}"/></th>
                                        <th><fmt:message key="color" bundle="${mesI18n}"/></th>
                                        <th><fmt:message key="operation" bundle="${mesI18n}"/></th>
                                    </tr>
                                </thead>
                                <tbody>${colorHtml}
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="box-footer clearfix">
                        <button type="button" class="btn btn-default" data-toggle="modal"
                            data-target="#modal-default"><fmt:message key="addColor" bundle="${mesI18n}"/></button>
                    </div>
                    <!-- /.box-footer -->
                </div>
                <div class="modal fade" id="modal-default" tabindex="-1"
                role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
                    style="display: none; ">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal"
                                    aria-label="Close">
                                    <span aria-hidden="true">X</span>
                                </button>
                                <h4 class="modal-title"><fmt:message key="addColor" bundle="${mesI18n}"/></h4>
                            </div>
                            <form action="${ctx}/device/addcolor" method="post"
                                class="form-horizontal" id="inputForm">
                                <div class="control-group" style="margin-top: 10px;margin-left:50px;">
                                    <label class="control-label" for="numberInput">
                                    <fmt:message key="color" bundle="${mesI18n}"/>: &nbsp;&nbsp;&nbsp;</label>
                                    <span class="controls">
                                        <input type="text" id="numberInput" name="glassId"
                                            placeholder='<fmt:message key="color" bundle="${mesI18n}"/>'>
                                    </span>
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default pull-left"
                                        data-dismiss="modal"><fmt:message key="cancel" bundle="${mesI18n}"/></button>
                                    <button type="submit" class="btn btn-primary"><fmt:message key="save" bundle="${mesI18n}"/></button>
                                </div>
                            </form>
                        </div>
                        <!-- /.modal-content -->
                    </div>
                    <!-- /.modal-dialog -->
                </div>
            </section>
        </div>
    </div>
    <%--  <script src="${ctx}/static/AdminLTE/bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="${ctx}/static/AdminLTE/bower_components/bootstrap/dist/js/bootstrap.min.js"></script> --%>
    <!-- FastClick -->
    <%-- <script
        src="${ctx}/static/AdminLTE/bower_components/fastclick/lib/fastclick.js"></script> --%>
    <!-- AdminLTE App -->
    <script src="${ctx}/static/AdminLTE/dist/js/adminlte.min.js"></script>
    <!-- AdminLTE for demo purposes -->
    <script src="${ctx}/static/AdminLTE/dist/js/demo.js"></script>
</body>
</html>