?? product_list_detail.asp
字號:
<!--#include file="conn.asp"-->
<!--#include file="checkuser.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="css/main.css" rel="stylesheet" type="text/css">
<title>∷企業生產管理信息系統∷</title>
<!--media=print 這個屬性可以在打印時有效-->
<style media=print>
.Noprint{display:none;}
.PageNext{page-break-after: always;}
</style>
</head>
<body leftmargin="30" topmargin="20">
<%
dim SeachModel
SeachModel=request.form("SeachModel")
Supplier=request.form("Supplier")
banwei1=request.form("banwei")
class1=request.form("class")
uptime=cstr(trim(request.form("uptime")))
uptime1=cstr(trim(request.form("uptime1")))
nian=cstr(trim(request.form("nian")))
'查詢代碼開始
names=Split(SeachModel,", ")
i=0
sql="select * from product_In_Store where"
for each name in names
if names(i)="1" then
sql=sql+" and banwei = '"&banwei1&"'"
end if
if names(i)="5" then
sql=sql+" and uptime between #"&uptime&"# and #"&uptime1&"#"
end if
if names(i)="7" then
sql=sql+" and uptime between #"&uptime&"# and #"&uptime1&"#"
end if
if names(i)="8" then
sql=sql+" and year(uptime) = '"&nian&"'"
end if
if names(i)="2" then
sql=sql+" and class like '%"&class1&"%'"
end if
if names(i)="4" then
sql=sql+" and Supplier = '"&Supplier&"'"
end if
if names(i)="3" then
sql=sql+" and guige = '"&guige&"'"
end if
i=i+1
next
sql=sql+" order by -id"
set rs=server.createobject("adodb.recordset")
sql=Replace(sql, "where and", "where")
%>
<table width="960" border="1" cellpadding="0" cellspacing="0" bgcolor="#ffffff" bordercolor="#000000">
<tr><td colspan="12" height="50" align="center"><font size="4" face="黑體"><b>生產產品匯總明細</b></font> </td></tr>
<tr>
<td width="90" height="18" align="center" >生產日期</td>
<td width="75" height="18" align="center" >爐號</td>
<td width="75" height="18" align="center" >班位</td>
<td width="75" height="18" align="center" >優級品</td>
<td width="75" height="18" align="center" >一級品</td>
<td width="75" height="18" align="center" >合格品</td>
<td width="75" height="18" align="center" >等外品</td>
<td width="75" height="18" align="center" >總產量</td>
<td width="75" height="18" align="center" >存儲倉庫</td>
</tr>
<%
dim i
i=0
use_num=0
use_Amount=0
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<tr><td><br><br><center>還沒有符合條件的查詢!</center><br><br></td></tr>"
else
do while not rs.eof
i=i+1
%>
<tr>
<td height="18" align="center" width="90"><%=rs("uptime")%></td>
<td align="center" width="75"><%=rs("Supplier")%></td>
<td align="center" width="75"><%=rs("banwei")%></td>
<td align="center" width="75"><%=Formatnumber(rs("youjipin"),2,-1,0,0)%></td>
<td align="center" width="75"><%=Formatnumber(rs("yijipin"),2,-1,0,0)%></td>
<td align="center" width="75"><%=Formatnumber(rs("hegepin"),2,-1,0,0)%></td>
<td align="center" width="75"><%=Formatnumber(rs("dengwaipin"),2,-1,0,0)%></td>
<td align="center" width="75"><%=Formatnumber(rs("use_num"),2,-1,0,0)%></td>
<td align="center" width="75"><%=rs("class")%></td>
</tr>
<%
youjipin_num=youjipin_num+rs("youjipin")
yijipin_num=yijipin_num+rs("yijipin")
hegepin_num=hegepin_num+rs("hegepin")
dengwaipin_num=dengwaipin_num+rs("dengwaipin")
use_num=use_num+rs("use_num")
rs.movenext
loop
end if
%>
<tr><td colspan="9" height="30"> 符合查詢條件的入庫記錄總共為 <font color="#cc0000"><%=i%></font> 條</td></tr>
<tr>
<td height="18" colspan="3" align="center" width="90"><font color=red>總計:</font></td>
<td align="center" width="75"><font color=red><%=Formatnumber(youjipin_num,2,-1,0,0)%></font></td>
<td align="center" width="75"><font color=red><%=Formatnumber(yijipin_num,2,-1,0,0)%></font></td>
<td align="center" width="75"><font color=red><%=Formatnumber(hegepin_num,2,-1,0,0)%></font></td>
<td align="center" width="75"><font color=red><%=Formatnumber(dengwaipin_num,2,-1,0,0)%></font></td>
<td align="center" width="75"><font color=red><%=Formatnumber(use_num,2,-1,0,0)%></font></td>
<td align="center" width="75"> </td>
</tr>
</table>
<table>
<tr><td height="30" colspan="10" align="center"><OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0 VIEWASTEXT>
</OBJECT>
<input type=button value=打印 onClick="document.all.WebBrowser.ExecWB(6,1)" class="NOPRINT">
<input type=button value=直接打印 onClick="document.all.WebBrowser.ExecWB(6,6)" class="NOPRINT">
<input type=button value=頁面設置 onClick="document.all.WebBrowser.ExecWB(8,1)" class="NOPRINT">
<input type=button value=打印預覽 onClick="document.all.WebBrowser.ExecWB(7,1)" class="NOPRINT">
</td></tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -