📄 emp_op.inc
字号:
<%
function TableEmp()
dim sDepartId, sDepartment, sPos, sAccountId, sEmpNo, sEmpName, sBirthday, sGender, sFolk, sEducation, sGraduateDate, sGraduateSchool, sSpeciality, sPolitical, sPosition, sTitle, sMarriage, sHAddr, sHZip, sHPhone, sMobile, sWorkDate, sTelecomDate, sEmpDate, sEmail
dim sNative, sId, sRemark, sPhoto
dim sSQL
sSQL = "select t1.emp_id, t1.emp_no, t1.name, t2.gender_desc as gender, t1.birthday, t3.education_desc as 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, " & _
" t4.position_desc as pos, t5.title_desc as title, t6.parent_node_id as depart_id, t6.node_name as position, " & _
" t7.folk_desc as folk, t8.political_desc as political, t9.marriage_desc as marriage, t1.native, t1.id, t1.remark, t1.photo" & _
" from t_employee t1" & _
" left join t_gender t2 on t1.gender = t2.gender_id" & _
" left join t_education t3 on t1.education = t3.education_id" & _
" left join t_position t4 on t1.pos = t4.position_id" & _
" left join t_title t5 on t1.title = t5.title_id" & _
" left join t_node t6 on t1.node_id = t6.node_id" & _
" left join t_folk t7 on t1.folk = t7.folk_id" & _
" left join t_political t8 on t1.political = t8.political_id" & _
" left join t_marriage t9 on t1.marriage = t9.marriage_id" & _
" where serial = " & pEmpSerial & _
" and t1.co_id = 1 and t1.isdummy = 0"
' response.write sSQL : response.end
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
sAccountId = 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") '' 职称
sDepartId = crs.GetValue("depart_id") '' 部门标识
sPosition = crs.GetValue("position") '' 现任岗位
sFolk = crs.GetValue("folk") '' 民族
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") '' 进本单位年月
sNative = crs.GetValue("native") '' 籍贯
sId = crs.GetValue("id") '' 身份证号码
sRemark = crs.GetValue("remark") '' 补充说明
sEmail = sAccountId & "@infortower.com"
'' 员工照片
sPhoto = GetPhoto(pEmpSerial)
if sHZip <> "" then sHAddr = sHAddr & "(邮编:" & sHZip & ")"
'' 部门名称
if CStr(sDepartId) <> "" then sDepartment = DLookUp(dbLocal, "t_node", "node_name", "node_id=" & sDepartId)
TableEmp = _
"<table cellspacing=1 cellpadding=3 bgcolor=""silver"" width=""100%"" border=0 style=""table-layout:fixed"">" & vbLF & _
" <tr style=""display:none"">" & vbLF & _
" <td width=80>这一行仅用于控制每一栏的宽度</td><td width=""12%"">这一行仅用于控制每一栏的宽度</td>" & vbLF & _
" <td width=80>这一行仅用于控制每一栏的宽度</td><td width=""*"">这一行仅用于控制每一栏的宽度</td>" & vbLF & _
" <td width=75>这一行仅用于控制每一栏的宽度</td><td width=""16%"">这一行仅用于控制每一栏的宽度</td>" & vbLF & _
" <td width=90>这一行仅用于控制每一栏的宽度</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=""#0040a0"" style=""color:white;font-weight:600"">" & vbLF & _
" <td colspan=7 align=center>员 工 基 本 情 况 表</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>姓 名</td><td class=tdValue nowrap>" & sEmpName & "</td>" & vbLF & _
" <td align=center>所在部门</td><td class=tdValue nowrap>" & sDepartment & "</td>" & vbLF & _
" <td align=center>现任岗位</td><td class=tdValue nowrap>" & sPosition & "</td>" & vbLF & _
" <td rowspan=5 align=center style=""color:gray"">" & sPhoto & "</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>工 号</td><td class=tdValue nowrap>" & sEmpNo & " </td>" & vbLF & _
" <td align=center>出生年月</td><td class=tdValue nowrap>" & sBirthday & "</td>" & vbLF & _
" <td align=center>性 别</td><td class=tdValue nowrap>" & sGender & "</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>民 族</td><td class=tdValue nowrap>" & sFolk & "</td>" & vbLF & _
" <td align=center>籍 贯</td><td class=tdValue nowrap>" & sNative & "</td>" & vbLF & _
" <td align=center>婚姻状况</td><td class=tdValue nowrap>" & sMarriage & "</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>政治面貌</td><td class=tdValue nowrap>" & sPolitical & "</td>" & vbLF & _
" <td align=center>职 务</td><td class=tdValue nowrap>" & sPos & "</td>" & vbLF & _
" <td align=center>职 称</td><td class=tdValue nowrap>" & sTitle & "</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>学 历</td><td class=tdValue nowrap>" & sEducation & "</td>" & vbLF & _
" <td align=center colspan=1>学历取得时间</td><td colspan=3 class=tdValue nowrap>" & sGraduateDate & "</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>原毕业学校</td><td colspan=3 class=tdValue nowrap>" & sGraduateSchool & "</td>" & vbLF & _
" <td align=center>所学专业</td><td colspan=2 class=tdValue nowrap>" & sSpeciality & "</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>家庭地址</td><td colspan=3 class=tdValue nowrap>" & sHAddr & "</td>" & vbLF & _
" <td align=center>家庭电话</td><td class=tdValue colspan=2 nowrap>" & sHPhone & "</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>手机或BP机</td><td class=tdValue colspan=3 nowrap>" & sMobile & "</td>" & vbLF & _
" <td align=center nowrap>身份证号码</td><td class=tdValue colspan=2 nowrap>" & sId & "</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>参加工作年月</td><td colspan=3 class=tdValue nowrap>" & sWorkDate & "</td>" & vbLF & _
" <td align=center nowrap>进邮电年月</td><td colspan=2 class=tdValue nowrap>" & sTelecomDate & "</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>进本单位年月</td><td colspan=3 class=tdValue nowrap>" & sEmpDate & "</td>" & vbLF & _
" <td align=center nowrap>电子信箱</td><td colspan=2 class=tdValue nowrap>" & sEmail & "</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white>" & vbLF & _
" <td align=center>补充信息</td>" & vbLF & _
" <td valign=top colspan=6 style=""word-wrap:break-word;""><pre>" & sRemark & "</pre></td>" & vbLF & _
Relations & _
Resumes & _
"</table>"
end function
function TableAction()
dim sTemp : sTemp = ""
if IsHrAdmin then '' 只有人事管理员才显示管理的链接
sTemp = _
" " & vbLF & _
" <a style=""color:blue"" href=""emp_oe.asp?emp_serial=" & pEmpSerial & """><img border=0 src=""../images/edit.gif""> 修改员工信息</a>" & vbLF & _
" " & vbLF & _
" <a style=""color:blue"" href=""emp_od.asp?emp_serial=" & pEmpSerial & """><img border=0 src=""images/dismiss.gif""> 员工离职</a>" & vbLF
end if
TableAction = _
"<table width=600 cellspacing=0 cellpadding=5 height=30 align=center>" & vbLF & _
" <tr>" & vbLF & _
" <td align=center>" & _
" <a style=""color:blue"" target=_blank href=""emp_op.asp?emp_serial=" & pEmpSerial & "&forprint=1""><img border=0 src=""../images/edit.gif""> 察看打印版</a>" & vbLF & _
sTemp & vbLF & _
"</td>" & vbLF & _
" </tr>" & vbLF & _
"</table>"
end function
'****************************************************************************************
' 员工主要社会关系
'****************************************************************************************
function Relations()
dim iCounter, sInforFirstLine, sInforOtherLines, sInfor, sHeader
dim crs, rs
dim sRelation, sName, sCompany, sPolitical, sPhone
dim sSQL : sSQL = "select relation, name, company, contact_phone, political_desc from t_relations" & _
" left join t_political on t_relations.political = t_political.political_id" & _
" where emp_serial = " & pEmpSerial
set crs = New CRecordset
set rs = crs.Open(dbLocal, sSQL)
sHeader = _
" <td align=center>姓名</td>" & _
" <td align=center>称谓</td>" & _
" <td align=center colspan=3>所在单位及担任工作</td>" & _
" <td align=center>联系电话</td>" & vbLF
sInfor = ""
iCounter = 0
while Not rs.EOF
iCounter = iCounter + 1
sRelation = crs.GetValue("relation")
sName = crs.GetValue("name")
sCompany = crs.GetValue("company")
sPolitical = crs.GetValue("political_desc")
sPhone = crs.GetValue("contact_phone")
sInfor = sInfor & _
"<tr bgcolor=""white"" height=25>" & vbLF & _
" <td align=center class=tdValue nowrap>" & sName & "</td>" & vbLF & _
" <td align=center class=tdValue nowrap>" & sRelation & "</td>" & vbLF & _
" <td colspan=3 class=tdValue nowrap>" & sCompany & "</td>" & vbLF & _
" <td align=center class=tdValue nowrap>" & sPhone & "</td>" & vbLF & _
"</tr>" & vbLF
rs.movenext
wend
crs.Close()
if iCounter > 0 then '' 有记录
Relations = _
"<tr bgcolor=""white"" height=1><td colspan=7></td></tr>" & vbLF & _
"<tr bgcolor=""white"">" & vbLF & _
" <td rowspan=" & iCounter + 1 & " align=center>主要社会关系</td>" & sHeader & vbLF & _
"</tr>" & vbLF & _
sInfor
else '' 无记录
Relations = _
"<tr bgcolor=""white"" height=1><td colspan=7></td></tr>" & vbLF & _
"<tr bgcolor=""white"" height=25>" & vbLF & _
" <td align=center>主要社会关系</td><td colspan=6 class=tdValue>(无)</td>" & vbLF & _
"</tr>" & vbLF
end if
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 class=tdValue nowrap>" & sPeriod & "</td>" & vbLF & _
" <td colspan=3 class=tdValue nowrap>" & sCompany & "</td>" & vbLF & _
" <td align=center class=tdValue nowrap>" & sCertifier & "</td>" & vbLF & _
"</tr>" & vbLF
rs.movenext
wend
crs.Close()
if iCounter > 0 then '' 有记录
Resumes = _
"<tr bgcolor=""white"" height=1><td colspan=7></td></tr>" & vbLF & _
"<tr bgcolor=""white"">" & vbLF & _
" <td rowspan=" & iCounter + 1 & " align=center>主 要<br>学习工作经历</td>" & sHeader & vbLF & _
"</tr>" & vbLF & _
sInfor
else '' 无记录
Resumes = _
"<tr bgcolor=""white"" height=1><td colspan=7></td></tr>" & vbLF & _
"<tr bgcolor=""white"">" & vbLF & _
" <td align=center>主 要<br>学习工作经历</td><td colspan=6 class=tdValue>(无)</td>" & vbLF & _
"</tr>" & vbLF
end if
end function
Function TableLink()
dim sTemp : sTemp = ""
if IsHrAdmin then '' 只有人事管理员才显示管理的链接
sTemp = _
" " & vbLF & _
" <img src=""../images/goto.gif""> <a href=""position.asp"">职务管理</a>" & vbLF & _
" " & vbLF & _
" <img src=""../images/goto.gif""> <a href=""title.asp"">职称管理</a>" & vbLF & _
" " & vbLF & _
" <img src=""../images/goto.gif""> <a href=""node_o.asp"">组织结构管理</a>" & vbLF
end if
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> " & _
" <img src=""../images/goto.gif""> <a href=""emp_ol.asp"">在职员工查询</a>" & vbLF & _
sTemp & vbLF & _
" " & vbLF & _
" <img src=""../images/goto.gif""> <a href=""emp_odl.asp"">离职员工查询</a></td>" & vbLF & _
"</tr>" & vbLF & _
"</table>" & vbLF
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -