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

📄 count_login.asp

📁 系统包括采购管理、销售管理、分销管理、库存管理、财务管理、统计报表、编码管理等功能模块。
💻 ASP
字号:
<%
if request.Cookies("shiwei_username")="" then
%>
<script language="javascript">
top.location.href="../index.asp"
</script>
<%  
  response.end
end if
%>
<!-- #include file="../conn2.asp" -->
<!-- #include file="../const.asp" -->

<html>
<head>
<title><%=dianming%> - 员工工资统计</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style/style.css" rel="stylesheet" type="text/css">
<style>
body {
	background-color:#FFFFFF;
}
</style>
<script language=javascript>
function preview() { 
bdhtml=window.document.body.innerHTML; 
sprnstr="<!--startprint-->"; 
eprnstr="<!--endprint-->"; 
prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); 
prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); 
window.document.body.innerHTML=prnhtml; 
window.print(); 
window.document.body.innerHTML=bdhtml; 
         }
</script>
</HEAD>

<BODY>
<%
if fla34="0" and request.Cookies("shiwei_id")<>"1" then
%>
<br><center><img src="../images/note.gif" align="absmiddle">&nbsp;<font color="#FF0000">你不具备此权限,请与管理员联系!</font></center>
<%  
  response.end
end if

'取得搜索关键字  
nowstartdate=request("startdate") 
if nowstartdate="" then
  nowstartdate=date()-day(date()-1)
end if
nowenddate=request("enddate") 
if nowenddate="" then
  nowenddate=date()
end if
nowkeyword=request("keyword") 
%>
<table width="100%" border="0" cellpadding="0" cellspacing="2" align="center">
<form name="form2">
  <tr> 
    <td width="5%" height="21">&nbsp;<img src="../images/print.jpg" align="absmiddle" style="cursor:hand;" onClick="preview();window.close()"></td>
	<td width="95%" align="right">
	  开始日期:
      <input name="startdate" value="<%=nowstartdate%>" readonly style="width:100px">
	  <img src="../images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?form=form2&field=startdate&oldDate='+startdate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=590');">
	  结束日期:
      <input name="enddate" value="<%=nowenddate%>" readonly style="width:100px">
	  <img src="../images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?form=form2&field=enddate&oldDate='+enddate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=740');">
	  <input type="text" name="keyword" size="20" value="<%=nowkeyword%>">
	  <input type="hidden" name="hid" value="ok">
	  <input type="submit" value=" 查询 " class="button">
	  &nbsp;&nbsp;
	</td>
  </tr>
</form>  
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td><img src="../images/r_1.gif" alt="" /></td>
<td width="100%" background="../images/r_0.gif">
  <table cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td>&nbsp;员工工资统计</td>
	  <td align="right">&nbsp;</td>
    </tr>
  </table>
</td>
<td><img src="../images/r_2.gif" alt="" /></td>
</tr>
<tr>
<td></td>
<td>
<!--startprint-->
<table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
  <tr align="center">
    <td class="category" height="30">员工编号</td>
	<td class="category">员工姓名</td>
    <td class="category">基本工资</td>
	<td class="category">销售提成</td>
    <td class="category">合计工资</td>
    <td class="category">&nbsp;</td>
  </tr>
  <%
  sql="select * from login where 1=1"
  if nowkeyword<>"" then
    sql=sql&" and (username like '%"&nowkeyword&"%' or bianhao like '%"&nowkeyword&"%')"
  end if  
  sql=sql&" order by id"
  set rs_login=conn.execute(sql)
  do while rs_login.eof=false
  %>
  <tr onMouseOver="this.className='highlight'" onMouseOut="this.className=''">
    <td align="center" height="25"><%=rs_login("bianhao")%></td>
	<td align="center"><%=rs_login("username")%></td>
    <td align="center"><%=formatnumber(rs_login("gongzi")/30*abs(cdate(nowenddate)-cdate(nowstartdate)+1),2)%> 元</td>
    <td align="center">
		  <%
		    sql="select * from sell where zu=false and isok and type=0 and id_login="&rs_login("id")&" and selldate>=#"&nowstartdate&"# and selldate<=#"&nowenddate&"#"
			set rs_sell=conn.execute(sql)
			nowtichen=0
			do while rs_sell.eof=false
			  sql="select * from produit where id="&rs_sell("id_produit")
			  set rs_produit=conn.execute(sql)
			  if rs_produit.eof=false then
			    if rs_produit("tichen_type")=0 then
				  nowtichen=nowtichen+(rs_produit("tichen")*rs_sell("price")*rs_sell("shulian")/100)
				else
			      nowtichen=nowtichen+rs_produit("tichen")*rs_sell("shulian")
				end if
			  end if
			  rs_sell.movenext
			loop
			sql="select * from buy where zu=false and isok and type=1 and id_login="&rs_login("id")&" and selldate>=#"&nowstartdate&"# and selldate<=#"&nowenddate&"#"
			set rs_buy=conn.execute(sql)
			nowfutichen=0
			do while rs_buy.eof=false
			  sql="select * from produit where id="&rs_buy("id_produit")
			  set rs_produit=conn.execute(sql)
			  if rs_produit.eof=false then
			    if rs_produit("tichen_type")=0 then
				  nowfutichen=nowfutichen+(rs_produit("tichen")*rs_buy("price")*rs_buy("shulian")/100)
				else
			      nowfutichen=nowfutichen+rs_produit("tichen")*rs_buy("shulian")
				end if
			  end if
			  rs_buy.movenext
			loop		  		
		  %>
		  <%=formatnumber(nowtichen-nowfutichen,2)%>&nbsp;元 	
	</td>
    <td align="center"><%=formatnumber(rs_login("gongzi")/30*abs(cdate(nowenddate)-cdate(nowstartdate)+1)+nowtichen-nowfutichen,2)%>&nbsp;元</td>	
    <td align="center" width="120"><input type="button" value="详细销售记录" onClick="javascript:var win=window.open('user_show.asp?id=<%=rs_login("id")%>','员工详细信息','width=853,height=470,top=176,left=161,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=yes'); win.focus()" class="button"></td>
  </tr>
  <%
    rs_login.movenext
  loop
  %>
</table>
<!--endprint-->
</td>
<td></td>
</tr>
<tr>
<td><img src="../images/r_4.gif" alt="" /></td>
<td></td>
<td><img src="../images/r_3.gif" alt="" /></td>
</tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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