WEL120_CPN.jsp 11 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
<%@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.*,com.csc.library.report.ReportUDF"  %>
<jsp:useBean id="WEL120_CPN" class="com.csc.library.system.Task" scope="page"/>
<%
	WEL120_CPN.setChannel(request ,response);
   	ProcessEntry screen=(ProcessEntry)WEL120_CPN.process("ProcessEntry","Process");
   	screen.process();
	ReportUDF rp=new ReportUDF();
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../CSS/TISCO.css" rel="stylesheet" type="text/css">
<script type='text/javascript' src='../JS/SCREEN.js'></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 type='text/javascript' src='/hr/dwr/engine.js'></script>
<script type='text/javascript' src='/hr/dwr/util.js'></script>

<script language="JavaScript" type="text/JavaScript">
<!--

function goHelp(helpName,inputName){
	var helpReturn;
	var fixcon=document.cscform.__fixCon.value;
	     document.cscform.__fixCon.value="";
		 if(inputName=="__condition$branch" ){
		 	helpReturn="__condition$branch:branchid";
		}else if(inputName=="__condition$employeeid1" ){
		 	helpReturn="__condition$employeeid1:employeeid";
		}else if(inputName=="__condition$employeeid2" ){
		 	helpReturn="__condition$employeeid2:employeeid";
		}else if(inputName=="__condition$refdoc1" ){
		 	helpReturn="__condition$refdoc1:refdoc";
		}else if(inputName=="__condition$refdoc2" ){
		 	helpReturn="__condition$refdoc2:refdoc";
		}else if(inputName=="__condition$complainid1" ){
		 	helpReturn="__condition$complainid1:complainid";
		}else if(inputName=="__condition$complainid2" ){
		 	helpReturn="__condition$complainid2:complainid";
		}else if(inputName=="__condition$welid1" ){
		 	helpReturn="__condition$welid1:welid";
		}else if(inputName=="__condition$welid2" ){
		 	helpReturn="__condition$welid2:welid";
		}

					
	     linkHelp_Return(helpName,helpReturn);
		 document.cscform.__fixCon.value=fixcon;
}


function process() {
	with(document.cscform){
		//if(__condition$approvedate1.value.length>0&&__condition$approvedate2.value.length>0&&__condition$branch.value.length>0){
		/*if(__condition$paymentdate.value.length==0){
					alert(MyCode[0]);
					__condition$paymentdate.focus();	
		}else if(__condition$branch.value.length==0){
					alert(MyCode[0]);
					__condition$branch.focus();	
		}else{				*/
			__prclass.value="ExportADVSAPCPN";
			bCon=confirm(swap2String("Export Adv To SAP")+" ?");
		    if (bCon==true)	{
					__cmd .value = "save";
					submit();
		    }
		//}		
	}
}

function Clearlist(){
	with(document.cscform){
		for(var i=0;i<elements.length;i++){
		//alert("type : "+elements[i].type+" name : "+elements[i].name);
			if(elements[i].type=="select-multiple"){
				for(var n=elements[i].length-1;n>=0;n--){
				    	if(elements[i].options[n]  != null){
							elements[i].options[n]  = null;							
						}	
				}//for
			}	//if	
		}//for
		reset();
   }//with
}//func

//-->
</script>
<script type="text/javascript" src="../JS/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="../JS/jquery/js/jquery-ui.js"></script>
<script type="text/javascript" src="../JS/jquery.blockUI.js"></script>
<link href="../JS/jquery/css/redmond/jquery-ui-1.7.1.custom.css" rel="stylesheet" type="text/css">
<script>		
			function showDate(mypicker){
				$(function() {
					$("#"+mypicker.id).datepicker({dateFormat: "dd-mm-yy",showAnim: "fadeIn",showOn: "focus",direction: 'up'});
				});
			}
			
		</script>
</head>
<body  leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif')" >
<form name="cscform" method="post" action="WEL120_CPN.jsp">


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

<%=screen.InitialVariable()%>

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

<input type="hidden" name="__screen"  value="WEL120_CPN">
	<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="นำข้อมูล Adv ออกไปยัง SAP ">
	<input type="hidden" name="__ename" value="Export Adv To SAP">
	<input type="hidden" name="__ptype" value="">
	<input type="hidden" name="__prclass" value="ExportADVSAPCPN">
	<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$employeeProcess" value='<%=screen.getUProfile().get("employeeid")%>'>
	<input type="hidden" name="__condition$employeeSelect" value="">
	<input type="hidden" name="__condition$positionSelect" value="">
	<input type="hidden" name="__condition$bu1Select" value="">
	<input type="hidden" name="__condition$bu2Select" value="">
	<input type="hidden" name="__condition$bu3Select" value="">
	<input type="hidden" name="__condition$bu4Select" value="">
	<input type="hidden" name="__condition$bu5Select" value="">
	<input type="hidden" name="__condition$prstatus" value="">
	<input type="hidden" name="__condition$branchSelect" value="">
	<input type="hidden" name="__condition$complainSelect" value="">
	<input type="hidden" name="__condition$welfareSelect" value="">
	<input type="hidden" name="__condition$budyearSelect" value="">
	<input type="hidden" name="__condition$cmdValue" value="">
	<input type="hidden" name="bu5List">
 	<br>
  	<div align="center">
    <table  cellpadding="0"  cellspacing="0" >
    <tr >
    	<td class="header"> WEL120_CPN,&nbsp;<script language="javascript">swapLang("Export Adv To SAP");</script>&nbsp;</td>
   	</tr>
	<tr>
    	<td class="blankspace"  ></td>
    </tr>	
    <tr >
    	<td colspan="3">
			<table width="100%" border="0" class="inframe">
			  <tr>
			    <td width="100%"><table  class="inframe"  border="0">
                    <tr>
                      <td class="columnlabel"><span>
                        <script language="javascript">swapLang("Approve date");</script>
                      </span></td>
                      <td><input type="text"  id="approvedate1" name="__condition$approvedate1" size="10" maxlength="8"  onClick="showDate(this);" onFocus="showDate(this);"  onMouseDown="showDate(this);"  onKeyup = "formatDate(this)"  readonly >
                          <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image121','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="Calendar" name="Image121" width="20"  border="0" align="absmiddle" id="Image12" onClick="viewCal('__condition$approvedate1')"></a> -
                        <input type="text"  id="approvedate2" name="__condition$approvedate2" size="10" maxlength="8"  onClick="showDate(this);" onFocus="showDate(this);"  onMouseDown="showDate(this);"  onKeyup = "formatDate(this)"   onBlur = "chkInputDate2(__condition$approvedate1,this)"  readonly >
                        <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image122','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="Calendar" name="Image122" width="20"  border="0" align="absmiddle" id="Image122" onClick="viewCal('__condition$approvedate2')"></a></td>
                    </tr>
                    <tr>
                      <td class="columnlabel"><script language="javascript">swapLang("Company");</script></td>
                      <td><input type="text" name="__condition$branch" value="" size="10" readonly >
                      <a href="javascript:goHelp('MBRANCHHELP','__condition$branch');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image316','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Search" name="Image316" width="20"  border="0" align="absmiddle" id="Image316"></a></td>
                    </tr>
                    <tr>
                      <td class="columnlabel"><script language="javascript">swapLang("Employee Code");</script></td>
                      <td><input type="text" name="__condition$employeeid1" value="" size="10" readonly >
                        <a href="javascript:goHelp('MEMPLOYEEHELP','__condition$employeeid1');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image311','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Search" name="Image311" width="20"  border="0" align="absmiddle" id="Image311"></a>
                      <input type="text" name="__condition$employeeid2" value="" size="10" readonly >
                      <a href="javascript:goHelp('MEMPLOYEEHELP','__condition$employeeid2');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image31','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Search" name="Image31" width="20"  border="0" align="absmiddle" id="Image31"></a></td>
                    </tr>
                    <tr>
                      <td class="columnlabel"><span>
                        <script language="javascript">swapLang("Transfer date");</script>
                      </span></td>
                      <td><input type="text"  id="paymentdate" name="__condition$paymentdate" size="10" maxlength="8"  onClick="showDate(this);" onFocus="showDate(this);"  onMouseDown="showDate(this);"  onKeyup = "formatDate(this)"  readonly >
                          <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image121','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="Calendar" name="Image121" width="20"  border="0" align="absmiddle" id="Image12" onClick="viewCal('__condition$paymentdate')"></a></td>
                    </tr>
					
                  </table></td>
		      </tr><tr>                          
            	<td class="blankspace"></td>
            </tr>   
			 <tr>
              	<td class="blankspace"  >
					<div align="center">
					<a href="javascript:process();"><img src="../IMAGES/BUTTON/PROCESS.gif" border="0"></a>
					<a href="javascript:Clearlist();"><img src="../IMAGES/BUTTON/CLEAR.gif" border="0"></a>                  </div>				</td>
            </tr>
			 <tr>
              	<td class="blankspace"  ></td>
            </tr>
          	</table> 
		</td>
    </tr>
  	<tr>
		<td  class="bottom"></td>
    </tr>
	</table>
  </div>
</form>
</body>
</html>