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

📄 count_login.asp

📁 雅芳进销存
💻 ASP
字号:
<%
if session("username")="" then
%>
<script language="javascript">
top.location.href="../login.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="../style2.css" rel="stylesheet" type="text/css">
</HEAD>

<BODY>
<%
if fla3="0" then
%>
<br><center><font color="#FF0000">你不具备此权限,请与管理员联系!</font></center>
<%  
  response.end
end if

'取得搜索关键字  
nowstartdate=request("startdate") 
if nowstartdate="" then
  nowstartdate=date()-30
end if
nowenddate=request("enddate") 
if nowenddate="" then
  nowenddate=date()
end if
nowkeyword=request("keyword") 
%>
<table width="98%" border="0" cellpadding="0" cellspacing="2" align="center">
<form name="form2">
  <tr> 
    <td width="34%" height="21">&nbsp;<img src="../Images/ico/ico43.gif" width="32" height="32" hspace="2" vspace="2" align="absmiddle"><font size="+1"><strong> 员工工资统计</strong></font></td>
	<td width="66%" align="right">
	  开始日期:
      <input name="startdate" value="<%=nowstartdate%>" readonly onClick="JavaScript:window.open('day.asp?form=form2&field=startdate&oldDate='+this.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=590');" style="width:100px">
	  结束日期:
      <input name="enddate" value="<%=nowenddate%>" readonly onClick="JavaScript:window.open('day.asp?form=form2&field=enddate&oldDate='+this.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=740');" style="width:100px">
	  <input type="text" name="keyword" size="20" value="<%=nowkeyword%>">
	  <input type="hidden" name="hid" value="ok">
	  <input type="submit" value=" 查询 ">
	  &nbsp;&nbsp;
	</td>
  </tr>
</form>  
</table>
<table width="98%" border="0" cellspacing="1" cellpadding="2" align="center" class="TableMenu">
  <tr class="a1" style="color:#ffffff;font-size:12px;">
    <th width="21%" height="30">员工姓名</th>
    <th width="19%">基本工资</th>
	<th width="18%">销售提成</th>
    <th width="18%">合计工资</th>
    <th width="24%">&nbsp;</th>
  </tr>
  <%
  sql="select * from login where 1=1"
  if nowkeyword<>"" then
    sql=sql&" and username like '%"&nowkeyword&"%'"
  end if  
  sql=sql&" order by id"
  set rs_login=conn.execute(sql)
  do while rs_login.eof=false
  %>
  <tr bgcolor="#ececec" onMouseOver="this.bgColor='#ffffff'" onMouseOut="this.bgColor='#ececec'">
    <td align="center" height="25"><%=rs_login("username")%></td>
    <td align="center"><%=rs_login("gongzi")/30*abs(cdate(nowenddate)-cdate(nowstartdate))%> 元</td>
    <td align="center">
		  <%
		    sql="select * from sell where 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		  		
		  %>
		  <%=nowtichen%>&nbsp;元 	
	</td>
    <td align="center"><%=rs_login("gongzi")+nowtichen%>&nbsp;元</td>	
    <td align="center"><input type="button" value="察看员工详细销售记录" onClick="javascript:var win=window.open('user_show.asp?id=<%=rs_login("id")%>','员工详细信息','width=895,height=503,top=142,left=115,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=yes'); win.focus()"></td>
  </tr>
  <%
    rs_login.movenext
  loop
  %>
</table>
</body>
</html>

⌨️ 快捷键说明

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