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

📄 cardlist.inc

📁 物业管理和办公自动化系统
💻 INC
📖 第 1 页 / 共 2 页
字号:
<%
'#############################################################################################
'#
'#	文件名	 : cardlist.inc
'#	Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'#
'#	创建人	 : BinZha
'#  日 期	 : 2002-07-19
'#
'#	修改历史  : ****年**月**日 ****** 修改内容:**********************************************
'#
'#	功能描述	 : 低值易耗品卡片函数文件
'#  版   本	 :
'#
'#############################################################################################

' ====================================================================================
'  实现页面生成的功能函数
'			TableSearch()
'			FormDetail()
'			TableLink()
'			TableHeader()
'			TableRecords()
' ====================================================================================
Function TableSearch()
	'' 申请日期的日历,DrawCal函数定义在../common/commonpage.inc

	TableSearch = _
		TableTitle("设 置 查 询 条 件", 600, "", "") & _
		"<table cellspacing=0 cellpadding=0 width=600 align=center border=0>" & _
		"<form name=""frmSearch"" method=post action=""cardlist.asp?part=" & sPart & """>" & _
		"<tr height=30>" & _
		"	<td width=200>&nbsp;资产名称:<input type='text' name='cardname' value='" & pName & "'>" & "</td>" & _
		"	<td width=200>&nbsp;" & DrawCal("起始日期", pApplyDate1, "apply_date1", "dateimg11") & "</td>" & _
		"	<td width=200>&nbsp;" & DrawCal("截至日期", pApplyDate2, "apply_date2", "dateimg12") & "</td>" & _
		"</tr>" & _
		"<tr height=30>" & _
		"	<td width=200>&nbsp;使用部门:<input type=text name='depart' value='" & pDepartment & "'>" & "</td>" & _
		"	<td width=200>&nbsp;使 用 人:<input type=text name='user_name' value='" & pUserName & "'>" & "</td>" & _	
		"	<td width=200>&nbsp;&nbsp;&nbsp;&nbsp;<span id=btnSearch style=""cursor:hand"" title=""设置查询条件,然后点击查询按钮进行查询""><img border=0 src=""../images/search.gif"" style=""vertical-align:middle"">查询</span></td>" & _
		"</tr>" & _
		"<tr height=10><td colspan=3</td></tr>" & _
		"</form>" & _
		"</table>"
End Function

Function FormDetail()
	dim sSQL2, crs, rs
	dim sSerial, sName, sType, sUnit, sAmount, sDepartment, sUserName, sApplyDate, sStatus, sSigner
	dim sLink, sTopHead
	dim ActionStatus

	if not IsEmpty(iCardID) then
		
		sSQL2 = "select * from T_Expendable where ID = " & iCardID
	
		set crs = New CRecordset
		set rs = crs.Open(dbLocal, sSQL2)

		if rs.EOF then
			Server.Transfer("../common/error.asp")
			Response.end
		end if

		'' 获取任务信息的各种数据
		sSerial				= crs.GetValue("Serial")
		sName				= crs.GetValue("Name")
		sType				= crs.GetValue("Type")
		sUnit				= crs.GetValue("Unit")
		sAmount				= crs.GetValue("Amount")
		sDepartment			= crs.GetValue("Department")
		sUserName			= crs.GetValue("UserName")
		sApplyDate			= crs.GetValue("ApplyDate")
		sStatus				= crs.GetValue("Status")
		sSigner				= crs.GetValue("Signer")

		'' 普通用户不能察看别人的申请单
		if not IsOfficer() then
			if sSigner <> sEmpName then
				Server.Transfer("../common/error.asp")
				Response.end
			end if
		end if
		
		'' 如果审批以后就不能修改记录
		'if not sStatus = "不通过!" then
		'	if sAction = "add" or sAction = "edit" then
		'		Server.Transfer("../common/error.asp")
		'		Response.end
		'	end if
		'end if
		
		crs.Close()

		sTopHead = "察看低值易耗品卡片详细信息"
		sLink = _
			"<tr bgcolor=white height=20>" & _
			"	<td colspan=4 align=center>" 
		
		'' 如果审批不通过, 则显示更新、删除按钮
		if sStatus = "不通过!" then
			sTopHead = "修改低值易耗品卡片"
			sLink = sLink & _
				"	<img border=0 src=""../images/button/resubmit.gif"" onclick=""btnUpdate_OnClick()"" style=""cursor:hand"">&nbsp;&nbsp;&nbsp;&nbsp;" & _
				"	<img border=0 src=""../images/button/delete.gif"" onclick=""btnDelete_OnClick()"" style=""cursor:hand"">&nbsp;&nbsp;&nbsp;&nbsp;" 
		end if

		'' 办公室主任操作菜单
		if sStatus = "等待审批" and IsOfficer() then
			sLink = sLink & _
				"	<img border=0 src=""../images/button/distribute.gif"" onclick=""btnPass_OnClick()"" style=""cursor:hand"">&nbsp;&nbsp;&nbsp;&nbsp;" & _
				"	<img border=0 src=""../images/button/back.gif"" onclick=""btnBack_OnClick()"" style=""cursor:hand"">&nbsp;&nbsp;&nbsp;&nbsp;"
		end if

		sLink = sLink & _
			"		<img border=0 src=""../images/button/cancel.gif"" onclick=""btnCancel_OnClick()"" style=""cursor:hand""></td>" & _
			"</tr>"
	else
		sTopHead = "添加低值易耗品卡片"
		sLink = _
			"<tr bgcolor=white height=20>" & _
			"	<td colspan=4 align=center>" & _
			"		<img border=0 src=""../images/button/add.gif"" onclick=""btnAdd_OnClick()"" style=""cursor:hand"">&nbsp;&nbsp;&nbsp;&nbsp;" & _
			"		<img border=0 src=""../images/button/cancel.gif"" onclick=""btnCancel_OnClick()"" style=""cursor:hand""></td>" & _
			"</tr>"
	end if

	if sFormAction <> "newdsp" then	
		FormDetail = TableHeader() & _ 
				 TableRecords(sSQL & sWhere & sOrderby, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams )
	end if
		
	'' 如果对材料设备记录进行处理的话,显示记录处理界面和菜单
	if sFormAction = "newdsp" or sAction = "edit"  then 
		FormDetail = FormDetail & _
			TableTitle(sTopHead, 600, "", "") & _
			"<table  cellspacing=0 cellpadding=0 bgcolor=white border=0 width=600><tr><td class=tdlist>" & _
			"<table cellspacing=1 cellpadding=0 bgcolor=white border=0 width=600>" & _
			"<form method=post name=frmCard action=""cardlist.asp"">" & _
			"<input type=""hidden"" name=""FormAction"">" & _
			"<input type=""hidden"" name=""id"" value='" & iCardID & "'>" & _
			"<tr height=10><td></td></tr>" & _
			"<tr bgcolor=white height=20>" & _
			"	<td width=100 align=right>卡片编号:</td>" & _
			"	<td>&nbsp;<input type=text name='serial' value='" & sSerial & "'></td>" & _
			"	<td></td>" & _
			"	<td></td>" & _
			"</tr>" & _
			"<tr bgcolor=white height=20>" & _
			"	<td width=100 align=right>材料设备名称:</td>" & _
			"	<td>&nbsp;<input type=text name='name' value='" & sName & "'></td>" & _
			"	<td width=100 align=right>规格程式:</td>" & _
			"	<td>&nbsp;<input type=text name='type' value='" & sType & "'></td>" & _
			"</tr>" & _
			"<tr bgcolor=white height=20>" & _
			"	<td width=100 align=right>单位:</td>" & _
			"	<td>&nbsp;<input type=text name='unit' value='" & sUnit & "'></td>" & _
			"	<td width=100 align=right>数量:</td>" & _
			"	<td>&nbsp;<input type=text name='amount' value='" & sAmount & "'></td>" & _
			"</tr>" & _
			"<tr bgcolor=white height=20>" & _
			"	<td width=100 align=right>使用部门:</td>" & _
			"	<td>&nbsp;<select name=""department"" style=""width:132"">" & selectOptions(dbLocal, "t_node", "node_name", "node_name",sDepartment,"node_level=2") & "</select></td>" & _
			"	<td width=100 align=right>使用人:</td>" & _
			"	<td>&nbsp;<select name=""username"" style=""width:132"">" & selectOptions(dbLocal, "t_employee", "name", "name",sUserName,"co_id=" & GetCoId & " and isdummy=0 and dismissed=0") & "</select></td>" & _
			"</tr>"
		
		if sFormAction = "newdsp" then FormDetail = FormDetail & "<tr height=80><td></td></tr>"

		FormDetail = FormDetail & _
			"<tr height=20><td></td></tr>" & _
			sLink & _
			"<tr height=15><td></td></tr>" &  _
			"</form>" & _
			"</table>" & _
			"</td></tr></table>" 
	else
		FormDetail = FormDetail & _
			"<table cellspacing=1 cellpadding=0 bgcolor=white border=0 width=600>" & _
			"<form method=post name=frmCard action=""cardlist.asp"">" & _
			"<input type=""hidden"" name=""FormAction"">" & _
			"<input type=""hidden"" name=""part"" value='" & sPart & "'>" & _
			"<input type=""hidden"" name=""name"" value='" & pName & "'>" & _
			"<input type=""hidden"" name=""department"" value='" & pDepartment & "'>" & _
			"<input type=""hidden"" name=""username"" value='" & pUserName & "'>" & _
			"<input type=""hidden"" name=""applydate1"" value='" & pApplyDate1 & "'>" & _
			"<input type=""hidden"" name=""applydate2"" value='" & pApplyDate2 & "'>" & _
			"<tr height=20><td></td></tr>" & _
			"<tr bgcolor=white height=20>" & _
			"	<td colspan=4 align=center>" & _
			"		<img border=0 src=""../images/button/add.gif"" onclick=""btnAddCard_OnClick()"" style=""cursor:hand"">&nbsp;&nbsp;&nbsp;&nbsp;" & _
			"		<img border=0 src=""../images/button/preview.gif"" onclick=""btnPreview_OnClick()"" style=""cursor:hand""></td>" & _
			"</tr>" & _
			"<tr height=15><td></td></tr>" &  _
			"</form>" & _
			"</table>"
	end if
	
End Function

Function TableLink()
	TableLink = _

⌨️ 快捷键说明

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