📄 wageinput1.asp
字号:
<META content="MSHTML 6.00.2600.0" Name=GENERATOR>
<link href="home.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
function SetScore(){
var strTemp,intStart,intEnd;
strTemp=document.form1.MemberID.options.value;
if(strTemp.indexOf(",")>0){
do{
intStart=strTemp.indexOf(",")+1;
strTemp=strTemp.substring(intStart,strTemp.length);
intEnd=strTemp.indexOf(",");
if(intEnd>0){
eval("document.form1."+strTemp.substring(0,intEnd)+";");
}
else{
eval("document.form1."+strTemp+";");
}
}
while(strTemp.indexOf(",")>0)
}
else{
for (var i=0;i<document.form1.elements.length;i++){
var e=document.form1.elements[i];
if (e.type=='text'){
e.value="";
}
}
}
}
</script>
</HEAD>
<BODY text=#000000 bgColor=#ffffff leftMargin=0 topMargin=0>
<!--#include file="Default_Top.asp"-->
<TABLE width="760" border=0 align="center" cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD width=1 background="images/dotLine_h.gif"><IMG src="images/shim(1).gif" width=1></TD>
<TD Width="100" bgcolor="#EEEEEE"></TD>
<TD width="10" bgcolor="#F2FBF2"></TD>
<TD bgcolor="#F2FBF2"><img src="images/WageInput_Title.gif" width="500" height="60"><font color="#0066cc" size="5"><b><font size="3">单条记录方式</font></b></font>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<TD width="150" vAlign=top> <p> <br>
<strong>注:</strong><br>
<br>
1、输入数字后可直接按回车键保存录入工资<br>
<br>
2、输入过程中可用Tab键将光标在各输入框中切换<br>
<br>
3、录入记录后,系统会自动选择下一个员工<br>
</p></TD>
<td width="20" valign="top"> <table height="200" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<TD width=1 background="images/dotLine_h.gif"><IMG src="images/shim(1).gif" width=1></TD>
</tr>
</table></td>
<TD valign="top">
<form Name="form1" action="<%=MM_editAction%>" method="POST">
<b><font color="#FF0000"><br>
工资表名称:</font></b> <%=(rsTestName.Fields.Item("TestName").Value)%><font color="#FF0000"><b>
<input name="SheetName" type="hidden" value="<% =strSheetName %>">
</b></font><font color="#FF0000"></font>
<table border="1" cellpadding="0" cellspacing=3 bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
<tr align="left">
<td height="44" colspan="4"> <table border="0" cellspacing="0" cellpadding="3">
<tr>
<td align="left" rowspan="2"><b><font color="#FF0000">未录入工资<br>
的员工名单</font></b> </td>
<td align="center">学号:
姓名: </td>
</tr>
<tr>
<td>
<% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>
<select Name="MemberID" onChange="SetScore()">
<%
i = 0
While (NOT Recordset1.EOF)
Recordset5__MMColParam = CStr(Recordset1.Fields.Item("MemberID").Value)
set Recordset5 = Server.CreateObject("ADODB.Recordset")
Recordset5.ActiveConnection = MM_DatabaseConnection_STRING
Recordset5.Source = "SELECT MemberID," & request("chkbox") & " FROM " & strSheetName & " WHERE MemberID = '" + Replace(Recordset5__MMColParam, "'", "''") + "'"
Recordset5.CursorType = 0
Recordset5.CursorLocation = 2
Recordset5.LockType = 3
Recordset5.Open()
Recordset5_numRows = 0
if recordset5.bof or recordset5.eof then
i = i + 1
response.Write "<option value='" & Recordset1.Fields.Item("MemberID").Value & "'"
if i=1 then response.Write " selected"
Response.Write ">" & Recordset1.Fields.Item("MemberID").Value & " " & Recordset1.Fields.Item("MemberName").Value & "</option>"
else
strTemp = CStr(Request("chkbox"))
InsertFlag=False
if instr(strTemp,",")>0 then
dim ArrSubject
ArrSubject = split(strTemp,",")
OptionValue=Recordset5.Fields.Item("MemberID").Value
For j = LBound(ArrSubject) To UBound(ArrSubject)
if IsNull(Recordset5.Fields.Item(Trim(ArrSubject(j))).Value) or Recordset5.Fields.Item(Trim(ArrSubject(j))).Value=0 then
OptionValue=OptionValue & "," & Trim(ArrSubject(j)) & ".value=0"
InsertFlag=True
else
OptionValue=OptionValue & "," & Trim(ArrSubject(j)) & ".value=" & Recordset5.Fields.Item(Trim(ArrSubject(j))).Value
end if
next
if InsertFlag=True then
i = i + 1
response.Write "<option value='" & OptionValue & "'"
if i=1 then response.Write " selected"
Response.Write ">" & Recordset1.Fields.Item("MemberID").Value & " " & Recordset1.Fields.Item("MemberName").Value & "</option>"
end if
else
if IsNull(Recordset5.Fields.Item(strTemp).Value) or Recordset5.Fields.Item(strTemp).Value=0 then
i = i + 1
response.Write "<option value='" & Recordset1.Fields.Item("MemberID").Value & "," & strTemp & ".value=0' selected>" & Recordset1.Fields.Item("MemberID").Value & " " & Recordset1.Fields.Item("MemberName").Value & "</option>"
end if
end if
end if
Recordset5.Close()
Recordset1.MoveNext()
Wend
if i = 0 then
response.Write "<option value=''>全部工资表项目都已经录入</option>"
end if
If (Recordset1.CursorType > 0) Then
Recordset1.MoveFirst
Else
Recordset1.Requery
End If
%>
</select>
<% else %>
找不到员工,请先在员工信息管理中录入相应的员工信息!
<% end if %>
</td>
</tr>
</table></td>
</tr>
<% if i>0 then %>
<tr align="center">
<td width='60' height="30"><b>工资表项目</b></td>
<td width="100" height="30" align="center" valign='middle'><b>成绩</b></td>
<td width='60' height="30" align="center" valign='middle'><b>工资表项目</b></td>
<td width="100" height="30" align="center" valign='middle'><b>成绩</b></td>
</tr>
<tr valign='middle'>
<%
intRows=0
strTemp = Request("chkbox")
if instr(strTemp,",")>0 then
ArrSubject = split(strTemp,",")
For i = LBound(ArrSubject) To UBound(ArrSubject)
response.write "<td width='60' height='25' align=right>" & Trim(ArrSubject(i)) & ":</td>"
response.write "<td height='25' align=left valign='middle'><input type='text' maxlength=4 size=10 Name='" & Trim(ArrSubject(i)) & "'></td>"
intRows=intRows+1
if intRows Mod 2 = 0 then
response.write "</tr>"
response.write "<tr valign='middle'>"
end if
next
else
response.write "<td width='60' height='25' align=right>" & strTemp & ":</td>"
response.write "<td height='25' align=left valign='middle'> <input type='text' maxlength=4 size=10 Name='" & strTemp & "'></td>"
end if
%>
</tr>
<% end if %>
</table>
<br>
<% if i>0 then
strSubject = replace(replace(Request("chkbox"),",","|value|") & "|value"," ","")
%>
<input name="InputWage" type="hidden" value="True">
<input type="hidden" Name="Subject" value="<% =strSubject %>">
<input type="submit" Name="Submit2" value="保存当前员工工资记录并录入下一个员工的工资">
</form>
<script language="JavaScript" type="text/JavaScript">
SetScore()
</script>
<% end if %>
</td>
</tr>
</table>
</td>
<TD width=1 background="images/dotLine_h.gif"><IMG src="images/shim(1).gif" width=1></TD>
</TR>
<tr>
<TD height="1" colspan="7" background="images/dotLine_w.gif"><IMG height=1 src="images/shim(1).gif" width=100></TD>
</tr>
</TBODY>
</TABLE>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<Iframe src="CopyRight.asp" width="760" height="200" marginheight="0" marginwidth="0" scrolling="NO" frameborder="0" name="CopyRight"></iframe>
</td>
</tr>
</table></BODY>
</HTML>
<%
Recordset1.Close()
%>
<%
rsTestName.Close()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -