394 lines
13 KiB
Plaintext
394 lines
13 KiB
Plaintext
<%
|
|
/**
|
|
* 계약관리
|
|
* @since 2021.10.01
|
|
* @author kim
|
|
* @version 1.0
|
|
*
|
|
* << 개정 이력 >>
|
|
*
|
|
* 수정일 수정자 수정내용
|
|
* ---------------- --------------------- --------------------------------------------------------
|
|
* 2021.10.01 김효일 최초작성
|
|
**/
|
|
%>
|
|
<%@ 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="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>
|
|
<c:set var="sysMonth"><fmt:formatDate value="${now}" pattern="MM" /></c:set>
|
|
<c:set var="connector" value="<%=connector %>" />
|
|
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
$(document).ready(function(){
|
|
$('.select2').select2();
|
|
|
|
// 계약관리 조회
|
|
$("#btnSearch").click(function(){
|
|
fn_search();
|
|
});
|
|
|
|
|
|
$("#btnProduce").click(function(){ // 생산의뢰서
|
|
|
|
var url = "/requestMgmt/produceRequestPopup.do";
|
|
|
|
var orderNo = document.tabSearchForm.orderNo.value;
|
|
var acntUnit = document.tabSearchForm.acntUnit.value;
|
|
var orderYm = document.tabSearchForm.orderYm.value;
|
|
var orderSer = document.tabSearchForm.orderSer.value;
|
|
if (document.tabSearchForm.nation.value == "undefined"){
|
|
var nation = "";
|
|
}else {
|
|
var nation = document.tabSearchForm.nation.value;
|
|
}
|
|
|
|
|
|
if(acntUnit == null || acntUnit == "" ){
|
|
Swal.fire("계약리스트의 항목을 선택후 등록 하세요");
|
|
return false;
|
|
}
|
|
var param = "";
|
|
param += "?actionType=regist";
|
|
param += "&orderNo=" + orderNo;
|
|
param += "&acntUnit=" + acntUnit;
|
|
param += "&orderYm=" + orderYm;
|
|
param += "&orderSer=" + orderSer;
|
|
param += "&nation=" + nation;
|
|
|
|
//Swal.fire(param);
|
|
window.open(url + param, "", "width=1024, height=450", "menubars=no, scrollbars=yes, resizable=yes");
|
|
});
|
|
|
|
|
|
$("#btnShipment").click(function(){ // 출하의뢰서
|
|
|
|
var url = "/requestMgmt/shipmentRequestPopup.do";
|
|
|
|
var orderNo = document.tabSearchForm.orderNo.value;
|
|
var acntUnit = document.tabSearchForm.acntUnit.value;
|
|
var orderYm = document.tabSearchForm.orderYm.value;
|
|
var orderSer = document.tabSearchForm.orderSer.value;
|
|
if (document.tabSearchForm.nation.value == "undefined"){
|
|
var nation = "";
|
|
}else {
|
|
var nation = document.tabSearchForm.nation.value;
|
|
}
|
|
|
|
if(acntUnit == null || acntUnit == "" ){
|
|
Swal.fire("계약리스트의 항목을 선택후 등록 하세요");
|
|
return false;
|
|
}
|
|
|
|
var param = "";
|
|
param += "?actionType=regist";
|
|
param += "&orderNo=" + orderNo;
|
|
param += "&acntUnit=" + acntUnit;
|
|
param += "&orderYm=" + orderYm;
|
|
param += "&orderSer=" + orderSer;
|
|
param += "&nation=" + nation;
|
|
//Swal.fire(param);
|
|
window.open(url + param, "", "width=1024, height=900", "menubars=no, scrollbars=yes, resizable=yes");
|
|
});
|
|
|
|
$("#btnrelease").click(function(){ //출고의뢰서
|
|
|
|
var url = "/requestMgmt/releaseRequestPopup.do";
|
|
|
|
var orderNo = document.tabSearchForm.orderNo.value;
|
|
var acntUnit = document.tabSearchForm.acntUnit.value;
|
|
var orderYm = document.tabSearchForm.orderYm.value;
|
|
var orderSer = document.tabSearchForm.orderSer.value;
|
|
if (document.tabSearchForm.nation.value == "undefined"){
|
|
var nation = "";
|
|
}else {
|
|
var nation = document.tabSearchForm.nation.value;
|
|
}
|
|
|
|
if(acntUnit == null || acntUnit == "" ){
|
|
Swal.fire("계약리스트의 항목을 선택후 등록 하세요");
|
|
return false;
|
|
}
|
|
var param = "";
|
|
param += "?actionType=regist";
|
|
param += "&orderNo=" + orderNo;
|
|
param += "&acntUnit=" + acntUnit;
|
|
param += "&orderYm=" + orderYm;
|
|
param += "&orderSer=" + orderSer;
|
|
param += "&nation=" + nation;
|
|
|
|
//Swal.fire(param);
|
|
window.open(url + param, "", "width=1024, height=900", "menubars=no, scrollbars=yes, resizable=yes");
|
|
});
|
|
//btnProduce
|
|
//btnrelease
|
|
|
|
|
|
|
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// 제품 클릭
|
|
function contractMgmtClick(orderNo, acntUnit, orderYm, orderSer, nation, goodsCd ) {
|
|
document.tabSearchForm.orderNo.value = orderNo;
|
|
document.tabSearchForm.acntUnit.value = acntUnit;
|
|
document.tabSearchForm.orderYm.value = orderYm;
|
|
document.tabSearchForm.orderSer.value = orderSer;
|
|
document.tabSearchForm.nation.value = nation;
|
|
document.tabSearchForm.goodsCd.value = goodsCd;
|
|
|
|
|
|
// 탭 검색
|
|
fn_search();
|
|
}
|
|
|
|
// 탭 클릭
|
|
function tabClick(url) {
|
|
document.tabSearchForm.action = url;
|
|
document.tabSearchForm.submit();
|
|
}
|
|
</script>
|
|
</head>
|
|
<body class="backcolor">
|
|
<form name="tabSearchForm" id="tabSearchForm" method="get" onsubmit="return false;">
|
|
<input type="hidden" name="orderNo" id="orderNo" value="${param.orderNo}" />
|
|
<input type="hidden" name="acntUnit" id="acntUnit" value="${param.acntUnit}" />
|
|
<input type="hidden" name="orderYm" id="orderYm" value="${param.orderYm}" />
|
|
<input type="hidden" name="orderSer" id="orderSer" value="${param.orderSer}" />
|
|
<input type="hidden" name="nation" id="nation" value="${param.nation}" />
|
|
<input type="hidden" name="goodsCd" id="goodsCd" value="${param.goodsCd}" />
|
|
<input type="hidden" name="tabType" id="tabType" value="${param.tabType}" />
|
|
|
|
<!--// search -->
|
|
<div id="plmSearchZon">
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<td class="align_r"><label for="" class="">사업부</label></td>
|
|
<td>
|
|
<select name="condAcntUnit" id="condAcntUnit" style="width: 120px;" class="select2">
|
|
<option value="">선택</option>
|
|
<option value="1" ${param.condAcntUnit eq '1' ? 'selected':'' }>크레인</option>
|
|
<option value="2" ${param.condAcntUnit eq '2' ? 'selected':'' }>특장</option>
|
|
<option value="7" ${param.condAcntUnit eq '7' ? 'selected':'' }>전략</option>
|
|
<option value="D" ${param.condAcntUnit eq 'D' ? 'selected':'' }>개발</option>
|
|
</select>
|
|
</td>
|
|
<td>계약년월</td>
|
|
<td colspan="">
|
|
<select name="Year" id="Year" style="width: 120px;" 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>
|
|
<select name="Month" id="Month" style="width: 120px;" class="select2">
|
|
<option value="">선택</option>
|
|
<c:forEach begin="01" end="12" var="req_month">
|
|
<option value="${req_month}" ${param.Month eq req_month ? 'selected':''}>${req_month}</option>
|
|
</c:forEach>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!--// search -->
|
|
</form>
|
|
|
|
|
|
<h3 class="tit">계약 리스트</h3>
|
|
|
|
<!--// 계약 리스트 -->
|
|
<div class="plm_table_wrap">
|
|
<div>
|
|
<table class="plm_table table-hover">
|
|
<colgroup>
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="8%" />
|
|
<col width="7%" />
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td rowspan="2">계약번호</td>
|
|
<td rowspan="2">시장구분</td>
|
|
<td rowspan="2">판매구분</td>
|
|
<td rowspan="2">판매유형</td>
|
|
<td rowspan="2">고객명</td>
|
|
<td rowspan="2">제품명</td>
|
|
<td rowspan="2">계약일자</td>
|
|
<td rowspan="2">보증(월)</td>
|
|
<td colspan="4">수량</td>
|
|
<td colspan="4">계</td>
|
|
<td rowspan="2">매출액</td>
|
|
<td rowspan="2">수금액</td>
|
|
<td rowspan="2">입력자</td>
|
|
</tr>
|
|
<tr class="plm_thead">
|
|
<td>계약</td>
|
|
<td>출하</td>
|
|
<td>출고</td>
|
|
<td>매출</td>
|
|
<td>단가</td>
|
|
<td>금액</td>
|
|
<td>부가세</td>
|
|
<td>합계</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<c:choose>
|
|
<c:when test="${empty LIST}">
|
|
<tr style="text-align:center;">
|
|
<td align="center" colspan="19">조회된 데이터가 없습니다.</td>
|
|
</tr>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<c:forEach var="item" items="${LIST}" varStatus="varStatus">
|
|
|
|
<tr onclick="contractMgmtClick('${item.ORDERNO}', '${item.ACNTUNIT}', '${item.ORDERYM}','${item.ORDERSER}', '${item.NATIONGB}' ,'${item.GOODSCD}' )"
|
|
${param.orderNo eq item.ORDERNO ? 'class=selected':''}
|
|
>
|
|
<td>${item.ORDERNO}</td>
|
|
<td>${item.ORDERUNITNM}</td>
|
|
<td>${item.SALEGBNM}</td>
|
|
<td>${item.SALETYPENM}</td>
|
|
<td>${item.CUSTNM}</td>
|
|
<td>${item.GOODSNM}</td>
|
|
<td>
|
|
<fmt:parseDate var="orderDate" value="${item.ORDERDATE}" pattern="yyyyMMdd"/>
|
|
<fmt:formatDate value="${orderDate}" pattern="yyyy-MM-dd" />
|
|
</td>
|
|
<td>${item.GOODSGUARANTEE}</td>
|
|
<td>
|
|
<fmt:formatNumber value="${item.GOODSQTY}" type="number" maxFractionDigits="3" />
|
|
</td>
|
|
<td>
|
|
<fmt:formatNumber value="${item.SALEQTY}" type="number" maxFractionDigits="3" />
|
|
</td>
|
|
<td>
|
|
<fmt:formatNumber value="${item.SALEQTY1}" type="number" maxFractionDigits="3" />
|
|
</td>
|
|
<td>
|
|
<fmt:formatNumber value="${item.SUPPLYQTY}" type="number" maxFractionDigits="3" />
|
|
</td>
|
|
<td>
|
|
<fmt:formatNumber value="${item.SALEPRICE}" type="number" maxFractionDigits="3" />
|
|
</td>
|
|
<td>
|
|
<fmt:formatNumber value="${item.SALEAMT}" type="number" maxFractionDigits="3" />
|
|
</td>
|
|
<td>
|
|
<fmt:formatNumber value="${item.VATAMT}" type="number" maxFractionDigits="3" />
|
|
</td>
|
|
<td>
|
|
<fmt:formatNumber value="${item.TOTSALEAMT}" type="number" maxFractionDigits="3" />
|
|
</td>
|
|
<td>
|
|
<fmt:formatNumber value="${item.SUPPLYAMT}" type="number" maxFractionDigits="3" />
|
|
</td>
|
|
<td>
|
|
<fmt:formatNumber value="${item.RCPTAMT}" type="number" maxFractionDigits="3" />
|
|
</td>
|
|
<td>${item.CRETEMPNO}</td>
|
|
</tr>
|
|
</c:forEach>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<!--// 계약 리스트 -->
|
|
|
|
<!--// pdm_page -->
|
|
<div class="pdm_page">
|
|
<input type="hidden" name="page" id="page" value="${nPage}"/>
|
|
<c:if test="${!empty LIST}">
|
|
<div class="page_pro">
|
|
<table>
|
|
<tr>
|
|
<c:choose>
|
|
<c:when test="${nPage > 1}">
|
|
<td><a href="javascript:fnc_goPrev('${prevPage}');">prev</a></td>
|
|
<td> </td>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td class="no_more_page">prev</td>
|
|
<td> </td>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
<c:forEach var="v" begin="${nPage>5?nPage-5:1}" end="${nPage>5?nPage+4:10}" step="1" varStatus="status">
|
|
<c:if test="${status.index -1 < maxPage}">
|
|
<c:choose>
|
|
<c:when test="${status.index eq nPage}">
|
|
<td><a href="#" class="now_page">${nPage}</a></td>
|
|
<td> </td>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td><a href="javascript:fnc_goPage('${status.index}');">${status.index}</a></td>
|
|
<td> </td>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</c:if>
|
|
</c:forEach>
|
|
<c:choose>
|
|
<c:when test="${nPage < maxPage}">
|
|
<td><a href="javascript:fnc_goNext('${nextPage}');">next</a></td>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td class="no_more_page">next</td>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</tr>
|
|
</table>
|
|
<c:if test="${!empty LIST}">
|
|
<p id="adminPageCount">총 ${totalCount}건</p>
|
|
</c:if>
|
|
</div>
|
|
</c:if>
|
|
</div>
|
|
<!--// pdm_page -->
|
|
|
|
</body>
|
|
</html> |