📄 newsalary2.asp
字号:
<!--#include file="headfiles/Connection.inc"-->
<%
dim intmonth,intyear
intmonth=month(date())-1
intyear=year(date())
if intmonth<=0 then
intmonth=intmonth+12
intyear=intyear-1
end if
'response.Write(smid)
set rsSalary = server.CreateObject("adodb.recordset")
if intmonth<10 then
strSql="select * from "&intyear&"0"&intmonth&"SalaryTable"
else
strSql="select * from "&intyear&intmonth&"SalaryTable"
end if
'response.Write(strSql)
rsSalary.open strSql,conn,3,1
if rsSalary.recordcount<=0 then
response.Write(chr(13)&"<script language='javascript'>")
response.Write(chr(13)&"alert('请先计算"&intyear&"年"&intmonth&"月的工资!');")
response.Write(chr(13)&"</script>")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="headfiles/style.css" rel="stylesheet" type="text/css">
<link href="headfiles/text.css" rel="stylesheet" type="text/css">
<script language='javascript'>
function OpenNewSalary1(y,m){
showModalDialog("NewSalary1.asp?y="+y+"&m="+m,"new1","dialogWidth:305px;dialogHeight:75px;dialogLeft:40px;dialogTop:30px;center:yes;help:no;resizable:no;status:no");
}
function PrintSalary(){
window.open("PringSalary.asp?str='<%=strSql%>'","print","width=600px; height=500px; left=10px; top=10px; scrolling=auto");
}
</script>
</head>
<body background="images/bg.gif">
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/bg.gif">
<tr valign="middle" align="center" >
<td width="70%" bgcolor="#6699ff" height="40" valign="middle" align="right" class="title5">员工<%=intyear%>年<%=intmonth%>月份的工资</td>
<td width="30%" align="right" bgcolor="#6699ff"><input type="button" id="addNew" name="addNew" style="width:70px;height:25px" value="新建工资" class="title1" onclick="OpenNewSalary1(<%=intyear%>,<%=intmonth%>);">
<input type="button" id="btnPrint" name="btnPrint" style="width:70px;height:25px" value="打印预览" class="title1" onclick="PrintSalary();"
<%
if rsSalary.recordcount<=0 then
response.Write("disabled")
end if
%>> </td>
</tr>
<tr>
<td colspan="2"><table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr class="title2">
<td height="25" valign="middle" align="center">员工ID</td>
<td valign="middle" align="center">员工姓名</td>
<td valign="middle" align="center">工资模块</td>
<td valign="middle" align="center">模块工资</td>
<td valign="middle" align="center">应扣工资</td>
<td valign="middle" align="center">实发工资</td>
</tr>
<%
dim i
i=1
while rsSalary.eof = false
%>
<tr class="title" onMouseOut="this.className='';" onMouseOver="this.className='hand2';" <% if (i mod 2)=0 then %> bgcolor="#eeeeff"<% end if %> >
<td height="22" valign="middle" align="center" ><%=rsSalary.fields(0)%></td>
<td valign="middle" align="center" ><%=rsSalary.fields(1)%></td>
<td valign="middle" align="center" ><%=rsSalary.fields(2)%></td>
<td valign="middle" align="center" ><%=rsSalary.fields(3)%></td>
<td valign="middle" align="center" ><%=rsSalary.fields(4)%></td>
<td valign="middle" align="center" ><%=rsSalary.fields(5)%></td>
</tr>
<%
i=i+1
rsSalary.MoveNext
Wend
%>
</table></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -