⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cailiao_store_compiles2.asp

📁 asp_erp 源碼 附詳盡使用說明及數據庫
💻 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="0" 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="cailiao_store_Compiles.asp?action=search" >
  <tr><td width="20%" height="30" ><input type="checkbox" name="SeachModel"   value=1>按分类</td><td>
  <select name='fenlei'  style='width:130'>
			<option selected value="">请选择类别</option>
			<%			
			set rs1=server.createobject("adodb.recordset")
		   rs1.open "select * from fenlei",conn,1,1
		   if not rs1.eof then
		   do while not rs1.eof
			%>
			<option value="<%=rs1("fenleiname")%>"><%=rs1("fenleiname")%></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>

	<%else%>

<%
dim SeachModel1
SeachModel1=request.form("SeachModel")
pinming=trim(request.form("pinming"))
fenlei1=request.form("fenlei")
guige=request.form("guige")

'查询代码开始
names=Split(SeachModel1,", ")
i=0
sql="select * from cailiao_Store where"
for each name in names
if names(i)="1" then
sql=sql+" and fenlei = '"&fenlei1&"'"
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")

%>
<%end if%>
<table width="800" border="0" cellpadding="0" cellspacing="0" bgcolor="#D4D0C8" class="tddown">
          <tr class="but"> 
            
            <td width="2<!--#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="0" 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="cailiao_store_Compiles.asp?action=search" >
  <tr><td width="20%" height="30" ><input type="checkbox" name="SeachModel"   value=1>按分类</td><td>
  <select name='fenlei'  style='width:130'>
			<option selected value="">请选择类别</option>
			<%			
			set rs1=server.createobject("adodb.recordset")
		   rs1.open "select * from fenlei",conn,1,1
		   if not rs1.eof then
		   do while not rs1.eof
			%>
			<option value="<%=rs1("fenleiname")%>"><%=rs1("fenleiname")%></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>

	<%else%>

<%
dim SeachModel
SeachModel=request.form("SeachModel")
pinming=trim(request.form("pinming"))
fenlei1=request.form("fenlei")
guige=request.form("guige")

'查询代码开始
names=Split(SeachModel,", ")
i=0
sql="select * from cailiao_Store where"
for each name in names
if names(i)="1" then
sql=sql+" and fenlei = '"&fenlei1&"'"
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="800" border="0" cellpadding="0" cellspacing="0" bgcolor="#D4D0C8" class="tddown">
          <tr class="but"> 
            
            <td width="200" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">类 别</td>
            <td width="300" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">品 名</td>
            <td width="200" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">规 格</td>
            <td width="100" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">单 位</td>
	    <td width="200" 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="5" align="center" class="iframe"> 
                <table width="800" 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="203" align="center"  class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><font color="#CC3300"><%=rs("fenlei")%></font><%if rs("fenlei")="" then%>&nbsp;<%end if%></td>
<td width="303" align="center" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'">&nbsp;<a href="Store.Asp?id=<%=rs("ID")%>&action=edit"><font color="#000099"><%=rs("pinming")%></font></a></td>
<td width="200" align="center" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'">&nbsp;<%=rs("guige")%></td>
<td width="100" align="center" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><font color="#009900"><%=rs("Unit")%></font><%if rs("Unit")="" then%>&nbsp;<%end if%></td>
<td width="200" align="center"  class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><%=Formatnumber(rs("number"),2,-1,0,0)%></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="center">总计:</td><td align="center"><font color="#cc0000"><%=num%></font></td></tr>
				</table>
				
              </td>
          </tr>
        </table>
		<br>
				<table cellpadding="0">
				<form name="search" method="post" action="cailiao_store_Detail.asp" target="_blank" >
				  <tr><td>
				  <input name="SeachModel" type="hidden" value="<%=SeachModel%>">
				  <input name="pinming" type="hidden" value="<%=pinming%>">
				  <input name="fenlei" type="hidden" value="<%=fenlei1%>">
				  <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 + -