250 lines
9.9 KiB
Plaintext
250 lines
9.9 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" %>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
<c:set var="totalCount" value="${empty TOTAL_COUNT?0:TOTAL_COUNT}" />
|
|
<c:set var="maxPage" value="${empty MAX_PAGE_SIZE?1:MAX_PAGE_SIZE}" />
|
|
<c:set var="nPage" value="${empty param.page?1:param.page}" />
|
|
<c:set var="pageIndex" value="${(nPage-1)/10}" />
|
|
<c:set var="nextPage" value="${empty NEXT_PAGE?1:NEXT_PAGE}" />
|
|
<c:set var="prevPage" value="${empty PREV_PAGE?1:PREV_PAGE}" />
|
|
<c:set var="now" value="<%=new java.util.Date() %>"/>
|
|
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
|
|
|
|
<script>
|
|
$(document).ready(function(){
|
|
|
|
//fnc_calculateContentHeight("gridDiv", 10);
|
|
setTimeout(() => fnc_calculateContentHeight("gridDiv", 15), 50);
|
|
$("#gridDiv").off("fnc_calculateContentHeight");
|
|
$(window).resize(function() {
|
|
fnc_calculateContentHeight("gridDiv", 15);
|
|
});
|
|
|
|
$('.select2').select2();
|
|
|
|
$("#btnSearch").click(function(){
|
|
fn_search();
|
|
});
|
|
|
|
//엔터 조회
|
|
$("input").keyup(function(e){
|
|
if(e.keyCode == 13){
|
|
$("#page").val("1");
|
|
fn_search();
|
|
}
|
|
});
|
|
$("#btnExcel").click(function() {
|
|
fn_excel();
|
|
});
|
|
//체크박스 전체선택/전체해제
|
|
$("#allCheck").click(function(){
|
|
if($("#allCheck").prop("checked")) {
|
|
$("input[type=checkbox]").prop("checked",true);
|
|
} else {
|
|
$("input[type=checkbox]").prop("checked",false);
|
|
}
|
|
});
|
|
|
|
fn_search();
|
|
});
|
|
|
|
var columns = [
|
|
{title:'OBJID', field:'OBJID' ,visible: false},
|
|
|
|
{title:"파트정보", headerHozAlign:'center', //고객정보
|
|
columns:[
|
|
{headerHozAlign : 'center', hozAlign : 'left', width : '200', title : '품번 (자재코드)', field : 'PART_NO' },
|
|
{headerHozAlign : 'center', hozAlign : 'left', width : '200', title : '품명', field : 'PART_NAME' },
|
|
{headerHozAlign : 'center', hozAlign : 'left', width : '150', title : 'Maker', field : 'MAKER' },
|
|
{headerHozAlign : 'center', hozAlign : 'left', width : '150', title : '규격', field : 'SPEC' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : 'Revision', field : 'REVISION' }
|
|
],
|
|
},
|
|
{title:"발주현황", headerHozAlign:'center', //고객정보
|
|
columns:[
|
|
{headerHozAlign : 'center', hozAlign : 'right', width : '150', title : '발주수', field : 'PURCHASE_ORDER_MASTER_CNT',
|
|
formatter:fnc_createGridAnchorTagAndComma,
|
|
cellClick:function(e, cell){
|
|
var objId = fnc_checkNull(cell.getData().OBJID);
|
|
//var parent_objId = fnc_checkNull(cell.getData().BOM_REPORT_OBJID);
|
|
fn_purchaseOrderQTYFormPopup(objId);
|
|
}
|
|
},
|
|
{headerHozAlign : 'center', hozAlign : 'right', width : '150', title : '발주수량', field : 'TOTAL_PURCHASE_ORDER_CNT' ,
|
|
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false }
|
|
},
|
|
{headerHozAlign : 'center', hozAlign : 'right', width : '150', title : '보유수량', field : 'STOCK_CNT' ,
|
|
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false }
|
|
}
|
|
],
|
|
},
|
|
{title:"설계현황 (진행중)", headerHozAlign:'center',
|
|
columns:[
|
|
{headerHozAlign : 'center', hozAlign : 'right', width : '150', title : '설계수량', field : 'DESIGN_CNT' ,
|
|
formatter:fnc_createGridAnchorTagAndComma,
|
|
cellClick:function(e, cell){
|
|
var objId = fnc_checkNull(cell.getData().OBJID);
|
|
//var parent_objId = fnc_checkNull(cell.getData().BOM_REPORT_OBJID);
|
|
fn_designQTYFormPopup(objId);
|
|
}
|
|
},
|
|
{headerHozAlign : 'center', hozAlign : 'right', width : '150', title : '설계불출수량', field : 'OUT_CNT' ,
|
|
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false }
|
|
},
|
|
{headerHozAlign : 'center', hozAlign : 'right', width : '150', title : '부족분', field : 'SHORTAGE_CNT' ,
|
|
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false }
|
|
}
|
|
],
|
|
}
|
|
];
|
|
|
|
//var grid;
|
|
function fn_search(){
|
|
/* var selectedValues = $("#project_no").val();
|
|
$('input[name="project_nos"]').remove();
|
|
$('<input>').attr({
|
|
type: 'hidden',
|
|
name: 'project_nos',
|
|
value: selectedValues
|
|
}).appendTo('#form1');
|
|
|
|
var projectNoParam = new Array();
|
|
projectNoParam.push(selectedValues);
|
|
var checkArr = projectNoParam.join();
|
|
$("#checkArr").val(checkArr); */
|
|
|
|
_tabulGrid = fnc_tabul_search(_tabul_layout_fitDataStretch, _tabulGrid, "/purchaseOrder/purchaseOrderStatusGoodsGrid.do", columns, false);
|
|
|
|
}
|
|
|
|
function fn_searchSum(){
|
|
var _sum=0;
|
|
var text =" <font size='2px' color='red'>총발주금액(원) : ";
|
|
$.ajax({
|
|
url:"/purchaseOrder/purchaseOrderStatusByProjectSum.do",
|
|
type:"POST",
|
|
data:$("#form1").serializeObject(),
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
_sum = numberWithCommas(data.TOTAL_SUPPLY_UNIT_PRICE);
|
|
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
text +=_sum+"</font>";
|
|
$(".purchaseOrderSum").html(text);
|
|
}
|
|
|
|
function fn_designQTYFormPopup(objId){
|
|
var popup_width = 1300;
|
|
var popup_height = 900;
|
|
var objId = objId;
|
|
//var parent_objId = parent_objId;
|
|
var url = "/purchaseOrder/designQTYFormPopUp.do?objId="+objId;
|
|
fn_centerPopup(popup_width, popup_height, url);
|
|
}
|
|
|
|
function fn_purchaseOrderQTYFormPopup(objId){
|
|
var popup_width = 1300;
|
|
var popup_height = 900;
|
|
var objId = objId;
|
|
//var parent_objId = parent_objId;
|
|
var url = "/purchaseOrder/purchaseOrderQTYFormPopUp.do?objId="+objId;
|
|
fn_centerPopup(popup_width, popup_height, url);
|
|
}
|
|
|
|
function fn_excel() {
|
|
var selectedValues = $("#project_no").val();
|
|
$('input[name="project_nos"]').val(selectedValues);
|
|
|
|
document.form1.actionType.value = "excel";
|
|
var form = document.form1;
|
|
form.action="/purchaseOrder/purchaseOrderStatusByProject.do";
|
|
form.submit();
|
|
}
|
|
|
|
/* function fn_search(){
|
|
document.form1.action = "/purchaseOrder/purchaseOrderStatusByProject.do";
|
|
document.form1.submit();
|
|
} */
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="actionType" value="" />
|
|
<input type="hidden" name="checkArr" id="checkArr" value="" />
|
|
<div class="min_part_enroll">
|
|
<div class="content-box">
|
|
<div class="content-box-s">
|
|
<div class="plm_menu_name_gdnsi">
|
|
<h2>
|
|
<span>발주관리_구매품 발주현황</span>
|
|
</h2>
|
|
<div class="btnArea">
|
|
<input type="button" value="조회" class="plm_btns" id="btnSearch" name="btnSearch">
|
|
<!--
|
|
<input type="button" value="Excel Download" class="plm_btns" id="btnExcel">
|
|
-->
|
|
</div>
|
|
</div>
|
|
<div id="plmSearchZon" style="min-height:35px;">
|
|
<table>
|
|
<tr>
|
|
<td><label for="">품번</label></td>
|
|
<td>
|
|
<input type="text" name="SEARCH_PART_NO" id="SEARCH_PART_NO" style="" autocomplete="off" value="${param.SEARCH_PART_NO}">
|
|
</td>
|
|
|
|
<td><label for="">품명</label></td>
|
|
<td>
|
|
<input type="text" name="SEARCH_PART_NAME" id="SEARCH_PART_NAME" style="" autocomplete="off" value="${param.SEARCH_PART_NAME}">
|
|
</td>
|
|
<td><label for="">Maker</label></td>
|
|
<td>
|
|
<input type="text" name="SEARCH_MAKER" id="SEARCH_MAKER" style="" autocomplete="off" value="${param.SEARCH_MAKER}">
|
|
</td>
|
|
|
|
<td><label for="">규격</label></td>
|
|
<td>
|
|
<input type="text" name="SEARCH_SPEC" id="SEARCH_SPEC" style="" autocomplete="off" value="${param.SEARCH_SPEC}">
|
|
</td>
|
|
<%-- <td><label for="Year">년도</label></td>
|
|
<td>
|
|
<select name="Year" id="Year" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
<c:forEach begin="${sysYear-4}" end="${sysYear}" var="req_year">
|
|
<option value="${req_year}"${paramMap.Year eq req_year ? 'selected':'' }>${req_year}</option>
|
|
</c:forEach>
|
|
</select>
|
|
</td>
|
|
|
|
<td><label for="project_no">프로젝트번호</label></td>
|
|
<td>
|
|
<select name="project_no" id="project_no" style="width:370px;" class="select2" autocomplete="off" multiple="multiple">
|
|
<option value="">선택</option>
|
|
${code_map.project_no}
|
|
</select>
|
|
</td> --%>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div style="width:50%;float:left; color: RED;" class="purchaseOrderSum">
|
|
<%-- <font size="2px" color="red">총발주금액(원) : <fmt:formatNumber pattern="#,###" value="${resultMap.TOTAL_SUPPLY_UNIT_PRICE}" /> </font> --%>
|
|
</div>
|
|
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html> |