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

📄 selectquoteproduct.asp

📁 1 除掉了 时间 限制 2 除掉了 人数 限制 改为 500人 原为5人 3 发现一点小缺陷 增加人员的时候没有判断 登陆名是否重复! 自己写吧~~~:) 4 又 是一点缺陷
💻 ASP
字号:
<!--#include file="../config.ini"-->
<%
if request("mod")="save" then
	dim connq
	dim rsq
	set connq=server.CreateObject("adodb.connection")
	set rsq=server.CreateObject("adodb.recordset")
	connq.Open connstring
		rsq.Open "select * from v_quoteline where quoteid="&request("strquoteid")&" order by lineid",connq,1,1
		if not rsq.eof then
			linecount=rsq.recordcount
			k=1:do while not rsq.EOF
				session("model"&k)=rsq("model")
				session("qty"&k)=rsq("qty")
			k=k+1
			rsq.MoveNext
			loop
		end if
		rsq.close

		rsq.Open "select * from deliveryquerytemp",connq,2,3,1
		for i=1 to linecount
			rsq.AddNew 
			rsq("model")=session("model"&i)			
			rsq("queryqty")=session("qty"&i)
			rsq("createdate")=now()
			rsq("createname")=session("username")
			rsq("owner")=session("loginid")
			rsq.Update
		next
		
	set rsq=nothing
	connq.Close 
	set connq=nothing 
%>
<Script Language=JavaScript>
    window.opener.location.reload();
    window.close();
</Script>
<%end if%>
<html>
<head>
<title>产品选择</title>
<Script Language=JavaScript>
function pickup2(x){
	   theForm.strquoteid.value=x;
	   theForm.mod.value="save";
	   theForm.submit();	
}
function bsubmit(){
		if (theForm.StartWith.value==""){
			alert("搜索内容不能为空!")
			theForm.StartWith.focus();
			return;
		}
	   theForm.submit();	
}
</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="">
		<input type=hidden name=strquoteid>
		<input type=hidden name=mod>
 <table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
    <tr> 
      <td width="100%">
  <select name="Find" width="10">
    <option value=Account <%if request("Find")="Account" then Response.Write "selected"%>>客户</option>
    <option value=SicCode <%if request("strfield")="SicCode" then Response.Write "selected"%>>客户代码</option>
    <option value=QuoteNo <%if request("Find")="QuoteNo" then Response.Write "selected"%>>报价单号</option>
  </select>
  <input type="Text" name="StartWith" size="16" value="<%=request("StartWith")%>">
  <input type="button" value="搜索" onclick="javascript:bsubmit();">
  <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>&nbsp;<font color="#FF0000"><strong>&nbsp;※只有初始状态的报价可以查询货期</strong></font></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 width="20%">报价单号</td>
    <td align=center height=22 >客户</td>
    <td align=center width="12%">金额</td>
    </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 status="&"'初始'"&" and " & Find & " like N'%" + trim(StartWith) + "%'"
	'response.write strwhere
	sql = "select top 20 quoteid,account,quoteno,totalamount from v_quote where 1=1 "&strwhere
	set conn=server.CreateObject("adodb.connection")
	set rs=server.CreateObject("adodb.recordset")
	conn.Open connstring
	rs.Open sql,conn,1,1

	set quoteid=rs("quoteid")
	set quoteno=rs("quoteno")
	set account=rs("account")
	set totalamount=rs("totalamount")
	i=1:do while not rs.EOF
	%>
		<tr bgcolor=white>
		        <td align="center"><a href="javascript:pickup2('<%=quoteid%>');"><%=quoteno%></a></td>
		        <td align="center"><%=account%></td>
		        <td align="center"><%if totalamount<>"" then Response.write formatnumber(totalamount,2)%></td>
		</tr>
	<%
	i=i+1
	rs.MoveNext
	loop

	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 + -