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

📄 balance.asp

📁 企业办公简单管理系统,可以发布信息以及论坛
💻 ASP
字号:
<!-- #include file="conn/logors.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name=description content="<%=site_title%>" >
<meta name=keyword content="<%=site_title%>">

<title><%=site_title%></title>
</head>
<%=styletext%>

<DIV class=menuskin id=popmenu 
onmouseover="clearhidemenu();highlightmenu(event,'on')" style="Z-INDEX: 100" 
onmouseout="highlightmenu(event,'off');dynamichide(event)"></DIV><!--顶部表格-->

<SCRIPT language=JavaScript src="style/main.js"></SCRIPT>

<SCRIPT LANGUAGE="JavaScript">
<!--
function DoSubmit(value)
{
	document.regform.submit();
}	
function select() 
{
	var values;
	with(document.creator.types) 
	{ 
		 values = options[selectedIndex].value; 
	}
	for(i = 0;i < itemarray.length;i ++) 
	{
		if (itemarray[i].value== values) 
		{
			
			loca3 = (itemarray[i].lsitems).split("#");
			for(j = 0;j < loca3.length;j++) 
			{ 
				with(document.creator.userid) 
				{ 
					length = loca3.length; 
					temparraya=loca3[j].split("@");
					options[j].text = temparraya[0]; 
					options[j].value =temparraya[1]; 
				}
			}
			break;
		}
	}
}
function init() 
{

	with(document.creator.types) 
	{
		length = itemarray.length;
		
		for(k=0;k<itemarray.length;k++) 
		{ 
			options[k].text =itemarray[k].text; 
			options[k].value =itemarray[k].value; 
		}
		selectedIndex=0;
	}
	with(document.creator.userid) 
	{
		loca3 = (itemarray[0].lsitems).split("#");
		length = loca3.length;
		for(l=0;l<length;l++) 
		{ 
			temparrayb=(loca3[0]).split("@");
			options[l].text = temparrayb[0]; 
			options[l].value = temparrayb[1]; 
		}
		selectedIndex=0;
	}	
}

function comefrom(text,value,lsitems) 
{ 
	this.text = text; 
	this.value= value;
	this.lsitems = lsitems; 
}

function OnSubmitCheck()
	{	

		if(document.creator.userid.selectedIndex==0) 
			{
				alert("请选择离职员工!");
				return false;
			}
		if(!dochange(document.creator.out))
			return false;	
		return true;
	}

function dochange(object)
{
		var i,strText,s;
		s=object.value;
		strText="请输入正确值,必须用阿拉伯数字填写";
		 for (i = 0; i < s.length; i++)
		{   
			// Check that current character is number.
			var c = s.charAt(i);
			if (!(((c >= "0") && (c <= "9")) || c == "."))
			{
				object.focus();
				window.alert(strText);
				
				return false;
			}
		}
		return true;
}
//-->
</SCRIPT>
<%
	set rs = Server.CreateObject("ADODB.Recordset")
	set rsitem = Server.CreateObject("ADODB.Recordset")
	
	sql="select * from cci_dept"
	rs.open sql,connObj,1,1
	sumcount=rs.recordcount
	
	i=0
	if sumcount>0 then
		response.Write "<script language=javascript>" & chr(13) & "var itemarray = new Array(" & rs.recordcount+1 & ");"& chr(13)
		response.Write "itemarray[0]=new comefrom(""请选择部门"",0,""请选择员工@0""); "& chr(13)
		i=1
	else
		response.Write "<script language=javascript>" & chr(13) & "var itemarray = new Array(2);"& chr(13)
		response.Write "itemarray[0]=new comefrom(""请选择部门"",""0"",""请选择员工@0""); "& chr(13)
		i=1	
	end if
	do while not rs.eof
		response.Write "itemarray[" & i & "]=new comefrom(""" & rs("deptname") & """," & rs("id") & ",""请选择员工@0"
		sql="select id,name from cci_user where deptid=" & rs("id")
		rsitem.open sql,connObj,1,1
		do while not rsitem.eof
			response.Write "#" & rsitem("name") & "@" & rsitem("id")
			rsitem.movenext
		loop
		i=i+1
		response.Write """);"& chr(13)
		rsitem.close
		rs.movenext
	loop
	rs.close
	response.Write "</script>"
%>
<body onload="init()">
<table width="750" height="200" align="center">
  <tr>
    <td height="97" align="center"  class=TableTitle2>
	  <!-- #include file="sitehead.asp" -->
	</td>
  </tr>
<tr>
    <td align="center" colspan="2" class="tablebody1">
		<% navigation_flag=6 %>
	<!-- #include file="func_navigationbar.asp" -->

	<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="20%" height="66" valign="top"> <!-- #include file="func_menulist.asp" --></td>
          <td valign="top">
		  
	
<!-- #include file="func_verify.asp" -->

<%

dim sumcount,saveserial

if request("saveflag")<>"" then
	dim msg
	saveserial=1
	msg=""
	if request("out")="" then
		msg=saveserial & "、请输入实际出勤天数!<br>"
		saveserial=saveserial+1
	end if

	if saveserial<=1 then
		maxid=getmaxid(7)
		set rspunish = Server.CreateObject("ADODB.Recordset")
		sql="select * from cci_oa_balance"
		rspunish.open sql,connobj,3,3
		rspunish.addnew
		
		rspunish("wfid")=maxid
		
		rspunish("deptid")=session("deptid")
		rspunish("userid")=session("userid")

		rspunish("destdeptid")=request("types")
		rspunish("destuserid")=request("userid")		
		rspunish("inDate")=now
		
		rspunish("LeaveTime")=request("year") & "-" & request("month") & "-" & request("day") & " 00:00:00"
		rspunish("StartTime")=request("year2") & "-" & request("month2") & "-" & request("day2") & " 00:00:00"
		rspunish("EndTime")=request("year3") & "-" & request("month3") & "-" & request("day3") & " 00:00:00"
		
		if request("other")<>"" then
			rspunish("other")=request("other")
		end if
		if request("Out")<>"" then
			rspunish("Out")=request("Out")
		end if
		if request("Late")<>"" then
			rspunish("Late")=request("Late")
		end if
		if request("Leave")<>"" then
			rspunish("Leave")=request("Leave")
		end if
		if request("absent")<>"" then
			rspunish("absent")=request("absent")
		end if
		if request("affair")<>"" then
			rspunish("affair")=request("affair")
		end if
		if request("sick")<>"" then
			rspunish("sick")=request("sick")
		end if
		
		rspunish.update
		rspunish.close
		
		sql="select * from cci_oa_flowlist where id="& maxid
		rs.open sql,connobj,3,3
		if not rs.eof then
			rs("title")="关于"& session("name") & "的『薪金结算通知』"
			rs.update
		end if
		rs.close

		response.redirect "message.asp?rediurl=defaultA.asp&msgurl=首页&msginfo=离职人员薪金结算通知操作成功!请耐心等待领导审批!"
	end if
	response.Write("<div align=center><font color=#FF0000>" &msg & "</font></div>")
end if

%>

  
<table width="100%" align="center" cellpadding="1" cellspacing="1" class=tableborder1>
              <form  name="creator" method="post" action="" onSubmit="return OnSubmitCheck()">
                <tr > 
                  <th height="25" colspan="6" align="center" class=TopLighNav>离职人员薪金结算通知单</th>
                </tr>
                <tr> 
                  <td colspan="6"  class=tablebody1> 
                    <select name=types onChange = "select()">
                    </select> 员工 <select name="userid"></select>于<!-- #include file="func_currtime.asp" -->正式离职,其离职手续已全部办妥,请予以结算其<!-- #include file="func_currtime7.asp" -->至<!-- #include file="func_currtime6.asp" -->的工资,相关事项如下:</td>
                </tr>
                <tr > 
                  <td width="120" align="center" class=tablebody1>实际出勤</td>
                  <td class=tablebody1 align="left"><input name="out" type="text" size="5">
                    (天)<font color="#FF0000">*</font></td>
                  <td width="80" align="center" class=tablebody1>迟到</td>
                  <td class=tablebody1 align="left"><input name="late" type="text" size="5">
                    (次)</td>
                  <td width="80" align="center" class=tablebody1>早退</td>
                  <td class=tablebody1 align="left"><input name="leave" type="text" size="5">
                    (次)</td>
                </tr>
                <tr > 
                  <td align="center" class=tablebody1>旷 工</td>
                  <td class=tablebody1 align="left"><input name="absent" type="text" size="5">
                    (天)</td>
                  <td  align="center" class=tablebody1>事假</td>
                  <td class=tablebody1 align="left"><input name="affair" type="text" size="5">
                    (天)</td>
                  <td align="center" class=tablebody1>病假</td>
                  <td class=tablebody1 align="left"><input name="sick" type="text" size="5">
                    (天)</td>
                </tr>				
                <tr > 
                  <td class=tablebody1 align="center">其他需扣款项目:</td>
                  <td colspan="5" class=tablebody1 align="left"><textarea name="other" cols="75" rows="8" id="reason"></textarea>
                  </td>
                </tr>
                <tr> 
                  <td colspan="6" align="center" class=tablebody1><input type="submit" name="Submit" value="发出通知 "></td>
                </tr>
                <input type=hidden name=saveflag value="1">
              </form>
            </table>

	  
		  
		  
		  
		  
		  
		  </td>
        </tr>
      </table>
	
	
	 </td>
</tr> 

  <tr>
    <td class="tablebody1"> 
      <!-- #include file="sitefloor.asp" -->    </td>
  </tr>
</table>

</body>
</html>

⌨️ 快捷键说明

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