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

📄 hrmbase_edit.asp

📁 OFFICE办公自动化
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
'==============================================================
'OA 表单生成器
'版本: 1.1.0 -- 2005-5-24
'程序版权:(c) 2004 by 展亮
'说明:本代码为自由代码,用户可以自由使用,但请保留作者文件头部说明
'   在使用过程中如出现什么问题请及时与作者联系。
'   电子邮件:zlbox@yeah.net QQ:2343397
'=============================================================
'功能:添加/编辑档案基本信息
'参数:	request.form("addedit_subed")="true"#表单提交; request("id")#要编辑记录的ID;
'=============================================================
%>

<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->
<!--#include file="../inc/ronger.asp"-->

<%
'response.buffer=false
'------------------------------------------------设置参数
LoginID=trim(Session("LoginID")) : if LoginID="" then LoginID=0 '当前用户ID
pid=request("id"):if pid="" then pid=0 '记录ID
'------------------------------------------------
'------------------------------------------------添加/修改记录
table="tbioaHrmBase" '表名
if request.form("addedit_subed")="true" then
'表单提交后
	if pid=0 then
	  call insert(table,false)
	  response.write "<script>alert('档案基本信息录入成功!');this.location='HrmBase_list.asp'</script>"
		response.end
	else
	  call update(table,"id",pid,false)
	  response.write "<script>alert('档案基本信息修改成功!');history.go(-2)</script>"
		response.end
	end if
end if
'------------------------------------------------退休
if request.form("addedit_subed")="tuixiu" then
	oConn.Execute "update tbioaHrmBase set mod=-1 where id="&pid
	response.write "<script>alert('档案基本信息修改成功!');history.go(-2)</script>"
end if
'------------------------------------------------解除合同
if request.form("addedit_subed")="jcht" then
	oConn.Execute "update tbioaHrmBase set mod=-2 where id="&pid
	response.write "<script>alert('档案基本信息修改成功!');history.go(-2)</script>"
end if
'------------------------------------------------辞职
if request.form("addedit_subed")="cz" then
	oConn.Execute "update tbioaHrmBase set mod=-3 where id="&pid
	response.write "<script>alert('档案基本信息修改成功!');history.go(-2)</script>"
end if
'--------------------------------------------取记录
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from " & table & " where ID="&pid
rs.open sql,oConn,1,1
'------------------------------------------------
function showvalue(field)
	if rs.eof then
		showvalue=""
	else
		if (isnull(rs(field))) then showvalue="" else showvalue=Server.HTMLEncode(rs(field))
	end if
end function
%>


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/main.css" type=text/css>
<title>main</title>
<script src="../js/Popup.js"></script> <script src="../js/formatdate.js"></script>
<script src="../js/front_chec.js"></script>
<script src="../js/input_select.js"></script>
<script src="../js/city.js"></script>
<script>
	function itod(sId,frm){
		var sBirthday=""
		if(sId.length==15){
			sBirthday="19"+sId.substr(6,2)*1+"-"+Number(sId.substr(8,2))*1+"-"+Number(sId.substr(10,2))*1;
		}
		if(sId.length==18){
			sBirthday=sId.substr(6,4)*1+"-"+Number(sId.substr(10,2))*1+"-"+Number(sId.substr(12,2))*1;
		}
		frm.value=sBirthday
	}
</script>
</head>

<body topmargin="10" leftmargin="10">

<!--#include file="HrmBase_menu.html"-->

<hr width="100%" size=1 color="#000000">
<br>
<div align="center">
<table width="500" cellspacing="1" cellpadding="2" class="tab">
  <tr>
    <td width="100%" class="tdTop">
      <table border="0" width="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td class="tdTop">
            <p align="left"><img border="0" src="../images/icon_title.gif" align="left">录入档案基本信息</p>
          </td>
          <td width="90" class="tdTop">
            <p align="left"><img border="0" src="../images/icon_return.gif" align="left">
            <a href="javascript:history.back()" class="linkTop">返回列表</a>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td width="25%" class="td1">

    <form name="eventfrm" method="POST" action="?id=<%=pid%>" onSubmit="return checknull(this)&&getcity(this,true)">
      <input type=hidden name="addedit_subed" value="true">
      <input type=hidden name="userid" value="<%=LoginID%>">
      <table border="0" width="100%" cellspacing="10" cellpadding="0">
        <tr>
          <td width="100" align="right" valign="top" nowrap>员工编号:</td>
          <td width="400" nowrap><input type="text" name="bh" value="<%=showvalue("bh")%>" size="40" maxlength="10" class="input">
          </td>
        </tr>
        <tr>
          <td width="100" align="right" valign="top" nowrap>姓名:</td>
          <td width="400" nowrap><input type="text" name="xm" value="<%=showvalue("xm")%>" size="40" maxlength="250" class="input" check_null="请填写姓名"> <font COLOR="RED">*</font>
          </td>
        </tr>
        <tr>
          <td width="100" align="right" valign="top" nowrap>性别:</td>
          <td width="400" nowrap>
          <input type="radio" value="男" name="xb" checked>男
          <input type="radio" value="女" name="xb" <%if showvalue("xb")="女" then response.write"checked"%>>女
          <font COLOR="RED">*</font>
          </td>
        </tr>
        <tr>
          <td width="100" align="right" valign="top" nowrap>身份证号:</td>
          <td width="400" nowrap><input type="text" name="sfzh" value="<%=showvalue("sfzh")%>" size="40" maxlength="250" class="input" check_null="请填写身份证号" check_idcard="身份证号格式错误" onchange="itod(this.value,csrq)"> <font COLOR="RED">*</font>
          </td>
        </tr>
        <tr>
          <td width="100" align="right" valign="top" nowrap>现工作单位:</td>
          <td width="400" nowrap>
          	<select size="1" name="xgzdw" class="input" check_null="请填写现工作单位">
          		<option value=""></option>
          	  <option value="<%=Session("DepID")%>" <%if showvalue("xgzdw")=Session("DepID") then response.write"selected"%>><%=GetTableValue("tbioaDepartment","Name","id",Session("DepID"))%></option>
          	  <%Call pOptions("tbioaDepartment","Name",Session("DepID"),showvalue("xgzdw"),"·")%>
          	</select> <font COLOR="RED">*</font>
          </td>
        </tr>
        <tr>
          <td width="100" align="right" valign="top" nowrap>出生日期:</td>
          <td width="400" nowrap><input TYPE="TEXT" SIZE="12" MAXLENGTH="12" NAME="csrq" value="<%=showvalue("csrq")%>" class="input" onKeyUp="DateFormat(this,this.value,event,false,'2')"> <a href=# title="选择日期" onClick="fPopUpDlg('../js/calendar.htm', document.eventfrm.csrq, 'winpop', 234, 261);return false"><img src="../images/datetime.gif" border=0></a>
          </td>
        </tr>
        <tr>
          <td width="100" align="right" valign="top" nowrap>籍贯:</td>
          <td width="400" nowrap>
            <script language="javascript">YP_Province_PrintSelect('<%=showvalue("province")%>', '<%=showvalue("city")%>', eventfrm);</script>
          </td>
        </tr>
        <tr>
          <td width="100" align="right" valign="top" nowrap>政治面貌:</td>
          <td width="400" nowrap>
          	<input type="text" name="zzmm" value="<%=showvalue("zzmm")%>" size="40" maxlength="250" class="input">
          	<script>input_select(eventfrm.zzmm,"s_zzmm","共青团员,共产党员");</script>
        </tr>
        <tr>
          <td width="100" align="right" valign="top" nowrap>入党时间:</td>

⌨️ 快捷键说明

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