zhuguifei
2026-03-10 58402bd5e762361363a0f7d7907153c77dbb819f
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
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>
<html>
<head>
    <title>数据字典(设备轮保)</title>
    <jsp:include page="../../../initlib/initAll.jsp"></jsp:include>
    <script type="text/javascript" src="${pageContext.request.contextPath }/pms/pub/combobox/comboboxUtil.js"
            charset="utf-8"></script>
    <script type="text/javascript">
        var twoGrid = null;
        $(function () {
            twoGrid = $('#twoGrid').datagrid({
                rownumbers: true,
                idField: 'id',
                fit: true,
                singleSelect: true,
                fitColumns: false,
                border: false,
                remoteSort: false,
                striped: true,
                nowrap: true,
                checkOnSelect: false,
                selectOnCheck: false,
                columns: [[{
                    field: 'id',
                    title: '二级ID',
                    checkbox: true
                }, {
                    field: 'num',
                    title: '序号',
                    width: 50,
                    align: 'center',
                    sortable: true
                }, {
                    field: 'mainMenu',
                    title: '轮保项',
                    width: 80,
                    align: 'center'
                }, {
                    field: 'mainStandards',
                    title: '轮保标准',
                    width: 70,
                    align: 'center'
                }, {
                    field: 'shiftId',
                    title: '班次',
                    width: 50,
                    align: 'center',
                    sortable: true,
                    formatter: function (value, row, index) {
                        var str;
                        if (value == 0) {
                            str = "全部";
                        } else if (value == 1) {
                            str = "早班";
                        } else if (value == 2) {
                            str = "中班";
                        } else {
                            str = "晚班";
                        }
                        return str;
                    }
                }, {
                    field: 'insResult',
                    title: '事实情况',
                    width: 70,
                    align: 'center'
                }, {
                    field: 'schUserName',
                    title: '实施人',
                    width: 50,
                    align: 'center'
 
                }, {
                    field: 'cycle',
                    title: '周期',
                    width: 50,
                    align: 'center'
                }, {
                    field: 'remark',
                    title: '备注',
                    width: 100,
                    align: 'center'
                }, {
                    field: 'roleName',
                    title: '负责人',
                    width: 100,
                    align: 'center'
                }, {
                    field: 'del',
                    title: '是否启用',
                    align: 'center',
                    width: 70,
                    formatter: function (value, row, index) {
                        return value == '0' ? '<span style="color:green;background-color:white">启用<span>' : '<span style="color:red">禁用<span>';
                    }
                }, {
                    field: 'createUserName',
                    title: '创建人姓名',
                    align: 'center',
                    width: 70,
                    sortable: true,
                    hidden: 'true'
                }, {
                    field: 'cTime',
                    title: '创建时间',
                    width: 100,
                    align: 'center',
                    sortable: true,
                    hidden: 'true'
                }, {
                    field: 'updateUserName',
                    title: '修改人姓名',
                    align: 'center',
                    width: 70,
                    sortable: true,
                    hidden: 'true'
                }, {
                    field: 'uTime',
                    title: '最后修改时间',
                    width: 150,
                    align: 'center',
                    sortable: true
 
                }]],
                toolbar: '#typeToolbar',
                onLoadSuccess: function () {
                    $(this).datagrid('tooltip');
                },
                onRowContextMenu: function (e, rowIndex, rowData) {
                    e.preventDefault();
                    $(this).datagrid('unselectAll').datagrid('uncheckAll');
                    $(this).datagrid('selectRow', rowIndex);
                    $('#typeMenu').menu('show', {
                        left: e.pageX - 10,
                        top: e.pageY - 5
                    });
                }
            });
        });
 
        /* 点击主菜单,查询相应的数据   */
        function queryMdTypeByCategory(id) {
            //重新加载datagrid的数据
            //$("#twoGrid").datagrid('reload');
            twoGrid.datagrid({
                url: "${pageContext.request.contextPath}/pms/eqmWheelCover/queryWheelCoverById.do?maintainaceType=1&id=" + id,
                queryParams: $("#typeSearchForm").form("getData")
            });
 
        }
 
        //查询数据
        function queryMdType() {
            var row = categoryGrid.datagrid('getSelected');
            if (row == null) {
                queryMdTypeByCategory("");
            } else {
                queryMdTypeByCategory(row.id);
            }
        }
 
        //删除数据
        function deleteMdType() {
            //按钮是否点击标志(默认为true:可被点击)
            var isClick = true;
            var row = twoGrid.datagrid('getSelected');
            parent.$.messager.confirm('操作提示', '您是否要删除当前数据?', function (b) {
                if (b) {
                    //未点击过则执行里面的内容
                    if (isClick) {
                        //改变为点击无效状态
                        isClick = false;
                        $.post('${pageContext.request.contextPath}/pms/eqmWheelCover/deleteWheelCover.do', {
                            id: row.id
                        }, function (json) {
                            //恢复点击有效状态
                            isClick = true;
                            if (json.success) {
                                $.messager.show('提示', json.msg, 'info');
                                queryMdType();
                            } else {
                                $.messager.show('提示', json.msg, 'error');
                            }
                        }, 'JSON');
                    }
                }
            });
        }
 
        /**
         * 批量删除二级数据
         */
        function beatchDeleteMdType() {
            //按钮是否点击标志(默认为true:可被点击)
            var isClick = true;
            var rows = twoGrid.datagrid('getChecked');
            var ids = [];
 
            if (rows.length > 0) {
                parent.$.messager.confirm('确认', '请确认批量删除当前数据?', function (r) {
                    if (r) {
                        for (var i = 0; i < rows.length; i++) {
                            ids.push(rows[i].id);
                        }
                        parent.$.messager.progress({
                            title: '提示',
                            text: '数据处理中,请稍后....'
                        });
                        //未点击过则执行里面的内容
                        if (isClick) {
                            //改变为点击无效状态
                            isClick = false;
                            $.post('${pageContext.request.contextPath}/pms/eqmWheelCover/batchDeleteWheelCover.do',
                                {
                                    ids: ids.join(','),
 
                                }, function (json) {
                                    //恢复点击有效状态
                                    isClick = true;
                                    parent.$.messager.progress('close');
                                    if (json.success) {
                                        $.messager.show('提示', json.msg, 'info');
                                        queryMdType();
                                    } else {
                                        $.messager.show('提示', json.msg, 'info');
                                    }
                                }, "JSON");
                        }
                    }
                });
            } else {
                parent.$.messager.show({
                    title: '提示',
                    msg: '请勾选要需要操作的数据!'
                });
            }
        }
 
        //跳转到保养添加页面
        function gotoLubiCycle() {
            //按钮是否点击标志(默认为true:可被点击)
            var isClick = true;
            var row = categoryGrid.datagrid('getSelected');
            if (row != null) {
                var dialog = parent.$.modalDialog({
                    title: '保养明细数据添加',
                    width: 720,
                    height: 600,
                    href: '${pageContext.request.contextPath}/pms/eqmWheelCover/goToAddWheelCover.do?cateid=' + row.id,
                    buttons: [{
                        text: '保存',
                        iconCls: 'icon-standard-disk',
                        handler: function () {
                            var f = dialog.find("#form");
                            if (f.form("validate")) {
                                //未点击过则执行里面的内容
                                if (isClick) {
                                    //改变为点击无效状态
                                    isClick = false;
                                    $.post("${pageContext.request.contextPath}/pms/eqmWheelCover/addWheelCover.do", f.form("getData"), function (json) {
                                        //恢复点击有效状态
                                        isClick = true;
                                        if (json.success) {
                                            $.messager.show('提示', json.msg, 'info');
                                            dialog.dialog('destroy');
                                            queryMdType();
                                        } else {
                                            $.messager.show('提示', json.msg, 'error');
                                        }
                                    }, "JSON");
                                }
                            }
                        }
                    }]
                });
            } else {
                $.messager.show('提示', "请先选择数据!", 'error');
            }
        }
 
        //跳转到编辑页面
        function gotoTypeEdit() {
            //按钮是否点击标志(默认为true:可被点击)
            var isClick = true;
            var dialog = parent.$.modalDialog({
                title: '数据编辑',
                width: 720,
                height: 600,
                href: '${pageContext.request.contextPath}/pms/eqmWheelCover/goToEditWheelCover.do?id=' + twoGrid.datagrid('getSelected').id,
                buttons: [{
                    text: '保存',
                    iconCls: 'icon-standard-disk',
                    handler: function () {
                        var f = dialog.find("#form");
                        if (f.form("validate")) {
                            //未点击过则执行里面的内容
                            if (isClick) {
                                //改变为点击无效状态
                                isClick = false;
                                $.post("${pageContext.request.contextPath}/pms/eqmWheelCover/editWheelCover.do", f.form("getData"), function (json) {
                                    //恢复点击有效状态
                                    isClick = true;
                                    if (json.success) {
                                        $.messager.show('提示', json.msg, 'info');
                                        dialog.dialog('destroy');
                                        queryMdType();
                                    } else {
                                        $.messager.show('提示', json.msg, 'error');
                                    }
                                }, "JSON");
                            }
                        }
                    }
                }]
            });
        }
 
        var categoryGrid = null;
        $(function () {
 
            categoryGrid = $('#categoryGrid').datagrid({
                fit: true,
                fitColumns: true,//fitColumns= true就会自动适应宽度(无滚动条)
                border: false,
                pagination: true,
                idField: 'id',
                striped: true,
                remoteSort: false,
                pageSize: 20,
                pageList: [10, 20, 30, 40, 50],
                sortName: 'id',
                sortOrder: 'desc',
                singleSelect: true,
                rownumbers: true,
                checkOnSelect: false,
                selectOnCheck: false,
                nowrap: true,
                showPageList: false,
                columns: [[{
                    field: 'id',
                    title: '一级ID',
                    checkbox: true
                }, {
                    field: 'name',
                    title: '一级名称',
                    width: 170,
                    align: 'center'
                }, {
                    field: 'des',
                    title: '描述',
                    width: 150,
                    align: 'center'
                }/* , {
                    field : 'enable',
                    title : '是否启用',
                    align:'center',
                    width : 50,
                    formatter : function(value, row, index) {
                        return value==1?'<span style="color:green;background-color:white">启用<span>':'<span style="color:red">禁用<span>';
                    }
                } */, {
                    field: 'createUserName',
                    title: '创建人姓名',
                    align: 'center',
                    width: 70,
                    sortable: true,
                    hidden: 'true'
                }, {
                    field: 'createUserTime',
                    title: '创建时间',
                    align: 'center',
                    width: 150,
                    sortable: true,
                    hidden: 'true'
                }, {
                    field: 'updateUserName',
                    title: '修改人姓名',
                    align: 'center',
                    width: 70,
                    sortable: true,
                    hidden: 'true'
                }, {
                    field: 'updateUserTime',
                    title: '最后修改时间',
                    align: 'center',
                    width: 130,
                    sortable: true,
                    hidden: 'true'
                }]],
                toolbar: '#categoryToolbar',
                url: "${pageContext.request.contextPath}/pms/sys/eqpcategory/queryMdCategory.do?maintainaceType=1",
                queryParams: $("#categroyForm").form("getData"),
                onLoadSuccess: function () {
                    $(this).datagrid('tooltip');
                },
                onRowContextMenu: function (e, rowIndex, rowData) {
                    e.preventDefault();
                    $(this).datagrid('unselectAll').datagrid('uncheckAll');
                    $(this).datagrid('selectRow', rowIndex);
                    $('#categoryMenu').menu('show', {
                        left: e.pageX - 10,
                        top: e.pageY - 5
                    });
                },
                onClickRow: function (rowIndex, rowData) {
                    queryMdTypeByCategory(rowData.id);
                }
            });
        });
 
        /**
         * 查询数据
         */
        function queryMdCategory() {
            categoryGrid.datagrid({
                url: "${pageContext.request.contextPath}/pms/sys/eqpcategory/queryMdCategory.do?maintainaceType=1",
                queryParams: $("#categroyForm").form("getData")
            });
        }
 
        function deleteCategory() {
            //按钮是否点击标志(默认为true:可被点击)
            var isClick = true;
            var row = categoryGrid.datagrid('getSelected');
            parent.$.messager.confirm('操作提示', '您是否要删除当前数据?', function (b) {
                if (b) {
                    //未点击过则执行里面的内容
                    if (isClick) {
                        //改变为点击无效状态
                        isClick = false;
                        $.post('${pageContext.request.contextPath}/pms/sys/eqpcategory/deleteMdCategory.do', {
                            id: row.id
                        }, function (json) {
                            //恢复点击有效状态
                            isClick = true;
                            if (json.success) {
                                $.messager.show('提示', json.msg, 'info');
                                queryMdCategory();
                            } else {
                                $.messager.show('提示', json.msg, 'error');
                            }
                        }, 'JSON');
                    }
                }
            });
        }
 
        /**
         * 批量删除一级数据
         */
        function beatchDeleteCategory() {
            //按钮是否点击标志(默认为true:可被点击)
            var isClick = true;
            var rows = categoryGrid.datagrid('getChecked');
            var ids = [];
 
            if (rows.length > 0) {
                parent.$.messager.confirm('确认', '请确认批量删除当前数据?', function (r) {
                    if (r) {
                        for (var i = 0; i < rows.length; i++) {
                            ids.push(rows[i].id);
                        }
                        parent.$.messager.progress({
                            title: '提示',
                            text: '数据处理中,请稍后....'
                        });
                        //未点击过则执行里面的内容
                        if (isClick) {
                            //改变为点击无效状态
                            isClick = false;
                            $.post('${pageContext.request.contextPath}/pms/sys/eqpcategory/batchDeleteMdCategory.do',
                                {
                                    ids: ids.join(','),
 
                                }, function (json) {
                                    //恢复点击有效状态
                                    isClick = true;
                                    parent.$.messager.progress('close');
                                    if (json.success) {
                                        $.messager.show('提示', json.msg, 'info');
                                        queryMdCategory();
                                    } else {
                                        $.messager.show('提示', json.msg, 'info');
                                    }
                                }, "JSON");
                        }
                    }
                });
            } else {
                parent.$.messager.show({
                    title: '提示',
                    msg: '请勾选要需要操作的数据!'
                });
            }
        }
 
        function gotoCategoryAdd() {
            //按钮是否点击标志(默认为true:可被点击)
            var isClick = true;
            var dialog = parent.$.modalDialog({
                title: '添加',
                width: 620,
                height: 290,
                href: '${pageContext.request.contextPath}/pms/sys/eqpcategory/addMdCategoryJsp.do',
                buttons: [{
                    text: '保存',
                    iconCls: 'icon-standard-disk',
                    handler: function () {
                        var f = dialog.find("#formcategory");
                        if (f.form("validate")) {
                            //未点击过则执行里面的内容
                            if (isClick) {
                                //改变为点击无效状态
                                isClick = false;
                                $.post("${pageContext.request.contextPath}/pms/sys/eqpcategory/addMdCategory.do", f.form("getData"), function (json) {
                                    //恢复点击有效状态
                                    isClick = true;
                                    if (json.success) {
                                        $.messager.show('提示', json.msg, 'info');
                                        dialog.dialog('destroy');
                                        queryMdCategory();
                                    } else {
                                        $.messager.show('提示', json.msg, 'error');
                                    }
                                }, "JSON");
                            }
                        }
                    }
                }]
            });
        }
 
        function gotoCategoryEdit() {
            //按钮是否点击标志(默认为true:可被点击)
            var isClick = true;
            var dialog = parent.$.modalDialog({
                title: '数据编辑',
                width: 620,
                height: 290,
                href: '${pageContext.request.contextPath}/pms/sys/eqpcategory/gotoMdCategoryJsp.do?id=' + categoryGrid.datagrid('getSelected').id,
                buttons: [{
                    text: '修改',
                    iconCls: 'icon-standard-disk',
                    handler: function () {
                        var f = dialog.find("#form");
                        if (f.form("validate")) {
                            //未点击过则执行里面的内容
                            if (isClick) {
                                //改变为点击无效状态
                                isClick = false;
                                $.post("${pageContext.request.contextPath}/pms/sys/eqpcategory/updatecategory.do", f.form("getData"), function (json) {
                                    //恢复点击有效状态
                                    isClick = true;
                                    if (json.success) {
                                        $.messager.show('提示', json.msg, 'info');
                                        dialog.dialog('destroy');
                                        queryMdCategory();
                                    } else {
                                        $.messager.show('提示', json.msg, 'error');
                                    }
                                }, "JSON");
                            }
                        }
                    }
                }]
            });
        }
 
        /**清空*/
        function cleanOneQuery() {
            $('#categroyForm input').val(null);
        }
 
        /**清空*/
        function cleanTwoQuery() {
            $('#typeSearchForm input').val(null);
        }
 
        /**一级上传图片**/
        function uploadImages() {
            var row = categoryGrid.datagrid('getSelected');
            if (row != null) {
                var dialog = parent.$.modalDialog({
                    title: '文件上传',
                    width: 620,
                    height: 450,
                    href: '${pageContext.request.contextPath}/pms/sys/eqpcategory/uploadJsp.do',
                    buttons: [{
                        text: '保存',
                        iconCls: 'icon-standard-disk',
                        handler: function () {
                            var f = dialog.find("#form");
                            if (f.form("validate")) {
                                var isTempUpload = f.form("getData").isUploadFile;//读取隐藏域中的值
                                if (isTempUpload == "true") {//表示临时 上传文件了
                                    $.post("${pageContext.request.contextPath}/pms/sys/eqpcategory/updateFile.do?id=" + row.id, f.form("getData"), function (json) {
                                        if (json.success) {
                                            //queryProManage(rowSelected.id);
                                            $.messager.show('提示', json.msg, 'info');
                                            dialog.dialog('destroy');
                                            queryMdCategory();//重新查询 父类
                                            queryMdType();//重新查询下 子类
                                        } else {
                                            $.messager.show('提示', json.msg, 'error');
                                        }
                                    }, "JSON");
                                } else {
                                    alert('请选择至少一个文件进行上传!');
                                }
                            }
                        }
                    }]
                });
            } else {
                $.messager.show('提示', "请先选择一行数据!", 'info');
            }
        }
 
        //一级预览图片
        function yjLookImages() {
            //这个 可以先查询出 图片的上传路径 通过传值的方式 让 hotspot.jsp 加载图片
            var row = categoryGrid.datagrid('getSelected');
            if (row == null || row == '') {
                $.messager.show('提示', "请先选择一行数据!", 'info');
                return;
            }
            if (row.uploadUrl != null && row.uploadUrl != '') {
                if (row != null) {
                    var dialog = parent.$.modalDialog({
                        title: '预览',
                        width: 820,
                        height: 750,
                        href: '${pageContext.request.contextPath}/pms/sys/eqpcategory/lookMdCategoryJsp.do?uploadUrl=' + row.uploadUrl
                    });
                } else {
                    $.messager.show('提示', "请先选择一行数据!", 'info');
                }
            } else {
                $.messager.show('提示', "请先上传图片!", 'info');
            }
        }
 
        function lookImages() {
            var oneRow = categoryGrid.datagrid('getSelected');
            if (oneRow == null || oneRow == '') {
                $.messager.show('提示', "请先选择一行数据!", 'info');
                return;
            }
            if (oneRow.uploadUrl != null && oneRow.uploadUrl != '') {
                var twoRow = twoGrid.datagrid('getSelected');
                var contextPath = "${pageContext.request.contextPath}";
                if (twoRow != null) {
                    //var url ='${pageContext.request.contextPath}/pms/sys/datadict/imagesHotspot/hotspot.jsp?uploadUrl='+oneRow.uploadUrl
                    //        +"&twoRowId="+twoRow.id+"&contextPath="+contextPath;
                    var url = '${pageContext.request.contextPath}/pms/sys/eqptype/gotoHotspotJsp.do?uploadUrl=' + oneRow.uploadUrl
                        + "&twoRowId=" + twoRow.id + "&contextPath=" + contextPath;
 
                    var iWidth = 1024; //弹出窗口的宽度;
                    var iHeight = 800; //弹出窗口的高度;
                    var iTop = (window.screen.availHeight - 30 - iHeight) / 2; //获得窗口的垂直位置;
                    var iLeft = (window.screen.availWidth - 10 - iWidth) / 2; //获得窗口的水平位置;
                    window.open(url, "", "toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no,height=" + iHeight + ", width=" + iWidth + ", top=" + iTop + ", left=" + iLeft);
                } else {
                    $.messager.show('提示', "请先选择一行数据!", 'info');
                }
            } else {
                $.messager.show('提示', "请先上传图片!", 'info');
            }
        }
 
        //批量导入
        function inputExcelDatas() {
            dialog = parent.$.modalDialog({
                title: '批量导入',
                width: 700,
                height: 350,
                href: '${pageContext.request.contextPath}/pms/sys/eqpcategory/DatadictinputExcel.do',
                //href : '${pageContext.request.contextPath}/pms/sys/datadict/iframPage.jsp',
            });
        }
 
 
    </script>
</head>
<body class="easyui-layout" data-options="fit : true,border : false">
<div data-options="region:'west',border:true,split:false,title:'数据字典【可单击表格】'" style="width: 400px;">
    <div id="categoryToolbar" style="display: none;">
        <form id="categroyForm" style="margin:4px 0px 0px 0px">
            <div class="topTool">
                <fieldset>
                    <!-- <div >
                        <span class="label">一级编号:</span>
                        <span><input type="text" name="code" class="easyui-validatebox "  data-options="prompt: '请输入数据编号'"/></span>
                    </div> -->
                    <div>
                        <span class="label">一级名称:</span>
                        <input type="text" name="name" class="easyui-validatebox "
                               data-options="prompt: '请输入数据名称',width:120"/>
                    </div>
                    <div>
                        <span class="label">设备类型:</span>
                        <select name="eqpType"
                                class="easyui-combobox"
                                data-options="panelHeight:'auto',editable:false,width:120">
                            <!-- 1-月 2-周 3-日 -->
                            <option value="">全部</option>
                            <option value="卷烟机">卷烟机</option>
                            <option value="包装机">包装机</option>
                            <option value="装封箱机">装封箱机</option>
                            <option value="发射机">发射机</option>
                            <option value="成型机">成型机</option>
                        </select>
                    </div>
                    <div>
                        <span class="label">点检周期:</span>
                        <select name="cycleType"
                                class="easyui-combobox"
                                data-options="panelHeight:'auto',editable:false,width:120">
                            <!-- 1-月 2-周 3-日 -->
                            <option value="">全部</option>
                            <option value="1">月</option>
                            <option value="2">周</option>
                            <option value="3">日</option>
                        </select>
                    </div>
                </fieldset>
            </div>
        </form>
        <div class="easyui-toolbar" style="width:400px;">
            <c:if test="${not empty sessionInfo.resourcesMap['/pms/sys/eqpcategory/queryMdCategory.do/lbsj']}">
                <a onclick="queryMdCategory()" href="javascript:void(0);" class="easyui-linkbutton"
                   data-options="plain:true,iconCls:'icon-standard-zoom'">查询</a>
            </c:if>
            <c:if test="${not empty sessionInfo.resourcesMap['/pms/sys/eqpcategory/addMdCategory.do/lbsj']}">
                <a onclick="gotoCategoryAdd();" href="javascript:void(0);" class="easyui-linkbutton"
                   data-options="plain:true,iconCls:'icon-standard-plugin-add'">轮保新增</a>
            </c:if>
            <c:if test="${not empty sessionInfo.resourcesMap['/pms/sys/eqpcategory/batchDeleteMdCategory.do/lbsj']}">
                <a onclick="beatchDeleteCategory();" href="javascript:void(0);" class="easyui-linkbutton"
                   data-options="iconCls:'icon-standard-cancel',plain:true">批量删除</a>
            </c:if>
 
        </div>
    </div>
    <table id="categoryGrid"></table>
</div>
<div id="categoryMenu" class="easyui-menu" style="width: 80px; display: none;">
    <c:if test="${not empty sessionInfo.resourcesMap['/pms/sys/eqpcategory/updatecategory.do/lbsj']}">
        <div onclick="gotoCategoryEdit()" data-options="iconCls:'icon-standard-plugin-add'">编辑</div>
    </c:if>
    <c:if test="${not empty sessionInfo.resourcesMap['/pms/sys/eqpcategory/deleteMdCategory.do/lbsj']}">
        <div onclick="deleteCategory();" data-options="iconCls:'icon-standard-plugin-delete'">删除</div>
    </c:if>
</div>
 
 
<div data-options="region:'center',border:true,title:'二级数据'">
    <div id="typeToolbar" style="display: none;">
        <form id="typeSearchForm" style="margin:4px 0px 0px 0px">
            <div class="topTool">
                <fieldset>
                    <div>
                        <span class="label">轮保项:</span>
                        <span><input type="text" name="equLocation" id="equLocation" class="easyui-validatebox "
                                     data-options="prompt: '请输入轮保项',width:120"/></span>
                    </div>
                    <div>
                        <span class="label">角色名称:</span>
                        <input type="text" name="spePerson" id="spePerson" class="easyui-validatebox "
                               data-options="prompt: '角色名',width:120"/>
                    </div>
                    <div>
                        <span class="label">班次:</span>
                        <input type="text" name="code" id="code" class="easyui-combobox " value="4" data-options="prompt: '请选择班次',width:120,
                                valueField: 'value',
                                textField: 'text',
                                data: [{
                                    text: '全部',
                                    value: 0
                                },{
                                    text: '早班',
                                    value: 1
                                },{
                                    text: '中班',
                                    value: 2
                                },{
                                    text: '晚班',
                                    value: 3
                                },{
                                    text: ' --查询所有-- ',
                                    value: 4
                                }]"/>
                    </div>
                </fieldset>
            </div>
        </form>
        <div class="easyui-toolbar">
            <c:if test="${not empty sessionInfo.resourcesMap['/pms/sys/eqptype/queryMdType.do/lbbw']}">
                <a onclick="queryMdType()" href="javascript:void(0);" class="easyui-linkbutton"
                   data-options="plain:true,iconCls:'icon-standard-zoom'">查询</a>
            </c:if>
            <c:if test="${not empty sessionInfo.resourcesMap['/pms/eqmWheelCover/addWheelCover.do/lbbw']}">
                <a onclick="gotoLubiCycle();" href="javascript:void(0);" class="easyui-linkbutton"
                   data-options="plain:true,iconCls:'icon-standard-plugin-add'">新增</a>
            </c:if>
            <c:if test="${not empty sessionInfo.resourcesMap['/pms/sys/eqptype/cleanTwoQuery.do/lbbw']}">
                <a onclick="cleanTwoQuery();" href="javascript:void(0);" class="easyui-linkbutton"
                   data-options="iconCls:'icon-standard-arrow-refresh',plain:true">重置</a>
            </c:if>
            <c:if test="${not empty sessionInfo.resourcesMap['/pms/eqmWheelCover/batchDeleteWheelCover.do/lbbw']}">
                <a onclick="beatchDeleteMdType();" href="javascript:void(0);" class="easyui-linkbutton"
                   data-options="iconCls:'icon-standard-cancel',plain:true">批量删除</a>
            </c:if>
            <%-- <c:if test="${not empty sessionInfo.resourcesMap['/pms/sys/datadict/uploadImages.do']}">
                <a onclick="lookImages();" href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-standard-arrow-refresh',plain:true">设置图片</a>
            </c:if>
            <c:if test="${not empty sessionInfo.resourcesMap['/pms/sys/datadict/uploadImages.do']}">
                <a onclick="inputExcelDatas();" href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-standard-plugin-add',plain:true">批量导入</a>
            </c:if>
             --%>
        </div>
    </div>
    <table id="twoGrid"></table>
</div>
<div id="typeMenu" class="easyui-menu" style="width: 80px; display: none;">
    <c:if test="${not empty sessionInfo.resourcesMap['/pms/eqmWheelCover/editWheelCover.do/lbbw']}"></c:if>
    <div onclick="gotoTypeEdit()" data-options="iconCls:'icon-standard-plugin-add'">编辑</div>
 
    <c:if test="${not empty sessionInfo.resourcesMap['/pms/eqmWheelCover/deleteWheelCover.do/lbbw']}">
        <div onclick="deleteMdType();" data-options="iconCls:'icon-standard-plugin-delete'">删除</div>
    </c:if>
</div>
</body>
</html>