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

📄 equi_list.inc

📁 物业管理和办公自动化系统
💻 INC
字号:
<%
Function FormSearchEquip()
	dim sTemp
	sTemp = "<form name=""FormSearchEquip"" method=post action=""equi_list.asp"">"& _
		"<table border=0 cellspacing=0 cellpadding=3 width=""100%"" align=center style=""table-layout:fixed"">" & _
		"<tr style=""display:none"">" & vbLF & _
		"	<td width=80></td>" & vbLF & _
		"	<td width=150></td>" & vbLF & _
		"	<td width=80></td>" & vbLF & _
		"	<td width=120></td>" & vbLF & _
		"	<td width=80></td>" & vbLF & _
		"	<td width=""*""></td>" & vbLF & _
		"</tr>" & vbLF & _
		"<tr height=20>" & vbLF & _
		"	<td colspan=6 background=""../images/bg/bnbg.gif"" style=""color:white;font-weight:600"" align=center>设 备 查 询 条 件</td></tr>" & vbLF & _
		"<tr>" & _
		"	<td align=center>设备代码:</td>" & vbLF & _
		"	<td><input type=""text"" name=""equi_id"" value=""" & pEquiId & """ size=12 maxlength=20 style=""color:blue"">&nbsp;<span style=""color:gray"">( 数字 )<span></td>" & vbLF & _
		"	<td align=center>设备类别:</td>" & vbLF & _
		"	<td><select name=""type_id"" style=""width:90px"">" & vbLF & _
					"<option value="""" selected>-所有-</option>" & SelectOptions(conn, "select type_id, type_desc from t_equipment_type", "type_id", "type_desc", pTypeId) & "</select></td>" & vbLF & _
		"	<td align=center>设备状态:</td>" & vbLF & _
		"	<td><select name=""discarded"" style=""width:90px"">" & vbLF & _
					"<option value=""-1"" selected>-所有-</option>" & vbLF & _
					"<option value=""0"">在用</option>" & vbLF & _
					"<option value=""1"">已报废</option>" & vbLF & _
					"</select>" & vbLF & _
					"</td>" & vbLF & _
		"</tr>" & vbLF & _
		"<tr>" & _
		"	<td align=center>设备名称:</td>" & vbLF & _
		"	<td><input type=""text"" name=""name"" value=""" & pName & """ size=12 maxlength=20 style=""color:blue""></td>" & vbLF & _
		"	<td align=center>所属部门:</td>" & vbLF & _
		"	<td><select name=""dept_id"" style=""width:90px"">" & vbLF & _
					"<option value="""" selected>-所有-</option>" & SelectOptions(conn, "select node_id, node_desp from t_node", "node_id", "node_desp", pDeptId) & "</select></td>" & vbLF & _
		"	<td align=center style=""color:blue;cursor:hand"" onclick=""JavaScript:OnEquipSearch();""><img border=0 src=""../images/search.gif"">查询</td>" & vbLF & _
		"	<td>&nbsp;</td>" & vbLF & _
		"</tr>" & vbLF & _
		"<tr height=5><td colspan=6></td></tr></form>" & vbLF & _
		"</table>" & vbLF
	FormSearchEquip = sTemp
End Function

Function ListTableHeader()
	ListTableHeader = _
		"<table cellspacing=1 cellpadding=3 width=""100%"" border=0 align=center bgcolor=silver style=""table-layout:fixed"">" & vbLF & _
		"<tr style=""display:none"">" & vbLF & _
		"	<td width=100>这一行仅用于控制表格宽度</td>" & vbLF & _
		"	<td width=60></td>" & vbLF & _
		"	<td width=80></td>" & vbLF & _
		"	<td width=80></td>" & vbLF & _
		"	<td width=80></td>" & vbLF & _
		"	<td width=80></td>" & vbLF & _
		"	<td width=80></td>" & vbLF & _
		"	<td width=""*""></td></tr>" & vbLF & _
 
		"<tr><td colspan=" & iCols & " bgcolor=""#0040a0"" align=center style=""color:white;font-weight:600"" height=20 >设 备 查 询 列 表</td></tr>" & vbLF & _
		"<tr bgcolor=""#eeeeee"">" &  vbLF & _
		"	<td class=tdHead>&nbsp;<img src=""../images/bg/ar-y.gif"" width=8 height=8>&nbsp;" & _
						TableHeaderField(sFileName, "name", "设备名称", sFormParams, sSorting, sSorted) & "</td>" & vbLF & _
		"	<td class=tdHead>&nbsp;" & _
						TableHeaderField(sFileName, "equi_id", "代码", sFormParams, sSorting, sSorted) & "</td>" & vbLF & _
		"	<td class=tdHead>&nbsp;" & _
						TableHeaderField(sFileName, "number", "设备编号", sFormParams, sSorting, sSorted) & "</td>" & vbLF & _
		"	<td class=tdHead>&nbsp;" & _
						TableHeaderField(sFileName, "discarded", "设备状态", sFormParams, sSorting, sSorted) & "</td>" & vbLF & _
		"	<td class=tdHead>&nbsp;" & _
						TableHeaderField(sFileName, "model", "规格型号", sFormParams, sSorting, sSorted) & "</td>" & vbLF & _
		"	<td class=tdHead>&nbsp;" & _
						TableHeaderField(sFileName, "type_desc", "设备类别", sFormParams, sSorting, sSorted) & "</td>" & vbLF & _
		"	<td class=tdHead>&nbsp;" & _
						TableHeaderField(sFileName, "room_no", "机房编号", sFormParams, sSorting, sSorted) & "</td>" & vbLF & _
		"	<td class=tdHead align=center>系统/父设备</td>" & vbLF & _
		"</tr>" & vbLF
End Function

Function ListTableTailer()
	ListTableTailer = "</table>" & vbLF
End Function

Function ListTableRecords(sSQL, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams)
	dim sTemp	: sTemp = ""	' 临时字符串变量
	dim j					' 临时循环变量

	'------------------------------------
	' 分页所需的变量定义
	'------------------------------------
	Dim iCounter		: iCounter = 1
	Dim iPrevPage, iNextPage
	
	'------------------------------------
	' 获取数据库连接
	'------------------------------------
'	response.write sSQL
'	response.end
	dim rs	: set rs = Openrs(conn,sSQL)
	dim iEquiId, iSysId, iParentEquiId, sName, sNumber, sModel, sTypeDesc, sRoomno, sDiscarded

	' 如果未到记录尾,将记录定位到你翻到的页面的第一个记录,否则显示空行
	if Not rs.EOF then	
		rs.Move (iCurrentPage - 1) * iRecordsPerPage
	end if
	while not rs.EOF and iCounter <= iRecordsPerPage
		iEquiId				= GetValue(rs, "equi_id")
		iSysId				= GetValue(rs, "sys_id")
		iParentEquiId	= GetValue(rs, "parent_equi_id")
		sName				= GetValue(rs, "name")
		sNumber			= GetValue(rs, "number")
		sModel				= GetValue(rs, "model")
		sTypeDesc		= GetValue(rs, "type_desc")
		sRoomno			= GetValue(rs, "room_no")
		sDiscarded		= GetValue(rs, "discarded")
		if CStr(sDiscarded) = "1" then	sDiscarded = "已报废" else sDiscarded = "在用"

		if iParentEquiId <> "" then
			iParentEquiId = " - " & iParentEquiId
		end if
		sTemp = sTemp & "<tr bgcolor=white>" & vbLF & _
				"	<td title=""" & sName & """ style=""color:blue"">&nbsp;<img src=""../images/bg/ar-g.gif"" width=8 height=8><a href=""etabs.asp?eid=" & iEquiId & """>&nbsp;" & Bref(sName,16) & "&nbsp;</a></td>" & vbLF & _
				"	<td align=center>" & iEquiId & "</td>" & vbLF & _
				"	<td align=center>" & sNumber & "</td>" & vbLF & _
				"	<td align=center>" & sDiscarded & "</td>" & vbLF & _
				"	<td align=center>" & sModel & "</td>" & vbLF & _
				"	<td align=center>" & sTypeDesc & "</td>" & vbLF & _
				"	<td align=center>" & sRoomno & "</td>" & vbLF & _
				"	<td align=center>" & iSysId & iParentEquiId & "</td>" & vbLF & _
				"</tr>" & vbLF
		iCounter = iCounter + 1
		rs.movenext
	wend

	' 填补空白行
	sTemp = sTemp & WhiteRows(iCols, iCounter, iRecordsPerPage)

	' 首页、前页、后页、尾页等分页信息
	sTemp = sTemp & "<tr bgcolor=white><td colspan=" & iCols & " align=right>" & vbLF & _
				Paginate(sFileName, sFormParams, sSortParams, iCurrentPage, iTotalPages) & vbLF & _
				"&nbsp;</td></tr>" & vbLF

	ListTableRecords = sTemp
End Function



%>

⌨️ 快捷键说明

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