<script type="javascript">
document.getElementById("out").scrollTop=document.getElementById("out").scrollHeight;
document.getElementById("uncheck").scrollTop=document.getElementById("out").scrollHeight;
</script>
<script language=jscript>
function aa(id)
{
return LawDocumentsDWR.listAllPeople(id,getAllPeople);
}
function getAllPeople(date)
{
var selLen=document.myform.s2.options.length;
for(var i=0;i<selLen;i++)
{
document.myform.s2.options.remove(0);
}
for(var i=0;i<date.length;i++)
{
document.myform.s2.options[document.myform.s2.options.length]=new Option(date[i].realName,date[i].id);
}
}
<%-- 提交表单前判断 --%>
function check()
{
if(document.getElementById("s3").options.length==0)
{
alert("请设置收件人");
return false;
}
return true;
}
<%-- 移动元素 --%>
function moveOption(e1, e2){
try{
var flag=0,yetId=0;
for(var i=0;i<e1.options.length;i++)
{
if(e1.options[i].selected==false) flag=1;
}
if(flag==1){
for(var i=0;i<e1.options.length;i++){
if(e1.options[i].selected){
var e = e1.options[i];
for(var j=0;j<e2.options.length;j++){
if(e2.options[j].value==e.value) yetId=1;
}
if(yetId==0){
e2.options.add(new Option(e.text, e.value));
e1.remove(i);
}else{
yetId=0;
}
}
}
}else{
var len=e1.options.length;
for(var i=0;i<len;i++){
if(e1.options[i].selected){
var e = e1.options[i];
for(var j=0;j<e2.options.length;j++){
if(e2.options[j].value==e.value) yetId=1;
}
if(yetId==0){
e2.options.add(new Option(e.text, e.value));
}else{
yetId=0;
}
}
}
for(var i=0;i<len;i++){
e1.remove(0);
}
}
}
catch(e){}
}
<%--全选--%>
function SelectAll2(){
var c2=document.getElementById("c2");
if(c2.checked==true)
{
var select=document.getElementById("s2");
for(var i=0;i<select.options.length;i++)
select.options[i].selected=true;
}
if(c2.checked==false)
{
var select=document.getElementById("s2");
for(var i=0;i<select.options.length;i++)
select.options[i].selected=false;
}
}
function SelectAll3(){
var c3=document.getElementById("c3");
if(c3.checked==true)
{
var select=document.getElementById("s3");
for(var i=0;i<select.options.length;i++)
select.options[i].selected=true;
}
if(c3.checked==false)
{
var select=document.getElementById("s3");
for(var i=0;i<select.options.length;i++)
select.options[i].selected=false;
}
}
function sub()
{
if(check())
{
var select=document.getElementById("s3");
if(${oss==0}){
html='<span class="main">';
for(var i=0;i<select.options.length;i++)
{
html+='<lable align="left">'+select[i].text+'</lable><lable align="right"><input name="checkbox" type="checkbox" value="'+select[i].value+'" checked></lable>'+
'<input name="groupIds" style="display:none" type="checkbox" value="1" checked><input style="display:none" name="orderIds" type="checkbox" value="0" checked></td>';
}
window.opener.document.getElementById("aboutPeople").innerHTML=html+'</span>';
}else{
var selectboxs=new Array();
for(var i=0;i<select.options.length;i++)
selectboxs[i]=select[i].value;
LawDocumentsDWR.returnPeople(selectboxs,${id});
alert("转发成功!")
}
window.close();
}
}
</script>
</head>
<body>
<form name="myform"
action="<%=request.getContextPath()%>/lawDocumentsFile/lawDocuments.do"
method="post">
<table width="700" height="450" border="0" align="center"
cellpadding="0" cellspacing="0"
background="<%=request.getContextPath()%>/OrgManager/images/bg.gif">
<tr>
<td height="405">
<table width="450" height="450" border="0" align="center"
cellpadding="0" cellspacing="0">
<tr>
<td width="10" align="right" valign="top">
<img
src="<%=request.getContextPath()%>/OrgManager/images/l.gif"
width="5" height="450" />
</td>
<td width="435"
background="<%=request.getContextPath()%>/OrgManager/images/bg2.gif">
<table width="100%" height="450" border="0" cellpadding="0"
cellspacing="0">
<tr>
<td width="150" height="20" align="center">
</td>
<td width="8" rowspan="5" align="center" valign="top">
<img
src="<%=request.getContextPath()%>/OrgManager/images/line.gif"
width="6" height="450" />
</td>
<td align="center">
</td>
<td width="10" rowspan="5" align="center" valign="top">
<img
src="<%=request.getContextPath()%>/OrgManager/images/line.gif"
width="6" height="450" />
</td>
<td align="center">
</td>
<td width="10" rowspan="5" align="center" valign="top">
<img
src="<%=request.getContextPath()%>/OrgManager/images/line.gif"
width="6" height="450" />
</td>
<td align="center">
</td>
</tr>
<tr>
<td height="32" align="center" valign="middle">
<span class="main">收件人单位</span>
</td>
<td width="183" align="center" valign="middle">
<span class="main">收件人列表</span>
</td>
<td width="30" align="center" valign="middle">
<span class="main">选择</span>
</td>
<td width="168" align="center" valign="middle">
<span class="main">已选收件人</span>
</td>
</tr>
<tr>
<td rowspan="2" align="left" valign="top">
<span class="main">
<div id="out">
<script type="text/javascript">
<!--
d = new dTree('d','/lhkjywgl/plugins/dtree/');
d.add(0,-1,'${unit}','');
<logic:iterate id="department" name="departmentList">
d.add(${department.id},${department.pid},'${department.deptName }','javaScript:aa(${department.id})','');
<%-- <c:forEach items="${department.peoples}" var="personList">--%>
<%-- d.add(${personList.id+100},${department.id},'<font color="#505050">${personList.realName}</font>','javascript:show14(${personList.id},${department.id})','','','/lhkjywgl/images/renyuan.gif');--%>
<%-- </c:forEach>--%>
</logic:iterate>
document.write(d);
//-->
</script>
</div>
</span>
</td>
<td rowspan="2" align="center" valign="top">
<span class="main">全选</span>
<input type="checkbox" name="c2" id="c2" value="checkbox"
οnclick="javascript:SelectAll2()" />
<br>
<select id="s2" name="s2" size="18" multiple="multiple"></select>
</td>
<td height="332" align="center" valign="middle">
<table width="100%" height="150" border="0" cellpadding="0"
cellspacing="0">
<tr>
<td align="center">
<a
href="javascript:moveOption(document.myform.s2, document.myform.s3)"><img
src="<%=request.getContextPath()%>/OrgManager/images/radd.gif"
alt="添加" width="26" height="27" border="0" />
</a>
</td>
</tr>
<tr>
<td align="center">
<a
href="javascript:moveOption(document.myform.s3, document.myform.s2)"><img
src="<%=request.getContextPath()%>/OrgManager/images/ldel.gif"
alt="移除" width="26" height="27" border="0" />
</a>
</td>
</tr>
</table>
</td>
<td rowspan="2" align="center" valign="top">
<span class="main">全选</span>
<input type="checkbox" name="c3" id="c3" value="checkbox"
οnclick="javascript:SelectAll3()" />
<br>
<select id="s3" name="s3" size="18" multiple="multiple">
</td>
</tr>
<tr>
<td height="20" align="center" class="text_hui">
</td>
</tr>
<tr>
<td colspan=7 height="45" align="center" valign="top">
<table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td align="center" valign="middle">
<input name="Submit3" type="button"
οnclick="javascript:sub()" class="input" value="确 定" />
<input name="Submit4" type="button" class="input"
value="取 消" />
</td>
</tr>
</table>
</td>
<td align="center">
</td>
<td align="left">
</td>
<td align="center" valign="top">
</td>
</tr>
</table>
</td>
<td width="10" align="left" valign="top">
<img src="images/r.gif" width="5" height="450" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
插入人
<script type="javascript">document.getElementById("out").scrollTop=document.getElementById("out").scrollHeight;document.getElementById("uncheck")
深入浅出ssd
上一篇
2024-08-14 16:12
sketchware源码
下一篇
2024-08-14 15:48