fs-danaus
2022-03-26 59226b7f7f2986501b3dc3efcf9c646bb0e64ff3
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
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@page import="com.yc.service.personalized.CustomHomeGroupIfc" %>
<%@page import="com.yc.factory.FactoryBean" %>
<%@page import="com.yc.service.personalized.CustomHomePanelPositionIfc" %>
<%@page import="java.util.List" %>
<%@page import="java.util.Map" %>
<%@page import="com.yc.utils.SessionKey" %>
<%@page import="java.util.Random" %>
<%@page import="com.yc.service.userconfig.SysUserMenuConfigIfc" %>
<%@page import="com.yc.service.impl.DBHelper" %>
<%@page import="com.yc.service.demo.DemoIfc" %>
<%@page import="com.yc.multiData.SpObserver" %>
<%@page import="com.yc.sdk.weixincp.util.RandomString" %>
<%@page import="com.yc.sdk.shopping.util.SettingKey" %>
<%@page import="com.yc.entity.DataSourceEntity" %>
<%@page import="com.yc.multiData.MultiDataSource" %>
<%@ page import="com.yc.MaintenanceFee.service.MaintainService" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page trimDirectiveWhitespaces="true" %>
<% String hostUrl = SettingKey.getHostUrl(request);
    Map<String, Map<String, Object>> perssion = (Map<String, Map<String, Object>>) session.getAttribute(SessionKey.PERSSION);
    String dbid = (String) session.getAttribute(SessionKey.DATA_BASE_ID);
    DataSourceEntity dataSourceEntity = MultiDataSource.getDataSourceMap(dbid);
    String isSuperUser = (String) session.getAttribute(SessionKey.SUPPER_USER);
    //--------------------菜单选项配置
    SysUserMenuConfigIfc mcf = (SysUserMenuConfigIfc) FactoryBean.getBean("SysUserMenuConfigImpl");
    MaintainService maintainService=(MaintainService) FactoryBean.getBean("maintainServiceImpl");
    Map<String, Object> menuConfigInfo = null;
    boolean hasMaintain=false;//是维护费提醒人员
    String userCode = (String) session.getAttribute(SessionKey.USERCODE);
    //系统过期剩余天数 xin 2022-2-11 17:53:30
    Integer expireDay=maintainService.getSystemExpireDay(dataSourceEntity.getExpiredDate());
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    String dayStr=(expireDay>0?sdf.format(dataSourceEntity.getExpiredDate()):null);
    String expireText="您好,您的系统将于<span style=\"color: #f35d22;\">"+expireDay+
            "</span>天后<span style=\"color: #f35d22\">("+dayStr+")</span>到期," +
            "到期后系统将停止使用,请及时续费!(如果已经续费请联系技术人员处理)";
    //-----------------系统过期剩余天数end------------
    try {
        SpObserver.setDBtoInstance("_" + dbid);//切换数据源
        menuConfigInfo = mcf.getMenuConfig((String) session.getAttribute(SessionKey.HRCODE));
        //这里获取当前用户是否为维护费提醒人员
        List<Map<String, Object>> maintainList = maintainService.selectMaintenanceFeeNotification(userCode);
        if (maintainList != null && maintainList.size() > 0) {
            hasMaintain = true;
        }
    } catch (Exception e) {
        e.printStackTrace();
        out.println(e.getCause() != null ? e.getCause().getMessage() : e.getMessage());
        return;
    } finally {
        SpObserver.setDBtoInstance();
    }
    int menuConfig = 158;//等于0表示默认都中(158)
    int menuFold = 0;
    if (menuConfigInfo.get("menuconfig") != null) {
        menuConfig = Integer.parseInt(menuConfigInfo.get("menuconfig").toString());
    }
    if (menuConfigInfo.get("navigationMenuIsFold") != null) {
        menuFold = Integer.parseInt(menuConfigInfo.get("navigationMenuIsFold").toString());
    }
    //--------------------菜单选项配置
    long rand = new Random().nextLong();
%>
<%!
    boolean checkBoxIsChecked(int config, int configValue) {
        if ((config & configValue) > 1) {
            return true;
        }
        return false;
    }
%>
<!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">
    <!--ie10,ie11不支持这样
    <meta http-equiv="X-UA-Compatible" content="IE=7">
    -->
    <title><%=SettingKey.getTitle(request)%> 主界面</title>
    <link rel="stylesheet" type="text/css"
          href="<%=hostUrl%>/style/iconfont/main.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/iconfont/main.css")%>">
    <link rel="stylesheet" type="text/css"
          href="<%=hostUrl%>/style/iconfont/iconfont.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/iconfont/iconfont.css")%>">
    <link rel="stylesheet" type="text/css"
          href="<%=hostUrl%>/style/icon.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/icon.css")%>">
    <link rel="stylesheet" type="text/css"
          href="<%=hostUrl%>/style/default/easyui.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/default/easyui.css")%>">
    <link rel="stylesheet" type="text/css"
          href="<%=hostUrl%>/shopping/view/javascript/toast/jquery.toast.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/shopping/view/javascript/toast/jquery.toast.css")%>">
    <link rel="stylesheet" type="text/css"
          href="<%=hostUrl%>/js/bootstrap-upload/css/rotationscaling.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/bootstrap-upload/css/rotationscaling.css")%>">
    <link rel="stylesheet" type="text/css"
          href="<%=hostUrl%>/js/bootstrap-upload/css/bootstrap.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/bootstrap-upload/css/bootstrap.css")%>">
    <link rel="stylesheet" type="text/css"
          href="<%=hostUrl%>/js/bootstrap-upload/css/fileinput.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/bootstrap-upload/css/fileinput.css")%>">
    <link href="<%=hostUrl%>/shopping/view/javascript/toastmessage/css/jquery.toastmessage.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/shopping/view/javascript/toastmessage/css/jquery.toastmessage.css")%>"
          type="text/css" rel="stylesheet"/>
    <link rel="stylesheet" href="<%=hostUrl%>/style/iconfont/tixingtb/iconfont.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/iconfont/tixingtb/iconfont.css")%>">
    <style type="text/css">
        body {
            overflow: hidden;
            font-family: 'Verdana', '宋体';
        }
 
        .hidden {
            display: none;
        }
 
        .layout-browser {
            height: 30px;
            border: 0px;
            border-bottom: 7px solid #DEEDF7;
            background: linear-gradient(to bottom, #7da0d0, #223e67 70%);
        <%--background:url('<%=hostUrl%>/style/default/images/layout-browser-hd-bg.gif') #7f99be repeat-x center 50%;--%> line-height: 30px;
            color: #fff;
            vertical-align: middle;
            overflow: hidden;
        }
 
        #home_north .l-btn-text {
            color: #EBEBEB;
        }
        .popover{
            position: fixed;
            color: black;
            font-size: 13px;
            /*left: 280.025px!important;*/
            left: 254px!important;
        }
        .popover-content{
            line-height: 20px;
        }
        .icon-tixing:hover{
            font-size: 16px;
            cursor: pointer;
            font-weight: bold;
        }
        .tixings{
            background: red;
            padding: 2px;
            background: red;
            padding: 0px;
            margin-top: -16px;
            font-weight: 100;
            margin-left: -12px;
        }
        .jq-toast-single{
            margin-top: 10px;
        }
    </style>
</head>
<body class="easyui-layout" fit="true" loadingMessage="loading......">
<div id="wd" class="easyui-window" title="Modal Window"
     maximizable="false" minimizable="false" closed="true" resizable="false" modal="true" iconCls="icon-save"
     style="width:500px;height:200px;padding:10px;display: none">请点击下载&nbsp;&nbsp;<span id='doa'></span>
</div>
<div id="picDiv" class="easyui-window" title="附件选项"
     maximizable="false" minimizable="false" closed="true" collapsible="false" resizable="false" modal="true"
     iconCls="icon-info"
     style="width:500px;height:200px;padding:10px;display: none">
    <iframe src="" id="picIframe" style="width:100%;height:100%;" frameborder="no"></iframe>
</div>
<div id="er_show" class="easyui-window" title="数据检查--请认真检查以下信息:" maximizable="false" minimizable="false" closed="true"
     resizable="false" modal="true" iconCls="icon-save"
     style="width:600px;height:380px;padding:5px;background: #fafafa;display: none;">
 
    <div style="padding:0px;background:#fff;border:1px solid #ccc;height:300px;overflow:auto;">
        <span id="err_mess"></span>
    </div>
    <div style="text-align:right;height:30px;line-height:30px;">
        <a id="er_queding" class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)"
           onclick="errShow.erClose('ok');">确定</a>
        <a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)"
           onclick="errShow.erClose('');">取消</a>
    </div>
 
</div>
<div id="w" class="easyui-window" title="文本信息" closed="true" modal="true" resizable="false" maximizable="false"
     iconCls="icon-save" style="width:500px;height:400px;padding:5px;background: #fafafa;display: none;">
 
    <div style="background:#fff;border:1px solid #ccc;">
        <textarea id="w_content" onkeyup="isChinese(this)" ; style="width: 465px;height: 315px;"></textarea>
        <input type="hidden" id="w_show_id" value=""/>
    </div>
    <div style="text-align:right;;line-height:30px;">
        <a class="easyui-linkbutton" id="w_show_ok" iconCls="icon-ok" href="javascript:void(0)"
           onclick="errShow.showOk()">确定</a>
        <a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" onclick="$('#w').window('close')">取消</a>
    </div>
 
</div>
<%--<!-- 格线上传控件 模态框(Modal) -->--%>
<%--<div class="modal fade" id="picModal" data-backdrop="true" role="dialog">  <!-- data-backdrop控制遮罩层黑影 -->--%>
<%--    <div class="modal-dialog modal-lg" role="document">--%>
<%--        <div class="modal-content">--%>
<%--            <div class="modal-header"> <!-- align="right" -->--%>
<%--                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&nbsp;&nbsp;X&nbsp;&nbsp;--%>
<%--                </button>--%>
<%--                <h4 class="modal-title" id="myModalLabel">附件信息</h4>--%>
<%--                <button type="button" class="btn btn-kv btn-default btn-outline-secondary" data-toggle="button"--%>
<%--                        aria-pressed="false" autocomplete="off">--%>
<%--                    <img src="/images/pictool/tright.gif" width="20" height="20" style="cursor:hand"--%>
<%--                         onClick="trighthome();" title="右旋转"></button>--%>
<%--                <button type="button" class="btn btn-kv btn-default btn-outline-secondary" data-toggle="button"--%>
<%--                        aria-pressed="false" autocomplete="off">--%>
<%--                    <img src="/images/pictool/tleft.gif" width="20" height="20" style="cursor:hand"--%>
<%--                         onClick="tlefthome();" title="左旋转"></button>--%>
<%--                <button type="button" class="btn btn-kv btn-default btn-outline-secondary" data-toggle="button"--%>
<%--                        aria-pressed="false" autocomplete="off">--%>
<%--                    <img src="/images/pictool/piczoom_in.gif" width="20" height="20" style="cursor:hand"--%>
<%--                         onClick="bigit();" title="放大"></button>--%>
<%--                <button type="button" class="btn btn-kv btn-default btn-outline-secondary" data-toggle="button"--%>
<%--                        aria-pressed="false" autocomplete="off">--%>
<%--                    <img src="/images/pictool/piczoom_out.gif" width="20" height="20" style="cursor:hand"--%>
<%--                         onClick="smallit();" title="缩小"></button>--%>
<%--            </div>--%>
<%--            <div class="modal-body" style="z-index:1;text-align: center;">--%>
<%--                <form enctype="multipart/form-data" id="uploadForm">--%>
<%--                    <input id="fileUpload_up" name="classFile" type="file" multiple class="file-loading">--%>
<%--                    <input id="fileUpload" name="fileUpload" value="" type="hidden"/>--%>
<%--                </form>--%>
<%--                <img id="bimg" onload="AutoSize(this,600,400)" alt="" src="" style="display:none;">--%>
<%--            </div>--%>
<%--        </div>--%>
<%--    </div>--%>
<%--</div>--%>
<div id="loading"
     style="position:fixed !important;position:absolute;top:0;left:0;height:100%; width:100%; z-index:999; background:#99BBE8 url(/style/icons/load.gif) no-repeat center center; font-size:14px;line-height:20px;filter: alpha(opacity=80);opacity:0.8;">
    <p id="loading-one"
       style="color:#fff;position:absolute; top:50%; left:50%; margin:20px 0 0 -50px; padding:3px 10px;">页面载入中....</p>
</div>
<div data-options="region:'north'" class="layout-browser" split="false" id="home_north">
              <span style="float: left;padding-left: 20px;font-weight: bold;font-size:14px;">
                    <input class="easyui-searchbox" data-options="prompt:'功能号/单号',searcher:openFormidButton"
                           style="width:130px;height:24px;"></input>&nbsp;
                    <a class="easyui-menubutton" id="shortcuts" menu="#shortcutsM" iconCls="icon-edit">快捷</a>
                    <a class="easyui-menubutton" id="homehelp" menu="#mm2" iconCls="icon-help">帮助</a>
                    <a  id="downloadAPP" style="cursor:pointer;padding-left: 15px;margin-left: 5px;" class="icon-applogo"><label style="cursor:pointer;font-size: 13px">下载APP</label></a>
                   <% if(expireDay>0){%>
                    <a  id="expireId" style="cursor:pointer;padding-left: 20px;margin-left: 5px;" class="icon-expire"><label style="cursor:pointer;font-size: 13px;color: white">系统<%=expireDay%>天后到期</label></a>
                   <%}%>
                  <span style="padding-left:20px;color: #EBEBEB">
                       <%
                           if ("1".equals(isSuperUser)) {
                       %>
                      <a style="cursor:pointer;padding-left: 20px" class="icon-cat"
                         onclick="window.open('/shopping/');">商城</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                  <%} else {%>
                        <a style="cursor:pointer;padding-left: 20px">&nbsp;&nbsp;</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
    <%}%>
    <a style="cursor:pointer"
       onclick="addTab('浏览器缓存','','','','/help/chrome.html','',{isFlowChart:true});">清除谷歌浏览器缓存步骤</a>
    <%
        if (dataSourceEntity.isShowAttendanceButton()) {
    %>
    <input type="button" value="考勤打卡" onclick="deskTopShow('考勤','/attend.do?m=load',550,400)" style="display:none;"/>
    <%
        }
    %>
    </span>
    <% String nickName = (session.getAttribute("NickName") == null ? "" : (String) session.getAttribute("NickName"));   //昵称
        String headimgurl = (session.getAttribute("headimgurl") == null ? "" : (String) session.getAttribute("headimgurl"));  //头像
        if (headimgurl != null && !"".equals(headimgurl) && nickName != null && !"".equals(nickName)) {
    %>
    <span style="float: left;padding-left: 30px;font-size:12px;">
                <%
                    if (headimgurl != null && !"".equals(headimgurl)) {
                        out.print("<a href=\"" + headimgurl + "\" target=\"_blank\"><img src=\"" + headimgurl + "\" width=\"24\" height=\"24\" style=\"padding-top: 2px;\"/></a>");
                    }
                    if (nickName != null && !"".equals(nickName)) {
                        out.print("<span style=\"padding-top: -2px;\">&nbsp;" + nickName.trim().replaceAll(" ", "") + "</span>");
                    }
                %></span>
    <% } %>
    <span style="float:left; padding-right:20px;color: red"
          id="liSpan"><%=com.yc.license.InitLicense.getInstance().getInfo()%></span>
 
 
    <span style="float:right; padding-right:20px;color: #EBEBEB">
        <%
            if(hasMaintain){
        %>
        <span id="mtixing" style="padding-right:10px;">
             <span class="iconfont icon-tixing" title="维护费通知">
                 <span class="badge tixings"></span>
                 <font style="font-size: 12px;margin-left: -3">维护费通知</font>
             </span>
        </span>
        <%}%>
        <span class="icon-logintime"
                      style="padding-left: 20px;margin-right: 10px;">登录时间:<%=session.getAttribute(SessionKey.LOGIN_TIME) %></span>
        <a class="icon-exit" style="padding-left: 20px; color: white" onclick="logout();" href="#">安全退出</a>
                 &nbsp;&nbsp;欢迎&nbsp;<a class="userwh"
                                       style="color: white;font-weight:900;"><%=session.getAttribute(SessionKey.USERNAME)%></a>
    </span>
</div>
<div data-options="region:'west',split:true" id="home_west"
     style="width:210px;padding1:1px;border:0px;overflow: hidden;">
    <div class="easyui-tabs" id="nagigation" fit="true" border="false">
        <%
            if (checkBoxIsChecked(2, menuConfig)) {//显示树菜单
        %>
        <div id="home" title="主菜单" style="padding:0px;">
            <ul id="homePageTree" style="padding-top:10px;padding-left:10px;padding-bottom: 20px">
            </ul>
        </div>
        <%
            }
        %>
        <div id="home2" title="常用" selected="true" fit="true" style="overflow: hidden;">
            <div class="easyui-accordion" style="width: auto;" fit="true" border="false">
                <%
                    if (checkBoxIsChecked(4, menuConfig)) {//小图标导航菜单
                %>
                <div id="divicon" title="图标菜单 " style="width:100%;height: 100%;overflow:auto">
                    <iframe id="iconMenu" name="iconMenu" src="/general/home/iconMenu.jsp" width="100%" height="100%"
                            scrolling="no" frameborder="0"></iframe>
                </div>
                <%
                    }
                %>
                <%
                    if (checkBoxIsChecked(8, menuConfig)) {//树菜单
                %>
                <div title="树菜单 " style="width:100%;height: 100%;">
                    <ul id="homePageTree2" style="padding-top:10px;padding-left:5px;">
                    </ul>
                </div>
                <%
                    }
                %>
                <%
                    if (checkBoxIsChecked(32, menuConfig)) {//流程图菜单
                %>
                <div title="流程图菜单" style="width:100%;height: 100%;overflow:auto" id="divl">
                    <iframe id="flowChartTree" name="recentlyBrowser" src="<%= hostUrl %>/mxgraph/TaskMenu.jsp"
                            width="100%" height="100%" frameborder="0"></iframe>
                </div>
                <% } %>
                <div title="最近浏览" style="width:100%;height: 100%;overflow: auto;" id="divn">
                    <iframe id="recentlyBrowser" name="recentlyBrowser"
                            src="<%= hostUrl %>/general/home/recentlyBrowser.jsp" width="100%" height="100%"
                            frameborder="0"></iframe>
                </div>
            </div>
        </div>
    </div>
</div>
<div data-options="region:'center'" id="home_center" style="overflow:hidden;">
    <div id="home-tabs" id="pages" class="easyui-tabs" data-options="fit:true" border="false">
        <%
            if (checkBoxIsChecked(64, menuConfig)) {//图标导航菜单
        %>
 
        <%
            if (checkBoxIsChecked(16, menuConfig)) {//图标导航菜单
        %>
        <div id="iconMenu_div" title="图标导航" style="padding:0px;">
            <iframe id="iconMenuCenter" onload="toScrollFrame('#iconMenuCenter', '#iconMenu_div');"
                    name="iconMenuCenter" src="/general/home/iconMenuCenter.jsp" width="100%" height="100%"
                    frameborder="0"></iframe>
        </div>
        <%
            }
        %>
        <div id="desktop_div" title="桌面" style="padding:0px;overflow: hidden;">
            <iframe id="desktopiframe" name="desktopiframe" src="/general/home/desktop.jsp" width="100%" height="100%"
                    frameborder="0"></iframe>
        </div>
 
        <% } else { %>
        <div id="desktop_div" title="桌面" style="padding:0px;overflow: hidden;">
            <iframe id="desktopiframe" name="desktopiframe" src="/general/home/desktop.jsp" width="100%" height="100%"
                    frameborder="0"></iframe>
        </div>
        <%
            if (checkBoxIsChecked(16, menuConfig)) {//图标导航菜单
        %>
        <div id="iconMenu_div" title="图标导航" style="padding:0px;">
            <iframe id="iconMenuCenter" name="iconMenuCenter" src="/general/home/iconMenuCenter.jsp" width="100%"
                    height="100%" frameborder="0" onload="toScrollFrame('#iconMenuCenter', '#iconMenu_div');"></iframe>
        </div>
        <%
                }
            }
        %>
        <% if (checkBoxIsChecked(256, menuConfig)) {//图标导航菜单%>
        <div id="fullcalend_div" title="日历管理" style="padding:0px;">
            <iframe id="iconMenuCenter" name="iconMenuCenter" src="/personalized/template/0/fullcalendarte.jsp"
                    width="100%" height="100%" frameborder="0"></iframe>
        </div>
        <% } %>
        <% //if (checkBoxIsChecked(512, menuConfig)) {//审批%>
        <div id="Approval_div" title="审批导航" style="padding:0px;">
            <iframe id="uui" name="uui" src="/general/home/ApprovalPage.jsp" width="100%" height="100%"
                    frameborder="0"></iframe>
        </div>
        <%// } %>
    </div>
</div>
<div id="shortcutsM" style="width:150px;" onclick="return false;">
    <div class="menu-sep" id="fromIdSP"></div>
    <div iconCls="icon-customizeDesktop">
        <span>桌面相关设置</span>
        <div style="width:150px;">
            <div iconCls="icon-customizeDesktop" onclick="deskTopShow('定制桌面','/general/personalized/manager/personnalized.jsp',550,400,function(obj){if(obj)$('#desktopiframe').attr('src',$('#desktopiframe').attr('src'));})">
                定制桌面
            </div>
            <div iconCls="icon-MenuDisplay"onclick="deskTopShow('菜单显示设置','/general/menuConfig.jsp',350,460)">菜单显示设置</div>
            <%
                /**********超级管理员显示桌面数据源列表start-jd65MRqYdG2ZjWn2bSytidmF-**************/
                if ("1".equals(isSuperUser)) {
            %>
            <div iconCls="icon-DesktopDataSource" onclick="deskTopShow('桌面数据源列表','/personalized/manager/desktopList.jsp',750,520,'',{modal:false})">
                桌面数据源列表
            </div>
            <%
                }
                /**********超级管理员显示桌面数据源列表end***********/
            %>
        </div>
    </div>
    <%
        String loginType = (String) session.getAttribute(SessionKey.LOGIN_TYPE);
        String isStopSystem = (String) session.getAttribute(SessionKey.isStopSystem);
        if ("0".equalsIgnoreCase(loginType)) {
    %>
    <div iconCls="icon-ChangePassword" onclick="addTab('',301114,22)">修改登录号密码</div>
    <%
 
        if (!"1".equals(isSuperUser) && perssion.get("9910") != null) {
    %>
    <div iconCls="icon-ActingReviewer" onclick="addTab('',9910,22)">设置代理审核人</div>
    <%
        }
    %>
    <%} else if ("1".equalsIgnoreCase(loginType)) { %>
    <div iconCls="icon-ChangePassword" onclick="addTab('',301114,22)">修改客户号密码</div>
    <%} else { //301135是以前修改工号对应的功能号,现在修改为301134 /demo/demoList.jsp%>
    <div iconCls="icon-ChangePassword" onclick="addTab('',301134,22)">修改工号密码</div>
    <%
        }
        if ("1".equals(isSuperUser)) {
    %>
    <div iconCls="icon-ActingReviewer" onclick="addTab('',9910,22)">设置代理审核人</div>
    <div iconCls="icon-userManagement">
        <span>用户管理设置</span>
        <div style="width:150px;">
            <div iconCls="icon-APPUserManagement" onclick="addTab('APP用户管理','','','','/general/staffManagement/index.jsp','','');">APP用户管理</div>
            <div iconCls="icon-SystemMessage"onclick="addTab('消息管理','','','','/public/staticform/9672/18/message.jsp','','');">系统消息管理</div>
        </div>
    </div>
    <div iconCls="icon-OnlineUser">
        <span>在线用户</span>
        <div style="width:150px;">
            <div iconCls="icon-OnlineUser" onclick="addTab('在线用户','','','','/general/userOnLineStatistic/onLineUser.jsp','',{isFlowChart:true});">
                在线用户
            </div>
            <div iconCls="icon-Numberofonlineusers" onclick="deskTopShow('onbus查询人数登录','/general/userOnLineStatistic/onBusLULogin.jsp',550,400,function(obj){if(obj)$('#desktopiframe').attr('src',$('#desktopiframe').attr('src'));})">
                系统在线人数
            </div>
        </div>
    </div>
    <div class="menu-sep" id="fromIdSP"></div>
    <div iconCls="icon-FlowChartDesign" onclick="window.open('/mxgraph/index.jsp');">流程图设计</div>
    <div iconCls="icon-FlowChartDesignMun" onclick="addTab('流程图菜单权限配置','','','','/mxgraph/flowChartPermit_userList.jsp','',{isFlowChart:true});">
        流程图菜单权限配置
    </div>
    <div iconCls="icon-WatermarkImage"  onclick="addTab('水印图片管理','','','','/general/imageWaterMarkManager.jsp','',{isFlowChart:true});">水印图片管理</div>
    <div class="menu-sep" id="fromIdSP"></div>
    <div iconCls="icon-DataSourceSettings" onclick="deskTopShow('数据源登录','/shujuLogin.jsp',550,400,function(obj){if(obj)$('#desktopiframe').attr('src',$('#desktopiframe').attr('src'));})">
        数据源设置
    </div>
    <!-- <div onclick="versionUpdate()"> 版本升级</div> -->
    <div iconCls="icon-VersionUpgrade" onclick="deskTopShow('版本升级','/versionUpdate/isupdate.jsp',550,520,'')">版本升级</div>
    <div iconCls="icon-GlobalSettings" onclick="addTab('全局配置','','','','/general/sysconfig.jsp','',{isFlowChart:true});">全局配置</div>
    <div class="menu-sep" id="fromIdSP"></div>
    <div iconCls="icon-logs">
        <span>日志</span>
        <div style="width:150px;">
            <div iconCls="icon-UserLoginLogs" onclick="addTab('',9798,18);">用户登录日志</div>
            <div iconCls="icon-SystemErrorLogs" onclick="addTab('',9793,18);">系统错误日志</div>
            <div iconCls="icon-ImportAndExportLogs" onclick="addTab('',9742,18);">导出导入日志</div>
            <div iconCls="icon-QueryAuditLogs" onclick="addTab('',9647,18);">查询审计日志</div>
            <div iconCls="icon-AttachmentDeleLogs" onclick="addTab('',9747,18);">附件删除日志</div>
            <div iconCls="icon-SlowQueryLogs" onclick="addTab('',9966,18);">慢查询日志</div>
        </div>
    </div>
    <div class="menu-sep" id="fromIdSP"></div>
    <div iconCls="icon-InversePolish" onclick="addTab('逆波兰式','','','','/general/rpn.jsp','',{isFlowChart:true});">转换逆波兰式</div>
    <div iconCls="icon-InstallationCertificate" onclick="window.open('/dibang/InstallDiBangCert.jsp');">安装证书</div>
    <div iconCls="icon-LogisticsTracking" onclick="addTab('物流跟踪','','','','/general/LogisticsTracking.jsp','',{isFlowChart:true});">物流跟踪</div>
    <div iconCls="icon-mailbox" onclick="addTab('邮箱主页','','','','/mail/index.jsp','','');">邮箱</div>
    <div iconCls="icon-ShoppingGuide" onclick="window.open('/shopping/');">导购</div>
    <div iconCls="icon-DeleteRecord" onclick="addTab('',9744,18);">删除记录回收站</div>
    <%} %>
    <%
        if (!"1".equals(isSuperUser) && perssion.get("9744") != null) {
    %>
    <div iconCls="icon-DeleteRecord" onclick="addTab('',9744,18);">删除记录回收站</div>
    <%
        }
    %>
    <% if ("1".equals(isSuperUser)||(isStopSystem != null && "1".equals(isStopSystem))) { %>
    <div class="menu-sep" id="fromIdSP"></div>
    <div iconCls="icon-StartStopSystem" onclick="addTab('启停系统','','','','/shopping/maintaince/maintaince.jsp','','');">启停系统</div>
    <% }
     if("1".equals(isSuperUser)){%>
    <div class="menu-sep" id="fromIdSP"></div>
    <div iconCls="icon-SendSystemMessages" onclick="addTab('发送系统级消息','','','','/shopping/maintaince/messagelist.jsp','','');">发送系统级消息</div>
    <div iconCls="icon-MaintenanceSystemConfiguration" onclick="addTab('维护系统配置','','','','/shopping/maintaince/systemconfig.jsp','','');">维护系统配置</div>
    <% } %>
    <div class="menu-sep" id="fromIdSP"></div>
    <div iconCls="icon-ClearBrowserCache" onclick="addTab('浏览器缓存','','','','/help/chrome.html','',{isFlowChart:true});">清除谷歌浏览器缓存</div>
    <div class="menu-sep" id="fromIdSP"></div>
    <div iconCls="icon-undo" onclick="location='/general/loginOut.jsp';">安全退出</div>
</div>
<div id="mm2" style="width:100px;">
    <div iconCls="icon-OperationManual" onclick="window.open('/help/help.html')">操作手册</div>
    <div iconCls="icon-ViewVersionUpdates" onclick="addTab('版本更新','','','','/general/home/version.jsp','','');">版本更新</div>
    <div iconCls="icon-help" onclick="addTab('关于巴士软件','','','','/general/about.jsp','','');">关于</div>
</div>
<div id="tabContextMenu" class="easyui-menu" style="width:150px;">
    <div id="tabclose">关闭</div>
    <div id="tabcloseall">全部关闭</div>
    <div id="tabcloseother">除此之外全部关闭</div>
    <div class="menu-sep"></div>
    <div id="tabcloseleft">当前页左侧全部关闭</div>
    <div id="tabcloseright">当前页右侧全部关闭</div>
</div>
<div class="help-container">
    <div class="help-icon-container animate">
    <span class="a">
      <i class="iconfont icon-liaotian1" style="font-size: 40px;"></i>
    </span>
    </div>
    <div class="ai-container">
 
        <header>
            <h3 class="h3">智能小助手</h3>
            <div class="header-content">
                <i class="iconfont icon-guanbi close-dialog"></i>
            </div>
        </header>
        <div class="ai-content">
            <ul class="msgs-ul">
                <li class="msgs-li">
                    <i class="iconfont icon-kefu1 avator"></i>
                    <div class="msg-content">
                        您是否遇到了页面排版错误,下拉菜单不显示等问题?
                        <div class="ui-btn-group">
                            <button id="repairLayout" class="ui-btn ui-btn-primary msg-li-btn">点我一键解决</button>
                        </div>
                        <div class="ui-btn-group">
                            <button id="reloadLayout" class="ui-btn ui-btn-primary msg-li-btn">还原表格布局</button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
</div>
<script type="text/javascript"
        src="<%=hostUrl%>/js/jquery-1.4.4.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/jquery-1.4.4.min.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/js/index/jquery.easyui.min-1.6.10.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/index/jquery.easyui.min-1.6.10.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/js/locale/easyui-lang-zh_CN.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/locale/easyui-lang-zh_CN.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/js/index/index.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/index/index.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/js/index/deskTop.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/index/deskTop.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/shopping/view/javascript/toast/jquery.toast.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/shopping/view/javascript/toast/jquery.toast.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/js/index/maintaince.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/index/maintaince.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/js/index/funcLink.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/index/funcLink.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/js/encode.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/encode.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/js/jquery.cookie.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/jquery.cookie.min.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/js/index/indexRefresh.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/index/indexRefresh.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/js/config/config.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/config/config.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/js/messageTip/jquery.messager.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/messageTip/jquery.messager.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/js/iscroll5.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/iscroll5.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/js/index/jQueryRotate.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/index/jQueryRotate.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/js/index/rotate.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/index/rotate.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/js/bootstrap-upload/js/fileinput.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/bootstrap-upload/js/fileinput.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/js/bootstrap-upload/js/locales/zh.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/bootstrap-upload/js/locales/zh.js")%>"></script>
<script type="text/javascript"
        src="<%=hostUrl%>/shopping/view/javascript/bootstrap/js/bootstrap.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/shopping/view/javascript/bootstrap/js/bootstrap.min.js")%>"></script>
<script src="<%=hostUrl%>/shopping/view/javascript/toastmessage/jquery.toastmessage.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/shopping/view/javascript/toastmessage/jquery.toastmessage.js")%>"
        type="text/javascript"></script>
<script src="<%=hostUrl %>/layui/layui.all.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/layui/layui.all.js")%>"
        type="text/javascript"></script>
<script src="<%=hostUrl%>/js/index/WebSocketMessage.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/index/WebSocketMessage.js")%>"
        type="text/javascript"></script>
<script type="text/javascript">
    var expireDate = new Date();
    expireDate.setTime(expireDate.getTime() + (100 * 60 * 60 * 1000));
    $.cookie("dbid", '<%=session.getAttribute(SessionKey.DATA_BASE_ID)%>', {expires: 7});
    $.cookie("dbstr", '<%=session.getAttribute(SessionKey.DATABASE_DIS)%>', {expires: 7});
    var parent_open = "true";
    hostUrlCopy = "<%=hostUrl%>/copyurl.do";
    <%//添加hostUrl属性是为了在单据里面赋值链接需要到----2018-9-4 17:50:10 xin%>
    var jsHRCode = "<%=session.getAttribute(SessionKey.HRCODE)%>";
    var userType = "<%=session.getAttribute(SessionKey.SUPPER_USER)%>";
    var spellPath = "/<%=session.getAttribute(SessionKey.DATA_BASE_ID)%>/<%=session.getAttribute(SessionKey.VERSION_ID)%>/<%=session.getAttribute(SessionKey.SYSTEM_LANGUAGE)%>/";
    var userCode = "<%=userCode%>";
    var menuConfig =<%=menuConfig%>;
    var tranOk = false;
    var maxl = 20;
    var isGridOpen=null;
    var errShow = {
        close: function (i) {
            $('#' + i).window('close');
        },
        open: function (i) {
            var $win;
            $win = $('#' + i).window({
                top: ($(window).height() - 350) * 0.5,
                left: ($(window).width() - 680) * 0.5,
                shadow: true,
                modal: true,
                iconCls: 'icon-info',
                closed: true,
                minimizable: false,
                maximizable: false,
                collapsible: false
            });
            $win.window('open');
            //    $('#'+i).window('open');
            $('#' + i).css("display", "block");
        },
        d: function (i) {
            return document.getElementById(i);
        },
        erClose: function (op) {
            if (op == 'ok') {
                this.frame.commitIs(tranOk, 1);
            }
            this.frame.btn_OK(op);
            this.close('er_show');
        },
        show_divErro: function (showIs, fl) {
            if (typeof (showIs) == "boolean") {
                this.frame.closeLoading();
                return;
            }
            tranOk = fl;
            this.frame.closeLoading();
            var s_ = showIs.split(";pb#");
            if (s_[0] == 1 || s_[0] == 0) {
                //解决执行取消确认,撤回,弹出数据范围检查窗口,点确认当前执行是哪一个操作的状态丢失,增加了从后台返回相关状态
                // by danaus 2021/5/27 16:48
                if(s_[2]!=undefined&&s_[2]!=""){
                    if(s_[2]=="canel"){
                        this.frame.mygrid.iscanelProc=true;
                    }else  if(s_[2]=="revoke"){
                        this.frame.mygrid.isrevokeProc=true;
                    }else  if(s_[2].indexOf("onlinePay")>-1){
                        //表示有在线支付的标记返回
                        //onlinePay==1,表示需要弹出二维码,由于弹出二维码需要重新调用一次保存save(2)且dcFlag=1(跳过数据范围检查)
                        tranOk=2;//表示保存操作
                    }
                }
                this.d('err_mess').innerHTML = s_[1];//s_[1];
                if (s_[0] == 1) {
                    $('#er_queding').css("display", "none");
                } else {
                    $('#er_queding').css("display", "inline-block");
                }
                this.open('er_show', 20, 30);
            } else {
                this.frame.commitIs(tranOk, 1);
                $('#er_queding').css("display", "inline-block");
                //if($('#er_queding').css("display")=="none"){
                //$('#er_queding').css("display","inline-block");
                //}
            }
        },
        show: function (id, max) {
            var isv = this.frame.getDoc(id + 'Text', '.value');
            maxl = max;
            this.d('w_content').value = this.frame.doc(id).value;
            this.d('w_show_id').value = id;
            this.d('w_show_ok').style.display = (isv == "1") ? "" : "none";
            this.open('w');
        }, showOk: function () {
            this.frame.doc(this.d('w_show_id').value).value = this.d('w_content').value;
            this.close('w');
        },
        photoshow: function (id, pant, obj) {
            // if (obj.type == 40) {   //判断如果是40,类型就显示查看图片
            //     if (!showModalImg(pant, 9,function(){
            //         showModal(id, pant);
            //         picevent('fileUpload', 'grid', obj);
            //     })) {
            //         return false;
            //     }
            // } else if (obj.type == 9 || obj.type == 19) {   //如果是9或19类型,就显示上传控件和功能键
            //         showModal(id, pant);
            //         picevent('fileUpload', 'grid', obj);
            // }
            // $('#picModal').modal('show');
            // $('#picModal').on('hidden.bs.modal', function () {
            //     //alert(mygrid);
            // })
            if(isGridOpen){
                return false;
            }
            gridFileInputRow=obj;
            gridFileInputVal=pant;
            isGridOpen=layui.layer.open({
                type: 2,
                area :['calc(100% - 260px)','calc(100% - 120px)'],
                offset: ['100px', '220px'],
                title: false,
                move:true,
                moveOut:true,
                content: '/general/gridFileInput.jsp',
                cancel :function(index, layero){
                    isGridOpen=null;
                    layui.layer.close(index);
                }
            });
        }
//                 showOk:function(){
//                      this.frame.doc(this.d('w_show_id').value).value=this.d('w_content').value;
//                      this.close('w');}
    };
    var dibangBug = {isBug: "1"};
    window.onunload = function ExecA() {
        try {//关闭端口
            if (ActiveXDrive) {
                if (dibangBug.isBug == "1") {
                    if (confirm("正要关闭地磅端口,是否继续?")) {
                        ActiveXDrive.CloseComm();
                    }
                } else {
                    ActiveXDrive.CloseComm();
                }
            }
        } catch (e) {
        }
    }
 
    //
    function setGridPic(val, obj) {
        if (val != "" && val != undefined) {
            var t = Grids[obj.id];
            t.SetValue(obj.row, obj.col, val, 0);
            t.RefreshCell(obj.row, obj.col);
        }
    }
 
    //控件长大限制 2014-7-31 16:12:46
    function isChinese(str) {
        while (str.value.replace(/[^\x00-\xff]/g, '**').length > maxl) str.value = str.value.slice(0, -1);
    }
 
    function checkBoxIsChecked(config, configValue) {
        if ((config & configValue) > 1) {
            return true;
        }
        return false;
    }
    $(function () {
        //checkSysIsExpired('<%=dbid%>','false');  //检查系统是否停止使用 Added by Johns Wang ,2017-05-26
        maintaince.dbid =<%=dbid%>;
        maintaince.isStop = 'false';
        setInterval(maintaince.checkSysIsExpired, 10000);//10秒调用一次
        setInterval(messagehint.popupMessageHint, 120000);//120秒调用一次 (120000)
 
        //是否显示系统消息   2012-09-18
        var flag = checkBoxIsChecked(128, menuConfig);
        var v = $.cookie(userCode);
        if (flag) {
            funB();
        } else {
            $.cookie(userCode, 'false');
            //funB();
        }
        ///end
        if (1 ==<%= ((request.getAttribute("reurl")!=null || request.getAttribute("wxUrl")!=null
                   ||request.getParameter("wx")!=null || request.getAttribute("wx")!=null ) ? 1: menuFold) %>) {
            $('body').layout('collapse', 'west');
            $('body').layout('expand', 'west');
            $('body').layout('collapse', 'west');
        }
        //维护用户管理
        $('.userwh').on('click', function () {
            addTab('维护【<%=session.getAttribute(SessionKey.USER_NAME)%>】用户', '9672', '16', 'usercode='+userCode+'&logontype=<%=session.getAttribute(SessionKey.LOGIN_TYPE)%>', '', '', '');
        })
        $(".icon-tixing").on("click",function(){
            addTab('支付维护费','150371','5','','','','');
        })
<%
    //下面是重定向跳转的(包括复制链接) xin 2021-9-16 11:11:26
    String redirect = request.getParameter(SettingKey.REDIRECT); //  getAttribute(SettingKey.REDIRECT)==null?"":(String)request.getAttribute(SettingKey.REDIRECT) ;
    if (redirect != null) {
        redirect = com.yc.utils.EncodeUtil.base64Decode(redirect);
        redirect = redirect.replace("%2F", "/");
        Map<String, Object> map = RandomString.getRequestParameters(redirect);
        String formname = (String) map.get("formname");
        if (formname == null){
            formname = "";
        }else{
            if(redirect.indexOf("&")!=-1){
                 redirect=redirect.substring(0,redirect.indexOf("&"));
            }
        }
        if (!"".equalsIgnoreCase(redirect)) {
%>
            addTab("<%=formname%>", "", "", "", "<%=redirect%>");
<%
        }
    }
    if (request.getAttribute("wxUrl") != null) {
        String url = (String) request.getAttribute("wxUrl");
        url = com.yc.utils.EncodeUtil.base64Decode(url);
        String[] str = url.split("#p#");
%>
        addTab("", <%=str[0]%>, <%=str[1]%>, "where=<%=str[2]%>");
 
<%  }%>
 
        $('#downloadAPP').popover({
            trigger:'click',//'hover focus',//focus,click 触发方式
            placement : 'bottom',//显示方向
            html: 'true',   //显示内容可以写标签在里面
            //title:'单据二维码',//设置 弹出框 的标题
            content:'<img src="/images/login/appqr.jpg">'
        });
        $('#expireId').popover({
            trigger:'hover',
            placement : 'bottom',//显示方向
            html: 'true',   //显示内容可以写标签在里面
            content:'<%=expireText%>'
        });
        $('#expireId').popover('show');
        setTimeout(function () {
            $('#expireId').popover('hide');
        },5000);
    });
 
    $(window).load(function () {
        messagehint.popupMessageHint();
        <% if(hasMaintain){ %>
         maintainPay.noticeRemind();
        <%}%>
    });
    //去除空格
    String.prototype.Trim = function () {
        var v_ = this.replace(/(^\s*)|(\s*$)/g, "");
        v_ = v_.replace(/^v_.charAt(v_.length-1)*$/g, "");
        var value = "";
        for (var i = 0; i < v_.length; i++) {
            if (v_.charAt(i) != v_.charAt(v_.length - 1)) {
                value += v_.charAt(i);
            }
        }
        return value;
    }
    <%
    if(session.getAttribute(SessionKey.DIBANG).toString().equals("1")){
    %>
    if (!$.browser.msie) { // 不是IE浏览器
        alert('地磅需要用ie浏览器');
    } else {
        document.body.innerHTML += "<div id=\"dingbang_div\" style=\"position: absolute;z-index: 99;margin-top: 0px;margin-left: 300px;overflow:hidden;background-color: white;width: 650px;height: 30px;\"><OBJECT ID=\"ActiveXDrive\"  classid=\"clsid:4228D60E-D741-41AD-911C-4BB5A07FE1EF\" CODEBASE=\"DiBang.cab#version=1,0,0,26\"></OBJECT></div>";
        var ActiveXDrive = document.getElementById("ActiveXDrive");
        try {
            ActiveXDrive.setWinFontSize(16);
            ActiveXDrive.setWinHeight(200);
            ActiveXDrive.setWinWidth(1600);
            $.post("/getDiBang.do", {
                "ip": ActiveXDrive.getLocalIPAddress(),
                "MacAddress": ActiveXDrive.getLocalMacAddress(),
                "hostname": ActiveXDrive.getLocalHostName()
            }, function (data) {
                var vsd = data.split(",");
                var map = {};
                var vs = null;
                for (var i = 0; i < vsd.length; i++) {
                    vs = vsd[i].split(":");
                    map[vs[0]] = vs[1];
                }
                if (map.hasParm == "1") {//有设置
                    if (map.isdebug != "1") {
                        dibangBug.isBug = "0";//非调试
                        ActiveXDrive.style.width = '110px';
                        ActiveXDrive.style.height = '30px';
                        $("#dingbang_div").css({"margin-left": "600px", "width": "110px"});
                    }
                    //**********************以下参数需要从数据库中取出来设置上去**********************/
                    ActiveXDrive.setDecimals(parseInt(map.decimals));          //小数位数: 1 表示1个小数位,2,表示2个小数位
                    ActiveXDrive.setEloadPrebits(parseInt(map.eloadprebits));      //从第1个字符开始丢弃的字符个数
                    ActiveXDrive.setEloadbits(parseInt(map.eloadbits));         //连续取字符串长度
                    ActiveXDrive.setBufferLength(parseInt(map.bufferlength));    //缓冲区长度
                    ActiveXDrive.setNewLineSepChar(parseInt(map.newlinesepchar));    //换行分隔符
                    ActiveXDrive.setEnterkeySepChar(parseInt(map.enterkeysepchar));   //回车分隔符
                    ActiveXDrive.setOtherSepChar(map.othersepchar);    //其它分隔符.
                    ActiveXDrive.setIsReservChar(parseInt(map.isreservchar));      //是否反转显示字符串
 
                    ActiveXDrive.setPortNum(parseInt(map.portnum));     //端口号 , 1 表示 com1 , 2 表示 com1 以此类推
                    ActiveXDrive.setBandRate(parseInt(map.bandrate));  //设置波特率 , 缺省 2400
                    ActiveXDrive.setDataBit(parseInt(map.databit));     //数据位 , 缺省 8
                    ActiveXDrive.setParity(map.parity);    //奇偶校验 , n 表示NONE 无.
                    ActiveXDrive.setStopBit(parseInt(map.stopbit));     //停止位 ,缺省 1
                    if (map.isrndstart == "1") {
                        ActiveXDrive.RndStart();//启动随机数
                    }
                    //************************结束设置参数 *************************************/
                    ActiveXDrive.OpenComm();
                } else {
                    alert("可能您的地磅参数未与本机\r\n\r\n\tIP: " + ActiveXDrive.getLocalIPAddress() + " 地址\r\n或\r\n\t主机名: " + ActiveXDrive.getLocalHostName().Trim() + "\r\n\r\n关联,请与系统管理员联系。");
                }
            });
        } catch (e) {
        }
    }
    <%
    }
    %>
 
    function logout() {
        $.messager.confirm('提示', '是否退出系统?', function (r) {
            if (r) {
                location = '/general/loginOut.jsp'
            }
        });
    }
 
    function toScrollFrameM(iFrame) {//解决ipad中iframe无滚动条问题
        return true;
    }
 
    //设置“桌面”,“图标导航”,“日历管理” 3个页卡的高度,如果不设置高度,遇到 chrome 低版本时(如 for xp )时页面只显示上半截 ,Added by Johns Wang,2018-12-04
    function resizeiFrameHeight() {
        var iFrameHeight = $('#home-tabs').height();
        $("#desktopiframe,#iconMenuCenter,#iconMenuCenter").css("height", parseInt(iFrameHeight) - 40);
    }
 
    $(window).resize(function () {
        resizeiFrameHeight();
    });
    $(document).ready(function () {
        // 选取id="nagigation"下的第一代class元素,将背景颜色设为#E0ECFF
        $('#nagigation >.tabs-header').css('backgroundColor', '#E0ECFF');
        resizeiFrameHeight();
    });
    $(function () {
          <%--initWebsocket('<%= hostUrl.replace("https", "wss").replace("http", "ws") %>','<%=session.getAttribute(SessionKey.HRCODE)%>','<%=dbid%>','<%= session.getId() %>');--%>
    });
</script>
</body>
</html>