📄 sta_s2.asp
字号:
<!--#include file="../inc/function.asp"-->
<!--#include file="../inc/ChkPurview.asp"-->
<%
'订单管理:SubOrder.asp
'用户限权检查
if GetUserGPower<>999 then
Call Msg("您没有访问权限",1,"")
end if
Dim Action,crs,csql
Dim fromTime,toTime
fromTime = Request("fromTime")
toTime = Request("toTime")
if fromTime<>"" and toTime<>"" then
fromTime = RequestTime(fromTime)
toTime = RequestTime(toTime)
end if
Dim t,t1,t2
%>
<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">
<script src="../js/ListOp.js" language=javascript></script>
<Script>
function getCorrectDateString(time)
{
var fbeg = time.indexOf("-", 0);
var fend = time.indexOf("-",fbeg + 1);
var fh = time.substring(0, fbeg);
var fm = time.substring(fbeg + 1, fend);
var fe = time.substring(fend + 1);
var fhLen = fh.length;
var fmLen = fm.length;
var feLen = fe.length;
if (fhLen < 4)
fh = "20" + fh;
if (fmLen < 2)
fm = "0" + fm;
if (feLen < 2)
fe = "0" + fe;
var tmp = fh + "-" + fm + "-" + fe;
return tmp;
}
function Checkfrm(){
var fromTime = getCorrectDateString(document.all.fromTime.value);
var toTime = getCorrectDateString(document.all.toTime.value);
if(fromTime > toTime){
alert('起始时间不能大于终止时间,请重新输入!');
return false;
}
if(document.Frm2.fromTime.value==""){
alert("请选择开始日期");
document.Frm2.fromTime.focus();
return false;
}
}
</Script>
</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">统计</td>
</tr>
<tr class="tdbg">
<td width="70" height="30"><strong>管理导航:</strong></td>
<td height="30">
<%
Response.write "<a href=""Sta_S0.asp"">本公司数据统计</a> | "
Response.write "<a href=""Sta_S1.asp"">统计县公司</a> | "
Response.write "<a href=""Sta_S2.asp"">统计县公司(按产品)</a> | "
Response.write " <a href=""Sta_S3.asp"">统计市分销点</a> | "
Response.write " <a href=""Sta_S4.asp"">统计市分销点(按产品)</a>"
%>
</td>
</tr>
</table>
<br>
<form method="post" action="Sta_S2.asp" name="Frm2" onsubmit="javascript:return Checkfrm();">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" >
<tr class="title">
<td height="22" colspan="2"> <div align="center">按日期统计</div></td>
</tr>
<tr class="tdbg">
<td width="20%" class="tdbg">统计日期</td>
<td width="75%" class="tdbg"><input name=fromTime size=22 readonly>
<img align=absMiddle alt="date picker" border=0 id=fromDivPos name=fromDivPos onMouseUp="toggleDatePicker('fromDiv','Frm2.fromTime')" src="../images/calendaricon.gif" width="34" height="21">
<div id=fromDiv style="POSITION: absolute; width: 50; left: 534px; top: 150px"></div>
到
<input name=toTime size=22 readonly value="<%=Format_Time(now(),2)%>">
<img align=absMiddle alt="date picker" border=0 id=toDivPos name=toDivPos onMouseUp="toggleDatePicker('toDiv','Frm2.toTime')" src="../images/calendaricon.gif" width="34" height="21">
<div id=toDiv style="POSITION: absolute; width: 50; left: 534px; top: 150px"></div>
之间</td>
</tr>
<tr>
<td height="40" colspan="2" align="center" class="tdbg">
<input type="Submit" name="Submit" value=" 统 计 " style="cursor:hand;"></td>
</tr>
</table>
</form>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr align="center" class="title">
<td height="22">县</td>
<td>产品</td>
<td colspan="2">申购数</td>
<td colspan="2">进货数</td>
<td colspan="2">发货数</td>
<td colspan="2">回款数</td>
<td>未回款</td>
<td>库存数</td>
<td>回款率</td>
</tr>
<tr align="center" class="topbg">
<td height="22"> </td>
<td> </td>
<td width="55">新增</td>
<td width="80">累计</td>
<td width="50">新增</td>
<td width="80">累计</td>
<td width="55">新增</td>
<td width="80">累计</td>
<td width="55">本次新增</td>
<td width="80">累计</td>
<td>未回款</td>
<td> </td>
<td> </td>
</tr>
<%
sql = "Select * from County where CityID="&Cstr(GetCityID)&" order by CountyID asc;"
Call sql_open(Rs,Sql,Conn,1,1)
if rs.eof and rs.bof then
response.Write("县")
else
Do while not rs.eof
%>
<tr align="center" class="tdbg" onmouseover="this.style.backgroundColor='#BFDFFF'" onmouseout="this.style.backgroundColor=''">
<td height="22"><%=Rs("CountyName")%></td>
<td> </td>
<td><%response.Write Request_Num(99,"",GetCityID,rs("CountyID"),"",1,fromTime,toTime)%></td>
<td><%response.Write Request_Num(99,"",GetCityID,rs("CountyID"),"",1,fromTime,toTime)%></td>
<td><%response.Write InPro_Num(99,"",GetCityID,rs("CountyID"),"",1,fromTime,toTime)%></td>
<td><%response.Write InPro_Num(99,"",GetCityID,rs("CountyID"),"",2,"","")%></td>
<td><%response.Write OutPro_Num(99,"",GetCityID,rs("CountyID"),"",1,fromTime,toTime)%></td>
<td><%response.Write OutPro_Num(99,"",GetCityID,rs("CountyID"),"",2,"","")%></td>
<td><%response.Write Fund_Num(99,"",GetCityID,rs("CountyID"),"",1,fromTime,toTime,0,1)%></td>
<td><%response.Write Fund_Num(99,"",GetCityID,rs("CountyID"),"",2,"","",0,1)%></td>
<td><%
t = 0
t = clng(InPro_Num(99,"",GetCityID,rs("CountyID"),"",2,"",""))-clng(Fund_Num(99,"",GetCityID,rs("CountyID"),"",2,"","",0,1))
response.Write t
%></td>
<td>
<%
t = 0
t = clng(InPro_Num(99,"",GetCityID,rs("CountyID"),"",2,"",""))-clng(OutPro_Num(99,"",GetCityID,rs("CountyID"),"",2,"",""))
response.Write t
%>
</td>
<td><%''未回款率
t=0
t1=0
t2=0
t1 = clng(Fund_Num(99,"",GetCityID,rs("CountyID"),"",2,"","",0,1))
t2 = clng(InPro_Num(99,"",GetCityID,rs("CountyID"),"",2,"",""))
if t1=0 or t2=0 then
t=0
else
t = 100*(round((t1/t2),2))
end if
Response.write t&"%"
%>
</td>
</tr>
<%
dim rsk,sqlk
sqlk="select * from T_Product order by Pro_ID desc;"
Call sql_open(rsk,sqlk,Conn,1,1)
Do while not rsk.eof
%>
<tr align="center" class="tdbg" onmouseover="this.style.backgroundColor='#BFDFFF'" onmouseout="this.style.backgroundColor=''">
<td height="22"> </td>
<td><%=rsk("Pro_MC")%></td>
<td><%response.Write Request_Num(99,"",GetCityID,rs("CountyID"),rsk("Pro_ID"),1,fromTime,toTime)%></td>
<td><%response.Write Request_Num(99,"",GetCityID,rs("CountyID"),rsk("Pro_ID"),1,fromTime,toTime)%></td>
<td><%response.Write InPro_Num(99,"",GetCityID,rs("CountyID"),rsk("Pro_ID"),1,fromTime,toTime)%></td>
<td><%response.Write InPro_Num(99,"",GetCityID,rs("CountyID"),rsk("Pro_ID"),2,"","")%></td>
<td><%response.Write OutPro_Num(99,"",GetCityID,rs("CountyID"),rsk("Pro_ID"),1,fromTime,toTime)%></td>
<td><%response.Write OutPro_Num(99,"",GetCityID,rs("CountyID"),rsk("Pro_ID"),2,"","")%></td>
<td><%response.Write Fund_Num(99,"",GetCityID,rs("CountyID"),rsk("Pro_ID"),1,fromTime,toTime,0,1)%></td>
<td><%response.Write Fund_Num(99,"",GetCityID,rs("CountyID"),rsk("Pro_ID"),2,"","",0,1)%></td>
<td><%
t = 0
t = clng(InPro_Num(99,"",GetCityID,rs("CountyID"),rsk("Pro_ID"),2,"",""))-clng(Fund_Num(99,"",GetCityID,rs("CountyID"),rsk("Pro_ID"),2,"","",0,1))
response.Write t
%></td>
<td><%
t = 0
t = clng(InPro_Num(99,"",GetCityID,rs("CountyID"),rsk("Pro_ID"),2,"",""))-clng(OutPro_Num(99,"",GetCityID,rs("CountyID"),rsk("Pro_ID"),2,"",""))
response.Write t
%></td>
<td><%''未回款率
t=0
t1=0
t2=0
t1 = clng(Fund_Num(99,"",GetCityID,rs("CountyID"),rsk("Pro_ID"),2,"","",0,1))
t2 = clng(InPro_Num(99,"",GetCityID,rs("CountyID"),rsk("Pro_ID"),2,"",""))
if t1=0 or t2=0 then
t=0
else
t = 100*(round((t1/t2),2))
end if
' Response.Write t1&"<br>"
' Response.Write t2&"<br>"
' Response.Write t&"<br>"
Response.write t&"%"
%></td>
</tr>
<%
rsk.movenext
loop
call rs_end(rsk)
rs.movenext
loop
end if
call rs_end(rs)
%>
</table>
<br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -