APP_EMV707_COPY.jsp 6.05 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
<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@page import="com.csc.library.utilities.CheckNull, com.csc.library.utilities.CscCalendar, com.csc.library.databean.MyDataList,com.csc.library.session.*"%>
<%@ include file="../CHECKPROFILE.jsp" %>
<% request.setCharacterEncoding("UTF-8"); %>
<jsp:useBean id="screen" class="com.csc.library.system.Task" scope="page"/>
<%
	CheckNull chk = new CheckNull();
	
	String apsassessy = chk.chkNullString(request.getParameter("__apsassessy"));

	screen.setChannel(request,response);
	screen.checkProfile();
%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" ng-app="myHR">

	<head>

		<title>Employee View</title>

		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

		<link rel="stylesheet" href="<%=request.getContextPath()%>/CSS/font-awesome.css">
		<link rel="stylesheet" type="text/css" href="../CSS/Bootstrap/css/bootstrap.css" />
		<link rel="stylesheet" type="text/css" href="../CSS/EMPVIEW_LAYOUT.min.css" />
		
		<script type="text/javascript" src="../JS/jquery-2.1.3.min.js"></script>
		<script type="text/javascript"src="../JS/EVENTS.js"></script>
		<script type="text/javascript"src="../JS/SCREEN.js"></script>
		<script type="text/javascript" src="../JS/angular-1.3.15/angular.js"></script>
		<script type="text/javascript" src="../JS/ANGULAR/SCREEN_ANGULAR.js"></script>
		

		<script>

			setLang("<%=screen.getUProfile().get("lang")%>");	
			
			function goResult(apsid, apsassessy, apsassessor, type){
				var page = 'APP_EMV010_2';
				if(type == 'AP30'){
					page = 'APP_EMV010_3';
				}
				var param = page+".jsp?apsid="+apsid+"&apsassessor="+apsassessor+"&apsassessy="+apsassessy+"&bpage=&ass_level=0&bu1=&bu2=&isread=1&astid="+type+"&ishistory=1";	

				with(document.cscform){
					window.open(param,"Assess_Form"+type,"left=250,top=150,width=750,height=750,toolbar=no,status=yes,scrollbars=yes,resizable=yes");
				}
			}
			ThaiCode[200]="ระบบจะลบหัวข้อประเมินปัจจุบันก่อนคัดลอก\n             ต้องการคัดลอกหรือไม่ ?";
			EngCode[200]="System delete current assess form before copy.\n              Continue copy assess form ?";
			ThaiCode[201]="กรุณาเลือกแบบประเมินที่ต้องการคัดลอก";
			EngCode[201]="Please select assess form for copy.";
			function copy(){
				var obj = document.getElementsByName("apsid");
				if(typeof obj!="undefined"){
					for(i=0; i<obj.length; i++){
						if(obj[i].checked){
							window.document.cscform.__copy_apsid.value = obj[i].value;
						}
					}
				}
				if(window.document.cscform.__copy_apsid.value != ""){
					bCon=confirm(MyCode[200]);
					if (bCon==true)	{
						window.opener.document.cscform.__copy_apsid.value = window.document.cscform.__copy_apsid.value;
						window.opener.document.cscform.__copy_apsassessy.value = window.document.cscform.__copy_apsassessy.value;
						window.opener.document.cscform.submit();
						window.close();
					}
				}else{
					alert(MyCode[201]);
				}
				
			}
		</script>
	</head>
	<body>
		<div class="bg-com"></div>
	
		<section>
			<div class="container csc-content">
				<form name="cscform" class="form-horizontal" method="post" action="APP_EMV707_COPY.jsp">
					<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
					<input type="hidden" name="__screen"  value="APP_EMV707_COPY">
					<input type="hidden" name="__help" value="">
					<input type="hidden" name="__cmd"  value="">
					<input type="hidden" name="__language" value ="<%=screen.getUProfile().get("lang")%>"> 
					<input type="hidden" name="__fixCon" value="">
					<input type="hidden" name="__copy_apsid" value="">
					<input type="hidden" name="__copy_apsassessy" value="<%=apsassessy%>">
				
					<div class="csc-block-white">
						<div class="container csc-content">
							<table class="table table-head table-hover table-bordered table-content-center">
								<thead>
									<tr>
										<th swlang code='SW000015'>Select</th>
										<th swlang code='SW000717'>Year</th>
										<th swlang code='SW002216'>Assess ID</th>
										<th swlang code='SW000012'>Description</th>
										<th swlang code='SW012110'>Assess Date</th>
										<th swlang code='SW012312'>Self Result</th>
										<th swlang code='SW012109'>Approve Result</th>
									</tr>
								</thead>
								<tbody>
									<%
										if(screen.getUProfile() != null){
											DbInquiry inq = new InitialInquiry(screen.getUProfile()).getDbInquiry("Hapstran0", false);
											inq.setColumn("*");
											DbInquiry child = new InitialInquiry(screen.getUProfile()).getDbInquiry("Hapstran", false);
											child.setColumn("*");
											child.setFilter("apsassessy = apsassessor "+
												"	and apsassessy = '"+apsassessy+"' " +
												"	and astid = 'AP10' ");
											inq.putChild(child);
											inq.refresh();
											while(inq.next()){
									%>
									<tr>
										<td><input type="radio" name="apsid" value="<%=inq.getString("apsid")%>"></td>
										<td><%=inq.getString("apsstartdate").split("-")[2]%></td>
										<td><a href="javascript:goResult('<%=inq.getString("apsid")%>','<%=inq.getChild("hapstran").getString("apsassessy")%>','<%=inq.getChild("hapstran").getString("apsassessor")%>','<%=inq.getString("astid")%>');"><%=inq.getString("apsid")%></a></td>
										<td><%=inq.getString("tdesc")%></td>
										<td><%=inq.getString("apsstartdate")+" - "+inq.getString("apsstartdate")%></td>
										<td><%=inq.getChild("hapstran").getString("apssumscore")%></td>
										<td><%=inq.getChild("hapstran").getString("apssumscore_last")%></td>
									</tr>
									<%
											}
										}
									%>
								</tbody>
							</table>
						</div>
						<div class="center">
							<a class="btn btn-primary" href="javascript:copy();" swlang code='SW000117'>Save </a>
							<a class="btn btn-primary" href="javascript:window.close();" swlang code='SW012104'>Close </a>
						</div>
					</div>
				</form>
			</div>
		</section>
	</body>
</html>