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

📄 list_worksheet.inc

📁 物业管理和办公自动化系统
💻 INC
字号:
<%Function optionselect(i,iR)            	if CStr(i)=CStr(iR) then    	               	optionselect=" selected "    	else    	                	optionselect=""    	end if    end FunctionFunction TableSearch()		TableSearch = _		TableTitle("设 置 工 作 单 信 息 查 询 条 件", 600, "", "") & vbLF & _		"<table cellspacing=0 cellpadding=3 width=600 align=center border=0>" & vbLF & _		"<form name=""frmSearch"" method=post action=""list_worksheet.asp"">" & vbLF  & _		"<tr height=20 bgcolor=white>" & vbLF & _		"       <td colspan=2>开始时间范围:</td>"&_		"	<td colspan=2>" & DrawCal("开始日期", pDay1, "pday1", "dateimg1") & "</td>" & _			"	<td colspan=2>" & DrawCal("结束日期", pDay2, "pday2", "dateimg2") & "</td>" & _                "       <td rowspan=2 colspan=2 align=center><span id=btnSearch style=""cursor:hand"" title=""设置查询条件,然后点击查询按钮进行查询""><img border=0 src=""../images/search.gif"" style=""vertical-align:middle"">查询</span></td>"&_                              "</tr>"&_                "<tr height=20 bgcolor=white>" & vbLF & _                "       <td colspan=2>处理对象类型</td>"&_                "	<td class=tdValue><select name=""pobjecttype"">" & vbLF & _                "					<option value=-1 "&optionselect(pObjecttype,-1)&"></option>" & vbLF & _				"					<option value=0 "&optionselect(pObjecttype,0)&">系统</option>" & vbLF & _		"					<option value=1 "&optionselect(pObjecttype,1)&">设备</option>" & vbLF & _							"			</select></td>"&_		"       <td colspan=2>对象名(系统/设备)</td>"&_		"       <td><input type=""text"" name=""pobjectname"" value="""&pObjectname &""" size=12 maxlength=12></td>"&_		"</tr>"&_		"<tr height=20 bgcolor=white>" & vbLF & _		"		<td align=center>完成情况</td>" & _		"		<td class=tdValue nowrap><select name=""pfinished"">" & vbLF & _		"					<option value=-1 "&optionselect(pFinished,-1)&">全部</option>" & vbLF & _				"					<option value=0  "&optionselect(pFinished,0)&">待办</option>" & vbLF & _		"					<option value=1  "&optionselect(pFinished,1)&">已办</option>" & vbLF & _							"			</select></td>"&_				"		<td align=center>工作单类型</td>" & _		"		<td class=tdValue nowrap><select name=""pformtype"">" & vbLF & _			"					<option value=-1 "& optionselect(pFormtype,-1)&">全部</option>" & vbLF & _				"					<option value=0 "& optionselect(pFormtype,0)&">常规</option>" & vbLF & _		"					<option value=1 "& optionselect(pFormtype,1)&">临时</option>" & vbLF & _							"			</select></td>"&_		"		<td align=center>紧急程度</td>" & _		"		<td class=tdValue nowrap><select name=""purgency"">" & vbLF & _			"					<option value=-1 "& optionselect(pUrgency,-1)&">全部</option>" & vbLF & _				"					<option value=0 "& optionselect(pUrgency,0)&">普通</option>" & vbLF & _		"					<option value=1 "&optionselect(pUrgency,1)&">紧急</option>" & vbLF & _				"					<option value=2 "&optionselect(pUrgency,2)&">非常紧急</option>" & vbLF & _										"			</select></td>"&_		"		<td align=center>负责部门</td>" & _		"		<td align=center><select name=""pdepartment"" style=""width:80"">" & vbLF & _		"					<option value=-1 "& optionselect(pDepartment,-1)&">全部</option>" & vbLF & _							selectOptions(conn, "select * from t_node where mark=0", "node_id", "node_desp", pDepartment) & vbLF & _						"</select></td>" & vbLF & _			"	</tr>" & vbLF & _						"<tr height=10 bgcolor=white><td colspan=5></td></tr>" & vbLF & _		"</form>" & vbLF & _		"</table>" & vbLFEnd FunctionFunction TableHeader()	TableHeader = _		"<table cellspacing=1 cellpadding=3 width=600 align=center bgcolor=silver style=""table-layout:fixed"">" & vbLF & _		"<tr style=""display:none"">" & vbLF & _		"	<td width=95>这一行仅用于控制表格的宽度</td>" & vbLF & _		"	<td width=65></td>" & vbLF & _		"	<td width=65></td>" & vbLF & _		"	<td width=65></td>" & vbLF & _		"	<td width=65></td>" & vbLF & _		"	<td width=75></td>" & vbLF & _		"	<td width=85></td>" & vbLF & _		"	<td width=""*""></td></tr>" & vbLF & _		"<tr height=20>" & _		"<td colspan=" & iCols & " bgcolor=""#0040a0"" align=center style=""color:white;font-weight:600"">工 作 单 查 询 结 果</td></tr>" & _		"<tr bgcolor=white>" & _		"<td class=tdHead align=center><img src=""../images/bg/ar-y.gif"" width=15 height=8>&nbsp;" & TableHeaderField(sFileName, "object_type,equi_sys_id", "对象名", sFormParams, sSorting, sSorted) & "</td>" & _		"<td class=tdHead align=center>对象类型</td>" & _		"<td class=tdHead align=center>工单类型</td>" & _		"<td class=tdHead align=center>紧急程度</td>" & _		"<td class=tdHead align=center>完成情况</td>" & _		"<td class=tdHead align=center>" & TableHeaderField(sFileName, "department", "负责部门", sFormParams, sSorting, sSorted) & "</td>" & _		"<td class=tdHead align=center>" & TableHeaderField(sFileName, "starttime", "开始时间", sFormParams, sSorting, sSorted) & "</td>" & _		"<td class=tdHead align=center>&nbsp;" & TableHeaderField(sFileName, "limit_days", "完成期限", sFormParams, sSorting, sSorted) & "</td>" & _				"</tr>"End FunctionFunction TableRecords(sSQL, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams)	dim sTemp	: sTemp = ""	' 临时字符串变量		dim j					' 临时循环变量        dim sTemp1	'------------------------------------	' 分页所需的变量定义	'------------------------------------	Dim iCounter		: iCounter = 1	Dim iPrevPage, iNextPage		'------------------------------------	' 获取数据库连接	'------------------------------------		dim rs	: set rs = openRS(conn,sSQL)			dim iWorksheetid,iEquisysid,sObjectname,iObjecttype,iFormtype,iUrgency,iDepartment,sStarttime,iLimitdays,iFinished	dim sObjecttype,sFormtype,sUrgency,sFinished,sDepartment		' 如果未到记录尾,将记录定位到你翻到的页面的第一个记录,否则显示空行	if Not rs.EOF then			rs.Move (iCurrentPage - 1) * iRecordsPerPage		sTemp1="			<a style=""color:blue"" target=_blank href=""Prints.asp?pDay1=" & pDay1 & "&pDay2="&pDay2&"&pObjecttype="&pObjecttype&"&pObjectname="&pObjectname&"&pFinished="&pFinished&"&pFormtype="&pFormtype&"&pUrgency="&pUrgency&"&pDepartment="&pDepartment&"""><img border=0 src=""../images/edit.gif"">&nbsp;&nbsp;打印所有选定工单</a>" & vbLF			end if	while not rs.EOF and iCounter <= iRecordsPerPage		iWorksheetid		= GetValue(rs,"worksheet_id")		iEquisysid		= GetValue(rs,"equi_sys_id")		iObjecttype		= GetValue(rs,"object_type")		iFormtype		= GetValue(rs,"form_type")				iUrgency		= GetValue(rs,"urgency")		iDepartment		= GetValue(rs,"department")		sStarttime		= GetValue(rs,"starttime")                iLimitdays		= GetValue(rs,"limit_days")                iFinished               =GetValue(rs,"finished")				select case iObjecttype			case 0						sObjectname=DLookUp(conn,"select sys_desc from t_sys where sys_id="&ToSQL(iEquisysid,"number"))		        case 1				sObjectname=DLookUp(conn,"select name from t_equipment where equi_id="&ToSQL(iEquisysid,"number"))			case else			        sObjectname=""		end select		select case iObjecttype			case 0				sObjecttype="系统"		        case 1		                sObjecttype="设备"		        case else		                sObjecttype=""		end select					select case iFormtype			case 0				sFormtype="常规"		        case 1		                sFormtype="临时"		        case else		                sFormtype=""		end select		select case iUrgency			case 0				sUrgency="普通"		        case 1		                sUrgency="紧急"		        case 2		                sUrgency="非常紧急"		        case else		                sUrgency=""		end select		select case iFinished			case 0				sFinished="待办"		        case 1		                sFinished="已办"		        case else		                sFinished=""		end select				sDepartment=DLookUp(conn,"select node_desp from t_node where node_id="&ToSQL(iDepartment,"number")&" and mark=0")				sTemp = sTemp & "<tr bgcolor=white height=20>" & _				"<td title=""点击可以察看“" & sObjectname & "”对象工作单的信息"" style=""cursor:hand;color:blue;"" onclick=""javascript:location.href='worksheet.asp?worksheetid=" & iWorksheetid & "';"" nowrap>&nbsp;<img src=""../images/bg/ar-g.gif"" width=8 height=8>&nbsp;" & sObjectname & "&nbsp;</td>" & _				"<td align=center title=""" & sObjecttype & """ nowrap>&nbsp;" & sObjecttype & "&nbsp;</td>" & _				"<td align=center title=""" & sFormtype & """ nowrap>&nbsp;" & sFormtype & "&nbsp;</td>" & _				"<td align=center title=""" & sUrgency & """ nowrap>&nbsp;" & sUrgency & "&nbsp;</td>" & _				"<td align=center title=""" & sFinished& """ nowrap>&nbsp;" & sFinished & "&nbsp;</td>" & _				"<td align=center title=""" & sDepartment& """ nowrap>&nbsp;" & sDepartment & "&nbsp;</td>" & _				"<td align=center title=""" & sStarttime& """ nowrap>&nbsp;" & FormatDT(sStarttime, "yyyy-mm-dd") & "&nbsp;</td>" & _				"<td align=center title=""" & iLimitdays& """ nowrap>&nbsp;" & iLimitdays & "&nbsp;</td>" & _				"</tr>"		iCounter = iCounter + 1		rs.movenext	wend	CloseRS(rs)	' 填补空白行	sTemp = sTemp & WhiteRows(iCols, iCounter, iRecordsPerPage)	' 首页、前页、后页、尾页等分页信息	sTemp = sTemp & "<tr bgcolor=white height=20><td colspan=" & iCols & "><table width=600><tr><td align=left>" & _	                        sTemp1 &"</td><td align=right>"&_				Paginate(sFileName, sFormParams, sSortParams, iCurrentPage, iTotalPages) & _				"&nbsp;</td></tr></table></td></tr>"	TableRecords = sTempEnd FunctionFunction TableLink()	TableLink = _		"<table width=600 cellspacing=0 cellpadding=0 border=0 align=center>" & vbLF & _		"<tr height=10>" & vbLF & _ 		"	<td width=600><img src=""../images/bg/line.gif"" width=600 height=3></td>" & vbLF & _		"</tr>" & vbLF & _		"<tr>" & vbLF & _		"	<td width=600>&nbsp;" & vbLF & _		                "</td>" & vbLF & _		"</tr>" & vbLF & _		"</table>" & vbLFEnd Function%>

⌨️ 快捷键说明

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