📄 reportunderlings.asp
字号:
<%
'************************************************************************************************
' 文件名: reportunderlings.asp
' Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'
' 创建人 : 蔡晓燕
' 日 期 : 2002-06-20
' 修改历史 :
' ****年**月**日 ****** 修改内容:**************************************************
' 功能描述 : 本页面为部门经理设计,供他们查看各自部门下属的个人工作汇报
' 版 本 :
'************************************************************************************************
option explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
%>
<!-- #include file="../include/config.inc" -->
<!-- #include file="../include/common.inc" -->
<!-- #include file="../include/debug.inc" -->
<!-- #include file="../include/db.inc" -->
<!-- #include file="../include/emp.inc" -->
<!-- #include file="../include/date.inc" -->
<!-- #include file="../include/datahandle.inc" -->
<!-- #include file="../include/recordlist.inc" -->
<!-- #include file="../include/security.inc" -->
<!-- #include file="../common/commonpage.inc" -->
<!-- #include file="reportunderlings.inc" -->
<%
call CheckSecurity()
'********************************************************************************************************
' 服务器端代码
'********************************************************************************************************
'------------------------------
' 分页相关的变量定义
'-------------------------------------------------------------------------------------------------------------------------------------------------
Dim sSQL, sWhere, sOrderby
Dim sFileName : sFileName = "reportunderlings.asp"
Dim iEmpSerial : iEmpserial = GetEmpSerial
Dim iTotalRecords : iTotalRecords = 0 ' 分页
Dim iRecordsPerPage : iRecordsPerPage = 10
Dim iTotalPages : iTotalPages = 0
Dim iCols : iCols = 6
Dim iCurrentPage : iCurrentPage = GetParam("Page")
Dim iSort : iSort = GetParam("Sorting")
Dim iSorted : iSorted = GetParam("Sorted")
Dim sSortParams : sSortParams = ""
Dim sFormParams : sFormParams = ""
Dim sDirection : sDirection = ""
'-------------------------------------------------------------------------------------------------------------------------------------------------
' frmSearchReport表单提交的查询参数,汇报种类,年份,月份,季度,默认值为当年当月月度汇报表
'-------------------------------------------------------------------------------------------------------------------------------------------------
'Dim iSerial : iSerial = GetParam("serial")'在更新工作汇报的时候传过来的参数,指该汇报在T_Report_Detail.Serial的值。
Dim iType : iType = GetParam("type")
Dim iOf_year : iOf_year = GetParam("of_year")
Dim iOf_month : iOf_month = GetParam("of_month")
Dim iOf_season : iOf_season = GetParam("of_season")
Dim iPerson: iPerson = GetParam("person")
Dim sAction: sAction = GetParam("formAction")'包括quetype,addtype,updtype,deltype四种
'以下代码确定缺省的查询参数
if IsEmpty(iType) then iType = 1
if IsEmpty(iOf_year) then iOf_year = year(date)
if IsEmpty(iOf_month) then iOf_month = month(date)
if IsEmpty(iOf_season) then iOf_season = 1
if IsEmpty(iPerson) then iPerson = 0
sFormParams = "type=" & iType & "&of_year=" & iOf_year & "&of_month=" & iOf_month & "&of_season=" & _
iOf_season & "&person=" & iPerson & "&"
'********************************************************************************************************
' 根据查询的汇报类型不同,构造分页的SQL语句
'********************************************************************************************************
select case iType
case 1'月度个人汇报查询
sSQL = "select * from T_Report_Detail where report_serial = (select serial from T_Report where type = " &_
ToSQL(iType, "Number") & " and of_year = " & ToSQL(iOf_year, "Number") & " and of_month = " & ToSQL(iOf_month, "Number") & " and scope = 1" & " and person = " & iPerson & ")"
case 2'季度个人汇报查询
sSQL = "select * from T_Report_Detail where report_serial = (select serial from T_Report where type = " &_
ToSQL(iType, "Number") & " and of_year = " & ToSQL(iOf_year, "Number") & " and of_season = " & ToSQL(iOf_season, "Number") & " and scope = 1" & " and person = " & iPerson & ")"
case 3'年度个人汇报查询
sSQL = "select * from T_Report_Detail where report_serial = (select serial from T_Report where type = " &_
ToSQL(iType, "Number") & " and of_year = " & ToSQL(iOf_year, "Number") & " and scope = 1" & _
" and person = " & iPerson & ")"
end select
sOrderby = " order by T_Report_Detail.serial"
'********************************************************************************************************
' 分页SQL语句构造完毕,调用PrepareListData进行分页前的准备
'-------------------------------------------------------------------------------------------------------------------------------------------------
dim arrayFields(4), sDelimiter
sDelimiter = "*"
arrayFields(0) = "finished"
arrayFields(1) = "unfinished"
arrayFields(2) = "project"
arrayFields(3) = "self_evaluation"
arrayFields(4) = "memo"
call PrepareListData(sSQL & sWhere & sOrderBy, Join(arrayFields, sDelimiter), sDelimiter)
'********************************************************************************************************
%>
<html>
<head>
<title>上海信息大楼 Shanghai Information Tower</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../common/common.css" type="text/css">
<script language="VBScript" src="../common/validate.vbs"></script>
<script language="VBScript" src="reporttypechange.vbs"></script>
<script language="VBScript">
Sub btnSearch_OnClick()
document.all.frmSearchReport.submit()
End Sub
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="../images/bg/bg0.jpg">
<br>
<%
Response.Write OuterTableHeader
Response.Write HeaderWithMenu
Response.Write InnerTableHeader
'********************************************************************************************************
' 主体从这里开始
'-------------------------------------------------------------------------------------------------------------------------------------------------
Response.Write TableSearch
select case iType
case 1
Response.Write MonthTableHeader
case 2
Response.Write SeasonTableHeader
case 3
Response.Write YearTableHeader
end select
Response.Write TableRecords(sSQL & sWhere & sOrderby, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams )
'-------------------------------------------------------------------------------------------------------------------------------------------------
' 主体到这里结束
'********************************************************************************************************
Response.Write InnerTableTailer
Response.Write Footer
Response.Write OuterTableTailer
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -