ERP-node/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderStatusByProjec...

124 lines
5.0 KiB
Plaintext

<%@ page isThreadSafe = "true" %>
<%@ page buffer="256kb" %>
<%@ page autoFlush = "true" %>
<%@ page contentType="application/vnd.ms-excel;charset=UTF-8" %>
<%@ page import="com.pms.common.utils.*"%>
<%@ page import="java.util.*" %>
<%
java.text.SimpleDateFormat frm= new java.text.SimpleDateFormat ("yyyy_MM_dd_HH_mm");
Calendar cal = Calendar.getInstance();
String todayKor = frm.format(cal.getTime());
String excelName = "발주관리_현황";
String encodeName = excelName+todayKor+".xls";
String fileName = java.net.URLEncoder.encode(encodeName,"UTF-8");
response.setHeader("Content-Disposition", "attachment;filename="+fileName+"");
response.setHeader("Content-Description", "JSP Generated Data");
ArrayList list = (ArrayList)request.getAttribute("LIST");
Map resultMap = (Map)request.getAttribute("resultMap");
%>
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 11">
<title><%=Constants.SYSTEM_NAME%></title>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
</script>
</head>
<body class="backcolor">
<form name="form1" action="" method="post">
<section class="min_part_search">
<div class="pdm_menu_name">
<h2>
<span>발주관리_현황</span>
</h2>
<h3>
<span style="color:red; font-weight:bold; border:none;">총발주금액(원) : <%=CommonUtils.numberFormat(CommonUtils.checkNull(resultMap.get("TOTAL_SUPPLY_UNIT_PRICE")))%></td>
</h3>
</div>
<div class="contents_page_basic_margin">
<div class="pdm_table_wrap">
<table class="pdm_table_noImg" style="text-align:center;" border="1">
<colgroup>
<col style="width: 160px;"></col>
<col style="width: 290px;"></col>
<col style="width: 290px;"></col>
<col style="width: 110px;"></col>
<col style="width: 80px;"></col>
<col style="width: 80px;"></col>
<col style="width: 80px;"></col>
<col style="width: 120px;"></col>
<col style="width: 120px;"></col>
<col style="width: 120px;"></col>
<col style="width: 120px;"></col>
<col style="width: 120px;"></col>
<col style="width: 120px;"></col>
<col style="width: 120px;"></col>
<col style="width: 120px;"></col>
<col style="width: 120px;"></col>
<col style="width: 120px;"></col>
</colgroup>
<tr class="pdm_thead" align="center" style="background:yellow; font-weight:bold;">
<td colspan="4">프로젝트정보</td>
<td colspan="8">발주현황</td>
<td colspan="2">재발주현황</td>
<td colspan="3">할인현황</td>
</tr>
<tr class="pdm_thead" align="center" style="background:yellow; font-weight:bold;">
<td>고객사</td>
<td>프로젝트명</td>
<td>유닛명</td>
<td>프로젝트번호</td>
<td>전체수량</td>
<td>발주품수</td>
<td>미발주품수</td>
<td>발주금액(계)</td>
<td>구매품</td>
<td>구매품(%)</td>
<td>제작품</td>
<td>제작품(%)</td>
<td>건수</td>
<td>금액(원)</td>
<td>할인금액</td>
<td>네고율(%)</td>
<td>총발주금액(원)</td>
</tr>
<%
if(list != null && !list.isEmpty()){
for(int i = 0 ; i < list.size() ; i++){
HashMap map = (HashMap)list.get(i);
%>
<tr>
<td align="left"><%=CommonUtils.checkNull(map.get("CUSTOMER_NAME"))%></td>
<td align="left"><%=CommonUtils.checkNull(map.get("PROJECT_NAME"))%></td>
<td align="left"><%=CommonUtils.checkNull(map.get("UNIT_PART_NAME"))%></td>
<td align="left"><%=CommonUtils.checkNull(map.get("PROJECT_NO"))%></td>
<td align="right"><%=CommonUtils.checkNull(map.get("TOTAL_BOM_PART_CNT"))%></td>
<td align="right"><%=CommonUtils.checkNull(map.get("TOTAL_PO_PART_CNT"))%></td>
<td align="right"><%=CommonUtils.checkNull(map.get("NON_PO_PART_CNT"))%></td>
<td align="right"><%=CommonUtils.checkNull(map.get("TOTAL_SUPPLY_UNIT_PRICE"))%></td>
<td align="right"><%=CommonUtils.checkNull(map.get("PRICE_PT_1"))%></td>
<td align="right"><%=CommonUtils.checkNull(map.get("RATE_PRICE_PT_1"))%></td>
<td align="right"><%=CommonUtils.checkNull(map.get("PRICE_PT_2"))%></td>
<td align="right"><%=CommonUtils.checkNull(map.get("RATE_PRICE_PT_2"))%></td>
<td align="right"><%=CommonUtils.checkNull(map.get("RE_COUNT"))%></td>
<td align="right"><%=CommonUtils.checkNull(map.get("RE_TOTAL_SUPPLY_UNIT_PRICE"))%></td>
<td align="right"><%=CommonUtils.checkNull(map.get("DISCOUNT_PRICE"))%></td>
<td align="right"><%=CommonUtils.checkNull(map.get("NEGO_RATE"))%></td>
<td align="right"><%=CommonUtils.checkNull(map.get("TOTAL_SUPPLY_PRICE"))%></td>
</tr>
<%
}
}
%>
</table>
</div>
</div>
</section>
</form>
</body>
</html>