297 lines
7.7 KiB
Plaintext
297 lines
7.7 KiB
Plaintext
<%
|
|
/**
|
|
* 추가옵션 팝업창
|
|
* @since 2021.11.05
|
|
* @author min
|
|
* @version 1.0
|
|
*
|
|
* << 개정 이력 >>
|
|
*
|
|
* 수정일 수정자 수정내용
|
|
* ---------------- --------------------- --------------------------------------------------------
|
|
* 2021.11.05 민상익 최초작성
|
|
**/
|
|
%>
|
|
<%@ 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();
|
|
|
|
// 저장
|
|
$("#save").click(function(){
|
|
fn_save();
|
|
});
|
|
|
|
// 삭제
|
|
$("#btnDelete").click(function(){
|
|
fn_delete();
|
|
});
|
|
|
|
// 닫기
|
|
$("#btnClose").click(function(){
|
|
self.close(0);
|
|
});
|
|
});
|
|
|
|
// 매출관리 정보 등록
|
|
function fn_save(){
|
|
//if(fnc_valitate("form1")){
|
|
var isChk = false;
|
|
var arrChk = document.getElementsByName("addChk");
|
|
|
|
for(var i = 0; i < arrChk.length; i++){
|
|
if(arrChk[i].checked == true){
|
|
isChk = true;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(!isChk){
|
|
Swal.fire("등록 할 추가 옵션을 한개 이상 선택해주세요.");
|
|
return false;
|
|
}
|
|
|
|
if(confirm("등록 하시겠습니까?")){
|
|
saveProcess();
|
|
}
|
|
//}
|
|
}
|
|
|
|
// 출고의뢰등록
|
|
function saveProcess(){
|
|
$.ajax({
|
|
url:"/requestMgmt/saveAdditionalOption.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
Swal.fire(data.RESULT.msg);
|
|
|
|
if (data.RESULT.result) {
|
|
location.reload();
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
// 출고의뢰 정보 삭제
|
|
function fn_delete() {
|
|
var isChk = false;
|
|
var arrChk = document.getElementsByName("delChk");
|
|
|
|
for(var i = 0; i < arrChk.length; i++){
|
|
if(arrChk[i].checked == true){
|
|
isChk = true;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(!isChk){
|
|
Swal.fire("삭제 할 추가 옵션을 한개 이상 선택해주세요.");
|
|
return false;
|
|
}
|
|
|
|
if(confirm("삭제 하시겠습니까?")){
|
|
deleteProcess();
|
|
}
|
|
}
|
|
|
|
// 삭제
|
|
function deleteProcess(){
|
|
$.ajax({
|
|
url:"/requestMgmt/deleteAdditionalOption.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
Swal.fire(data.RESULT.msg);
|
|
|
|
if (data.RESULT.result) {
|
|
location.reload();
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
//관리담당자 조회
|
|
function getEmpList(deptCd) {
|
|
var param = "deptCd=" + deptCd;
|
|
|
|
$.ajax({
|
|
url:"/common/salesMgmt/empList.do",
|
|
type:"GET",
|
|
data:param,
|
|
dataType:"json",
|
|
success:function(data){
|
|
var options = "<option value=''>선택</option>";
|
|
|
|
if (data.RESULT !="") {
|
|
options += data.RESULT;
|
|
}
|
|
|
|
$("#salesman").html(options);
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
</script>
|
|
<body>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<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}"> <!-- 일련번호 -->
|
|
|
|
<section>
|
|
<div class="plm_menu_name_ieg" style="display:flex;">
|
|
<h2>
|
|
<span>추가옵션등록</span>
|
|
</h2>
|
|
</div>
|
|
|
|
<div id="businessPopupFormWrap">
|
|
<h3 class="sub_title_left">추가옵션정보</h3>
|
|
<p> </p>
|
|
<div style="height:300px;overflow-y:scroll;">
|
|
<table class="plm_table3">
|
|
<colgroup>
|
|
<col width="5%" />
|
|
<col width="12%" />
|
|
<col width="13%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="*" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead" style="margin-right:15px;">
|
|
<td>선택</td>
|
|
<td>순번</td>
|
|
<td>명칭</td>
|
|
<td>규격</td>
|
|
<td>재질</td>
|
|
<td>단위</td>
|
|
<td>수량</td>
|
|
<td>판매금액</td>
|
|
<td>원가금액</td>
|
|
<td>비고</td>
|
|
</tr>
|
|
</thead>
|
|
<c:choose>
|
|
<c:when test="${empty codeList}">
|
|
<tr style="text-align:center;">
|
|
<td align="center" colspan="10">조회된 데이터가 없습니다.</td>
|
|
</tr>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<c:forEach var="item" items="${codeList}" varStatus="varStatus" begin="1">
|
|
<tr>
|
|
<td><input type="checkbox" name="addChk" id="addChk" value="${varStatus.index}|${item.C_CLASS}|${item.COPT_CD}"/></td>
|
|
<td>${varStatus.index}</td>
|
|
<td>${item.COPT_NM}</td>
|
|
<td>${item.STANDARD}</td>
|
|
<td>${item.MATERIAL}</td>
|
|
<td>${item.UNIT}</td>
|
|
<td></td>
|
|
<td>${item.SALE_AMT}</td>
|
|
<td>${item.COST_AMT}</td>
|
|
<td>${item.REM_NM}</td>
|
|
</tr>
|
|
</c:forEach>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</table>
|
|
</div>
|
|
<br><br>
|
|
|
|
<div class="col_arrow" >
|
|
<a href="javascript:;" onclick="fn_delete();"><button type="button" class="bt_order"><i class="ico_comm ico_up">위로</i></button></a>
|
|
<a href="javascript:;" onclick="fn_save();"><button type="button" class="bt_order"><i class="ico_comm ico_down">아래로</i></button></a>
|
|
</div><br><br>
|
|
<div style="height:300px;overflow-y:scroll;">
|
|
<table class="plm_table3">
|
|
<colgroup>
|
|
<col width="5%" />
|
|
<col width="12%" />
|
|
<col width="13%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="*" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td>선택</td>
|
|
<td>순번</td>
|
|
<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="10">조회된 데이터가 없습니다.</td>
|
|
</tr>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<c:forEach var="item" items="${LIST}" varStatus="varStatus">
|
|
<tr>
|
|
<td><input type="checkbox" name="delChk" id="delChk" value="${item.C_CLASS}|${item.COPT_CD}"/></td>
|
|
<td>${item.SEQ}</td>
|
|
<td>${item.COPT_NM}</td>
|
|
<td>${item.STANDARD}</td>
|
|
<td>${item.MATERIAL}</td>
|
|
<td>${item.UNIT}</td>
|
|
<td>${item.QTY}</td>
|
|
<td>${item.SALE_AMT}</td>
|
|
<td>${item.COST_AMT}</td>
|
|
<td>${item.REM_NM}</td>
|
|
</tr>
|
|
</c:forEach>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</table>
|
|
</div>
|
|
<p> </p>
|
|
</div>
|
|
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap_center">
|
|
<input type="button" value="닫기" id="btnClose" class="plm_btns">
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |