?? out_compiles.asp
字號:
<!--#include file="conn.asp"-->
<!--#include file="top.asp"-->
<!--#include file="checkuser.asp"-->
<head>
<style type="text/css">
<!--
.select {
color: #FFFFFF;
background-color: #08246b;
}
.offline {
filter: Gray;
}
-->
</style>
<title>查找結果</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/main.css" rel="stylesheet" type="text/css">
<SCRIPT language=JavaScript src="css/User_Info_Modify.js"></SCRIPT>
</head>
<body >
<table width="100%" border="1" cellspacing="0" bordercolor="#D6D3CE">
<tr><td align="center">
<%if request("action")<>"search" then%>
<fieldset style="width:95%"><legend>詳細出庫信息查詢</legend>
<table width="90%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
<form name="powersearch" method="post" action="out_Compiles.asp?action=search" >
<tr><td width="20%" height="30" ><input type="checkbox" name="SeachModel" value=1>按分類</td><td>
<select name='class' style='width:130'>
<option selected value="">請選擇類別</option>
<%
set rs1=server.createobject("adodb.recordset")
rs1.open "select * from class",conn,1,1
if not rs1.eof then
do while not rs1.eof
%>
<option value="<%=rs1("classnumber")%>"><%=rs1("classnumber")%></option>
<%
rs1.movenext
loop
end if
rs1.close
set rs1=nothing
%></select></td><td width="20%"><input type="checkbox" name="SeachModel" value=2>
按配件名稱</td>
<td width="30%">
<input name="pinming" type="text" size="20">
</td>
</tr>
<tr><td height="30" >
<input type="checkbox" name="SeachModel" value=3>
按車型</td>
<td><input name="guige" type="text" size="20"></td>
<td><input type="checkbox" name=SeachModel value=4>按領用部門</td>
<td><select name="use_dep" >
<%
set rs=server.createobject("adodb.recordset")
sql="select * from department"
rs.open sql,conn,1,1
if not rs.eof then
do while not rs.eof
%>
<option value="<%=rs("depname")%>"><%=rs("depname")%></option>
<%
rs.movenext
loop
rs.close
set rs=nothing
end if
%>
</select>
</td>
</tr>
<tr><td height="30" ><input type="checkbox" name=SeachModel value=5>按出庫日期</td><td ><INPUT name="uptime" onFocus="show_cele_date(uptime,'','',uptime)" value="<%=year(now())%>-<%=month(now())%>-<%=day(now())%>" size="8"> 到 <INPUT name="uptime1" onFocus="show_cele_date(uptime1,'','',uptime1)" value="<%=year(now())%>-<%=month(now())%>-<%=day(now())%>" size="8"></td><td height="30" ><input type="checkbox" name=SeachModel value=6>按結帳日期</td><td ><INPUT name="end_time" onFocus="show_cele_date(end_time,'','',end_time)" value="<%=year(now())%>-<%=month(now())%>-<%=day(now())%>" size="8"> 到 <INPUT name="end_time1" onFocus="show_cele_date(end_time1,'','',end_time1)" value="<%=year(now())%>-<%=month(now())%>-<%=day(now())%>" size="8"></td></tr>
<tr><td><input type="checkbox" name=SeachModel value=7>按倉庫</td>
<td><select name='storage' style='width:130'>
<%
set rs1=server.createobject("adodb.recordset")
rs1.open "select * from storage order by storage",conn,1,1
if not rs1.eof then
do while not rs1.eof
%>
<option value="<%=rs1("storage")%>"><%=rs1("storage")%></option>
<%
rs1.movenext
loop
end if
rs1.close
set rs1=nothing
%></select>
</td><td align="center" height="30" colspan="2"><input type="submit" name="Submit" value="查詢" style="font-size: 9pt; color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'" title="查詢"></td></tr>
</form>
</table> </fieldset>
<br>
<br>
<fieldset style="width:95%"><legend>單月出庫匯總查詢</legend>
<table width="90%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
<form name="powersearch" method="post" action="Out_Compiles1.asp?action=search" >
<tr><td height="30" width="30%" align="center">選擇查詢日期(1個自然月) </td><td width="30%"> <INPUT name="end_time" onFocus="show_cele_date(end_time,'','',end_time)" value="<%=year(now())%>-<%=month(now())%>-<%=day(now())%>" size="10"> 到 <INPUT name="end_time1" onFocus="show_cele_date(end_time1,'','',end_time1)" value="<%=year(now())%>-<%=month(now())%>-<%=day(now())%>" size="10"></td><td height="30" width="40%"><input type="submit" name="Submit" value="查詢" style="font-size: 9pt; color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'" title="查詢"> * 如:2006年8月則選擇2006-8-1到2006-8-31</td></tr>
</form>
</table> </fieldset>
<br>
<br>
<fieldset style="width:95%"><legend>年度出庫匯總查詢</legend>
<table width="90%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
<form name="powersearch" method="post" action="out_Compiles2.asp?action=search" >
<tr><td height="30" width="30%" align="center">請輸入查詢年份 </td><td width="30%"> <INPUT name="nian" value="<%=year(now())%>" onKeyUp="value=value.replace(/[^\d\.]/g,'')" maxlength="4" size="6"> </td><td height="30" width="40%"><input type="submit" name="Submit" value="查詢" style="font-size: 9pt; color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'" title="查詢"></td></tr>
</form>
</table> </fieldset>
<%else%>
<%
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")
%>
<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="#D4D0C8" class="tddown">
<tr class="but">
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">日期</td>
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">類 別</td>
<td width="12%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">配件名稱</td>
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">車 型</td>
<td width="5%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">單 位</td>
<td width="18%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">領用部門</td>
<td width="8%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">銷售單價</td>
<td width="8%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">數量</td>
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">總金額</td>
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">結帳日期</td>
</tr>
<tr valign="top" bgcolor="#FFFFFF">
<td colspan="12" align="center" class="iframe">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="mouse">
<%
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" ><a href="out_Store.Asp?id=<%=rs("ID")%>&action=edit"><%=rs("uptime")%></a></td>
<td height="18" width="10%" align="center" ><font color="#CC3300"><%=rs("class")%></font><%if rs("class")="" then%> <%end if%></td>
<td height="18" width="12%"> <a href="out_Store.Asp?id=<%=rs("ID")%>&action=edit"><font color="#000099"><%=rs("pinming")%></font></a></td>
<td height="18" width="10%" align="center"> <%=rs("guige")%></td>
<td height="18" width="5%" align="center"><font color="#009900"><%=rs("Unit")%></font><%if rs("Unit")="" then%> <%end if%></td>
<td height="18" width="18%" > <font color="#666666"><%=rs("use_dep")%></font></td>
<td height="18" width="8%" align="right" ><font color="#FF0000"><%=rs("Loan_price")%></font><%if rs("use_price")="" then%> <%end if%></td>
<td height="18" width="8%" align="right"><%=rs("Loan_num")%> </td>
<td height="18" width="10%" align="right"><font color="#FF6600"><%=rs("Loan_Amount")%></font> </td>
<td height="18" width="10%" align="center"><%if rs("end_time")="1980-1-1" then%><font color="#FF0000">未結帳</font><%else%><%=rs("end_time")%><%end if%></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"><font color="#cc0000"><%=Loan_num%></font></td><td align="right"><font color="#cc0000"><%=Loan_Amount%></font></td></tr>
</table>
</td>
</tr>
</table>
<br>
<table cellpadding="0">
<form name="search" method="post" action="out_Detail.asp" target="_blank" >
<tr><td>
<input name="SeachModel" type="hidden" value="<%=SeachModel%>">
<input name="pinming" type="hidden" value="<%=pinming%>">
<input name="class" type="hidden" value="<%=class1%>">
<input name="guige" type="hidden" value="<%=guige%>">
<input name="use_dep" type="hidden" value="<%=use_dep%>">
<input name="storage" type="hidden" value="<%=storage%>">
<input name="uptime" type="hidden" value="<%=uptime%>">
<input name="uptime1" type="hidden" value="<%=uptime1%>">
<input name="end_time" type="hidden" value="<%=end_time%>">
<input name="end_time1" type="hidden" value="<%=end_time1%>">
<input type="submit" name="sub" value="生成明細表"></td></tr></form></table>
<%end if%>
</TD></TR>
</table>
</body>
</html>
<!--#include file="footer.htm"--></TD>
</BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -