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

📄 workthings_stat_things_print.asp

📁 很好的OA办公系统
💻 ASP
字号:
<%response.expires=0%>
<!--#include file="../asp/sqlstr.asp"-->
<%
'session.abandon
'Server.ScriptTimeOut=500
function opendb(DBPath,sessionname,dbsort)
dim conn
'if not isobject(session(sessionname)) then
Set conn=Server.CreateObject("ADODB.Connection")
'if dbsort="accessdsn" then conn.Open "DSN=" & DBPath
'if dbsort="access" then conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath 
'if dbsort="sqlserver" then conn.Open "DSN=" & DBPath & ";uid=wsw;pwd=wsw"
DBPath1=server.mappath("../db/jzud-oa.asa")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath1
set session(sessionname)=conn
'end if
set opendb=session(sessionname)
end function
%>
<!--#include file="../asp/bgsub.asp"-->
<!--#include file="../asp/checked.asp"-->
<!--#include file="setpopedom.asp"-->
<%
oabusyname=request.cookies("oabusyname")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" then 
	response.write("<script language=""javascript"">")
	response.write("window.top.location.href='default.asp';")
	response.write("</script>")
	response.end
end if
yearvalue=request("yearvalue")
workthings=request("workthings")
set conn=opendb("oabusy","conn","accessdsn")
set rs1=server.createobject("adodb.recordset")
sql="select * from workthings_type where autoid="&workthings
rs1.open sql,conn,1
if rs1.eof and rs1.bof then
	set rs1=nothing
	conn.close
	set conn=nothing
	response.redirect "../asp/disperrorinfo.asp?errorinfo=没有该类办公用品,请先增加办公用品!"
	response.end
end if
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>办公用品使用统计</title>
<link rel="stylesheet" type="text/css" href="../css/css.css">
</head>
<body bgcolor="#ffffff" topmargin="5" leftmargin="5">
<div align="center">
<center>
<br><br>
<b><font size="+1">办公用品使用统计表</font></b><p>
办公用品名称:<%=rs1("workthingsname")%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;时间:<%=yearvalue&"年"%>
</center>
<p>
<div align="center">
  <center>
    <table border="1" cellpadding="5" cellspacing="0" width="80%" bordercolorlight="#808080" bordercolordark="#D4D0C8">
      <tr>
      <td bgcolor="#D4D0C8" height="25" align="center" width="160">月份</td>
      <td bgcolor="#D4D0C8" height="25" align="center" width="160">申请发放数量</td>
      <td bgcolor="#D4D0C8" height="25" align="center" width="180">实际发放数量</td>
    </tr>
<%
workthingssums=0
workthingsfactsums=0
for i=1 to 12
	set rs2=server.createobject("adodb.recordset")
	sql="select sum(workthings_userthings.putoutnumber) as putoutsums,sum(workthings_userthings.putoutfactnumber) as putoutfactsums from workthings_userthings,workthings_use where workthings_use.autoid=workthings_userthings.recordid and workthings_userthings.workthingsid="&workthings&" and  workthings_use.putoutusername<>'' and year(workthings_use.writetabletime)="&yearvalue&" and month(workthings_use.writetabletime)="&i
	rs2.open sql,conn,1
%>
      <tr bgcolor="#ffffff"> 
        <td align="center" width="160" height="25"><font color="#EE0000"><%=i%>月</font></td>
        <td align="center" width="160" height="25">
<%
	if isnull(rs2("putoutsums")) then
		response.write("0")
	else
		response.write(rs2("putoutsums"))
		workthingssums=workthingssums+rs2("putoutsums")
	end if
%>
		</td>
        <td align="center" width="180" height="25">
<%
	if isnull(rs2("putoutfactsums")) then
		response.write("0")
	else
		response.write(rs2("putoutfactsums"))
		workthingsfactsums=workthingsfactsums+rs2("putoutfactsums")
		monthsums=monthsums+rs2("putoutfactsums")
	end if
%>
		</td>
    </tr>
<%
	set rs2=nothing
next
%>
  </table>
<p><font color="#ee0000"><%=yearvalue%></font>年<font color="#ee0000"><%=rs1("workthingsname")%></font>申请发放数量:<font color="#ee0000"><b><%=workthingssums%></b></font>实际发放数量:<font color="#ee0000"><b><%=workthingsfactsums%></b></font></p>
  </center>
</div>
<%
conn.close
set rs1=nothing
%>
<script language="javascript">
if (confirm('请单击“确定”按钮开始打印,单击“取消”按钮不打印!'))
{
	window.print();
}
</script>
</body>
</html>

⌨️ 快捷键说明

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