WEL325.jsp 11.4 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
<%@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="WEL325" class="com.csc.library.system.Task" scope="page" />
<%
	WEL325.setChannel(request, response);
	HelpEntry screen = (HelpEntry) WEL325.process("HelpEntry","WEL325");
	CheckNull chk=new CheckNull();
	ThaiUtilities thail = new ThaiUtilities();
	String condition=thail.ASCII2Unicode(chk.chkNullString(request.getParameter("__fixCon")));  
	String conditionemp=thail.ASCII2Unicode(chk.chkNullString(request.getParameter("__fixConEmp")));  
	String emp1=thail.ASCII2Unicode(chk.chkNullString(request.getParameter("__employeeid1")));  
	String emp2=thail.ASCII2Unicode(chk.chkNullString(request.getParameter("__employeeid2")));  
	String startdate=thail.ASCII2Unicode(chk.chkNullString(request.getParameter("__startdate")));  
	String enddate=thail.ASCII2Unicode(chk.chkNullString(request.getParameter("__enddate")));  
	CscCalendar cs=new CscCalendar();
	screen.getInquiry().setFilter("status='0'");
	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">
<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 type='text/javascript' src="../JS/ICONSMENU.js"></script>
<script language='javascript' src="../JS/HOTKEY.js"></script>
<script src="../JS/VIEWCALENDAR.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=checkConditionDate(filterheal,__startdate,__enddate,"approvedate");
						__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 checkConditionDate(filcon,objname1,objname2,targetname){
	with(document.cscform){
			if(objname1.value.length>0&&objname2.value.length>0){
			 			filcon=checkFilter(filcon);
						filcon+= "("+targetname+" between '"+chkDateTime1(objname1.value)+"' and '"+chkDateTime1(objname2.value)+"')";
			}else if(objname1.value.length>0){
			 			filcon+=checkFilter(filcon);
						filcon+= targetname+"='"+chkDateTime1(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";
	     linkHelp_Return(helpName,helpReturn);
		 document.cscform.__fixCon.value=fixcon;
}

function GoClean()
{
			with(document.cscform)
			{	
				__employeeid1.value="";
				__employeeid2.value="";
				__startdate.value=""; 
					__enddate.value="";
			}
}


//-->
</script>

<style type="text/css">
<!--
.style1 {font-size: 12px}
-->
</style>
</head>
<body onLoad="MM_preloadImages('../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif')" >
<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
<script language="javascript">initToolTips();</script>
<form name="cscform" method="post" action="WEL325.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="WEL325">
   <input type="hidden" name="__webid">
    <input type="hidden" name="__readposter">
  <script language="javascript">getInputFormatDate();</script>
	<input type="hidden" name="__employeeid" value="">
	<input type="hidden" name="__docno" value="">
	<input type="hidden" name="__formulaid" value="">
	<input name="__fixCon" type="hidden" value="<%=condition%>">
	<input name="__fixConEmp" type="hidden" value="<%=conditionemp%>">
	<input type="hidden" name="__orderBy" value="<%=request.getParameter("__orderBy")%>">
  	<input type="hidden" name="__companyid"  value="<%=screen.getUProfile().get("companyid")%>">
	<input name="__complainid" type="hidden" value="">

    <script language="JavaScript" src="../JS/HOTKEY.js"></script>
          <script language="javascript">
	 var titlename=swap2String('Check requisition of healthy');
	 //document.write(Icons("WEL325,"+titlename));
	 </script>

	<br> <div align="center">
 <table cellpadding="0" cellspacing="0" class="largest">
      <tr >
        <td colspan="2" class="header" >WEL325, <script language="javascript">swapLang(titlename);</script>&nbsp;</td>
      </tr>
      <tr >
        <td ><table class="maxsize" border="0" align="center" cellpadding="0" cellspacing="1">
          <tr>
            <td colspan="12" class="blankspace">
              <table width="638" border="0" align="center" cellpadding="0" cellspacing="1" class="inframe">
                <tr>
                  <td colspan="2" class="blankspace"> </td>
                </tr>
                <tr>
                  <td width="232" class="columnlabel"><script language="javascript">swapLang('Employeeid');</script>&nbsp;</td>
                  <td width="980">
                    <input name="__employeeid1" type="text" size="15" value="<%=emp1%>">
                    <a href="javascript:goHelp('MEMPLOYEEHELP','__employeeid1');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image3','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Search" name="Image3" width="20"  border="0" align="absmiddle"></a> -
                    <input name="__employeeid2" type="text" size="15" value="<%=emp2%>">
                    <a href="javascript:goHelp('MEMPLOYEEHELP','__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"><%=screen.getLabel("approvedate")%>&nbsp;</td>
                  <td><input name="__startdate" type="text" size="15" value="<%=startdate%>" onKeyPress="chkIntegerOfDate(this.value);" onKeyUp="formatDate(this);sysIsEdit();" dir="" onBlur="chkInputDate(this);" onFocus="this.select();" >
                    <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image11','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)" onClick="viewCal('__startdate');"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="Calendar" name="Image11" width="20" height="20" border="0" align="absmiddle"></a><a href="javascript:goHelp('MBU1HELP','__bu11');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('999','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"></a> -
                    <input name="__enddate" type="text" size="15" value="<%=enddate%>" onKeyPress="chkIntegerOfDate(this.value);" onKeyUp="formatDate(this);sysIsEdit();" dir="" onBlur="chkInputDate(this);" onFocus="this.select();" >
                    <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('999','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)" onClick="viewCal('__enddate');"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="Calendar" name="Image11" width="20" height="20" border="0" align="absmiddle"></a><a href="javascript:goHelp('MBU1HELP','__bu12');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image311','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"></a></td>
                </tr>
                <tr>
                  <td class="columnlabel_baseline">&nbsp;</td>
                  <td>
										<button type="button" class="btn btn-primary width100" swlang code="SW013168" onClick="GoSearch();">SEARCH</button></td>
                </tr>
                <tr>
                  <td colspan="2" class="columnlabel_baseline2"></td>
                </tr>
              </table>
              <br>
                  <div align="right" class="style1"><%=screen.getPageTag()%></div>
<table width="638" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#808080" class="inframe tablewithborder">
					  <tr class="title1">
						<td width="11%" nowrap class="row3"><div align="center"><%=screen.getLabel("employeeid")%></div></td>
						<td width="8%" nowrap class="row3"><div align="center"><%=screen.getLabel("memberid")%></div></td>
						<td width="51%" nowrap class="row3"><div align="center"><%=screen.getLabel("memployee","fullname")%></div></td>
						<td width="11%" nowrap class="row3"><div align="center"><%=screen.getLabel("cost")%></div></td>
						<td width="11%" nowrap class="row3"><div align="center"><%=screen.getLabel("curedate")%></div></td>
						<td width="11%" nowrap class="row3"><div align="center"><script language="javascript">swapLang("Disapprove date");</script></td>
						<td width="11%" nowrap class="row3"><div align="center"><%=screen.getLabel("msitewel","sitewelid")%></div></td>					
					  </tr>
          <%
		  String fullname="";
		   while (screen.nextRec()) {
			if(screen.checkLinePage()){
			fullname="";
	%>
          <tr>
						<td ><%=screen.getString("employeeid")%></td>
						<td ><%=screen.getString("memberid")%></td>
						<td ><%
						               fullname=screen.getString("mempl_family","fullname");
						           if(!screen.getString("employeeid").equals(screen.getString("memberid")))
									 		out.println(fullname);
											else
												out.println(screen.getString("memployee","fullname"));
						%></td>
						<td nowrap ><%=screen.getString("cost")%></td>
						<td nowrap ><%=screen.getString("curedate")%></td>
						<td nowrap ><%=screen.getString("approvedate")%></td>
						<td ><%=screen.getString("msitewel","tdesc")%></td>			
			</tr>
          <% 
					 }
					 if(screen.outLinePage()){ break; }	 
	 }
	 %>

          <tr>
            <td colspan="12" class="bottom"></td>
          </tr>
        </table>
</form>
</body>
</html>