TAU196.jsp 8.59 KB
Newer Older
Thitichaipun Wutthisak committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.*"%>
<%@ page import="com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*"  %>
<jsp:useBean id="TAU196" class="com.csc.library.system.Task" scope="page"/>
<%
	TAU196.setChannel(request ,response);
   	ProcessEntry screen=(ProcessEntry)TAU196.process("ProcessEntry","Process");
   	screen.process();

	CscCalendar cDate = new CscCalendar();	
%>
<html ng-app="myHR">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../CSS/TISCO.css" rel="stylesheet" type="text/css">
<link href="../CSS/bootstrap.css" rel="stylesheet"  type="text/css">
<link href="../CSS/bootstrap_csc_backend.css" rel="stylesheet"  type="text/css">
<script type="text/javascript" src="../JS/jquery-2.1.3.min.js"></script>
<script type='text/javascript' src="../JS/bootstrap.js"></script>
<script type='text/javascript' src='../JS/SCREEN.js'></script>
<script src="../JS/angular-1.3.15/angular.js" type="text/javascript"></script>	
<script src="../JS/ANGULAR/SCREEN_ANGULAR.js" type="text/javascript"></script>
<script language="javascript" src='../JS/DATEINPUT.js'></script>
<script language="javascript" src='../JS/VIEWCALENDAR.js'></script>
<script language="javascript">setLang('<%=screen.getUProfile().get("lang")%>');</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function process(pValue) {	
	with(document.cscform){
		var altDate="Please Choose TimeCode.";
		if(__language.value=="tha"){altDate="กรุณาเลือกรหัสเวร";	}
		if (__condition$time0id.value=="") {
			__condition$time0id.focus();
			alert(altDate);				
		} else if (__condition$timelist.value=="") {
			var altCopy="Please Enter TimeCode To Copy";
			if(__language.value=="tha"){altDate="กรุณากรอกรหัสตารางเวรที่ต้องการทำสำเนา";	}
			__condition$timelist.focus();
			alert(altDate);		
		} else {
			if (pValue=='Copy Shift Pattern') {
				__condition$cmdValue.value = "genshift";
				__ptype.value="TA18";
			} 
			bCon=confirm("Confirm Process "+pValue);
			if (bCon==true)	{			
				__cmd .value = "save";							
				submit();
			}
		}
	}
}

function goHelp(helpName,inputName) {
	var helpReturn;
	var tmp = document.cscform.__fixCon.value;
	if (inputName=="__condition$time0id") {
		document.cscform.__fixCon.value = "status='1'";
		helpReturn="__condition$time0id:time0id,MTIME0@EDESC";	
	} else if (inputName.indexOf("__condition$shift")>-1) {
		document.cscform.__fixCon.value = "status='0'";
	 	helpReturn=inputName+":time0id";		
	}/* else if (inputName.indexOf("__TTIMETEMP$employeeid$" )>-1) {
		var id = inputName.substring(23,inputName.length);
	 	helpReturn="__TTIMETEMP$employeeid$"+id+":employeeid,";		
	}  */
	linkHelp_Return(helpName,helpReturn);		
	document.cscform.__fixCon.value=tmp;		
}

//-->
</script>
</head>
<body  leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<form name="cscform" method="post" action="">


<!----------BEGIN CSC INITIAL ZONE ------------------------>

<%=screen.InitialVariable()%>

<!----------END CSC INITIAL ZONE -------------------------->

<input type="hidden" name="__screen"  value="TAU196">
	<input type="hidden" name="__fixCon"  value="">
	<input type="hidden" name="__cmd"  value="">
	<input type="hidden" name="__help"  value="">
	<input type="hidden" name="__user" value="<%=screen.getUProfile().getUserId()%>">
	<input type="hidden" name="__companyid" value='<%=screen.getUProfile().get("companyid")%>'>
	<input type="hidden" name="__tname" value="ระบบเวลาการทำงาน">
	<input type="hidden" name="__ename" value="Time Attendance">
	<input type="hidden" name="__ptype" value="">
	<input type="hidden" name="__prclass" value="CopyShiftPattern">
	<input type="hidden" name="__calendar" value="">
	<script language="javascript">getInputFormatDate();</script>
	<input type="hidden" name="__language" value ="<%=screen.getUProfile().get("lang")%>">	
	<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
  	<script language="javascript">initToolTips();</script>	
	<input type="hidden" name="__condition$cmdValue" value="">
 	<br>
  	<div align="center">
    <table  cellpadding="0"  cellspacing="0">
    <tr >
    	<td  class="header"> TAU196,&nbsp;<span swlang code="SW012711">Copy Shift Pattern</span>&nbsp;	</td>
   	</tr>
	<tr>
    	<td class="blankspace"  ></td>
    </tr>
	<tr>
    	<td>
			<table  cellpadding="0"  cellspacing="0">			
			<tr>
				<td width="400" class="columnlabel"><span swlang code="SW012713">Time0 ID</span>&nbsp;</td>		
			  <td width="250"><input type="text" name="__condition$time0id" size="15" readonly="true">
				<a href="javascript:goHelp('MTIME0HELP','__condition$time0id')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image10','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Help" name="Image10" width="20" height="20" border="0" align="absmiddle" readonly="true"></a>
				</td>				
			</tr>
			<tr>
				<td class="columnlabel"><script language="javascript">swapLang("Description");</script>&nbsp;</td>		
				<td><input type="text" name="MTIME0@EDESC" size="60" readonly="true"></td>				
			</tr>
			<tr>
				<td class="columnlabel"><script language="javascript">swapLang("Time Period");</script>&nbsp;</td>		
				<td>
					<INPUT TYPE='text' Name='__condition$start_date' SIZE='10' MAXLENGTH='10' VALUE='<%=cDate.getDDMMYYYY()%>'  onClick="" onChange="" onMouseOver="toolTip('Start Date')" onMouseOut="toolTip()" onKeyPress="chkInteger(event);" onKeyUp="sysIsEdit();formatDate(this);" dir="" onBlur="" onFocus="this.select();" class="" alt="Start Date"  >&nbsp;&nbsp;<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image295','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)" onClick="viewCal('__condition$start_date')"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="Calendar" name="Image295" width="20" height="20" border="0" align="absmiddle" id="Image295"></a>
					&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;
					<INPUT TYPE='text' Name='__condition$end_date' SIZE='10' MAXLENGTH='10' VALUE='<%=cDate.getDDMMYYYY()%>'  onClick="" onChange="" onMouseOver="toolTip('End Date')" onMouseOut="toolTip()" onKeyPress="chkInteger(event);" onKeyUp="sysIsEdit();formatDate(this);" dir="" onBlur="" onFocus="this.select();" class="" alt="End Date"  >&nbsp;&nbsp;<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image296','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)" onClick="viewCal('__condition$end_date')"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="Calendar" name="Image296" width="20" height="20" border="0" align="absmiddle" id="Image296"></a>
				</td>
			</tr>			
			<tr>
				<td class="columnlabel"><script language="javascript">swapLang("Time Code To Copy");</script>&nbsp;</td>		
				<td>
					<textarea name='__condition$timelist' cols='50' rows='4' wrap='' onClick="" onChange="" onMouseOver="" onMouseOut="" onKeyPress="" onKeyUp="" onBlur="" onFocus="" ></textarea>
				</td>				
			</tr>
			</table>
		</td>
    </tr>
	<tr>
    	<td class="blankspace"  ></td>
    </tr>

			<tr>
				<td  class="buttonline" colspan="7"><div align="center">
					<button type="button" class="btn btn-primary width100" swlang code="SW012098" onClick="process('Copy Shift Pattern');">Submit</button>
				</div>
				</td>
			</tr>
	<tr>
    	<td class="blankspace"></td>
    </tr>
  	<tr>
		<td  class="bottom" colspan="2"></td>
    </tr>
	</table>
  </div>
</form>
</body>
</html>