PAYSLIP_CAAT.jsp 7.36 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 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.*,java.text.*,com.csc.library.databean.*,java.util.Enumeration"%>
<%@ page import="com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*"  %>
<%@ include file="../CHECKPROFILE.jsp" %>
<% request.setCharacterEncoding("UTF-8"); %>
<jsp:useBean id="EMV" class="com.csc.library.system.Task" scope="page"/>
<jsp:setProperty name="EMV" property="appname" value="empview" />
<%
	CheckNull chk=new CheckNull();
	DecimalFormat df = new DecimalFormat("#,###,##0.00");
	DecimalFormat df2 = new DecimalFormat("00");

	EMV.setChannel(request, response);
	HelpEntry screen = (HelpEntry) EMV.process("HelpEntry","EMV_PAYSLIP_REHELP");
	String empId = screen.getUProfile().get("employeeid").toString();

%>
<html xmlns="http://www.w3.org/1999/xhtml" ng-app="EPAYSLIP">
	<head>

		<title>Employee View</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<style>
			.blog-password{
				display: none;
				position: fixed;
				float: left;
				width: 40%;
				height: auto;
				left: 30%;
				top: 30%;
				box-shadow: 1px 1px 10px #848484;
				background-color: #fff;
			}
			.blog-head{
				padding-top: 20px;
				padding-bottom: 20px;
				text-align: center;
				font-size: 24px;
			}
			.padding-button{
				padding-top: 20px;
				padding-bottom: 20px;
			}
			section{
				transition: all 0.2s;
			}
			section.hidesection{
				opacity: 0.2;
			}
		</style>
	</head>
	<body ng-controller='MyEpaySlip'>
		<div class="bg-com"></div>
		<jsp:include page="EMV_HEADMENU.jsp" flush="true" />
		<script type="text/javascript" src="../JS/webtoolkit.sha1.js"></script>
		<script src="../public/lib/angular-resource/angular-resource.min.js"></script>
		<script type='text/javascript' src='../JS/EMPVIEW_FUNC.js'></script>
		<script type="text/javascript" src="JS/PAYSLIP/Module.Controller.js"></script>
		<script type='text/javascript' src='JS/PAYSLIP/services.js'></script>
		<script type="text/javascript" src="JS/PAYSLIP/MyEpaySlip.Controller.js"></script>
		<script type="text/javascript">
			var session_status=0;
			setLang("<%=screen.getUProfile().get("lang")%>");
			setCalendarLang("<%=screen.getUProfile().get("lang")%>");
			var swap = new swaplang();
         var titlename = swap.swap2String("SW000238");
			setPageTitle(titlename);


			$(document).ready(function(){
				$(".result").css("text-align","right");
				$(".right").css("text-align","right");

			});

			function viewData(){
				var m = '';
				if ($('input[name="__employeeid"]').val() != ""){
					$('input[name="__cmd"]').val('search');
					m = $('select[name="months"]').val();
					if (m <=  9){
						m = '0'+m;
					}
					//var myfilter = "gendate >= '"+$('select[name="years"]').val()+"-"+m+"-01' and gendate <= '"+$('select[name="years"]').val()+"-"+m+"-31'";
					var myfilter = " gendate in (select gendate from tpy_his0 where pay_date = '"+$('select[name="round"]').val()+"') ";
					//alert(myfilter);
					$('input[name="FILTERDATE"]').val(myfilter);
					$('input[name="__authenstatus"]').val('1');
					var win = window.open('','Map');
					if (win){
						$('form[name="cscform"]').submit();
						win.focus();
					}
				}
			}

			function openBlogPassword(){
				$('section[name="__secpayslip"]').addClass('hidesection');
				$('.blog-password').fadeIn('fast');
				return false;
			}
			function closeBlogPassword(){
				$('.blog-password').fadeOut('fast');
				$('section[name="__secpayslip"]').removeClass('hidesection');
			}

			function sendForCheck(){
				var scope = angular.element($('.blog-password')).scope();
				scope.$apply(function(){
					dataresult = scope.checkPassword();
				});
			}
		</script>

		<section name="__secpayslip">
			<div class="container csc-content">
				<form name="cscform" class="form-horizontal" method="post" action="SHOWPAYSLIP_CAAT.jsp" target="Map">
					<%=screen.InitialVariable()%>
					<input type="hidden" name="__cmd" value="">
					<input type="hidden" name="__screen" value="PI-WORKINGDETAILS">
					<input type="hidden" name="__language" value ="<%=screen.getUProfile().get("lang")%>">
					<input type="hidden" name="__prgcode" value="">
					<input name="FILTERDATE" type="hidden" value="">
					<input type="hidden" name="__employeeid" value="<%=screen.getUProfile().get("employeeid")%>">
					<input type='hidden' name='__gendate' value="">
					<input type='hidden' name='__period' value=''>
					<input type='hidden' name="__authenstatus" value="">
					<input type='hidden' name='__salatype' value=''>
					<input type="hidden" name="mm" value="<%=request.getParameter("mm")%>">
					<input type="hidden" name="yyyy" value="<%=request.getParameter("yyyy")%>">

					<div class="csc-block">
						<div class="center">
							<h2 class="csc-block-head" swlang code='SW000238'>Salary Information</h2>
						</div>

						<div class="form-horizontal">
							<div class="row">
								<div class="form-group">
									<div class="col-md-2 col-sm-2 col-xs-2">
										<label class="control-label label-right" swlang code='SW000717'>Year</label>
									</div>
									<div class="col-md-2 col-sm-2 col-xs-3">
										<select class="form-control" name="years" ng-model="yearselect" ng-change="genMonth()">
											<option ng-repeat="y in paysliplist" value="{{ y.year }}">{{ y.year }}</option>
										</select>
									</div>
									<div class="col-md-1 col-sm-1 col-xs-1">
										<label class="control-label label-right" swlang code='SW012272'>Month</label>
									</div>
									<div class="col-md-2 col-sm-2 col-xs-3">
										<select class="form-control" name="months" ng-model="monthselect" ng-change="genPeriod()">
											<option ng-repeat='m in tmpmonth' value="{{ m.id }}">{{ m.name }}</option>
										</select>
									</div>
									<div class='col-md-1 col-sm-1 col-xs-1'>
										<label class='control-label label-right'>Period</label>
									</div>
									<div class='col-md-2 col-sm-2 col-xs-2'>
										<select class='form-control' name='round' ng-model="periodselect">
											<option ng-repeat='pe in tmpperiod' value='{{ pe.substring(3, 13) }}'>{{ pe }}</option>
										</select>
									</div>
								</div>
							</div>

							<div class="center">
								<a class="btn btn-primary" onclick="openBlogPassword()" swlang code='SW003537'>Search</a>
							</div>
						</div>
					</div>
				</form>
			</div>
			<a href="#top" id="top-button">
				<i class="fa fa-angle-up"></i>
				<div class="top-word">Back to top</div>
			</a>
		</section>
		<div class="blog-password">
			<div class='blog-head'>กรุณาใส่รหัสผ่านเพื่อเข้าถึงข้อมูล</div>
			<div class='row'>
				<div class='form-group'>
					<div class='col-xs-1 col-sm-1 col-md-1'></div>
					<div class='col-xs-2 col-sm-2 col-md-2'><label class='label-control label-right'>รหัสผ่าน</label></div>
					<div class='col-xs-8 col-sm-8 col-md-8'><input type='password' class='form-control' ng-model='mypw'/></div>
				</div>
			</div>
			<div class='row padding-button'>
				<div class='form-group'>
					<center>
						<a class='btn btn-primary' onClick='sendForCheck()'>Submit</a>
						<a class='btn btn-primary' onClick='closeBlogPassword()'>Cancel</a>
					</center>
				</div>
			</div>
		</div>
		<jsp:include page="FOOTER.jsp" flush="true" />
	</body>
</html>