TA_EMV001T.jsp 5.73 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
<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@ 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.*"  %>
<%@ page import="com.csc.library.databean.Tot_plan0,com.csc.library.report.ReportUDF"  %>
<% request.setCharacterEncoding("UTF-8"); %>
<jsp:useBean id="TA_EMV001T" class="com.csc.library.system.Task" scope="page" />
<jsp:setProperty name="TA_EMV001T" property="appname" value="empview" />
<%

	TA_EMV001T.setChannel(request,response);
	UIManager screen = (UIManager) TA_EMV001T.process("MultiEntry","TA_EMV001",true);
	CheckNull chk = new CheckNull();

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- InstanceBegin template="/Templates/Template-popup.dwt.jsp" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Employee View</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- InstanceBeginEditable name="head" -->
<!-- Begin CSS Links -->
<link rel="stylesheet" type="text/css" href="../CSS/EMV_DEFAULT.css" />
<link rel="stylesheet" type="text/css" href="../CSS/EMV_LAYOUT_POPUP.css" />
<link rel="stylesheet" type="text/css" href="../CSS/EMV_TEXT.css" />
<!-- End CSS Links -->
<!-- Begin Scripts -->
<script language="JavaScript"  type="text/javascript"src="../JS/EVENTS.js"></script>
<script language="JavaScript"  type="text/javascript"src="../JS/SCREEN.js"></script>
<script language='javascript'>setLang('<%=screen.getUProfile().get("lang")%>');</script>
<script language='javascript'>
	function closePage(){
		window.close();
	}
	function genData(){
		with(document.cscform){
			var obj = document.getElementsByName("month");
			if(typeof obj!="undefined"){
				for(i=0;i<obj.length;i++){
					if(obj[i].checked){
						__lmonth.value += ","+obj[i].value;
					}
				}
			}
			if(__lmonth.value==""){
				alert("กรุณาเลือกเดือนที่ต้องการคัดลอก");
			}else{
				__gen.value = '1';
				submit();
			}
		}
	}
</script>
<!-- End Scripts -->
<!-- InstanceEndEditable --><!-- InstanceParam name="onPageLoad" type="text" value="" --><!-- InstanceParam name="FormName" type="text" value="cscform" --><!-- InstanceParam name="FormMethod" type="text" value="post" --><!-- InstanceParam name="FormAction" type="text" value="?" -->
</head>
<body onload="">
<form name="cscform" method="post"  action="TA_EMV001T.jsp">
  <!-- InstanceBeginEditable name="Form Element" -->
	<input type="hidden" name="__cmd" value="multi">
	<input type="hidden" name="__screen" value="TA_EMV001">
	<input type="hidden" name="__childMulti" value="">
	<input type="hidden" name="__multiTable" value="TOT_PLAN1">
	<input type="hidden" name="__companyid" value="<%=screen.getUProfile().get("companyid")%>">
	<input type="hidden" name="__gen" value="">
	<input type="hidden" name="__lmonth" value="">
	<input type="hidden" name="__smonth" value="<%=chk.chkNullString(request.getParameter("__smonth"))%>">
  <!-- InstanceEndEditable -->
  <div id="wrapper">
    <div id="header">
      <div class="content-header"> <!-- InstanceBeginEditable name="PageHeader" -->
        <h2 class="right">
          <script language="javascript">swapLang('OT Plan');</script>
        </h2>
        <!-- InstanceEndEditable --> </div>
    </div>
		<div id="content"> <!-- InstanceBeginEditable name="Content" -->
			<div>
			<%
				ReportUDF rf = new ReportUDF();
				String month[] = rf.getSystemCode("MONTHCODE",screen.getUProfile().get("lang"));
				if(chk.chkNullString(request.getParameter("__gen")).equals("1")){
			%>
				<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table-content-list" >
					<tr><td class="column-text-center">&nbsp;</td></tr>
					<tr>
						<td class="column-text-center">
							<script language="javascript">swapLang('Please Wait');</script>&nbsp;&nbsp;
							<script language="javascript">swapLang('For Process Reserver Detail');</script>
						</td>
					</tr>
					<tr><td class="column-text-center">&nbsp;</td></tr>
				</table>
			<%
					Tot_plan0 tot = (Tot_plan0)screen.getRecord("TOT_PLAN0");
					tot.copyOtherMonth();
			%>
				<script language="javascript">alert(MyCode[18]); closePage();</script>
			<%
				}else{
			%>
				<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table-content-list" >
					<%
						for(int i=0;i<month.length;i++){
							if(!chk.chkNullString(request.getParameter("__smonth")).equals(month[i].split(",")[0])){
					%>
					<tr>
						<td class="column-text-right" width="20%"><input type="checkbox" name="month" value="<%=month[i].split(",")[0]%>" <%=(screen.getDataLabel("TOT_PLAN","MONTH"+(month[i].split(",")[0])).equals("2"))?"disabled":""%>>&nbsp;</td>
						<td class="column-text"><%=month[i].split(",")[1]%></td>
					</tr>
					<%	
							}else{
					%>
					<tr>
						<td class="column-text-right" width="20%"><input type="checkbox" name="month" value="<%=month[i].split(",")[0]%>" disabled>&nbsp;</td>
						<td class="column-text"><%=month[i].split(",")[1]%></td>
					</tr>
					<%
							}
						}
					%>
					<tr>
						<td class="column-text-center" colspan="2">
							<a href="javascript:genData();"><img src="../IMAGES/EMPVIEW/BUTTON/SUBMIT.gif" alt="submit" name="__select_image" border="0" align="absmiddle"></a>
						</td>
					</tr>
				</table>
			<%
				}
			%>
			<script language='javascript'>//closePage();</script>
		<div>
		<!-- InstanceEndEditable --> 
	</div>
  <!-- InstanceBeginEditable name="Close_Form Element" --> <!-- InstanceEndEditable -->
</form>
</body>
<!-- InstanceEnd -->
</html>