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

📄 tsentry.jsp.svn-base

📁 一个timesheet程序,用来统计开发人员的度量衡web在线程序.用于软件行业
💻 SVN-BASE
📖 第 1 页 / 共 4 页
字号:
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%@ page import="com.nsi.components.util.LoginuserUtil" %>
<%@ page import="com.nsi.components.web.util.TsWebUtil" %>
<%@ page import="com.nsi.components.timesheet.TsInfo" %>
<%@ page import="com.nsi.components.timesheet.TsDetails" %>
<%@ page import="com.nsi.components.util.ResourceUtil" %>
<%@ page import="com.nsi.components.util.info.RsDropInfo" %>
<%@ page import="com.nsi.control.web.util.RsWebInfoUtil" %>
<%@ page import="com.nsi.util.tsdate.TsHolidayUtil" %>
<%@ page import="com.nsi.util.ValHelper" %>
<%
String timesheetid = TsWebUtil.getInstance().getTimesheetid(request);
boolean finalized = TsWebUtil.getInstance().isFinalized(request);
boolean active = TsWebUtil.getInstance().isActive(request);
TsInfo tsinfo = TsWebUtil.getInstance().getTsinfo(request);
String startweek = TsWebUtil.getInstance().getStartweek(request);
String resourceid = TsWebUtil.getInstance().getResourceid(request);
int addrows = TsWebUtil.getInstance().getAddnum(request);
String addedprojectid = TsWebUtil.getInstance().getAddprojectid(request);
int rownum = 0;
if ( addrows > 0  ) 
{
	rownum += addrows;
}
String projassignstartdate = "";
String projassignenddate = "";
String userstatus = TsWebUtil.getInstance().getUserstatus(request);
String hidedetail = TsWebUtil.getInstance().getHidetail(request);
%>
<html>
<head>
	<meta http-equiv="content-style-type" content="text/css">
	<meta http-equiv="pragma" content="no-cache">
	<%
	if ( LoginuserUtil.getInstance().isNotLogined(request) )
	{
		%><meta http-equiv="refresh" content="0; url=/rms/entrance.jsp"><%
	}
	%>
	<title>Achievo-RMS Timesheet Entry</title>
	<link href="../theme/master.css" rel="stylesheet" type="text/css">
	<script language="javascript">
	<!--
		var today = new Date();
		var day   = today.getDate();
		var month = today.getMonth();
		var year  = y2k(today.getYear());
		var monthname = new Array('JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC');
		var valid = 0;
		var changeflag = 0;
		function restart()
		{
			document.ts_entry_form.startweek.value = monthname[month] + "-" + padout(day) + "-" + y2k(year);
			mywindow.close();
			document.ts_entry_form.pbsearch.focus();
			document.ts_entry_form.pbsearch.click();
		}
		function y2k(number)
		{
			number = parseInt(number);
			return (number < 1000) ? number + 1900 : number;
		}
		function padout(number)
		{
			number = parseInt(number);
			return (number < 10) ? '0' + number : number;
		}
		function newwindow()
		{
			mywindow = window.open('/rms/timesheet/tscalender.html','Calendar', "resizeable = no,width=345,height=295" );
			mywindow.location.href = '/rms/timesheet/tscalender.html';
			mywindow.focus();
			if (mywindow.opener == null) mywindow.opener = self;
		}
		function convertdate(date)
		{
			var datemon; 
			for ( var i = 0; i < monthname.length; i++ )
			{
				if ( monthname[ i ] == date.substring( 0, 3 ) )
				{
					datemon = i;
				}	
			}
			if ( datemon < 10 )
			{
				datemon = "0" + datemon;
			}
			return date.substring( 7, 11 ).toString() + datemon.toString() + date.substring( 4, 6 ).toString();
		}
		function getweekdate(date, numday)
		{
			var datemon; 
			for ( var i = 0; i < monthname.length; i++ )
			{
				if ( monthname[ i ] == date.substring( 0, 3 ) )
				{
					datemon = i;
				}	
			}
			var year = date.substring( 7, 11 ); 
			var day = date.substring( 4, 6 );
			var weekday = new Date();
			weekday.setFullYear(year,datemon,day); 
			weekday.setDate(weekday.getDate()+ numday);
			year = weekday.getFullYear();
			datemon = weekday.getMonth();
			day = weekday.getDate();
			if ( datemon < 10 )
			{
				datemon = "0" + datemon;
			}
			else
			{
				datemon = "" + datemon;
			}
			
			if(day <10)
			{
				day ="0" + day;
			}
			else
			{
				day ="" + day;
			}
			return "" + year  + datemon  +  day;
		}
		function getweekday(date)
		{
			var datemon; 
			for ( var i = 0; i < monthname.length; i++ )
			{
				if ( monthname[ i ] == date.substring( 0, 3 ) )
				{
					datemon = i;
				}	
			}
			var year = date.substring( 7, 11 ); 
			var day = date.substring( 4, 6 );
			var weekday = new Date();
			weekday.setFullYear(year,datemon,day); 
			switch(weekday.getDay())
			{
				case 0:
				  return "Sunday";
				case 1:
				  return "Monday";
				case 2:
				  return "Tuesday";
				case 3:
				  return "Wedsday";
				case 4:
				  return "Thursday";
				case 5:
				  return "Friday";
				case 6:
				  return "Satuday";
				default:
				  return "null";
			 } 
		}
		function validenddates(date1, dateweek)
		{ 
			if (date1=='null'||date1=='')
			{
				return true;
			} 							
			if ( convertdate(date1) < dateweek )
			{
				return false;
			} 
			else
			{
				return true;
			}
		}
		function validenddatesterm(date1, dateweek)
		{ 
			if (date1=='null'||date1=='')
			{
				return true;
			} 							
			if ( convertdate(date1) <= dateweek )
			{
				return false;
			} 
			else
			{
				return true;
			}
		}
		function validstartdates(date1, dateweek)
		{    			 
			if (date1=='null'||date1=='')
			{
				return true;
			} 										
			if ( convertdate(date1) > dateweek )
			{
				return false;
			} 
			else
			{
				return true;
			}
		}	
		function haschange()
		{
			changeflag = 1;
		}
		function savecheck(theform)
		{
			/*if ( changeflag == 0 )
			{
				alert("Nothing need to be saved ! ");
				return false;
			} 
			else*/ 
			{
				if ( checkvalid(theform) )
				{
					changeflag = 0;
					submitform(theform, 'UpdateTimeSheet', 'F');
					theform.save.disabled = true;
					return true;
				} else {
					return false;
				}
			}
		}
		function checkvalid(theform)
		{
		  /*  var weekdays = getHoliWeekDays();
			if (weekdays!='')
			{
				if(!confirm('Do not enter the holiday hours on ' + weekdays + ' except the working hours!. Do you want to continue?') )
				{ 
					return false;
				}		 
			} */
			if ( valid == 1 )
			{
				valid = 0;
				return false;
			} 
			else 
			{	
				if ( ! validentry(theform) )
				{
					return false;
				} 
				if ( ! validproact(theform) )
				{
					return false;
				} 
				else if ( theform.montotal.value > 24 )
				{
					alert("You working hours in Monday should not over 24 hours ");
					theform.montotal.focus();
					return false;
				} 
				else if ( theform.tuetotal.value > 24 )
				{
					alert("You working hours in Tuesday should not over 24 hours ");
					theform.tuetotal.focus();
					return false;
				} 
				else if ( theform.wedtotal.value > 24 )
				{
					alert("You working hours in Wednesday should not over 24 hours ");
					theform.wedtotal.focus();
					return false;
				} 
				else if ( theform.thutotal.value > 24 )
				{
					alert("You working hours in Thursday should not over 24 hours ");
					theform.thutotal.focus();
					return false;
				} 
				else if ( theform.fritotal.value > 24 )
				{
					alert("You working hours in Friday should not over 24 hours ");
					theform.fritotal.focus();
					return false;
				} 
				else if ( theform.sattotal.value > 24 )
				{
					alert("You working hours in Saturday should not over 24 hours ");
					theform.fritotal.focus();
					return false;
				} 
				else if ( theform.suntotal.value > 24 )
				{
					alert("You working hours in Sunday should not over 24 hours ");
					theform.fritotal.focus();
					return false;
				} 
				else 
				{
					return true;
				}
			}
		}
		function finalizeconfirm(theform, userrole, rows)
		{	
			if (userrole=='1'&&rows=='0')
			{
				submitform(theform, 'UpdateTimeSheet', 'T');
				theform.makefinal.disabled = true;
				return true;
			} 				
			if ( ! theform.projectid0 )
			{
				alert("You have to enter timesheet detail!");
				return false;
			} 
			else if ( theform.total.value <= 0 && userrole!='1')
			{
				alert("No valid timesheet detail!");
				return false;
			}	
			if ( valid == 1 )
			{
				valid = 0;
				return false;
			} 
			else 
			{
				if ( ! validentry(theform) )
				{
					return false;
				} 
				if ( ! validproact(theform) )
				{
					return false;
				}
				if ( theform.montotal.value >24 )
				{
					alert("You working hours in Monday should not over 24 hours ");
					theform.montotal.focus();
					return false;
				} 
				else if ( theform.tuetotal.value > 24 )
				{
					alert("You working hours in Tuesday should not over 24 hours ");
					theform.tuetotal.focus();
					return false;
				} 
				else if ( theform.wedtotal.value > 24 )
				{
					alert("You working hours in Wednesday should not over 24 hours ");
					theform.wedtotal.focus();
					return false;
				} 

⌨️ 快捷键说明

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