📄 list.asp
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="conn.asp"-->
<!--#include file=function.asp-->
<html>
<head>
<title>仓库物品</title>
<style type="text/css">
<!--
body {
background-image: url(images/1.gif);
}
-->
</style></head>
<body topmargin="0">
<p> </p>
<p>
<%
getcangku(session("storage"))
gettypepath
update_stock
if request.querystring("id")="" then
showerror("错误")
session("name_id")=0
else
session("name_id")=request.querystring("id")
end if
%>
</p>
<table width=100% align=center border='1' cellspacing='0' bordercolordark='#FFFFFF' bordercolorlight='#008000' bordercolor='#00000'>
<%showheader%>
<%showcontent%>
</table>
</body>
</html>
<%sub showheader
sql="select * from stock where c_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 size=2>名称:<a href=edit.asp?id=<%=session("name_id")%>><%=rs("name")%></a></font></td>
<td colspan="3" height="28"><font size=2>计量单位:<%=rs("unit")%></font></td>
<td colspan="2" height="28" rowspan="1"><font size=2>最高存量:<%=rs("max")%></font><br><font size=2>最低存量:<%=rs("min")%></font></td>
<td colspan="1" height="28" rowspan="1" align=center>
<%if rs("now_stock")>rs("max") then%>
<font size=2 color=red>库存超出</font>
<%elseif rs("now_stock")<=rs("max") and rs("now_stock")>=rs("min") then%>
<font size=2 color=green>库存正常</font>
<%elseif rs("now_stock")<rs("min") and rs("now_stock")>0 then%>
<font size=2 color=red>库存不足 </font>
<%elseif rs("now_stock")<=0 then%>
<font size=2 color=red>此物缺货</font>
<%else%>
<font size=2 color=blue>库存状态</font>
<%end if%>
</td>
</tr>
<tr>
<td colspan="13" height="21"><font size=2>储存地点:<%=rs("address")%></font><font size=2> 规格:<%=rs("rule")%></font> <font size=2 >类别:<%=rs("lei_id")%></font> <font size=2>货号:<%=rs("num")%></font> <font size=2>货名:<%=rs("mingcheng")%></font>
<font size=2>当前库存:<%=rs("now_stock")%></font> <%=rs("unit")%><font size=2> 总金额:<%=rs("now_sum")%></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=enter.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 c_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="#ffffff"
%>
<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>
<% update_stock %>
<%
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 + -