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

📄 deliveryprint.asp

📁 1 除掉了 时间 限制 2 除掉了 人数 限制 改为 500人 原为5人 3 发现一点小缺陷 增加人员的时候没有判断 登陆名是否重复! 自己写吧~~~:) 4 又 是一点缺陷
💻 ASP
字号:
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")
objcheck.CheckUserFunction "po","read"
set objcheck=nothing

dim conn
set conn=server.CreateObject("adodb.connection")
conn.Open connstring

'取打印参数
dim rspara
set rspara=conn.Execute("select * from printsetup where type='打印采购收货单'")
if rspara.EOF then
	Response.Write "打印参数未找到,请检查系统设置 -> 打印参数设置"
	Response.End 
end if

%>
<html>
<head>
<LINK href="../global.css" rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
</head>
<script language="JavaScript">
function window_onload(){
	window.moveTo(-2,-2);
	window.resizeTo(screen.availWidth, screen.availHeight);
}
function doprint(){
	if(form1.linecount.value<=0){
		alert('请选择出货产品')
		return;	
	}
	else{
		form1.print.value='yes';
	}
	var printqty;
	var doprint;
	doprint=false;
	
	for(i=1;i<=form1.linecount.value;i++){
		printqty='printqty'+i;
		if(parseInt(form1.item(printqty).value)>0){
			doprint=true;
		}
	}
	
	if(doprint==false){
		alert("请输入出货数量")
		return;
	}
form1.submit();
}
</script>
<body leftmargin="2" rightmargin="0" topmargin="2"onload="window_onload()">
<%
	set rsd=conn.Execute("select count(*) as counts from poreceiveline where poreceiveid="&request("poreceiveid"))
	c=rsd("counts")
	if c=0 then

	elseif c<=rspara("line") then
		Response.Redirect "deliveryprintresult.asp?poreceiveid="&request("poreceiveid")
	else
		if c mod rspara("line")<>0 then
			totalpages=c \ rspara("line")+1
		else
			totalpages=c \ rspara("line")
		end if
	end if
	%>
	<table>
		<tr>
		<%
		for i=1 to totalpages
		%>
		<td class=title><a href="javascript:opensubwin3('deliveryprintresult.asp?poreceiveid=<%=request("poreceiveid")%>&thepage=<%=i%>&totalpages=<%=totalpages%>','','toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,width=520,height=360,top=150,left=160');">打印第<%=i%>页</a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
		<%
		next
		%></tr>
	</table>
</body>
</html>
<%
  rsd.close
  set rsd=nothing
  rspara.Close
  set rspara=nothing
  conn.Close 
  set conn=nothing
%>

⌨️ 快捷键说明

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