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

📄 gongzi.asp

📁 erp系統有進銷存,產品管理 供大家學習,
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<!--#include file="checkuser.asp"-->
<html>
<head>
<title>∷企业生产管理信息系统:.</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/main.css" rel="stylesheet" type="text/css">
<SCRIPT language=javascript  src="js/selectcity.js"></script>
<script language="JavaScript" src="js/validate.js" type="text/JavaScript"></script>

<SCRIPT language=javascript src="css/init.js"></SCRIPT>

<style type="text/css">
<!--
td {  font-family: "宋体"; font-size: 9pt}
body {  font-family: "宋体"; font-size: 9pt}
select {  font-family: "宋体"; font-size: 9pt}
A {text-decoration: none; color: #336699; font-family: "宋体"; font-size: 9pt}
A:hover {text-decoration: underline; color: #FF0000; font-family: "宋体"; font-size: 9pt} 
-->
</style>
<SCRIPT LANGUAGE=javascript>
<!--
function Juge(myform)
{

	if (myform.jibengongzi.value == "")
	{
		alert("基本工资不能为空!");
		myform.jibengongzi.focus();
		return (false);
	}

}


function SelectAll() {
	for (var i=0;i<document.selform.selBigClass.length;i++) {
		var e=document.selform.selBigClass[i];
		e.checked=!e.checked;
	}
}
//-->
</script>
</HEAD>
<BODY topMargin=0 rightMargin=0 leftMargin=0>       
<!--#include file="top.asp"-->
<% dim sql,rs

  select case request("action")
  case "add"
       call SaveAdd()
  case "modify"
       call SaveModify()
  case "del"
       call delCate()
  case "edit"
       isEdit=True
       call myform(isEdit)
  case else
       isEdit=False
       call myform(isEdit) 
  end select

  
  sub SaveAdd   
set rs=server.createobject("adodb.recordset") 
sql="select * from gongzi"
rs.open sql,conn,1,3
rs.addnew
rs("name") = trim(request.Form("name"))
rs("jibengongzi") = trim(request.Form("jibengongzi"))
rs("jiangjin") = trim(request.Form("jiangjin"))
rs("koushui") = trim(request.Form("koushui"))
rs("sanjin") = trim(request.Form("sanjin"))
rs("gongjijin") = trim(request.Form("gongjijin"))
rs("koujia") = trim(request.Form("koujia"))
rs("qita") = trim(request.Form("qita"))
rs("heji") =  CDbl(request.Form("jibengongzi")) + CDbl(request.Form("jiangjin")) + CDbl(request.Form("koushui")) + CDbl(request.Form("sanjin")) + CDbl(request.Form("gongjijin")) + CDbl(request.Form("koujia")) + CDbl(request.Form("qita"))
rs("content") = trim(request.Form("content"))
rs.update
response.Write "<script language=javascript>alert('添加成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=gongzi.asp"">"
response.end
rs.close
set rs=nothing
end sub

 
sub SaveModify   
set rs=server.createobject("adodb.recordset") 
sql="select * from gongzi where id="&request.Form("id")
rs.open sql,conn,1,3
rs("name") = trim(request.Form("name"))
rs("jibengongzi") = trim(request.Form("jibengongzi"))
rs("jiangjin") = trim(request.Form("jiangjin"))
rs("koushui") = trim(request.Form("koushui"))
rs("sanjin") = trim(request.Form("sanjin"))
rs("gongjijin") = trim(request.Form("gongjijin"))
rs("koujia") = trim(request.Form("koujia"))
rs("qita") = trim(request.Form("qita"))
rs("heji") =  CDbl(request.Form("jibengongzi")) + CDbl(request.Form("jiangjin")) + CDbl(request.Form("koushui")) + CDbl(request.Form("sanjin")) + CDbl(request.Form("gongjijin")) + CDbl(request.Form("koujia")) + CDbl(request.Form("qita"))
rs("content") = trim(request.Form("content"))
rs.update
response.Write "<script language=javascript>alert('修改成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=gongzi.asp"">"
response.end
rs.close
set rs=nothing
end sub   
 
  sub delCate()
        conn.execute("delete from gongzi where id in ("&Request.Form("selBigClass")&")")
		response.Write "<script language=javascript>alert('删除成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=gongzi.asp"">"
response.end
  end sub
  %> <% sub myform(isEdit) %> 	  
<TABLE width=98% align=center border="0" cellspacing="0" bordercolor="#D6D3CE">
  <TBODY> 
  <TR> 
    <td align="center" valign="top"> 
	<%if oskey="supper" or oskey="caiwu" then%>
	<fieldset style="width:98%"><legend>
	<%
	    set rs=server.createobject("adodb.recordset")
	   if isedit then
		   rs.open "select * from gongzi where id=" & request("id"),conn,1,1
	       response.write "编 辑 员 工 工 资"
	   else
	       response.write "添 加 员 工 工 资"
	   end if %></legend>
        <table width="96%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
          <tr class="but"> 

			<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">姓名</td>
            <td width="8%" height="12" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">基本工资</td>
			<td width="8%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">奖金</td>
			<td width="8%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">扣税</td>
			<td width="8%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">三金</td>
			<td width="8%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">公积金</td>
			<td width="8%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">扣假</td>
			<td width="8%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">其他</td>
			<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">合计</td>

	
          </tr>
		  <form name="reg" method="post" action="gongzi.asp" onSubmit="return Juge(this)" >
		  <tr> <input type="Hidden" name="action" value='<% If isedit then%>modify<% Else %>add<% End If %>'> 
		  <% If isedit then%><input type="Hidden" name="id" value="<%=rs("id")%>"> <% End If %>




			<td height="18" align="center"><select name="name"  size="1" style='width:100'>
			<% if isedit then%><option ><%=rs("name")%></option><%end if%>
			<%
			
			set rs3=server.createobject("adodb.recordset")
		   rs3.open "select * from yuangong",conn,1,1
		   if not rs3.eof then
		   do while not rs3.eof
			%>
			<option <% if isedit then
			if trim(rs3("name"))=trim(rs("name")) then
			%> selected="selected"<%end if%><%end if%>><%=rs3("name")%></option>
			<%
			rs3.movenext
			loop
			end if
			rs3.close
			set rs3=nothing
			%>
			</select>
			
			</td>



⌨️ 快捷键说明

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