WEL338.jsp 8.89 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
<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.*,com.csc.library.session.*,com.csc.library.report.*;"%>
<jsp:useBean id="WEL338" class="com.csc.library.system.Task" scope="page" />
<%
	WEL338.setChannel(request, response);
	HelpEntry screen = (HelpEntry) WEL338.process("HelpEntry","WEL338");
	CheckNull chk=new CheckNull();
	ThaiUtilities thail = new ThaiUtilities();
	String condition=thail.ASCII2Unicode(chk.chkNullString(request.getParameter("__fixCon")));  
	String years=thail.ASCII2Unicode(chk.chkNullString(request.getParameter("__years")));  
	String uniformid=thail.ASCII2Unicode(chk.chkNullString(request.getParameter("__uniformid")));  
	String uniformgid=thail.ASCII2Unicode(chk.chkNullString(request.getParameter("__uniformgid")));  
	String uniformtid=thail.ASCII2Unicode(chk.chkNullString(request.getParameter("__uniformtid"),""));  
	String employeeid=thail.ASCII2Unicode(chk.chkNullString(request.getParameter("__employeeid")));  
	String docno=thail.ASCII2Unicode(chk.chkNullString(request.getParameter("__docno")));  

	DbInquiry dbi=(DbInquiry)screen.getInquiry();
	dbi.clearSubFilter();
	dbi.setFilter("employeeid='"+employeeid+"'");
	dbi.setFilter("years",years,"","between");
	dbi.setFilter("uniformid",uniformid,"","between");
	dbi.setFilter("uniformgid",uniformgid,"","between");
   dbi.setFilter("uniformtid",uniformtid,"","between");
	CscCalendar cs=new CscCalendar();
	screen.process();
%>
<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  language="JavaScript" src="../JS/SCREEN.js"></script>
<script type='text/javascript' src="../JS/ICONSMENU.js"></script>
<script language='javascript' src="../JS/HOTKEY.js"></script>
<script language='javascript'>setLang('<%=screen.getUProfile().get("lang")%>');</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function GoSearch()
{
			//var filteremp="";
			//var filterheal="";
			with(document.cscform)
			{	
						/*
						filterheal=checkCondition("",__employeeid1,__employeeid2,"employeeid");
						filterheal+=checkCondition(filterheal,__years1,__years2,"years");
						filteremp=checkCondition("",__bu11,__bu12,"bu1");
						filteremp+=checkCondition(filteremp,__bu21,__bu22,"bu2");
						filteremp+=checkCondition(filteremp,__bu31,__bu32,"bu3");
						filteremp+=checkCondition(filteremp,__position1,__position2,"emp_position");
						__fixConEmp.value=filteremp;
						__fixCon.value=filterheal;
						*/
						search();
			}
}

function checkFilter(fil){
		if(fil.length>0)
		     fil+=" and ";
			 return fil;
}

function checkCondition(filcon,objname1,objname2,targetname){
	with(document.cscform){
			if(objname1.value.length>0&&objname2.value.length>0){
			 			filcon+=checkFilter(filcon);
						filcon+= "("+targetname+" between '"+objname1.value+"' and '"+objname2.value+"')";
			}else if(objname1.value.length>0){
			 			filcon+=checkFilter(filcon);
						filcon+= targetname+"='"+objname1.value+"'";
			}
			return filcon;
	}
}

function GoSave() {}
function GoDelete(){ }
function GoUpdate(){}


function goHelp(helpName,inputName){
	var helpReturn;
	var fixcon=document.cscform.__fixCon.value;
	document.cscform.__fixCon.value="";
		 if(inputName=="__employeeid1" )
		 	helpReturn="__employeeid1:EMPLOYEEID,MEMPLOYEE@EMPLOYEEID";
		else 		if(inputName=="__employeeid2" )
		 	helpReturn="__employeeid2:EMPLOYEEID,MEMPLOYEE@EMPLOYEEID";
		else if(inputName=="__bu11" )
		 	helpReturn="__bu11:bu1id";
		else if(inputName=="__bu12" )
		 	helpReturn="__bu12:bu1id";
		else if(inputName=="__bu21" )
		 	helpReturn="__bu21:bu2id";
		else if(inputName=="__bu22" )
		 	helpReturn="__bu22:bu2id";
		else if(inputName=="__bu31" )
		 	helpReturn="__bu31:bu3id";
		else if(inputName=="__bu32" )
		 	helpReturn="__bu32:bu3id";
		else if(inputName=="__position1" )
		 	helpReturn="__position1:positionid";
		else if(inputName=="__position2" )
		 	helpReturn="__position2:positionid";				
	     linkHelp_Return(helpName,helpReturn);
		 document.cscform.__fixCon.value=fixcon;
}

function GoPages(pages,employeeid,years,uniformid,uniformgid){
		with(document.cscform){
				__employeeid.value=employeeid;
				__years.value=years;
				__uniformid.value=uniformid;
				__uniformgid.value=uniformgid;
				action=pages;
				submit();
		}
}
//-->
</script>

</head>
<body >
<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
<script language="javascript">initToolTips();</script>
<form name="cscform" method="post" action="WEL338.jsp">


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

<%=screen.InitialVariable()%>

<!----------END CSC INITIAL ZONE -------------------------->
	<input type="hidden" name="__cmd" value="">
	<input type="hidden" name="__help" value="">
	<input type="hidden" name="__goPage" value="">
	<input  type="hidden" name="__notNull" value="<%//=screen.getRequire()%>">
	<input type="hidden" name="__helpReturn" value="">
	<input type="hidden" name="__helpName" value="">
	<input type="hidden" name="__pageCall" value="">
	<input type="hidden" name="__referPage" value="">
	<input  type="hidden" name="__language" value="<%=screen.getUProfile().get("lang")%>">
	<input type="hidden" name="__lockPage" value="">
  <input type="hidden" name="__calendar">
   <input type="hidden" name="__screen" value="WEL338">
  <script language="javascript">getInputFormatDate();</script>
	<input type="hidden" name="__employeeid" value="<%=employeeid%>">
	<input type="hidden" name="__docno" value="<%=docno%>">
	<input type="hidden" name="__years" value="<%=years%>">
	<input type="hidden" name="__uniformid" value="<%=uniformid%>">
	<input type="hidden" name="__uniformgid" value="<%=uniformgid%>">
	<input name="__fixCon" type="hidden" value="<%=condition%>">
	<input type="hidden" name="__orderBy" value="<%=request.getParameter("__orderBy")%>">
  	<input type="hidden" name="__companyid"  value="<%=screen.getUProfile().get("companyid")%>">

    <script language="JavaScript" src="../JS/HOTKEY.js"></script>
          <script language="javascript">
	 var titlename=swap2String('Request uniform');
	 //document.write(Icons("WEL338,"+titlename));
	 </script>

	<br> <div align="center">
 <table cellpadding="0" cellspacing="0" class="largest">
      <tr >
        <td colspan="2" class="header" >WEL338, <script language="javascript">swapLang(titlename);</script>&nbsp;</td>
      </tr>
      <tr >
        <td ><div align="right"><%=screen.getPageTag()%></div>
            <table width="638" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#808080" class="inframe">
					  <tr class="title1">
						<td width="8%" nowrap class="row3"><div align="center"><%=screen.getLabel("years")%></div>						</td>
						<td width="19%" nowrap class="row3"><div align="center"><%=screen.getLabel("docno")%></div></td>
						<td width="32%" nowrap class="row3"><div align="center"><%=screen.getLabel("uniformid")%></div></td>
						<td width="19%" nowrap class="row3"><div align="center"><%=screen.getLabel("reqdate")%></div></td>
						<td width="19%" nowrap class="row3"><div align="center"><%=screen.getLabel("uniformsize")%></div></td>
						<td width="19%" nowrap class="row3"><div align="center"><%=screen.getLabel("qtyreq")%></div></td>
					  </tr>
          <%
		  String emp="";
		   while (screen.nextRec()) {
			if(screen.checkLinePage()){
			if(!emp.equals(screen.getString("employeeid"))){
			%>
          <tr>
				<td height="23" colspan="8"  class="row4"><%=screen.getString("employeeid")%>&nbsp;<%=screen.getString("memployee","fullname")%></td>
			  </tr>			
			<%
			emp=screen.getString("employeeid");
			}
	%>
          <tr>
				<td class="writeback" ><%=screen.getString("years")%></td>
				<td class="writeback" align="right"><%=screen.getString("docno")%>&nbsp;</td>		  
				<td class="writeback" ><%=screen.getString("uniformid")%>-<%=screen.getString("muniform","tdesc")%></td>
				<td  class="writeback" nowrap><%=screen.getString("reqdate")%>&nbsp;</td>		  
				<td class="writeback"  nowrap><%=screen.getString("uniformsize")%>&nbsp;</td>		  
				<td class="writeback" align="right"><%=screen.getString("qtyreq")%>&nbsp;</td>		  
          </tr>
          <% 
					 }
					 if(screen.outLinePage()){ break; }	 
	 }
	 %>
		  <tr>
            <td colspan="12" class="blankspace" align="right"><a href="WEL336.jsp?__employeeid1=<%=chk.chkNullString(request.getParameter("__employeeid1"),"")%>&__employeeid2=<%=chk.chkNullString(request.getParameter("__employeeid2"),"")%>&__years1=<%=chk.chkNullString(request.getParameter("__years1"),"")%>&__years2=<%=chk.chkNullString(request.getParameter("__years2"),"")%>"><img src="../IMAGES/BUTTON/BACK.gif" width="73" height="23" border="0"></a></td>
          </tr>
          <tr>
            <td colspan="12"></td>
          </tr>
        </table>
	</td>
	</tr>
	  <tr>
            <td  class="bottom"></td>
          </tr>
    </table>
	</div>
</form>
</body>
</html>