📄 e_cxjhqktj.asp
字号:
'查询
%>
<%
qsql="select DepartCode,Name from a_DepartInfo where delflag='0'"
sql="select count(billid) as cs from ES_server_build "
if ddate<>"" and edate<>"" then
sql=sql&" where plantime>='"&ddate&"' and plantime<='"&edate&"'"
end if
oldsql=sql
%>
<%else
'初始
%>
最近三天统计分析如下:
<% qsql="select DepartCode,Name from a_DepartInfo where delflag='0'"
sql="select count(billid) as cs from ES_server_build where cdate(plantime)>=(date()-3) and cdate(plantime)<=date()"
oldsql=sql
%>
<%end if
'response.write qsql
'response.end
rs.open qsql,pubconn,1,3
if rs.recordcount>=1 then
rs.pagesize=10
if currentpage>=rs.pagecount then
currentpage=rs.pagecount
else
if currentpage<1 then
currentpage=1
end if
end if
rs.absolutepage=currentpage
pagenum=rs.pagecount
if pagenum<1 then
pagenum=1
end if
%>
<table border="1" cellspacing="0" width="100%">
<tr>
<td width="8%" height="25" align="center" bgcolor="#DDD2C4"><font size="2">公司或部门</font></td>
<td width="5%" height="25" align="center" bgcolor="#DDD2C4"><font size="2">提前交货次数</font></td>
<td width="5%" height="25" align="center" bgcolor="#DDD2C4"><font size="2">提前交货百分比</font></td>
<td width="5%" height="25" align="center" bgcolor="#DDD2C4"><font size="2">按时交货次数</font></td>
<td width="5%" height="25" align="center" bgcolor="#DDD2C4"><font size="2">按时交货百分比</font></td>
<td width="5%" align="center" bgcolor="#DDD2C4" height="25"><font size="2">延期交货次数</font></td>
<td width="5%" align="center" bgcolor="#DDD2C4" height="25"><font size="2">延期交货百分比</font></td>
<td width="5%" align="center" bgcolor="#DDD2C4" height="25"><font size="2">未交货次数</font></td>
<td width="5%" align="center" bgcolor="#DDD2C4" height="25"><font size="2">未交货百分比</font></td>
</tr>
<%for i=1 to rs.pagesize %>
<%
if i mod 2=1 then%>
<tr bgcolor="#f7f7f7">
<%else%>
<tr bgcolor="#EDEBEC">
<%end if%>
<td width="8%" align="center" ><%=rs("name")%></td>
<%department=rs("DepartCode")
if department<>"" then
sql=oldsql&" and department='"&department&"'"
end if
'计算提前次数
tempsql=sql&"and givetime< asktime and not givetime is null and not asktime is null"
'response.write tempsql
'response.end
set rs1=pubconn.execute(tempsql)
tqcs=rs1("cs")
rs1.close
'计算按时次数
tempsql=sql& "and givetime=asktime and not givetime is null and not asktime is null"
'response.write tempsql
set rs2=pubconn.execute(tempsql)
ascs=rs2("cs")
rs2.close
'计算延期次数
tempsql=sql& "and givetime>asktime and not givetime is null and not asktime is null"
set rs3=pubconn.execute(tempsql)
yqcs=rs3("cs")
rs3.close
'计算未交次数
tempsql=sql&"and givetime is null "
set rs4=pubconn.execute(tempsql)
wjcs=rs4("cs")
rs4.close
sumtimes=cint(tqcs)+cint(ascs)+cint(yqcs)+cint(wjcs)
'计算百分比
if sumtimes<>0 then
tqbfb=(tqcs/sumtimes)*100
asbfb=(ascs/sumtimes)*100
yqbfb=(yqcs/sumtimes)*100
wjbfb=(wjcs/sumtimes)*100
else
tqbfb=99.99
asbfb=99.99
yqbfb=99.99
wjbfb=99.99
end if
%>
<td width="5%" align="center" ><%=tqcs%></td>
<td width="5%" align="center"><%=tqbfb%></td>
<td width="5%" align="center" ><%=ascs%></td>
<td width="5%" align="center" ><%=asbfb%></td>
<td width="5%" align="center"><%=yqcs%></td>
<td width="5%" align="center"><%=yqbfb%></td>
<td width="5%" align="center"><%=wjcs%></td>
<td width="5%" align="center"><%=wjbfb%></td>
</tr>
<%
rs.MoveNext
if rs.eof then exit for
next
%>
</table>
<br>
<font size="2">
共<%=rs.pagecount%>页
<a href="e_cxjhqktj.asp?currentPage=1&bz=<%=bz%>&dyear=<%=dyear%>&dmonth=<%=dmonth%>&dday=<%=dday%>&eyear=<%=eyear%>&emonth=<%=emonth%>&eday=<%=eday%>">首 页</a>
<%if pagenum<>0 then
if currentPage<pagenum then%> <a href="e_cxjhqktj.asp?currentPage=<%=currentpage+1%>&bz=<%=bz%>&dyear=<%=dyear%>&dmonth=<%=dmonth%>&dday=<%=dday%>&eyear=<%=eyear%>&emonth=<%=emonth%>&eday=<%=eday%>">下一页</a>
<% else%>
下一页 <%
end if
if currentPage>1 then
%> <a href="e_cxjhqktj.asp?currentPage=<%=currentpage-1%>&bz=<%=bz%>&dyear=<%=dyear%>&dmonth=<%=dmonth%>&dday=<%=dday%>&eyear=<%=eyear%>&emonth=<%=emonth%>&eday=<%=eday%>">上一页</a>
<% else%>
上一页 <%
end if
end if %>
<a href="e_cxjhqktj.asp?currentPage=<%=rs.pagecount%>&bz=<%=bz%>&dyear=<%=dyear%>&dmonth=<%=dmonth%>&dday=<%=dday%>&eyear=<%=eyear%>&emonth=<%=emonth%>&eday=<%=eday%>">尾 页</a>
<select name="page1" >
<%
for j=1 to rs.pagecount%>
<option value=<%=j%>><%=j%>
<%next%>
</select>
<%if bz="" then%>
<input type="button" value="Go" name="page" onclick="win1()" style="background-color: #D1D1D1; border-style: solid; border-width: 1">
<%else%>
<input type="button" value="Go" name="page" onclick="win()" style="background-color: #D1D1D1; border-style: solid; border-width: 1">
<%end if%>
<%else%></font>
<p align="center">
<font size="2">经查询,没有记录!<br>
<%end if%></font><br> <br>
</form>
<a href="e_cxMain.asp"><font size="2">返回</font></a>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -