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

📄 t_basic.inc

📁 物业管理和办公自动化系统
💻 INC
字号:
<%
function TableFormEmp()
	dim sDepartmentId, sPos, sEmpId, sEmpNo, sEmpName, sBirthday, sGender, sFolk, sEducation, sGraduateDate, sGraduateSchool, sSpeciality, sPolitical, sPositionId, sTitle, sMarriage, sHAddr, sHZip, sHPhone, sMobile, sWorkDate, sTelecomDate, sEmpDate, sEmail
'	dim sNodeId, sParentNodeId
	dim sNative, sPersonalId

	dim sSQL
	sSQL = "select t1.emp_id, t1.emp_no, t1.name, t1.gender, t1.birthday, t1.education, " & _
				" t1.graduate_date, t1.graduate_school, t1.specialty, t1.home_address, home_phone, home_zip, " & _
				" t1.mobile, t1.work_date, t1.telecom_date, t1.emp_date, t1.co_email as email, " & _
				" t1.pos, t1.title, t6.parent_node_id as department_id, t1.node_id as position_id, t6.node_name as position_name, " & _
				" t1.folk, t1.native, t1.id, t1.political, t1.marriage" & _
				" from t_employee t1" & _
				" left join t_node t6 on t1.node_id = t6.node_id" & _
				" where serial = " & pEmpSerial & _
				" and t1.co_id = 1 and t1.isdummy = 0"
	dim crs, rs
	set crs = New CRecordset
	set rs = crs.Open(dbLocal, sSQL)
	
	'' 若找不到相应的记录,则跳转到出错页面
	if rs.EOF then
			Response.Clear
			Server.Transfer("../common/error.asp")
			Response.end
	end if

	sEmpid = crs.GetValue("emp_id")			'' 用户名
	sEmpNo = crs.GetValue("emp_no")			'' 工号
	sEmpName = crs.GetValue("name")			'' 姓名
	sGender = crs.GetValue("gender")			'' 性别
	sBirthday = crs.GetValue("birthday")		'' 出生日期
	sEducation = crs.GetValue("education")	'' 教育程度
	sGraduateDate = crs.GetValue("graduate_date")			'' 毕业时间
	sGraduateSchool = crs.GetValue("graduate_school")		'' 毕业学校
	sSpeciality = crs.GetValue("specialty")		'' 专业
	sPos = crs.GetValue("pos")						'' 职务
	sTitle = crs.GetValue("title")					'' 职称
	sDepartmentId = crs.GetValue("department_id")		'' 部门标识
	sPositionId = crs.GetValue("position_id")			'' 岗位标识
	sFolk = crs.GetValue("folk")					'' 民族
	sNative = crs.GetValue("native")				'' 籍贯
	sPersonalId = crs.GetValue("id")		'' 身份证号码
	sPolitical = crs.GetValue("political")			'' 政治面貌
	sMarriage = crs.GetValue("marriage")		'' 婚姻状况
	sHAddr = crs.GetValue("home_address")	'' 家庭地址
	sHZip = crs.GetValue("home_zip")			'' 邮政编码
	sHPhone = crs.GetValue("home_phone")	'' 住宅电话
	sMobile = crs.GetValue("mobile")				'' 移动电话
	sWorkDate = crs.GetValue("work_date")				'' 参加工作年月
	sTelecomDate = crs.GetValue("telecom_date")		'' 进邮电年月
	sEmpDate = crs.GetValue("emp_date")				'' 进本单位年月

	sEmail = sEmpId & "@infortower.com"

	crs.Close()



	' 根据该员工的岗位获取其所在部门之下所有的岗位信息
	dim sDepartment
	sDepartment = ""
	sSQL = "select node_id, node_name from t_node" & _
			" where parent_node_id = (select parent_node_id from t_node where node_id = " & ToSQL(sPositionId, "Number") & ")" & _
			" order by node_name"
	set crs = New CRecordset
	set rs = crs.Open(dbLocal, sSQL)

	while not rs.EOF 
		if sDepartment <> "" then sDepartment = sDepartment & "&"
		sDepartment = sDepartment & crs.GetValue("node_id") & "?" & crs.GetValue("node_name")
		rs.MoveNext
	wend
	crs.Close()

	sDepartment = sDepartmentId & ":" & sDepartment


	''if sHPhone <> "" then sHAddr = sHAddr & "(邮编:" & sHZip & ")"
	'' 部门名称
	'sDepartment = DLookUp(dbLocal, "t_node", "node_name", "node_id=" & sDepartId)
'	response.write "部门:" & sDepartment & "<br>"
'	response.write "岗位:" & sPositionId & "<br>"
'		"	<tr bgcolor=""#0040a0"" style=""color:white;font-weight:600"">" & vbLF & _
'		"		<td colspan=6 align=center>修 改 员 工 信 息</td>" & vbLF & _
'		"	</tr>" & vbLF & _
	TableFormEmp = _
		"	<tr bgcolor=white height=25>" & vbLF & _
		"		<td width=73 align=center>姓 名</td>" & vbLF & _
		"		<td><input type=""text"" name=""name"" value=""" & sEmpName & """ size=12 maxlength=10></td>" & vbLF & _
		"		<td width=80 align=center>部 门</td>" & vbLF & _
		"		<td width=110><select name=""department_id"" style=""width:106"">" & _
						DepartPosiSelectOptions(dbLocal, sDepartment) & _
						"</select></td>" & vbLF & _
		"		<td width=70 align=center>岗 位</td>" & vbLF & _
		"		<td width=110><select name=""position_id"">" & vbLF & _
						"</select></td>" & vbLF & _
		"	</tr>" & vbLF & _
		"	<tr bgcolor=white height=25>" & vbLF & _
		"		<td align=center>工 号</td>" & vbLF & _
		"		<td><input type=""text"" name=""emp_no"" value=""" & sEmpNo & """ size=12 maxlength=15></td>" & vbLF & _
		"		<td align=center>出生年月</td>" & vbLF & _
		"		<td><input type=""text"" name=""birthday"" value=""" & sBirthday & """ size=16 maxlength=25></td>" & vbLF & _
		"		<td align=center>性 别</td>" & vbLF & _
		"		<td><select name=""gender"">" & _
						selectOptions(dbLocal, "t_gender", "gender_id", "gender_desc", sGender, "") & vbLF & _
						"</select></td>" & vbLF & _
		"	</tr>" & vbLF & _
		"	<tr bgcolor=white height=25>" & vbLF & _
		"		<td align=center>民 族</td>" & vbLF & _
		"		<td><select name=""folk"" style=""width:86"">" & vbLF & _
						selectOptions(dbLocal, "t_folk", "folk_id", "folk_desc", sFolk, "") & vbLF & _
						"</select></td>" & vbLF & _
		"		<td align=center>籍 贯</td>" & vbLF & _
		"		<td><input type=""text"" name=""native"" value=""" & sNative & """ size=16 maxlength=20></td>" & vbLF & _
		"		<td align=center>身份证号码</td>" & vbLF & _
		"		<td><input type=""text"" name=""creditid"" value=""" & sPersonalId & """ size=16 maxlength=20></td>" & vbLF & _
		"	</tr>" & vbLF & _
		"	<tr bgcolor=white height=25>" & vbLF & _
		"		<td align=center>最高学历</td>" & vbLF & _
		"		<td><select name=""education"">" & vbLF & _
						selectOptions(dbLocal, "t_education", "education_id", "education_desc", sEducation, "") & vbLF & _
						"</select></td>" & vbLF & _
		"		<td align=center>学历取得时间</td>" & vbLF & _
		"		<td><input type=""text"" name=""graduate_date"" value=""" & sGraduateDate & """ size=16 maxlength=20></td>" & vbLF & _
		"		<td></td>" & _
		"		<td></td>" & _
		"	</tr>" & vbLF & _
		"	<tr bgcolor=white height=25>" & vbLF & _
		"		<td align=center>原毕业学校</td>" & vbLF & _
		"		<td colspan=2><input type=""text"" name=""graduate_school"" value=""" & sGraduateSchool & """ size=27 maxlength=25></td>" & vbLF & _
		"		<td align=center>所学专业</td>" & vbLF & _
		"		<td colspan=2><input type=""text"" name=""specialty"" value=""" & sSpeciality & """ size=29 maxlength=25></td>" & vbLF & _
		"	</tr>" & vbLF & _
		"	<tr bgcolor=white height=25>" & vbLF & _
		"		<td align=center>职 务</td>" & vbLF & _
		"		<td><select name=""pos"" style=""width:86"">" & vbLF & _
						selectOptions(dbLocal, "t_position", "position_id", "position_desc", sPos, "") & vbLF & _
						"</select></td>" & vbLF & _
		"		<td align=center>职 称</td>" & vbLF & _
		"		<td><select name=""title"" style=""width:106"">" & vbLF & _
						selectOptions(dbLocal, "t_title", "title_id", "title_desc", sTitle, "") & vbLF & _
						"</select></td>" & vbLF & _
		"		<td align=center>政治面貌</td>" & vbLF & _
		"		<td><select name=""political"" style=""width:106"">" & vbLF & _
						selectOptions(dbLocal, "t_political", "political_id", "political_desc", sPolitical, "") & vbLF & _
						"</select></td>" & vbLF & _
		"	</tr>" & vbLF & _
		"	<tr bgcolor=white height=25>" & vbLF & _
		"		<td align=center>家庭地址</td>" & vbLF & _
		"		<td colspan=3><input type=""text"" name=""home_address"" value=""" & sHAddr & """ size=46 maxlength=25></td>" & vbLF & _
		"		<td align=center>邮政编码</td>" & vbLF & _
		"		<td><input type=""text"" name=""home_zip"" value=""" & sHZip & """ size=16 maxlength=8></td>" & vbLF & _
		"	</tr>" & vbLF & _
		"	<tr bgcolor=white height=25>" & vbLF & _
		"		<td align=center>家庭电话</td>" & vbLF & _
		"		<td><input type=""text"" name=""home_phone"" value=""" & sHPhone & """ size=12 maxlength=25></td>" & vbLF & _
		"		<td align=center>手机或BP机</td>" & vbLF & _
		"		<td><input type=""text"" name=""mobile"" value=""" & sMobile & """ size=16 maxlength=25></td>" & vbLF & _
		"		<td align=center>婚姻状况</td>" & vbLF & _
		"		<td><select name=""marriage"" style=""width:106"">" & vbLF & _
						selectOptions(dbLocal, "t_marriage", "marriage_id", "marriage_desc", sMarriage, "") & vbLF & _
						"</select></td>" & vbLF & _
		"	</tr>" & vbLF & _
		"	<tr bgcolor=white height=25>" & vbLF & _
		"		<td align=center>参加工作年月</td>" & vbLF & _
		"		<td colspan=2><input type=""text"" name=""work_date"" value=""" & sWorkDate & """ size=27 maxlength=25></td>" & vbLF & _
		"		<td align=center>进邮电年月</td>" & vbLF & _
		"		<td colspan=3><input type=""text"" name=""telecom_date"" value=""" & sTelecomDate & """ size=29 maxlength=25></td>" & vbLF & _
		"	</tr>" & vbLF & _
		"	<tr bgcolor=white height=25>" & vbLF & _
		"		<td align=center>进本单位年月</td>" & vbLF & _
		"		<td colspan=2><input type=""text"" name=""emp_date"" value=""" & sEmpDate & """ size=27 maxlength=25></td>" & vbLF & _
		"		<td align=center>电子信箱</td>" & vbLF & _
		"		<td colspan=2>" & sEmail & "</td>" & vbLF & _
		"	</tr>"
end function


'****************************************************************************************
' 员工主要学习工作经历
'****************************************************************************************
function Resumes()
	dim iCounter, sInfor, sHeader
	dim crs, rs
	dim sPeriod, sCompany, sCertifier


	dim sSQL : sSQL = "select period, company, certifier from t_resume" & _
				" where emp_serial = " & pEmpSerial
	
	set crs = New CRecordset
	set rs = crs.Open(dbLocal, sSQL)

	sHeader = _ 
				"		<td align=center colspan=2>年、月 ~ 年、月</td>" & _
				"		<td align=center colspan=3>所在单位及担任工作</td>" & _
				"		<td align=center>证明人</td>" & vbLF

	sInfor = ""
	iCounter = 0
	while Not rs.EOF
		iCounter = iCounter + 1
		sPeriod = crs.GetValue("period")
		sCompany = crs.GetValue("company")
		sCertifier = crs.GetValue("certifier")

		sInfor = sInfor & _
				"<tr bgcolor=""white"" height=25>" & vbLF & _
				"		<td align=center colspan=2>" & sPeriod & "</td>" & vbLF & _
				"		<td colspan=3>" & sCompany & "</td>" & vbLF & _
				"		<td align=center>" & sCertifier & "</td>" & vbLF & _
				"</tr>" & vbLF
	
		rs.movenext
	wend
	crs.Close()

	if iCounter > 0 then	'' 有记录
		Resumes = _
				"<tr bgcolor=""white"" height=25>" & vbLF & _
				"		<td rowspan=" & iCounter + 1 & " align=center>主  要<br>学习工作经历</td>" & sHeader & vbLF & _
				"</tr>" & vbLF & _
				sInfor
	else							'' 无记录
		Resumes = _
				"<tr bgcolor=""white"" height=25>" & vbLF & _
				"		<td align=center>主  要<br>学习工作经历</td><td colspan=6>(无)</td>" & vbLF & _
				"</tr>" & vbLF
	end if
end function



Function TableLink()
	TableLink = _
		"<table width=600 cellspacing=0 cellpadding=0 border=0 align=center>" & _
		"<tr height=10>" & _ 
		"	<td width=600><img src=""../images/bg/line.gif"" width=600 height=3></td>" & _
		"</tr>" & _
		"<tr>" & _
		"	<td width=600>&nbsp;" & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""emp_ol.asp"">员工信息查询</a>" & _
		"		&nbsp;&nbsp;&nbsp;" & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""position.asp"">职务管理</a>" & _
		"		&nbsp;&nbsp;&nbsp;" & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""title.asp"">职称管理</a>" & _
		"		&nbsp;&nbsp;&nbsp;" & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""node_o.asp"">组织结构管理</a>" & _
		"		&nbsp;&nbsp;&nbsp;" & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""emp_odl.asp"">离职员工查询</a></td>" & _
		"</tr>" & _
		"</table>"
End Function

%>

⌨️ 快捷键说明

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