?? store_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="70%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
<form name="powersearch" method="post" action="store_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 align="center" 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><br>
<fieldset style="width:95%"><legend>庫存匯總日期段查詢</legend>
<table width="70%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
<form name="powersearch" method="post" action="store_Compiles1.asp?action=search1" >
<tr><td width="20%" height="30" >請選擇分類</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%">請選擇日期</td>
<td width="30%">
<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 height="30" colspan="4" align="center">
<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="300" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
<form name="powersearch" method="post" action="store_Compiles2.asp?action=search" >
<tr><td height="30" width="25%" align="center">起始年份 </td><td width="25%"> <INPUT name="nian" value="2003" onKeyUp="value=value.replace(/[^\d\.]/g,'')" maxlength="4" size="6"> </td><td height="25" width="30%" align="center">截止年份 </td><td width="25%"> <INPUT name="nian1" value="<%=year(now())%>" onKeyUp="value=value.replace(/[^\d\.]/g,'')" maxlength="4" size="6"> </td></tr><tr><td height="30" colspan="4" align="center"><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"))
class1=request.form("class")
guige=request.form("guige")
'查詢代碼開始
names=Split(SeachModel,", ")
i=0
sql="select * from Store where"
for each name in names
if names(i)="1" then
sql=sql+" and class = '"&class1&"'"
end if
if names(i)="2" then
sql=sql+" and pinming like '%"&pinming&"%'"
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="80%" border="0" cellpadding="1" cellspacing="0" bgcolor="#D4D0C8" class="tddown">
<tr class="but">
<td width="20%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">類 別</td>
<td width="30%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">配件名稱</td>
<td width="20%" 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="20%" 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
num=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="20%" align="center" ><font color="#CC3300"><%=rs("class")%></font><%if rs("class")="" then%> <%end if%></td>
<td height="18" width="30%"> <a href="Store.Asp?id=<%=rs("ID")%>&action=edit"><font color="#000099"><%=rs("pinming")%></font></a></td>
<td height="18" width="20%" align="center"> <%=rs("guige")%></td>
<td height="18" width="10%" align="center"><font color="#009900"><%=rs("Unit")%></font><%if rs("Unit")="" then%> <%end if%></td><td height="18" width="20%" align="right" ><%=rs("number")%> </td>
</tr>
<%
num=num+rs("number")
rs.movenext
loop
end if
%>
<tr><td colspan="3" height="30"> 符合查詢條件的庫存記錄總共為 <font color="#cc0000"><%=i%></font> 條</td><td align="right">總計:</td><td align="right"><font color="#cc0000"><%=num%></font></td></tr>
</table>
</td>
</tr>
</table>
<br>
<table cellpadding="0">
<form name="search" method="post" action="store_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 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 + -