<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
[#include "/business/pages/include/static.html" /]
|
[#include "/component/newsel.html" /]
|
<title>选择执行人</title>
|
</head>
|
<body class="personnel_allocation_body">
|
<table id="selExecutors" class="pab_con">
|
[#if resList??&&resList?size>0]
|
[#list resList as item]
|
|
|
[#if item.children??&&item.children?size>0]
|
<tr><th>${item.ROLENAME}</th><td>
|
[#list item.children as user]
|
<div class="pabitem">
|
<input name="userId" value="${user.USER_ID}" class="pos" type="checkbox" /><span>${user.USER_NAME}</span>
|
</div>
|
[/#list]
|
[/#if]
|
</td></tr>
|
[/#list]
|
[/#if]
|
<tr style="margin-top:2px">
|
<th><label class="required">主负责人</label></th>
|
<td style="text-align: left;">
|
<select style="width: 20%" id="main_executor" >
|
</select>
|
</td>
|
</tr>
|
<tr>
|
<td class="greybg"><label >备注</label></td>
|
<td style="padding:0;">
|
<textarea class="general" id="flowNote" name="flowNote" style="width:95%;height:100px;border:0;" ></textarea>
|
</td>
|
</tr>
|
</table>
|
</body>
|
|
<script type="text/javascript">
|
$(document).ready(function(){
|
$(":checkbox").click(function(){
|
if($(this).is(":checked")){
|
var userId = $(this).val();
|
var userName = $(this).next("span").text();
|
if($("#main_executor").find("option[value='"+userId+"']").length>0){
|
$(this).attr("checked",false);
|
window.top.popupTips("不能选择重复人员");
|
}else{
|
$("#main_executor").append("<option value='"+userId+"'>"+userName+"</option>");
|
}
|
}else{
|
var userId = $(this).val();
|
$("#main_executor option[value='"+userId+"']").remove();
|
}
|
});
|
});
|
|
//点击事件
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
var generalId = '${generalId}';
|
var trIndex = '${trIndex}';
|
var executorIds='';
|
var executorNames='';
|
$('input:checkbox:checked').each(function(){
|
if(executorIds==''){
|
executorIds+=$(this).val();
|
executorNames=$(this).next("span").text();
|
}else{
|
executorIds = executorIds + ',' + $(this).val();
|
executorNames=executorNames + ',' + $(this).next("span").text();
|
}
|
});
|
var main_executorId = $("#main_executor").val();
|
var flowNote = $("#flowNote").val();
|
if(flowNote.length>200){
|
window.top.popupTips('不超过200个汉字或字符', 1);
|
return;
|
}
|
if($.util.isEmpty(executorIds)){
|
window.top.popupTips('请选择执行人', 1);
|
return;
|
}
|
if($.util.isEmpty(main_executorId)){
|
window.top.popupTips('请选择主负责人', 1);
|
return;
|
}
|
|
window.top.frames["baseInfo"].formSubmit(executorIds,executorNames,main_executorId,flowNote);
|
window.top.hideDialog(dialogID);
|
}
|
}
|
</script>
|
</html>
|