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

📄 selectpoqtyproduct.asp

📁 1 除掉了 时间 限制 2 除掉了 人数 限制 改为 500人 原为5人 3 发现一点小缺陷 增加人员的时候没有判断 登陆名是否重复! 自己写吧~~~:) 4 又 是一点缺陷
💻 ASP
字号:
<!--#include file="../config.ini"-->
<%
dim theName : theName = Request("theName")
dim theForm : theForm = Request("theForm")
dim theCode : theCode = Request("theCode")
dim thePrice : thePrice = Request("thePrice")
dim theSpecialPriceNo:theSpecialPriceNo=request("theSpecialPriceNo")
dim theAccount :theAccount=request("theAccount")
dim theQty : theQty=Request("theQty")
%>
<html>
<head>
<title>select</title>
<Script Language=JavaScript>
function pickup(what)
{
	<%
	 response.write("window.opener."+theForm+"."+theName+".value=what;")
	%>
	window.close();
}
function pickup2(what,whatId,whatcode,whatSpecialPrice,theSpecialPriceNo,theQty){
	   window.opener.<%=theForm%>.<%=theCode%>.value=whatcode;
	   window.opener.<%=theForm%>.<%=theName%>.value=whatId;
	   window.opener.<%=theName%>name.innerHTML=what;
	   window.opener.<%=theForm%>.<%=theQty%>.value=theQty;
	   window.opener.<%=theForm%>.<%=thePrice%>.value=whatSpecialPrice;
	   window.opener.<%=theForm%>.<%=theSpecialPriceNo%>.value=theSpecialPriceNo;
	   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="">
  <select name="Find" width="10">
    <%                           
if  instr(theName,"product")>0 then                         
    %>                           
    <option value=model <%if request("Find")="product" then Response.Write "selected"%>>型号</option>
    <option value=productcode <%if request("Find")="productcode" then Response.Write "selected"%>>货号</option>
    <option value=producttype <%if request("Find")="producttype" then Response.Write "selected"%>>产品类型</option>
    <option value=shortkey <%if request("Find")="shortkey" then Response.Write "selected"%>>助记符</option>
    <option value=price <%if request("Find")="price" then Response.Write "selected"%>>价格</option>
    <option value=retail_price <%if request("Find")="retail_price" 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;                           
</form>
<div>
<table width="100%" bgcolor=cdcdcd cellspacing=1>
	<tr bgcolor=f1f1f1>
      <%
		if  instr(theName,"product")>0 then
      %>
    <td align=center height=20>货号</td>
    <td align=center>型号</td>
    <td align=center>数量1</td>
    <td align=center>价格1</td>
    <td align=center>数量2</td>
    <td align=center>价格2</td>
    <td align=center>数量3</td>
    <td align=center>价格3</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=" and " & Find & " like N'%" + trim(StartWith) + "%'"
	end if
	
	sql = "select top 100 * from v_poprice where disable=0 and popricetype='productqty' and accountid="&theAccount&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,"product")>0 then%>
		        <td align="center"  nowrap><%=rs("productcode")%></td>
		        <td align="center"  nowrap><%=rs("model")%></td>
		        <td align="center"  nowrap><a href="javascript:pickup2('<%=rs("model")%>','<%=rs("productid")%>','<%=rs("productcode")%>','<%=rs("price1")%>','<%=rs("specialpriceno")%>','<%=rs("qty1")%>');"><font color=red><%=rs("qty1")%></font></a></td>
		        <td align="center"  nowrap><a href="javascript:pickup2('<%=rs("model")%>','<%=rs("productid")%>','<%=rs("productcode")%>','<%=rs("price1")%>','<%=rs("specialpriceno")%>','<%=rs("qty1")%>');"><font color=red><%=rs("price1")%></font></a></td>
		        <td align="center"  nowrap><a href="javascript:pickup2('<%=rs("model")%>','<%=rs("productid")%>','<%=rs("productcode")%>','<%=rs("price2")%>','<%=rs("specialpriceno")%>','<%=rs("qty2")%>');"><font color=green><%=rs("qty2")%></font></a></td>
		        <td align="center"  nowrap><a href="javascript:pickup2('<%=rs("model")%>','<%=rs("productid")%>','<%=rs("productcode")%>','<%=rs("price2")%>','<%=rs("specialpriceno")%>','<%=rs("qty2")%>');"><font color=green><%=rs("price2")%></font></a></td>
		        <td align="center"  nowrap><a href="javascript:pickup2('<%=rs("model")%>','<%=rs("productid")%>','<%=rs("productcode")%>','<%=rs("price3")%>','<%=rs("specialpriceno")%>','<%=rs("qty3")%>');"><font color=blue><%=rs("qty3")%></font></a></td>
		        <td align="center"  nowrap><a href="javascript:pickup2('<%=rs("model")%>','<%=rs("productid")%>','<%=rs("productcode")%>','<%=rs("price3")%>','<%=rs("specialpriceno")%>','<%=rs("qty3")%>');"><font color=blue><%=rs("price3")%></font></a></td>
		        <td align="center"  nowrap><%=rs("specialpriceno")%></td>
		<%end if%>
		</tr>
		<%
			rs.MoveNext
		wend
	
	else 
		Response.Write "<tr bgcolor=white><td colspan=9>无记录</td></tr>"
	end if
	
	rs.close
	Set rs = nothing
	conn.Close 
	set conn = nothing
'end if
%>
  </table>
</div>
</body>
</html>

⌨️ 快捷键说明

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