⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bldyselectqt.asp

📁 OFFICE办公自动化
💻 ASP
字号:
<%
'功能:公文办理定义编辑/增加
'作者:展亮
'时间:2003-12-11 21:50
%>

<!--#include file="../inc/NoCatch.asp"-->
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/Conn.asp"-->
<!--#include file="../inc/Const.asp"-->

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/main.css">
<title>选择工作点</title>
<SCRIPT LANGUAGE=javascript FOR=window EVENT=onload>
<!--
	var s = new Object();
	s.stype=""
	window.returnValue = s;
//-->
</SCRIPT>
<script language="javascript">
   function tjfun(s1,s2)
   {
      var ss = new Object();
        ss.bh=s1;
        ss.mc=s2;
        ss.stype="ok"
        window.returnValue=ss;

        window.close();
   }

</script>
</head>
<%
	set rs=server.CreateObject("adodb.recordset")
	        sql="select blgzbh,blgzmc from tbioaOffice_Flow_Bldy"
	        rs.open sql,oConn,1,1

%>

<body class="tdbottom">
<table align="center" width="420"><tr><td>
<table width="100%" border=0 align=center cellpadding=2 cellspacing=1 class="tab">
	<tr>
		<td class="tdtop2" colspan="2">
			<img border="0" src="../images/icon_title.gif" align="left">
			选择工作点
		</td>
	</tr>
	<form method=post name=formEdit>
	<tr class=td2>
		<td colspan=2 class=inputareacell>
			<table width=100%>
				<tr align=center>
					<td>可选工作点</td>
					<td>&nbsp;</td>
					<td>已选工作点</td>
				</tr>
				<tr align=center>
					<td>
						<select id=dxgzd name=dxgzd style="display:inline" size=9 rows=9 style="width: 100%" ondblclick="vbscript:dosone">

						</select>
					</td>
					<td valign=center width=40>
						<span valign=center>
							<input type="button" value=">>" onclick="vbscript:dosall" name="B0" style="font-weight: bold; width: 32" class="button0" onmouseout=className="button0" onmouseover=className="button1"><hr>
							<input type="button" value=">" onclick="vbscript:dosone" name="B1" style="font-weight: bold; width: 32" class="button0" onmouseout=className="button0" onmouseover=className="button1"><hr>
							<input type="button" value="<" onclick="vbscript:dodsone" name="B2" style="font-weight: bold; width: 32" class="button0" onmouseout=className="button0" onmouseover=className="button1"><hr>
							<input type="button" value="<<" onclick="vbscript:dosnone" name="B3" style="font-weight: bold; width: 32" class="button0" onmouseout=className="button0" onmouseover=className="button1">
						</span>
					</td>
					<td class=row>
						<select id=yxgzd name=yxgzd style="display:inline" size=9 rows=9 style="width: 100%" ondblclick="vbscript:dodsone">
						</select>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	</form>
</table></td></tr></table>
<table width=100%>
  <tr>
  	<td align="middle" colspan="2">
  		<input type=button class="button0" onmouseout=className="button0" onmouseover=className="button1" value=确定 name="bQD" id="bQD" onclick="vbscript:doSave">
  		<input type=button class="button0" onmouseout=className="button0" onmouseover=className="button1" value=放弃 name="bFQ" id="bFQ" onclick='vbscript:window.close'>
  	</td>
  </tr>
</table>

<script language="vbscript">
     function check(bh,cyxbh)
        dim sign
            sign=false
        if instr(1,","&cyxbh&",",","&bh&",")<>0 then

           sign=true
        end if

        check=sign
     end function

     dim e,yxbh
     dim array_gzd()
     set k=window.dialogArguments
 	     yxbh=k.bh


     set k=nothing
     <%

	    if not rs.EOF and not rs.bof then%>
	           i=0
	           redim array_gzd(<%=rs.recordcount-1%>,1)
	           <%do while not rs.eof%>

	              array_gzd(i,0)="<%=rs("blgzbh")%>"
	              array_gzd(i,1)="<%=server.htmlencode(rs("blgzmc"))%>"

	              i=i+1
	           <% rs.movenext
	           loop
	     end if%>


      'alert ubound(array_gzd,1)
      for i=lbound(array_gzd,1) to ubound(array_gzd,1)
          if check(array_gzd(i,0),yxbh) then
              Set e = Document.createElement("OPTION")
                  e.value=array_gzd(i,0)
	              e.text=array_gzd(i,1)
	          formEdit.yxgzd.options.add e
          else
              Set e = Document.createElement("OPTION")
                  e.value=array_gzd(i,0)
	              e.text=array_gzd(i,1)
	              formEdit.dxgzd.options.add e
          end if
      next

      sub dosall
		dim i,j,ba
		for i= 0 to formedit.dxgzd.options.length-1
			ba=0
			for j=0 to formedit.yxgzd.length-1
				if formedit.dxgzd.item(i).value=formedit.yxgzd.item(j).value then
					ba=1
					exit for
				end if
			next
			if ba=0 then
				Set e = Document.createElement("OPTION")
				e.value=formedit.dxgzd.item(i).value
				e.text=formedit.dxgzd.item(i).text
				formedit.yxgzd.options.add e
			end if
		next
		for i= 0 to formedit.dxgzd.options.length-1
			formedit.dxgzd.options.remove 0
		next
	end sub

	sub dosnone
		dim i,j,ba
		for i= 0 to formedit.yxgzd.options.length-1
			ba=0
			for j=0 to formedit.dxgzd.length-1
				if formedit.yxgzd.item(i).value=formedit.dxgzd.item(j).value then
					ba=1
					exit for
				end if
			next
			if ba=0 then
				Set e = Document.createElement("OPTION")
				e.value=formedit.yxgzd.item(i).value
				e.text=formedit.yxgzd.item(i).text
				formedit.dxgzd.options.add e
			end if
		next
		for i= 0 to formedit.yxgzd.options.length-1
			formedit.yxgzd.options.remove 0
		next
	end sub

	sub dodsone
		dim i,j,ba
		if formedit.yxgzd.options.length=0 then exit sub
		if formedit.yxgzd.selectedIndex<0 then exit sub
		ba=0
		for j=0 to formedit.dxgzd.length-1
			if formedit.yxgzd.item(formedit.yxgzd.selectedIndex).value=formedit.dxgzd.item(j).value then
				ba=1
				exit for
			end if
		next
		if ba=0 then
			Set e = Document.createElement("OPTION")
			e.value=formedit.yxgzd.item(formedit.yxgzd.selectedIndex).value
			e.text=formedit.yxgzd.item(formedit.yxgzd.selectedIndex).text
			formedit.dxgzd.options.add e
		end if
		formedit.yxgzd.options.remove formedit.yxgzd.selectedIndex
	end sub

	sub dosone
		dim i,j,ba
		if formedit.dxgzd.options.length=0 then exit sub
		if formedit.dxgzd.selectedIndex<0 then exit sub
		ba=0
		for j=0 to formedit.yxgzd.length-1
			if formedit.dxgzd.item(formedit.dxgzd.selectedIndex).value=formedit.yxgzd.item(j).value then
				ba=1
				exit for
			end if
		next
		if ba=0 then
			Set e = Document.createElement("OPTION")
			e.value=formedit.dxgzd.item(formedit.dxgzd.selectedIndex).value
			e.text=formedit.dxgzd.item(formedit.dxgzd.selectedIndex).text
			formedit.yxgzd.options.add e
		end if
		formedit.dxgzd.options.remove formedit.dxgzd.selectedIndex
	end sub

	function doSave
		dim i
		dim s1,s2
		s1=""
		s2=""
		for i=0 to formedit.yxgzd.length-1
			s1=s1 & "," & formedit.yxgzd.item(i).value
			s2=s2 & " " & formedit.yxgzd.item(i).text
		next
		if s1<>"" then
			s1=mid(s1,2)
			s2=mid(s2,2)
		end if

		call tjfun(s1,s2)
	end function
</script>
<% rs.close
   set rs=nothing
   oConn.close
   set oConn=nothing
%>
</BODY>
</html>



 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -