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

📄 sales_in_compiles.asp

📁 asp_erp 源碼 附詳盡使用說明及數據庫
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
dim SeachModel
SeachModel=request.form("SeachModel")
chehao=trim(request.form("chehao"))
yonghu=request.form("yonghu")
chanpin1=request.form("chanpin")
baozhuang=request.form("baozhuang")
uptime=cstr(trim(request.form("uptime")))
uptime1=cstr(trim(request.form("uptime1")))
daka=cstr(trim(request.form("daka")))
daka1=cstr(trim(request.form("daka1")))
nian=request.form("nian")

'查询代码开始
names=Split(SeachModel,", ")
i=0
sql="select * from sales_In_Store where"
for each name in names
if names(i)="2" then
sql=sql+" and chanpin = '"&chanpin1&"'"
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 daka  between  #"&daka&"# and #"&daka1&"#"
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)="1" then
sql=sql+" and chehao like '%"&chehao&"%'"
end if
if names(i)="4" then
sql=sql+" and yonghu = '"&yonghu&"'"
end if
if names(i)="3" then
sql=sql+" and baozhuang = '"&baozhuang&"'"
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" >
          <tr >  
<td height=26 background="images/background.gif">
<b><font color="#ffffff">查 询 结 果 列 表</font></b>

</td>
</tr>
</table>
<table id = "PrintA" width="800" border="1" cellpadding="0" cellspacing="1" bordercolor="#EFEADD">
          <tr class="but"> 

			<td width="80" 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="80" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">运输数量</td>
			<td width="80" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">运价</td>

			<td width="80" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">运费</td>
			<td width="80" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">预付运费</td>

			<td width="80" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">卸货重量</td>
			<td width="80" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">短吨</td>
			<td width="80" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">扣除运费</td>


			<td width="80" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">剩余运费</td>
			<td width="80" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">卸货日期</td>
          </tr>
          <tr valign="top"> 
            <td colspan="11" align="center" class="iframe"> 
                <table width="800" border="1" cellpadding="0" cellspacing="1" bordercolor="#EFEADD">
                  <% 
				  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 onmouseover="this.bgColor='#73A475';" onmouseout="this.bgColor=''"">
<td width="80" height="18" align="center" ><%=rs("uptime")%></td>
<td width="100" align="center"><%=rs("chehao")%></td>
<td width="80" align="center"><%=Formatnumber(rs("zongliang"),2,-1,0,0)%></td>
<td width="80" align="center"><%=FormatCurrency(rs("yunjia"),2,-1,,0)%></td>
<td width="80" align="center"><%=FormatCurrency(rs("yunfei"),2,-1,,0)%></td>
<td width="80" align="center"><%=FormatCurrency(rs("yufukuan"),2,-1,,0)%></td>
<td width="80" align="center"><%=Formatnumber(rs("shijishu"),2,-1,0,0)%></td>
<td width="80" align="center">
<%if rs("kouchushu")=rs("zongliang") then%>
货未到站
<%else%>
<font color=blue>
<%=Formatnumber(rs("kouchushu"),2,-1,0,0)%>
</font>
<%end if%>
</td>
<td width="80" align="center"><%=FormatCurrency(rs("kouchuyunfei"),2,-1,,0)%></td>
<td width="80" align="center"><%=FormatCurrency(rs("shengyukuan"),2,-1,,0)%></td>
<td width="80" align="center"><%=rs("end_time")%></td>
</tr>

		  
                  <%
zongliang=zongliang+rs("zongliang")
yunjia=yunjia+rs("yunjia")
kouchushu=kouchushu+rs("kouchushu")
yunfei=yunfei+rs("yunfei")
yufukuan=yufukuan+rs("yufukuan")
shijishu=shijishu+rs("shijishu")
kouchuyunfei=kouchuyunfei+rs("kouchuyunfei")
shengyukuan=shengyukuan+rs("shengyukuan")
rs.movenext
loop
end if
%>

                                 <tr><td colspan="11" height="30">  符合查询条件的入库记录总共为 <font color="#cc0000"><%=i%></font> 条</td>
</tr>
<tr>

<td width="80" height="18" align="center"  class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'">&nbsp;</td>


<td width="100" align="center"  class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'">&nbsp;</td>

<td width="80" align="center"  class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><%=Formatnumber(zongliang,2,-1,0,0)%></td>


<td width="80" align="center"  class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><%=FormatCurrency(yunjia/i,2,-1,,0)%></td>
<td width="80" align="center"  class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><%=FormatCurrency(yunfei,2,-1,,0)%></td>
<td width="80" align="center"  class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><%=FormatCurrency(yufukuan,2,-1,,0)%></td>
<td width="80"  align="center"  class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><%=Formatnumber(shijishu,2,-1,0,0)%></td>
<td width="80" align="center"  class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><%=Formatnumber(kouchushu,2,-1,0,0)%></td>
<td width="80" align="center"  class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><%=FormatCurrency(kouchuyunfei,2,-1,,0)%></td>
<td width="80" align="center"  class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><%=FormatCurrency(shengyukuan,2,-1,,0)%></td>
<td width="80" align="center"  class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'">&nbsp;</td>


</tr>
				</table>
				
              </td>
          </tr>
        </table>
<br>
				<table cellpadding="0">
				<form name="search" method="post" action="sales_in_Detail.asp" target="_blank" >
				  <tr><td>
				  <input name="SeachModel" type="hidden" value="<%=SeachModel%>">
				  <input name="baozhuang" type="hidden" value="<%=baozhuang%>">
				  <input name="yonghu" type="hidden" value="<%=yonghu%>">
				  <input name="class" type="hidden" value="<%=class1%>">
				  <input name="Supplier" type="hidden" value="<%=Supplier%>">
				  <input name="uptime" type="hidden" value="<%=uptime%>">
				  <input name="uptime1" type="hidden" value="<%=uptime1%>">

                                  <input name="nian" type="hidden" value="<%=nian%>">
				  <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 + -