ERP-node/WebContent/WEB-INF/view/materMgmt/surtaxInfoList.jsp

290 lines
15 KiB
Plaintext

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.pms.common.utils.*"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page import="java.util.*" %>
<%@include file= "/init.jsp" %>
<%
PersonBean person = (PersonBean)session.getAttribute(Constants.PERSON_BEAN);
String connector = person.getUserId();
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=Constants.SYSTEM_NAME%></title>
<!-- //JSTL 페이징 변수선언 -->
<c:set var="now" value="<%=new java.util.Date() %>"/>
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
<c:set var="connector" value="<%=connector %>" />
<script type="text/javascript">
$(function(){
$(document).ready(function(){
$('.select2').select2();
fnc_datepick();
$("input[type=text]").keyup(function(e){
if(e.keyCode == 13) search();
});
//image src encoding
$("img").each(function(i){
var imgSrc = $(this).attr("data-SRC");
$(this).attr("src", encodeURI(imgSrc));
});
$("#btnSearch").click(function(){
fn_search();
});
$("#btnrevSave").click(function(){
fn_SavePopup();
});
});
});
function fn_SavePopup(){
var _width = '300';
var _height = '370';
var _left = Math.ceil(( window.screen.width - _width )/2);
var _top = Math.ceil(( window.screen.width - _height )/2);
window.open("/materMgmt/surtaxInfoSave.do?actionType=regist", "", 'width=470, height=370, left=' + _left);
}
//부가세 검색
function fn_search(){
document.form1.action = "/materMgmt/surtaxInfo.do";
document.form1.submit();
}
//부가세 상세
function fn_surtaxDetail(year,month,projectno){
window.open("/materMgmt/surtaxDetail.do?Date="+year+month+"&projectno="+projectno, "", "width=1200, height=500","menubars=no, scrollbars=yes, resizable=yes");
}
</script>
</head>
<body class="backcolor">
<form name="form1" id="form1" method="post">
<div class="content-box">
<div class="content-box-s">
<div class="plm_menu_name">
<h2>
<span>원가관리_부가세 현황</span>
</h2>
</div>
<div id="plmSearchZon">
<table>
<tbody>
<tr>
<td><label for="Year">연도</label></td>
<td>
<select name="Year" id="Year" class='select2'>
<option value="">선택</option>
<c:forEach begin="${sysYear-4}" end="${sysYear}" var="req_year">
<option value="${req_year}"${param.Year eq req_year ? 'selected':'' }>${req_year}</option>
</c:forEach>
</select>
</td>
<td class="align_r">
<label for="" class="">Project No.</label>
</td>
<td>
<select name="projectno" id="projectno" class='select2' style="width:200px;">
<option value="">전체</option>
${code_map.projectno}
</select>
</td>
<td><label for="customer_cd">고객사</label></td>
<td>
<select name="customer_cd" id="customer_cd" style="" class='select2'>
<option value="">선택</option>
${code_map.customer_cd}
</select>
</td>
<%--
<td><label for="search_fromDate">Date</label></td>
<td colspan="">
<input type="text" id="search_fromDate" name="search_fromDate" class="date_icon" value="${param.search_fromDate}" style="width:80px !important;">
~ <input type="text" id="search_toDate" name="search_toDate" class="date_icon" value="${param.search_toDate}" style="width:80px !important;">
</td> --%>
</tr>
</tbody>
</table>
</div>
<section class="contents_page_basic_margin">
<div class="btn_wrap">
<div class="plm_btn_wrap">
<input type="button" value="매출입력" class="plm_btns" id="btnrevSave">
<input type="button" value="조회" class="plm_btns" id="btnSearch">
</div>
</div>
<div class="plm_table_wrap">
<div>
<table class="plm_table">
<colgroup>
<!-- <col width="2%" /> -->
<col width="4%" />
<col width="10%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
</colgroup>
<thead>
<tr class="plm_thead">
<!-- <td><input type="checkbox" id="allCheck" class="checkBox"></td> -->
<td colspan="2"></td>
<td>1월</td>
<td>2월</td>
<td>3월</td>
<td>분기마감합계</td>
<td>4월</td>
<td>5월</td>
<td>6월</td>
<td>분기마감합계</td>
<td>7월</td>
<td>8월</td>
<td>9월</td>
<td>분기마감합계</td>
<td>10월</td>
<td>11월</td>
<td>12월</td>
<td>분기마감합계</td>
<td>total</td>
</tr>
</thead>
<c:choose>
<c:when test="${empty LIST}">
<tr style="text-align:center;">
<td align="center" colspan="11">조회된 데이터가 없습니다.</td>
</tr>
</c:when>
<c:otherwise>
<c:forEach var="item" items="${LIST}" varStatus="status">
<tr>
<c:if test="${status.index == 0}">
<td rowspan="3" title="${item.NAME}">${item.NAME}</td>
<td title="${item.NAME1}">${item.NAME1}</td>
<td align="right" style="text-decoration:underline;" title="${item.MON1}"><a href="#" onclick="javascript:fn_surtaxDetail('${param.Year}','01','${param.projectno}')"><fmt:formatNumber value="${item.MON1}" pattern="#,###" type="number" /></a></td>
<td align="right" style="text-decoration:underline;" title="${item.MON2}"><a href="#" onclick="javascript:fn_surtaxDetail('${param.Year}','02','${param.projectno}')"><fmt:formatNumber value="${item.MON2}" pattern="#,###" type="number" /></a></td>
<td align="right" style="text-decoration:underline;" title="${item.MON3}"><a href="#" onclick="javascript:fn_surtaxDetail('${param.Year}','03','${param.projectno}')"><fmt:formatNumber value="${item.MON3}" pattern="#,###" type="number" /></a></td>
<td align="right" title="${item.SUM1}"><fmt:formatNumber value="${item.SUM1}" pattern="#,###" type="number" /></td>
<td align="right" style="text-decoration:underline;" title="${item.MON4}"><a href="#" onclick="javascript:fn_surtaxDetail('${param.Year}','04','${param.projectno}')"><fmt:formatNumber value="${item.MON4}" pattern="#,###" type="number" /></a></td>
<td align="right" style="text-decoration:underline;" title="${item.MON5}"><a href="#" onclick="javascript:fn_surtaxDetail('${param.Year}','05','${param.projectno}')"><fmt:formatNumber value="${item.MON5}" pattern="#,###" type="number" /></a></td>
<td align="right" style="text-decoration:underline;" title="${item.MON6}"><a href="#" onclick="javascript:fn_surtaxDetail('${param.Year}','06','${param.projectno}')"><fmt:formatNumber value="${item.MON6}" pattern="#,###" type="number" /></a></td>
<td align="right" title="${item.SUM2}"><fmt:formatNumber value="${item.SUM2}" pattern="#,###" type="number" /></td>
<td align="right" style="text-decoration:underline;" title="${item.MON7}"><a href="#" onclick="javascript:fn_surtaxDetail('${param.Year}','07','${param.projectno}')"><fmt:formatNumber value="${item.MON7}" pattern="#,###" type="number" /></a></td>
<td align="right" style="text-decoration:underline;" title="${item.MON8}"><a href="#" onclick="javascript:fn_surtaxDetail('${param.Year}','08','${param.projectno}')"><fmt:formatNumber value="${item.MON8}" pattern="#,###" type="number" /></a></td>
<td align="right" style="text-decoration:underline;" title="${item.MON9}"><a href="#" onclick="javascript:fn_surtaxDetail('${param.Year}','09','${param.projectno}')"><fmt:formatNumber value="${item.MON9}" pattern="#,###" type="number" /></a></td>
<td align="right" title="${item.SUM3}"><fmt:formatNumber value="${item.SUM3}" pattern="#,###" type="number" /></td>
<td align="right" style="text-decoration:underline;" title="${item.MON10}"><a href="#" onclick="javascript:fn_surtaxDetail('${param.Year}','10','${param.projectno}')"><fmt:formatNumber value="${item.MON10}" pattern="#,###" type="number" /></a></td>
<td align="right" style="text-decoration:underline;" title="${item.MON11}"><a href="#" onclick="javascript:fn_surtaxDetail('${param.Year}','11','${param.projectno}')"><fmt:formatNumber value="${item.MON11}" pattern="#,###" type="number" /></a></td>
<td align="right" style="text-decoration:underline;" title="${item.MON12}"><a href="#" onclick="javascript:fn_surtaxDetail('${param.Year}','12','${param.projectno}')"><fmt:formatNumber value="${item.MON12}" pattern="#,###" type="number" /></a></td>
<td align="right" title="${item.SUM4}"><fmt:formatNumber value="${item.SUM4}" pattern="#,###" type="number" /></td>
<td align="right" title="${item.TOTAL}"><fmt:formatNumber value="${item.TOTAL}" pattern="#,###" type="number" /></td>
</c:if>
<c:if test="${status.index > 0}">
<c:if test="${status.index < 7}">
<c:if test="${status.index == 1 or status.index == 2 or status.index == 4 or status.index == 5}">
<td title="${item.NAME1}">${item.NAME1}</td>
</c:if>
<c:if test="${status.index == 3}">
<td rowspan="3" title="${item.NAME}"> ${item.NAME}</td>
<td title="${item.NAME1}">${item.NAME1}</td>
</c:if>
<c:if test="${status.index == 6}">
<td title="${item.NAME}"> ${item.NAME}</td>
<td title="${item.NAME1}">세액기준<br>(매출-매입)</td>
</c:if>
<td align="right" title="${item.MON1}"><fmt:formatNumber value="${item.MON1}" pattern="#,###" type="number" /></td>
<td align="right" title="${item.MON2}"><fmt:formatNumber value="${item.MON2}" pattern="#,###" type="number" /></td>
<td align="right" title="${item.MON3}"><fmt:formatNumber value="${item.MON3}" pattern="#,###" type="number" /></td>
<td align="right" title="${item.SUM1}"><fmt:formatNumber value="${item.SUM1}" pattern="#,###" type="number" /></td>
<td align="right" title="${item.MON4}"><fmt:formatNumber value="${item.MON4}" pattern="#,###" type="number" /></td>
<td align="right" title="${item.MON5}"><fmt:formatNumber value="${item.MON5}" pattern="#,###" type="number" /></td>
<td align="right" title="${item.MON6}"><fmt:formatNumber value="${item.MON6}" pattern="#,###" type="number" /></td>
<td align="right" title="${item.SUM2}"><fmt:formatNumber value="${item.SUM2}" pattern="#,###" type="number" /></td>
<td align="right" title="${item.MON7}"><fmt:formatNumber value="${item.MON7}" pattern="#,###" type="number" /></td>
<td align="right" title="${item.MON8}"><fmt:formatNumber value="${item.MON8}" pattern="#,###" type="number" /></td>
<td align="right" title="${item.MON9}"><fmt:formatNumber value="${item.MON9}" pattern="#,###" type="number" /></td>
<td align="right" title="${item.SUM3}"><fmt:formatNumber value="${item.SUM3}" pattern="#,###" type="number" /></td>
<td align="right" title="${item.MON10}"><fmt:formatNumber value="${item.MON10}" pattern="#,###" type="number" /></td>
<td align="right" title="${item.MON11}"><fmt:formatNumber value="${item.MON11}" pattern="#,###" type="number" /></td>
<td align="right" title="${item.MON12}"><fmt:formatNumber value="${item.MON12}" pattern="#,###" type="number" /></td>
<td align="right" title="${item.SUM4}"><fmt:formatNumber value="${item.SUM4}" pattern="#,###" type="number" /></td>
<td align="right" title="${item.TOTAL}"><fmt:formatNumber value="${item.TOTAL}" pattern="#,###" type="number" /></td>
</c:if>
</c:if>
<c:if test="${status.index > 0}">
<c:if test="${status.index > 6}">
<td title="${item.NAME}"> ${item.NAME}</td>
<td title="공급가액기준(매출-매입)/매출">공급가액기준<br>(매출-매입)/매출</td>
<td align="right" title="${item.MON1}"><fmt:formatNumber value="${item.MON1}" pattern="0.0"/>${empty item.MON1 ? '':'%'}</td>
<td align="right" title="${item.MON2}"><fmt:formatNumber value="${item.MON2}" pattern="0.0"/>${empty item.MON2 ? '':'%'}</td>
<td align="right" title="${item.MON3}"><fmt:formatNumber value="${item.MON3}" pattern="0.0"/>${empty item.MON3 ? '':'%'}</td>
<td align="right" title="${item.SUM1}"><fmt:formatNumber value="${item.SUM1}" pattern="0.0"/>${empty item.SUM1 ? '':'%'}</td>
<td align="right" title="${item.MON4}"><fmt:formatNumber value="${item.MON4}" pattern="0.0"/>${empty item.MON4 ? '':'%'}</td>
<td align="right" title="${item.MON5}"><fmt:formatNumber value="${item.MON5}" pattern="0.0"/>${empty item.MON5 ? '':'%'}</td>
<td align="right" title="${item.MON6}"><fmt:formatNumber value="${item.MON6}" pattern="0.0"/>${empty item.MON6 ? '':'%'}</td>
<td align="right" title="${item.SUM2}"><fmt:formatNumber value="${item.SUM2}" pattern="0.0"/>${empty item.SUM2 ? '':'%'}</td>
<td align="right" title="${item.MON7}"><fmt:formatNumber value="${item.MON7}" pattern="0.0"/>${empty item.MON7 ? '':'%'}</td>
<td align="right" title="${item.MON8}"><fmt:formatNumber value="${item.MON8}" pattern="0.0"/>${empty item.MON8 ? '':'%'}</td>
<td align="right" title="${item.MON9}"><fmt:formatNumber value="${item.MON9}" pattern="0.0"/>${empty item.MON9 ? '':'%'}</td>
<td align="right" title="${item.SUM3}"><fmt:formatNumber value="${item.SUM3}" pattern="0.0"/>${empty item.SUM3 ? '':'%'}</td>
<td align="right" title="${item.MON10}"><fmt:formatNumber value="${item.MON10}" pattern="0.0"/>${empty item.MON10 ? '':'%'} </td>
<td align="right" title="${item.MON11}"><fmt:formatNumber value="${item.MON11}" pattern="0.0"/>${empty item.MON11 ? '':'%'} </td>
<td align="right" title="${item.MON12}"><fmt:formatNumber value="${item.MON12}" pattern="0.0"/>${empty item.MON12 ? '':'%'} </td>
<td align="right" title="${item.SUM4}"><fmt:formatNumber value="${item.SUM4}" pattern="0.0" />${empty item.SUM4 ? '':'%'}</td>
<td align="right" title="${item.TOTAL}"><fmt:formatNumber value="${item.TOTAL}" pattern="0.0" />${empty item.TOTAL ? '':'%'}</td>
</c:if>
</c:if>
</tr>
</c:forEach>
</c:otherwise>
</c:choose>
</table>
</div>
</div>
</section>
</div>
</div>
</form>
</body>
</html>