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

📄 inlistsok.asp

📁 这是去年开发的中移鼎讯手机进销存系统 大家
💻 ASP
字号:
<!--#include file="../inc/function.asp"-->
<!--#include file="../inc/ChkPurview.asp"-->
<%
Dim fromTime,toTime
Dim fm,tm,fd,td
Dim fT,tT

fromTime	= trim(Request("fromTime"))
toTime		= trim(Request("toTime"))
if fromTime="" or totime="" then
	Response.Write("您没有选择有效日期")
	Response.end
end if
fT = split(fromTime,"-")
tT = split(toTime,"-")

''月处理,fm,tm
if Len(fT(1))=1 then
	fm = "0"&fT(1)
else
	fm = fT(1)
end if
if Len(fT(2))=1 then
	fd = "0"&fT(2)
else
	fd = fT(2)
end if
''日处理,fd,td
if Len(tT(1))=1 then
	tm = "0"&tT(1)
else
	tm = tT(1)
end if
if Len(tT(2))=1 then
	td = "0"&tT(2)
else
	td = tT(2)
end if

fromTime =trim(fT(0)&"-"&fm&"-"&fd)

toTime =trim(tT(0)&"-"&tm&"-"&td)


%>


<html>
<head>
<title>库存统计管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/mobile_sale.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
  <tr class="topbg"> 
    <td height="22" colspan="2" align="center"><strong>产 品 管 理</strong></td>
  </tr>
  <tr class="tdbg"> 
    <td width="70" height="30"><strong>管理导航:</strong></td>
    <td height="30"><a href="Pro.asp">产品管理</a>&nbsp;|&nbsp;<a href="Pro.asp?Action=Add">添加新产品</a>
	&nbsp;|&nbsp;<a href="InLists.asp">库存清单</a>
	</td>
  </tr>
</table>
<br>
<%
Response.write "您所要统计的是<font color='#0000FF'>"&fromTime&"</font>到<font color='#0000FF'>"&toTime&"</font>的库存情况"
	Sql = "select * from T_Product order by Pro_ID desc;"
	Call sql_open(Rs,Sql,Conn,1,1)
Call page_code(Rs,20)
If Not Rs.Eof Then
	IsFor=True
Else
	IsFor=False
	Response.write "<center><b><font color=red>暂无内容!</font></b></center>"
End IF

%><table width='100%' border="0" cellpadding="0" cellspacing="0">
  <tr>
     <td>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
  <tr align="center" class="title">
    <td>产品名</td>
    <td>进货数(部)</td>
	<td>金额(元)</td>
	<td>发货量(部)</td>
	<td height="22">发货金额(元)</td>
    <td  width="150" title="指所有的库存量">总库存数(部)</td>
  </tr>
	<%
	For i= 1 to Rs.PageSize
	If Rs.Eof Then Exit For
	'\\\\\\\\\\\\\\\\\\\
	Dim rst,sqlt
	Dim rstt,sqltt
	Dim InNum		'总进货数字
	Dim InJE		'总金额
	Dim OutNum		'发货数字
	Dim OutJE		'发货金额
	Dim hNum
	sqlt = "Select * from T_InList where Pro_ID="&cstr(Rs("Pro_ID"))&" and convert(varchar(10),InTime,120) between  '"&fromTime&"' and '"&toTime&"';"
'	Response.Write(sqlt)
	Call sql_open(Rst,Sqlt,Conn,1,1)
	if rst.eof and rst.bof then
		InNum=0
		InJE=0
	else
		do while not Rst.eof
			InNum = InNum + clng(Rst("Pro_Num"))
			InJE = InJE + clng(Rst("Pro_Tprice"))
		Rst.Movenext
		loop
	end if
	call rs_end(Rst)
'\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
	sqltt = "Select * from T_SubOutOrder where Pro_ID="&cstr(Rs("Pro_ID"))&" and convert(varchar(10),OutTime,120) between  '"&fromTime&"' and '"&toTime&"';"
'	Response.Write(sql1)
	Call sql_open(Rstt,Sqltt,Conn,1,1)
	if rstt.eof and rstt.bof then
		OutNum=0
		OutJE=0
	else
		do while not Rstt.eof
			OutNum = OutNum + clng(Rstt("OutOrder_Num"))
			OutJE = OutJE + (clng(Rstt("OutOrder_Num"))*clng(Rstt("OutOrder_dj")))
		Rstt.Movenext
		loop
	end if
	call rs_end(Rstt)
'\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
dim h1,h2
dim rs1,sql1
dim rs2,sql2
	sql1 = "Select * from T_InList where Pro_ID="&cstr(Rs("Pro_ID"))&""
	Call sql_open(Rs1,Sql1,Conn,1,1)
	if rs1.eof and rs1.bof then
		h1=0
	else
		do while not rs1.eof
			h1 = h1 + clng(rs1("Pro_Num"))
		rs1.Movenext
		loop
	end if
	call rs_end(rs1)
'\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
	sql2 = "Select * from T_SubOutOrder where Pro_ID="&cstr(Rs("Pro_ID"))&""
	Call sql_open(rs2,Sql2,Conn,1,1)
	if rs2.eof and rs2.bof then
		h2=0
	else
		do while not rs2.eof
			h2 = h2 + clng(rs2("OutOrder_Num"))
		rs2.Movenext
		loop
	end if
	call rs_end(rs2)
'\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
	hNum=cint(h1)-cint(h2)
	%>
  <tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'"> 
    <td><%=rs("Pro_MC")%></td>
    <td align="center"><%=InNum%></td>
	<td width="150"  align="center"><%=InJE%></td>
	<td width="150"  align="center"><%=OutNum%></td>
	<td width="150"  align="center"><%=OutJE%></td>
    <td width="150"  align="center"><%=hNum%></td>
  </tr>
	<%
	Rs.MoveNext
	Next
	%>
</table>  
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="200" height="30">&nbsp;</td>
    <td>&nbsp;	</td>
	<td width="300"><%If IsFor Then Call page_code_down(Rs,"&fromTime="&fromTime&"&toTime="&toTime&"","条记录") %></td>
  </tr>
</table>
</td>
</tr></table>
<%
call Rs_end(Rs)

%>


</body>
</html>

⌨️ 快捷键说明

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