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

📄 diary_inspect_view.asp

📁 北京华信东方网络办公系统
💻 ASP
字号:
<%@ Language=VBScript %>
<!--#include file= "../dbase.asp"-->
<!--#include file= "../employee/employee_function.asp"-->
<!--#include file= "diary_function.asp"-->
<%
 '========================设置查看的用户范围
if request.Form("rank")="department" then
	DRstr=replace(request.Form("DepartmentContent")," ","")
	DRstr="'"&replace(DRstr,",","','")&"'"
	EmployeeContentArray=DepartmentNameEmployee(DRstr)
	'得到所选部门的员工信息,调用函数../employee/employee_function.asp
	'c_UserID, v_UserTrueName, v_DepartmentName
	if isnull(EmployeeContentArray) then
	response.Redirect("../error/Error.asp?steps=-1&errInfo=<li>您所挑选的部门没有员工</li>")
	response.End()
	end if
elseif request.Form("rank")="employee" then
	t=split(replace(request.Form("EmployeeContent")," ",""),",")
	for i= 0 to ubound(t)
	redim Preserve  EmployeeContentArray(1,i)
	EmployeeContentArray(0,i)=""
	EmployeeContentArray(1,i)=t(i)
	next	
else
	response.Redirect("../error/Error.asp?steps=-1&errInfo=<li>没有员工信息无法统计</li>")
	response.End()
end if

'==========================设置查看的时间范围
if request.Form("TimeWay")="yearweek" then
	'TimeCondition=" and i_DiaryYear="&cint(request.Form("YearContent"))&" , i_DiaryWeek = "&cint(request.Form("WeekContent"))
	t=CDate(request.Form("YearContent")&"-1-1")
	t1=weekday(t)
	BeginDate=DateAdd("ww", cint(request.Form("WeekContent"))-1, DateAdd("d",1-t1,t))
	EndDate=DateAdd("d", 6,BeginDate)
elseif  request.Form("TimeWay")="timepart" then
	if request.Form("BeginDate")="" then
	BeginDate=now
	else
	BeginDate=cdate(request.Form("BeginDate"))
	end if
	if request.Form("EndDate")="" then
	EndDate=now
	else
	EndDate=CDate(request.Form("EndDate"))
	end if
	if datediff("d",BeginDate ,EndDate) < 0 then
		response.Redirect("../error/Error.asp?steps=-1&errInfo=<li>起始日期不能大于终止日期</li>")
		response.End()
	end if
else
	response.Redirect("../error/Error.asp?steps=-1&errInfo=<li>没有日期信息无法汇总</li>")
	response.End()
end if
	TimeCondition=" WHERE d_Time between '"& BeginDate &"' and '"& EndDate &"'"
'InspectUserTime(UserTrueName,TimeCondition)
%>
<html>
<head>
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
<meta name="GENERATOR" Content="Microsoft Visual Studio.NET 7.0">
<link href="../../js/hystudio.css" rel="stylesheet" type="text/css">
<link href="../MSTYLE.CSS" rel="stylesheet" type="text/css">	
	<style type="text/css">
	<!--
.DotPad	{background-color:#E6E6E6; cursor: default; border: 1px dotted #E6E6E6; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1}
	//--></style>
	<!--#include file= "../js.asp"-->
</head>
<body>

	<div align=center style=" FONT-SIZE: 12pt; FONT-FAMILY: 黑体, 宋体; TEXT-DECORATION: underline"></div>
	<table align=center ID="Table1" border=1 bordercolor=#006600 ><tr>
	<td></td>
	<%
	m=datediff("d",BeginDate ,EndDate) 
	for i= 0 to m
	t=dateadd("d",i,BeginDate)
	response.Write("<td bgcolor='#e6f2a3' width='120px;' title='"& WeekDays(t) &"' align='center' nowrap><b>"& t &"</b></td>")
	next
	%>
	<td nowrap>总计费用</td>
	<td nowrap>缺少篇数</td>
	</tr>
	<%
	for i= 0 to ubound(EmployeeContentArray,2)
	temp=InspectUserTime(EmployeeContentArray(1,i),TimeCondition)
	response.Write ("<tr><td nowrap>"& EmployeeContentArray(1,i) &"</td>")
		if isnull(temp) then
		response.Write ("<td colspan='"& m+1 &"'>这个时间段内没有任何日志</td>")
		response.Write("<td align=right valign=top>¥0</td>")
		response.Write("<td align=right valign=top>"& m+1 &"</td>")
		else
		n=0
		money=0
			for j=0 to m'ubound(temp,2)
				if datediff("d",dateadd("d",j,BeginDate),temp(1,n))=0 then
				response.Write("<td valign='top' width='120px;'>")
				response.Write("<div align='right' onClick=""self.location.href='diary_read_self.asp?TheDate="& temp(1,n) &"&WhoseDiary="& temp(4,n) &"';"" ")
				response.Write("style='cursor: hand' title='查看<b>"&temp(4,n)&"</b><br>"&temp(1,n)&" 日志内容' >详细信息>>></div>")
				response.Write("<b>发生费用:¥"&temp(10,n)&"<br>关键字:"&temp(9,n)&"</b><br>")
				if len(temp(3,n))>50 then
				response.Write (left(trim(temp(3,n)),50)&"....")
				else
				response.Write trim(temp(3,n))
				end if

				response.Write("</td>")
				money=money + temp(10,n)
					if ubound(temp,2) > n then
					n=n+1
					end if
				else
				response.Write ("<td valign='top' width='120px;'><div>&nbsp;</div><b>发生费用:¥0</b><br>本日缺少日志</td>")
				end if
			next
		response.Write("<td align=right valign=top>¥"&money&"</td>")
		response.Write("<td align=right valign=top>"& m-ubound(temp,2) &"</td>")
		end if		
	response.Write ("</tr>")
	next%></table>


</body>
</html>

⌨️ 快捷键说明

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