show_stock_detail.asp

来自「Activity——活动管理模块 Analyse——分析模块 Client—」· ASP 代码 · 共 149 行

ASP
149
字号
<%@ LANGUAGE="VBSCRIPT"%>
<!--#include file="../conn.asp"-->
<!--#include file="../Pub_Fun.asp"-->
<!--#include file="../IsUser.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>库存详表</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META http-equiv=Pragma content=no-cache>
<META content="MSHTML 6.00.2715.400" name=GENERATOR>
<style type="text/css">
<!--
.style1 {color: #FF6600}
-->
</style>

</HEAD>
<LINK href="../css.css" rel=stylesheet>

<body>

<%
''获取传递过来的参数
if  (request("stocktopic")) ="" then
   stocktopic=""
else
    stocktopic=trim(request("stocktopic")) 
end if
if  (request("stockdate")) ="" then
   stockdate=""
else
    stockdate=trim(request("stockdate")) 
end if
if  (request("stocksort")) ="" then
   stocksort=0
else
    stocksort=cint(trim(request("stocksort")) )
end if

	set rec = server.createobject("adodb.recordset")
''生成查询语句
	sql = "select * from stock where  stocktopic ='" & stocktopic&"'  and stockdate='"&stockdate&"'  and stocksort="&stocksort&" order by StockProductID"
	rec.open sql,conn,3
%>
<TABLE border=0 cellPadding=5 cellSpacing=0 width="600" align="center">
	<tr class='CListTTL'>
		
      <td height = '30' valign="middle" colspan="2"><font color = yellow size = 3><b>库存明细</b></font></td>
	</tr>
<%
if not rec.eof then
%>
	<tr class=CRow>		
      <td height = '24' align="left"> <strong>库存类型:</strong>&nbsp;&nbsp;
	  <%
''根据情况显示入库和出库
	  if rec("stocksort")=0 then 
	     response.Write("入库")
	  else
	     response.Write("出库")
	  end if
	  
	  %>
		</td>
       
      <td height = '24' align="left"> &nbsp;&nbsp;<strong>操作人:</strong>&nbsp;&nbsp;<%=showoperatorname(rec("StockCreatorID"))%>
		</td>
	</tr>
	<tr class=CRow>		
      <td height = '24' align="left"> <strong>库存日期:</strong>&nbsp;&nbsp;<%=rec("stockdate")%>
		</td>
         <td height = '24' align="left"> &nbsp;&nbsp;<strong>库存主题:</strong>&nbsp;&nbsp;<%=rec("stocktopic")%>
		</td>
	</tr>

	<tr class=CRow>
		<td height = '24' align="left" colspan="2">
		<strong>库存说明:</strong></td>
	</tr>
	<tr class=CRow>
		<td height = '24' align="left" colspan="2">
<%=rec("StockInfo")%>&nbsp;&nbsp;
		</td>
	</tr>
<% else%>
	<tr class=CRow>
		<td height = '24' align="left" colspan="2">
&nbsp;&nbsp;没有此记录!
		</td>
	</tr>
<%end if%>
</TABLE>
<%
if not rec.eof then
%>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="600" align="center">
	<TR class=CRow>
		<TD>		
			<table border="1" cellPadding=0 cellSpacing=0  width="600">
			  	<tr class=CRow>
					<td align="center" >物品名称</td>					
                  <td align="center" >
<%
	  if rec("stocksort")=0 then 
	     response.Write("入库")
	  else
	     response.Write("出库")
	  end if	
 %>价格</td>
					<td align="center" >
<%
	  if rec("stocksort")=0 then 
	     response.Write("入库")
	  else
	     response.Write("出库")
	  end if	
 %>数量</td>
					<td align="center">金额</td>
				</tr>
			 <%
			 total = 0
			 while not rec.eof
				total = total + cdbl(rec("StockProductnum")) * cdbl(rec("StockProductPrice"))
				%>
			  <tr class=CRow>
				<td  align="center">&nbsp;<%=rec("Stockproductname")%></td>
				<td  align="right">&nbsp;<%=formatNumber(rec("StockProductPrice"),2,-1)%>&nbsp;</td>
				<td  align="right">&nbsp;<%=rec("StockProductnum")%>&nbsp;</td>
				<td  align="right">&nbsp;<%=formatNumber(cdbl(rec("StockProductnum")) * cdbl(rec("StockProductPrice")),2,-1)%>&nbsp;</td>
			  </tr>
			<%	rec.movenext
			  wend%>
			 	 <tr class=CRow>					
					<td colspan="2">&nbsp;</td>
					<td align="right">&nbsp;合计:</td>
					<td align="right">&nbsp;<b><%=formatNumber(total,2,-1)%>&nbsp;</td>
				 </tr>
			</table>
		<TD>
	</TR>
</TABLE>
<%end if %>
<br>
<center>
<input name="CancelButton" type="button" class="button_all"  value="关闭" onclick="window.close()">
</center>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?