PRU120.jsp 15.9 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 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@page contentType="text/html; charset=UTF-8"%>
<%@ page import="com.csc.library.entry.*" %>
<%@ page import="com.csc.library.utilities.*,com.csc.library.session.*" %>
<jsp:useBean id="PRU120" scope="page" class="com.csc.library.system.Task" />
<html ng-app="myHR">
<% 
   PRU120.setChannel(request ,response);
   ProcessEntry screen=(ProcessEntry)PRU120.process("ProcessEntry","PTpy_his");
   screen.process();

  CscCalendar calendar = new CscCalendar();
%>
<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 language="JavaScript" src="../JS/SCREEN.js"></script>
<script language='javascript'>setLang('<%=screen.getUProfile().get("lang")%>');</script>
<script src="../JS/VIEWCALENDAR.js"></script>
<script src="../JS/angular-1.3.15/angular.js"></script>
<script type='text/JavaScript' SRC='../JS/ANGULAR/SCREEN_ANGULAR.js'></script>
<script language="JavaScript" type="text/JavaScript">
<!--
function process() {
	with(document.cscform){
		var stDate = __condition$D$2.value;
		var date1 = new Date();
		var date2 = new Date();			
		date1 = new Date(stDate.split("-")[2],((stDate.split("-")[1])-1),stDate.split("-")[0],0,0,0);
		var yearDiff = (date2-date1)/1000/60/60/24/365;
		
		if(parseInt(yearDiff)>4){
			bCon=confirm("ต้องการ ลบ ข้อมูลหรือไม่ ?");
			if (bCon==true)	{
				__cmd .value = "save";
				submit();
			 }
		}else{
			alert("ช่วงวันที่ ต้องมากกว่า 5 ปีขึ้นไป");
		}
	}
}
function linkHelp_Return(help,input){
	with(document.cscform){
	var param="PRU084.jsp?__helpName="+help+"&__helpReturn="+input+"&__pageCall="+__screen.value;
	window.open(param,"Help","left=150,top=150,width=600,height=400,toolbar=no,status=yes,scrollbars=yes");
}
}

function goHelp(helpName,inputName){
		var  helpReturn;
		if(inputName == "__condition$BU1$1"){
			helpReturn = inputName+":bu1id";
		}
		else if(inputName == "__condition$BU1$2"){
			helpReturn = inputName+":bu1id";
		}
		else if(inputName == "__condition$BU2$1"){
			helpReturn = inputName+":bu2id";
		}
		else if(inputName == "__condition$BU2$2"){
			helpReturn = inputName+":bu2id";
		}
		else if(inputName == "__condition$BU3$1"){
			helpReturn = inputName+":bu3id";
		}
		else if(inputName == "__condition$BU3$2"){
			helpReturn = inputName+":bu3id";
		}
		else if(inputName == "__condition$BU4$1"){
			helpReturn = inputName+":bu4id";
		}
		else if(inputName == "__condition$BU4$2"){
			helpReturn = inputName+":bu4id";
		}
		else if(inputName == "__condition$BU5$1"){
			helpReturn = inputName+":bu5id";
		}
		else if(inputName == "__condition$BU5$2"){
			helpReturn = inputName+":bu5id";
		}
		else if(inputName == "__condition$POS$1"){
			helpReturn = inputName+":positionid";
		}
		else if(inputName == "__condition$POS$2"){
			helpReturn = inputName+":positionid";
		}
			else if(inputName == "__condition$EMP$1"){
			helpReturn = inputName+":employeeid";
		}
		else if(inputName == "__condition$EMP$2"){
			helpReturn = inputName+":employeeid";
		}
	     linkHelp_Return(helpName,helpReturn);
}

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_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_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 GoSave(){
	/*with(document.forms[0]){
		__confirm.value="0";
	if(__confirm.value=="0"){
		    	aCon=confirm(MyCode[1]);// จะบันทึกหรือไม่
				if (aCon==true)	{
                    __confirm.value="s";
					__cmd.value = "save";
					submit();
				}
		}else {
			alert(MyCode[2]);// ข้อมูลมีอยู่แล้ว
			__confirm.value = "0";
		}

}*/
	confirmSave();
	//confirmSaveIframe();
}
function GoUpdate(){
	update();
}
function GoDelete(){
	edelete();
}
function GoSearch(){
	search();
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0"  onLoad="MM_preloadImages('../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif')">
<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
<script language="javascript">initToolTips();</script>
<div class="centered"> 
  <form name="cscform" method="post" action="" ng-controller="Swaplang as sw">
   

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

<%=screen.InitialVariable()%>

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

    <input type="hidden"name="__screen"  value="PRU120">
    <input name="__fixCon" type="hidden" value="companyid='<%=screen.getUProfile().get("companyid")%>'">
    <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="__name" value="Delete Payroll Transaction">
    <input type="hidden" name="__condition$process_type" value="Clear">
    <input type="hidden" name="__prclass" value="PTpy_his">
	<input name="__language" type="hidden" value="<%=screen.getUProfile().get("lang")%>">
	<script language="javascript">getInputFormatDate();</script>
	<input type="hidden" name="__calendar">
	
	<% CscCalendar cs = new CscCalendar();	%>
    <div align="center"> 
      <table width="640" cellpadding="0" cellspacing="0">
        <tr> 
          <td class="header" colspan="2">PRU120, 
            <span swlang code="SW000913">Delete Personnel Information</span> &nbsp;</td>
        </tr>
        <tr> 
          <td > <table width="641" cellpadding="0"  cellspacing="0">
              <tr> 
                <td  class="blankspace" colspan="3"></td>
              </tr>
			  <%
				DbInquiry memployee = new InitialInquiry(screen.getUProfile()).getDbInquiry("memployee");
				memployee.setColumn("employeeid,companyid,bu1,bu2,bu3,bu4,bu5");
				memployee.refresh();

				DbRecord mbu = memployee.getCurrentDbRecord();
			  %>
              <tr> 
                <td width="150" class="columnlabel"><%=mbu.getField("bu1").getDescription()%> 
                <td width="298">&nbsp; <input name="__condition$BU1$1" type="text" size="10"> &nbsp;<a href="javascript:goHelp('MBU1HELP','__condition$BU1$1');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image15','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="HELP" name="Image15" border="0" align="absmiddle"></a> &nbsp;-&nbsp; <input name="__condition$BU1$2" type="text" size="10"> &nbsp;<a href="javascript:goHelp('MBU1HELP','__condition$BU1$2');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image16','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="HELP" name="Image16" border="0" align="absmiddle"></a></td>
                <!-- <td width="190"> <input type="checkbox" name="__condition$Tbl$Tpy_his" value="Tpy_his" checked> <script language="javascript">swapLang('Payroll History');</script> </td> -->
              </tr>
              <tr> 
                <td  class="columnlabel"><%=mbu.getField("bu2").getDescription()%>
                <td >&nbsp; <input name="__condition$BU2$1" type="text" size="10"> &nbsp;<a href="javascript:goHelp('MBU2HELP','__condition$BU2$1');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image15','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="HELP" name="Image15" border="0" align="absmiddle"></a> &nbsp;-&nbsp; <input name="__condition$BU2$2" type="text" size="10"> &nbsp;<a href="javascript:goHelp('MBU2HELP','__condition$BU2$2');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image16','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="HELP" name="Image16" border="0" align="absmiddle"></a></td>
              <!--   <td><input type="checkbox" name="WT_His" value="WT_His" disabled> <script language="javascript">swapLang('Working Time History');</script> </td> -->
              </tr>
              <tr> 
                <td  class="columnlabel"><%=mbu.getField("bu3").getDescription()%>
                <td >&nbsp; <input name="__condition$BU3$1" type="text" size="10"> &nbsp;<a href="javascript:goHelp('MBU3HELP','__condition$BU3$1');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image15','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="HELP" name="Image15" border="0" align="absmiddle"></a> &nbsp;-&nbsp; <input name="__condition$BU3$2" type="text" size="10"> &nbsp;<a href="javascript:goHelp('MBU3HELP','__condition$BU3$2');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image16','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="HELP" name="Image16" border="0" align="absmiddle"></a></td>
               <!--  <td><input type="checkbox" name="T_His" value="T_His" disabled> <script language="javascript">swapLang('Training History');</script></td> -->
              </tr>
              <tr> 
                <td  class="columnlabel"><%=mbu.getField("bu4").getDescription()%> 
                <td >&nbsp; <input name="__condition$BU4$1" type="text" size="10"> &nbsp;<a href="javascript:goHelp('MBU4HELP','__condition$BU4$1');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image15','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="HELP" name="Image15" border="0" align="absmiddle"></a> &nbsp;-&nbsp; <input name="__condition$BU4$2" type="text" size="10"> &nbsp;<a href="javascript:goHelp('MBU4HELP','__condition$BU4$2');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image16','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="HELP" name="Image16" border="0" align="absmiddle"></a></td>
             <!--    <td ><input type="checkbox" name="WU_His" value="WU_His" disabled> <script language="javascript">swapLang('Welfare Usage History');</script></td> -->
              </tr>
              <tr> 
                <td  class="columnlabel"><%=mbu.getField("bu5").getDescription()%>
                <td>&nbsp; <input name="__condition$BU5$1" type="text" size="10"> &nbsp;<a href="javascript:goHelp('MBU5HELP','__condition$BU5$1');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image15','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="HELP" name="Image15" border="0" align="absmiddle"></a> &nbsp;-&nbsp; <input name="__condition$BU5$2" type="text" size="10"> &nbsp;<a href="javascript:goHelp('MBU5HELP','__condition$BU5$2');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image16','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="HELP" name="Image16" border="0" align="absmiddle"></a></td>
                <td>&nbsp;</td>
              </tr>
              <tr> 
                <td  class="columnlabel"><span swlang code="SW000057">Position</span>
                <td>&nbsp; <input name="__condition$POS$1" type="text" size="10"> &nbsp;<a href="javascript:goHelp('MPOSITIONHELP','__condition$POS$1');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image15','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="HELP" name="Image15" border="0" align="absmiddle"></a> &nbsp;-&nbsp; <input name="__condition$POS$2" type="text" size="10"> &nbsp;<a href="javascript:goHelp('MPOSITIONHELP','__condition$POS$2');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image16','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="HELP" name="Image16" border="0" align="absmiddle"></a></td>
                <td>&nbsp;</td>
              </tr>
			  	<!-- เพิ่มเงื่อนไข bas 2012-02-20 -->
			     <tr> 
                <td  class="columnlabel"><swaplang code='SW000350'></swaplang>
                <td>&nbsp; <input name="__condition$EMP$1" type="text" size="10"> &nbsp;<a href="javascript:goHelp('MEMPLOYEEHELP','__condition$EMP$1');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image15','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="HELP" name="Image15" border="0" align="absmiddle"></a> &nbsp;-&nbsp; <input name="__condition$EMP$2" type="text" size="10"> &nbsp;<a href="javascript:goHelp('MEMPLOYEEHELP','__condition$EMP$2');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image16','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="HELP" name="Image16" border="0" align="absmiddle"></a></td>
                <td>&nbsp;</td>
              </tr>
			  <!-- เพิ่มเงื่อนไข bas 2012-02-20 -->
              <tr> 
                <td  class="columnlabel"><span swlang code="SW000878">Specify Date</span> 
                <td>&nbsp; <input name="__condition$D$1" type="text" value="<%=calendar.getDDMMYYYY()%>" size="10" onkeypress = "chkIntegerOfDate(this.value)" onblur = "chkInputDate2(this,__condition$D$2)" onkeyup = "formatDate(this)">
                  &nbsp;<a href="#" onMouseOut="MM_swapImgRestore()"
					onMouseOver="MM_swapImage('calendar1','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" name="calendar1"
					border="0" align="absmiddle" onClick="viewCal('__condition$D$1')" alt="Calendar"></a> &nbsp;-&nbsp;
                  <input name="__condition$D$2" type="text" value="<%=calendar.getDDMMYYYY()%>" size="10" onkeypress = "chkIntegerOfDate(this.value)" onblur = "chkInputDate2(__condition$D$1,this)" onkeyup = "formatDate(this)">
                  &nbsp;<a href="#" onMouseOut="MM_swapImgRestore()"
					onMouseOver="MM_swapImage('calendar2','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" name="calendar2"
					border="0" align="absmiddle" onClick="viewCal('__condition$D$2')" alt="Calendar"></a></td>
                <td>&nbsp;</td>
              </tr>


            <tr>
              <td  class="buttonline" colspan="7"><div align="center">
                <button type="button" class="btn btn-primary width100" swlang code="SW013173" onClick="process();">PROCESS</button>
              </div>
              </td>
            </tr>
              <tr> 
                <td  class="blankspace" colspan="3"></td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td class="bottom" > </td>
        </tr>
      </table>
    </div>
  


<!----------BEGIN CSC ENDING ZONE ------------------------>

<%=screen.endJSP()%>

<!----------END CSC ENDING ZONE -------------------------->

</form>
</div>
</body>
</html>