ERP-node/WebContent/WEB-INF/view/salesmgmt/inspectionRequest/inspectionRequestFormPopup.jsp

251 lines
9.3 KiB
Plaintext

<%
/**
* 검사의뢰서 상세 조회
* @since 2021.11.03
* @author min
* @version 1.0
*
* << 개정 이력 >>
*
* 수정일 수정자 수정내용
* ---------------- --------------------- --------------------------------------------------------
* 2021.11.03 민상익 최초작성
**/
%>
<%@ 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();
// 저장
$("#btnSave").click(function(){
fn_save();
});
// 삭제
$("#btnDelete").click(function(){
fn_delete();
});
// 닫기
$("#btnClose").click(function(){
self.close(0);
});
});
// 검사의뢰 정보 등록
function fn_save(){
if(fnc_valitate("form1")){
if ($.trim($('#cReqDate').val()) === '') {
Swal.fire('의뢰일자가 입력되지 않았습니다ㅏ.');
$('#cReqDate').focus();
return false;
}
if ($.trim($('#cReqEndDate').val()) === '') {
Swal.fire('완료요청일이 입력되지 않았습니다ㅏ.');
$('#cReqEndDate').focus();
return false;
}
if ($.trim($('#cSendDept').val()) === '') {
Swal.fire('발신부서가 선택되지 않았습니다ㅏ.');
$('#cSendDept').focus();
return false;
}
if ($.trim($('#cRecDept').val()) === '') {
Swal.fire('수신부서가 선택되지 않았습니다ㅏ.');
$('#cRecDept').focus();
return false;
}
if ($.trim($('#cReqQty').val()) === '') {
Swal.fire('의뢰 수량이 입력되지 않았습니다ㅏ.');
$('#cReqQty').focus();
return false;
}
if(confirm("등록 하시겠습니까?")){
saveProcess();
}
}
}
// 등록
function saveProcess(){
$.ajax({
url:"/inspectionRequest/saveInspectionRequest.do",
type:"POST",
data:$("#form1").serialize(),
dataType:"json",
success:function(data){
Swal.fire(data.RESULT.msg);
if (data.RESULT.result) {
opener.fn_search();
self.close();
}
},
error: function(jqxhr, status, error){
}
});
}
// 검사의뢰 정보 삭제
function fn_delete() {
if(confirm("삭제 하시겠습니까?")){
deleteProcess();
}
}
// 삭제
function deleteProcess(){
$.ajax({
url:"/inspectionRequest/deleteInspectionRequest.do",
type:"POST",
data:$("#form1").serialize(),
dataType:"json",
success:function(data){
Swal.fire(data.RESULT.msg);
if (data.RESULT.result) {
opener.fn_search();
self.close();
}
},
error: function(jqxhr, status, error){
}
});
}
// OrderNo로 정보 조회
function getOrder(orderNo) {
document.form1.action = "/inspectionRequest/inspectionRequestFormPopup.do";
document.form1.submit();
}
</script>
<body>
<form name="form1" id="form1" action="" method="post">
<input type="hidden" name="actionType" id="actionType" value="${param.actionType}" />
<input type="hidden" name="cRequestNo" id="cRequestNo" value="${info.CREQUESTNO}" /> <!-- 검사의뢰번호 -->
<input type="hidden" name="cGoodsCd" id="cGoodsCd" value="${info.CGOODSCD}" /> <!-- 제품코드 -->
<input type="hidden" name="cCustCd" id="cCustCd" value="${info.CCUSTCD}" /> <!-- 고객코드 -->
<input type="hidden" name="cColor" id="cColor" value="${info.CCOLOR}" /> <!-- 컬러 -->
<input type="hidden" name="cLogo" id="cLogo" value="${info.CLOGO}" /> <!-- 로고 -->
<section>
<div id="businessPopupFormWrap">
<table class="pmsPopupForm">
<colgroup>
<col width="15%"/>
<col width="15%"/>
<col width="25%"/>
<col width="25%"/>
<col width="25%"/>
</colgroup>
<tr><td colspan="5" style="height:15px;"></td></tr>
<tr>
<td rowspan="7" class="sub_title">검사의뢰정보</td>
<td class="input_title" style="font-size:13px;"><label for="">계약번호</label> </td>
<td width="21%" class="input_sub_title">
<select name="cOrderNo" id="cOrderNo" onchange='getOrder($(this).val())' type="select" style="width: 120px;" class="select2">
<option value="">선택</option>
<c:forEach var="ordernoList" items="${codeMap.ordernoList}">
${ordernoList}
</c:forEach>
</select>
<td class="input_title" style="font-size:13px;"><label for="">제품명</label></td>
<td class="input_sub_title"><input type="text" name="cGoodsNm" id="cGoodsNm" value="${info.CGOODSNM}" disabled maxlength="20" style="width:200px;" /></td>
</tr>
<tr>
<td class="input_title" style="font-size:13px;"><label for="">검사의뢰번호</label></td>
<c:if test="${param.actionType eq 'regist'}">
<td class="input_sub_title"><input type="text" name="dispCRequestNo" id="dispCRequestNo" value="${info.CREQUESTNO}" disabled maxlength="20" style="width:130px;/"></td>
</c:if>
<c:if test="${param.actionType ne 'regist'}">
<td class="input_sub_title"><input type="text" name="cRequestNo" id="cRequestNo" value="${info.CREQUESTNO}" disabled maxlength="20" style="width:130px;/"></td>
</c:if>
<td class="input_title" style="font-size:13px;"><label for="">고객</label></td>
<td class="input_sub_title"><input type="text" name="cCustNm" id="cCustNm" value="${info.CCUSTNM}" disabled maxlength="20" style="width:200px;" /></td>
</tr>
<tr>
<td class="input_title" style="font-size:13px;"><label for="">의뢰일자</label></td>
<td class="input_sub_title"><input type="text" name="cReqDate" id="cReqDate" value="${info.CREQDATE}" class="date_icon"
style="width: 130px !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" name="cColorNm" id="cColorNm" value="${info.CCOLORNM}" disabled maxlength="20" style="width:130px;/"></td>
</tr>
<tr>
<td class="input_title" style="font-size:13px;"><label for="">완료요청일</label></td>
<td width="21%" class="input_sub_title"><input type="text" name="cReqEndDate" id="cReqEndDate" value="${info.CREQENDDATE}" class="date_icon"
style="width: 130px !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" name="cLogoNm" id="cLogoNm" value="${info.CLOGONM}" disabled maxlength="20" style="width:130px;/"></td>
</tr>
<tr>
<td class="input_title" style="font-size:13px;"><label for="">발신부서</label></td>
<td width="21%" class="input_sub_title">
<select name="cSendDept" id="cSendDept" type="select" style="width: 120px;" class="select2">
<option value="">선택</option>
<c:forEach var="deptList1" items="${codeMap.deptList1}">
${deptList1}
</c:forEach>
</select>
<td class="input_title" style="font-size:13px;"><label for="">사시</label></td>
<td class="input_sub_title"><input type="text" name="cShassis" id="cShassis" value="${info.CSHASSIS}" disabled maxlength="20" style="width:130px;/"></td>
</tr>
<tr>
<td class="input_title" style="font-size:13px;"><label for="">수신부서</label></td>
<td width="21%" class="input_sub_title">
<select name="cRecDept" id="cRecDept" type="select" style="width: 120px;" class="select2">
<option value="">선택</option>
<c:forEach var="deptList2" items="${codeMap.deptList2}">
${deptList2}
</c:forEach>
</select>
<td class="input_title" style="font-size:13px;">&nbsp;</td>
<td class="input_sub_title">&nbsp;</td>
</tr>
<tr>
<td class="input_title" style="font-size:13px;"><label for="">의뢰수량</label></td>
<td class="input_sub_title"><input type="text" name="cReqQty" id="cReqQty" value="${info.CREQQTY}" maxlength="20" style="width:50px;/"></td>
<td class="input_title" style="font-size:13px;">&nbsp;</td>
<td class="input_sub_title">&nbsp;</td>
</tr>
<tr><td colspan="5" style="height:15px;"></td></tr>
</table>
</div>
<div class="btn_wrap">
<div class="plm_btn_wrap_center">
<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>
</section>
</form>
</body>
</html>