📄 pa_punishment.jsp
字号:
function fUpdateCal(iYear, iMonth) {
myMonth = fBuildCal(iYear, iMonth);
var i = 0;
for (w = 0; w < 6; w++)
for (d = 0; d < 7; d++)
with (cellText[(7*w)+d]) {
Victor = i++;
if (myMonth[w+1][d]<0) {
color = gcGray;
innerText = -myMonth[w+1][d];
}else{
color = ((d==0)||(d==6))?"red":"black";
innerText = myMonth[w+1][d];
}
}
}
function fSetYearMon(iYear, iMon){
tbSelMonth.options[iMon-1].selected = true;
for (i = 0; i < tbSelYear.length; i++)
if (tbSelYear.options[i].value == iYear)
tbSelYear.options[i].selected = true;
fUpdateCal(iYear, iMon);
}
function fPrevMonth(){
var iMon = tbSelMonth.value;
var iYear = tbSelYear.value;
if (--iMon<1) {
iMon = 12;
iYear--;
}
fSetYearMon(iYear, iMon);
}
function fNextMonth(){
var iMon = tbSelMonth.value;
var iYear = tbSelYear.value;
if (++iMon>12) {
iMon = 1;
iYear++;
}
fSetYearMon(iYear, iMon);
}
function fToggleTags(){
with (document.all.tags("SELECT")){
for (i=0; i<length; i++)
if ((item(i).Victor!="Won")&&fTagInBound(item(i))){
item(i).style.visibility = "hidden";
goSelectTag[goSelectTag.length] = item(i);
}
}
}
function fTagInBound(aTag){
with (VicPopCal.style){
var l = parseInt(left);
var t = parseInt(top);
var r = l+parseInt(width);
var b = t+parseInt(height);
var ptLT = fGetXY(aTag);
return !((ptLT.x>r)||(ptLT.x+aTag.offsetWidth<l)||(ptLT.y>b)||(ptLT.y+aTag.offsetHeight<t));
}
}
function fGetXY(aTag){
var oTmp = aTag;
var pt = new Point(0,0);
do {
pt.x += oTmp.offsetLeft;
pt.y += oTmp.offsetTop;
oTmp = oTmp.offsetParent;
} while(oTmp.tagName!="BODY");
return pt;
}
// Main: popCtrl is the widget beyond which you want this calendar to appear;
// dateCtrl is the widget into which you want to put the selected date.
// i.e.: <input type="text" name="dc" style="text-align:center" readonly><INPUT type="button" value="V" onclick="fPopCalendar(dc,dc);return false">
function fPopCalendar(popCtrl, dateCtrl, leftn, strDate){ //增加了lenftn 水平坐标参数,用来控制位置
if (popCtrl == previousObject){
if (VicPopCal.style.visibility == "visible"){
HiddenDiv();
//return true; //谷文栋去掉 2003-02-10
}
}
previousObject = popCtrl;
gdCtrl = dateCtrl;
fInitialDate(strDate);
fSetYearMon(giYear, giMonth);
var point = fGetXY(popCtrl);
with (VicPopCal.style) {
left = point.x;
left = leftn; //谷文栋添加 2003-02-10
top = point.y+popCtrl.offsetHeight;
//width = VicPopCal.offsetWidth;
//height = VicPopCal.offsetHeight;
fToggleTags(point);
visibility = 'visible';
}
blnFlag = false;
}
// Added by Danian Zhang/SUI
function fInitialDate(strDate){
if( strDate == null || strDate.length != 10 )
return false;
var sYear = strDate.substring(0,4);
var sMonth = strDate.substring(5,7);
var sDay = strDate.substring(8,10);
if( sMonth.charAt(0) == '0' ) { sMonth = sMonth.substring(1,2); }
if( sDay.charAt(0) == '0' ) { sDay = sDay.substring(1,2); }
var nYear = parseInt(sYear );
var nMonth = parseInt(sMonth);
var nDay = parseInt(sDay );
if ( isNaN(nYear ) ) return false;
if ( isNaN(nMonth) ) return false;
if ( isNaN(nDay ) ) return false;
var arrMon = new Array(12);
arrMon[ 0] = 31; arrMon[ 1] = nYear % 4 == 0 ? 29:28;
arrMon[ 2] = 31; arrMon[ 3] = 30;
arrMon[ 4] = 31; arrMon[ 5] = 30;
arrMon[ 6] = 31; arrMon[ 7] = 31;
arrMon[ 8] = 30; arrMon[ 9] = 31;
arrMon[10] = 30; arrMon[11] = 31;
if ( nYear < 1900 || nYear > 2100 ) return false;
if ( nMonth < 1 || nMonth > 12 ) return false;
if ( nDay < 1 || nDay > arrMon[nMonth - 1] ) return false;
giYear = nYear;
giMonth = nMonth;
giDay = nDay;
return true;
}
var gMonths = new Array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月");
with (document) {
//******* 样式名称,在下面用引号不成功,所以做成变量 *********
var button1;
var button2;
button1 = "button1"
button2 = "button2"
//************************************************************
write("<link href='style_css/button.css' rel='stylesheet' type='text/css'>");
write("<Div id='VicPopCal' style='OVERFLOW:hidden;POSITION:absolute;VISIBILITY:hidden;border:1px ridge;z-index:100;'>");
write("<table id='TableCal' border='0' bgcolor='#f5f5f5'>");
write("<TR>");
write("<td valign='middle' align='center'><input type='button' class='button1' onMouseOver='this.className=button2' onMouseOut='this.className=button1' name='PrevMonth' value='<' style='height:20;width:20;' onClick='fPrevMonth()'>");
//write("<td valign='middle' align='center'><input type='button' name='PrevMonth' value='<' style='height:20;width:20;' onClick='fPrevMonth()'>");
write(" <SELECT name='tbSelYear' onChange='fUpdateCal(tbSelYear.value, tbSelMonth.value)' Victor='Won'>");
for(i=1950;i<2015;i++)
write("<OPTION value='"+i+"'>"+i+" 年</OPTION>");
write("</SELECT>");
write(" <select name='tbSelMonth' onChange='fUpdateCal(tbSelYear.value, tbSelMonth.value)' Victor='Won'>");
for (i=0; i<12; i++)
write("<option value='"+(i+1)+"'>"+gMonths[i]+"</option>");
write("</SELECT>");
write(" <input type='button' class='button1' onMouseOver='this.className=button2' onMouseOut='this.className=button1' name='PrevMonth' value='>' style='height:20;width:20;' onclick='fNextMonth()'>");
write("</td>");
write("</TR><TR>");
write("<td align='center'>");
write("<DIV style='background-color:#cccccc'><table width='100%' border='0'>");
fDrawCal(giYear, giMonth, 20, '12');
write("</table></DIV>");
write("</td>");
write("</TR><TR><TD align='center'>");
write("<TABLE width='100%'><TR><TD align='center'>");
//write("<B style='cursor:hand' onclick='fSetDate(0,0,0)' onMouseOver='this.style.color=gcToggle' onMouseOut='this.style.color=0'>清空</B>");
write("<font style='cursor:hand' onclick='HiddenDiv()' onMouseOver='this.style.color=gcToggle' onMouseOut='this.style.color=0'>关闭</font>"); //谷文栋添加 2003-02-10
write("</td><td algin='center'>");
write("<font style='cursor:hand' onclick='fSetDate(giYear,giMonth,giDay)' onMouseOver='this.style.color=gcToggle' onMouseOut='this.style.color=0'>今天: "+giYear+"-"+giMonth+"-"+giDay+"</font>");
write("</td></tr></table>");
write("</TD></TR>");
write("</TABLE></Div>");
}
</script>
</head>
<body onload="err(<%=errMsg %>)">
<%
if(rplist.size()==0)
{
out.print("无搜索结果");
}
%>
<p align="center" class="style1">员工奖惩情况</p>
<form name="myform" method="post" action="">
<p align="center"> </p>
<div align="center">
<table width="800" height="25" border="0" class="toBeSetBgColor" >
<tr>
<td width="190" height="33">姓名:
<input name="ui_name" type="text" size="12"></td>
<td width="190"> 部门:
<select name="selectdept">
<option value="">请选择部门</option>
<%for(int i=0;i<deplist.size();i++)
{
depvo=(DeptInfoVO)deplist.get(i); %>
<option value="<%=depvo.getDiId() %>"><%=depvo.getDiName() %></option>
<%} %>
</select>
</td>
<td width="250">日期:
<input name="rddate" type="text" size="12" readonly="true">
<a title=选择日期 href="javascript:fPopCalendar(document.all.img1,document.myform.rddate,400);" style="text-decoration:none"><img id=img1 src="psl_archive/punish_manage/img_date.gif" width="22" align=absMiddle border=0></a> </td>
<td width="300"> 获奖(受罚)类型:
<select name="selecttype">
<option value="">请选择类型</option>
<option value="奖">奖</option>
<option value="惩">惩</option>
</select>
</td>
<td width="44"><input type="button" name="query2" value=" 查 询 " onClick="QueryRP()"></td>
</tr>
</table>
</div>
</form>
<form name="form1" method="post" action="">
<div align="center">
<table width="800" border="0" cellpadding="0" cellspacing="1" class="toBeSetBgColor">
<tr class="RowHeader">
<td height="25"><div align="center"><strong>获奖人员</strong></div></td>
<td><div align="center"><strong>ID</strong></div></td>
<td><div align="center"><strong>性别</strong></div></td>
<td><div align="center"><strong>部门</strong></div></td>
<td><div align="center"><strong>获奖时间</strong></div></td>
<td><div align="center"><strong>获奖标题</strong></div></td>
<td><div align="center"><strong>获奖内容</strong></div></td>
<td><div align="center"><strong>获奖类别</strong></div></td>
<td><div align="center"><strong>详情</strong></div></td>
</tr>
<%
if(rplist!=null){
for(int i=0;i<rplist.size();i++){
rpvo=(RewardPunishVO)rplist.get(i);
uservo=rpvo.getUserInfo();
%>
<tr <%if(i%2 == 0){out.print("class=\"OddRow\"");}
else{out.print("class=\"EvenRow\"");} %> onMouseOver="this.style.backgroundColor='white'"
onMouseOut="this.style.backgroundColor=''">
<td height="25"><div align="center"><%=uservo.getUiRealname() %></div></td>
<td><div align="center"><%=uservo.getUiPersonid() %></div></td>
<td><div align="center"><%=uservo.getUiSex() %></div></td>
<td><div align="center"><%=uservo.getDeptInfo().getDiName() %></div></td>
<td><div align="center"><%=rpvo.getRpTime() %></div></td>
<td><div align="center"><%=rpvo.getRpTitle() %></div></td>
<td><div align="center"><%=rpvo.getRpContent() %></div></td>
<td><div align="center"><%=rpvo.getRpClass() %></div></td>
<td><div align="center"><a href="PA_RewardPunishmentServlet" onClick="return parti(<%=uservo.getUiId()%>)">详情</a></div></td>
</tr>
<%}} %>
</table>
</div>
</form>
<form action="PA_RewardPunishmentServlet" method="get" name="condiform">
<input type="hidden" name="opflag" value=""/>
<input type="hidden" name="currentPage" value="<%=currentPage%>"/>
<input type="hidden" name="cond" value="<%=pagehelp.getCondition()%>"/>
<table width="800" border="0" align="center">
<tr>
<td style="text-align:center"><%=pagehelp.getPagebar()%></td>
</tr>
</table>
</form>
<form action="" method="post" name="changeform">
<div align="center">
<table width="200" border="0">
<tr>
<%if(upHashMap != null && "1".equals(upHashMap.get("U_IsAdmin"))) { %>
<td><input type="button" name="addcontract" value=" 新 增 " onClick="Redirect('psl_archive/punish_manage/pa_pradd.jsp')"></td>
<%} %>
</tr>
</table>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -