📄 list.asp
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<% response.buffer=true %>
<%const title="仓库物品"%>
<!-- #include file=opendb.inc-->
<!--#include file=myPrg.asp-->
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft FrontPage 3.0" CHARSET="GB2312">
<title><%=title%></title>
<link rel="stylesheet" type="text/css" href="forum.css">
</head>
<body topmargin="0">
<p>
<div align="center">
<h1 align="center">入库操作
</p>
</h1>
<p>
<%
Showtitle(title)
getStorage(session("storage"))
gettypepath
if request.querystring("id")="" then
' showerror("错误")
session("name_id")=0
else
session("name_id")=request.querystring("id")
end if
%>
<table width=100% align=center border='1' cellspacing='0' bordercolordark='#FFFFFF' bordercolorlight='#008000' bordercolor='#00000'>
<%showheader%>
<%showcontent%>
</table>
<!--#include file=copyright.asp-->
</body>
</html>
<!-- 结束?->
<!-- 下面为定义子过程?->
<%sub showheader
sql="select * from stock where storage_id="&session("storage")&" and name_id="&session("name_id")
rs.open sql,conn
if not rs.eof then
%>
<tr bgcolor=#ECECFF>
<td colspan="7" height="28">名称:<font color=blue size=5><a href=edit.asp?id=<%=session("name_id")%>><%=rs("name")%></a></font></td>
<td colspan="3" height="28">计量单位:<font color=blue size=5><%=rs("unit")%></font></td>
<td colspan="2" height="28" rowspan="1">最高存量:<font color=blue><%=rs("max")%></font><br>最低存量:<font color=blue><%=rs("min")%></font></td>
<td colspan="1" height="28" rowspan="1" align=center>
<%if rs("now_stock")>rs("max") then%>
<font color=red>库存超出</font>
<%elseif rs("now_stock")<=rs("max") and rs("now_stock")>=rs("min") then%>
<font color=green>库存正常</font>
<%elseif rs("now_stock")<rs("min") and rs("now_stock")>0 then%>
<font color=red>库存不足 </font>
<%elseif rs("now_stock")<=0 then%>
<font color=red>此物缺货</font>
<%else%>
<font color=blue>库存状态</font>
<%end if%>
</td>
</tr>
<tr bgcolor=#ececff>
<td colspan="13" height="21">储存地点:<font color=blue><%=rs("address")%></font> 规格:<font color=blue><%=rs("rule")%></font> 类别:<font color=blue><%=rs("type_id")%></font> 货号:<font color=blue><%=rs("no")%></font> 货名:<font color=blue><%=rs("hm")%></font>
当前库存:<font color=red><%=rs("now_stock")%></font> <%=rs("unit")%> 总金额:<font color=red><%=FormatCurrency(cstr(rs("now_sum")),2)%></font> 元</td>
</tr>
<tr bgcolor=#ececff>
<td rowspan=2 height="16" align="center">日期</td>
<td height="16" colspan="2" align="center">凭 证</td>
<td height="32" rowspan="2" align="center">摘要</td>
<td colspan="3" height="16" align="center"><a href=in.asp?id=<%=session("name_id")%>><u>收 入</u></td>
<td height="16" colspan="3" align="center"><a href=out.asp?id=<%=session("name_id")%>><u>发 出</u></td>
<td height="16" colspan="3" align="center">结 存</td>
</tr>
<tr bgcolor=#ececff>
<td height="16" align="center">种类</td>
<td height="16" align="center">号数</td>
<td height="16" align="center">数量</td>
<td height="16" align="center">单价</td>
<td height="16" align="center">金 额</td>
<td height="16" align="center">数量</td>
<td height="16" align="center">单价</td>
<td height="16" align="center">金 额</td>
<td height="16" align="center">数量</td>
<td height="16" align="center">单价</td>
<td height="16" align="center">金 额</td>
</tr>
<%else%>
<tr><td colspan=13 align=center><font color=red>没有记录</font></td></tr>
<%end if
rs.close
end sub%>
<%sub showcontent
sql="select * from detail where storage_id="&session("storage")&" and name_id="&session("name_id")&" order by id desc"
rs.open sql,conn
if not rs.eof then
record=0
do while not rs.eof
record=record+1
if record/2=int(record/2) then
bgclr="#f0f0f0"
else
bgclr=""
end if
if rs("jz_log")=1 then bgclr="#ecec00"
%>
<tr bgcolor=<%=bgclr%>>
<td nowrap align=center height="16">
<%
if rs("zy")<>" " then
response.write rs("rq")
else
response.write " "
end if
%></td>
<td align=center height="16"><%=rs("zl")%></td>
<td align=center height="16"><%=rs("hs")%></td>
<td align=center height="16"><%=rs("zy")%></td>
<td align=right height="16"><%if rs("in_num")=0 then%> <%else%><%=rs("in_num")%> <%end if%></td>
<td align=right height="16"><%if rs("in_num")=0 then%> <%else%><%=formatcurrency(rs("in_price"),2)%><%end if%></td>
<td align=right height="16"><%if rs("in_sum")=0 then%> <%else%><%=formatcurrency(rs("in_sum"),2)%><%end if%></td>
<td align=right height="16"><%if rs("out_num")=0 then%> <%else%><%=rs("out_num")%> <%end if%></td>
<td align=right height="16"><%if rs("out_num")=0 then%> <%else%><%=formatcurrency(rs("out_price"),2)%><%end if%></td>
<td align=right height="16"><%if rs("out_sum")=0 then%> <%else%><%=formatcurrency(rs("out_sum"),2)%><%end if%></td>
<td align=right height="16"><%if rs("now_num")=0 then%> <%else%><%=rs("now_num")%> <%end if%></td>
<td align=right height="16"><%if rs("now_num")=0 or rs("now_price")=0 then%> <%else%><%=formatcurrency(rs("now_price"),2)%><%end if%></td>
<td align=right height="16"><%if rs("now_sum")=0 then%> <%else%><%=formatcurrency(rs("now_sum"),2)%><%end if%></td>
</tr>
<%
rs.movenext
loop
else%>
<tr><td colspan=13 align=center><font color=red>没有记录</font></td></tr>
<%end if
rs.close
end sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -