📄 profit_show.asp
字号:
<!-- #include file="Inc/config.asp" -->
<!--#include file="inc/Dx_admin_check.asp"-->
<html>
<head>
<title>利润查询结果</title>
</head>
<link href="Css/style.css" rel="stylesheet" type="text/css">
<style>
body {
background-color:#FFFFFF;
}
</style>
<%
if request.Form.count>0 then
DateNow5=datevalue(request.Form("startdate"))
DateNow6=datevalue(request.Form("enddate"))
end if
if DateNow5>DateNow6 then
DateNow7=DateNow5
DateNow5=datevalue(DateNow6)
DateNow6=datevalue(DateNow7)
end if
'出库表里的利润
keer="select count(*) as dx_OutDepot_interrupt_num From [dx_OutDepot] where dx_OutDepot_time >= #"& DateNow5 &"# and dx_OutDepot_time < #"& DateNow6 &"#"
set rst=conn.execute(keer)
dx_OutDepot_interrupt_num=rst("dx_OutDepot_interrupt_num")
rst.close
i=dx_OutDepot_interrupt_num
dim dx_OutDepot_interrupt_product '商品编号
dim dx_OutDepot_interrupt_price '出售单价
dim dx_OutDepot_interrupt_count '出售数量
dim dx_OutDepot_interrupt_all '出售总价
dim dx_OutDepot_interrupt_in '利润
dim dx_OutDepot_interrupt_time '时间
dim dx_OutDepot_interrupt_capital '总利润
redim dx_OutDepot_interrupt_product(i)
redim dx_OutDepot_interrupt_price(i)
redim dx_OutDepot_interrupt_count(i)
redim dx_OutDepot_interrupt_all(i)
redim dx_OutDepot_interrupt_in(i)
redim dx_OutDepot_interrupt_time(i)
sqlstr="select * from [dx_OutDepot] where dx_OutDepot_time >= #"& DateNow5 &"# and dx_OutDepot_time < #"& DateNow6 &"#"
rs.open sqlstr,conn,1,1
if not rs.eof then
k=1
dx_OutDepot_interrupt_capital=0
while not rs.eof
dx_OutDepot_interrupt_product(k)=rs("dx_OutDepot_product")
dx_OutDepot_interrupt_price(k)=rs("dx_OutDepot_price")
dx_OutDepot_interrupt_count(k)=rs("dx_OutDepot_count")
dx_OutDepot_interrupt_all(k)=rs("dx_OutDepot_all")
dx_OutDepot_interrupt_in(k)=rs("dx_OutDepot_in")
dx_OutDepot_interrupt_time(k)=rs("dx_OutDepot_time")
dx_OutDepot_interrupt_capital=dx_OutDepot_interrupt_capital+dx_OutDepot_interrupt_in(k)
k=k+1
rs.movenext
wend
Num7=k-1
end if
rs.close
'-----------------------------
'其他支出表里的金额
keer="select count(*) as dx_expense_interrupt_num From [dx_expense] where dx_expense_time >= #"& DateNow5 &"# and dx_expense_time < #"& DateNow6 &"#"
set rst=conn.execute(keer)
dx_expense_interrupt_num=rst("dx_expense_interrupt_num")
rst.close
i=dx_expense_interrupt_num
dim dx_expense_interrupt_title '支出理由
dim dx_expense_interrupt_out '支出金额
dim dx_expense_interrupt_time '时间
dim dx_expense_interrupt_capital '总支出
redim dx_expense_interrupt_title(i)
redim dx_expense_interrupt_out(i)
redim dx_expense_interrupt_time(i)
sqlstr="select * from [dx_expense] where dx_expense_time >= #"& DateNow5 &"# and dx_expense_time < #"& DateNow6 &"#"
rs.open sqlstr,conn,1,3
if not rs.eof then
k=1
dx_expense_interrupt_capital=0
while not rs.eof
dx_expense_interrupt_title(k)=rs("dx_expense_title")
dx_expense_interrupt_out(k)=rs("dx_expense_out")
dx_expense_interrupt_time(k)=rs("dx_expense_time")
dx_expense_interrupt_capital=dx_expense_interrupt_capital+dx_expense_interrupt_out(k)
k=k+1
rs.movenext
wend
Num8=k-1
end if
rs.close
'-----------------------------
'其他收入表里的金额
keer="select count(*) as dx_income_interrupt_num From [dx_income] where dx_income_time >= #"& DateNow5 &"# and dx_income_time < #"& DateNow6 &"#"
set rst=conn.execute(keer)
dx_income_interrupt_num=rst("dx_income_interrupt_num")
rst.close
i=dx_income_interrupt_num
dim dx_income_interrupt_title '收入理由
dim dx_income_interrupt_in '收入金额
dim dx_income_interrupt_time '时间
dim dx_income_interrupt_capital '总收入
redim dx_income_interrupt_title(i)
redim dx_income_interrupt_in(i)
redim dx_income_interrupt_time(i)
sqlstr="select * from [dx_income] where dx_income_time >= #"& DateNow5 &"# and dx_income_time < #"& DateNow6 &"#"
rs.open sqlstr,conn,1,3
if not rs.eof then
k=1
dx_income_interrupt_capital=0
while not rs.eof
dx_income_interrupt_title(k)=rs("dx_income_title")
dx_income_interrupt_in(k)=rs("dx_income_in")
dx_income_interrupt_time(k)=rs("dx_income_time")
dx_income_interrupt_capital=dx_income_interrupt_capital+dx_income_interrupt_in(k)
k=k+1
rs.movenext
wend
Num9=k-1
end if
rs.close
'-----------------------------
dim dx_profit_interrupt_all
dx_profit_interrupt_all=dx_OutDepot_interrupt_capital-dx_expense_interrupt_capital+dx_income_interrupt_capital
%>
<script language="javascript">
function collapse(img, objName)
{
var obj;
obj = document.getElementById(objName);
if (img.src.indexOf('open') != -1)
{
img.src = img.src.replace('open', 'close');
obj.style.display = 'none';
}
else
{
img.src = img.src.replace('close', 'open');
obj.style.display = '';
}
}
</script>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="2" align="center">
<form name="keer1" action="" method="post">
<tr>
<td width="100%" align="right">
开始日期:
<input name="startdate" value="" style="width:100px">
<img src="Images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?form=keer1&field=startdate&oldDate='+startdate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=590');">
结束日期:
<input name="enddate" value="" style="width:100px">
<img src="images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?form=keer1&field=enddate&oldDate='+enddate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=740');">
<input type="submit" value="查询" class="button">
</td>
</tr>
</form>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td><img src="Images/r_1.gif" alt="" /></td>
<td width="100%" background="Images/r_0.gif">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td> 利润查询</td>
<td align="right"> </td>
</tr>
</table>
</td>
<td><img src="Images/r_2.gif" alt="" /></td>
</tr>
<tr>
<td></td>
<td>
<!--startprint-->
<table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
<tr align="center">
<td class="category" width="10"> </td>
<td class="category" height="30">出库利润</td>
<td class="category">其他支出</td>
<td class="category">其他收入</td>
<td class="category">总利润</td>
</tr>
<tr onMouseOver="this.className='highlight'" onMouseOut="this.className=''">
<td align="center"><img src="Images/folder_close.gif" style="cursor:hand" onClick="collapse(this, 'buy')" /></td>
<td align="center" height="25">
<%if dx_OutDepot_interrupt_capital=0 then response.Write("无利润") else response.Write(dx_OutDepot_interrupt_capital) end if%>
</td>
<td align="center">
<%if dx_expense_interrupt_capital=0 then response.Write("无支出") else response.Write(dx_expense_interrupt_capital) end if%>
</td>
<td align="center">
<%if dx_income_interrupt_capital=0 then response.Write("无收入") else response.Write(dx_income_interrupt_capital) end if%>
</td>
<td align="center"><%=dx_profit_interrupt_all%></td>
</tr>
<tr id="buy" style="display:none;">
<td colspan="16" class="category">
<%if dx_OutDepot_interrupt_capital=0 and dx_expense_interrupt_capital=0 and dx_income_interrupt_capital=0 then%>
<table align="center" cellpadding="4" cellspacing="1" class="grid" border="1" width="100%">
<tr align="center">
<td><strong>暂 无 利 润</strong></td>
</tr>
</table>
<%end if%>
<%if dx_OutDepot_interrupt_capital<>0 then%>
<table align="center" cellpadding="4" cellspacing="1" class="grid" border="1" width="100%">
<tr align="center">
<td colspan="6"><strong>出 库 表</strong></td>
</tr>
<tr align="center">
<td height="30" width="20%">时 间</td>
<td width="20%">商品编号</td>
<td width="10%">出售单价</td>
<td width="10%">出售数量</td>
<td width="10%">出售总价</td>
<td width="10%">利 润</td>
</tr>
<%for i=1 to Num7%>
<tr>
<td align="center"><%=dx_OutDepot_interrupt_time(i)%></td>
<td align="center"><%=dx_OutDepot_interrupt_product(i)%></td>
<td align="center"><%=dx_OutDepot_interrupt_price(i)%></td>
<td align="center"><%=dx_OutDepot_interrupt_count(i)%></td>
<td align="center"><%=dx_OutDepot_interrupt_all(i)%></td>
<td align="center"><%=dx_OutDepot_interrupt_in(i)%></td>
</tr>
<%next%>
</table>
<%end if%>
<%if dx_expense_interrupt_capital<>0 then%>
<table align="center" cellpadding="4" cellspacing="1" class="grid" border="1" width="100%">
<tr align="center">
<td colspan="6"><strong>其 他 支 出</strong></td>
</tr>
<tr align="center">
<td height="30" width="20%">时 间</td>
<td width="70%">支出理由</td>
<td width="10%">支出金额</td>
</tr>
<%for i=1 to Num8%>
<tr>
<td align="center"><%=dx_expense_interrupt_time(i)%></td>
<td align="center"><%=dx_expense_interrupt_title(i)%></td>
<td align="center"><%=dx_expense_interrupt_out(i)%></td>
</tr>
<%next%>
</table>
<%end if%>
<%if dx_income_interrupt_capital<>0 then%>
<table align="center" cellpadding="4" cellspacing="1" class="grid" border="1" width="100%">
<tr align="center">
<td colspan="6"><strong>其 他 收 入</strong></td>
</tr>
<tr align="center">
<td height="30" width="20%">时 间</td>
<td width="70%">收入理由</td>
<td width="10%">收入金额</td>
</tr>
<%for i=1 to Num9%>
<tr>
<td align="center"><%=dx_income_interrupt_time(i)%></td>
<td align="center"><%=dx_income_interrupt_title(i)%></td>
<td align="center"><%=dx_income_interrupt_in(i)%></td>
</tr>
<%next%>
</table>
<%end if%>
</td>
</tr>
</table>
</td>
<td></td>
</tr>
<tr>
<td><img src="Images/r_4.gif" alt="" /></td>
<td></td>
<td><img src="Images/r_3.gif" alt="" /></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -