📄 empmain_pay_getlist.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
sql = "SELECT * FROM gztongji WHERE "
if trim(request.QueryString("searchword")) <> "" then
sql = sql & "EmpName = '"&request.QueryString("searchword")&"'"
searchlogic = " and "
end if
if trim(request.QueryString("year")) <> "" and trim(request.QueryString("month")) <> "" then
stryear = request.QueryString("year")
strmonth = request.QueryString("month")
sql = sql & searchlogic & "datepart('yyyy',CreateDate) = '" &stryear&"' and datepart('m',CreateDate) = '" &strmonth&"'"
else
stryear = datepart("yyyy",now())
strmonth = datepart("m",now())
sql = sql & searchlogic & "datepart('yyyy',CreateDate) = '" &stryear&"' and datepart('m',CreateDate) = '" &strmonth&"'"
end if
if instr(request.QueryString,"IDstring") then
sql = sql & " and EmpID in ("&IDstring&")"
end if
'response.Write(sql)
'response.end
PL.source = sql
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
%>
<%
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_getList.asp?year="+document.form1.year.options[document.form1.year.selectedIndex].value+"&month="+document.form1.month.options[document.form1.month.selectedIndex].value+"&searchWord="+searchWord
}
function fnRedirect(obj){
window.location= obj.value
}
function getpay(){
searchWord = document.form1.SearchWord.value
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+"&searchWord="+searchWord
}
//-->
</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 width="15%" height="21" nowrap> <div align="left"><font size="2">当前统计范围:
</font></div></td>
<td width="7%" nowrap> <div align="right"><font size="2">年份:</font></div></td>
<td width="12%" nowrap> <font size="2">
<select name="year" class="select" onchange="getpay()">
<%FOR K = 0 TO 10 %>
<OPTION <%if cint(stryear) = (2000+K) then%>selected<%end if%> VALUE="<%=2000+K%>"><%=2000+K%></OPTION>
<%NEXT%>
</select>
</font></td>
<td width="6%" nowrap> <div align="right"><font size="2">月份:</font></div></td>
<td width="10%" nowrap> <font size="2">
<select name="month" class="select" onchange="getpay()">
<%FOR M = 1 TO 12 %>
<OPTION <%if M = cint(strmonth) then%>selected<%end if%> VALUE="<%=M%>"><%=M%>月</OPTION>
<%NEXT%>
</select>
</font></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"> </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
%>
<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)%>
</td>
<td nowrap><%=fnformatcurr(PL.Fields.Item("jiben").Value)%></td>
<td nowrap><%=fnformatcurr(PL.Fields.Item("jiangjin").Value)%></td>
<td nowrap><%=fnformatcurr(PL.Fields.Item("koushui").Value)%></td>
<td nowrap><%=fnformatcurr(PL.Fields.Item("sanjin").Value)%></td>
<td nowrap><%=fnformatcurr(PL.Fields.Item("gongjijin").Value)%></td>
<td nowrap><%=fnformatcurr(PL.Fields.Item("kouxin").Value)%></td>
<td nowrap><%=fnformatcurr(PL.Fields.Item("qita").Value)%></td>
<td nowrap><%=fnformatcurr(PL.Fields.Item("totalCount").Value)%>
</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("sanjin").Value)
Sumgongjijin = Sumgongjijin + (PL.Fields.Item("gongjijin").Value)
Sumkouxin = Sumkouxin + (PL.Fields.Item("kouxin").Value)
Sumqita = Sumqita + (PL.Fields.Item("qita").Value)
Sumtotalcount = Sumtotalcount + (PL.Fields.Item("totalCount").Value)
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
PL.MoveNext()
Wend
%>
<tr class="listValueWhite">
<td nowrap> </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"> <div align="left"> <font size="2">视图切换
<input name="radiobutton" type="radio" onClick="window.location='EmpMain_pay_list.asp'" value="radiobutton">
员工/本月
<input name="radiobutton" type="radio" value="radiobutton" checked>
员工/月
<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></td>
</tr>
</table>
</fieldset>
<div align="right"> </div>
</form>
</body>
</html>
<%
PL.Close()
Set PL = Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -