?? out_detail.asp
字號:
<!--#include file="conn.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")
pinming=trim(request.Form("pinming"))
use_dep=request.Form("use_dep")
class1=request.Form("class")
guige=request.Form("guige")
storage=request.form("storage")
uptime=cstr(trim(request.form("uptime")))
uptime1=cstr(trim(request.form("uptime1")))
end_time=cstr(trim(request.form("end_time")))
end_time1=cstr(trim(request.form("end_time1")))
'查詢代碼開始
names=Split(SeachModel,", ")
i=0
sql="select * from out_Store where"
for each name in names
if names(i)="1" then
sql=sql+" and class = '"&class1&"'"
end if
if names(i)="5" then
sql=sql+" and uptime between #"&uptime&"# and #"&uptime1&"#"
end if
if names(i)="6" then
sql=sql+" and end_time between #"&end_time&"# and #"&end_time1&"#"
end if
if names(i)="2" then
sql=sql+" and pinming like '%"&pinming&"%'"
end if
if names(i)="4" then
sql=sql+" and use_dep = '"&use_dep&"'"
end if
if names(i)="3" then
sql=sql+" and guige = '"&guige&"'"
end if
if names(i)="7" then
sql=sql+" and storage = '"&storage&"'"
end if
i=i+1
next
sql=sql+" order by -id"
set rs=server.createobject("adodb.recordset")
sql=Replace(sql, "where and", "where")
%><br />
<table width="920" border="1" cellpadding="0" cellspacing="0" bgcolor="#ffffff" bordercolor="#000000">
<tr><td height="35" colspan="11" align="center"><font size="4" face="黑體"><b>出庫材料匯總明細</b></font></td></tr>
<tr>
<td width="70" height="22" align="center" >出庫日期</td>
<td width="100" align="center" >類 別</td>
<td width="120" align="center" >配件名稱</td>
<td width="100" align="center" >車 型</td>
<td width="40" align="center" >單 位</td>
<td width="80" align="center" >領用部門</td>
<td width="80" align="center" >銷售單價</td>
<td width="80" align="center" >數量</td>
<td width="80" align="center" >銷售金額</td>
<td width="70" align="center" >結帳日期</td>
<td width="100" align="center">備 注</td>
</tr>
<%
dim i
i=0
Loan_num=0
Loan_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" width="10%" align="center" ><%=rs("uptime")%></td>
<td height="22" align="center" ><%=rs("class")%><%if rs("class")="" then%> <%end if%></td>
<td > <%=rs("pinming")%></td>
<td align="center"> <%=rs("guige")%></td>
<td align="center"><%=rs("Unit")%><%if rs("Unit")="" then%> <%end if%></td>
<td > <%=rs("use_dep")%></td>
<td align="right" ><%=rs("Loan_price")%> </td>
<td align="right"><%=rs("Loan_num")%> </td>
<td align="right"><%=rs("Loan_Amount")%> </td>
<td > <%if rs("end_time")="1980-1-1" then%><font color="#FF0000">未結帳</font><%else%><%=rs("end_time")%><%end if%></td>
<td> <%=rs("content")%></td>
</tr>
<%
Loan_num=Loan_num+rs("Loan_num")
Loan_Amount=Loan_Amount+rs("Loan_Amount")
rs.movenext
loop
end if
%>
<tr><td colspan="6" height="30"> 符合查詢條件的出庫記錄總共為 <font color="#cc0000"><%=i%></font> 條</td><td align="right">總計:</td><td align="right"><%=Loan_num%> </td><td align="right"><%=Loan_Amount%> </td><td> </td><td> </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 + -