📄 poapplyprint.asp
字号:
<SCRIPT language='javascript'>window.resizeTo(670,700);window.focus()</SCRIPT>
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")
objcheck.CheckUserFunction "po","edit"
dim conn
dim rs
set conn=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
conn.Open connstring
'生成编号
if request.QueryString("poapplyno")="" then
stryear=year(date())
strmonth=month(date())
if len(strmonth)=1 then strmonth="0"&strmonth
strday=day(date())
if len(strday)=1 then strday="0"&strday
stryearmonthday=stryear&strmonth&strday
set rsq=conn.execute("select poapplyno from poapply where left(poapplyno,8)='"&stryearmonthday&"' order by poapplyno desc")
if not rsq.eof then
seq=cint(right(rsq("poapplyno"),2))+1
if len(seq)=1 then seq="0"&seq
strpoapplyno=stryearmonthday&seq
else
strpoapplyno=stryearmonthday&"01"
end if
else
strpoapplyno=request.QueryString("poapplyno")
end if
if request.querystring("mod")="" then
response.write "<SCRIPT language=javascript>window.resizeTo(300,210);window.focus()</SCRIPT>"
response.write "<title>订单申请打印提示!</title>"
response.write "<LINK href="&"../global.css"&" rel=stylesheet type=text/css>"
response.write "<p align=center><font color=#660000 size=2><b>"&"<img src=../images/smallprompt.jpg> 打印选项!"&"</b></font><br>"
'if request.QueryString("poapplyno")="" then
response.write "<font size=2 color=red><b>※编号:"&strpoapplyno&"</b></font><br>"
'end if
response.write "<div style=border-color:#330000;border-width:1px;border-style:Dotted;></div>"
response.write "<br>"
response.write "<font size=2><a href="&"poapplyprint.asp?poapplyno="&request("poapplyno")&"&mod=ownername"&">按销售员排序打印"&"</a></font><br>"
response.write "<font size=2><a href="&"poapplyprint.asp?poapplyno="&request("poapplyno")&"&mod=model"&">按型号排序打印"&"</a></font><br>"
response.write "<font size=2><a href="&"poapplyprint.asp?poapplyno="&request("poapplyno")&"&mod=accountname"&">按客户排序打印"&"</a></font><br>"
response.write "<font size=2><a href="&"poapplyprint.asp?poapplyno="&request("poapplyno")&"&mod=deliverydate"&">按预定货期排序打印"&"</a></font><br>"
response.write "<font size=2><a href="&"javascript:window.close()"&">取消打印"&"</a></font><br>"
response.write "<br>"
response.write "<div style=border-color:#330000;border-width:1px;border-style:Dotted;></div>"
response.end
end if
if request.QueryString("poapplyno")<>"" then
rs.Open "select * from v_poapply where poqty<>'' and poapplyno='"&request.QueryString("poapplyno")&"' order by "&request.querystring("mod"),conn,1,1
else
rs.Open "select * from v_poapply where poqty<>'' and poapplyno is null order by "&request.querystring("mod"),conn,1,1
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 selectproduct(){
var theWindow;
theWindow = window.open("selectorderproduct.asp","选择合同产品","toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,width=580,height=500,top=150,left=160");
theWindow.opener = this;
}
</SCRIPT>
<body leftmargin="10" rightmargin="10" topmargin="10">
<table align=center width="590" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="400" align="left" valign="bottom"><font color="#000000" size="4"><strong><font class=title>产品预定申请(<%=now%>)</font></strong></font></td>
<td colspan="3" rowspan="2" align="CENTER">
<table width="100%" border="1" cellpadding="1" cellspacing="0" bordercolor="#000000">
<tr>
<td width="50%" height="30" align="center"><font size=2><b>作成<br>
Made</b></font></td>
<td height="30" align="center"><font size=2><b>责任人<br>
Check</b></font></td>
</tr>
<tr>
<td height="50" align="center"> <%=session("username")%></td>
<td height="50"> </td>
</tr>
</table></td>
</tr>
</table>
<table border=0 cellpadding=0 cellspacing=0 bordercolor="" width="590" align=center >
<tr>
<td height=30 colspan="3" align="left">编号:<%=strpoapplyno%></td>
<td height=30 colspan="4" align="right"> <img src="../images/smallprompt.jpg"> 记录数:<%=Rs.RecordCount%>条
<tr>
<td colspan=7><img src="../images/blackloginbutton.gif" width="590" height="2"></td>
</tr>
<td width="5%" align=center height="22">序号</a></td>
<td align=center>型号</a></td>
<td width="10%" align=center>合同号</a></td>
<td width="28%" align=center>客户</a></td>
<td width="8%" align=center></a>预定量</td>
<td width="12%" align=center>订货量</td>
<td width="10%" align=center>销售员</a></td>
</tr>
<tr>
<td colspan=7><img src="../images/blackloginbutton.gif" width="590" height="2"></td>
</tr>
<%
totalqty=0
i=1:totalprintqtyamount=0:do while not rs.EOF
if rs("poprice")<>"" and rs("poqty")<>"" then totalpoamount=totalpoamount+ccur(rs("poprice"))*rs("poqty")
if rs("discountprice")<>"" then totalorderamount=totalorderamount+ccur(rs("discountprice"))*rs("poapplyqty")
%>
<tr>
<td height="22" align=center><%=i%> <div align="center"></div></td>
<td ><div align="center"><%=rs("model")%> </div></td>
<td ><div align="center"><%=rs("ordernum")%> </div></td>
<td ><div align="center"><%=rs("accountname")%> </div>
<div align="center"></div>
<div align="center"></div></td>
<td ><div align="center"><%=rs("poapplyqty")%> </div></td>
<td ><div align="center"><%=rs("poqty")%> </div></td>
<td ><div align="center"><%=rs("ownername")%> </div></td>
</tr>
<tr bgcolor=#E6FDFF>
<td colspan="7">供应商:<%=rs("poAccount")%> 价格:<%=rs("poprice")%> 希望货期:<%=rs("shipdate")%></td>
</tr>
<tr>
<td colspan=7><img src="../images/blackloginbutton.gif" width="590" height="2"></td>
</tr>
<%
i=i+1
totalqty=totalqty+rs("poqty")
if request.QueryString("poapplyno")="" then
conn.execute("update poapply set poapplyno='"&strpoapplyno&"' where poapplyid="&rs("poapplyid"))
end if
rs.MoveNext
loop
%>
<tr>
<td align=center height="1" colspan=2></td>
</tr>
<tr>
<td align=left height="22" colspan=3> </td>
<td align=right bgcolor="#99CCFF" colspan=4><b>订货总量:<%=totalqty%></b></td>
</tr>
<tr>
<td align=left height="22" colspan=3><img src="../images/smallprompt.jpg"></td>
<td width="36%" align=right bgcolor="#99CCFF" colspan=4><b>预定产品合同金额:<%=(formatnumber(totalorderamount,2))%></b></td>
</tr>
<tr>
<td align=left height="22" colspan=3></td>
<td width="36%" align=right bgcolor="#99CCFF" colspan=4><b>产品订货金额:
<%if objcheck.CheckUserFunction2("po","add") then response.write (formatnumber(totalpoamount,2)) else response.write "--"%>
</b></td>
</tr>
</table>
<%
rs.Close
set rs=nothing
conn.Close
set conn=nothing
set objcheck=nothing
%>
</body>
</html>
<script language=javascript>window.print();</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -