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

📄 selectprotoquoteorder.asp

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

function pickup(what)
{
	<%
	 response.write("window.opener."+theForm+"."+theName+".value=what;")
	%>
	window.close();
}
function pickup2(name,what,whatId,whatcode,whatPrice,discount,discountprice){
	   window.opener.<%=theForm%>.<%=theCode%>.value=whatcode;
	   window.opener.<%=theForm%>.<%=theName%>.value=whatId;
	   window.opener.<%=theForm%>.<%=thePrice%>.value=whatPrice;
	   window.opener.<%=theForm%>.<%=theDiscount%>.value=discount;
	   window.opener.<%=theForm%>.<%=theDiscountPrice%>.value=discountprice;
	   if (name!=''&&what==''){
	   window.opener.<%=theName%>name.innerHTML=name;}
	   
	   if (what!=''&&name==''){
	   window.opener.<%=theName%>name.innerHTML=what;}
	   
	   if (name!=''&&what!=''){
	   window.opener.<%=theName%>name.innerHTML=what+' / '+name;}
	   
	   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">              
    <option value=model <%if Request.Form("Find")="model" then Response.Write "selected"%>>型号</option>
    <option value=productcode <%if request.Form("Find")="productcode" then Response.Write "selected"%>>货号</option>
    <option value=producttype <%if request.Form("Find")="producttype" then Response.Write "selected"%>>产品类型</option>
    <option value=shortkey <%if request.Form("Find")="shortkey" then Response.Write "selected"%>>助记符</option>
    <option value=price <%if request.Form("Find")="price" then Response.Write "selected"%>>价格</option>
    <option value=retail_price <%if request.Form("Find")="retail_price" then Response.Write "selected"%>>市场价</option>
  </select>
  <input type="Text" name="StartWith" size="16" value="<%=Request.Form("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>
    <td align=center height=20>货号</td>
    <td align=center>型号</td>
    <td align=center>产品类型</td>
    <td align=center>可用量</td>
    <td align=center>市场价</td>
    <td align=center>政策价</td>
    </tr>
    <%
	if Request.Form("find") <>"" then
		strwhere=" and " & Request.Form("Find") & " like '%" & Request.Form("StartWith") & "%'"
	end if
	
	sql = "select top 100 retail_price,policyprice,accountid,name,model,productid,productcode,discount,qty_on_hand,qty_rsvd,producttype from v_priceforquoteorder_all where (accountid="&theAccount&" or accountid=-1) and disable=0 "&strwhere
	'Response.Write sql
	set conn=server.CreateObject("adodb.connection")
	conn.Open connstring
	set rs=conn.Execute(sql)
	
	set retail_price=rs("retail_price")
	set policyprice=rs("policyprice")
	set accountid=rs("accountid")
	set name=rs("name")
	set model=rs("model")
	set productid=rs("productid")
	set productcode=rs("productcode")
	set discount=rs("discount")
	set qty_on_hand=rs("qty_on_hand")
	set qty_rsvd=rs("qty_rsvd")
	set producttype=rs("producttype")
	if not rs.EOF and not rs.BOF then 
		do while not rs.EOF
		if accountid=-1 then
			strprice=retail_price
		else
			strprice=policyprice
		end if	
	%>
		<tr bgcolor=white>
		        <td align="center"  nowrap><a href="javascript:pickup2('<%=name%>','<%=model%>','<%=productid%>','<%=productcode%>','<%=Retail_Price%>','<%=discount%>','<%=strprice%>');"><%=productcode%></a></td>
		        <td align="center"  nowrap><a href="javascript:pickup2('<%=name%>','<%=model%>','<%=productid%>','<%=productcode%>','<%=Retail_Price%>','<%=discount%>','<%=strprice%>');"><%=model%></a></td>
		        <td align="center"  nowrap><a href="javascript:pickup2('<%=name%>','<%=model%>','<%=productid%>','<%=productcode%>','<%=Retail_Price%>','<%=discount%>','<%=strprice%>');"><%=producttype%></a></td>
		        <td align="center"  nowrap><a href="javascript:pickup2('<%=name%>','<%=model%>','<%=productid%>','<%=productcode%>','<%=Retail_Price%>','<%=discount%>','<%=strprice%>');"><%=qty_on_hand-qty_rsvd%></a></td>
		        <td align="center"  nowrap><a href="javascript:pickup2('<%=name%>','<%=model%>','<%=productid%>','<%=productcode%>','<%=Retail_Price%>','<%=discount%>','<%=strprice%>');"><%=Retail_Price%></a></td>
		        <td align="center"  nowrap><a href="javascript:pickup2('<%=name%>','<%=model%>','<%=productid%>','<%=productcode%>','<%=Retail_Price%>','<%=discount%>','<%=strprice%>');"><font color=red><%if csng(policyprice)<>0 then response.write policyprice%></font></a></td>
		</tr>
		<%
			rs.MoveNext
		loop
	
	else 
		Response.Write "<tr bgcolor=white><td colspan=6>无记录</td></tr>"
	end if
	
	rs.close
	Set rs = nothing
	conn.Close 
	set conn = nothing
%>
  </table>
 </form>
</body>
</html>

⌨️ 快捷键说明

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