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

📄 selectwhseloc.asp

📁 1 除掉了 时间 限制 2 除掉了 人数 限制 改为 500人 原为5人 3 发现一点小缺陷 增加人员的时候没有判断 登陆名是否重复! 自己写吧~~~:) 4 又 是一点缺陷
💻 ASP
字号:
<!--#include file="../config.ini"-->
<%
dim theName : theName = Request("theName")
dim theCode : theWhse = Request("theWhse")
dim theForm : theForm = Request("theForm")
%>
<html>
<head>
<title>期初货位选择</title>
<Script Language=JavaScript>

function pickup(what)
{
	<%
	 response.write("window.opener."+theForm+"."+theName+".value=what;")
	%>
	window.close();
}
function pickup2(whatwhse,whatwhseId,what,whatId){
	   window.opener.<%=theForm%>.<%=theWhse%>.value=whatwhseId;
	   window.opener.<%=theForm%>.<%=theName%>.value=whatId;
	   window.opener.<%=theForm%>.<%=theName%>name.value=what;
	   window.opener.<%=theWhse%>name.innerHTML=whatwhse;
	   window.close();
}
</Script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../global.css" rel=stylesheet type=text/css>
</head>
<body>
<form name="theForm" method="Post" action="">
 <table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
    <tr> 
      <td width="100%">
  <select name="Find" width="10">
    <%                           
if  instr(theName,"location")>0 then                         
    %>                           
          <option value=location <%if request("Find")="location" then Response.Write "selected"%>>货位</option>
          <option value=whse <%if request("Find")="whse" then Response.Write "selected"%>>仓库</option>
          <option value=locationtype <%if request("Find")="locationtype" then Response.Write "selected"%>>货位类型</option>
          <option value=nonnet <%if request("Find")="nonnet" then Response.Write "selected"%>>非净货位</option>

    <%                           
end if
    %>
  </select>
  <input type="Text" name="StartWith" size="16" value="<%=request("StartWith")%>">
  <input type="Submit" name="Submit" value="搜索">
  <input type="Hidden" name="theForm" value="<%=theForm%>"> <input type="Hidden" name="theName" value="<%=theName%>">&nbsp;&nbsp;&nbsp;</td>                           
    <tr bgcolor="#FFFFFF"> 
      <td height="25"><strong><font size="2" class="title">期初货位选择</font></strong></td>
    </tr>
    <tr > 
      <td height="16" background="../images/title.gif">&nbsp;</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height=4></td>
    </tr>
</table>
  <table width="100%" bgcolor=cdcdcd cellspacing=1>
	<tr bgcolor=efefef>
      <%
		if  instr(theName,"location")>0 then
      %>
      	<td align=center height=20>货位</td>
		<td align=center>仓库</td>
		<td align=center>货位类型</td>
		<td align=center>非净货位</td>
      <%
		end if
      %>
    </tr>
    <%
	submit = Request.Form("theName")
	submit = trim(submit)

'if submit <>"" then
	dim sql

	Find = Request.Form("Find")
	StartWith = Request.Form("StartWith")
	if Find <>"" then
		strwhere=" where " & Find & " like N'%" + trim(StartWith) + "%'"
	end if
	
	sql = "select top 100 * from v_location"&strwhere

	set conn=server.CreateObject("adodb.connection")
	set rs=server.CreateObject("adodb.recordset")
	conn.Open connstring
	rs.Open sql,conn,1,1
	
	if not rs.EOF and not rs.BOF then 
		while not rs.EOF
		%>
		<tr bgcolor=white>
		<%if  instr(theName,"location")>0 then%>
		        <td align="center"  nowrap><a href="javascript:pickup2('<%=rs("whse")%>','<%=rs("whseid")%>','<%=rs("location")%>','<%=rs("locationid")%>');"><%= rs("location")%></a></td>
		        <td align="center"  nowrap><%= rs("whse")%></td>
		        <td align="center"  nowrap><%= rs("locationtype")%></td>
		        <td align="center"  nowrap><%if rs("nonnet") then Response.Write "保留或者不可用货位" else Response.Write "正常货位"%></td>
		<%end if%>
		</tr>
		<%
			rs.MoveNext
		wend
	
	else 
		Response.Write "<tr bgcolor=white><td colspan=6>无记录</td></tr>"
	end if
	
	rs.close
	Set rs = nothing
	conn.Close 
	set conn = nothing
'end if
%>
  </table>
 </form>
</body>
</html>

⌨️ 快捷键说明

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