cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
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
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>选择值班人员</title>
 
<style>
    .leftTable{
        border-collapse: collapse;
        border-spacing: 0;
    }
    .leftTable td{
        padding:5px 10px;
        border:1px solid #ccc;
        color:#666;
        font-size:12px;
        line-height:24px;
        text-align:left;
    }
    .bgcolor {
        background-color:#f0f0f0;
    }
 
    .leftTable .checkspan {
        margin-right:5px;
    }
    </style>
[#include "/business/pages/include/static.html" /]
<script type="text/javascript" src="${common_static}/static/script/base64.js"></script>
</head>
 
<body>
<script type="text/javascript">
$(document).ready(function() {
        $.formValidator.initConfig({formID:"myform",onError:function(msg){popupTips(msg)},onSuccess:function(){
                document.getElementById("myform").target = window.top.openDialog("1","操作",
                             {},
                             {"width":40,"height":40,"noclose":true},
                             [{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
                             return true;
                }
        });
    });
</script>
 
      
<table style="margin:20px auto;text-align:center;width:98%;" class="leftTable">
    <form id="myform" method="post">
        <input type="hidden" name="userIds" id="userIds"/>
        <input type="hidden" name="userNames" id="userNames"/>
        <input type="hidden" name="planId" id="planId" value="${RequestParameters.planId}"/>
    </form>
    <tr class="bgcolor">
        <td width="30%">部门</td>
        <td >人员</td>
    </tr>
    [#if list??&&list?size>0]
        [#list list as lv1]
           <tr>
               <td>
                   ${lv1.DEPT_NAME}
               </td>
               [#if lv1.children??&&lv1.children?size>0]
                   <td>
                   [#list lv1.children as user]
                       <span class="checkspan">
                           <input type="checkbox" value="${user.USER_ID}">
                           <input type="hidden" value="${user.USER_NAME}">
                       </span>${user.USER_NAME}
                   [/#list]
                   </td>    
               [#else]
                   <td>&nbsp;</td>
               [/#if]
           </tr>
        [/#list]
    [/#if]    
</table>
 
<script type="text/javascript">
    function onDialogBtnClick(btnID, dialogID, config){
        if(btnID == "btnSure"){
            var userIds = '';
            var userNames = '';
            $(":checkbox:checked").each(function(){
                if(userIds==''){
                    userIds = $(this).val();
                    userNames = $(this).next().val();
                }else{
                    userIds = userIds + ',' + $(this).val();
                    userNames = userNames + ',' +  $(this).next().val();
                }
            })
            if($.util.isEmpty(userIds)){
                window.top.popupTips('请选择人员',2);
                return;
            }else{
                $("#userIds").val(userIds);
                $("#userNames").val(userNames);
                $("#myform").submit();
            }
        }
    }
</script>
</body>
</html>