ERP-node/WebContent/WEB-INF/view/salesmgmt/contractMgmt/deliveryFormPopup.jsp

313 lines
10 KiB
Plaintext
Raw Permalink Normal View History

2025-08-21 09:41:46 +09:00
<%
/**
* 납기예정 등록
* @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" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=Constants.SYSTEM_NAME%></title>
</head>
<link rel="stylesheet" href="/css/ions-basic.css">
<script type="text/javascript" src="/js/ions-common.js" ></script>
<script type="text/javascript">
$(document).ready(function(){
$('.select2').select2();
fnc_makeDatepick();
// 신규등록
$("#btnReg").click(function(){
fn_init()
});
// 저장
$("#btnSave").click(function(){
fn_save();
});
// 삭제
$("#btnDelete").click(function(){
fn_delete();
});
// 닫기
$("#btnClose").click(function(){
opener.fn_search();
self.close(0);
});
});
//폼 초기화
function fn_init() {
document.hiddenForm.actionType.value = "regist";
document.hiddenForm.serial.value = "";
document.hiddenForm.action = "/contractMgmt/deliveryFormPopup.do";
document.hiddenForm.submit();
}
// 납기예정 정보 등록
function fn_save(){
if(fnc_valitate("form1")){
if(confirm("등록 하시겠습니까?")){
saveProcess();
}
}
}
// 등록
function saveProcess(){
var url = "/contractMgmt/saveDelivery.do";
if ("${param.actionType}" === "modify") {
url = "/contractMgmt/updateDelivery.do";
}
$.ajax({
url:url,
type:"POST",
data:$("#form1").serialize(),
dataType:"json",
success:function(data){
Swal.fire(data.RESULT.msg);
if (data.RESULT.result) {
fn_init()
}
},
error: function(jqxhr, status, error){
}
});
}
// 납기예정 정보 삭제
function fn_delete() {
if(confirm("삭제 하시겠습니까?")){
deleteProcess();
}
}
// 삭제
function deleteProcess(){
$.ajax({
url:"/contractMgmt/deleteDelivery.do",
type:"POST",
data:$("#form1").serialize(),
dataType:"json",
success:function(data){
Swal.fire(data.RESULT.msg);
if (data.RESULT.result) {
fn_init()
}
},
error: function(jqxhr, status, error){
}
});
}
// 납기예정 조회
function searchDelivery(orderNo, serial) {
document.form1.orderNo.value = orderNo;
document.form1.serial.value = serial;
document.hiddenForm.actionType.value = "modify";
document.hiddenForm.orderNo.value = orderNo;
document.hiddenForm.serial.value = serial;
document.hiddenForm.action = "/contractMgmt/deliveryFormPopup.do";
document.hiddenForm.submit();
}
</script>
<body>
<form name="hiddenForm" id="hiddenForm" method="get" onsubmit="return false;">
<input type="hidden" name="actionType" id="actionType" value="${param.actionType}" />
<input type="hidden" name="orderNo" id="orderNo" value="${param.orderNo}" />
<input type="hidden" name="serial" id="serial" />
</form>
<form name="form1" id="form1" action="" method="post">
<input type="hidden" name="orderNo" id="orderNo" value="${param.orderNo}" />
<input type="hidden" name="serial" id="serial" value="${param.serial}" />
<section>
<div class="plm_menu_name">
<h2>
<span>납기예정 등록</span>
</h2>
</div>
<div id="businessPopupFormWrap">
<!--// pmsPopupForm -->
<table class="pmsPopupForm">
<colgroup>
<col width="15%"/>
<col width="15%"/>
<col width="25%"/>
<col width="15%"/>
<col width="15%"/>
<col width="15%"/>
<col width="15%"/>
</colgroup>
<tr><td colspan="7" style="height:15px;"></td></tr>
<tr>
<td rowspan="5" class="sub_title">납기예정정보</td>
<c:if test="${param.actionType ne 'regist'}">
<td class="input_title" style="font-size:13px;"><label for="">일련번호</label></td>
<td colspan="5" width="21%" class="input_sub_title">
<input type="text" name="displaySerial" id="displaySerial" value="${info.SERIAL}" disabled style="width:130px;/">
</td>
</c:if>
</tr>
<tr>
<td width="13%" class="input_title" style="font-size:13px;"><label for="">* 납기예정일</label></td>
<td colspan="5" class="input_sub_title">
<input type="text" id="deliveryDate" name="deliveryDate" required reqTitle="납기예정일" value="${info.DELIVERYDATE}" class="date_icon" style="width: 100px !important;background-color:#fff;" autocomplete="off">
</td>
</tr>
<tr>
<td class="input_title" style="font-size:13px;"><label for="">* 납품지</label></td>
<td class="input_sub_title">
<select name="outRegion" id="outRegion" required reqTitle="납품지" type="select" style="width: 120px;" class="select2">
<option value="">선택</option>
<c:forEach var="outRegionList" items="${codeMap.outRegionList}">
${outRegionList}
</c:forEach>
</select>
</td>
<td class="input_title" style="font-size:13px;"><label for="">* 장착지</label></td>
<td class="input_sub_title">
<select name="addRegion" id="addRegion" required reqTitle="장착지" type="select" style="width: 150px;" class="select2">
<option value="">선택</option>
<c:forEach var="addRegionList" items="${codeMap.addRegionList}">
${addRegionList}
</c:forEach>
</select>
</td>
<td class="input_title" style="font-size:13px;"><label for="">* 실사용자</label></td>
<td class="input_sub_title">
<select name="custUser" id="custUser" required reqTitle="실사용자" type="select" style="width: 120px;" class="select2">
<option value="">선택</option>
<c:forEach var="customerList" items="${codeMap.customerList}">
${customerList}
</c:forEach>
</select>
</td>
<td class="input_sub_title"></td>
</tr>
<tr>
<td class="input_title" style="font-size:13px;"><label for="">* 장착예정일</label></td>
<td class="input_sub_title">
<input type="text" id="addDate" name="addDate" required reqTitle="장착예정일" value="${info.ADDDATE}" class="date_icon" style="width: 100px !important;background-color:#fff;" autocomplete="off">
</td>
<td class="input_title" style="font-size:13px;"><label for="">* 출하예정일</label></td>
<td class="input_sub_title">
<input type="text" id="yetOutDate" name="yetOutDate" required reqTitle="출하예정일" value="${info.YETOUTDATE}" class="date_icon" style="width: 100px !important;background-color:#fff;" autocomplete="off">
</td>
<td class="input_title" style="font-size:13px;"><label for="">* 출고예정일</label></td>
<td class="input_sub_title">
<input type="text" id="yetOutDate1" name="yetOutDate1" required reqTitle="출고예정일" value="${info.YETOUTDATE1}" class="date_icon" style="width: 100px !important;background-color:#fff;" autocomplete="off">
</td>
</tr>
<tr>
<td class="input_title"><label for="">비고</label></td>
<td colspan="6" class="input_sub_title">
<textarea id="biGo" name="biGo" style="width:95%;height:50px;"><c:out value="${info.BIGO}" escapeXml="false" /></textarea>
</td>
</tr>
<tr><td colspan="7" style="height:15px;"></td></tr>
</table>
<!--// pmsPopupForm -->
<!--// plm_table -->
<table class="plm_table">
<colgroup>
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
</colgroup>
<thead>
<tr class="plm_thead">
<td>일련번호</td>
<td>납기예정일</td>
<td>납품지</td>
<td>장착지</td>
<td>장착예정일</td>
<td>실사용자</td>
<td>출하예정일</td>
<td>출고예정일</td>
</tr>
</thead>
<c:choose>
<c:when test="${empty LIST}">
<tr style="text-align:center;">
<td align="center" colspan="8">조회된 데이터가 없습니다.</td>
</tr>
</c:when>
<c:otherwise>
<c:forEach var="item" items="${LIST}" varStatus="varStatus">
<tr>
<td><a href="javascript:;" onclick="searchDelivery('${item.ORDERNO}', '${item.SERIAL}')">${item.SERIAL}</a></td>
<td>
<fmt:parseDate var="deliveryDate" value="${item.DELIVERYDATE}" pattern="yyyyMMdd"/>
<fmt:formatDate value="${deliveryDate}" pattern="yyyy-MM-dd" />
</td>
<td>${item.OUTREGIONNM}</td>
<td>${item.ADDREGIONNM}</td>
<td>
<fmt:parseDate var="addDate" value="${item.ADDDATE}" pattern="yyyyMMdd"/>
<fmt:formatDate value="${addDate}" pattern="yyyy-MM-dd" />
</td>
<td>${item.CUSTUSERNM}</td>
<td>
<fmt:parseDate var="yetOutDate" value="${item.YETOUTDATE}" pattern="yyyyMMdd"/>
<fmt:formatDate value="${yetOutDate}" pattern="yyyy-MM-dd" />
</td>
<td>
<fmt:parseDate var="yetOutDate1" value="${item.YETOUTDATE1}" pattern="yyyyMMdd"/>
<fmt:formatDate value="${yetOutDate1}" pattern="yyyy-MM-dd" />
</td>
</tr>
</c:forEach>
</c:otherwise>
</c:choose>
</table>
<!--// plm_table -->
</div>
<!--// btn_wrap -->
<div class="btn_wrap">
<div class="plm_btn_wrap_center">
<!-- <input type="button" value="신규등록" id="btnReg" class="plm_btns"> -->
<c:if test="${(param.actionType ne 'view' and info.REG_USER_ID eq connectUserId) or 'regist' eq param.actionType or 'plm_admin' eq connectUserId}">
<input type="button" value="저장" id="btnSave" class="plm_btns">
</c:if>
<c:if test="${(param.actionType eq 'modify' and info.REG_USER_ID eq connectUserId) or 'plm_admin' eq connectUserId}">
<input type="button" value="삭제" id="btnDelete" class="plm_btns">
</c:if>
<input type="button" value="닫기" id="btnClose" class="plm_btns">
</div>
</div>
<!--// btn_wrap -->
</section>
</form>
</body>
</html>