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

📄 selectpolinetoprint.asp

📁 1 除掉了 时间 限制 2 除掉了 人数 限制 改为 500人 原为5人 3 发现一点小缺陷 增加人员的时候没有判断 登陆名是否重复! 自己写吧~~~:) 4 又 是一点缺陷
💻 ASP
字号:
<!--#include file="../config.ini"-->
<html>
<head>
<title>添加采购细目</title>
<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=pono <%if request("Find")="pono" then Response.Write "selected"%>>采购单号</option>
          <option value=slipno <%if request("Find")="slipno" then Response.Write "selected"%>>SLIP编号</option>
          <option value=amount <%if request("Find")="amount" then Response.Write "selected"%>>金额</option>
          <option value=productcode <%if request("Find")="productcode" then Response.Write "selected"%>>货号</option>
          <option value=model <%if request("Find")="model" then Response.Write "selected"%>>型号</option>
          <option value=specialpriceno <%if request("Find")="specialpriceno" then Response.Write "selected"%>>特价编号</option>
  </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" class=black value="<%=theName%>">&nbsp;&nbsp;&nbsp;</td>                           
    <tr bgcolor="#FFFFFF"> 
      <td height="25"><strong><font size="2" class="title">选择<%=session("SelectName")%></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=f1f1f1>
		<td align=center nowrap>采购单号</td>
		<td align=center nowrap>供应商</td>
		<td align=center nowrap>SLIP编号</td>
      	<td align=center height=20 nowrap>货号</td>
		<td align=center nowrap>型号</td>
		<td align=center nowrap>数量</td>
		<td align=center nowrap>已收数量</td>
		<td align=center nowrap>特价编号</td>
		<td align=center nowrap>备注</td>
    </tr>
    <%
	dim sql

	Find = Request.Form("Find")
	StartWith = Request.Form("StartWith")
	strwhere=" where 1=1"
	if Find <>"" then
		strwhere=strwhere&" and " & Find & " like N'%" + trim(StartWith) + "%'"
	end if
	sql = "select top 100 * from v_poline_history"&strwhere
	set conn=server.CreateObject("adodb.connection")
	set rs=server.CreateObject("adodb.recordset")
	conn.Open connstring

	rs.Open sql,conn,1,1
		while not rs.EOF 
		%>
		<tr bgcolor=white>
		<td align=center nowrap><%=rs("pono")%></td>
		<td align=center nowrap><%=rs("account")%></td>
		<td align=center nowrap><%=rs("slipno")%></td>
		<td align=center height=18 nowrap><a style="cursor:hand" onclick="javascript:if('<%=request("accountid")%>'=='<%=rs("accountid")%>'||'<%=request("accountid")%>'==''){window.location='selectpolinetoprint.asp?lineid=<%=rs("lineid")%>'}else{alert('不同供应商的采购细目生成一个收货单')}"><%=rs("productcode")%></a></td>
		<td align=center nowrap><%=rs("model")%></td>
		<td align=center nowrap><%=rs("qty")%></td>
		<td align=center nowrap><%=rs("issuedqty")%></td>
		<td align=center nowrap><%=rs("specialpriceno")%></td>
		<td align=center nowrap><%=rs("description")%></td>       
		</tr>
		<%
			rs.MoveNext
		wend
		%>
  </table>
  <%	
	rs.close
	Set rs = nothing
	conn.Close 
	set conn = nothing
%>
</form>

<%
if Request.QueryString("lineid")<>"" then
	dim conn
	set conn=server.CreateObject("adodb.connection")
	conn.open connstring
	set rs=conn.execute("select * from podeliverytemp where lineid="&Request.QueryString("lineid")&" and userid='"&session("loginid")&"'")
	if rs.EOF then
		set rs=conn.execute("select * from v_poline where lineid="&Request.QueryString("lineid"))
		sql="insert into podeliverytemp(poid,lineid,pono,productid,slipno,specialpriceno,productcode,Model,qty,issuedqty,receiveqty,price,amount,userid) values("&rs("poid")&","&rs("lineid")&",'"&rs("pono")&"','"&rs("productid")&"','"&rs("slipno")&"','"&rs("specialpriceno")&"','"&rs("productcode")&"','"&rs("Model")&"',"&rs("qty")&","&rs("issuedqty")&","&rs("qty")-rs("issuedqty")&","&rs("price")&","&rs("amount")&",'"&session("loginid")&"')"
		conn.execute(sql)
		%>
			<script language=javascript>
				window.opener.location.reload();
				window.close();
			</script>
		<%
	else
	%>
			<script language=javascript>
				alert("该细目已经在待打印列表中了")
			</script>
	<%
	end if
end if
%>
</body>
</html>

⌨️ 快捷键说明

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