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

📄 empmain_pay_list.asp

📁 人力资源管理系统 人力资源管理系统
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/EmpMain.asp" -->
<!--#include file="EmpMain_CheckRight.asp"-->

<%call fnCheckRight("paylist","1")%>
<%
Dim IDstring
if instr(request.QueryString,"IDstring") then
 if  request.QueryString("IDstring") = "" then
    IDstring = "0"
  else
    IDstring=request.QueryString("IDstring")
  end if
end if
Dim PL
Dim PL_numRows

Set PL = Server.CreateObject("ADODB.Recordset")
PL.ActiveConnection = MM_EmpMain_STRING
if trim(request.QueryString("searchword")) <> "" then
PL.Source = "SELECT * FROM paylist where EmpDimissionDate is null and EmpName = '"&request.QueryString("searchword")&"'"
elseif instr(request.QueryString,"IDstring")  then
PL.Source = "SELECT * FROM paylist where Empid in ("&IDstring&") and EmpDimissionDate is null"
else
PL.Source = "SELECT * FROM paylist where EmpDimissionDate is null"
end if
'response.write PL.Source
'response.end 
PL.CursorType = 0
PL.CursorLocation = 2
PL.LockType = 1
PL.Open()

PL_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
PL_numRows = PL_numRows + Repeat1__numRows
%>
<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

Dim PL_total
Dim PL_first
Dim PL_last

' set the record count
PL_total = PL.RecordCount

' set the number of rows displayed on this page
If (PL_numRows < 0) Then
  PL_numRows = PL_total
Elseif (PL_numRows = 0) Then
  PL_numRows = 1
End If

' set the first and last displayed record
PL_first = 1
PL_last  = PL_first + PL_numRows - 1

' if we have the correct record count, check the other stats
If (PL_total <> -1) Then
  If (PL_first > PL_total) Then
    PL_first = PL_total
  End If
  If (PL_last > PL_total) Then
    PL_last = PL_total
  End If
  If (PL_numRows > PL_total) Then
    PL_numRows = PL_total
  End If
End If
%>

<%
' *** Recordset Stats: if we don't know the record count, manually count them

If (PL_total = -1) Then

  ' count the total records by iterating through the recordset
  PL_total=0
  While (Not PL.EOF)
    PL_total = PL_total + 1
    PL.MoveNext
  Wend

  ' reset the cursor to the beginning
  If (PL.CursorType > 0) Then
    PL.MoveFirst
  Else
    PL.Requery
  End If

  ' set the number of rows displayed on this page
  If (PL_numRows < 0 Or PL_numRows > PL_total) Then
    PL_numRows = PL_total
  End If

  ' set the first and last displayed record
  PL_first = 1
  PL_last = PL_first + PL_numRows - 1
  
  If (PL_first > PL_total) Then
    PL_first = PL_total
  End If
  If (PL_last > PL_total) Then
    PL_last = PL_total
  End If

End If
%>

<%
function fnformatcurr(strcurr)
if (instr(strcurr,".")) <> 0 then
fnformatcurr = left(strcurr,(instr(strcurr,".")+2))
else
fnformatcurr = strcurr & ".00"
end if
end function
%>



<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="CSS/SellWellWeb.css" rel="stylesheet" type="text/css">
<script>
<!--
function showDetail(obj){
    URL = window.parent.frames("frmbottom").window.location.href
    if(URL.indexOf("EmpMain_Main.asp")==-1){
    window.parent.frames("frmbottom").window.location = "EmpMain_Main.asp?ID=" + obj.EmpID + "&PageType=pay"
	return
	}
    window.parent.frames("frmbottom").window.document.form1.ID.value = obj.EmpID
	strUrl=window.parent.frames("frmbottom").window.frames("main").location.href
	NewUrl = "EmpMain_pay_Disp.asp" + "?ID="+obj.EmpID + "&PageType=pay"
	window.parent.frames("frmbottom").window.frames("main").location.href = NewUrl
}
var objClassName
function showCursorLocation(objimg){
     if(objorgImg==null){
	  objorgImg = eval("document.all."+objimg)
	}
	else{
	  objorgImg.style.display = "none"
	}
	objorgImg = eval("document.all."+objimg)
	eval("document.all."+objimg+".style.display=''")
}
var objorgImg=null
function HLItem(obj){
	obj.oldClassName=obj.className;
	obj.className="ListValuehighlight";
}

function Re(obj){
 obj.className=obj.oldClassName 
}

function doEdit(ID){
  window.location ="EmpMain_Work_Edit.asp?EmpID=<%=Request.QueryString("ID")%>&ID="+ID
}
function dosearch(){
searchWord = document.form1.SearchWord.value
  window.location = "EmpMain_Pay_List.asp?searchWord="+searchWord
}
function fnRedirect(obj){
  window.location= obj.value
}

function getpay(){
  window.location = "EmpMain_Pay_getlist.asp?year="+document.form1.year.options[document.form1.year.selectedIndex].value+"&month="+document.form1.month.options[document.form1.month.selectedIndex].value
}

//-->
</script>
</head>

<body class="body">
<form name="form1" action="EmpMain_Pay_Save_Process.asp" method="post">
<fieldset class="fiedset">
  <legend><font size="2"><input name="paylist" type="radio" value="EmpMain_Pay_list.asp" checked>薪资统计<input name="hollist" type="radio" value="EmpMain_hol_list.asp" onclick="fnRedirect(this)">考勤统计<input name="Emplist" type="radio" value="EmpMain_list.asp" onclick="fnRedirect(this)">员工列表</font></legend>
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr> 
      <td height="21" nowrap> <div align="left"><font size="2"> </font></div></td>
      <td nowrap><div align="right"><font size="2">按姓名查询:</font></div></td>
      <td width="22%" nowrap><font size="2"> 
        <input type="text" name="SearchWord"  style="width:95%" class="Text" value="<%=request("SearchWord")%>">
        </font></td>
      <td width="4%" nowrap><div align="center"><img src="images/Listsearch.gif" width="18" height="18" onClick="dosearch()" style="cursor:hand"></div></td>
    </tr>
  </table>
  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
    <tr> 
      <td width="5%" nowrap class="listTitle">&nbsp;</td>
      <td width="4%" nowrap class="listTitle">姓名</td>
      <td width="9%" nowrap class="listTitle"> <div align="center">工资</div></td>
      <td width="10%" nowrap class="listTitle"> <div align="center">奖金</div></td>
      <td width="10%" nowrap class="listTitle"> <div align="center">扣税</div></td>
      <td width="10%" nowrap class="listTitle"> <div align="center">三金</div></td>
      <td width="10%" nowrap class="listTitle"> <div align="center">公积金</div></td>
      <td width="9%" nowrap class="listTitle"> <div align="center">扣事/病假</div></td>
      <td width="15%" nowrap class="listTitle"> <div align="center">其他扣除</div></td>
      <td width="11%" nowrap class="listTitle"> <div align="center">合计</div></td>
    </tr>
    <%i = -1%>
    <% 
While ((Repeat1__numRows <> 0) AND (NOT PL.EOF)) 
%>
    <%
i = i + 1
if i mod 2 = 0 then
className = "listValueWhite"
else
className = "listValuegray"
end if
%>
    <%
Dim nopay
Dim nopay_numRows

Set nopay = Server.CreateObject("ADODB.Recordset")
nopay.ActiveConnection = MM_EmpMain_STRING
nopay.Source = "SELECT * FROM nopaycount where EmpID = " & PL.Fields.Item("EmpID").Value & " and HDFrommonth = Format$('" & now() &"','mmmm yyyy')" 
nopay.CursorType = 0
nopay.CursorLocation = 2
nopay.LockType = 1
nopay.Open()

nopay_numRows = 0
if not nopay.eof then
nopaycount = nopay.fields.item("SumofHDNoPayCount")
else
nopaycount = 0
end if
%>
    <tr class="<%=className%>" EmpID="<%=trim(PL.Fields.Item("EmpID").Value)%>"  onclick="showDetail(this);showCursorLocation('cursorimg<%=i%>')"  style="cursor:hand" onMouseOver="HLItem(this)" onMouseOut="Re(this)"> 
      <td width="5%"  nowrap><div align="center"><img src="images/location.gif" width="16" height="12" style="display:none" id="cursorimg<%=i%>"></div></td>
      <td nowrap><%=(PL.Fields.Item("EmpName").Value)%>
        <input type="hidden" name="EmpName" value="<%=(PL.Fields.Item("EmpName").Value)%>">
        <input type="hidden" name="EmpID" value="<%=(PL.Fields.Item("EmpID").Value)%>"></td>
      <td nowrap><%=fnformatcurr(PL.Fields.Item("jiben").Value)%>
        <input type="hidden" name="jiben" value="<%=fnformatcurr(PL.Fields.Item("jiben").Value)%>"></td>
      <td nowrap><%=fnformatcurr(PL.Fields.Item("jiangjin").Value)%>
        <input type="hidden" name="jiangjin" value="<%=fnformatcurr(PL.Fields.Item("jiangjin").Value)%>"></td>
      <td nowrap><%=fnformatcurr(PL.Fields.Item("koushui").Value)%>
        <input type="hidden" name="koushui" value="<%=fnformatcurr(PL.Fields.Item("koushui").Value)%>"></td>
      <td nowrap><%=fnformatcurr((PL.Fields.Item("yanglao").Value)+(PL.Fields.Item("shiye").Value)+(PL.Fields.Item("yiliao").Value))%>
        <input type="hidden" name="sanjin" value="<%=fnformatcurr((PL.Fields.Item("yanglao").Value)+(PL.Fields.Item("shiye").Value)+(PL.Fields.Item("yiliao").Value))%>"></td>
      <td nowrap><%=fnformatcurr(PL.Fields.Item("gongjijin").Value)%>
        <input type="hidden" name="gongjijin" value="<%=fnformatcurr(PL.Fields.Item("gongjijin").Value)%>"></td>
      <td nowrap><%=fnformatcurr((PL.Fields.Item("jiben").Value)/22*nopaycount)%>
        <input type="hidden" name="kouxin" value="<%=fnformatcurr((PL.Fields.Item("jiben").Value)/22*nopaycount)%>"></td>
      <td nowrap><%=fnformatcurr(PL.Fields.Item("qita").Value)%>
        <input type="hidden" name="qita" value="<%=fnformatcurr(PL.Fields.Item("qita").Value)%>"></td>
      <%
	  totalcount = (PL.Fields.Item("jiben").Value) + (PL.Fields.Item("jiangjin").Value)-(PL.Fields.Item("koushui").Value) -((PL.Fields.Item("yanglao").Value)+(PL.Fields.Item("shiye").Value)+(PL.Fields.Item("yiliao").Value)) - (PL.Fields.Item("gongjijin").Value) -(PL.Fields.Item("jiben").Value)/22*nopaycount-(PL.Fields.Item("qita").Value)
	  %>
      <td nowrap><%=fnformatcurr(totalcount)%>
        <input type="hidden" name="totalCount" value="<%=fnformatcurr(totalcount)%>"></td>
    </tr>
    <% 
	Sumjiben = Sumjiben + (PL.Fields.Item("jiben").Value)
	Sumjiangjin = Sumjiangjin + (PL.Fields.Item("jiangjin").Value)
	Sumkoushui = Sumkoushui + (PL.Fields.Item("koushui").Value)
	Sumsanjin = Sumsanjin + (PL.Fields.Item("yanglao").Value)+(PL.Fields.Item("shiye").Value)+(PL.Fields.Item("yiliao").Value)
	Sumgongjijin = Sumgongjijin + (PL.Fields.Item("gongjijin").Value)
	Sumkouxin = Sumkouxin + (PL.Fields.Item("jiben").Value)/22*nopaycount
	Sumqita = Sumqita + (PL.Fields.Item("qita").Value)
	Sumtotalcount = Sumtotalcount + totalcount
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  PL.MoveNext()
Wend
%>
    <tr class="listValueWhite">
      <td nowrap>&nbsp;</td>
      <td nowrap>月总计</td>
      <td nowrap><%=fnformatcurr(Sumjiben)%></td>
      <td nowrap><%=fnformatcurr(Sumjiangjin)%></td>
      <td nowrap><%=fnformatcurr(Sumkoushui)%></td>
      <td nowrap><%=fnformatcurr(Sumsanjin)%></td>
      <td nowrap><%=fnformatcurr(Sumgongjijin)%></td>
      <td nowrap><%=fnformatcurr(Sumkouxin)%></td>
      <td nowrap><%=fnformatcurr(Sumqita)%></td>
      <td nowrap><%=fnformatcurr(Sumtotalcount)%></td>
    </tr>
  </table>
  <table width="100%" border="0">
    <tr>
      <td><div align="left"> <font size="2">视图切换 
          <input name="radiobutton" type="radio" checked value="radiobutton">
          员工/本月 
          <input name="radiobutton" type="radio" value="radiobutton" onClick="window.location='EmpMain_pay_getlist.asp'">
          员工/月 
          <input type="radio" name="radiobutton" value="radiobutton" onClick="window.location='EmpMain_pay_list_year.asp'">
          员工/年 
          <input type="radio" name="radiobutton" value="radiobutton" onClick="window.location='EmpMain_pay_monthyear.asp'">
          月份/年 
          </font> </div>
        <div align="right"><font size="2"> </font></div></td>
      <td><div align="right"><font size="2"> 
          <input name="submit" type="submit" class="button" value="保存至数据库">
          </font></div></td>
    </tr>
  </table>
  </fieldset>
  <div align="right">
    <p align="left"><font color="#0066FF" size="2">注:共计有<font color="#FF0000"><%=(PL_total)%></font>位员工被统计,如与员工总数不符可能因为个别员工没有设定薪资或其他原因 !</font></p>
    <p> 
	
    </p>
  </div>
</form>
</body>
</html>
<%
PL.Close()
Set PL = Nothing
%>

⌨️ 快捷键说明

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