<%@page contentType="text/html; charset=windows-874"%> <%@ page import="com.csc.library.entry.*" %> <%@ page import="com.csc.library.utilities.*,com.csc.library.session.*,com.csc.library.database.SystemCode" %> <jsp:useBean id="SET_OFF_ON" scope="page" class="com.csc.library.system.Task" /> <% SET_OFF_ON.setChannel(request,response); UIManager screen = (UIManager) SET_OFF_ON.process("SingleEntry","SET_OFF_ON"); screen.referLangOff(); String lang = screen.getUProfile().get("lang"); CheckNull chk = new CheckNull(); %> <%! private String swapLang(String tha,String eng,String lang){ if(lang.equalsIgnoreCase("tha")){ return tha; }else{ return eng; } } %> <!DOCTYPE html> <html> <head> <title></title> <meta charset="windows-874"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <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 src='../JS/SCREEN.js'></script> <script>setLang('<%=screen.getUProfile().get("lang")%>');</script> <script src="../JS/jquery-1.11.1.min.js"></script> <script src='../JS/ICONSMENU.js'></script> <script> function GoSave(){ with(document.cscform){ if(__apsid.value != ""){ setEmp($("#begin_year").prop("checked"),"begin"); setEmp($("#mid_year").prop("checked"),"mid"); setEmp($("#end_year").prop("checked"),"end"); confirmSave(); }else{ alert_err("��س����͡Ẻ�����","Please select appraisal form"); } } } function updateRecord(){ with(document.cscform){ bCon=confirm(MyCode[3]); if (bCon==true) { chkSave.value = "yes"; __confirm.value="s"; __cmd.value = "save"; submit(); } } } function setEmp(con,field){ if(con){ $("input[name='"+field+"Emp']").val($("input[name='__"+field+"_year']:checked").val()+"@"+setCondition($("#"+field+"Employee1").val(),$("#"+field+"Employee2").val())); }else{ $("input[name='"+field+"Emp']").val("@NONE"); } } function setCondition(emp1,emp2){ var result = "NONE"; if(emp1 != "" && emp2 !=""){ result = "employeeid between '"+emp1+"' and '"+emp2+"'"; }else if(emp1 != "" && emp2 == ""){ result = "employeeid = '"+emp1+"'"; }else if(emp1 == "" && emp2 != ""){ result = "employeeid = '"+emp2+"'"; } return result; } function alert_err(tha,eng){ with(document.cscform){ if(__language.value == "tha"){ alert(tha); }else{ alert(eng); } } } function goHelp(helpName,inputName){ with(document.cscform){ var helpReturn = ""; var fixCon = ""; if(inputName == "__apsid"){ helpReturn = inputName+":apsid,__astid:astid"; chkPostReturn.value = "1"; // 0 No, 1 Yes }else if(inputName.indexOf("Employee")>-1){ if($("#"+inputName.substring(0,inputName.indexOf("Em"))+"_year").prop("checked")){ fixCon = "status not in('X','Y','Z')"; helpReturn = inputName+":employeeid"; } } if(fixCon == "" && helpReturn != ""){ linkHelp_Return(helpName,helpReturn); }else if(helpReturn != ""){ helpPageCon(helpName,helpReturn,fixCon); } } } function postReturn(){ with(document.cscform){ if(chkPostReturn.value == "1"){ // 0 No, 1 Yes __help.value = "__apsid$"+__apsid.value+";__companyid$"+__companyid.value+";__astid$"+__astid.value; chkPostReturn.value = "0"; submit(); } } } $(function(){ // Start Jquery if($("#chkSave").val()){ $("chkSave").val(""); $("input[type='text']").not($("#__apsid")).val(""); } var setDisableEmp = function(field,con){ $("input[name^='"+field+"Employee']").each(function(){ $(this).prop("disabled",!con); $(this).val(""); }); } var setDisableRadio = function(field,con){ $("input[name='__"+field+"']").each(function(){ $(this).prop("disabled",con); }); } $(":checkbox").each(function(){ if(!$(this).prop("checked")){ var id=$(this).attr("id"); var con = $(this).prop("checked"); setDisableRadio(id,true); setDisableEmp(id.substring(0,id.indexOf("_")),con); } $(this).click(function(){ var id=$(this).attr("id"); var con = $(this).prop("checked"); setDisableRadio(id,!con); setDisableEmp(id.substring(0,id.indexOf("_")),con); }); }); $($("#limit")).keydown(function(e){ if (e.shiftKey) e.preventDefault(); else { var nKeyCode = e.keyCode; //Ignore Backspace and Tab keys if (nKeyCode == 8 || nKeyCode == 9) return; if (nKeyCode < 95) { if (nKeyCode < 48 || nKeyCode > 57) e.preventDefault(); } else { if (nKeyCode < 96 || nKeyCode > 105) e.preventDefault(); } } }); }); // Eng Jquery </script> <style> .left{ padding-left:30px; } </style> </head> <body> <form name="cscform" method="post" action="#"> <div id="toolTipLayer" style="position:absolute; visibility: hidden"></div> <!----------BEGIN CSC INITIAL ZONE ------------------------> <%=screen.InitialVariable()%> <!----------END CSC INITIAL ZONE --------------------------> <div align="center"> <input type="hidden" name="__screen" value="SET_OFF_ON"> <input type="hidden" name="__fixCon" value=""> <input type="hidden" name="__cmd" value=""> <input type="hidden" name="__help" value="<%=chk.chkNullString(request.getParameter("__help"))%>"> <input type="hidden" name="__user" value="<%=screen.getUProfile().getUserId()%>"> <input type="hidden" name="__companyid"value='<%=screen.getUProfile().get("companyid")%>'> <input type="hidden" name="__language" value="<%=screen.getUProfile().get("lang")%>"> <input type="hidden" name="__calendar"> <input type="hidden" name="__referPage" value=""> <input type="hidden" name="__notNull" value="<%=screen.getRequire()%>"> <input type="hidden" name="__astid" value="<%=chk.chkNullString(request.getParameter("__astid"))%>"> <input type="hidden" id="beginEmp" name="beginEmp" value="<%=chk.chkNullString(request.getParameter("beginEmp"))%>"> <input type="hidden" id="midEmp" name="midEmp" value="<%=chk.chkNullString(request.getParameter("midEmp"))%>"> <input type="hidden" id="endEmp" name="endEmp" value="<%=chk.chkNullString(request.getParameter("endEmp"))%>"> <input type="hidden" id="chkPostReturn" name="chkPostReturn" value="<%=chk.chkNullString(request.getParameter("chkPostReturn"))%>"> <table style = "border-spacing: 0;border-collapse: 0;width:70%"> <tr> <td class="header"> SET_OFF_ON ,<%=swapLang("��˹��Դ�Դ˹�Ҩ�","Set Off-On screen",lang) %> </td> </tr> <tr> <td class="blankspace" > </td> </tr> <tr> <td> <table style = "width:100%"> <tr> <td align="left" colspan = "2"><strong><%=swapLang("���ҧ��Ǣ�ͻ����Թ","Assessment Topics",lang) %></strong> </td> </tr> <tr> <td align="left" class = "left" colspan = "2"><%=swapLang("Ẻ�����","Form",lang) %> <input type = "text" id = "__apsid" name = "__apsid" size = "8" readonly value = "<%=chk.chkNullString(request.getParameter("__apsid")) %>"> <a href ="JavaScript:goHelp('TAPSTRAN0HELP','__apsid');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('emp_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" ALT="SEARCH" name="emp_image" width="20" height="20" border="0" style = "vertical-align: middle"></a> </td> </tr> <tr> <td align="left" class = "left"> <input type = "checkbox" id = "begin_year" name = "chkBeginYear" value = "beginYear" <%if(chk.chkNullString(request.getParameter("chkBeginYear")).equals("beginYear"))out.print("checked"); %>> <%=swapLang("Ẻ �鹻�","At the beginning of the year",lang) %> </td> <td align="left"> <%=screen.getInput("begin_year") %> <%=swapLang("���ʾ�ѡ�ҹ","Employee ID",lang) %> <input type = "text" id = "beginEmployee1" name = "beginEmployee1" size = "8" value = "<%=chk.chkNullString(request.getParameter("beginEmployee1")) %>"> <a href ="JavaScript:goHelp('MEMPLOYEEHELP','beginEmployee1');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('emp_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" ALT="SEARCH" name="emp_image" width="20" height="20" border="0" style = "vertical-align: middle"></a> - <input type = "text" id = "beginEmployee2" name = "beginEmployee2" size = "8" value = "<%=chk.chkNullString(request.getParameter("beginEmployee2")) %>"> <a href ="JavaScript:goHelp('MEMPLOYEEHELP','beginEmployee2');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('emp_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" ALT="SEARCH" name="emp_image" width="20" height="20" border="0" style = "vertical-align: middle"></a> </td> </tr> <tr> <td align="left" class = "left"> <input type = "checkbox" id = "mid_year" name = "chkMidYear" value = "midYear" <%if(chk.chkNullString(request.getParameter("chkMidYear")).equals("midYear"))out.print("checked"); %>> <%=swapLang("Ẻ ��ҧ��","In the midyear",lang) %> </td> <td align="left"> <%=screen.getInput("mid_year") %> <%=swapLang("���ʾ�ѡ�ҹ","Employee ID",lang) %> <input type = "text" id = "midEmployee1" name = "midEmployee1" size = "8" value = "<%=chk.chkNullString(request.getParameter("midEmployee1")) %>"> <a href ="JavaScript:goHelp('MEMPLOYEEHELP','midEmployee1');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('emp_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" ALT="SEARCH" name="emp_image" width="20" height="20" border="0" style = "vertical-align: middle"></a> - <input type = "text" id = "midEmployee2" name = "midEmployee2" size = "8" value = "<%=chk.chkNullString(request.getParameter("midEmployee2")) %>"> <a href ="JavaScript:goHelp('MEMPLOYEEHELP','midEmployee2');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('emp_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" ALT="SEARCH" name="emp_image" width="20" height="20" border="0" style = "vertical-align: middle"></a> </td> </tr> <tr> <td align="left" class = "left"> <input type = "checkbox" id = "end_year" name = "chkEndYear" value = "endYear" <%if(chk.chkNullString(request.getParameter("chkEndYear")).equals("endYear"))out.print("checked"); %>> <%=swapLang("Ẻ ���»�","End of the year",lang) %> </td> <td align="left"> <%=screen.getInput("end_year") %> <%=swapLang("���ʾ�ѡ�ҹ","Employee ID",lang) %> <input type = "text" id = "endEmployee1" name = "endEmployee1" size = "8" value = "<%=chk.chkNullString(request.getParameter("endEmployee1")) %>"> <a href ="JavaScript:goHelp('MEMPLOYEEHELP','endEmployee1');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('emp_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" ALT="SEARCH" name="emp_image" width="20" height="20" border="0" style = "vertical-align: middle"></a> - <input type = "text" id = "endEmployee2" name = "endEmployee2" size = "8" value = "<%=chk.chkNullString(request.getParameter("endEmployee2")) %>"> <a href ="JavaScript:goHelp('MEMPLOYEEHELP','endEmployee2');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('emp_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" ALT="SEARCH" name="emp_image" width="20" height="20" border="0" style = "vertical-align: middle"></a> </td> </tr> <!-- <tr><%//=chk.chkNullString(request.getParameter("status")) %> <td colspan = "2" align = "left" class = "left"><%//=screen.getLabel("limits") %> <%//=screen.getInput("limits") %> </td> </tr> --> <tr><td colspan = "2"> </td></tr> <tr> <td align = "left" colspan = "2"><%=swapLang("��ػ�Ż����Թ","Summary of evaluation results",lang) %></td> </tr> <tr> <td align = "left" class = "left"><%=screen.getLabel("summary_view") %></td> <td align = "left"> <%=screen.getInput("summary_view") %> </td> </tr> </table> <input type="hidden" id="chkSave" name="chkSave" value="<%=chk.chkNullString(request.getParameter("chkSave")) %>"> </td> </tr> <tr> <td class="blankspace"> </td> <tr> <td class="buttonline" colspan="7"><div align="center"> <button type="button" class="btn btn-primary width100" swlang code="SW013175" onClick="GoSave();">SAVE</button> </div> </td> </tr> <tr> <td class="blankspace"> </td> </tr> <tr> <td class="bottom"></td> </tr> </table> </div> <!----------BEGIN CSC ENDING ZONE ------------------------> <%=screen.endJSP()%> <!----------END CSC ENDING ZONE --------------------------> </form> </body> </html>