<!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> </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>
|