초기소스
This commit is contained in:
@@ -0,0 +1,263 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui" %>
|
||||
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld"%>
|
||||
|
||||
<%--
|
||||
Class Name : CouponChoisePopupR.jsp
|
||||
Description : 쿠폰 선택 popup jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.14 추지훈 최초 생성
|
||||
--%>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
let pageIndex = '<c:out value="${ resultMap.paramVO.pageIndex }"/>';
|
||||
let param = '<c:out value="${ resultMap.paramVO.couponSndngTy }"/>';
|
||||
|
||||
|
||||
|
||||
fn_search_coupon_choisepage_pop(pageIndex, param);
|
||||
|
||||
fn_delete_couponchoise();
|
||||
|
||||
$('select').niceSelect();
|
||||
// $('.nice-select .list').niceScroll();
|
||||
|
||||
// 혜택 구분 체크박스 제어
|
||||
$('#bnefSearchDiv input[name="searchBnefDv"]').click(function() {
|
||||
var checkBoxAll = true;
|
||||
|
||||
$('#bnefSearchDiv input[name="searchBnefDv"]').each(function() {
|
||||
if (!$(this).prop('checked')) {
|
||||
checkBoxAll = false;
|
||||
}
|
||||
});
|
||||
|
||||
$('#bnefSearchDiv .check-all input[type="checkbox"]').prop('checked', checkBoxAll);
|
||||
});
|
||||
|
||||
|
||||
// 전체 체크, 전체 해제 제어
|
||||
$('.check-all input[type="checkbox"]').change(function() {
|
||||
var isChecked = $(this).prop('checked');
|
||||
|
||||
$('input[name="searchBnefDv"]').prop('checked', isChecked);
|
||||
});
|
||||
|
||||
|
||||
|
||||
if ($(".table.draggable").length > 0) {
|
||||
|
||||
$(".table.draggable").tableDnD({
|
||||
onDragClass: "dragging",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
<%-- const fn_reset_form2 = function(formId) {
|
||||
console.log("formId : ", formId);
|
||||
if ($('#' + formId)[0]) {
|
||||
const radioArr = [];
|
||||
$('#' + formId).eq(0).find('input,select,textarea').each(function() {
|
||||
let type = this.type;
|
||||
let tag = this.tagName.toLowerCase();
|
||||
if (type === 'text' || tag === 'textarea') {
|
||||
this.value = '';
|
||||
} else if (type === 'checkbox') {
|
||||
this.checked = false;
|
||||
} else if (type === 'radio') {
|
||||
this.checked = false;
|
||||
if (!radioArr.includes($(this).prop('name'))) {
|
||||
radioArr.push($(this).prop('name'));
|
||||
}
|
||||
} else if (tag === 'select') {
|
||||
const firstOption = $(this).find('option:first');
|
||||
firstOption.prop('selected', true);
|
||||
$(".select-box > select").niceSelect('update');
|
||||
}
|
||||
});
|
||||
radioArr.forEach((element) => $('input[name=' + element + ']').eq(0).prop('checked', 'checked'));
|
||||
}
|
||||
} --%>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<div id="couponChoisePopup" class="modal" style="max-width: 1200px;">
|
||||
<div class="modal-header">
|
||||
<h4>쿠폰 선택</h4>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<form id="popupListForm" name="popupListForm" >
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>쿠폰팩에 들어갈 쿠폰 선택 모달</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>쿠폰 명</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" id="searchCoupNm" name="searchCoupNm" title="쿠폰명" value="<c:out value="${ resultMap.paramVO.searchCoupNm }" />">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>등록 브랜드 몰</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="md" id="sopmalCd" name="sopmalCd" title="쇼핑몰">
|
||||
<c:forEach var="list" items="${ resultMap.sopmalList }" varStatus="">
|
||||
<option value="${ list.sopmalCd }" ${f:setSelected(resultMap.paramVO.sopmalCd, list.sopmalCd)} >${ list.sopmalNm }</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>쿠폰 혜택</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="b-checkbox-container" id="bnefSearchDiv">
|
||||
<label class="b-checkbox checkbox check-all">
|
||||
<input type="checkbox" value="" <c:if test="${ fn:contains(resultMap.paramVO.searchBnefDv, '01, 02, 03')}">checked="checked"</c:if>>
|
||||
<span class="check"></span>
|
||||
<span class="control-label">전체</span>
|
||||
</label>
|
||||
<c:forEach var="codeList" items="${ resultMap.benfDvCdList }" varStatus="">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" name="searchBnefDv" value="<c:out value="${ codeList.cd }"/>" <c:if test="${ fn:contains(resultMap.paramVO.searchBnefDv, codeList.cd) }">checked="checked"</c:if>>
|
||||
<span class="check"></span>
|
||||
<span class="control-label"><c:out value="${ codeList.cdNm}" /></span>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>쿠폰 사용제한</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="searchOtrCouponSmtmUseAt-22" name="searchOtrCouponSmtmUseAt" value="" checked>
|
||||
<label for="searchOtrCouponSmtmUseAt-22">전체</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="searchOtrCouponSmtmUseAt-23" name="searchOtrCouponSmtmUseAt" value="Y">
|
||||
<label for="searchOtrCouponSmtmUseAt-23">단독 사용</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="searchOtrCouponSmtmUseAt-24" name="searchOtrCouponSmtmUseAt" value="N">
|
||||
<label for="searchOtrCouponSmtmUseAt-24">공동 사용</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>중복할인</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="searchDplctDscntAt-25" name="searchDplctDscntAt" value="" checked>
|
||||
<label for="searchDplctDscntAt-25">전체</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="searchDplctDscntAt-26" name="searchDplctDscntAt" value="Y">
|
||||
<label for="searchDplctDscntAt-26">사용</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="searchDplctDscntAt-27" name="searchDplctDscntAt" value="N">
|
||||
<label for="searchDplctDscntAt-27">미사용</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container">
|
||||
<div class="left"></div>
|
||||
<div class="center">
|
||||
<button class="btn outline" id="resetBtn" type="button" onclick="fn_reset_form('popupListForm'); return false;">초기화</button>
|
||||
<button class="btn primary" id="searchBtn" type="button" onkeypress="this;" onclick="fn_search_coupon_choisepage_pop(1)">검색</button>
|
||||
</div>
|
||||
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
<input type="hidden" id="couponInnb" name="couponInnb"/>
|
||||
<input type="hidden" id="couponSndngTy" name="couponSndngTy" value="<c:out value="${ resultMap.paramVO.couponSndngTy }"/>"/>
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="1"/>
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="${ resultMap.paramVO.pageUnit }"/>
|
||||
</form>
|
||||
<div class="product-search-box">
|
||||
|
||||
<div id="couponAjaxList" class="table-wrapper left">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="table-wrapper right">
|
||||
<div class="form-control-container mb-5">
|
||||
<div class="left">
|
||||
<h3 class="content-section__inner-title mb-0">선택된 쿠폰</h3>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<p class="info-oneline"><i class="icon icon_info"></i>쿠폰을 "더블클릭"하면 제외됩니다.
|
||||
</div>
|
||||
</div>
|
||||
<table class="table vertical tight draggable">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>선택된 쿠폰 리스트</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody id="appendList">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<%-- <button class="btn outlise" onclick="fn_close_modal('couponChoisePopup')">닫기</button> --%>
|
||||
<a href="#" rel="modal:close" class="btn outline">취소</a>
|
||||
<button class="btn primary" onclick="fn_send_cupnpkregistpage('couponChoisePopup')">확인</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/admin/js/script.js" defer=""></script>
|
||||
@@ -0,0 +1,279 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld"%>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$('select').niceSelect();
|
||||
|
||||
$('#popupListForm').on('keydown', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
$('#searchBtn').trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
let sletdTrHtml = '<tr class="searchList" id="#choiseListId" ondblclick="fn_remove_list(this)" >';
|
||||
sletdTrHtml = sletdTrHtml+'<td class="center">';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponInnb" name="couponInnb" value="#couponInnb"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="sopmalName" name="sopmalName" value="#sopmalName"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponSopmalCd" name="couponSopmalCd" value="#couponSopmalCd"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponName" name="couponName" value="#couponName"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="bnefDv" name="bnefDv" value="#bnefDv"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="goodsDscntDv" name="goodsDscntDv" value="#goodsDscntDv"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="aditDscntAmt" name="aditDscntAmt" value="#aditDscntAmt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="aditDscntRt" name="aditDscntRt" value="#aditDscntRt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="dscntMxmmAmt" name="dscntMxmmAmt" value="#dscntMxmmAmt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="dlvyAmtDscntDv" name="dlvyAmtDscntDv" value="#dlvyAmtDscntDv"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="dlvyAmtDscntAmt" name="dlvyAmtDscntAmt" value="#dlvyAmtDscntAmt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="dlvyAmtMxmmDscntAmt" name="dlvyAmtMxmmDscntAmt" value="#dlvyAmtMxmmDscntAmt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponRegistDe" name="couponRegistDe" value="#couponRegistDe"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdKnd" name="couponValidpdKnd" value="#couponValidpdKnd"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdBgnDe" name="couponValidpdBgnDe" value="#couponValidpdBgnDe"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdEndDe" name="couponValidpdEndDe" value="#couponValidpdEndDe"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdDeCnt" name="couponValidpdDeCnt" value="#couponValidpdDeCnt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdCntDe" name="couponValidpdCntDe" value="#couponValidpdCntDe"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<span>#couponName';
|
||||
sletdTrHtml = sletdTrHtml+'</br>';
|
||||
|
||||
|
||||
|
||||
// 유효기간 기간 제한 (날짜) html
|
||||
let sletdTrTail = '<span">#couponValidpdBgnDe</span>';
|
||||
sletdTrTail = sletdTrTail+'~';
|
||||
sletdTrTail = sletdTrTail+'<span>#couponValidpdEndDe</span>';
|
||||
sletdTrTail = sletdTrTail+'</td>';
|
||||
sletdTrTail = sletdTrTail+'</tr>';
|
||||
|
||||
|
||||
// 유효기간 발급일로부터 일수 html
|
||||
let sletdTrCntDe = '<span">(발급일로부터) </span>';
|
||||
sletdTrCntDe = sletdTrCntDe+'<span>#couponValidpdDeCnt 일</span>';
|
||||
sletdTrCntDe = sletdTrCntDe+'</td>';
|
||||
sletdTrCntDe = sletdTrCntDe+'</tr>';
|
||||
|
||||
|
||||
|
||||
const parentsCouponList = getAllCouponList();
|
||||
|
||||
if (parentsCouponList != null && parentsCouponList.length >= 1) {
|
||||
|
||||
$('#appendList').html('');
|
||||
|
||||
parentsCouponList.forEach(function(coupon) {
|
||||
|
||||
|
||||
let trHtml = sletdTrHtml
|
||||
.replaceAll("#choiseListId", 'choiseListId' + coupon.couponInnb)
|
||||
.replaceAll("#couponInnb", coupon.couponInnb)
|
||||
.replaceAll("#sopmalName", coupon.sopmalName)
|
||||
.replaceAll("#couponSopmalCd", coupon.couponSopmalCd)
|
||||
.replaceAll("#couponName", coupon.couponName)
|
||||
.replaceAll("#bnefDv", coupon.bnefDv)
|
||||
.replaceAll("#goodsDscntDv", coupon.goodsDscntDv)
|
||||
.replaceAll("#aditDscntAmt", coupon.aditDscntAmt)
|
||||
.replaceAll("#aditDscntRt", coupon.aditDscntRt)
|
||||
.replaceAll("#dscntMxmmAmt", coupon.dscntMxmmAmt)
|
||||
.replaceAll("#dlvyAmtDscntDv", coupon.dlvyAmtDscntDv)
|
||||
.replaceAll("#dlvyAmtDscntAmt", coupon.dlvyAmtDscntAmt)
|
||||
.replaceAll("#dlvyAmtMxmmDscntAmt", coupon.dlvyAmtMxmmDscntAmt)
|
||||
.replaceAll("#couponRegistDe", coupon.couponRegistDe)
|
||||
.replaceAll("#couponValidpdKnd", coupon.couponValidpdKnd)
|
||||
.replaceAll("#couponValidpdBgnDe", coupon.couponValidpdBgnDe)
|
||||
.replaceAll("#couponValidpdEndDe", coupon.couponValidpdEndDe)
|
||||
.replaceAll("#couponValidpdDeCnt", coupon.couponValidpdDeCnt)
|
||||
.replaceAll("#couponValidpdCntDe", coupon.couponValidpdCntDe);
|
||||
|
||||
|
||||
// 기간설정 날짜
|
||||
if (coupon.couponValidpdKnd != null && coupon.couponValidpdKnd.trim() === '01') {
|
||||
trHtml = trHtml + sletdTrTail
|
||||
.replaceAll("#couponValidpdBgnDe", coupon.couponValidpdBgnDe)
|
||||
.replaceAll("#couponValidpdEndDe", coupon.couponValidpdEndDe);
|
||||
|
||||
// 기간설정 일수
|
||||
} else if (coupon.couponValidpdKnd != null && coupon.couponValidpdKnd.trim() === '02') {
|
||||
trHtml = trHtml + sletdTrCntDe
|
||||
.replaceAll("#couponValidpdDeCnt", coupon.couponValidpdDeCnt);
|
||||
}
|
||||
|
||||
function initializeTableDnD() {
|
||||
if ($(".table.draggable").length > 0) {
|
||||
$(".table.draggable").tableDnD({
|
||||
onDragClass: "dragging",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$('#appendList').append(trHtml);
|
||||
|
||||
initializeTableDnD();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
}); // document.ready end
|
||||
|
||||
|
||||
|
||||
|
||||
var selectedCoupons = []; // 중복체크하기 위한 배열
|
||||
|
||||
// 검색된 쿠폰 선택시 => 선택된 쿠폰 영역에 추가
|
||||
$(".searchList").on('dblclick', function(){
|
||||
|
||||
var copyTr = $(this).clone();
|
||||
// var copyTrParents = $(this).clone();
|
||||
var couponId = $(this).find('input[type="hidden"]').val();
|
||||
|
||||
|
||||
var isDuplicate = $("#appendList").find('#choiseListId' + couponId).length > 0;
|
||||
|
||||
// 배열에 값이 없을 경우 실행
|
||||
if (!isCouponSelected(couponId) && !isDuplicate) {
|
||||
|
||||
copyTr.attr('id', 'choiseListId' + couponId);
|
||||
copyTr.attr('ondblclick', 'fn_remove_list(this)');
|
||||
copyTr.attr('class', 'draggable');
|
||||
|
||||
|
||||
function initializeTableDnD() {
|
||||
if ($(".table.draggable").length > 0) {
|
||||
$(".table.draggable").tableDnD({
|
||||
onDragClass: "dragging",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$("#appendList").append(copyTr);
|
||||
|
||||
|
||||
initializeTableDnD();
|
||||
|
||||
|
||||
|
||||
|
||||
// 선택된 쿠폰을 배열에 추가
|
||||
selectedCoupons.push(couponId);
|
||||
} else if (isCouponSelected(couponId) || isDuplicate) {
|
||||
|
||||
alert("이미 선택된 쿠폰입니다.");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 선택된 쿠폰 제거 함수
|
||||
*/
|
||||
function fn_remove_list(element) {
|
||||
var dynamicId = $(element).attr('id');
|
||||
var couponId = $(element).find('input[type="hidden"]').val();
|
||||
|
||||
|
||||
$("#appendList " + "#" + dynamicId).remove();
|
||||
|
||||
// 선택된 쿠폰 배열에서 제거
|
||||
selectedCoupons = selectedCoupons.filter(function (id) {
|
||||
return id !== couponId;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 중복 체크 함수
|
||||
*/
|
||||
function isCouponSelected(couponId) {
|
||||
return selectedCoupons.includes(couponId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<div class="form-control-container mb-5">
|
||||
<div class="left">
|
||||
<h3 class="content-section__inner-title mb-0">검색된 쿠폰</h3>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<p class="info-oneline"><i class="icon icon_info"></i>쿠폰을 "더블클릭"하면 추가됩니다.
|
||||
</div>
|
||||
</div>
|
||||
<table class="table vertical tight">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>검색된 쿠폰 리스트<br>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultList && fn:length(resultMap.resultList) > 0 }">
|
||||
<c:forEach items="${ resultMap.resultList }" var="couponList" varStatus="status">
|
||||
<tr class="searchList">
|
||||
<td class="center">
|
||||
<input type="hidden" id="couponInnb" name="couponInnb" value="<c:out value="${ couponList.couponInnb }"/>"/>
|
||||
<input type="hidden" id="sopmalName" name="sopmalName" value="<c:out value="${couponList.sopmalNm}"/>"/>
|
||||
<input type="hidden" id="couponSopmalCd" name="couponSopmalCd" value="<c:out value="${couponList.sopmalCd}"/>"/>
|
||||
<input type="hidden" id="couponName" name="couponName" value="<c:out value="${couponList.coupNm}"/>"/>
|
||||
<input type="hidden" id="bnefDv" name="bnefDv" value="<c:out value="${couponList.bnefDv}"/>"/>
|
||||
<input type="hidden" id="goodsDscntDv" name="goodsDscntDv" value="<c:out value="${couponList.goodsDscntDv}"/>"/>
|
||||
<input type="hidden" id="aditDscntAmt" name="aditDscntAmt" value="<c:out value="${couponList.aditDscntAmt}"/>"/>
|
||||
<input type="hidden" id="aditDscntRt" name="aditDscntRt" value="<c:out value="${couponList.aditDscntRt}"/>"/>
|
||||
<input type="hidden" id="dscntMxmmAmt" name="dscntMxmmAmt" value="<c:out value="${couponList.dscntMxmmAmt}"/>"/>
|
||||
<input type="hidden" id="dlvyAmtDscntDv" name="dlvyAmtDscntDv" value="<c:out value="${couponList.dlvyAmtDscntDv}"/>"/>
|
||||
<input type="hidden" id="dlvyAmtDscntAmt" name="dlvyAmtDscntAmt" value="<c:out value="${couponList.dlvyAmtDscntAmt}"/>"/>
|
||||
<input type="hidden" id="dlvyAmtMxmmDscntAmt" name="dlvyAmtMxmmDscntAmt" value="<c:out value="${couponList.dlvyAmtMxmmDscntAmt}"/>"/>
|
||||
<input type="hidden" id="couponRegistDe" name="couponRegistDe" value="<c:out value="${couponList.registDe}"/>"/>
|
||||
<input type="hidden" id="couponValidpdKnd" name="couponValidpdKnd" value="<c:out value="${couponList.validpdKnd}"/>"/>
|
||||
<input type="hidden" id="couponValidpdBgnDe" name="couponValidpdBgnDe" value="<c:out value="${couponList.validpdBgnDe}"/>"/>
|
||||
<input type="hidden" id="couponValidpdEndDe" name="couponValidpdEndDe" value="<c:out value="${couponList.validpdEndDe}"/>"/>
|
||||
<input type="hidden" id="couponValidpdDeCnt" name="couponValidpdDeCnt" value="<c:out value="${couponList.validpdDeCnt}"/>"/>
|
||||
<input type="hidden" id="couponValidpdCntDe" name="couponValidpdCntDe" value="<c:out value="${couponList.validpdCntDe}"/>"/>
|
||||
<span>
|
||||
<<c:out value="${couponList.sopmalNm}"/>> <c:out value="${couponList.coupNm}" />
|
||||
<br>
|
||||
<fmt:parseDate var="registDe" value="${couponList.registDe}" pattern="yyyy-MM-dd"/>
|
||||
<c:choose>
|
||||
<c:when test="${ '01' eq couponList.validpdKnd }">
|
||||
<fmt:parseDate var="validpdBgnDe" value="${couponList.validpdBgnDe}" pattern="yyyy-MM-dd"/>
|
||||
<span><fmt:formatDate value="${validpdBgnDe}" pattern="yyyy-MM-dd"/></span>
|
||||
~
|
||||
<fmt:parseDate var="validpdEndDe" value="${couponList.validpdEndDe}" pattern="yyyy-MM-dd"/>
|
||||
<span><fmt:formatDate value="${validpdEndDe}" pattern="yyyy-MM-dd"/></span>
|
||||
</c:when>
|
||||
<c:when test="${ '02' eq couponList.validpdKnd }">
|
||||
(발급일로부터)
|
||||
<span> <c:out value="${ couponList.validpdDeCnt }"/> 일</span>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="100%">조회된 데이터가 없습니다.</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_search_coupon_choisepage_pop" />
|
||||
</div>
|
||||
2090
src/main/webapp/WEB-INF/views/mngr/promtn/coupon/CouponCopyC.jsp
Normal file
2090
src/main/webapp/WEB-INF/views/mngr/promtn/coupon/CouponCopyC.jsp
Normal file
File diff suppressed because it is too large
Load Diff
2099
src/main/webapp/WEB-INF/views/mngr/promtn/coupon/CouponDtlUpdtU.jsp
Normal file
2099
src/main/webapp/WEB-INF/views/mngr/promtn/coupon/CouponDtlUpdtU.jsp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,170 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
|
||||
|
||||
<%--
|
||||
Class Name : CouponInfoInqirePopupR.jsp
|
||||
Description : 쿠폰 발급 정보 popup jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.14 추지훈 최초 생성
|
||||
--%>
|
||||
<div id="couponInfoPopup" class="modal" style="max-width: 400px;">
|
||||
<div class="modal-header">
|
||||
<h4>쿠폰 정보</h4>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>쿠폰 정보 조회 팝업</caption>
|
||||
<colgroup>
|
||||
<col style="width: 20%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>쿠폰명</th>
|
||||
<td><c:out value="${ resultMap.dwldCouponVO.coupNm }"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>혜택(부담비율)</th>
|
||||
<td><%-- 5,000KRW 할인
|
||||
<br>중복할인
|
||||
<br>(% vs 0%) --%>
|
||||
<c:choose>
|
||||
<c:when test="${ resultMap.dwldCouponVO.bnefDv eq '01' || resultMap.dwldCouponVO.bnefDv eq '03' }">
|
||||
<span class="fw-500">
|
||||
<c:out value="${ resultMap.dwldCouponVO.aditDscntAmt }"/> <c:out value="${ resultMap.dwldCouponVO.goodsDscntDvNm }"/> 할인
|
||||
</span><br/>
|
||||
<c:if test="${ '01' eq resultMap.dwldCouponVO.goodsDscntDv }">
|
||||
<span class="gray-8">최대 <c:out value="${ resultMap.dwldCouponVO.dscntMxmmAmt }"/>원 할인</span>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:when test="${ resultMap.dwldCouponVO.bnefDv eq '02' }">
|
||||
<span class="fw-500">
|
||||
<c:if test="${ '01' eq resultMap.dwldCouponVO.dlvyAmtDscntDv }">기본배송비 무료,
|
||||
</span>
|
||||
<br>
|
||||
<span class="gray-8">
|
||||
최대 <c:out value="${ resultMap.dwldCouponVO.dlvyAmtMxmmDscntAmt }"/>원 할인</c:if>
|
||||
</span>
|
||||
<span class="fw-500">
|
||||
<c:if test="${ '02' eq resultMap.dwldCouponVO.dlvyAmtDscntDv }">배송비 <c:out value="${ resultMap.dwldCouponVO.dlvyAmtDscntAmt }"/>원 할인</c:if>
|
||||
</span>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>유효기간</th>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${ resultMap.dwldCouponVO.validpdKndCd eq '01' }">
|
||||
<c:out value="${ resultMap.dwldCouponVO.validpdBgnDt }"/> ~ <c:out value="${ resultMap.dwldCouponVO.validpdEndDt }"/><c:if test="${ 0 lt resultMap.dwldCouponVO.validpdDay }">(<c:out value="${ resultMap.dwldCouponVO.validpdDay }"/>일 남음)</c:if>
|
||||
</c:when>
|
||||
<c:when test="${ resultMap.dwldCouponVO.validpdKndCd eq '02' }">
|
||||
<c:out value="${ resultMap.dwldCouponVO.validpdKndCdNm }"/> <c:out value="${ resultMap.dwldCouponVO.validpdDeCnt }"/> 일
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:out value="${ resultMap.dwldCouponVO.validpdBgnDt }"/> ~ <c:out value="${ resultMap.dwldCouponVO.validpdEndDt }"/><c:if test="${ 0 lt resultMap.dwldCouponVO.validpdDay }">(<c:out value="${ resultMap.dwldCouponVO.validpdDay }"/>일 남음)</c:if>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">사용제한</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<%-- 사용환경 --%>
|
||||
<c:if test="${ not empty resultMap.dwldCouponVO.useEnvrnCd }">
|
||||
<c:choose>
|
||||
<c:when test="${resultMap.dwldCouponVO.useEnvrnCd eq '01' }">
|
||||
<p class="fyi gray-7">온라인 쿠폰</p>
|
||||
</c:when>
|
||||
<c:when test="${ resultMap.dwldCouponVO.useEnvrnCd eq '02' }">
|
||||
<p class="fyi gray-7">오프라인 쿠폰</p>
|
||||
</c:when>
|
||||
<c:when test="${ resultMap.dwldCouponVO.useEnvrnCd eq '03' }">
|
||||
<p class="fyi gray-7">온/오프라인 쿠폰</p>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<%-- 타 쿠폰 동시사용여부 --%>
|
||||
<c:if test="${ not empty resultMap.dwldCouponVO.otrCouponSmtmUseAt }">
|
||||
<c:choose>
|
||||
<c:when test="${resultMap.dwldCouponVO.otrCouponSmtmUseAt eq 'Y' }">
|
||||
<p class="fyi gray-7">다른 쿠폰과 동시 사용 불가</p>
|
||||
</c:when>
|
||||
<c:when test="${ resultMap.dwldCouponVO.otrCouponSmtmUseAt eq 'N' }">
|
||||
<p class="fyi gray-7">다른 쿠폰과 동시 사용 가능</p>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<%-- 사용가능금액(제품) --%>
|
||||
<c:if test="${ not empty resultMap.dwldCouponVO.usePosblAmt && 0 ne fn:replace(resultMap.dwldCouponVO.usePosblAmt, ',', '') }">
|
||||
<p class="fyi gray-7"><c:out value="${ resultMap.dwldCouponVO.usePosblAmt }"/>원 이상 구매 시</p>
|
||||
</c:if>
|
||||
<%-- 사용가능금액(대상제품 포함 구매제품 총합) --%>
|
||||
<c:if test="${ not empty resultMap.dwldCouponVO.usePosblAllAmt && 0 ne fn:replace(resultMap.dwldCouponVO.usePosblAllAmt, ',', '') && resultMap.dwldCouponVO.usePosblAllAmtUseAt eq 'Y' }">
|
||||
<p class="fyi gray-7"><c:out value="${ resultMap.dwldCouponVO.usePosblAllAmt }"/>원 이상 구매 시</p>
|
||||
</c:if>
|
||||
<%-- 중복다운로드 여부 --%>
|
||||
<c:if test="${ not empty resultMap.dwldCouponVO.dplctDwldAt}">
|
||||
<c:choose>
|
||||
<c:when test="${resultMap.dwldCouponVO.dplctDwldAt eq 'N' }">
|
||||
<p class="fyi gray-7">중복 다운로드 불가</p>
|
||||
</c:when>
|
||||
<c:when test="${ resultMap.dwldCouponVO.dplctDwldAt eq 'Y' }">
|
||||
<p class="fyi gray-7">중복 다운로드 가능</p>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<%-- 중복할인여부 --%>
|
||||
<c:if test="${ not empty resultMap.dwldCouponVO.dplctDscntAt}">
|
||||
<c:choose>
|
||||
<c:when test="${resultMap.dwldCouponVO.dplctDscntAt eq 'N' }">
|
||||
<p class="fyi gray-7">중복 할인 불가</p>
|
||||
</c:when>
|
||||
<c:when test="${ resultMap.dwldCouponVO.dplctDscntAt eq 'Y' }">
|
||||
<p class="fyi gray-7">중복 할인 가능</p>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<%-- 적용상품선정기준 --%>
|
||||
<c:if test="${ not empty resultMap.dwldCouponVO.goodsApplcDvCd }">
|
||||
<c:choose>
|
||||
<c:when test="${resultMap.dwldCouponVO.goodsApplcDvCd eq '01' }">
|
||||
<p class="fyi gray-7">모든 상품에 사용가능</p>
|
||||
</c:when>
|
||||
<c:when test="${ resultMap.dwldCouponVO.goodsApplcDvCd eq '02' }">
|
||||
<p class="fyi gray-7">특정 카테고리에 사용가능</p>
|
||||
</c:when>
|
||||
<c:when test="${ resultMap.dwldCouponVO.goodsApplcDvCd eq '03' }">
|
||||
<p class="fyi gray-7">특정 상품에 사용가능</p>
|
||||
</c:when>
|
||||
<c:when test="${ resultMap.dwldCouponVO.goodsApplcDvCd eq '04' }">
|
||||
<p class="fyi gray-7">특정 카테고리 외 사용가능</p>
|
||||
</c:when>
|
||||
<c:when test="${ resultMap.dwldCouponVO.goodsApplcDvCd eq '05' }">
|
||||
<p class="fyi gray-7">특정 상품 외 사용가능</p>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,280 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
|
||||
<%--
|
||||
Class Name : CouponIssuUseDtlsR.jsp
|
||||
Description : 쿠폰 사용 내역 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024-01-22 추지훈 최초 생성
|
||||
--%>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('select').niceSelect();
|
||||
|
||||
fn_set_date();
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
const fn_coupon_excel_download = function(couponSndngInnb) {
|
||||
var form = $('#listForm');
|
||||
|
||||
form.find('input[name="couponSndngInnb"]').remove();
|
||||
|
||||
form.append($('<input/>', {
|
||||
type: 'hidden',
|
||||
name: 'couponSndngInnb',
|
||||
value: couponSndngInnb
|
||||
}));
|
||||
|
||||
form.serialize();
|
||||
|
||||
form.attr('method', 'post');
|
||||
form.attr('action', '<c:url value="/mngr/promtn/coupon/selectCouponListExcelDwld"/>');
|
||||
form.submit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
<div class="search-number">
|
||||
<span class="search-number__text">총 <strong><c:out value="${ resultMap.paginationInfo.totalRecordCount }"/></strong>건</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<form id="listForm">
|
||||
</form>
|
||||
<div class="">
|
||||
<button type="button" id="couponExcelDwld" onclick="fn_coupon_excel_download(<c:out value="${ resultMap.paramVO.couponSndngInnb }"/>)" class="btn outline sm">
|
||||
<i class="icon icon_excel"></i>엑셀 다운로드
|
||||
</button>
|
||||
<button id="" type="button" class="btn xsm gray" onclick="fn_use_coupon_procs_all(<c:out value="${ resultMap.paramVO.couponSndngInnb }"/>); return false;">발급된 쿠폰 전체 회수</button>
|
||||
</div>
|
||||
<div class="select-box">
|
||||
<select id="pageUnit" name="pageUnit" title="페이지당 출력될 목록건수" onchange="fn_search_coupon_use_history_pop(1, this.value);">
|
||||
<c:forEach items="${ resultMap.paginationInfo.pageUnitArr }" var="pageUnit" varStatus="pageUnitStatus">
|
||||
<option value="<c:out value="${ pageUnit }"/>" <c:if test="${ resultMap.paginationInfo.recordCountPerPage eq pageUnit}">selected="selected"</c:if>><c:out value="${ pageUnit }"/>개씩</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="spacing">
|
||||
<div class="table-wrapper">
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
||||
<table class="table vertical tight" style="min-width: 1200px;">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 3%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 6%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 5%;">
|
||||
<col style="width: 8%;">
|
||||
<col style="width: 6%;">
|
||||
<col style="width: 5%;">
|
||||
<col style="width: 3%;">
|
||||
<col style="width: 6%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 7%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>쿠폰명</th>
|
||||
<th>아이디/이름</th>
|
||||
<th>발급일</th>
|
||||
<th>인증번호</th>
|
||||
<th>문자 재발송</th>
|
||||
<th>혜택</th>
|
||||
<th>할인금액</th>
|
||||
<th>조회</th>
|
||||
<th>사용여부</th>
|
||||
<th>회수처리</th>
|
||||
<th>구매상품</th>
|
||||
<th>사용일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.result && fn:length(resultMap.result) > 0 }">
|
||||
|
||||
<c:forEach items="${ resultMap.result }" var="couponUseDtls" varStatus="status">
|
||||
<tr>
|
||||
<%-- 번호 --%>
|
||||
<td>
|
||||
<c:out value="${ resultMap.paginationInfo.totalRecordCount - (couponUseDtls.rnum + (resultMap.paginationInfo.currentPageNo - 1) * resultMap.paginationInfo.recordCountPerPage) + 1 }" />
|
||||
</td>
|
||||
<%-- 쿠폰명 --%>
|
||||
<td><c:out value="${ couponUseDtls.coupNm }"/></td>
|
||||
<%-- 회원아이디 --%>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${ couponUseDtls.joinMthCd eq 'KAKAO'}">
|
||||
<i class="icon icon_kakao-id"></i> <c:out value="${ couponUseDtls.mbrNm }"/>
|
||||
</c:when>
|
||||
<c:when test="${ couponUseDtls.joinMthCd eq 'NAVER'}">
|
||||
<i class="icon icon_word-badge_naver"></i> <c:out value="${ couponUseDtls.mbrNm }"/>
|
||||
</c:when>
|
||||
<c:when test="${ couponUseDtls.joinMthCd eq 'pos'}">
|
||||
<i class="icon icon_word-badge_pos"></i> <c:out value="${ couponUseDtls.mbrNm }"/>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:out value="${ couponUseDtls.mbrId }"/>
|
||||
<c:if test="${ not empty couponUseDtls.mbrNm }">
|
||||
<br> <c:out value="${ couponUseDtls.mbrNm }"/>
|
||||
</c:if>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<%-- 발급일 --%>
|
||||
<td><c:out value="${ couponUseDtls.registDt }"/></td>
|
||||
<%-- 인증일/인증번호 --%>
|
||||
<td><c:out value="${ couponUseDtls.oflneCouponCrtnb }"/></td>
|
||||
<%-- 문자 재발송 --%>
|
||||
<td>
|
||||
<c:if test="${ not empty couponUseDtls.oflneCouponCrtnb and couponUseDtls.sndngTrgetTyCd ne '03' }">
|
||||
<button type="button" class="btn xsm outline" onclick="fn_resndng_coupon_crtnb(
|
||||
<c:out value="${ couponUseDtls.dwldCouponInnb }"/>, <c:out
|
||||
value="${ couponUseDtls.oflneCouponCrtnb }"/>); return false;">
|
||||
재발송
|
||||
</button>
|
||||
</c:if>
|
||||
</td>
|
||||
<%-- 혜택 --%>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${ couponUseDtls.bnefDvCd eq '01' || couponUseDtls.bnefDvCd eq '03' }">
|
||||
<span class="fw-500">
|
||||
<c:if test="${ '01' eq couponUseDtls.aditDscntCd }"><fmt:formatNumber value="${ couponUseDtls.aditDscntAmt }" pattern="##" />% 할인</c:if>
|
||||
<c:if test="${ '02' eq couponUseDtls.aditDscntCd }"><fmt:formatNumber value="${ couponUseDtls.aditDscntAmt }" pattern="#,###" />원 할인</c:if>
|
||||
</span><br/>
|
||||
<c:if test="${ '01' eq couponUseDtls.goodsDscntDv }">
|
||||
<span class="gray-8">최대 <fmt:formatNumber value="${ couponUseDtls.dscntMxmmAmt }" pattern="#,###" />원 할인</span>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:when test="${ couponUseDtls.bnefDvCd eq '02' }">
|
||||
<span class="fw-500">
|
||||
<c:if test="${ '01' eq couponUseDtls.dlvyAmtDscntDvCd }">기본배송비 무료,
|
||||
</span>
|
||||
<br>
|
||||
<span class="gray-8">
|
||||
최대 <fmt:formatNumber value="${ couponUseDtls.dlvyAmtMxmmDscntAmt }" pattern="#,###" />원 할인</c:if>
|
||||
</span>
|
||||
<span class="fw-500">
|
||||
<c:if test="${ '02' eq couponUseDtls.dlvyAmtDscntDvCd }">배송비 <fmt:formatNumber value="${ couponUseDtls.dlvyAmtDscntAmt }" pattern="#,###" />원 할인</c:if>
|
||||
</span>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<%-- 할인금액 --%>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${ couponUseDtls.bnefDvCd eq '01' && not empty couponUseDtls.goodsCouponDscntAmt }">
|
||||
<c:out value="${ couponUseDtls.goodsCouponDscntAmt }"/>원
|
||||
</c:when>
|
||||
<c:when test="${ couponUseDtls.bnefDvCd eq '02' && not empty couponUseDtls.dlvyCouponDscntAmt }">
|
||||
<c:out value="${ couponUseDtls.dlvyCouponDscntAmt }"/>원
|
||||
</c:when>
|
||||
<c:when test="${ couponUseDtls.bnefDvCd eq '03' && not empty couponUseDtls.cartCouponDscntAmt }">
|
||||
<c:out value="${ couponUseDtls.cartCouponDscntAmt }"/>원
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<%-- 조회버튼 --%>
|
||||
<td>
|
||||
<button id="coupon-info-pop-trigger" type="button" class="btn xsm outline" onclick="fn_open_modal_coupon_dtl('#modalDiv', '#couponInfoPopup', '<c:out value="/mngr/promtn/coupon/selectCouponInfoInqirePopup"/>', '<c:out value="${ couponUseDtls.dwldCouponInnb }"/>'); return false;">조회</button>
|
||||
</td>
|
||||
<%-- 사용여부 --%>
|
||||
<td>
|
||||
<c:set var="today" value="<%=new java.util.Date()%>" />
|
||||
<c:set var="date"><fmt:formatDate value="${today}" pattern="yyyy-MM-dd hh:mm:ss" /></c:set>
|
||||
<c:choose>
|
||||
<c:when test="${ couponUseDtls.couponSttusCd eq '03' }">
|
||||
<span class="blue-7 fw-500">사용함</span>
|
||||
</c:when>
|
||||
<c:when test="${ couponUseDtls.couponSttusCd eq '02' && couponUseDtls.validpdEndDt gt date }">
|
||||
<span class="red-7 fw-500">미사용</span>
|
||||
</c:when>
|
||||
<c:when test="${ couponUseDtls.couponSttusCd eq '02' && couponUseDtls.validpdEndDt lt date }">
|
||||
<span class="gray-7 fw-500">소멸함</span>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<%-- 사용처리 --%>
|
||||
<td>
|
||||
<c:if test="${ couponUseDtls.couponSttusCd eq '02' }">
|
||||
<button id="coupon-info-pop-trigger" type="button" class="btn xsm outline" onclick="fn_use_coupon_procs(<c:out value="${ couponUseDtls.dwldCouponInnb }"/>); return false;">회수처리</button>
|
||||
</c:if>
|
||||
</td>
|
||||
<%-- 구매상품 --%>
|
||||
<td>
|
||||
<div class="product-search-box__product">
|
||||
<c:if test="${ couponUseDtls.couponSttusCd eq '03' }">
|
||||
<c:choose>
|
||||
<c:when test="${ couponUseDtls.bnefDvCd eq '01'}">
|
||||
<c:if test="${ not empty couponUseDtls.img }">
|
||||
<img src="<c:out value="${ cdnurl }${ couponUseDtls.img }"/>" onerror="this.src='<c:url value="/mngr/images/image_placeholder.png"/>'" width="64" alt="${ couponUseDtls.goodsNm }">
|
||||
</c:if>
|
||||
<div class="d-flex flex-col gap-3">
|
||||
<button type="button" onclick="fn_move_goods_dtl_common(<c:out value="${couponUseDtls.goodsInnb}"/>, 'mngr', '01', '_self')" class="under-line"><c:out value="${ couponUseDtls.goodsNm }"/></button>
|
||||
<c:if test="${ not empty couponUseDtls.ordrInnb }">
|
||||
<button type="button" onclick="fn_go_ordr_dtl('<c:out value="${ couponUseDtls.ordrInnb }"/>', '<c:out value="${ couponUseDtls.couponSopmalCd }"/>')" class="under-line stone-8">[<c:out value="${ couponUseDtls.ordrInnb }"/>]</button>
|
||||
</c:if>
|
||||
</div>
|
||||
</c:when>
|
||||
<c:when test="${ couponUseDtls.bnefDvCd eq '02'}">
|
||||
<img src="<c:out value="${ cdnurl }${ couponUseDtls.img }"/>" onerror="this.src='<c:url value="/mngr/images/image_placeholder.png"/>'" width="64" alt="${ couponUseDtls.goodsNm }">
|
||||
<div class="d-flex flex-col gap-3">
|
||||
<c:if test="${ not empty couponUseDtls.ordrInnb }">
|
||||
<button type="button" onclick="fn_go_ordr_dtl('<c:out value="${ couponUseDtls.ordrInnb }"/>', '<c:out value="${ couponUseDtls.couponSopmalCd }"/>')" class="under-line stone-8">[<c:out value="${ couponUseDtls.ordrInnb }"/>]</button>
|
||||
</c:if>
|
||||
</div>
|
||||
</c:when>
|
||||
<c:when test="${ couponUseDtls.bnefDvCd eq '03'}">
|
||||
<c:if test="${ not empty couponUseDtls.ordrInnb }">
|
||||
<button type="button" onclick="fn_go_ordr_dtl('<c:out value="${ couponUseDtls.ordrInnb }"/>', '<c:out value="${ couponUseDtls.couponSopmalCd }"/>')" class="under-line stone-8">[<c:out value="${ couponUseDtls.ordrInnb }"/>]</button>
|
||||
</c:if>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
</div>
|
||||
</td>
|
||||
<%-- 사용일 --%>
|
||||
<td><c:out value="${ couponUseDtls.dtlsRegistDt }"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="100%" ><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_search_coupon_use_history_pop" />
|
||||
</div>
|
||||
<div id="modalDiv">
|
||||
</div>
|
||||
@@ -0,0 +1,134 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui" %>
|
||||
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld"%>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
/******************************************************
|
||||
* 검색 : 엔터 키 검색
|
||||
*******************************************************/
|
||||
$('#popupListForm').on('keydown', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
$('#searchCouponUseDtlsBtn').trigger("click");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
let pageIndex = '<c:out value="${ resultMap.paramVO.pageIndex }"/>';
|
||||
let pageUnit = '<c:out value="${ resultMap.paramVO.pageUnit }"/>';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<%-- fn_open_modal_coupon_dtl(); --%>
|
||||
|
||||
$('#allDays').on('click', function() {
|
||||
$('#srchStartDate, #srchEndDate').val('');
|
||||
});
|
||||
|
||||
fn_set_datepicker('.datepicker');
|
||||
|
||||
|
||||
var dateRangeBtn = $(".dateRange-btn");
|
||||
dateRangeBtn.click(function (e) {
|
||||
if (e.detail === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
var otherBtn = $(this).siblings();
|
||||
otherBtn.removeClass("selected");
|
||||
$(this).addClass("selected");
|
||||
});
|
||||
|
||||
|
||||
|
||||
fn_set_date('srchStartDate','srchEndDate','srchEndDate');
|
||||
|
||||
$('.dateRange-btn').filter('#oneMonth').trigger('click');
|
||||
fn_search_coupon_use_history_pop(pageIndex, pageUnit);
|
||||
|
||||
$('.dateRange-btn').filter('#oneMonth').trigger('click');
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<!-- 쿠폰 발급내역 모달 -->
|
||||
<div id="couponUseHistory" class="modal" style="max-width: none;">
|
||||
<div class="modal-header">
|
||||
<h4>쿠폰 발급내역</h4>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<form id="popupListForm" name="popupListForm" method="post" >
|
||||
<div class="modal-search-area">
|
||||
<div class="modal-searchBar">
|
||||
<div class="modal-searchBar__inner">
|
||||
<input class="modal-searchBar__input" type="text" id="searchKeyword" name="searchKeyword" title="검색어 입력" placeholder="회원 아이디, 회원명을 검색하세요.">
|
||||
<button class="modal-searchBar__btn" id="searchCouponUseDtlsBtn" type="button" onclick="fn_search_coupon_use_history_pop(1); return false;"><span class="visually-hidden">검색</span></button>
|
||||
</div>
|
||||
<input type="hidden" id="couponInnb" name="couponInnb" />
|
||||
<input type="hidden" id="couponSndngInnb" name="couponSndngInnb" value="<c:out value="${ resultMap.paramVO.couponSndngInnb }"/>" />
|
||||
<input type="hidden" id="pageIndexCouponUsedDtls" name="pageIndex" value="1"/>
|
||||
<input type="hidden" id="pageUnitCouponUsedDtls" name="pageUnit" value="10"/>
|
||||
<input type="hidden" id="sopmalCd" name="sopmalCd"/>
|
||||
</div>
|
||||
<div class="d-flex gap-10">
|
||||
<div class="input-container">
|
||||
<input type="text" name="srchStartDate" id="srchStartDate" class="datepicker" title="시작 날짜 선택" autocomplete="off" pattern="yyyy-MM-dd">
|
||||
<span class="tilde">~</span>
|
||||
<input type="text" name="srchEndDate" id="srchEndDate" class="datepicker" title="종료 날짜 선택" autocomplete="off" pattern="yyyy-MM-dd">
|
||||
</div>
|
||||
|
||||
<div class="dateRange-btnContainer">
|
||||
<button type="button" class="dateRange-btn" id="yesterday" onclick="fn_set_date('srchStartDate','srchEndDate','srchEndDate','1D')">어제</button>
|
||||
<button type="button" class="dateRange-btn" id="today" onclick="fn_set_date('srchStartDate','srchEndDate','srchEndDate','0')">오늘</button>
|
||||
<button type="button" class="dateRange-btn" id="threeDays" onclick="fn_set_date('srchStartDate','srchEndDate','srchEndDate','3D')">3일간</button>
|
||||
<button type="button" class="dateRange-btn" id="sevenDays" onclick="fn_set_date('srchStartDate','srchEndDate','srchEndDate','7D')">일주일</button>
|
||||
<button type="button" class="dateRange-btn" id="oneMonth" onclick="fn_set_date('srchStartDate','srchEndDate','srchEndDate','1M')">1개월</button>
|
||||
<button type="button" class="dateRange-btn" id="threeMonth" onclick="fn_set_date('srchStartDate','srchEndDate','srchEndDate','3M')">3개월</button>
|
||||
<button type="button" class="dateRange-btn" id="sixMonth" onclick="fn_set_date('srchStartDate','srchEndDate','srchEndDate','6M')">6개월</button>
|
||||
<button type="button" class="dateRange-btn" id="oneYear" onclick="fn_set_date('srchStartDate','srchEndDate','srchEndDate','1Y')">1년</button>
|
||||
<button type="button" class="dateRange-btn" id="allDays">전체</button>
|
||||
</div>
|
||||
<div class="b-checkbox-container" id="couponSndngTyDiv">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" name="srchUseAt" value="03" >
|
||||
<span class="check"></span>
|
||||
<span class="control-label">쿠폰 사용여부</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="couponAjaxList">
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">닫기</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
</script>
|
||||
152
src/main/webapp/WEB-INF/views/mngr/promtn/coupon/CouponListR.jsp
Normal file
152
src/main/webapp/WEB-INF/views/mngr/promtn/coupon/CouponListR.jsp
Normal file
@@ -0,0 +1,152 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
|
||||
|
||||
<%--
|
||||
Class Name : CouponListR.jsp
|
||||
Description : 쿠폰 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-11-28 추지훈 최초 생성
|
||||
--%>
|
||||
|
||||
<%-- 쿠폰 목록 조회 영역 START --%>
|
||||
<section class="content-section">
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
<div class="search-number">
|
||||
<span class="search-number__text">총 <strong><c:out value="${ resultMap.paginationInfo.totalRecordCount }"/></strong>건</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="select-box">
|
||||
<select id="pageUnit" name="pageUnit" title="페이지당 출력될 목록건수" onchange="console.log('test'); fn_select_coupon_list('1');">
|
||||
<c:forEach items="${ resultMap.paginationInfo.pageUnitArr }" var="pageUnit" varStatus="pageUnitStatus">
|
||||
<option value="<c:out value="${ pageUnit }"/>" <c:if test="${ resultMap.paginationInfo.recordCountPerPage eq pageUnit}">selected="selected"</c:if>><c:out value="${ pageUnit }"/>개씩</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="spacing">
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<!-- 각 열 width 설정 -->
|
||||
<colgroup>
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 14%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 12%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>쿠폰 고유번호</th>
|
||||
<th>쿠폰 혜택</th>
|
||||
<th>쿠폰 명</th>
|
||||
<th>혜택</th>
|
||||
<th>온/오프라인</th>
|
||||
<th>사용여부</th>
|
||||
<th>등록일</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultList && fn:length(resultMap.resultList) > 0 }">
|
||||
<c:forEach items="${ resultMap.resultList }" var="couponList" varStatus="status">
|
||||
<tr>
|
||||
<td><c:out value="${ resultMap.paginationInfo.totalRecordCount - couponList.rnum + 1 }" /></td>
|
||||
<td><c:out value="${ couponList.couponInnb }" /></td>
|
||||
<td>
|
||||
<span class="fw-300"><c:out value="${ couponList.bnefDvNm }"/></span>
|
||||
</td>
|
||||
<td class="left">
|
||||
<span class="under-line" onclick="fn_move_dtl_uptpage(<c:out value="${ couponList.couponInnb }" />, <c:out value="${resultMap.paramVO.pageIndex}" />, <c:out value="${resultMap.paramVO.recordCountPerPage}" />, <c:out value="${resultMap.paramVO.pageUnit}" />)">
|
||||
<c:out value="${couponList.coupNm}" />
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${ couponList.bnefDvCd eq '01' || couponList.bnefDvCd eq '03' }">
|
||||
<span class="fw-500">
|
||||
<fmt:formatNumber value="${ couponList.aditDscntAmt }" pattern="#,###" />
|
||||
<c:if test="${ '01' eq couponList.aditDscntCd }">% 할인</c:if>
|
||||
<c:if test="${ '02' eq couponList.aditDscntCd }">원 할인</c:if>
|
||||
</span><br/>
|
||||
<c:if test="${ '01' eq couponList.aditDscntCd }">
|
||||
<span class="gray-8">최대 <fmt:formatNumber value="${ couponList.dscntMxmmAmt }" pattern="#,###" />원 할인</span>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:when test="${ couponList.bnefDvCd eq '02' }">
|
||||
<span class="fw-500">
|
||||
<c:if test="${ '01' eq couponList.dlvyAmtDscntDvCd }">기본배송비 무료,
|
||||
</span>
|
||||
<br>
|
||||
<span class="gray-8">
|
||||
최대 <fmt:formatNumber value="${ couponList.dlvyAmtMxmmDscntAmt }" pattern="#,###" />원 할인</c:if>
|
||||
</span>
|
||||
<span class="fw-500">
|
||||
<c:if test="${ '02' eq couponList.dlvyAmtDscntDvCd }">배송비 <fmt:formatNumber value="${ couponList.dlvyAmtDscntAmt }" pattern="#,###" />원 할인</c:if>
|
||||
</span>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>
|
||||
<span class="fw-300">${ couponList.useEnvrnCdNm }</span>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${couponList.couponUseAt eq 'Y'}">
|
||||
<span class="blue-7 fw-500">사용함</span>
|
||||
</c:when>
|
||||
<c:when test="${couponList.couponUseAt eq 'N'}">
|
||||
<span class="red-7 fw-500">미사용</span>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>
|
||||
<fmt:parseDate var="registDe" value="${couponList.registDe}" pattern="yyyy-MM-dd"/>
|
||||
<span><fmt:formatDate value="${registDe}" pattern="yyyy-MM-dd"/></span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<button class="btn xsm light-gray" type="button" onclick="fn_go_copypage(<c:out value="${ couponList.couponInnb }" />, <c:out value="${resultMap.paramVO.pageIndex}" />, <c:out value="${resultMap.paramVO.recordCountPerPage}" />, <c:out value="${resultMap.paramVO.pageUnit}" />); return false;">복사</button>
|
||||
<button class="btn xsm dark" type="button" onclick="fn_delete_coupon('<c:out value="${ couponList.couponInnb }"/>'); return false;"><spring:message code="button.delete"/></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="100%" ><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_coupon_list" />
|
||||
</div>
|
||||
<%-- 쿠폰 목록 조회 영역 END --%>
|
||||
@@ -0,0 +1,348 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
|
||||
|
||||
<%--
|
||||
Class Name : CouponListR.jsp
|
||||
Description : 쿠폰 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-11-28 추지훈 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function(){
|
||||
|
||||
$('#listForm').on('keydown', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
$('#searchBtn').trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
let pageIndex = '<c:out value="${ resultMap.paramVO.pageIndex }"/>';
|
||||
let pageUnit = '<c:out value="${ resultMap.paramVO.pageUnit }"/>';
|
||||
|
||||
|
||||
fn_select_coupon_list(pageIndex, pageUnit);
|
||||
|
||||
updateBnefDvCheck();
|
||||
|
||||
function updateBnefDvCheck() {
|
||||
var checkBoxAll = true;
|
||||
|
||||
$('#bnefSearchDiv input[name="searchBnefDv"]').each(function() {
|
||||
if (!$(this).prop('checked')) {
|
||||
checkBoxAll = false;
|
||||
}
|
||||
});
|
||||
|
||||
$('#bnefSearchDiv .check-all input[type="checkbox"]').prop('checked', checkBoxAll);
|
||||
}
|
||||
|
||||
// 혜택 구분 체크박스 제어
|
||||
$('#bnefSearchDiv input[name="searchBnefDv"]').click(function() {
|
||||
updateBnefDvCheck();
|
||||
});
|
||||
|
||||
updateUseEnvrnCheck();
|
||||
|
||||
function updateUseEnvrnCheck() {
|
||||
checkBoxAll = true;
|
||||
|
||||
$('#useEnvrnSearchDiv input[name="searchUseEnvrnCd"]').each(function() {
|
||||
if (!$(this).prop('checked')) {
|
||||
checkBoxAll = false;
|
||||
}
|
||||
});
|
||||
|
||||
$('#useEnvrnSearchDiv .check-all input[type="checkbox"]').prop('checked', checkBoxAll);
|
||||
}
|
||||
|
||||
|
||||
// 사용환경 체크박스 제어
|
||||
$('#useEnvrnSearchDiv input[name="searchUseEnvrnCd"]').click(function() {
|
||||
updateUseEnvrnCheck();
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* 쿠폰 조회
|
||||
*/
|
||||
const fn_select_coupon_list = function(pageIndex, pageUnit) {
|
||||
|
||||
|
||||
let dataStr;
|
||||
if(!pageIndex) {
|
||||
$('#pageIndex').val(1);
|
||||
} else {
|
||||
$('#pageIndex').val(pageIndex);
|
||||
}
|
||||
|
||||
if(!pageUnit) {
|
||||
dataStr = $('#listForm').serialize();
|
||||
} else {
|
||||
if($('#pageUnit').length){
|
||||
$('#pageUnit').val(pageUnit);
|
||||
dataStr = $('#listForm').serialize();
|
||||
} else {
|
||||
dataStr = $('#listForm').serialize()+'&pageUnit='+pageUnit;
|
||||
}
|
||||
}
|
||||
|
||||
$('#pageIndex').val(pageIndex);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url : "<c:url value="/mngr/promtn/coupon/selectCouponListInqire"/>",
|
||||
data : dataStr,
|
||||
success:function(resultHtml) {
|
||||
$('#pageDiv').html(resultHtml);
|
||||
$('#pageUnit').niceSelect();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰 등록 폼 이동
|
||||
*/
|
||||
const fn_move_regpage = function() {
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/coupon/selectCouponRegistForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰 상세 수정 이동
|
||||
*/
|
||||
const fn_move_dtl_uptpage = function(couponInnb) {
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/coupon/selectCouponDtlUpdtForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#couponInnb').val(couponInnb);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰 복사 폼 이동
|
||||
*/
|
||||
const fn_go_copypage = function(couponInnb) {
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/coupon/selectCouponCopyForm"/>');
|
||||
$('#listForm').attr('method', 'get');
|
||||
$('#couponInnb').val(couponInnb);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/**
|
||||
* 쿠폰 삭제
|
||||
*/
|
||||
const fn_delete_coupon = function(couponInnb) {
|
||||
if (confirm('쿠폰을 <spring:message code="confirm.common.delete"/>')) {
|
||||
$('#couponInnb').val(couponInnb);
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '<c:url value="/mngr/promtn/coupon/deleteCouponDel"/>',
|
||||
data : $('#listForm').serialize(),
|
||||
success : function(data) {
|
||||
alert('<spring:message code="success.common.delete"/>');
|
||||
fn_select_coupon_list(1);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 검색 후 새로 고침 시 검색조건 리셋
|
||||
*/
|
||||
history.replaceState({}, null, location.pathname);
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%-- 상단메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Header.jsp"%>
|
||||
<main class="main">
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Left.jsp"%>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">쿠폰 리스트</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<button class="btn primary" id="moveRegist" type="button" onclick="fn_move_regpage(1); return false;">쿠폰 <spring:message code="button.insert"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<form id="listForm" name="listForm" method="post" action="<c:url value="/mngr/promtn/coupon/selectCouponListInqireForm"/>">
|
||||
<input type="hidden" id="couponInnb" name="couponInnb"/>
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.paramVO.pageIndex }"/>"/>
|
||||
<input type="hidden" id="recordCountPerPage" name="recordCountPerPage" value="<c:out value="${ resultMap.paramVO.recordCountPerPage }"/>"/>
|
||||
<input type="hidden" id="sopmalCd" name="sopmalCd"/>
|
||||
<%-- 쿠폰 검색 영역 START --%>
|
||||
<section class="content-section" id="couponSearchForm">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>쿠폰 명</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" id="searchCoupNm" name="searchCoupNm" title="쿠폰명" value="<c:out value="${ resultMap.paramVO.searchCoupNm }" />" oninput="if (this.value.length > 10) this.value = this.value.slice(0, 50);">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>쿠폰 사용제한</th>
|
||||
<td>
|
||||
|
||||
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-22" name="searchOtrCouponSmtmUseAt" value=""
|
||||
<c:if test="${ empty resultMap.paramVO.searchOtrCouponSmtmUseAt}">checked="checked"</c:if>
|
||||
>
|
||||
<label for="r-22">전체</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-23" name="searchOtrCouponSmtmUseAt" value="Y"
|
||||
<c:if test="${ 'Y' eq resultMap.paramVO.searchOtrCouponSmtmUseAt }">checked="checked"</c:if>
|
||||
>
|
||||
<label for="r-23">단독 사용</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-24" name="searchOtrCouponSmtmUseAt" value="N"
|
||||
<c:if test="${ 'N' eq resultMap.paramVO.searchOtrCouponSmtmUseAt }">checked="checked"</c:if>
|
||||
>
|
||||
<label for="r-24">공동 사용</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<th>사용여부</th>
|
||||
<td>
|
||||
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-25" name="searchUseAt" value="" <c:if test="${ empty resultMap.paramVO.searchUseAt}">checked="checked"</c:if>>
|
||||
<label for="r-25">전체</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-26" name="searchUseAt" value="Y" <c:if test="${ 'Y' eq resultMap.paramVO.searchUseAt }">checked="checked"</c:if>>
|
||||
<label for="r-26">사용</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-27" name="searchUseAt" value="N" <c:if test="${ 'N' eq resultMap.paramVO.searchUseAt }">checked="checked"</c:if>>
|
||||
<label for="r-27">미사용</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사용환경</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="b-checkbox-container" id="useEnvrnSearchDiv">
|
||||
<label class="b-checkbox checkbox check-all">
|
||||
<input type="checkbox" value="" id="useEnvrnCheckAll" >
|
||||
<span class="check"></span>
|
||||
<span class="control-label">전체</span>
|
||||
</label>
|
||||
<c:forEach var="codeList" items="${ resultMap.useEnvrnCdList }" varStatus="">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" name="searchUseEnvrnCd" value="<c:out value="${ codeList.cd }"/>" <c:if test="${ fn:contains(resultMap.paramVO.searchUseEnvrnCd, codeList.cd) }">checked="checked"</c:if>>
|
||||
<span class="check"></span>
|
||||
<span class="control-label"><c:out value="${ codeList.cdNm}" /></span>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>쿠폰 혜택</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="b-checkbox-container" id="bnefSearchDiv">
|
||||
<label class="b-checkbox checkbox check-all">
|
||||
<input type="checkbox" value="" <c:if test="${ fn:contains(resultMap.paramVO.searchBnefDv, '01, 02, 03')}">checked="checked"</c:if>>
|
||||
<span class="check"></span>
|
||||
<span class="control-label">전체</span>
|
||||
</label>
|
||||
<c:forEach var="codeList" items="${ resultMap.benfDvCdList }" varStatus="">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" name="searchBnefDv" value="<c:out value="${ codeList.cd }"/>" <c:if test="${ fn:contains(resultMap.paramVO.searchBnefDv, codeList.cd) }">checked="checked"</c:if>>
|
||||
<span class="check"></span>
|
||||
<span class="control-label"><c:out value="${ codeList.cdNm}" /></span>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container">
|
||||
<div class="left"></div>
|
||||
<div class="center">
|
||||
<button class="btn outline" id="resetBtn" type="button" onclick="fn_reset_form('couponSearchForm'); return false;">초기화</button>
|
||||
<button class="btn primary" id="searchBtn" type="button" onkeypress="this.onclick();" onclick="fn_select_coupon_list(1); return false;">검색</button>
|
||||
</div>
|
||||
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<%-- 쿠폰 검색 영역 END --%>
|
||||
<div id="pageDiv">
|
||||
</div>
|
||||
</form>
|
||||
<%-- 하단 스크롤 완료 시 위로가기 버튼 출력 : 2023-11-30 / 박철민 추가 --%>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
2127
src/main/webapp/WEB-INF/views/mngr/promtn/coupon/CouponPkRegistC.jsp
Normal file
2127
src/main/webapp/WEB-INF/views/mngr/promtn/coupon/CouponPkRegistC.jsp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,161 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
|
||||
|
||||
<%--
|
||||
Class Name : CouponPkSndngListR.jsp
|
||||
Description : 쿠폰발송 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024-01-12 추지훈 최초 생성
|
||||
|
||||
--%>
|
||||
|
||||
|
||||
<%-- 쿠폰 목록 조회 영역 START --%>
|
||||
<section class="content-section">
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
<div class="search-number">
|
||||
<span class="search-number__text">총 <strong><c:out value="${ resultMap.paginationInfo.totalRecordCount }"/></strong>건</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="center">
|
||||
<%--
|
||||
<button class="btn outline" type="button" onclick="fn_open_modal_ordruse_dtls('#orderCouponDiv', '#couponUseHistory', '<c:url value="/mngr/promtn/coupon/selectOrderCouponUseDtlsPopupForm"/>', '2024011115131717889'); return false;">
|
||||
주문쿠폰사용내역 통합주문 목록에서 테스트
|
||||
</button>
|
||||
--%>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="select-box">
|
||||
<select id="pageUnit" name="pageUnit" title="페이지당 출력될 목록건수" onchange="console.log('test'); fn_select_couponSndng_list('1');">
|
||||
<c:forEach items="${ resultMap.paginationInfo.pageUnitArr }" var="pageUnit" varStatus="pageUnitStatus">
|
||||
<option value="<c:out value="${ pageUnit }"/>" <c:if test="${ resultMap.paginationInfo.recordCountPerPage eq pageUnit}">selected="selected"</c:if>><c:out value="${ pageUnit }"/>개씩</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="spacing">
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<!-- 각 열 width 설정 -->
|
||||
<colgroup>
|
||||
<col style="width: 5%;">
|
||||
<col style="width: 5%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 8%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 10;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 6%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>쿠폰팩 고유번호</th>
|
||||
<th>발송구분</th>
|
||||
<th>발송유형</th>
|
||||
<th>발송일시구분</th>
|
||||
<th>쿠폰(팩) 발송명</th>
|
||||
<th>사용여부</th>
|
||||
<th>사용내역</th>
|
||||
<th>등록일</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultList && fn:length(resultMap.resultList) > 0 }">
|
||||
<c:forEach items="${ resultMap.resultList }" var="couponPkSndngList" varStatus="status">
|
||||
<tr>
|
||||
<c:set var="pageSize" value="${resultMap.paginationInfo.recordCountPerPage}" />
|
||||
<c:set var="currentPage" value="${resultMap.paginationInfo.currentPageNo}" />
|
||||
<c:set var="totalCount" value="${resultMap.paginationInfo.totalRecordCount}" />
|
||||
<c:set var="currentRowNum" value="${(currentPage - 1) * pageSize + couponPkSndngList.rnum}" />
|
||||
<c:set var="descRowNum" value="${totalCount - currentRowNum + 1}" />
|
||||
<td>
|
||||
|
||||
<%-- <c:out value="${ resultMap.paginationInfo.totalRecordCount - couponPkSndngList.rnum + 1 }" />--%>
|
||||
<%-- 쿠폰 발송만 속도 개선때문에 예외적으로 rownum 방식이 다름 (2025-06-12) --%>
|
||||
<c:out value="${ descRowNum }" />
|
||||
<input type="hidden" id="couponSndngInnb" name="couponSndngInnb" value="<c:out value="${ couponPkSndngList.couponSndngInnb }" />"/>
|
||||
</td>
|
||||
<td>${ couponPkSndngList.couponSndngInnb }</td>
|
||||
<td>
|
||||
<c:out value="${ couponPkSndngList.couponSndngDvCdNm }" />
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${ couponPkSndngList.couponSndngTyCdNm }" />
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${ couponPkSndngList.sndngDtDvCdNm }" />
|
||||
</td>
|
||||
<td>
|
||||
<span class="under-line" onclick="fn_move_dtl_uptpage(<c:out value="${ couponPkSndngList.couponSndngInnb }"/>)">
|
||||
<c:out value="${couponPkSndngList.couponSndngNm}" />
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${couponPkSndngList.couponSndngUseAt eq 'Y'}">
|
||||
<span class="blue-7 fw-500">사용함</span>
|
||||
</c:when>
|
||||
<c:when test="${couponPkSndngList.couponSndngUseAt eq 'N'}">
|
||||
<span class="red-7 fw-500">미사용</span>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<%-- <c:if test="${ couponPkSndngList.isYn eq 'Y' && ( couponPkSndngList.couponSndngTy eq '01' || couponPkSndngList.couponSndngTy eq '03' ) && couponPkSndngList.couponSndngUseAt eq 'Y' && ( couponPkSndngList.sndngDtDvCd eq '01' || couponPkSndngList.sndngDtDvCd eq '02' ) }">--%>
|
||||
<c:if test="${ couponPkSndngList.crtDvCd ne '01' && couponPkSndngList.isYn eq 'Y' && ( couponPkSndngList.couponSndngTy eq '01' || couponPkSndngList.couponSndngTy eq '03' ) && couponPkSndngList.couponSndngUseAt eq 'Y' && ( couponPkSndngList.sndngDtDvCd eq '01' ) }">
|
||||
<button class="btn xsm primary outline" type="button" onclick="fn_coupon_sndng_regist_popup('#couponSndngDiv', '#coupon_sndng_popup', '/mngr/promtn/coupon/insertCouponSndngRegistPopup', '<c:out value="${couponPkSndngList.couponSndngInnb}"/>', '<c:out value="${couponPkSndngList.couponSndngTy}"/>' );">
|
||||
발급하기
|
||||
</button>
|
||||
</c:if>
|
||||
<button class="btn xsm gray" type="button" onclick="fn_open_modal_sndng_dtls('#orderCouponDiv', '#couponUseHistory', '<c:url value="/mngr/promtn/coupon/selectCouponIssuUseDtls"/>', '<c:out value="${ couponPkSndngList.couponSndngInnb }"/>'); return false;">
|
||||
발급[<c:out value="${ couponPkSndngList.sndngCnt }"/>건] / 사용[<c:out value="${ couponPkSndngList.usedCnt }"/>건]
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<fmt:parseDate var="registDe" value="${couponPkSndngList.registDe}" pattern="yyyy-MM-dd"/>
|
||||
<span><fmt:formatDate value="${registDe}" pattern="yyyy-MM-dd"/></span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<c:if test="${couponPkSndngList.sndngDtDvCd eq '01' || couponPkSndngList.sndngDtDvCd eq '02'}">
|
||||
<button class="btn xsm dark" type="button" onclick="fn_delete_couponSndng('<c:out value="${couponPkSndngList.couponSndngInnb}"/>'); return false;"><spring:message code="button.delete"/></button>
|
||||
</c:if>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="100%" ><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_couponSndng_list" />
|
||||
</div>
|
||||
<%-- 쿠폰발송 목록 조회 영역 END --%>
|
||||
@@ -0,0 +1,848 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
|
||||
|
||||
<%--
|
||||
Class Name : CouponPkSndngListR.jsp
|
||||
Description : 쿠폰(팩) 발송 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-12-27 추지훈 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function(){
|
||||
|
||||
|
||||
|
||||
|
||||
$('select').niceSelect();
|
||||
|
||||
$('#listForm').on('keydown', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
$('#searchBtn').trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
$('#popupListForm').on('keydown', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
$('#searchBtn').trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
let pageIndex = '<c:out value="${ resultMap.paramVO.pageIndex }"/>';
|
||||
let pageUnit = '<c:out value="${ resultMap.paramVO.pageUnit }"/>';
|
||||
|
||||
|
||||
fn_select_couponSndng_list(pageIndex, pageUnit);
|
||||
|
||||
isCheckedCouponSndngTy();
|
||||
|
||||
// 발송 유형 체크박스 제어 함수
|
||||
function isCheckedCouponSndngTy() {
|
||||
var checkBoxAll = true;
|
||||
|
||||
$('#couponSndngTyDiv input[name="searchCouponSndngTy"]').each(function() {
|
||||
if (!$(this).prop('checked')) {
|
||||
checkBoxAll = false;
|
||||
}
|
||||
});
|
||||
|
||||
$('#couponSndngTyDiv .check-all input[type="checkbox"]').prop('checked', checkBoxAll);
|
||||
}
|
||||
|
||||
// 발송 유형 체크박스 제어
|
||||
|
||||
$('#couponSndngTyDiv input[name="searchCouponSndngTy"]').click(function() {
|
||||
isCheckedCouponSndngTy();
|
||||
});
|
||||
|
||||
|
||||
|
||||
isCheckedCouponSndngDtDv();
|
||||
|
||||
// 발송 유형 체크박스 제어 함수
|
||||
function isCheckedCouponSndngDtDv() {
|
||||
var checkBoxAll = true;
|
||||
|
||||
$('#couponSndngDtDvDiv input[name="searchSndngDtDv"]').each(function() {
|
||||
if (!$(this).prop('checked')) {
|
||||
checkBoxAll = false;
|
||||
}
|
||||
});
|
||||
|
||||
$('#couponSndngDtDvDiv .check-all input[type="checkbox"]').prop('checked', checkBoxAll);
|
||||
}
|
||||
|
||||
// 발송 유형 체크박스 제어
|
||||
|
||||
$('#couponSndngDtDvDiv input[name="searchSndngDtDv"]').click(function() {
|
||||
isCheckedCouponSndngDtDv();
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$("#selectMbrBtn").on("click",function(){
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
$("#srchMbrBtn").on("click", function () {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* 쿠폰발송 등록 폼 이동
|
||||
*/
|
||||
const fn_move_regpage = function(pageIndex) {
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/coupon/selectCouponPkSndngRegistForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰 발송 조회
|
||||
*/
|
||||
const fn_select_couponSndng_list = function(pageIndex, pageUnit) {
|
||||
|
||||
let dataStr;
|
||||
if(!pageIndex) {
|
||||
$('#pageIndex').val(1);
|
||||
} else {
|
||||
$('#pageIndex').val(pageIndex);
|
||||
}
|
||||
|
||||
if(!pageUnit) {
|
||||
dataStr = $('#listForm').serialize();
|
||||
} else {
|
||||
if($('#pageUnit').length){
|
||||
$('#pageUnit').val(pageUnit);
|
||||
dataStr = $('#listForm').serialize();
|
||||
} else {
|
||||
dataStr = $('#listForm').serialize()+'&pageUnit='+pageUnit;
|
||||
}
|
||||
}
|
||||
|
||||
$('#pageIndex').val(pageIndex);
|
||||
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url : "<c:url value="/mngr/promtn/coupon/selectCouponPkSndngListInqire"/>",
|
||||
data : dataStr,
|
||||
success:function(resultHtml) {
|
||||
$('#pageDiv').html(resultHtml);
|
||||
$('#pageUnit').niceSelect();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 쿠폰(팩)발송 삭제
|
||||
*/
|
||||
const fn_delete_couponSndng = function(couponSndngInnb) {
|
||||
if (confirm('쿠폰(팩) 발송을 <spring:message code="confirm.common.delete"/>')) {
|
||||
$('#couponSndngInnb').val(couponSndngInnb);
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '<c:url value="/mngr/promtn/coupon/deleteCouponPkSndngDel"/>',
|
||||
data : $('#listForm').serialize(),
|
||||
success : function(data) {
|
||||
alert('<spring:message code="success.common.delete"/>');
|
||||
fn_select_couponSndng_list(1);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰(팩) 발송 상세 수정 이동
|
||||
*/
|
||||
const fn_move_dtl_uptpage = function(couponSndngInnb) {
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/coupon/selectCouponPkSndngDtlUpdtForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#couponSndngInnb').val(couponSndngInnb);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰 사용 내역 : 검색 ajax
|
||||
*/
|
||||
const fn_search_coupon_use_history_pop = function (pageIndex, pageUnit) {
|
||||
|
||||
|
||||
// 페이지정보가 넘어오지 않았을 경우 기본값 초기화
|
||||
let dataStr;
|
||||
if(!pageIndex) {
|
||||
$('#pageIndexCouponUsedDtls').val(1);
|
||||
} else {
|
||||
$('#popupListForm').find('input[name="pageIndex"]').eq(0).val(pageIndex);
|
||||
}
|
||||
|
||||
if(!pageUnit) {
|
||||
dataStr = $('#popupListForm').serialize();
|
||||
} else {
|
||||
if($('#pageUnitCouponUsedDtls').length){
|
||||
$('#popupListForm').find('input[name=pageUnit]').eq(0).val(pageUnit);
|
||||
dataStr = $('#popupListForm').serialize();
|
||||
} else {
|
||||
dataStr = $('#popupListForm').serialize()+'&pageUnitCouponUsedDtls='+pageUnit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<c:url value="/mngr/promtn/coupon/selectCouponIssuUseDtlsInqire"/>',
|
||||
data: dataStr,
|
||||
success: function(data) {
|
||||
$('#couponAjaxList').empty();
|
||||
$('#couponAjaxList').html(data);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/************************************************
|
||||
* 발송 쿠폰 사용 내역
|
||||
*************************************************/
|
||||
const fn_open_modal_sndng_dtls = function(modalDivSltr, modalSlrt, url, param){
|
||||
|
||||
var couponSndngInnb = param
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: url,
|
||||
data: {
|
||||
couponSndngInnb : couponSndngInnb
|
||||
},
|
||||
success: function (data) {
|
||||
$(modalSlrt).remove();
|
||||
$(modalDivSltr).html(data);
|
||||
$(modalSlrt).modal();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/************************************************
|
||||
* 쿠폰 상세 정보 조회 팝업
|
||||
*************************************************/
|
||||
const fn_open_modal_coupon_dtl = function(modalDivSltr, modalSlrt, url, param){
|
||||
var dwldCouponInnb = param
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: url,
|
||||
data: {
|
||||
dwldCouponInnb : dwldCouponInnb
|
||||
},
|
||||
success: function (data) {
|
||||
|
||||
$(modalSlrt).remove();
|
||||
$(modalDivSltr).html(data);
|
||||
$(modalSlrt).modal();
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/************************************************
|
||||
* 주문 쿠폰 사용 내역 팝업 : 검색조회.ajax
|
||||
*************************************************/
|
||||
const fn_search_ordr_coupon_use_history_pop = function (pageIndex, pageUnit) {
|
||||
|
||||
// 페이지정보가 넘어오지 않았을 경우 기본값 초기화
|
||||
let dataStr;
|
||||
if(!pageIndex) {
|
||||
$('#pageIndexOrdrDtls').val(1);
|
||||
} else {
|
||||
$('#ordrUseCouponDtlsForm').find('input[name="pageIndex"]').eq(0).val(pageIndex);
|
||||
}
|
||||
|
||||
if(!pageUnit) {
|
||||
dataStr = $('#ordrUseCouponDtlsForm').serialize();
|
||||
} else {
|
||||
if($('#pageUnitOrdrDtls').length){
|
||||
$('#ordrUseCouponDtlsForm').find('input[name=pageUnit]').eq(0).val(pageUnit);
|
||||
dataStr = $('#ordrUseCouponDtlsForm').serialize();
|
||||
} else {
|
||||
dataStr = $('#ordrUseCouponDtlsForm').serialize()+'&pageUnitOrdrDtls='+pageUnit;
|
||||
}
|
||||
}
|
||||
|
||||
// 모달 쿠폰 검색
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<c:url value="/mngr/promtn/coupon/selectOrderCouponUseDtlsPopup"/>',
|
||||
data: dataStr,
|
||||
success: function(data) {
|
||||
$('#couponAjaxList').empty();
|
||||
$('#couponAjaxList').html(data);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/************************************************
|
||||
* 주문 쿠폰 사용 내역 팝업
|
||||
*************************************************/
|
||||
const fn_open_modal_ordruse_dtls = function(modalDivSltr, modalSlrt, url, param){
|
||||
var ordrInnb = param
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: url,
|
||||
data: {
|
||||
ordrInnb : ordrInnb
|
||||
},
|
||||
success: function (data) {
|
||||
$(modalSlrt).remove();
|
||||
$(modalDivSltr).html(data);
|
||||
$(modalSlrt).modal();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/****************************************************
|
||||
* 검색 후 새로 고침 시 검색조건 리셋
|
||||
*****************************************************/
|
||||
history.replaceState({}, null, location.pathname);
|
||||
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* 쿠폰 발송 팝업
|
||||
* *******************************************************************/
|
||||
const fn_coupon_sndng_regist_popup = function(modalDivSltr, modalSlrt, url, couponSndngInnb, couponSndngTy) {
|
||||
|
||||
|
||||
// if (confirm('쿠폰을 정말 발송하시겠습니까?')) {
|
||||
// alert('정상적으로 발송되었습니다.');
|
||||
// }
|
||||
|
||||
|
||||
if (confirm('쿠폰을 정말 발송하시겠습니까?')) {
|
||||
$.ajax({
|
||||
url: '<c:url value="/mngr/promtn/coupon/insertCouponPkIssu"/>',
|
||||
type: 'post',
|
||||
data: {
|
||||
couponSndngInnb : couponSndngInnb,
|
||||
couponSndngTy : couponSndngTy
|
||||
},
|
||||
success: function(result) {
|
||||
if(result.resBody != null) {
|
||||
|
||||
const resBody = result.resBody;
|
||||
const parsedResult = JSON.parse(resBody.result);
|
||||
|
||||
if(parsedResult.result === 'success') {
|
||||
alert('정상적으로 발송되었습니다.');
|
||||
|
||||
// fn_close_modal('coupon_sndng_popup');
|
||||
|
||||
fn_select_couponSndng_list(1);
|
||||
} else {
|
||||
alert(parsedResult.result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: url,
|
||||
data : {
|
||||
couponSndngInnb : couponSndngInnb,
|
||||
couponSndngTy : couponSndngTy
|
||||
},
|
||||
success: function (data) {
|
||||
$(modalSlrt).remove();
|
||||
$(modalDivSltr).html(data);
|
||||
$(modalSlrt).modal();
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* 쿠폰 발송 회원 검색팝업
|
||||
* *******************************************************************/
|
||||
const fn_coupont_sndng_mbrsrch_popup = function(modalDivSltr, modalSlrt, url, actionDv) {
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: url,
|
||||
data : {
|
||||
actionDv : actionDv
|
||||
},
|
||||
success: function (data) {
|
||||
$(modalSlrt).remove();
|
||||
$(modalDivSltr).html(data);
|
||||
$(modalSlrt).modal();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* 쿠폰 발송 마케팅 회원 검색팝업
|
||||
* *******************************************************************/
|
||||
const fn_coupont_sndng_mbrsrch_marketing_popup = function(modalDivSltr, modalSlrt, url, actionDv) {
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: url,
|
||||
data : {
|
||||
actionDv : actionDv
|
||||
},
|
||||
success: function (data) {
|
||||
$(modalSlrt).remove();
|
||||
$(modalDivSltr).html(data);
|
||||
$(modalSlrt).modal();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/****************************************************
|
||||
* 대상에게 쿠폰 발급
|
||||
*****************************************************/
|
||||
const registDwldCouponMbrInfo = function() {
|
||||
|
||||
|
||||
|
||||
|
||||
$('#resultBtn').click();
|
||||
|
||||
|
||||
const data = $('#couponSndngRegistForm').serializeArray();
|
||||
|
||||
|
||||
if (confirm('쿠폰을 정말 발송하시겠습니까?')) {
|
||||
$.ajax({
|
||||
url: '<c:url value="/mngr/promtn/coupon/insertCouponPkIssu"/>',
|
||||
type: 'post',
|
||||
data: data,
|
||||
success: function(result) {
|
||||
if(result.resBody != null) {
|
||||
|
||||
const resBody = result.resBody;
|
||||
const parsedResult = JSON.parse(resBody.result);
|
||||
|
||||
if(parsedResult.result === 'success') {
|
||||
alert('정상적으로 발송되었습니다.');
|
||||
|
||||
fn_close_modal('coupon_sndng_popup');
|
||||
|
||||
fn_select_couponSndng_list(1);
|
||||
} else {
|
||||
alert(parsedResult.result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
/****************************************************************
|
||||
* 쿠폰 인증번호 재발송
|
||||
* **************************************************************/
|
||||
const fn_resndng_coupon_crtnb = function(dwldCouponInnb, oflneCouponCrtnb) {
|
||||
|
||||
|
||||
if (confirm('인증번호를 정말 재발송하시겠습니까?')) {
|
||||
$.ajax({
|
||||
url: '<c:url value="/mngr/promtn/coupon/insertReSndngOflneCouponCrtnb"/>',
|
||||
type: 'post',
|
||||
data: {
|
||||
dwldCouponInnb : dwldCouponInnb,
|
||||
oflneCouponCrtnb : oflneCouponCrtnb
|
||||
},
|
||||
success: function(result) {
|
||||
if(result.resBody != null) {
|
||||
|
||||
const resBody = result.resBody;
|
||||
const parsedResult = JSON.parse(resBody.result);
|
||||
|
||||
if(parsedResult.result === 'success') {
|
||||
alert('정상적으로 발송되었습니다.');
|
||||
|
||||
fn_search_coupon_use_history_pop(1);
|
||||
} else {
|
||||
alert(parsedResult.result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************
|
||||
* 쿠폰 관리자 수동 사용처리
|
||||
* **************************************************************/
|
||||
const fn_use_coupon_procs = function(dwldCouponInnb) {
|
||||
|
||||
|
||||
if (confirm('쿠폰을 정말 회수처리 하시겠습니까?')) {
|
||||
$.ajax({
|
||||
url: '<c:url value="/mngr/promtn/coupon/updateUseCouponProcs"/>',
|
||||
type: 'post',
|
||||
data: {
|
||||
dwldCouponInnb : dwldCouponInnb
|
||||
},
|
||||
success: function(result) {
|
||||
if(result.resBody != null) {
|
||||
|
||||
const resBody = result.resBody;
|
||||
const parsedResult = JSON.parse(resBody.result);
|
||||
|
||||
if(parsedResult.result === 'success') {
|
||||
alert('정상적으로 처리되었습니다.');
|
||||
|
||||
fn_search_coupon_use_history_pop(1);
|
||||
} else {
|
||||
alert(parsedResult.result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************
|
||||
* 쿠폰 관리자 수동 전체 회수
|
||||
* **************************************************************/
|
||||
const fn_use_coupon_procs_all = function(couponSndngInnb) {
|
||||
|
||||
console.log("쿠폰 발송 고유번호 : ", couponSndngInnb);
|
||||
if (confirm('발급된 전체 쿠폰을 정말 회수처리 하시겠습니까?')) {
|
||||
$.ajax({
|
||||
url: '<c:url value="/mngr/promtn/coupon/updateUseCouponProcsAll"/>',
|
||||
type: 'post',
|
||||
data: {
|
||||
couponSndngInnb : couponSndngInnb
|
||||
},
|
||||
success: function(result) {
|
||||
if(result.resBody != null) {
|
||||
|
||||
const resBody = result.resBody;
|
||||
const parsedResult = JSON.parse(resBody.result);
|
||||
|
||||
if(parsedResult.result === 'success') {
|
||||
alert('정상적으로 처리되었습니다.');
|
||||
|
||||
fn_search_coupon_use_history_pop(1);
|
||||
} else {
|
||||
alert(parsedResult.result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* 주문상세 이동 */
|
||||
const fn_go_ordr_dtl = function(ordrInnb, sopmalCd) {
|
||||
var form = $('#listForm')
|
||||
|
||||
$(form).find('input[name="ordrInnb"]').remove();
|
||||
$(form).append($('<input/>', {type:'hidden', name:'ordrInnb', id:'ordrInnb', value:ordrInnb}));
|
||||
$(form).append($('<input/>', {type:'hidden', name:'sopmalCd', id:'sopmalCd', value:sopmalCd}));
|
||||
|
||||
$(form).attr('target', '_blank');
|
||||
$(form).attr('method', 'post');
|
||||
$(form).attr('action', '<c:url value="/mngr/ordr/ordrmngr/selectOrdrDtlInqire"/>');
|
||||
|
||||
$(form).submit();
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* 상품 검색 팝업
|
||||
* *******************************************************************/
|
||||
const fn_open_goods_modal_cart = function (modalDivSltr, modalSlrt, url, param) {
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: url,
|
||||
data: param,
|
||||
success: function (data) {
|
||||
giftAt = '';
|
||||
|
||||
$(modalSlrt).remove();
|
||||
$(modalDivSltr).html(data);
|
||||
$(modalSlrt).modal();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* 상품 검색 팝업
|
||||
* *******************************************************************/
|
||||
const fn_open_goods_modal_buy = function (modalDivSltr, modalSlrt, url, param) {
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: url,
|
||||
data: param,
|
||||
success: function (data) {
|
||||
giftAt = '';
|
||||
|
||||
$(modalSlrt).remove();
|
||||
$(modalDivSltr).html(data);
|
||||
$(modalSlrt).modal();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%-- 상단메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Header.jsp"%>
|
||||
<main class="main">
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Left.jsp"%>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">쿠폰(팩) 발송 목록</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<button class="btn primary" id="moveRegist" type="button" onclick="fn_move_regpage(1); return false;">쿠폰 발송<spring:message code="button.insert"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<form id="listForm" name="listForm" method="post" >
|
||||
<input type = "hidden" class= "mbrInfo"/>
|
||||
<input type="hidden" id="couponSndngInnb" name="couponSndngInnb"/>
|
||||
<input type="hidden" id="couponSndngTy" name="couponSndngTy"/>
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.paramVO.pageIndex }"/>"/>
|
||||
<input type="hidden" id="recordCountPerPage" name="recordCountPerPage" value="<c:out value="${ resultMap.paramVO.recordCountPerPage }"/> "/>
|
||||
|
||||
<%-- 쿠폰 검색 영역 START --%>
|
||||
<section class="content-section" id="couponPkSndngSearchForm">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 30%;">
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>쿠폰(팩) 발송 명</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" id="searchCouponPkSndngNm" name="searchCouponPkSndngNm" title="쿠폰발송명" value="<c:out value="${ resultMap.paramVO.searchCouponPkSndngNm }" />">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>발송 구분</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-22" name="searchSndngDv" value=""
|
||||
<c:if test="${ empty resultMap.paramVO.searchSndngDv}">checked="checked"</c:if>
|
||||
>
|
||||
<label for="r-22">전체</label>
|
||||
</div>
|
||||
<c:forEach var="codeList" items="${ resultMap.sndngDvCdList }" varStatus="">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="<c:out value="${ codeList.cdNm }"/><c:out value="${ codeList.cd}" />" name="searchSndngDv" value="<c:out value="${ codeList.cd}" />"
|
||||
<c:if test="${ codeList.cd eq resultMap.paramVO.searchSndngDv }">checked="checked"</c:if>
|
||||
>
|
||||
<label for="<c:out value="${ codeList.cdNm }"/><c:out value="${ codeList.cd}" />"><c:out value="${ codeList.cdNm }" /></label>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>사용여부</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-25" name="searchUseAt" value=""
|
||||
<c:if test="${ empty resultMap.paramVO.searchUseAt}">checked="checked"</c:if>
|
||||
>
|
||||
<label for="r-25">전체</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-26" name="searchUseAt" value="Y"
|
||||
<c:if test="${fn:contains(resultMap.paramVO.searchUseAt, 'Y')}">checked="checked"</c:if>
|
||||
>
|
||||
<label for="r-26">사용</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-27" name="searchUseAt" value="N"
|
||||
<c:if test="${fn:contains(resultMap.paramVO.searchUseAt, 'N')}">checked="checked"</c:if>
|
||||
>
|
||||
<label for="r-27">미사용</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>발송유형</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="b-checkbox-container" id="couponSndngTyDiv">
|
||||
<label class="b-checkbox checkbox check-all">
|
||||
<input type="checkbox" value="" >
|
||||
<span class="check"></span>
|
||||
<span class="control-label">전체</span>
|
||||
</label>
|
||||
<c:forEach var="codeList" items="${ resultMap.couponSndngTyCdList }" varStatus="">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" name="searchCouponSndngTy" value="<c:out value="${ codeList.cd }"/>"
|
||||
<c:if test="${ resultMap.paramVO.searchCouponSndngTy eq codeList.cd }">checked="checked"</c:if>>
|
||||
<span class="check"></span>
|
||||
<span class="control-label"><c:out value="${ codeList.cdNm }"/></span>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>발송일시구분</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="b-checkbox-container" id="couponSndngDtDvDiv">
|
||||
<label class="b-checkbox checkbox check-all">
|
||||
<input type="checkbox" value="" >
|
||||
<span class="check"></span>
|
||||
<span class="control-label">전체</span>
|
||||
</label>
|
||||
<c:forEach var="codeList" items="${ resultMap.couponSndngDtDvCdList }" varStatus="">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" name="searchSndngDtDv" value="<c:out value="${ codeList.cd }"/>"
|
||||
<c:if test="${ resultMap.paramVO.searchSndngDtDv eq codeList.cd }">checked="checked"</c:if>>
|
||||
<span class="check"></span>
|
||||
<span class="control-label"><c:out value="${ codeList.cdNm }"/></span>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container">
|
||||
<div class="left"></div>
|
||||
<div class="center">
|
||||
<button class="btn outline" id="resetBtn" type="button" onclick="fn_reset_form('couponPkSndngSearchForm'); return false;">초기화</button>
|
||||
<button class="btn primary" id="searchBtn" type="button" onclick="fn_select_couponSndng_list(1); return false;">검색</button>
|
||||
</div>
|
||||
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
</section>
|
||||
<%-- 쿠폰발송 검색 영역 END --%>
|
||||
|
||||
<%-- 쿠폰발송 목록 DIV --%>
|
||||
<div id="pageDiv">
|
||||
</div>
|
||||
<%-- 쿠폰 사용내역 목록 DIV --%>
|
||||
<div id="orderCouponDiv">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 모달 DIV -->
|
||||
<div id="couponSndngDiv">
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
1764
src/main/webapp/WEB-INF/views/mngr/promtn/coupon/CouponRegistC.jsp
Normal file
1764
src/main/webapp/WEB-INF/views/mngr/promtn/coupon/CouponRegistC.jsp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,281 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
|
||||
|
||||
<%--
|
||||
Class Name : CouponInfoInqirePopupR.jsp
|
||||
Description : 쿠폰 발급 정보 popup jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.14 추지훈 최초 생성
|
||||
--%>
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
let couponSndngTy = '<c:out value="${ sndngVO.couponSndngTy }"/>';
|
||||
|
||||
|
||||
<%--
|
||||
if (couponSndngTy != null && couponSndngTy != '03') {
|
||||
$('.sndngDvTr').hide();
|
||||
}
|
||||
--%>
|
||||
|
||||
$('.hidden').hide();
|
||||
$('#marketingTr').hide();
|
||||
$('#marketingTr').prop('disabled', true);
|
||||
|
||||
$('select').niceSelect();
|
||||
|
||||
/*예제*/
|
||||
$("#resultBtn").on("click",function(){
|
||||
const mbrInfo = $(".mbrInfo").val();
|
||||
if (mbrInfo) {
|
||||
// JSON 문자열을 객체로 변환
|
||||
const resultArr = JSON.parse(mbrInfo);
|
||||
// 객체를 문자열로 변환하여 resultCn에 출력
|
||||
$("#resultCn").val(JSON.stringify(resultArr, null, 2));
|
||||
} else {
|
||||
$("#resultCn").val("No data found");
|
||||
}
|
||||
});
|
||||
|
||||
/*예제*/
|
||||
$("#resultBtnMarketing").on("click",function(){
|
||||
const mbrInfo = $(".marketingTrgetInfo").val();
|
||||
if (mbrInfo) {
|
||||
// JSON 문자열을 객체로 변환
|
||||
const resultArr = JSON.parse(mbrInfo);
|
||||
// 객체를 문자열로 변환하여 resultCn에 출력
|
||||
$("#jsonMarketingTrgetList").val(JSON.stringify(resultArr, null, 2));
|
||||
} else {
|
||||
$("#jsonMarketingTrgetList").val("No data found");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('.companyTr').prop('disabled', true);
|
||||
$('.companyTr').hide();
|
||||
|
||||
$('#targetDv').on('change', function() {
|
||||
let selectValue = $(this).val(); // 현재 이벤트가 발생한 요소의 값을 가져옴
|
||||
|
||||
if (selectValue === 'member') {
|
||||
$('#memberTr').prop('disabled', false);
|
||||
$('#memberTr').show();
|
||||
$('.companyTr').prop('disabled', true);
|
||||
$('.companyTr').hide();
|
||||
$('#marketingTr').prop('disabled', true);
|
||||
$('#marketingTr').hide();
|
||||
$('#messageTr').prop('disabled', false);
|
||||
$('#messageTr').show();
|
||||
} else if (selectValue === 'company') {
|
||||
$('.companyTr').prop('disabled', false);
|
||||
$('.companyTr').show();
|
||||
$('#memberTr').prop('disabled', true);
|
||||
$('#memberTr').hide();
|
||||
$('#marketingTr').prop('disabled', true);
|
||||
$('#marketingTr').hide();
|
||||
$('#messageTr').prop('disabled', true);
|
||||
$('#messageTr').hide();
|
||||
} else if (selectValue === 'marketingTrget') {
|
||||
$('#memberTr').prop('disabled', true);
|
||||
$('#memberTr').hide();
|
||||
$('.companyTr').prop('disabled', true);
|
||||
$('.companyTr').hide();
|
||||
$('#marketingTr').prop('disabled', false);
|
||||
$('#marketingTr').show();
|
||||
$('#messageTr').prop('disabled', false);
|
||||
$('#messageTr').show();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 템플릿 사용 여부
|
||||
*/
|
||||
$('#templateUseAt').on('change', function() {
|
||||
let useAt = $('#templateUseAt').prop('checked'); // .prop() 메서드 사용
|
||||
|
||||
if (useAt) {
|
||||
|
||||
$('textarea[name="messageCn"]').prop('disabled', true);
|
||||
} else {
|
||||
|
||||
$('textarea[name="messageCn"]').prop('disabled', false);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
<div id="coupon_sndng_popup" class="modal">
|
||||
<div class="modal-header">
|
||||
<h4>발송 정보</h4>
|
||||
</div>
|
||||
<form id="couponSndngRegistForm">
|
||||
<div class="modal-content">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 20%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ sndngVO.couponSndngTy eq '01' }">
|
||||
<tr class="sndngDvTr">
|
||||
<th>구분</th>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select title="해당 셀렉트에 대한 설명" id="targetDv" name="targetDv">
|
||||
<option value="member" id="member" selected>개인</option>
|
||||
<option value="marketingTrget" id="marketingTrget" >마케팅 대상</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:when>
|
||||
<c:when test="${ sndngVO.couponSndngTy eq '03' }">
|
||||
<tr class="sndngDvTrMk">
|
||||
<th>구분</th>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select title="해당 셀렉트에 대한 설명" id="targetDv" name="targetDv">
|
||||
<option value="member" id="member" selected>개인</option>
|
||||
<option value="marketingTrget" id="marketingTrget" >마케팅 대상</option>
|
||||
<option value="company" id="company" >외부업체</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<tr id="memberTr">
|
||||
<th>대상</th>
|
||||
<td>
|
||||
<div class="select" >
|
||||
<span class="fw-500 fs-15 ml-5 srchMbrCnt">0 명</span>
|
||||
|
||||
<input type = "hidden" class= "mbrInfo"/>
|
||||
|
||||
<button class="btn xsm primary" type="button" onclick="fn_coupont_sndng_mbrsrch_popup('#modalDiv', '#member-search', '/mngr/mbr/selectMbrSrchPopupRForm', 'coupon'); return false;">회원검색</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="marketingTr">
|
||||
<th>대상</th>
|
||||
<td>
|
||||
<div class="select" >
|
||||
<span class="fw-500 fs-15 ml-5 srchMarketingTrgetCnt">0 명</span>
|
||||
|
||||
<input type = "hidden" class= "marketingTrgetInfo"/>
|
||||
|
||||
<button class="btn xsm primary" type="button" onclick="fn_coupont_sndng_mbrsrch_marketing_popup('#modalDiv', '#marketing-trget-search', '/mngr/mbr/selectMarketingTrgetSrchPopupForm', 'coupon'); return false;">마케팅 대상 검색</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="messageTr">
|
||||
<th>메세지 내용</th>
|
||||
<td>
|
||||
<div class="select" >
|
||||
|
||||
<div class="template-message">
|
||||
<div class="template-message__header">
|
||||
수동 발송 내용
|
||||
<span class="btn gray ml-2 xxsm">알림톡 X</span>
|
||||
</div>
|
||||
<div class="template-message__body">
|
||||
<div class="sms-manage">
|
||||
<textarea class="textarea" title="sms 입력" name="messageCn"></textarea>
|
||||
<div class="sms-manage__byte">
|
||||
<span class="number">0</span>
|
||||
<span class="text">byte</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="b-checkbox-container justify-end mt-8 mb-5 mr-2">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" value="Y" id="templateUseAt">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">템플릿 사용 여부</span>
|
||||
</label>
|
||||
<a href="#substitution-sms-pop" rel="modal:open" class="btn sm outline">
|
||||
<i class="icon icon_info"></i>
|
||||
치환 코드
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<%--
|
||||
<div class="template-message__footer">
|
||||
<div class="manage-btn-container">
|
||||
<a href="#substitution-sms-pop" rel="modal:open" class="btn sm outline">
|
||||
<i class="icon icon_info"></i>
|
||||
치환 코드
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
--%>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="companyTr">
|
||||
<th>발송수량</th>
|
||||
<td>
|
||||
<div class="td-inner input-container">
|
||||
<input class="input-text sm number right" type="text" id="sndngQy" name="sndngQy" title="생성 개수" value="0" maxlength="15">
|
||||
<span class="input-unit-text">개</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="companyTr">
|
||||
<th>대상</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text md" type="text" name="sndngTrgetNm" value="" placeholder="업체명" maxlength="38"/>
|
||||
<br>
|
||||
<input class="input-text md" type="text" name="sndngTrgetTelnb" value="" placeholder="전화번호" maxlength="11"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="td-inner hidden">
|
||||
<input type="hidden" name="couponSndngInnb" value="<c:out value="${ sndngVO.couponSndngInnb }"/>">
|
||||
<input type="hidden" name="couponSndngTy" value="<c:out value="${ sndngVO.couponSndngTy }"/>">
|
||||
<input type="hidden" title="" cols="30" rows="10" id = "resultCn" name="jsonMbrList" value=""/>
|
||||
<input type="hidden" title="" cols="30" rows="10" id = "resultCnMarketing" name="jsonMarketingTrgetList" value=""/>
|
||||
<button type = "button" class="btn xsm primary" id = "resultBtn">회원 값 확인</button>
|
||||
<button type = "button" class="btn xsm primary" id = "resultBtnMarketing">마케팅 대상 값 확인</button>
|
||||
</div>
|
||||
<!-- 모달 DIV -->
|
||||
<div id="modalDiv">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">닫기</a>
|
||||
<button class="btn primary" type="button" onclick="registDwldCouponMbrInfo();">발송하기</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
731
src/main/webapp/WEB-INF/views/mngr/promtn/coupon/CupnpkCopyC.jsp
Normal file
731
src/main/webapp/WEB-INF/views/mngr/promtn/coupon/CupnpkCopyC.jsp
Normal file
@@ -0,0 +1,731 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
|
||||
<%--
|
||||
Class Name : CupnpkRegistC.jsp
|
||||
Description : 쿠폰팩 상세 수정
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.07 추지훈 최초 생성
|
||||
--%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
function checkBoxAllUpdate() {
|
||||
$('#couponChoiseTr input[name="choiseCouponCheckbox"]').click(function() {
|
||||
var checkBoxAll = true;
|
||||
|
||||
$('#couponChoiseTr input[name="choiseCouponCheckbox"]').each(function() {
|
||||
if (!$(this).prop('checked')) {
|
||||
checkBoxAll = false;
|
||||
}
|
||||
});
|
||||
|
||||
$('#couponChoiseTr .check-all input[type="checkbox"]').prop('checked', checkBoxAll);
|
||||
});
|
||||
}
|
||||
|
||||
checkBoxAllUpdate();
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* 쿠폰 선택 삭제 함수
|
||||
*/
|
||||
const fn_delete_couponchoise = function () {
|
||||
var $tbody = $("#selectList");
|
||||
|
||||
// 체크된 input 찾기
|
||||
$tbody.find('input[type="checkbox"]:checked').each(function () {
|
||||
$(this).closest('tr').remove(); // 체크된 tr 삭제
|
||||
});
|
||||
|
||||
if ($tbody.children().length === 0) {
|
||||
var noDataMessage = $("<tr>");
|
||||
var cell = $("<td>").attr("colspan", '100%').html('<spring:message code="common.nodata"/>');
|
||||
noDataMessage.append(cell);
|
||||
$tbody.append(noDataMessage);
|
||||
}
|
||||
|
||||
$('.check-all input[type="checkbox"]').prop('checked', false);
|
||||
};
|
||||
|
||||
/**
|
||||
* 쿠폰 선택 모달에서 부모창으로 값을 전달하는 함수
|
||||
*/
|
||||
const fn_send_cupnpkregistpage = function(modalId) {
|
||||
|
||||
|
||||
let childCouponList = [];
|
||||
// 선택된 쿠폰 리스트 반복
|
||||
$('#appendList tr').each(function() {
|
||||
let coupon = {
|
||||
couponInnb: '',
|
||||
sopmalName: '',
|
||||
couponName: '',
|
||||
bnefDv: '',
|
||||
goodsDscntDv: '',
|
||||
aditDscntAmt: '',
|
||||
aditDscntRt: '',
|
||||
dscntMxmmAmt: '',
|
||||
dlvyAmtDscntDv: '',
|
||||
dlvyAmtDscntAmt: '',
|
||||
dlvyAmtMxmmDscntAmt: '',
|
||||
couponRegistDe: '',
|
||||
couponValidpdKnd: '',
|
||||
couponValidpdBgnDe: '',
|
||||
couponValidpdEndDe: '',
|
||||
couponValidpdDeCnt: '',
|
||||
couponValidpdCntDe: ''
|
||||
};
|
||||
|
||||
coupon.couponInnb = $(this).find("#couponInnb").val();
|
||||
coupon.sopmalName = $(this).find("#sopmalName").val();
|
||||
coupon.couponName = $(this).find("#couponName").val();
|
||||
coupon.bnefDv = $(this).find("#bnefDv").val();
|
||||
coupon.goodsDscntDv = $(this).find("#goodsDscntDv").val();
|
||||
coupon.aditDscntAmt = $(this).find("#aditDscntAmt").val();
|
||||
coupon.aditDscntRt = $(this).find("#aditDscntRt").val();
|
||||
coupon.dscntMxmmAmt = $(this).find("#dscntMxmmAmt").val();
|
||||
coupon.dlvyAmtDscntDv = $(this).find("#dlvyAmtDscntDv").val();
|
||||
coupon.dlvyAmtDscntAmt = $(this).find("#dlvyAmtDscntAmt").val();
|
||||
coupon.dlvyAmtMxmmDscntAmt = $(this).find("#dlvyAmtMxmmDscntAmt").val();
|
||||
coupon.couponRegistDe = $(this).find("#couponRegistDe").val();
|
||||
coupon.couponValidpdKnd = $(this).find("#couponValidpdKnd").val();
|
||||
coupon.couponValidpdBgnDe = $(this).find("#couponValidpdBgnDe").val();
|
||||
coupon.couponValidpdEndDe = $(this).find("#couponValidpdEndDe").val();
|
||||
coupon.couponValidpdDeCnt = $(this).find("#couponValidpdDeCnt").val();
|
||||
coupon.couponValidpdCntDe = $(this).find("#couponValidpdCntDe").val();
|
||||
|
||||
childCouponList.push(coupon);
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#"+modalId+" > a").each(function() {
|
||||
if(this.href.indexOf('#close-modal')){
|
||||
$(this).click();
|
||||
}
|
||||
});
|
||||
$('#' + modalId).remove();
|
||||
|
||||
// 선택된 쿠폰 리스트를 CupnpkRegistC.jsp > 쿠폰선택 영역에 그려줄 html
|
||||
let sletdTrHtml = '<tr id="#choiseListId" >';
|
||||
sletdTrHtml = sletdTrHtml+'<td class="center">';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponInnb" name="packedCouponInnbs" value="#couponInnb"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="sopmalName" name="sopmalName" value="#sopmalName"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponName" name="couponName" value="#couponName"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="bnefDv" name="bnefDv" value="#bnefDv"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="goodsDscntDv" name="goodsDscntDv" value="#goodsDscntDv"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="aditDscntAmt" name="aditDscntAmt" value="#aditDscntAmt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="aditDscntRt" name="aditDscntRt" value="#aditDscntRt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="dscntMxmmAmt" name="dscntMxmmAmt" value="#dscntMxmmAmt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="dlvyAmtDscntDv" name="dlvyAmtDscntDv" value="#dlvyAmtDscntDv"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="dlvyAmtDscntAmt" name="dlvyAmtDscntAmt" value="#dlvyAmtDscntAmt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="dlvyAmtMxmmDscntAmt" name="dlvyAmtMxmmDscntAmt" value="#dlvyAmtMxmmDscntAmt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponRegistDe" name="couponRegistDe" value="#couponRegistDe"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdKnd" name="couponValidpdKnd" value="#couponValidpdKnd"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdBgnDe" name="couponValidpdBgnDe" value="#couponValidpdBgnDe"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdEndDe" name="couponValidpdEndDe" value="#couponValidpdEndDe"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdDeCnt" name="couponValidpdDeCnt" value="#couponValidpdDeCnt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdCntDe" name="couponValidpdCntDe" value="#couponValidpdCntDe"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<label class="b-checkbox checkbox is-medium tr-color-check">';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="checkbox" id="checkboxCouponInnb" name="choiseCouponCheckbox" value="#couponInnb">';
|
||||
sletdTrHtml = sletdTrHtml+'<span class="check"></span>';
|
||||
sletdTrHtml = sletdTrHtml+'</label>';
|
||||
sletdTrHtml = sletdTrHtml+'</td>';
|
||||
sletdTrHtml = sletdTrHtml+'<td>';
|
||||
sletdTrHtml = sletdTrHtml+'#sopmalName';
|
||||
sletdTrHtml = sletdTrHtml+'</td>';
|
||||
sletdTrHtml = sletdTrHtml+'<td>';
|
||||
sletdTrHtml = sletdTrHtml+'#couponName';
|
||||
sletdTrHtml = sletdTrHtml+'</td>';
|
||||
|
||||
// 배송비할인 무료 html
|
||||
let dlcyAmtDscntFreeHtml = '<td>';
|
||||
dlcyAmtDscntFreeHtml = dlcyAmtDscntFreeHtml+'<span class="fw-500">';
|
||||
dlcyAmtDscntFreeHtml = dlcyAmtDscntFreeHtml+'기본 배송비 무료,';
|
||||
dlcyAmtDscntFreeHtml = dlcyAmtDscntFreeHtml+'</span><br/>';
|
||||
dlcyAmtDscntFreeHtml = dlcyAmtDscntFreeHtml+'<span class="gray-8">최대 #dlvyAmtMxmmDscntAmt 원 할인</span>';
|
||||
dlcyAmtDscntFreeHtml = dlcyAmtDscntFreeHtml+'</td>';
|
||||
|
||||
// 배송비 금액 할인 html
|
||||
let dlcyAmtDscntWonHtml = '<td>';
|
||||
dlcyAmtDscntWonHtml = dlcyAmtDscntWonHtml+'<span class="fw-500">';
|
||||
dlcyAmtDscntWonHtml = dlcyAmtDscntWonHtml+'배송비 할인,';
|
||||
dlcyAmtDscntWonHtml = dlcyAmtDscntWonHtml+'</span><br/>';
|
||||
dlcyAmtDscntWonHtml = dlcyAmtDscntWonHtml+'<span class="gray-8">#dlvyAmtDscntAmt 원 할인</span>';
|
||||
dlcyAmtDscntWonHtml = dlcyAmtDscntWonHtml+'</td>';
|
||||
|
||||
|
||||
// 비율 할인 html
|
||||
let goodsDscntDvRtHtml = '<td>';
|
||||
goodsDscntDvRtHtml = goodsDscntDvRtHtml+'<span class="fw-500">';
|
||||
goodsDscntDvRtHtml = goodsDscntDvRtHtml+'#aditDscntAmt % 할인';
|
||||
goodsDscntDvRtHtml = goodsDscntDvRtHtml+'</span><br/>';
|
||||
goodsDscntDvRtHtml = goodsDscntDvRtHtml+'<span class="gray-8">최대 #dscntMxmmAmt 원 할인</span>';
|
||||
goodsDscntDvRtHtml = goodsDscntDvRtHtml+'</td>';
|
||||
|
||||
|
||||
// 금액 할인 html
|
||||
let goodsDscntDvAmtHtml = '<td>';
|
||||
goodsDscntDvAmtHtml = goodsDscntDvAmtHtml+'<span class="fw-500">';
|
||||
goodsDscntDvAmtHtml = goodsDscntDvAmtHtml+'#aditDscntAmt 원 할인';
|
||||
goodsDscntDvAmtHtml = goodsDscntDvAmtHtml+'</span>';
|
||||
goodsDscntDvAmtHtml = goodsDscntDvAmtHtml+'</td>';
|
||||
|
||||
|
||||
// 유효기간 기간 제한 (날짜) html
|
||||
let sletdTrTail = '<td>';
|
||||
sletdTrTail = sletdTrTail+'<span>#couponValidpdBgnDe</span>';
|
||||
sletdTrTail = sletdTrTail+'~';
|
||||
sletdTrTail = sletdTrTail+'<span>#couponValidpdEndDe</span>';
|
||||
sletdTrTail = sletdTrTail+'</td>';
|
||||
sletdTrTail = sletdTrTail+'</tr>';
|
||||
|
||||
|
||||
// 유효기간 발급일로부터 일수 html
|
||||
let sletdTrCntDe = '<td>';
|
||||
sletdTrCntDe = sletdTrCntDe+'(발급일로부터) ';
|
||||
sletdTrCntDe = sletdTrCntDe+'<span>#couponValidpdDeCnt 일</span>';
|
||||
sletdTrCntDe = sletdTrCntDe+'</td>';
|
||||
sletdTrCntDe = sletdTrCntDe+'</tr>';
|
||||
|
||||
|
||||
|
||||
// 선택된 쿠폰이 있을 경우
|
||||
if (childCouponList != null && childCouponList.length >= 0) {
|
||||
|
||||
// 기존에 그려진 쿠폰 리스트를 비워줌
|
||||
$('#selectList').empty();
|
||||
// 선택된 쿠폰 리스트를 CupnpkRegistC.jsp > 쿠폰선택 영역에 그려줌.
|
||||
childCouponList.forEach(function(coupon) {
|
||||
|
||||
let trHtml = sletdTrHtml
|
||||
.replaceAll("#choiseListId", 'choiseListId' + coupon.couponInnb)
|
||||
.replaceAll("#couponInnb", coupon.couponInnb)
|
||||
.replaceAll("#sopmalName", coupon.sopmalName)
|
||||
.replaceAll("#couponName", coupon.couponName)
|
||||
.replaceAll("#bnefDv", coupon.bnefDv)
|
||||
.replaceAll("#goodsDscntDv", coupon.goodsDscntDv)
|
||||
.replaceAll("#aditDscntAmt", coupon.aditDscntAmt)
|
||||
.replaceAll("#aditDscntRt", coupon.aditDscntRt)
|
||||
.replaceAll("#dscntMxmmAmt", coupon.dscntMxmmAmt)
|
||||
.replaceAll("#dlvyAmtDscntDv", coupon.dlvyAmtDscntDv)
|
||||
.replaceAll("#dlvyAmtDscntAmt", coupon.dlvyAmtDscntAmt)
|
||||
.replaceAll("#dlvyAmtMxmmDscntAmt", coupon.dlvyAmtMxmmDscntAmt)
|
||||
.replaceAll("#couponRegistDe", coupon.couponRegistDe)
|
||||
.replaceAll("#couponValidpdKnd", coupon.couponValidpdKnd)
|
||||
.replaceAll("#couponValidpdBgnDe", coupon.couponValidpdBgnDe)
|
||||
.replaceAll("#couponValidpdEndDe", coupon.couponValidpdEndDe)
|
||||
.replaceAll("#couponValidpdDeCnt", coupon.couponValidpdDeCnt)
|
||||
.replaceAll("#couponValidpdCntDe", coupon.couponValidpdCntDe);
|
||||
|
||||
|
||||
|
||||
// 배송비할인인 경우
|
||||
if (coupon.bnefDv.trim() === '02') {
|
||||
|
||||
// 무료 배송비의 경우
|
||||
if (coupon.dlvyAmtDscntDv.trim() === '01') {
|
||||
trHtml = trHtml + dlcyAmtDscntFreeHtml
|
||||
.replaceAll("#dlvyAmtMxmmDscntAmt", coupon.dlvyAmtMxmmDscntAmt);
|
||||
|
||||
// 금액할인 배송비의 경우
|
||||
} else if (coupon.dlvyAmtDscntDv.trim() === '02') {
|
||||
trHtml = trHtml + dlcyAmtDscntWonHtml
|
||||
.replaceAll("#dlvyAmtDscntAmt", coupon.dlvyAmtDscntAmt);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
// 혜택 구분값이 percent 인 경우 비율 html 을 append
|
||||
if (coupon.goodsDscntDv.trim() === '01') {
|
||||
|
||||
trHtml = trHtml + goodsDscntDvRtHtml
|
||||
.replaceAll("#aditDscntAmt", coupon.aditDscntAmt)
|
||||
.replaceAll("#dscntMxmmAmt", coupon.dscntMxmmAmt);
|
||||
// 혜택 구분값이 won 인 경우 금액 html 을 append
|
||||
} else if (coupon.goodsDscntDv.trim() === '02') {
|
||||
trHtml = trHtml + goodsDscntDvAmtHtml
|
||||
.replaceAll("#aditDscntAmt", coupon.aditDscntAmt);
|
||||
}
|
||||
}
|
||||
|
||||
// 기간설정 날짜
|
||||
if (coupon.couponValidpdKnd.trim() === '01') {
|
||||
trHtml = trHtml + sletdTrTail
|
||||
.replaceAll("#couponValidpdBgnDe", coupon.couponValidpdBgnDe)
|
||||
.replaceAll("#couponValidpdEndDe", coupon.couponValidpdEndDe);
|
||||
|
||||
// 기간설정 일수
|
||||
} else if (coupon.couponValidpdKnd.trim() === '02') {
|
||||
trHtml = trHtml + sletdTrCntDe
|
||||
.replaceAll("#couponValidpdDeCnt", coupon.couponValidpdDeCnt);
|
||||
}
|
||||
|
||||
|
||||
function checkBoxAllUpdate() {
|
||||
$('#couponChoiseTr input[name="choiseCouponCheckbox"]').click(function() {
|
||||
var checkBoxAll = true;
|
||||
|
||||
$('#couponChoiseTr input[name="choiseCouponCheckbox"]').each(function() {
|
||||
if (!$(this).prop('checked')) {
|
||||
checkBoxAll = false;
|
||||
}
|
||||
});
|
||||
|
||||
$('#couponChoiseTr .check-all input[type="checkbox"]').prop('checked', checkBoxAll);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('#selectList').append(trHtml);
|
||||
|
||||
checkBoxAllUpdate();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰팩 등록 화면에서 선택된 쿠폰을 반환하는 함수
|
||||
*/
|
||||
const getAllCouponList = function() {
|
||||
let couponList = [];
|
||||
// CupnpkRegistC.jsp 에서 선택된 쿠폰을 모달 창으로 퍼올리는 작업
|
||||
$("#selectList tr").each(function() {
|
||||
let coupon = {
|
||||
couponInnb: '',
|
||||
sopmalName: '',
|
||||
couponName: '',
|
||||
bnefDv: '',
|
||||
goodsDscntDv: '',
|
||||
aditDscntAmt: '',
|
||||
aditDscntRt: '',
|
||||
dscntMxmmAmt: '',
|
||||
dlvyAmtDscntDv: '',
|
||||
dlvyAmtDscntAmt: '',
|
||||
dlvyAmtMxmmDscntAmt: '',
|
||||
couponRegistDe: '',
|
||||
couponValidpdKnd: '',
|
||||
couponValidpdBgnDe: '',
|
||||
couponValidpdEndDe: '',
|
||||
couponValidpdDeCnt: '',
|
||||
couponValidpdCntDe: ''
|
||||
};
|
||||
|
||||
coupon.couponInnb = $(this).find("#couponInnb").val();
|
||||
coupon.sopmalName = $(this).find("#sopmalName").val();
|
||||
coupon.couponName = $(this).find("#couponName").val();
|
||||
coupon.bnefDv = $(this).find("#bnefDv").val();
|
||||
coupon.goodsDscntDv = $(this).find("#goodsDscntDv").val();
|
||||
coupon.aditDscntAmt = $(this).find("#aditDscntAmt").val();
|
||||
coupon.aditDscntRt = $(this).find("#aditDscntRt").val();
|
||||
coupon.dscntMxmmAmt = $(this).find("#dscntMxmmAmt").val();
|
||||
coupon.dlvyAmtDscntDv = $(this).find("#dlvyAmtDscntDv").val();
|
||||
coupon.dlvyAmtDscntAmt = $(this).find("#dlvyAmtDscntAmt").val();
|
||||
coupon.dlvyAmtMxmmDscntAmt = $(this).find("#dlvyAmtMxmmDscntAmt").val();
|
||||
coupon.couponRegistDe = $(this).find("#couponRegistDe").val();
|
||||
coupon.couponValidpdKnd = $(this).find("#couponValidpdKnd").val();
|
||||
coupon.couponValidpdBgnDe = $(this).find("#couponValidpdBgnDe").val();
|
||||
coupon.couponValidpdEndDe = $(this).find("#couponValidpdEndDe").val();
|
||||
coupon.couponValidpdDeCnt = $(this).find("#couponValidpdDeCnt").val();
|
||||
coupon.couponValidpdCntDe = $(this).find("#couponValidpdCntDe").val();
|
||||
|
||||
couponList.push(coupon);
|
||||
});
|
||||
// 선택된 쿠폰 리스트 반환
|
||||
return couponList;
|
||||
};
|
||||
|
||||
|
||||
/* ********************************************************
|
||||
* 쿠폰 선택 팝업 이동
|
||||
******************************************************** */
|
||||
const fn_move_coupon_choisepage_pop = function () {
|
||||
// const popupListForm = $("#popupListForm").serialize();
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<c:url value="/mngr/promtn/coupon/selectCouponChoisePopupForm"/>',
|
||||
success: function (data) {
|
||||
$('#couponChoisePopup').remove();
|
||||
$('#modalDiv').html(data);
|
||||
$('#couponChoisePopup').modal();
|
||||
fn_search_coupon_choisepage_pop();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* 쿠폰 선택 모달 : 쿠폰 검색 ajax
|
||||
*/
|
||||
const fn_search_coupon_choisepage_pop = function (pageIndex) {
|
||||
// 페이지정보가 넘어오지 않았을 경우 기본값 초기화
|
||||
if(!pageIndex) {
|
||||
pageIndex = 1;
|
||||
}
|
||||
// 모달 쿠폰 검색 form 에 페이지 정보를 넣어줌.
|
||||
$('#popupListForm').find('input[name=pageIndex]').eq(0).val(pageIndex);
|
||||
const popupListForm = $("#popupListForm").serialize();
|
||||
|
||||
|
||||
// 모달 쿠폰 검색
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<c:url value="/mngr/promtn/coupon/selectCouponChoisePopupSearch"/>',
|
||||
data: popupListForm,
|
||||
success: function(data) {
|
||||
$('#couponAjaxList').empty();
|
||||
$('#couponAjaxList').html(data);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰팩 등록
|
||||
*/
|
||||
const fn_regist = function() {
|
||||
// 나눠진 form 데이터 직렬화
|
||||
data = $('.common-form').serialize();
|
||||
if (confirm('쿠폰을 <spring:message code="confirm.common.insert"/>')) {
|
||||
// ajax 호출
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url : "/mngr/promtn/coupon/insertCupnpkRegist",
|
||||
data : data,
|
||||
success:function(result) {
|
||||
|
||||
if(result.resBody != null) {
|
||||
|
||||
// 응답객체 선언
|
||||
const resBody = result.resBody;
|
||||
// 객체 -> JSON 파싱
|
||||
const parsedResult = JSON.parse(resBody.result);
|
||||
|
||||
if(parsedResult.cupnpkInnb != null) {
|
||||
|
||||
alert('<spring:message code="success.common.insert"/>');
|
||||
// 상세 수정 호출
|
||||
fn_move_dtlupdt(parsedResult.cupnpkInnb);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰팩 목록 이동
|
||||
*/
|
||||
function fn_select_cupnpk_list() {
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/coupon/selectCupnpkListInqireForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰팩 상세 수정 이동
|
||||
*/
|
||||
function fn_move_dtlupdt(cupnpkInnb) {
|
||||
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/coupon/selectCupnpkDtlUpdtForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#cupnpkInnb').val(cupnpkInnb);
|
||||
$('#pageIndex').val(1);
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Header.jsp"%>
|
||||
<main class="main">
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Left.jsp"%>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">쿠폰팩 복사</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<a href="#fn_select_cupnpk_list" onclick="fn_select_cupnpk_list('1'); return false;" class="btn outline"><spring:message code="button.list"/></a>
|
||||
<button class="btn primary" onclick="fn_regist(); return false;" ><spring:message code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">기본 정보</h3>
|
||||
<form id="cupnpkForm" class="common-form" method="post" action="">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>쿠폰팩 명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text md" type="text" id="cupnpkNm" name="cupnpkNm" title="쿠폰팩명" maxlength="40">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>쿠폰팩 설명<span class="red-7">*</span></th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" id="cupnpkDc" name="cupnpkDc" title="쿠폰팩설명" maxlength="100">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사용여부<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-1" name="cupnpkUseAt" value="Y" <c:if test="${ fn:contains(resultMap.cupnpkVO.cupnpkUseAt, 'Y')}">checked="checked"</c:if>>
|
||||
<label for="r-1">사용</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-2" name="cupnpkUseAt" value="N" <c:if test="${ fn:contains(resultMap.cupnpkVO.cupnpkUseAt, 'N')}">checked="checked"</c:if>>
|
||||
<label for="r-2">미사용</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="couponChoiseTr">
|
||||
<th>쿠폰선택<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
</div>
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
<button class="btn xsm primary" id="couponChoiseBtn" onclick="fn_move_coupon_choisepage_pop(); return false;">
|
||||
쿠폰 선택
|
||||
</button>
|
||||
<button class="btn xsm dark" id="couponDeleteBtn" onclick="fn_delete_couponchoise(); return false;">쿠폰 삭제</button>
|
||||
</div>
|
||||
<div class="center"></div>
|
||||
</div>
|
||||
 
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical tight">
|
||||
<caption>쿠폰팩에 들어갈 쿠폰 리스트</caption>
|
||||
<colgroup>
|
||||
<col style="width:60px;">
|
||||
<col style="width:150px">
|
||||
<col style="width:250px">
|
||||
<col style="width:250px">
|
||||
<col style="width:250px">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="b-checkbox checkbox is-medium tr-color-check check-all">
|
||||
<input type="checkbox" value="">
|
||||
<span class="check"></span>
|
||||
</label>
|
||||
</th>
|
||||
<th>브랜드 몰 명</th>
|
||||
<th>쿠폰명</th>
|
||||
<th>혜택</th>
|
||||
<th>유효기간</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="selectList" >
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.cupnpkVO.packedCouponInnbs && fn:length(resultMap.cupnpkVO.packedCouponInnbs) > 0}">
|
||||
<c:forEach items="${ resultMap.couponList }" var="couponList" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" id="couponInnb" name="packedCouponInnbs" value="<c:out value="${couponList.couponInnb}" />">
|
||||
<input type="hidden" id="sopmalName" name="sopmalName" value="<c:out value="${couponList.sopmalNm}" /> "/>
|
||||
<input type="hidden" id="couponName" name="couponName" value="<c:out value="${couponList.coupNm}" /> "/>
|
||||
<input type="hidden" id="bnefDv" name="bnefDv" value="<c:out value="${couponList.bnefDv}" /> "/>
|
||||
<input type="hidden" id="goodsDscntDv" name="goodsDscntDv" value="<c:out value="${couponList.goodsDscntDv}" /> "/>
|
||||
<input type="hidden" id="aditDscntAmt" name="aditDscntAmt" value="<c:out value="${couponList.aditDscntAmt}" /> "/>
|
||||
<input type="hidden" id="aditDscntRt" name="aditDscntRt" value="<c:out value="${couponList.aditDscntRt}" /> "/>
|
||||
<input type="hidden" id="dscntMxmmAmt" name="dscntMxmmAmt" value="<c:out value="${couponList.dscntMxmmAmt}" /> "/>
|
||||
<input type="hidden" id="dlvyAmtDscntDv" name="dlvyAmtDscntDv" value="<c:out value="${couponList.dlvyAmtDscntDv}" /> "/>
|
||||
<input type="hidden" id="dlvyAmtDscntAmt" name="dlvyAmtDscntAmt" value="<c:out value="${couponList.dlvyAmtDscntAmt}" /> "/>
|
||||
<input type="hidden" id="dlvyAmtMxmmDscntAmt" name="dlvyAmtMxmmDscntAmt" value="<c:out value="${couponList.dlvyAmtMxmmDscntAmt}" /> "/>
|
||||
<input type="hidden" id="couponRegistDe" name="couponRegistDe" value="<c:out value="${couponList.registDe}" /> "/>
|
||||
<input type="hidden" id="couponValidpdKnd" name="couponValidpdKnd" value="<c:out value="${couponList.validpdKnd}" /> "/>
|
||||
<input type="hidden" id="couponValidpdBgnDe" name="couponValidpdBgnDe" value="<c:out value="${couponList.validpdBgnDe}" /> "/>
|
||||
<input type="hidden" id="couponValidpdEndDe" name="couponValidpdEndDe" value="<c:out value="${couponList.validpdEndDe}" /> "/>
|
||||
<input type="hidden" id="couponValidpdDeCnt" name="couponValidpdDeCnt" value="<c:out value="${couponList.validpdDeCnt}" /> "/>
|
||||
<input type="hidden" id="couponValidpdCntDe" name="couponValidpdCntDe" value="<c:out value="${couponList.validpdCntDe}" /> "/>
|
||||
<label class="b-checkbox checkbox is-medium tr-color-check">
|
||||
<input type="checkbox" name="choiseCouponCheckbox" value="">
|
||||
<span class="check"></span>
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${couponList.sopmalNm}" />
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${couponList.coupNm}" />
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${ couponList.bnefDv eq '01' || couponList.bnefDv eq '03' }">
|
||||
<span class="fw-500">
|
||||
<c:out value="${ couponList.aditDscntAmt }"/>
|
||||
<c:if test="${ '01' eq couponList.goodsDscntDv }">% 할인</c:if>
|
||||
<c:if test="${ '02' eq couponList.goodsDscntDv }">원 할인</c:if>
|
||||
</span><br/>
|
||||
<c:if test="${ '01' eq couponList.goodsDscntDv }">
|
||||
<span class="gray-8">최대 <c:out value="${ couponList.dscntMxmmAmt }"/>원 할인</span>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:when test="${ couponList.bnefDv eq '02' }">
|
||||
<span class="fw-500">
|
||||
<c:if test="${ '01' eq couponList.dlvyAmtDscntDv }">기본배송비 무료,
|
||||
</span>
|
||||
<br>
|
||||
<span class="gray-8">
|
||||
최대 <c:out value="${ couponList.dlvyAmtMxmmDscntAmt }"/>원 할인</c:if>
|
||||
</span>
|
||||
<span class="fw-500">
|
||||
<c:if test="${ '02' eq couponList.dlvyAmtDscntDv }">배송비 <c:out value="${ couponList.dlvyAmtDscntAmt }"/>원 할인</c:if>
|
||||
</span>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<c:choose>
|
||||
<c:when test="${ '01' eq couponList.validpdKnd }">
|
||||
<c:out value="${couponList.validpdBgnDe}" />
|
||||
~
|
||||
<c:out value="${couponList.validpdEndDe}" />
|
||||
</c:when>
|
||||
<c:when test="${ '02' eq couponList.validpdKnd }">
|
||||
(발급일로부터)
|
||||
<c:out value="${couponList.validpdDeCnt}" /> 일
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:when test="${ empty resultMap.couponList }">
|
||||
<tr>
|
||||
<td colspan="100%">조회된 데이터가 없습니다.</td>
|
||||
</tr>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<div id="modalDiv">
|
||||
</div>
|
||||
<form id="listForm" name="listForm" >
|
||||
<input type="hidden" id="cupnpkInnb" name ="cupnpkInnb"/>
|
||||
<input type="hidden" id="searchCupnpkNm" name="searchCupnpkNm" title="검색_쿠폰팩명" value="${ searchForm.searchCupnpkNm }">
|
||||
|
||||
|
||||
<input type="hidden" id="searchUseAt" name="searchUseAt" title="쿠폰팩 사용여부" value="${ searchForm.searchUseAt }">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="${ searchForm.pageIndex }"/>
|
||||
<input type="hidden" id="recordCountPerPage" name="recordCountPerPage" value="${ searchForm.recordCountPerPage }"/>
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="${ searchForm.pageUnit }"/>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,746 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
|
||||
<%--
|
||||
Class Name : CupnpkRegistC.jsp
|
||||
Description : 쿠폰팩 상세 수정
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.07 추지훈 최초 생성
|
||||
--%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
function checkBoxAllUpdate() {
|
||||
$('#couponChoiseTr input[name="choiseCouponCheckbox"]').click(function() {
|
||||
var checkBoxAll = true;
|
||||
|
||||
$('#couponChoiseTr input[name="choiseCouponCheckbox"]').each(function() {
|
||||
if (!$(this).prop('checked')) {
|
||||
checkBoxAll = false;
|
||||
}
|
||||
});
|
||||
|
||||
$('#couponChoiseTr .check-all input[type="checkbox"]').prop('checked', checkBoxAll);
|
||||
});
|
||||
}
|
||||
|
||||
checkBoxAllUpdate();
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* 쿠폰 선택 삭제 함수
|
||||
*/
|
||||
const fn_delete_couponchoise = function () {
|
||||
var $tbody = $("#selectList");
|
||||
|
||||
// 체크된 input 찾기
|
||||
$tbody.find('input[type="checkbox"]:checked').each(function () {
|
||||
$(this).closest('tr').remove(); // 체크된 tr 삭제
|
||||
});
|
||||
|
||||
if ($tbody.children().length === 0) {
|
||||
var noDataMessage = $("<tr>");
|
||||
var cell = $("<td>").attr("colspan", '100%').html('<spring:message code="common.nodata"/>');
|
||||
noDataMessage.append(cell);
|
||||
$tbody.append(noDataMessage);
|
||||
}
|
||||
|
||||
$('.check-all input[type="checkbox"]').prop('checked', false);
|
||||
};
|
||||
|
||||
/**
|
||||
* 쿠폰 선택 모달에서 부모창으로 값을 전달하는 함수
|
||||
*/
|
||||
const fn_send_cupnpkregistpage = function(modalId) {
|
||||
|
||||
|
||||
let childCouponList = [];
|
||||
// 선택된 쿠폰 리스트 반복
|
||||
$('#appendList tr').each(function() {
|
||||
let coupon = {
|
||||
couponInnb: '',
|
||||
sopmalName: '',
|
||||
couponSopmalCd: '',
|
||||
couponName: '',
|
||||
bnefDv: '',
|
||||
goodsDscntDv: '',
|
||||
aditDscntAmt: '',
|
||||
aditDscntRt: '',
|
||||
dscntMxmmAmt: '',
|
||||
dlvyAmtDscntDv: '',
|
||||
dlvyAmtDscntAmt: '',
|
||||
dlvyAmtMxmmDscntAmt: '',
|
||||
couponRegistDe: '',
|
||||
couponValidpdKnd: '',
|
||||
couponValidpdBgnDe: '',
|
||||
couponValidpdEndDe: '',
|
||||
couponValidpdDeCnt: '',
|
||||
couponValidpdCntDe: ''
|
||||
};
|
||||
|
||||
coupon.couponInnb = $(this).find("#couponInnb").val();
|
||||
coupon.sopmalName = $(this).find("#sopmalName").val();
|
||||
coupon.couponSopmalCd = $(this).find("#couponSopmalCd").val();
|
||||
coupon.couponName = $(this).find("#couponName").val();
|
||||
coupon.bnefDv = $(this).find("#bnefDv").val();
|
||||
coupon.goodsDscntDv = $(this).find("#goodsDscntDv").val();
|
||||
coupon.aditDscntAmt = $(this).find("#aditDscntAmt").val();
|
||||
coupon.aditDscntRt = $(this).find("#aditDscntRt").val();
|
||||
coupon.dscntMxmmAmt = $(this).find("#dscntMxmmAmt").val();
|
||||
coupon.dlvyAmtDscntDv = $(this).find("#dlvyAmtDscntDv").val();
|
||||
coupon.dlvyAmtDscntAmt = $(this).find("#dlvyAmtDscntAmt").val();
|
||||
coupon.dlvyAmtMxmmDscntAmt = $(this).find("#dlvyAmtMxmmDscntAmt").val();
|
||||
coupon.couponRegistDe = $(this).find("#couponRegistDe").val();
|
||||
coupon.couponValidpdKnd = $(this).find("#couponValidpdKnd").val();
|
||||
coupon.couponValidpdBgnDe = $(this).find("#couponValidpdBgnDe").val();
|
||||
coupon.couponValidpdEndDe = $(this).find("#couponValidpdEndDe").val();
|
||||
coupon.couponValidpdDeCnt = $(this).find("#couponValidpdDeCnt").val();
|
||||
coupon.couponValidpdCntDe = $(this).find("#couponValidpdCntDe").val();
|
||||
|
||||
childCouponList.push(coupon);
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#"+modalId+" > a").each(function() {
|
||||
if(this.href.indexOf('#close-modal')){
|
||||
$(this).click();
|
||||
}
|
||||
});
|
||||
$('#' + modalId).remove();
|
||||
|
||||
// 선택된 쿠폰 리스트를 CupnpkRegistC.jsp > 쿠폰선택 영역에 그려줄 html
|
||||
let sletdTrHtml = '<tr id="#choiseListId" >';
|
||||
sletdTrHtml = sletdTrHtml+'<td class="center">';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponInnb" name="packedCouponInnbs" value="#couponInnb"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="sopmalName" name="sopmalName" value="#sopmalName"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponSopmalCd" name="couponSopmalCd" value="#couponSopmalCd"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponName" name="couponName" value="#couponName"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="bnefDv" name="bnefDv" value="#bnefDv"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="goodsDscntDv" name="goodsDscntDv" value="#goodsDscntDv"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="aditDscntAmt" name="aditDscntAmt" value="#aditDscntAmt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="aditDscntRt" name="aditDscntRt" value="#aditDscntRt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="dscntMxmmAmt" name="dscntMxmmAmt" value="#dscntMxmmAmt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="dlvyAmtDscntDv" name="dlvyAmtDscntDv" value="#dlvyAmtDscntDv"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="dlvyAmtDscntAmt" name="dlvyAmtDscntAmt" value="#dlvyAmtDscntAmt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="dlvyAmtMxmmDscntAmt" name="dlvyAmtMxmmDscntAmt" value="#dlvyAmtMxmmDscntAmt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponRegistDe" name="couponRegistDe" value="#couponRegistDe"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdKnd" name="couponValidpdKnd" value="#couponValidpdKnd"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdBgnDe" name="couponValidpdBgnDe" value="#couponValidpdBgnDe"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdEndDe" name="couponValidpdEndDe" value="#couponValidpdEndDe"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdDeCnt" name="couponValidpdDeCnt" value="#couponValidpdDeCnt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdCntDe" name="couponValidpdCntDe" value="#couponValidpdCntDe"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<label class="b-checkbox checkbox is-medium tr-color-check">';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="checkbox" id="checkboxCouponInnb" name="choiseCouponCheckbox" value="#couponInnb">';
|
||||
sletdTrHtml = sletdTrHtml+'<span class="check"></span>';
|
||||
sletdTrHtml = sletdTrHtml+'</label>';
|
||||
sletdTrHtml = sletdTrHtml+'</td>';
|
||||
sletdTrHtml = sletdTrHtml+'<td>';
|
||||
sletdTrHtml = sletdTrHtml+'#sopmalName';
|
||||
sletdTrHtml = sletdTrHtml+'</td>';
|
||||
sletdTrHtml = sletdTrHtml+'<td>';
|
||||
sletdTrHtml = sletdTrHtml+'#couponName';
|
||||
sletdTrHtml = sletdTrHtml+'</td>';
|
||||
|
||||
// 배송비할인 무료 html
|
||||
let dlcyAmtDscntFreeHtml = '<td>';
|
||||
dlcyAmtDscntFreeHtml = dlcyAmtDscntFreeHtml+'<span class="fw-500">';
|
||||
dlcyAmtDscntFreeHtml = dlcyAmtDscntFreeHtml+'기본 배송비 무료,';
|
||||
dlcyAmtDscntFreeHtml = dlcyAmtDscntFreeHtml+'</span><br/>';
|
||||
dlcyAmtDscntFreeHtml = dlcyAmtDscntFreeHtml+'<span class="gray-8">최대 #dlvyAmtMxmmDscntAmt 원 할인</span>';
|
||||
dlcyAmtDscntFreeHtml = dlcyAmtDscntFreeHtml+'</td>';
|
||||
|
||||
// 배송비 금액 할인 html
|
||||
let dlcyAmtDscntWonHtml = '<td>';
|
||||
dlcyAmtDscntWonHtml = dlcyAmtDscntWonHtml+'<span class="fw-500">';
|
||||
dlcyAmtDscntWonHtml = dlcyAmtDscntWonHtml+'배송비 할인,';
|
||||
dlcyAmtDscntWonHtml = dlcyAmtDscntWonHtml+'</span><br/>';
|
||||
dlcyAmtDscntWonHtml = dlcyAmtDscntWonHtml+'<span class="gray-8">#dlvyAmtDscntAmt 원 할인</span>';
|
||||
dlcyAmtDscntWonHtml = dlcyAmtDscntWonHtml+'</td>';
|
||||
|
||||
|
||||
// 비율 할인 html
|
||||
let goodsDscntDvRtHtml = '<td>';
|
||||
goodsDscntDvRtHtml = goodsDscntDvRtHtml+'<span class="fw-500">';
|
||||
goodsDscntDvRtHtml = goodsDscntDvRtHtml+'#aditDscntAmt % 할인';
|
||||
goodsDscntDvRtHtml = goodsDscntDvRtHtml+'</span><br/>';
|
||||
goodsDscntDvRtHtml = goodsDscntDvRtHtml+'<span class="gray-8">최대 #dscntMxmmAmt 원 할인</span>';
|
||||
goodsDscntDvRtHtml = goodsDscntDvRtHtml+'</td>';
|
||||
|
||||
|
||||
// 금액 할인 html
|
||||
let goodsDscntDvAmtHtml = '<td>';
|
||||
goodsDscntDvAmtHtml = goodsDscntDvAmtHtml+'<span class="fw-500">';
|
||||
goodsDscntDvAmtHtml = goodsDscntDvAmtHtml+'#aditDscntAmt 원 할인';
|
||||
goodsDscntDvAmtHtml = goodsDscntDvAmtHtml+'</span>';
|
||||
goodsDscntDvAmtHtml = goodsDscntDvAmtHtml+'</td>';
|
||||
|
||||
|
||||
// 유효기간 기간 제한 (날짜) html
|
||||
let sletdTrTail = '<td>';
|
||||
sletdTrTail = sletdTrTail+'<span>#couponValidpdBgnDe</span>';
|
||||
sletdTrTail = sletdTrTail+'~';
|
||||
sletdTrTail = sletdTrTail+'<span>#couponValidpdEndDe</span>';
|
||||
sletdTrTail = sletdTrTail+'</td>';
|
||||
sletdTrTail = sletdTrTail+'</tr>';
|
||||
|
||||
|
||||
// 유효기간 발급일로부터 일수 html
|
||||
let sletdTrCntDe = '<td>';
|
||||
sletdTrCntDe = sletdTrCntDe+'(발급일로부터) ';
|
||||
sletdTrCntDe = sletdTrCntDe+'<span>#couponValidpdDeCnt 일</span>';
|
||||
sletdTrCntDe = sletdTrCntDe+'</td>';
|
||||
sletdTrCntDe = sletdTrCntDe+'</tr>';
|
||||
|
||||
|
||||
|
||||
// 선택된 쿠폰이 있을 경우
|
||||
if (childCouponList != null && childCouponList.length >= 0) {
|
||||
|
||||
// 기존에 그려진 쿠폰 리스트를 비워줌
|
||||
$('#selectList').empty();
|
||||
// 선택된 쿠폰 리스트를 CupnpkRegistC.jsp > 쿠폰선택 영역에 그려줌.
|
||||
childCouponList.forEach(function(coupon) {
|
||||
|
||||
let trHtml = sletdTrHtml
|
||||
.replaceAll("#choiseListId", 'choiseListId' + coupon.couponInnb)
|
||||
.replaceAll("#couponInnb", coupon.couponInnb)
|
||||
.replaceAll("#sopmalName", coupon.sopmalName)
|
||||
.replaceAll("#couponSopmalCd", coupon.couponSopmalCd)
|
||||
.replaceAll("#couponName", coupon.couponName)
|
||||
.replaceAll("#bnefDv", coupon.bnefDv)
|
||||
.replaceAll("#goodsDscntDv", coupon.goodsDscntDv)
|
||||
.replaceAll("#aditDscntAmt", coupon.aditDscntAmt)
|
||||
.replaceAll("#aditDscntRt", coupon.aditDscntRt)
|
||||
.replaceAll("#dscntMxmmAmt", coupon.dscntMxmmAmt)
|
||||
.replaceAll("#dlvyAmtDscntDv", coupon.dlvyAmtDscntDv)
|
||||
.replaceAll("#dlvyAmtDscntAmt", coupon.dlvyAmtDscntAmt)
|
||||
.replaceAll("#dlvyAmtMxmmDscntAmt", coupon.dlvyAmtMxmmDscntAmt)
|
||||
.replaceAll("#couponRegistDe", coupon.couponRegistDe)
|
||||
.replaceAll("#couponValidpdKnd", coupon.couponValidpdKnd)
|
||||
.replaceAll("#couponValidpdBgnDe", coupon.couponValidpdBgnDe)
|
||||
.replaceAll("#couponValidpdEndDe", coupon.couponValidpdEndDe)
|
||||
.replaceAll("#couponValidpdDeCnt", coupon.couponValidpdDeCnt)
|
||||
.replaceAll("#couponValidpdCntDe", coupon.couponValidpdCntDe);
|
||||
|
||||
|
||||
|
||||
// 배송비할인인 경우
|
||||
if (coupon.bnefDv.trim() === '02') {
|
||||
|
||||
// 무료 배송비의 경우
|
||||
if (coupon.dlvyAmtDscntDv.trim() === '01') {
|
||||
trHtml = trHtml + dlcyAmtDscntFreeHtml
|
||||
.replaceAll("#dlvyAmtMxmmDscntAmt", coupon.dlvyAmtMxmmDscntAmt);
|
||||
|
||||
// 금액할인 배송비의 경우
|
||||
} else if (coupon.dlvyAmtDscntDv.trim() === '02') {
|
||||
trHtml = trHtml + dlcyAmtDscntWonHtml
|
||||
.replaceAll("#dlvyAmtDscntAmt", coupon.dlvyAmtDscntAmt);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
// 혜택 구분값이 percent 인 경우 비율 html 을 append
|
||||
if (coupon.goodsDscntDv.trim() === '01') {
|
||||
|
||||
trHtml = trHtml + goodsDscntDvRtHtml
|
||||
.replaceAll("#aditDscntAmt", coupon.aditDscntAmt)
|
||||
.replaceAll("#dscntMxmmAmt", coupon.dscntMxmmAmt);
|
||||
// 혜택 구분값이 won 인 경우 금액 html 을 append
|
||||
} else if (coupon.goodsDscntDv.trim() === '02') {
|
||||
trHtml = trHtml + goodsDscntDvAmtHtml
|
||||
.replaceAll("#aditDscntAmt", coupon.aditDscntAmt);
|
||||
}
|
||||
}
|
||||
|
||||
// 기간설정 날짜
|
||||
if (coupon.couponValidpdKnd.trim() === '01') {
|
||||
trHtml = trHtml + sletdTrTail
|
||||
.replaceAll("#couponValidpdBgnDe", coupon.couponValidpdBgnDe)
|
||||
.replaceAll("#couponValidpdEndDe", coupon.couponValidpdEndDe);
|
||||
|
||||
// 기간설정 일수
|
||||
} else if (coupon.couponValidpdKnd.trim() === '02') {
|
||||
trHtml = trHtml + sletdTrCntDe
|
||||
.replaceAll("#couponValidpdDeCnt", coupon.couponValidpdDeCnt);
|
||||
}
|
||||
|
||||
|
||||
function checkBoxAllUpdate() {
|
||||
$('#couponChoiseTr input[name="choiseCouponCheckbox"]').click(function() {
|
||||
var checkBoxAll = true;
|
||||
|
||||
$('#couponChoiseTr input[name="choiseCouponCheckbox"]').each(function() {
|
||||
if (!$(this).prop('checked')) {
|
||||
checkBoxAll = false;
|
||||
}
|
||||
});
|
||||
|
||||
$('#couponChoiseTr .check-all input[type="checkbox"]').prop('checked', checkBoxAll);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('#selectList').append(trHtml);
|
||||
|
||||
checkBoxAllUpdate();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰팩 등록 화면에서 선택된 쿠폰을 반환하는 함수
|
||||
*/
|
||||
const getAllCouponList = function() {
|
||||
let couponList = [];
|
||||
// CupnpkRegistC.jsp 에서 선택된 쿠폰을 모달 창으로 퍼올리는 작업
|
||||
$("#selectList tr").each(function() {
|
||||
let coupon = {
|
||||
couponInnb: '',
|
||||
sopmalName: '',
|
||||
couponSopmalCd: '',
|
||||
couponName: '',
|
||||
bnefDv: '',
|
||||
goodsDscntDv: '',
|
||||
aditDscntAmt: '',
|
||||
aditDscntRt: '',
|
||||
dscntMxmmAmt: '',
|
||||
dlvyAmtDscntDv: '',
|
||||
dlvyAmtDscntAmt: '',
|
||||
dlvyAmtMxmmDscntAmt: '',
|
||||
couponRegistDe: '',
|
||||
couponValidpdKnd: '',
|
||||
couponValidpdBgnDe: '',
|
||||
couponValidpdEndDe: '',
|
||||
couponValidpdDeCnt: '',
|
||||
couponValidpdCntDe: ''
|
||||
};
|
||||
|
||||
coupon.couponInnb = $(this).find("#couponInnb").val();
|
||||
coupon.sopmalName = $(this).find("#sopmalName").val();
|
||||
coupon.couponSopmalCd = $(this).find("#couponSopmalCd").val();
|
||||
coupon.couponName = $(this).find("#couponName").val();
|
||||
coupon.bnefDv = $(this).find("#bnefDv").val();
|
||||
coupon.goodsDscntDv = $(this).find("#goodsDscntDv").val();
|
||||
coupon.aditDscntAmt = $(this).find("#aditDscntAmt").val();
|
||||
coupon.aditDscntRt = $(this).find("#aditDscntRt").val();
|
||||
coupon.dscntMxmmAmt = $(this).find("#dscntMxmmAmt").val();
|
||||
coupon.dlvyAmtDscntDv = $(this).find("#dlvyAmtDscntDv").val();
|
||||
coupon.dlvyAmtDscntAmt = $(this).find("#dlvyAmtDscntAmt").val();
|
||||
coupon.dlvyAmtMxmmDscntAmt = $(this).find("#dlvyAmtMxmmDscntAmt").val();
|
||||
coupon.couponRegistDe = $(this).find("#couponRegistDe").val();
|
||||
coupon.couponValidpdKnd = $(this).find("#couponValidpdKnd").val();
|
||||
coupon.couponValidpdBgnDe = $(this).find("#couponValidpdBgnDe").val();
|
||||
coupon.couponValidpdEndDe = $(this).find("#couponValidpdEndDe").val();
|
||||
coupon.couponValidpdDeCnt = $(this).find("#couponValidpdDeCnt").val();
|
||||
coupon.couponValidpdCntDe = $(this).find("#couponValidpdCntDe").val();
|
||||
|
||||
if (fn_is_empty(coupon.couponInnb)) {
|
||||
} else {
|
||||
couponList.push(coupon);
|
||||
}
|
||||
|
||||
});
|
||||
// 선택된 쿠폰 리스트 반환
|
||||
return couponList;
|
||||
};
|
||||
|
||||
|
||||
/* ********************************************************
|
||||
* 쿠폰 선택 팝업 이동
|
||||
******************************************************** */
|
||||
const fn_move_coupon_choisepage_pop = function () {
|
||||
// const popupListForm = $("#popupListForm").serialize();
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<c:url value="/mngr/promtn/coupon/selectCouponChoisePopupForm"/>',
|
||||
success: function (data) {
|
||||
$('#couponChoisePopup').remove();
|
||||
$('#modalDiv').html(data);
|
||||
$('#couponChoisePopup').modal();
|
||||
fn_search_coupon_choisepage_pop();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* 쿠폰 선택 모달 : 쿠폰 검색 ajax
|
||||
*/
|
||||
const fn_search_coupon_choisepage_pop = function (pageIndex) {
|
||||
// 페이지정보가 넘어오지 않았을 경우 기본값 초기화
|
||||
if(!pageIndex) {
|
||||
pageIndex = 1;
|
||||
}
|
||||
// 모달 쿠폰 검색 form 에 페이지 정보를 넣어줌.
|
||||
$('#popupListForm').find('input[name=pageIndex]').eq(0).val(pageIndex);
|
||||
const popupListForm = $("#popupListForm").serialize();
|
||||
|
||||
|
||||
// 모달 쿠폰 검색
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<c:url value="/mngr/promtn/coupon/selectCouponChoisePopupSearch"/>',
|
||||
data: popupListForm,
|
||||
success: function(data) {
|
||||
$('#couponAjaxList').empty();
|
||||
$('#couponAjaxList').html(data);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰팩 조회
|
||||
*/
|
||||
function fn_select_cupnpk_list() {
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/coupon/selectCupnpkListInqireForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
/**
|
||||
* 쿠폰 수정
|
||||
*/
|
||||
const fn_update = function() {
|
||||
|
||||
data = $('#listForm').serialize();
|
||||
|
||||
|
||||
if (confirm('쿠폰팩을 <spring:message code="confirm.common.update"/>')) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url : "/mngr/promtn/coupon/updateCupnpkUpdt",
|
||||
data : data,
|
||||
success:function(result) {
|
||||
|
||||
|
||||
|
||||
if(result.resBody != null) {
|
||||
// 응답객체 선언
|
||||
const resBody = result.resBody;
|
||||
// 객체 -> JSON 파싱
|
||||
const parsedResult = JSON.parse(resBody.result);
|
||||
|
||||
// 파싱값에 데이터가 있으면 실행
|
||||
if (parsedResult.cupnpkInnb !== null) {
|
||||
|
||||
alert('<spring:message code="success.common.insert"/>');
|
||||
// 상세 수정 호출
|
||||
fn_move_dtlupdt(parsedResult.cupnpkInnb);
|
||||
} else {
|
||||
alert('<spring:message code="fail.common.update"/>');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* 쿠폰 상세 수정 이동
|
||||
*/
|
||||
function fn_move_dtlupdt(cupnpkInnb) {
|
||||
|
||||
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/coupon/selectCupnpkDtlUpdtForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#cupnpkInnb').val(cupnpkInnb);
|
||||
$('#pageIndex').val(1);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Header.jsp"%>
|
||||
<main class="main">
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Left.jsp"%>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">쿠폰팩 상세 수정</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<a href="#fn_select_cupnpk_list" onclick="fn_select_cupnpk_list(); return false;" class="btn outline"><spring:message code="button.list"/></a>
|
||||
<button class="btn primary" onclick="fn_update(); return false;" ><spring:message code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">기본 정보</h3>
|
||||
<form id="listForm" method="post" >
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>쿠폰팩 명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text md" type="text" id="cupnpkNm" name="cupnpkNm" title="쿠폰팩명" value="${ resultMap.cupnpkVO.cupnpkNm }">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>쿠폰팩 설명<span class="red-7">*</span></th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" id="cupnpkDc" name="cupnpkDc" title="쿠폰팩설명" value="${ resultMap.cupnpkVO.cupnpkDc }">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사용여부<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-1" name="cupnpkUseAt" value="Y" <c:if test="${ fn:contains(resultMap.cupnpkVO.cupnpkUseAt, 'Y')}">checked="checked"</c:if>>
|
||||
<label for="r-1">사용</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-2" name="cupnpkUseAt" value="N" <c:if test="${ fn:contains(resultMap.cupnpkVO.cupnpkUseAt, 'N')}">checked="checked"</c:if>>
|
||||
<label for="r-2">미사용</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="couponChoiseTr">
|
||||
<th>쿠폰선택<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
</div>
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
<button class="btn xsm primary" id="couponChoiseBtn" onclick="fn_move_coupon_choisepage_pop(); return false;">
|
||||
쿠폰 선택
|
||||
</button>
|
||||
<button class="btn xsm dark" id="couponDeleteBtn" onclick="fn_delete_couponchoise(); return false;">쿠폰 삭제</button>
|
||||
</div>
|
||||
<div class="center"></div>
|
||||
</div>
|
||||
 
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical tight">
|
||||
<caption>쿠폰팩에 들어갈 쿠폰 리스트</caption>
|
||||
<colgroup>
|
||||
<col style="width:60px;">
|
||||
<col style="width:150px">
|
||||
<col style="width:250px">
|
||||
<col style="width:250px">
|
||||
<col style="width:250px">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="b-checkbox checkbox is-medium tr-color-check check-all">
|
||||
<input type="checkbox" value="">
|
||||
<span class="check"></span>
|
||||
</label>
|
||||
</th>
|
||||
<th>브랜드 몰 명</th>
|
||||
<th>쿠폰명</th>
|
||||
<th>혜택</th>
|
||||
<th>유효기간</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="selectList" >
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.cupnpkVO.packedCouponInnbs && fn:length(resultMap.cupnpkVO.packedCouponInnbs) > 0}">
|
||||
<c:forEach items="${ resultMap.couponList }" var="couponList" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" id="couponInnb" name="packedCouponInnbs" value="<c:out value="${couponList.couponInnb}"/>">
|
||||
<input type="hidden" id="sopmalName" name="sopmalName" value="<c:out value="${couponList.sopmalNm}"/>"/>
|
||||
<input type="hidden" id="couponSopmalCd" name="couponSopmalCd" value="<c:out value="${couponList.sopmalCd}"/>"/>
|
||||
<input type="hidden" id="couponName" name="couponName" value="<c:out value="${couponList.coupNm}"/>"/>
|
||||
<input type="hidden" id="bnefDv" name="bnefDv" value="<c:out value="${couponList.bnefDv}"/>"/>
|
||||
<input type="hidden" id="goodsDscntDv" name="goodsDscntDv" value="<c:out value="${couponList.goodsDscntDv}"/>"/>
|
||||
<input type="hidden" id="aditDscntAmt" name="aditDscntAmt" value="<c:out value="${couponList.aditDscntAmt}"/>"/>
|
||||
<input type="hidden" id="aditDscntRt" name="aditDscntRt" value="<c:out value="${couponList.aditDscntRt}"/>"/>
|
||||
<input type="hidden" id="dscntMxmmAmt" name="dscntMxmmAmt" value="<c:out value="${couponList.dscntMxmmAmt}"/>"/>
|
||||
<input type="hidden" id="dlvyAmtDscntDv" name="dlvyAmtDscntDv" value="<c:out value="${couponList.dlvyAmtDscntDv}"/>"/>
|
||||
<input type="hidden" id="dlvyAmtDscntAmt" name="dlvyAmtDscntAmt" value="<c:out value="${couponList.dlvyAmtDscntAmt}"/>"/>
|
||||
<input type="hidden" id="dlvyAmtMxmmDscntAmt" name="dlvyAmtMxmmDscntAmt" value="<c:out value="${couponList.dlvyAmtMxmmDscntAmt}"/>"/>
|
||||
<input type="hidden" id="couponRegistDe" name="couponRegistDe" value="<c:out value="${couponList.registDe}"/>"/>
|
||||
<input type="hidden" id="couponValidpdKnd" name="couponValidpdKnd" value="<c:out value="${couponList.validpdKnd}"/>"/>
|
||||
<input type="hidden" id="couponValidpdBgnDe" name="couponValidpdBgnDe" value="<c:out value="${couponList.validpdBgnDe}"/>"/>
|
||||
<input type="hidden" id="couponValidpdEndDe" name="couponValidpdEndDe" value="<c:out value="${couponList.validpdEndDe}"/>"/>
|
||||
<input type="hidden" id="couponValidpdDeCnt" name="couponValidpdDeCnt" value="<c:out value="${couponList.validpdDeCnt}"/>"/>
|
||||
<input type="hidden" id="couponValidpdCntDe" name="couponValidpdCntDe" value="<c:out value="${couponList.validpdCntDe}"/>"/>
|
||||
<label class="b-checkbox checkbox is-medium tr-color-check">
|
||||
<input type="checkbox" name="choiseCouponCheckbox" value="">
|
||||
<span class="check"></span>
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${couponList.sopmalNm}" />
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${couponList.coupNm}" />
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${ couponList.bnefDv eq '01' || couponList.bnefDv eq '03' }">
|
||||
<span class="fw-500">
|
||||
<c:out value="${ couponList.aditDscntAmt }"/>
|
||||
<c:if test="${ '01' eq couponList.goodsDscntDv }">% 할인</c:if>
|
||||
<c:if test="${ '02' eq couponList.goodsDscntDv }">원 할인</c:if>
|
||||
</span><br/>
|
||||
<c:if test="${ '01' eq couponList.goodsDscntDv }">
|
||||
<span class="gray-8">최대 <c:out value="${ couponList.dscntMxmmAmt }"/>원 할인</span>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:when test="${ couponList.bnefDv eq '02' }">
|
||||
<span class="fw-500">
|
||||
<c:if test="${ '01' eq couponList.dlvyAmtDscntDv }">기본배송비 무료,
|
||||
</span>
|
||||
<br>
|
||||
<span class="gray-8">
|
||||
최대 <c:out value="${ couponList.dlvyAmtMxmmDscntAmt }"/>원 할인</c:if>
|
||||
</span>
|
||||
<span class="fw-500">
|
||||
<c:if test="${ '02' eq couponList.dlvyAmtDscntDv }">배송비 <c:out value="${ couponList.dlvyAmtDscntAmt }"/>원 할인</c:if>
|
||||
</span>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<c:choose>
|
||||
<c:when test="${ '01' eq couponList.validpdKnd }">
|
||||
<c:out value="${couponList.validpdBgnDe}" />
|
||||
~
|
||||
<c:out value="${couponList.validpdEndDe}" />
|
||||
</c:when>
|
||||
<c:when test="${ '02' eq couponList.validpdKnd }">
|
||||
(발급일로부터)
|
||||
<c:out value="${couponList.validpdDeCnt}" /> 일
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:when test="${ empty resultMap.couponList }">
|
||||
<tr>
|
||||
<td colspan="100%">조회된 데이터가 없습니다.</td>
|
||||
</tr>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<input type="hidden" id="cupnpkInnb" name ="cupnpkInnb" value="<c:out value="${ resultMap.cupnpkVO.cupnpkInnb }"/>"/>
|
||||
<input type="hidden" id="searchCupnpkNm" name="searchCupnpkNm" title="검색_쿠폰팩명" value="<c:out value="${ searchForm.searchCupnpkNm }"/>">
|
||||
<input type="hidden" id="searchUseAt" name="searchUseAt" title="쿠폰팩 사용여부" value="<c:out value="${ searchForm.searchUseAt }"/>">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ searchForm.pageIndex }"/>"/>
|
||||
<input type="hidden" id="recordCountPerPage" name="recordCountPerPage" value="<c:out value="${ searchForm.recordCountPerPage }"/>"/>
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="<c:out value="${ searchForm.pageUnit }"/>"/>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<div id="modalDiv">
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
111
src/main/webapp/WEB-INF/views/mngr/promtn/coupon/CupnpkListR.jsp
Normal file
111
src/main/webapp/WEB-INF/views/mngr/promtn/coupon/CupnpkListR.jsp
Normal file
@@ -0,0 +1,111 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
|
||||
<%--
|
||||
Class Name : CupnpkListR.jsp
|
||||
Description : 쿠폰팩 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-12-06 추지훈 최초 생성
|
||||
--%>
|
||||
|
||||
<section class="content-section">
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
<div class="search-number">
|
||||
<span class="search-number__text">총 <strong><c:out value="${ resultMap.paginationInfo.totalRecordCount }"/></strong>건</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="select-box">
|
||||
<select id="pageUnit" name="pageUnit" title="페이지당 출력될 목록건수" onchange="console.log('test'); fn_select_cupnpk_list('1');">
|
||||
<c:forEach items="${ resultMap.paginationInfo.pageUnitArr }" var="pageUnit" varStatus="pageUnitStatus">
|
||||
<option value="<c:out value="${ pageUnit }"/>" <c:if test="${ resultMap.paginationInfo.recordCountPerPage eq pageUnit}">selected="selected"</c:if>><c:out value="${ pageUnit }"/>개씩</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="spacing">
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<!-- 각 열 width 설정 -->
|
||||
<colgroup>
|
||||
<col style="width: 7%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 12%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>쿠폰팩 명</th>
|
||||
<th>쿠폰팩 설명</th>
|
||||
<th>사용여부</th>
|
||||
<th>등록일</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultList && fn:length(resultMap.resultList) > 0 }">
|
||||
<c:forEach items="${ resultMap.resultList }" var="cupnpkList" varStatus="status">
|
||||
<tr>
|
||||
<td><c:out value="${ resultMap.paginationInfo.totalRecordCount - cupnpkList.rnum + 1}" /></td>
|
||||
<td class="left">
|
||||
<span class="under-line" onclick="fn_move_dtl_uptpage(<c:out value="${ cupnpkList.cupnpkInnb }" />, <c:out value="${resultMap.paramVO.pageIndex}" />, <c:out value="${resultMap.paramVO.recordCountPerPage}" />, <c:out value="${resultMap.paramVO.pageUnit}" />)">
|
||||
<c:out value="${cupnpkList.cupnpkNm}" />
|
||||
</span>
|
||||
</td>
|
||||
<td class="left">
|
||||
<c:out value="${cupnpkList.cupnpkDc}" />
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${cupnpkList.cupnpkUseAt eq 'Y'}">
|
||||
<span class="blue-7 fw-500">사용함</span>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<span class="red-7 fw-500">미사용</span>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>
|
||||
<fmt:parseDate var="registDe" value="${cupnpkList.registDe}" pattern="yyyy-MM-dd"/>
|
||||
<span><fmt:formatDate value="${registDe}" pattern="yyyy-MM-dd"/></span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<button class="btn xsm light-gray" type="button" onclick="fn_go_copypage(<c:out value="${ cupnpkList.cupnpkInnb }" />, <c:out value="${resultMap.paramVO.pageIndex}" />, <c:out value="${resultMap.paramVO.recordCountPerPage}" />, <c:out value="${resultMap.paramVO.pageUnit}" />)">복사</button>
|
||||
<button class="btn xsm dark" type="button" onclick="fn_delete_cupnpk('<c:out value="${cupnpkList.cupnpkInnb}"/>'); return false;"><spring:message code="button.delete"/></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="100%" ><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_cupnpk_list" />
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
|
||||
<%--
|
||||
Class Name : CupnpkListR.jsp
|
||||
Description : 쿠폰팩 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-12-06 추지훈 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function(){
|
||||
let pageIndex = '<c:out value="${ resultMap.paramVO.pageIndex }"/>';
|
||||
let pageUnit = '<c:out value="${ resultMap.paramVO.pageUnit }"/>';
|
||||
|
||||
|
||||
fn_select_cupnpk_list(pageIndex, pageUnit);
|
||||
|
||||
$('#listForm').on('keydown', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
$('#searchBtn').trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* 쿠폰팩 조회
|
||||
*/
|
||||
const fn_select_cupnpk_list = function(pageIndex, pageUnit) {
|
||||
|
||||
|
||||
let dataStr;
|
||||
if(!pageIndex) {
|
||||
$('#pageIndex').val(1);
|
||||
} else {
|
||||
$('#pageIndex').val(pageIndex);
|
||||
}
|
||||
|
||||
if(!pageUnit) {
|
||||
dataStr = $('#listForm').serialize();
|
||||
} else {
|
||||
if($('#pageUnit').length){
|
||||
$('#pageUnit').val(pageUnit);
|
||||
dataStr = $('#listForm').serialize();
|
||||
} else {
|
||||
dataStr = $('#listForm').serialize()+'&pageUnit='+pageUnit;
|
||||
}
|
||||
}
|
||||
|
||||
$('#pageIndex').val(pageIndex);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url : "<c:url value="/mngr/promtn/coupon/selectCupnpkListInqire"/>",
|
||||
data : dataStr,
|
||||
success:function(resultHtml) {
|
||||
$('#pageDiv').html(resultHtml);
|
||||
$('#pageUnit').niceSelect();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰 등록 폼 이동
|
||||
*/
|
||||
const fn_move_regpage = function() {
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/coupon/selectCupnpkRegistForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰 상세 수정 이동
|
||||
*/
|
||||
const fn_move_dtl_uptpage = function(cupnpkInnb) {
|
||||
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/coupon/selectCupnpkDtlUpdtForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#cupnpkInnb').val(cupnpkInnb);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 검색 조건 초기화
|
||||
*/
|
||||
const fn_clear_input = function() {
|
||||
$('#searchForm')[0].reset();
|
||||
};
|
||||
|
||||
/**
|
||||
* 쿠폰팩 복사 이동
|
||||
*/
|
||||
const fn_go_copypage = function(cupnpkInnb) {
|
||||
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/coupon/selectCupnpkCopyForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#cupnpkInnb').val(cupnpkInnb);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/**
|
||||
* 쿠폰팩 삭제
|
||||
*/
|
||||
const fn_delete_cupnpk = function(cupnpkInnb) {
|
||||
if (confirm('쿠폰팩을 <spring:message code="confirm.common.delete"/>')) {
|
||||
$('#cupnpkInnb').val(cupnpkInnb);
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '<c:url value="/mngr/promtn/coupon/deleteCupnpkDel"/>',
|
||||
data : $('#listForm').serialize(),
|
||||
success : function(data) {
|
||||
alert('<spring:message code="success.common.delete"/>');
|
||||
fn_select_cupnpk_list(1);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 새로고침시 초기화
|
||||
history.replaceState({}, null, location.pathname);
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%-- 상단메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Header.jsp"%>
|
||||
<main class="main">
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Left.jsp"%>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">쿠폰팩 리스트</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<a href="#fn_move_regpage" onclick="fn_move_regpage(<c:out value="${resultMap.paramVO.pageIndex}" />); return false;" onkeypress="this.onclick" class="btn primary">쿠폰팩 <spring:message code="button.insert"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<form id="listForm" name="listForm" method="post" action="<c:url value="/mngr/promtn/coupon/selectCupnpkListInqireForm"/>">
|
||||
<input type="hidden" id="cupnpkInnb" name="cupnpkInnb"/>
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.paramVO.pageIndex }"/>"/>
|
||||
<input type="hidden" id="recordCountPerPage" name="recordCountPerPage" value="<c:out value="${ resultMap.paramVO.recordCountPerPage }"/>"/>
|
||||
<input type="hidden" id="sopmalCd" name="sopmalCd"/>
|
||||
<section class="content-section" id="cupnpkSearchForm">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>쿠폰팩 명</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" id="searchCupnpkNm" name="searchCupnpkNm" title="쿠폰팩명" value="<c:out value="${ resultMap.paramVO.searchCupnpkNm }" />">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사용여부</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-25" name="searchUseAt" value="" <c:if test="${ empty resultMap.paramVO.searchUseAt}">checked="checked"</c:if>>
|
||||
<label for="r-25">전체</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-26" name="searchUseAt" value="Y" <c:if test="${fn:contains(resultMap.paramVO.searchUseAt, 'Y')}">checked="checked"</c:if>>
|
||||
<label for="r-26">사용</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-27" name="searchUseAt" value="N" <c:if test="${fn:contains(resultMap.paramVO.searchUseAt, 'N')}">checked="checked"</c:if>>
|
||||
<label for="r-27">미사용</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container">
|
||||
<div class="left"></div>
|
||||
<div class="center">
|
||||
<button class="btn outline" id="resetBtn" type="button" onclick="fn_reset_form('cupnpkSearchForm'); return false;">초기화</button>
|
||||
<button class="btn primary" id="searchBtn" type="button" onkeypress="this.onclick();" onclick="fn_select_cupnpk_list(1); return false;">검색</button>
|
||||
</div>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<%-- 쿠폰팩 검색 영역 END --%>
|
||||
<div id="pageDiv">
|
||||
</div>
|
||||
</form>
|
||||
<%-- 하단 스크롤 완료 시 위로가기 버튼 출력 : 2023-11-30 / 박철민 추가 --%>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,625 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld"%>
|
||||
|
||||
|
||||
<%--
|
||||
Class Name : CupnpkRegistC.jsp
|
||||
Description : 쿠폰팩 등록
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.11.28 추지훈 최초 생성
|
||||
--%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
|
||||
function checkBoxAllUpdate() {
|
||||
$('#couponChoiseTr input[name="choiseCouponCheckbox"]').click(function() {
|
||||
var checkBoxAll = true;
|
||||
|
||||
$('#couponChoiseTr input[name="choiseCouponCheckbox"]').each(function() {
|
||||
if (!$(this).prop('checked')) {
|
||||
checkBoxAll = false;
|
||||
}
|
||||
});
|
||||
|
||||
$('#couponChoiseTr .check-all input[type="checkbox"]').prop('checked', checkBoxAll);
|
||||
});
|
||||
}
|
||||
|
||||
checkBoxAllUpdate();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* 체크박스 리스트 선택 삭제
|
||||
* 파라미터 설명 {
|
||||
* tbodySltr : 선택 삭제 대상 tbody 셀렉터
|
||||
* }
|
||||
******************************************************************/
|
||||
const fn_delete_couponchoise = function (tbodySltr) {
|
||||
var $tbody = $(tbodySltr);
|
||||
|
||||
// 체크된 input 찾기
|
||||
$tbody.find('input[type="checkbox"]:checked').each(function () {
|
||||
$(this).closest('tr').remove(); // 체크된 tr 삭제
|
||||
});
|
||||
|
||||
if ($tbody.children().length === 0) {
|
||||
var noDataMessage = $("<tr>");
|
||||
var cell = $("<td>").attr("colspan", '100%').html('<spring:message code="common.nodata"/>');
|
||||
noDataMessage.append(cell);
|
||||
$tbody.append(noDataMessage);
|
||||
}
|
||||
|
||||
$('.check-all input[type="checkbox"]').prop('checked', false);
|
||||
};
|
||||
|
||||
/**
|
||||
* 쿠폰 선택 모달에서 부모창으로 값을 전달하는 함수
|
||||
*/
|
||||
const fn_send_cupnpkregistpage = function(modalId) {
|
||||
|
||||
|
||||
let childCouponList = [];
|
||||
// 선택된 쿠폰 리스트 반복
|
||||
$('#appendList tr').each(function() {
|
||||
let coupon = {
|
||||
couponInnb: '',
|
||||
sopmalName: '',
|
||||
couponSopmalCd: '',
|
||||
couponName: '',
|
||||
bnefDv: '',
|
||||
goodsDscntDv: '',
|
||||
aditDscntAmt: '',
|
||||
aditDscntRt: '',
|
||||
dscntMxmmAmt: '',
|
||||
dlvyAmtDscntDv: '',
|
||||
dlvyAmtDscntAmt: '',
|
||||
dlvyAmtMxmmDscntAmt: '',
|
||||
couponRegistDe: '',
|
||||
couponValidpdKnd: '',
|
||||
couponValidpdBgnDe: '',
|
||||
couponValidpdEndDe: '',
|
||||
couponValidpdDeCnt: '',
|
||||
couponValidpdCntDe: ''
|
||||
};
|
||||
|
||||
coupon.couponInnb = $(this).find("#couponInnb").val();
|
||||
coupon.sopmalName = $(this).find("#sopmalName").val();
|
||||
coupon.couponSopmalCd = $(this).find("#couponSopmalCd").val();
|
||||
coupon.couponName = $(this).find("#couponName").val();
|
||||
coupon.bnefDv = $(this).find("#bnefDv").val();
|
||||
coupon.goodsDscntDv = $(this).find("#goodsDscntDv").val();
|
||||
coupon.aditDscntAmt = $(this).find("#aditDscntAmt").val();
|
||||
coupon.aditDscntRt = $(this).find("#aditDscntRt").val();
|
||||
coupon.dscntMxmmAmt = $(this).find("#dscntMxmmAmt").val();
|
||||
coupon.dlvyAmtDscntDv = $(this).find("#dlvyAmtDscntDv").val();
|
||||
coupon.dlvyAmtDscntAmt = $(this).find("#dlvyAmtDscntAmt").val();
|
||||
coupon.dlvyAmtMxmmDscntAmt = $(this).find("#dlvyAmtMxmmDscntAmt").val();
|
||||
coupon.couponRegistDe = $(this).find("#couponRegistDe").val();
|
||||
coupon.couponValidpdKnd = $(this).find("#couponValidpdKnd").val();
|
||||
coupon.couponValidpdBgnDe = $(this).find("#couponValidpdBgnDe").val();
|
||||
coupon.couponValidpdEndDe = $(this).find("#couponValidpdEndDe").val();
|
||||
coupon.couponValidpdDeCnt = $(this).find("#couponValidpdDeCnt").val();
|
||||
coupon.couponValidpdCntDe = $(this).find("#couponValidpdCntDe").val();
|
||||
|
||||
childCouponList.push(coupon);
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#"+modalId+" > a").each(function() {
|
||||
if(this.href.indexOf('#close-modal')){
|
||||
$(this).click();
|
||||
}
|
||||
});
|
||||
$('#' + modalId).remove();
|
||||
|
||||
// 선택된 쿠폰 리스트를 CupnpkRegistC.jsp > 쿠폰선택 영역에 그려줄 html
|
||||
let sletdTrHtml = '<tr id="#choiseListId" >';
|
||||
sletdTrHtml = sletdTrHtml+'<td class="center">';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponInnb" name="packedCouponInnbs" value="#couponInnb"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="sopmalName" name="sopmalName" value="#sopmalName"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponSopmalCd" name="couponSopmalCd" value="#couponSopmalCd"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponName" name="couponName" value="#couponName"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="bnefDv" name="bnefDv" value="#bnefDv"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="goodsDscntDv" name="goodsDscntDv" value="#goodsDscntDv"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="aditDscntAmt" name="aditDscntAmt" value="#aditDscntAmt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="aditDscntRt" name="aditDscntRt" value="#aditDscntRt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="dscntMxmmAmt" name="dscntMxmmAmt" value="#dscntMxmmAmt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="dlvyAmtDscntDv" name="dlvyAmtDscntDv" value="#dlvyAmtDscntDv"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="dlvyAmtDscntAmt" name="dlvyAmtDscntAmt" value="#dlvyAmtDscntAmt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="dlvyAmtMxmmDscntAmt" name="dlvyAmtMxmmDscntAmt" value="#dlvyAmtMxmmDscntAmt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponRegistDe" name="couponRegistDe" value="#couponRegistDe"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdKnd" name="couponValidpdKnd" value="#couponValidpdKnd"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdBgnDe" name="couponValidpdBgnDe" value="#couponValidpdBgnDe"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdEndDe" name="couponValidpdEndDe" value="#couponValidpdEndDe"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdDeCnt" name="couponValidpdDeCnt" value="#couponValidpdDeCnt"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="hidden" id="couponValidpdCntDe" name="couponValidpdCntDe" value="#couponValidpdCntDe"/>';
|
||||
sletdTrHtml = sletdTrHtml+'<label class="b-checkbox checkbox is-medium tr-color-check">';
|
||||
sletdTrHtml = sletdTrHtml+'<input type="checkbox" id="checkboxCouponInnb" name="choiseCouponCheckbox" value="#couponInnb">';
|
||||
sletdTrHtml = sletdTrHtml+'<span class="check"></span>';
|
||||
sletdTrHtml = sletdTrHtml+'</label>';
|
||||
sletdTrHtml = sletdTrHtml+'</td>';
|
||||
sletdTrHtml = sletdTrHtml+'<td>';
|
||||
sletdTrHtml = sletdTrHtml+'#sopmalName';
|
||||
sletdTrHtml = sletdTrHtml+'</td>';
|
||||
sletdTrHtml = sletdTrHtml+'<td>';
|
||||
sletdTrHtml = sletdTrHtml+'#couponName';
|
||||
sletdTrHtml = sletdTrHtml+'</td>';
|
||||
|
||||
// 배송비할인 무료 html
|
||||
let dlcyAmtDscntFreeHtml = '<td>';
|
||||
dlcyAmtDscntFreeHtml = dlcyAmtDscntFreeHtml+'<span class="gray-8">';
|
||||
dlcyAmtDscntFreeHtml = dlcyAmtDscntFreeHtml+'기본 배송비 무료,';
|
||||
dlcyAmtDscntFreeHtml = dlcyAmtDscntFreeHtml+'</span><br/>';
|
||||
dlcyAmtDscntFreeHtml = dlcyAmtDscntFreeHtml+'<span>최대 #dlvyAmtMxmmDscntAmt 원 할인</span>';
|
||||
dlcyAmtDscntFreeHtml = dlcyAmtDscntFreeHtml+'</td>';
|
||||
|
||||
// 배송비 금액 할인 html
|
||||
let dlcyAmtDscntWonHtml = '<td>';
|
||||
dlcyAmtDscntWonHtml = dlcyAmtDscntWonHtml+'<span class="gray-8">';
|
||||
dlcyAmtDscntWonHtml = dlcyAmtDscntWonHtml+'배송비 할인,';
|
||||
dlcyAmtDscntWonHtml = dlcyAmtDscntWonHtml+'</span><br/>';
|
||||
dlcyAmtDscntWonHtml = dlcyAmtDscntWonHtml+'<span>#dlvyAmtDscntAmt 원 할인</span>';
|
||||
dlcyAmtDscntWonHtml = dlcyAmtDscntWonHtml+'</td>';
|
||||
|
||||
|
||||
// 비율 할인 html
|
||||
let goodsDscntDvRtHtml = '<td>';
|
||||
goodsDscntDvRtHtml = goodsDscntDvRtHtml+'<span class="gray-8">';
|
||||
goodsDscntDvRtHtml = goodsDscntDvRtHtml+'#aditDscntAmt % 할인';
|
||||
goodsDscntDvRtHtml = goodsDscntDvRtHtml+'</span><br/>';
|
||||
goodsDscntDvRtHtml = goodsDscntDvRtHtml+'<span>최대 #dscntMxmmAmt 원 할인</span>';
|
||||
goodsDscntDvRtHtml = goodsDscntDvRtHtml+'</td>';
|
||||
|
||||
|
||||
// 금액 할인 html
|
||||
let goodsDscntDvAmtHtml = '<td>';
|
||||
goodsDscntDvAmtHtml = goodsDscntDvAmtHtml+'<span class="gray-8">';
|
||||
goodsDscntDvAmtHtml = goodsDscntDvAmtHtml+'#aditDscntAmt 원 할인';
|
||||
goodsDscntDvAmtHtml = goodsDscntDvAmtHtml+'</span>';
|
||||
goodsDscntDvAmtHtml = goodsDscntDvAmtHtml+'</td>';
|
||||
|
||||
|
||||
// 유효기간 기간 제한 (날짜) html
|
||||
let sletdTrTail = '<td>';
|
||||
sletdTrTail = sletdTrTail+'<span>#couponValidpdBgnDe</span>';
|
||||
sletdTrTail = sletdTrTail+'~';
|
||||
sletdTrTail = sletdTrTail+'<span>#couponValidpdEndDe</span>';
|
||||
sletdTrTail = sletdTrTail+'</td>';
|
||||
sletdTrTail = sletdTrTail+'</tr>';
|
||||
|
||||
|
||||
// 유효기간 발급일로부터 일수 html
|
||||
let sletdTrCntDe = '<td>';
|
||||
sletdTrCntDe = sletdTrCntDe+'(발급일로부터) ';
|
||||
sletdTrCntDe = sletdTrCntDe+'<span>#couponValidpdDeCnt 일</span>';
|
||||
sletdTrCntDe = sletdTrCntDe+'</td>';
|
||||
sletdTrCntDe = sletdTrCntDe+'</tr>';
|
||||
|
||||
|
||||
|
||||
// 선택된 쿠폰이 있을 경우
|
||||
if (childCouponList != null && childCouponList.length >= 0) {
|
||||
|
||||
// 기존에 그려진 쿠폰 리스트를 비워줌
|
||||
$('#selectList').empty();
|
||||
// 선택된 쿠폰 리스트를 CupnpkRegistC.jsp > 쿠폰선택 영역에 그려줌.
|
||||
childCouponList.forEach(function(coupon) {
|
||||
|
||||
let trHtml = sletdTrHtml
|
||||
.replaceAll("#choiseListId", 'choiseListId' + coupon.couponInnb)
|
||||
.replaceAll("#couponInnb", coupon.couponInnb)
|
||||
.replaceAll("#sopmalName", coupon.sopmalName)
|
||||
.replaceAll("#couponSopmalCd", coupon.couponSopmalCd)
|
||||
.replaceAll("#couponName", coupon.couponName)
|
||||
.replaceAll("#bnefDv", coupon.bnefDv)
|
||||
.replaceAll("#goodsDscntDv", coupon.goodsDscntDv)
|
||||
.replaceAll("#aditDscntAmt", coupon.aditDscntAmt)
|
||||
.replaceAll("#aditDscntRt", coupon.aditDscntRt)
|
||||
.replaceAll("#dscntMxmmAmt", coupon.dscntMxmmAmt)
|
||||
.replaceAll("#dlvyAmtDscntDv", coupon.dlvyAmtDscntDv)
|
||||
.replaceAll("#dlvyAmtDscntAmt", coupon.dlvyAmtDscntAmt)
|
||||
.replaceAll("#dlvyAmtMxmmDscntAmt", coupon.dlvyAmtMxmmDscntAmt)
|
||||
.replaceAll("#couponRegistDe", coupon.couponRegistDe)
|
||||
.replaceAll("#couponValidpdKnd", coupon.couponValidpdKnd)
|
||||
.replaceAll("#couponValidpdBgnDe", coupon.couponValidpdBgnDe)
|
||||
.replaceAll("#couponValidpdEndDe", coupon.couponValidpdEndDe)
|
||||
.replaceAll("#couponValidpdDeCnt", coupon.couponValidpdDeCnt)
|
||||
.replaceAll("#couponValidpdCntDe", coupon.couponValidpdCntDe);
|
||||
|
||||
|
||||
|
||||
// 배송비할인인 경우
|
||||
if (coupon.bnefDv.trim() === '02') {
|
||||
|
||||
// 무료 배송비의 경우
|
||||
if (coupon.dlvyAmtDscntDv.trim() === '01') {
|
||||
trHtml = trHtml + dlcyAmtDscntFreeHtml
|
||||
.replaceAll("#dlvyAmtMxmmDscntAmt", coupon.dlvyAmtMxmmDscntAmt);
|
||||
|
||||
// 금액할인 배송비의 경우
|
||||
} else if (coupon.dlvyAmtDscntDv.trim() === '02') {
|
||||
trHtml = trHtml + dlcyAmtDscntWonHtml
|
||||
.replaceAll("#dlvyAmtDscntAmt", coupon.dlvyAmtDscntAmt);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
// 혜택 구분값이 percent 인 경우 비율 html 을 append
|
||||
if (coupon.goodsDscntDv.trim() === '01') {
|
||||
|
||||
trHtml = trHtml + goodsDscntDvRtHtml
|
||||
.replaceAll("#aditDscntAmt", coupon.aditDscntAmt)
|
||||
.replaceAll("#dscntMxmmAmt", coupon.dscntMxmmAmt);
|
||||
// 혜택 구분값이 won 인 경우 금액 html 을 append
|
||||
} else if (coupon.goodsDscntDv.trim() === '02') {
|
||||
trHtml = trHtml + goodsDscntDvAmtHtml
|
||||
.replaceAll("#aditDscntAmt", coupon.aditDscntAmt);
|
||||
}
|
||||
}
|
||||
|
||||
// 기간설정 날짜
|
||||
if (coupon.couponValidpdKnd.trim() === '01') {
|
||||
trHtml = trHtml + sletdTrTail
|
||||
.replaceAll("#couponValidpdBgnDe", coupon.couponValidpdBgnDe)
|
||||
.replaceAll("#couponValidpdEndDe", coupon.couponValidpdEndDe);
|
||||
|
||||
// 기간설정 일수
|
||||
} else if (coupon.couponValidpdKnd.trim() === '02') {
|
||||
trHtml = trHtml + sletdTrCntDe
|
||||
.replaceAll("#couponValidpdDeCnt", coupon.couponValidpdDeCnt);
|
||||
}
|
||||
|
||||
|
||||
function checkBoxAllUpdate() {
|
||||
$('#couponChoiseTr input[name="choiseCouponCheckbox"]').click(function() {
|
||||
var checkBoxAll = true;
|
||||
|
||||
$('#couponChoiseTr input[name="choiseCouponCheckbox"]').each(function() {
|
||||
if (!$(this).prop('checked')) {
|
||||
checkBoxAll = false;
|
||||
}
|
||||
});
|
||||
|
||||
$('#couponChoiseTr .check-all input[type="checkbox"]').prop('checked', checkBoxAll);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('#selectList').append(trHtml);
|
||||
|
||||
checkBoxAllUpdate();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰팩 등록 화면에서 선택된 쿠폰을 반환하는 함수
|
||||
*/
|
||||
const getAllCouponList = function() {
|
||||
let couponList = [];
|
||||
// CupnpkRegistC.jsp 에서 선택된 쿠폰을 모달 창으로 퍼올리는 작업
|
||||
$("#selectList tr").each(function() {
|
||||
let coupon = {
|
||||
couponInnb: '',
|
||||
sopmalName: '',
|
||||
couponSopmalCd: '',
|
||||
couponName: '',
|
||||
bnefDv: '',
|
||||
goodsDscntDv: '',
|
||||
aditDscntAmt: '',
|
||||
aditDscntRt: '',
|
||||
dscntMxmmAmt: '',
|
||||
dlvyAmtDscntDv: '',
|
||||
dlvyAmtDscntAmt: '',
|
||||
dlvyAmtMxmmDscntAmt: '',
|
||||
couponRegistDe: '',
|
||||
couponValidpdKnd: '',
|
||||
couponValidpdBgnDe: '',
|
||||
couponValidpdEndDe: '',
|
||||
couponValidpdDeCnt: '',
|
||||
couponValidpdCntDe: ''
|
||||
};
|
||||
|
||||
coupon.couponInnb = $(this).find("#couponInnb").val();
|
||||
coupon.sopmalName = $(this).find("#sopmalName").val();
|
||||
coupon.couponSopmalCd = $(this).find("#couponSopmalCd").val();
|
||||
coupon.couponName = $(this).find("#couponName").val();
|
||||
coupon.bnefDv = $(this).find("#bnefDv").val();
|
||||
coupon.goodsDscntDv = $(this).find("#goodsDscntDv").val();
|
||||
coupon.aditDscntAmt = $(this).find("#aditDscntAmt").val();
|
||||
coupon.aditDscntRt = $(this).find("#aditDscntRt").val();
|
||||
coupon.dscntMxmmAmt = $(this).find("#dscntMxmmAmt").val();
|
||||
coupon.dlvyAmtDscntDv = $(this).find("#dlvyAmtDscntDv").val();
|
||||
coupon.dlvyAmtDscntAmt = $(this).find("#dlvyAmtDscntAmt").val();
|
||||
coupon.dlvyAmtMxmmDscntAmt = $(this).find("#dlvyAmtMxmmDscntAmt").val();
|
||||
coupon.couponRegistDe = $(this).find("#couponRegistDe").val();
|
||||
coupon.couponValidpdKnd = $(this).find("#couponValidpdKnd").val();
|
||||
coupon.couponValidpdBgnDe = $(this).find("#couponValidpdBgnDe").val();
|
||||
coupon.couponValidpdEndDe = $(this).find("#couponValidpdEndDe").val();
|
||||
coupon.couponValidpdDeCnt = $(this).find("#couponValidpdDeCnt").val();
|
||||
coupon.couponValidpdCntDe = $(this).find("#couponValidpdCntDe").val();
|
||||
|
||||
if (!coupon.couponInnb.fn_is_empty()) {
|
||||
|
||||
couponList.push(coupon);
|
||||
}
|
||||
});
|
||||
|
||||
// 선택된 쿠폰 리스트 반환
|
||||
return couponList;
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 쿠폰 선택 팝업 이동
|
||||
******************************************************** */
|
||||
const fn_move_coupon_choisepage_pop = function () {
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<c:url value="/mngr/promtn/coupon/selectCouponChoisePopupForm"/>',
|
||||
success: function (data) {
|
||||
$('#couponChoisePopup').remove();
|
||||
$('#modalDiv').html(data);
|
||||
$('#couponChoisePopup').modal();
|
||||
fn_search_coupon_choisepage_pop();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰 선택 모달 : 쿠폰 검색 ajax
|
||||
*/
|
||||
const fn_search_coupon_choisepage_pop = function (pageIndex) {
|
||||
|
||||
// 페이지정보가 넘어오지 않았을 경우 기본값 초기화
|
||||
if(!pageIndex) {
|
||||
pageIndex = 1;
|
||||
}
|
||||
// 모달 쿠폰 검색 form 에 페이지 정보를 넣어줌.
|
||||
$('#popupListForm').find('input[name=pageIndex]').eq(0).val(pageIndex);
|
||||
const popupListForm = $("#popupListForm").serialize();
|
||||
|
||||
|
||||
// 모달 쿠폰 검색
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<c:url value="/mngr/promtn/coupon/selectCouponChoisePopupSearch"/>',
|
||||
data: popupListForm,
|
||||
success: function(data) {
|
||||
$('#couponAjaxList').empty();
|
||||
$('#couponAjaxList').html(data);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰팩 등록
|
||||
*/
|
||||
const fn_regist = function() {
|
||||
// 나눠진 form 데이터 직렬화
|
||||
data = $('.common-form').serialize();
|
||||
if (confirm('쿠폰팩을 <spring:message code="confirm.common.insert"/>')) {
|
||||
// ajax 호출
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url : "/mngr/promtn/coupon/insertCupnpkRegist",
|
||||
data : data,
|
||||
success:function(result) {
|
||||
|
||||
if(result.resBody != null) {
|
||||
|
||||
// 응답객체 선언
|
||||
const resBody = result.resBody;
|
||||
// 객체 -> JSON 파싱
|
||||
const parsedResult = JSON.parse(resBody.result);
|
||||
|
||||
if(parsedResult.cupnpkInnb != null) {
|
||||
|
||||
alert('<spring:message code="success.common.insert"/>');
|
||||
// 상세 수정 호출
|
||||
fn_move_dtlupdt(parsedResult.cupnpkInnb);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰팩 목록 이동
|
||||
*/
|
||||
function fn_select_cupnpk_list() {
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/coupon/selectCupnpkListInqireForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 쿠폰팩 상세 수정 이동
|
||||
*/
|
||||
function fn_move_dtlupdt(cupnpkInnb) {
|
||||
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/coupon/selectCupnpkDtlUpdtForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#cupnpkInnb').val(cupnpkInnb);
|
||||
$('#pageIndex').val(1);
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Header.jsp"%>
|
||||
<main class="main">
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Left.jsp"%>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">쿠폰팩 등록</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<a href="#fn_select_cupnpk_list" onclick="fn_select_cupnpk_list('1'); return false;" class="btn outline"><spring:message code="button.list"/></a>
|
||||
<button class="btn primary" onclick="fn_regist(); return false;" ><spring:message code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">기본 정보</h3>
|
||||
<form id="cupnpkForm" class="common-form" method="post" action="">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>쿠폰팩 명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text md" type="text" id="cupnpkNm" name="cupnpkNm" title="쿠폰팩명" maxlength="40">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>쿠폰팩 설명<span class="red-7">*</span></th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" id="cupnpkDc" name="cupnpkDc" title="쿠폰팩설명" maxlength="100">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사용여부<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-1" name="cupnpkUseAt" value="Y" checked>
|
||||
<label for="r-1">사용</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-2" name="cupnpkUseAt" value="N">
|
||||
<label for="r-2">미사용</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="couponChoiseTr">
|
||||
<th>쿠폰선택<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
</div>
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
<button class="btn xsm primary" id="couponChoiseBtn" onclick="fn_open_modal('#modalDiv', '#couponChoisePopup', '<c:url value="/mngr/promtn/coupon/selectCouponChoisePopupForm"/>', ''); return false;">
|
||||
쿠폰 선택
|
||||
</button>
|
||||
<button class="btn xsm dark" id="couponDeleteBtn" onclick="fn_delete_couponchoise('#selectList'); return false;">쿠폰 삭제</button>
|
||||
</div>
|
||||
<div class="center"></div>
|
||||
</div>
|
||||
 
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical tight">
|
||||
<caption>쿠폰팩에 들어갈 쿠폰 리스트</caption>
|
||||
<colgroup>
|
||||
<col style="width:60px;">
|
||||
<col style="width:150px">
|
||||
<col style="width:250px">
|
||||
<col style="width:250px">
|
||||
<col style="width:250px">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="b-checkbox checkbox is-medium tr-color-check check-all">
|
||||
<input type="checkbox" value="">
|
||||
<span class="check"></span>
|
||||
</label>
|
||||
</th>
|
||||
<th>브랜드 몰 명</th>
|
||||
<th>쿠폰명</th>
|
||||
<th>혜택</th>
|
||||
<th>유효기간</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="selectList" >
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<div id="modalDiv">
|
||||
</div>
|
||||
<form id="listForm" name="listForm" >
|
||||
<input type="hidden" id="cupnpkInnb" name ="cupnpkInnb"/>
|
||||
<input type="hidden" id="searchCupnpkNm" name="searchCupnpkNm" title="검색_쿠폰팩명" value="${ searchForm.searchCupnpkNm }">
|
||||
|
||||
|
||||
<input type="hidden" id="searchUseAt" name="searchUseAt" title="쿠폰팩 사용여부" value="${ searchForm.searchUseAt }">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="${ searchForm.pageIndex }"/>
|
||||
<input type="hidden" id="recordCountPerPage" name="recordCountPerPage" value="${ searchForm.recordCountPerPage }"/>
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="${ searchForm.pageUnit }"/>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
|
||||
|
||||
<%--
|
||||
Class Name : SiteContentManageU.jsp
|
||||
Description : 사이트 메인페이지 관리 jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024-03-19 추지훈 최초 생성
|
||||
--%>
|
||||
<div class="table-wrapper">
|
||||
<p class="gray-7">
|
||||
검색 <c:out value="${ resultMap.paginationInfo.totalRecordCount }"/>/총 <c:out value="${ resultMap.paginationInfo.totalRecordCount }"/>개 (현재 <c:out value="${ resultMap.paginationInfo.currentPageNo }"/>/ 총 <c:out value="${ resultMap.paginationInfo.totalPageCount }"/>페이지)
|
||||
</p>
|
||||
<table class="table vertical">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 20%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>
|
||||
인증번호(<span class="red-4">사용</span>)
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultList && fn:length(resultMap.resultList) > 0 }">
|
||||
<c:forEach var="offlineList" items="${ resultMap.resultList }">
|
||||
<tr>
|
||||
<td>
|
||||
<c:out value="${ resultMap.paginationInfo.totalRecordCount - offlineList.rnum + 1 }" />
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${ offlineList.oflneCouponCrtnb }"/>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="100%" ><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_offline_coupon_list" />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
|
||||
|
||||
<%--
|
||||
Class Name : SiteContentManageU.jsp
|
||||
Description : 사이트 메인페이지 관리 jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024-03-19 추지훈 최초 생성
|
||||
--%>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
let pageIndex = '<c:out value="${ resultMap.paramVO.pageIndex }"/>';
|
||||
let pageUnit = '<c:out value="${ resultMap.paramVO.pageUnit }"/>';
|
||||
|
||||
|
||||
fn_select_offline_coupon_list(pageIndex, pageUnit);
|
||||
|
||||
|
||||
$('#offlineCouponListForm').on('keydown', function(e) {
|
||||
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
$('#crtnbSrchBtn').trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<!-- 상품 - 그룹별 타입 설정 팝업 -->
|
||||
<div id="offlie-coupon_pop" class="modal" style="max-width: 520px; max-height: 1500px;">
|
||||
<div class="modal-header">
|
||||
<h4>쿠폰 인증번호</h4>
|
||||
</div>
|
||||
<div class="modal-content" style="height: 1500px;">
|
||||
<form id="offlineCouponListForm">
|
||||
<input type="hidden" id="couponInnbOff" name="couponInnb" value="<c:out value="${ resultMap.paramVO.couponInnb }"/>"/>
|
||||
<input type="hidden" id="oflneCouponInnb" name="oflneCouponInnb"/>
|
||||
<input type="hidden" id="pageIndexOff" name="pageIndex" value="<c:out value="${ resultMap.paramVO.pageIndex }"/>"/>
|
||||
<input type="hidden" id="recordCountPerPageOff" name="recordCountPerPage" value="<c:out value="${ resultMap.paramVO.recordCountPerPage }"/>"/>
|
||||
<input type="hidden" id="pageUnitOff" name="pageUnit" value="<c:out value="${ resultMap.paramVO.pageUnit }"/>"/>
|
||||
<input type="hidden" id="sopmalCdOff" name="sopmalCd"/>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 90%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text full" type="text" title="서브타이틀" placeholder="인증번호" name="srchCrtnb" value="<c:out value="${ paramVO.srchCrtnb }"/>">
|
||||
</div>
|
||||
</td>
|
||||
<th>
|
||||
<button class="btn primary" id="crtnbSrchBtn" type="button" onclick="fn_select_offline_coupon_list(1);">검색</button>
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="pageDiv">
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">닫기</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,232 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
|
||||
<%--
|
||||
Class Name : OrderCouponUseDtlsPopupR.jsp
|
||||
Description : 쿠폰 사용 내역 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024-01-24 추지훈 최초 생성
|
||||
--%>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('select').niceSelect();
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
<div class="search-number">
|
||||
<span class="search-number__text">총 <strong><c:out value="${ resultMap.paginationInfo.totalRecordCount }"/></strong>건</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="select-box">
|
||||
<select id="pageUnit" name="pageUnit" title="페이지당 출력될 목록건수" onchange="fn_search_ordr_coupon_use_history_pop(1, this.value);">
|
||||
<c:forEach items="${ resultMap.paginationInfo.pageUnitArr }" var="pageUnit" varStatus="pageUnitStatus">
|
||||
<option value="<c:out value="${ pageUnit }"/>" <c:if test="${ resultMap.paginationInfo.recordCountPerPage eq pageUnit}">selected="selected"</c:if>><c:out value="${ pageUnit }"/>개씩</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="spacing">
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical tight" style="min-width: 1200px;">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 3%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 6%;">
|
||||
<col style="width: 6%;">
|
||||
<col style="width: 6%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 8%;">
|
||||
<col style="width: 6%;">
|
||||
<col style="width: 5%;">
|
||||
<col style="width: 3%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 7%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>쿠폰명</th>
|
||||
<th>아이디</th>
|
||||
<th>이름</th>
|
||||
<th>발급일</th>
|
||||
<th>인증번호</th>
|
||||
<th>사용제한<br>단독/금액/상품/중복/다운로드</th>
|
||||
<th>유효기간</th>
|
||||
<th>혜택</th>
|
||||
<th>할인금액</th>
|
||||
<th>조회</th>
|
||||
<th>사용여부</th>
|
||||
<th>구매상품</th>
|
||||
<th>사용일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.result && fn:length(resultMap.result) > 0 }">
|
||||
|
||||
<c:forEach items="${ resultMap.result }" var="couponUseDtls" varStatus="status">
|
||||
<tr>
|
||||
<%-- 번호 --%>
|
||||
<td>
|
||||
<c:out value="${ resultMap.paginationInfo.totalRecordCount - couponUseDtls.rnum + 1 }" />
|
||||
</td>
|
||||
<%-- 쿠폰명 --%>
|
||||
<td><c:out value="${ couponUseDtls.coupNm }"/></td>
|
||||
<%-- 회원아이디 --%>
|
||||
<td><c:out value="${ couponUseDtls.mbrid }"/></td>
|
||||
<%-- 회원명 --%>
|
||||
<td><c:out value="${ couponUseDtls.mbrNm }"/></td>
|
||||
<%-- 발급일 --%>
|
||||
<td><c:out value="${ couponUseDtls.registDe }"/></td>
|
||||
<%-- 인증일/인증번호 --%>
|
||||
<td><c:out value="${ couponUseDtls.oflneCouponCrtnb }"/></td>
|
||||
<%-- 사용제한 --%>
|
||||
<td>
|
||||
<%-- <c:choose>
|
||||
<c:when test="${ couponUseDtls.}">
|
||||
|
||||
</c:when>
|
||||
</c:choose> --%>
|
||||
공동
|
||||
/
|
||||
<c:out value="${ couponUseDtls.usePosblAmt }"/>원
|
||||
/
|
||||
<c:choose>
|
||||
<c:when test="${ couponUseDtls.goodsCtgryLmttDv eq '01' }">
|
||||
전체
|
||||
</c:when>
|
||||
<c:when test="${ couponUseDtls.goodsCtgryLmttDv eq '02' }">
|
||||
상품
|
||||
</c:when>
|
||||
</c:choose>
|
||||
/
|
||||
<c:choose>
|
||||
<c:when test="${ couponUseDtls.dplctDscntAt eq 'Y' }">
|
||||
가능
|
||||
</c:when>
|
||||
<c:when test="${ couponUseDtls.dplctDscntAt eq 'N' }">
|
||||
불가능
|
||||
</c:when>
|
||||
</c:choose>
|
||||
/
|
||||
<c:choose>
|
||||
<c:when test="${ couponUseDtls.dplctDwldAt eq 'Y' }">
|
||||
가능
|
||||
</c:when>
|
||||
<c:when test="${ couponUseDtls.dplctDwldAt eq 'N' }">
|
||||
불가능
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<%-- 유효기간 --%>
|
||||
<td><c:out value="${ couponUseDtls.validpdBgnDt }"/><br><c:out value="${ couponUseDtls.validpdEndDt }"/></td>
|
||||
<%-- 혜택 --%>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${ couponUseDtls.bnefDv eq '01' || couponUseDtls.bnefDv eq '03' }">
|
||||
<span class="fw-500">
|
||||
<c:if test="${ '01' eq couponUseDtls.goodsDscntDv }"><fmt:formatNumber value="${ couponUseDtls.aditDscntRt }" pattern="##" />% 할인</c:if>
|
||||
<c:if test="${ '02' eq couponUseDtls.goodsDscntDv }"><fmt:formatNumber value="${ couponUseDtls.aditDscntAmt }" pattern="#,###" />원 할인</c:if>
|
||||
</span><br/>
|
||||
<c:if test="${ '01' eq couponUseDtls.goodsDscntDv }">
|
||||
<span class="gray-8">최대 <fmt:formatNumber value="${ couponUseDtls.dscntMxmmAmt }" pattern="#,###" />원 할인</span>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:when test="${ couponUseDtls.bnefDv eq '02' }">
|
||||
<span class="fw-500">
|
||||
<c:if test="${ '01' eq couponUseDtls.dlvyAmtDscntDv }">기본배송비 무료,
|
||||
</span>
|
||||
<br>
|
||||
<span class="gray-8">
|
||||
최대 <fmt:formatNumber value="${ couponUseDtls.dlvyAmtMxmmDscntAmt }" pattern="#,###" />원 할인</c:if>
|
||||
</span>
|
||||
<span class="fw-500">
|
||||
<c:if test="${ '02' eq couponUseDtls.dlvyAmtDscntDv }">배송비 <fmt:formatNumber value="${ couponUseDtls.dlvyAmtDscntAmt }" pattern="#,###" />원 할인</c:if>
|
||||
</span>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<%-- 할인금액 --%>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${ couponUseDtls.couponUseAt eq 'Y' }">
|
||||
<c:out value="${ couponUseDtls.snggdsApplcAmt }"/>원
|
||||
</c:when>
|
||||
<c:when test="${ couponUseDtls.couponUseAt eq 'N' }">
|
||||
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<%-- 조회버튼 --%>
|
||||
<td><button id="coupon-info-pop-trigger" type="button" class="btn xsm outline" onclick="fn_open_modal_coupon_dtl('#modalDiv', '#couponInfoPopup', '<c:out value="/mngr/promtn/coupon/selectCouponInfoInqirePopup"/>', '<c:out value="${ couponUseDtls.dwldCouponInnb }"/>'); return false;">조회</button></td>
|
||||
<%-- 사용여부 --%>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${ couponUseDtls.couponUseAt eq 'Y' }">
|
||||
<span class="blue-7 fw-500">사용함</span>
|
||||
</c:when>
|
||||
<c:when test="${ couponUseDtls.couponUseAt eq 'N' }">
|
||||
<span class="red-7 fw-500">미사용</span>
|
||||
</c:when>
|
||||
<%-- <c:when test="${ couponUseDtls.validpdEndDt lt now() }">
|
||||
소멸함
|
||||
</c:when> --%>
|
||||
</c:choose>
|
||||
</td>
|
||||
<%-- 구매상품 --%>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${ couponUseDtls.couponUseAt eq 'Y' }">
|
||||
<c:out value="${ couponUseDtls.img }"/><c:out value="${ couponUseDtls.optnNm1 }"/>
|
||||
<br>
|
||||
<c:out value="${ couponUseDtls.ordrInnb }"/>
|
||||
</c:when>
|
||||
<c:when test="${ couponUseDtls.couponUseAt eq 'N' }">
|
||||
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<%-- 사용일 --%>
|
||||
<td><c:out value="${ couponUseDtls.dtlsRegistDt }"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="100%" ><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_search_coupon_use_history_pop" />
|
||||
</div>
|
||||
<div id="modalDiv">
|
||||
</div>
|
||||
@@ -0,0 +1,63 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui" %>
|
||||
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld"%>
|
||||
|
||||
|
||||
<%--
|
||||
Class Name : OrderCouponUseDtlsPopupRForm.jsp
|
||||
Description : 쿠폰 사용 내역 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024-01-24 추지훈 최초 생성
|
||||
--%>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
let pageIndex = '<c:out value="${ resultMap.paramVO.pageIndex }"/>';
|
||||
let pageUnit = '<c:out value="${ resultMap.paramVO.pageUnit }"/>';
|
||||
|
||||
|
||||
|
||||
fn_search_ordr_coupon_use_history_pop(pageIndex, pageUnit);
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<!-- 쿠폰 사용내역 모달 -->
|
||||
<div id="couponUseHistory" class="modal" style="max-width: none;">
|
||||
<div class="modal-header">
|
||||
<h4>쿠폰 사용내역</h4>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<form id="ordrUseCouponDtlsForm" name="ordrUseCouponDtlsForm" method="post" >
|
||||
<div class="modal-searchBar">
|
||||
<input type="hidden" id="couponInnb" name="couponInnb" />
|
||||
<input type="hidden" id="ordrInnb" name="ordrInnb" value="<c:out value="${ resultMap.paramVO.ordrInnb }"/>"/>
|
||||
<input type="hidden" id="pageIndexOrdrDtls" name="pageIndex" value="1"/>
|
||||
<input type="hidden" id="pageUnitOrdrDtls" name="pageUnit" value="10"/>
|
||||
<input type="hidden" id="sopmalCd" name="sopmalCd"/>
|
||||
</div>
|
||||
<div id="couponAjaxList">
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">닫기</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,823 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Include.jsp" %>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
fn_start_display();
|
||||
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 시작 화면 제어 함수
|
||||
******************************************************** */
|
||||
const fn_start_display = function() {
|
||||
// 조건
|
||||
fn_ctrl_disable(['.bnefcondition', '.bnefcondition2']);
|
||||
// 혜택 종류 마일리지
|
||||
fn_ctrl_disable_checkbox_at_mlg('#mlgBnefCheckBox', '#mlgBnefDiv');
|
||||
// 혜택 종류 쿠폰
|
||||
fn_ctrl_disable_checkbox_at('#couponBnefCheckBox', '#couponBnefDiv');
|
||||
|
||||
// 시작, 종료 날짜 제어
|
||||
fn_set_date('evtBgnDt','evtEndDt','evtEndDt');
|
||||
|
||||
fn_create_ckeditor('#evtCn');
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 체크박스 여부에 따른 disable 제어 : 체크시 disabled, 체크해제시 enabled
|
||||
* 파라미터 설명 {
|
||||
* checkboxSeletor : 체크박스 seletor -> this 작성
|
||||
* ctrlArea : disable 제어할 영역
|
||||
* }
|
||||
}
|
||||
******************************************************** */
|
||||
const fn_ctrl_disable_checkbox_at_mlg = function(checkboxSelector, ctrlArea) {
|
||||
var isChecked = $(checkboxSelector).is(':checked');
|
||||
|
||||
if (isChecked == true) {
|
||||
fn_ctrl_disable([], [ctrlArea]);
|
||||
var radioValue = $('input[name="mlgPymntBnef"]:checked').val();
|
||||
if (radioValue === 'immePymnt') {
|
||||
fn_ctrl_disable(['#mlgRandom'], ['#mlgAmt']);
|
||||
} else if (radioValue === 'randomPymnt') {
|
||||
fn_ctrl_disable(['#mlgAmt'], ['#mlgRandom']);
|
||||
}
|
||||
} else if (isChecked == false) {
|
||||
fn_ctrl_disable([ctrlArea]);
|
||||
}
|
||||
}
|
||||
|
||||
const fn_ctrl_disable_checkbox_at = function(checkboxSelector, ctrlArea) {
|
||||
var isChecked = $(checkboxSelector).is(':checked');
|
||||
|
||||
if (isChecked == true) {
|
||||
fn_ctrl_disable([], [ctrlArea]);
|
||||
} else if (isChecked == false) {
|
||||
fn_ctrl_disable([ctrlArea]);
|
||||
}
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 질문 유형 선택값 반환 함수
|
||||
******************************************************** */
|
||||
const fn_qestnr_selected = function() {
|
||||
var seletedValue = $('#event-type-select').val();
|
||||
console.log("seletedValue : ", seletedValue);
|
||||
|
||||
return seletedValue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ********************************************************
|
||||
* 질문 추가
|
||||
******************************************************** */
|
||||
const fn_add_qestnr = function(tableId, seletedValue, thisValue, propCtrl, propBol){
|
||||
console.log("질문 추가", tableId);
|
||||
console.log("질문 추가", seletedValue);
|
||||
|
||||
if (seletedValue === 'checkbox') {
|
||||
$('#' + tableId + ' > tbody').append('<br>');
|
||||
$('#' + tableId + ' > tbody').append('<tr>'+$('#'+tableId+' > tbody').find('tr[data-eventtype="' + seletedValue + '"]').eq(0).html()+'</tr>');
|
||||
$('#' + tableId + ' > tbody').append('<tr>'+$('#'+tableId+' > tbody').find('tr[data-eventtype="' + seletedValue + '"]').eq(1).html()+'</tr>');
|
||||
$('#' + tableId + ' > tbody').append('<tr>'+$('#'+tableId+' > tbody').find('tr[data-eventtype="' + seletedValue + '"]').eq(2).html()+'</tr>');
|
||||
} else {
|
||||
$('#' + tableId + ' > tbody').append('<br>');
|
||||
$('#' + tableId + ' > tbody').append('<tr>'+$('#'+tableId+' > tbody').find('tr[data-eventtype="' + seletedValue + '"]').eq(0).html()+'</tr>');
|
||||
$('#' + tableId + ' > tbody').append('<tr>'+$('#'+tableId+' > tbody').find('tr[data-eventtype="' + seletedValue + '"]').eq(1).html()+'</tr>');
|
||||
}
|
||||
|
||||
//요소 값 초기화
|
||||
$('#' + tableId + ' > tbody > tr:last').find('input').each(function(){
|
||||
$(this).val(thisValue);
|
||||
if (propCtrl) {
|
||||
$(this).prop(propCtrl, propBol);
|
||||
}
|
||||
});
|
||||
|
||||
$('.delete').each(function(){
|
||||
this.disabled = false;
|
||||
});
|
||||
|
||||
$('#' + tableId).tableDnDUpdate();
|
||||
}
|
||||
|
||||
|
||||
/* ********************************************************
|
||||
* 질문 추가
|
||||
******************************************************** */
|
||||
const fn_delete_qestnr = function(tableId) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
<%-- /* ********************************************************
|
||||
* 구간 추가
|
||||
******************************************************** */
|
||||
const fn_add_tr = function(tableId, trIndex, thisValue, propCtrl, propBol){
|
||||
$('#' + tableId + ' > tbody').append('<tr>'+$('#'+tableId+' > tbody').find('tr').eq(trIndex).html()+'</tr>');
|
||||
//요소 값 초기화
|
||||
$('#' + tableId + ' > tbody > tr:last').find('input').each(function(){
|
||||
$(this).val(thisValue);
|
||||
if (propCtrl) {
|
||||
if (propBol == 'true'){
|
||||
$(this).prop(propCtrl, true);
|
||||
} else if (propBol == 'false') {
|
||||
$(this).prop(propCtrl, false);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$('.delete').each(function(){
|
||||
this.disabled = false;
|
||||
});
|
||||
|
||||
$('#' + tableId).tableDnDUpdate();
|
||||
} --%>
|
||||
|
||||
|
||||
<%-- /* ********************************************************
|
||||
* 구간 삭제
|
||||
******************************************************** */
|
||||
const fn_delete_tr = function(tableId, delLimit) {
|
||||
let target = event.target;
|
||||
|
||||
let trCnt = $('#' + tableId + ' > tbody tr').length
|
||||
|
||||
if (delLimit) {
|
||||
if(trCnt == delLimit){
|
||||
target.disabled = true;
|
||||
}
|
||||
}
|
||||
} --%>
|
||||
|
||||
|
||||
/* ********************************************************
|
||||
* 구간 추가 사용자 입력 옵션 ( readonly ) : 관리자가 항목을 작성할 수 없음
|
||||
******************************************************** */
|
||||
const fn_add_tr_text = function(standardTb){
|
||||
$('#'+standardTb+' > tbody').append('<tr>'+$('#'+standardTb+' > tbody').find('tr').eq(0).html()+'</tr>');
|
||||
//요소 값 초기화
|
||||
$('#'+standardTb+' > tbody > tr:last').find('input').each(function(){
|
||||
$(this).val('');
|
||||
$(this).prop('readonly', true);
|
||||
});
|
||||
|
||||
$('.delete').each(function(){
|
||||
this.disabled = false;
|
||||
});
|
||||
|
||||
$('#'+standardTb).tableDnDUpdate();
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************************
|
||||
* input
|
||||
* 조건에 따른 대상input 활성화/비활성화
|
||||
* 파라미터 설명{
|
||||
* disArr : 비활성화 대상 input selector배열
|
||||
* (체크박스의 경우 컨트롤할 영역만 파라미터를 넘겨줘야함 enArr -> [])
|
||||
* enArr : 활성화 대상 input selector배열
|
||||
* element : 셀렉터 작성 -> $(this)
|
||||
* reveresAt : 체크박스일 경우 disable 영역 반전, default -> 체크시 enable
|
||||
* }
|
||||
**********************************************************************************/
|
||||
const fn_ctrl_disable2 = function (disArr, enArr, element, reveresAt) {
|
||||
const thisType = element.attr('type');
|
||||
|
||||
const fn_disable = function(disArr, enArr) {
|
||||
const propUpdate = function (selector, bool) {
|
||||
const boolean = bool;
|
||||
$(selector).find('input, select').each(function () {
|
||||
let type = this.type;
|
||||
let tag = this.tagName.toLowerCase();
|
||||
if (type === 'text' || tag === 'textarea' || type === 'checkbox' || type === 'radio') {
|
||||
this.disabled = boolean;
|
||||
} else if (tag === 'select') {
|
||||
this.disabled = boolean;
|
||||
$(this).niceSelect('update');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (disArr != null && disArr.length > 0) {
|
||||
const isTrue = true;
|
||||
for (let idx = 0; idx < disArr.length; idx++) {
|
||||
propUpdate(disArr[idx], isTrue);
|
||||
}
|
||||
}
|
||||
|
||||
if (enArr != null && enArr.length > 0) {
|
||||
const isFalse = false;
|
||||
for (let idx = 0; idx < enArr.length; idx++) {
|
||||
propUpdate(enArr[idx], isFalse);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (thisType === 'checkbox') {
|
||||
var isChecked = element.is(':checked');
|
||||
if (reveresAt === 'Y') {
|
||||
if (isChecked == true) {
|
||||
fn_disable(disArr);
|
||||
} else if (isChecked == false) {
|
||||
fn_disable([], disArr);
|
||||
}
|
||||
} else {
|
||||
if (isChecked == true) {
|
||||
fn_disable([], disArr);
|
||||
} else if (isChecked == false) {
|
||||
fn_disable(disArr);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
fn_disable(disArr, enArr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%-- 상단메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Left.jsp" %>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">참여 이벤트 등록</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<button class="btn primary">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">이벤트 정보</h3>
|
||||
<form>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>이벤트 종류</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container radio-tab-trigger" data-radiotab="radio-tab-01">
|
||||
<c:forEach var="codeList" items="${ resultMap.partcptnEvtDvList }" varStatus="">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="<c:out value="${ codeList.cdNm }"/><c:out value="${ codeList.cd }"/>" name="evtDv" <c:if test="${ codeList.cd eq '01' }">checked="checked"</c:if>>
|
||||
<label for="<c:out value="${ codeList.cdNm }"/><c:out value="${ codeList.cd }"/>"><c:out value="${ codeList.cdNm }"/></label>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이벤트 명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" id="evtnm" name="evtnm" type="text" title="해당 인풋에 대한 설명" maxlength="79">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이벤트 기간<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="input-container">
|
||||
<div class="td-inner">
|
||||
<input type="text" id="evtBgnDt" name="evtBgnDt" class="datepicker" title="시작 날짜 선택" autocomplete="off">
|
||||
<div class="timepicker-container">
|
||||
<input type="text" class="bs-timepicker" id="evtBgnDtTime" name="evtBgnDtTime" title="시간 설정" value="00:00">
|
||||
</div>
|
||||
</div>
|
||||
<span class="tilde">~</span>
|
||||
<div class="td-inner">
|
||||
<input type="text" id="evtEndDt" name="evtEndDt" class="datepicker" title="종료 날짜 선택" autocomplete="off">
|
||||
<div class="timepicker-container">
|
||||
<input type="text" class="bs-timepicker" id="evtEndDtTime" name="evtEndDtTime" title="시간 설정" value="00:00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이벤트 대상 제한<span class="red-7">*</span></th>
|
||||
<td colspan="2">
|
||||
<div class="td-inner">
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" id="mbrTrgetAt" name="mbrTrgetAt" value="Y">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">
|
||||
회원
|
||||
</span>
|
||||
</label>
|
||||
<span class="parentheses">(</span>
|
||||
<div class="b-checkbox-container inner" id="mbrTrgetDiv">
|
||||
<c:forEach var="codeList" items="${ resultMap.result.gradList }" varStatus="">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" name="mbrTrgetArray" value="<c:out value="${ codeList.mbrGradInnb }"/>">
|
||||
<span class="check"></span>
|
||||
<span class="control-label"><c:out value="${ codeList.gradNm }"/></span>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<span class="parentheses">)</span>
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" id="nmbrTrgetAt" name="nmbrTrgetAt" value="Y">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">
|
||||
비회원
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">혜택 설정</h3>
|
||||
<form>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>즉시지급 혜택</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-8" name="r-group04" checked>
|
||||
<label for="r-8">사용함</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-9" name="r-group04">
|
||||
<label for="r-9">사용안함</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>조건</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio inner-input">
|
||||
<input type="radio" id="r-10" name="r-group05" checked="checked" onchange="fn_ctrl_disable(['.bnefcondition', '.bnefcondition2'])" >
|
||||
<label for="r-10">제한없음</label>
|
||||
</div>
|
||||
<div class="custom-radio inner-input">
|
||||
<input type="radio" id="r-11" name="r-group05" onchange="fn_ctrl_disable(['.bnefcondition2'], ['.bnefcondition'])">
|
||||
<label for="r-11">
|
||||
</label>
|
||||
<div class="bnefcondition">
|
||||
선착순
|
||||
<input class="input-text xsm ml-5 number right" value="0"
|
||||
type="text" title="해당 인풋에 대한 설명">
|
||||
명까지 지급
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-radio inner-input">
|
||||
<input type="radio" id="r-12" name="r-group05" onchange="fn_ctrl_disable(['.bnefcondition'], ['.bnefcondition2'])">
|
||||
<label for="r-12">
|
||||
</label>
|
||||
<div class="bnefcondition2">
|
||||
<input class="input-text xsm ml-5 number right" value="0"
|
||||
type="text" title="해당 인풋에 대한 설명">
|
||||
마일리지 소진 시 종료
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>혜택 종류<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" value="" id="mlgBnefCheckBox" onchange="fn_ctrl_disable_checkbox_at_mlg(this, '#mlgBnefDiv'); return false;">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">
|
||||
마일리지
|
||||
</span>
|
||||
</label>
|
||||
<span class="parentheses">(</span>
|
||||
<div class="custom-radio-container" id="mlgBnefDiv">
|
||||
<div class="custom-radio inner-input">
|
||||
<input type="radio" id="r-13" name="mlgPymntBnef" value="immePymnt" checked="" onchange="fn_ctrl_disable2(['#mlgRandom'], ['#mlgAmt'], $(this)); return false;">
|
||||
<label for="r-13">
|
||||
</label>
|
||||
<div id="mlgAmt">
|
||||
<input class="input-text xsm ml-5 number right"
|
||||
value="0" type="text" title="해당 인풋에 대한 설명">
|
||||
마일리지 즉시지급
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-radio inner-input">
|
||||
<input type="radio" id="r-14" name="mlgPymntBnef" value="randomPymnt" onchange="fn_ctrl_disable2(['#mlgAmt'], ['#mlgRandom'], $(this)); return false;">
|
||||
<label for="r-14">
|
||||
</label>
|
||||
<div id="mlgRandom">
|
||||
<input class="input-text xsm ml-5 number right"
|
||||
value="0" type="text" title="해당 인풋에 대한 설명">
|
||||
~
|
||||
<input class="input-text xsm ml-5 number right"
|
||||
value="0" type="text" title="해당 인풋에 대한 설명">
|
||||
마일리지의 랜덤지급
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="parentheses">)</span>
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" value="" id="couponBnefCheckBox" onchange="fn_ctrl_disable2(['#couponBnefDiv'], [], $(this)); return false;">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">
|
||||
쿠폰
|
||||
</span>
|
||||
</label>
|
||||
<span class="parentheses">(</span>
|
||||
<div class="select-box" id="couponBnefDiv">
|
||||
<select title="해당 셀렉트에 대한 설명">
|
||||
<option>지급할 쿠폰 선택</option>
|
||||
</select>
|
||||
</div>
|
||||
<span class="parentheses">)</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
<section class="content-section" id="qestnrSecrion">
|
||||
<h3 class="content-section__title">이벤트 내용</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>내용<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<textarea class="textarea" id="evtCn" name="evtCn" title="에디터 입력" cols="30" rows="10"></textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="radio-tab-content" id="radio-tab-01">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>퀴즈 힌트</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" title="해당 인풋에 대한 설명">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>퀴즈 답<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" title="해당 인풋에 대한 설명">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="table-wrapper" id="qestnrDiv">
|
||||
<table class="table" id="qestnrTable">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody id="qestnrTbody">
|
||||
<tr>
|
||||
<th>질문 유형</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select title="해당 셀렉트에 대한 설명" id="event-type-select">
|
||||
<option value="radio">라디오</option>
|
||||
<option value="checkbox">체크박스</option>
|
||||
<option value="dropdown">드롭다운</option>
|
||||
<option value="short">사용자 입력(단답형)</option>
|
||||
<option value="long">사용자 입력(장문형)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- 라디오 start -->
|
||||
<tr class="event-type-select__content" data-eventtype="radio">
|
||||
<th>질문 (라디오)<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" id="qwerasdf" type="text" title="해당 인풋에 대한 설명">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="event-type-select__content" data-eventtype="radio">
|
||||
<th>보기</th>
|
||||
<td>
|
||||
<div class="td-inner vertical">
|
||||
<div class="table-wrapper" style="width: 800px;">
|
||||
<table class="table vertical tight" id="radioOptionAdd">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col>
|
||||
<col style="width:14%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>옵션명</th>
|
||||
<th>삭제</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="left">
|
||||
<div class="input-container w-full">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio inner-input">
|
||||
<input type="radio" disabled>
|
||||
<label>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<input class="input-text xl ml-5" value=""
|
||||
type="text" title="해당 인풋에 대한 설명">
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<button class="circle-btn delete" onclick="fn_delete_tr('radioOptionAdd', 1 )">
|
||||
<span class="visually-hidden">삭제</span>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="manage-btn-container">
|
||||
<button class="btn xsm outline primary" onclick="fn_add_tr('radioOptionAdd', 0, '', 'readonly', 'false'); return false;">옵션추가</button>
|
||||
<span class="stone-8 fs-13 mx-3">또는</span>
|
||||
<button class="btn xsm outline primary" onclick="fn_add_tr('radioOptionAdd', 0, '', 'readonly', 'true')">사용자 입력 옵션추가</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 라디오 end -->
|
||||
|
||||
<!-- 체크박스 start -->
|
||||
<tr class="event-type-select__content" data-eventtype="checkbox">
|
||||
<th>조건</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
최대
|
||||
<input class="input-text sm number right" type="text"
|
||||
title="해당 인풋에 대한 설명">
|
||||
개까지 선택 가능
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="event-type-select__content" data-eventtype="checkbox">
|
||||
<th>
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" value="Y" name="qestitmCheckBox">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">
|
||||
질문 (체크박스)<span class="red-7">*</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" title="해당 인풋에 대한 설명">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="event-type-select__content" data-eventtype="checkbox">
|
||||
<th>보기</th>
|
||||
<td>
|
||||
<div class="td-inner vertical">
|
||||
<div class="table-wrapper" style="width: 800px;">
|
||||
<table class="table vertical tight" id="checkOptionAdd">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col>
|
||||
<col style="width:14%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>옵션명</th>
|
||||
<th>삭제</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="left">
|
||||
<div class="b-checkbox-container inner">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" value="" disabled>
|
||||
<span class="check"></span>
|
||||
<span class="control-label"></span>
|
||||
</label>
|
||||
<input class="input-text xl" type="text"
|
||||
title="해당 인풋에 대한 설명">
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<button class="circle-btn delete" onclick="fn_delete_tr('checkOptionAdd', 1)"><span
|
||||
class="visually-hidden">삭제</span></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="manage-btn-container">
|
||||
<button class="btn xsm outline primary" onclick="fn_add_tr('checkOptionAdd', 0, '', 'readonly', 'false'); return false;">옵션추가</button>
|
||||
<span class="stone-8 fs-13 mx-3">또는</span>
|
||||
<button class="btn xsm outline primary" onclick="fn_add_tr('checkOptionAdd', 0, '', 'readonly', 'true'); return false;">사용자 입력 옵션추가</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 체크박스 end -->
|
||||
|
||||
<!-- 드롭다운 start -->
|
||||
<tr class="event-type-select__content" data-eventtype="dropdown">
|
||||
<th>질문 (드롭다운)<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" title="해당 인풋에 대한 설명">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="event-type-select__content" data-eventtype="dropdown">
|
||||
<th>보기</th>
|
||||
<td>
|
||||
<div class="td-inner vertical">
|
||||
<div class="table-wrapper" style="width: 800px;">
|
||||
<table class="table vertical tight" id="selectOptionAdd">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col>
|
||||
<col style="width:14%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>옵션명</th>
|
||||
<th>삭제</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="left">
|
||||
<div class="input-container w-full">
|
||||
<span>▶</span>
|
||||
<input class="input-text xl ml-10" value=""
|
||||
type="text" title="해당 인풋에 대한 설명">
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<button class="circle-btn delete" onclick="fn_delete_tr('selectOptionAdd', 1)"><span
|
||||
class="visually-hidden">삭제</span></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="manage-btn-container">
|
||||
<button class="btn xsm outline primary" onclick="fn_add_tr('selectOptionAdd', 0, '', 'readonly', 'false'); return false;">옵션추가</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 드롭다운 end -->
|
||||
|
||||
<!-- 단답형 start -->
|
||||
<tr class="event-type-select__content" data-eventtype="short">
|
||||
<th>질문 (단답형)<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" title="해당 인풋에 대한 설명">
|
||||
<div class="b-checkbox-container ml-5">
|
||||
<label class="b-checkbox checkbox check-all">
|
||||
<input type="checkbox" value="">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">필수여부</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="event-type-select__content" data-eventtype="short">
|
||||
<th>보기</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" value="" type="text" title="해당 인풋에 대한 설명" disabled>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 단답형 end -->
|
||||
|
||||
<!-- 장문형 start -->
|
||||
<tr class="event-type-select__content" data-eventtype="long">
|
||||
<th>질문 (장문형)<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" title="해당 인풋에 대한 설명">
|
||||
<div class="b-checkbox-container ml-5">
|
||||
<label class="b-checkbox checkbox check-all">
|
||||
<input type="checkbox" value="">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">필수여부</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="event-type-select__content" data-eventtype="long">
|
||||
<th>보기</th>
|
||||
<td>
|
||||
<textarea class="textarea" id="longSentence" name="longSentence" title="에디터 입력" cols="30" rows="5" disabled></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 장문형 end -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-control-container mt-10">
|
||||
<div class="left"></div>
|
||||
<div class="center"></div>
|
||||
<div class="right"><button class="btn sm dark" onclick="fn_delete_tr('qestnrTable')">질문 삭제</button>
|
||||
<button class="btn sm primary" onclick="fn_add_qestnr('qestnrTable', fn_qestnr_selected()); return false;">질문 추가</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,171 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
|
||||
|
||||
<%--
|
||||
Class Name : PartcptnEvtListR.jsp
|
||||
Description : 참여 이벤트 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-11-28 추지훈 최초 생성
|
||||
--%>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
$('select').niceSelect();
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<%-- 참여이벤트 목록 조회 영역 START --%>
|
||||
<section class="content-section">
|
||||
<form>
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
<div class="search-number">
|
||||
<span class="search-number__text">총 <strong>720</strong>건</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="select-box">
|
||||
<select title="해당 셀렉트에 대한 설명">
|
||||
<option value="">최근 가입순</option>
|
||||
<option value="">마일리지 많은순</option>
|
||||
<option value="">마일리지 적은순</option>
|
||||
<option value="">구매금액 많은순</option>
|
||||
<option value="">구매금액 적은순</option>
|
||||
<option value="">주문수 많은순</option>
|
||||
<option value="">주문수 적은순</option>
|
||||
<option value="">상품후기 많은순</option>
|
||||
<option value="">상품후기 적은순</option>
|
||||
<option value="">방문수 많은순</option>
|
||||
<option value="">방문수 적은순</option>
|
||||
<option value="">추천수 많은순</option>
|
||||
<option value="">추천수 적은순</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="select-box">
|
||||
<select title="해당 셀렉트에 대한 설명">
|
||||
<option value="">10개씩</option>
|
||||
<option value="">50개씩</option>
|
||||
<option value="">100개씩</option>
|
||||
<option value="">200개씩</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="horizontal-line">
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
<button class="btn outline sm">선택 삭제</button>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<button class="btn outline sm">
|
||||
<i class="icon icon_excel"></i>
|
||||
다운로드
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="spacing">
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<!-- 각 열 width 설정 -->
|
||||
<colgroup>
|
||||
<col style="width: 5%;">
|
||||
<col style="width: 5%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 16%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 14%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th >
|
||||
<label class="b-checkbox checkbox is-medium check-all">
|
||||
<input type="checkbox" class="partcptnCheckBoxAll" value="">
|
||||
<span class="check"></span>
|
||||
</label>
|
||||
</th>
|
||||
<th>번호</th>
|
||||
<th>게시글 제목</th>
|
||||
<th>종류</th>
|
||||
<th>노출 상태</th>
|
||||
<th>노출 기간</th>
|
||||
<th>참여인원</th>
|
||||
<th>이벤트 상태</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="partcptnCheckBox">
|
||||
<label class="b-checkbox checkbox is-medium">
|
||||
<input type="checkbox" class="partcptnCheckBox" value="" onchange="fn_ctr_pCheckbox('.partcptnCheckBoxAll', '.partcptnCheckBox'); return false;">
|
||||
<span class="check"></span>
|
||||
</label>
|
||||
</td>
|
||||
<td>1</td>
|
||||
<td class="left">퀴즈 이벤트1</td>
|
||||
<td>퀴즈</td>
|
||||
<td>노출</td>
|
||||
<td>
|
||||
<span>2021-01-01</span>
|
||||
<span>~</span>
|
||||
<span>2021-01-01</span>
|
||||
</td>
|
||||
<td>15</td>
|
||||
<td>진행</td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<button class="btn xsm dark">이벤트 종료</button>
|
||||
<a href="" class="btn xsm primary outline">수정</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
<div class="pagination__container">
|
||||
<div class="pagination">
|
||||
<button disabled class="pagination__item first"><span class="visually-hidden">첫
|
||||
페이지로</span></button>
|
||||
<button disabled class="pagination__item prev"><span class="visually-hidden">이전
|
||||
페이지로</span></button>
|
||||
<ol class="pagination__number-group">
|
||||
<li><button class="pagination__item active"><span>1</span></button></li>
|
||||
<li><button class="pagination__item"><span>2</span></button></li>
|
||||
<li><button class="pagination__item"><span>3</span></button></li>
|
||||
<li><button class="pagination__item"><span>4</span></button></li>
|
||||
<li><button class="pagination__item"><span>5</span></button></li>
|
||||
<li><button class="pagination__item"><span>6</span></button></li>
|
||||
<li><button class="pagination__item"><span>7</span></button></li>
|
||||
<li><button class="pagination__item"><span>8</span></button></li>
|
||||
<li><button class="pagination__item"><span>9</span></button></li>
|
||||
<li><button class="pagination__item"><span>10</span></button></li>
|
||||
</ol>
|
||||
<button class="pagination__item next"><span class="visually-hidden">다음 페이지로</span></button>
|
||||
<button class="pagination__item last"><span class="visually-hidden">마지막 페이지로</span></button>
|
||||
</div>
|
||||
</div>
|
||||
<%-- 참여이벤트 목록 조회 영역 END --%>
|
||||
|
||||
<script src="/admin/js/script.js" defer=""></script>
|
||||
@@ -0,0 +1,188 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Include.jsp" %>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#listForm').on('keydown', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
$('#searchBtn').trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
let pageIndex = '<c:out value="${ resultMap.paramVO.pageIndex }"/>';
|
||||
let pageUnit = '<c:out value="${ resultMap.paramVO.pageUnit }"/>';
|
||||
|
||||
console.log("pageIndex, pageUnit : ", pageIndex, pageUnit);
|
||||
fn_select_partcptn_evt_list(pageIndex, pageUnit);
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
/******************************************************
|
||||
* 참여이벤트 목록 조회
|
||||
*******************************************************/
|
||||
const fn_select_partcptn_evt_list = function(pageIndex, pageUnit) {
|
||||
console.log("pageIndex : ", pageIndex);
|
||||
|
||||
let dataStr;
|
||||
if(!pageIndex) {
|
||||
$('#pageIndex').val(1);
|
||||
} else {
|
||||
$('#pageIndex').val(pageIndex);
|
||||
}
|
||||
|
||||
if(!pageUnit) {
|
||||
dataStr = $('#listForm').serialize();
|
||||
} else {
|
||||
if($('#pageUnit').length){
|
||||
$('#pageUnit').val(pageUnit);
|
||||
dataStr = $('#listForm').serialize();
|
||||
} else {
|
||||
dataStr = $('#listForm').serialize()+'&pageUnit='+pageUnit;
|
||||
}
|
||||
}
|
||||
|
||||
$('#pageIndex').val(pageIndex);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url : "<c:url value="/mngr/promtn/partcptn/selectPartcptnEvtList"/>",
|
||||
data : dataStr,
|
||||
success:function(resultHtml) {
|
||||
$('#pageDiv').html(resultHtml);
|
||||
$('#pageUnit').niceSelect();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/******************************************************
|
||||
* 참여이벤트 등록 폼 이동
|
||||
*******************************************************/
|
||||
const fn_move_regpage = function() {
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/partcptn/selectPartcptnEvtForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%-- 상단메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Left.jsp" %>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">참여 이벤트 목록</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<button class="btn primary" type="button" onclick="fn_move_regpage(1); return false;">이벤트 <spring:message code="button.insert"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<form id="listForm" name="listForm" method="post" >
|
||||
<%-- 참여 이벤트 검색 영역 START --%>
|
||||
<section class="content-section" id="partcptnSearchSection">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 38%;">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 38%;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>게시글 제목</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" title="해당 인풋에 대한 설명">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이벤트 종류</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-1" name="r-group01" checked="">
|
||||
<label for="r-1">전체</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-2" name="r-group01">
|
||||
<label for="r-2">설문</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-3" name="r-group01">
|
||||
<label for="r-3">퀴즈</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>노출 상태</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-4" name="r-group02" checked="">
|
||||
<label for="r-4">전체</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-5" name="r-group02">
|
||||
<label for="r-5">노출</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-6" name="r-group02">
|
||||
<label for="r-6">미노출</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container">
|
||||
<div class="left"></div>
|
||||
<div class="center">
|
||||
<button class="btn outline">초기화</button>
|
||||
<button class="btn primary" id="searchBtn" type="button" onkeypress="this.onclick();" onclick="fn_select_partcptn_evt_list(1); return false;">검색</button>
|
||||
</div>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
</section>
|
||||
<%-- 참여 이벤트 검색 영역 END --%>
|
||||
|
||||
<%-- 참여 이벤트 목록 영역 --%>
|
||||
<div id="pageDiv">
|
||||
</div>
|
||||
</form>
|
||||
<%-- 하단 스크롤 완료 시 위로가기 버튼 출력 : 2023-11-30 / 박철민 추가 --%>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,83 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui" %>
|
||||
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld"%>
|
||||
|
||||
|
||||
<%--
|
||||
Class Name : OrderCouponUseDtlsPopupRForm.jsp
|
||||
Description : 쿠폰 사용 내역 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024-01-24 추지훈 최초 생성
|
||||
--%>
|
||||
<div id="evtBannerSortPop" class="modal" style="max-width: 800px;">
|
||||
<div class="modal-header">
|
||||
<h4>이벤트 배너 정렬</h4>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<p class="stone-7">*진행중인 이벤트에서만 정렬 가능합니다.</p>
|
||||
<p class="stone-7">*상품 상세 내에서 노출할 배너 순서를 정렬합니다.</p>
|
||||
<p class="stone-7">*이벤트 상세 설정에 따라 노출 여부가 결정됩니다.</p>
|
||||
<p></p>
|
||||
<div class="table-wrapper">
|
||||
<form id = "bannerListForm">
|
||||
<table class="table vertical draggable" id="bannerListTb">
|
||||
<caption>이벤트 배너</caption>
|
||||
<colgroup>
|
||||
<col style="width: 6%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: auto;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>순서</th>
|
||||
<th>이벤트 구분</th>
|
||||
<th>이벤트 명</th>
|
||||
<th>시작일/종료일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="bannerListTbody">
|
||||
<c:choose>
|
||||
<c:when test="${not empty resultMap.resultList}">
|
||||
<c:forEach var="purchsEvtList" items="${resultMap.resultList}" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="draggable-icon-container">
|
||||
<i class="icon icon_draggable"></i>
|
||||
<span class="visually-hidden">순서 바꾸기</span>
|
||||
</div>
|
||||
<input type="hidden" name="evtList[]" value="<c:out value="${purchsEvtList.evtInnb}" />"/>
|
||||
</td>
|
||||
<td><c:out value="${ purchsEvtList.evtDvNm }"/></td>
|
||||
<td><c:out value="${ purchsEvtList.evtnm }"/></td>
|
||||
<td>
|
||||
<span><c:out value="${ purchsEvtList.evtBgnDt }"/></span>
|
||||
<br>
|
||||
<span><c:out value="${ purchsEvtList.evtEndDt }"/></span>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="100%"><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" onclick="fn_close_modal('evtBannerSortPop');" class="btn outline"><spring:message code="button.close"/></button>
|
||||
<button type="button" onclick="fn_udpate_banner_sort();" class="btn primary"><spring:message code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
2488
src/main/webapp/WEB-INF/views/mngr/promtn/purchs/PurchsEvtCopyC.jsp
Normal file
2488
src/main/webapp/WEB-INF/views/mngr/promtn/purchs/PurchsEvtCopyC.jsp
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,146 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
|
||||
|
||||
<%--
|
||||
Class Name : PurchsEvtListInqireR.jsp
|
||||
Description : 구매 이벤트 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024-01-30 추지훈 최초 생성
|
||||
--%>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
$('select').niceSelect();
|
||||
});
|
||||
|
||||
</script>
|
||||
<%-- 구매이벤트 목록 조회 영역 START --%>
|
||||
<section class="content-section">
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
<div class="search-number">
|
||||
<span class="search-number__text">총 <strong><c:out value="${ resultMap.paginationInfo.totalRecordCount }"/></strong>건 <span>(진행 중 <em><c:out value="${ resultMap.ingCnt }"/></em>, 종료<em><c:out value="${ resultMap.endCnt }"/></em>)</span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<c:if test = "${resultMap.ingCnt > 1}">
|
||||
<button type="button" class="btn primary" onclick="fn_show_banner_sort_modal();">
|
||||
진행 중 이벤트 배너 정렬
|
||||
</button>
|
||||
</c:if>
|
||||
<div class="select-box">
|
||||
<select title="정렬기준" id="sortDv" name="sortDv" onchange="fn_select_purchsevt_list_inqire(1); return false;">
|
||||
<option value="recent" <c:if test="${purchsEvtVO.sortDv eq 'recent'}">selected="selected"</c:if>>최근 등록순</option>
|
||||
<option value="evtnm" <c:if test="${purchsEvtVO.sortDv eq 'evtnm'}">selected="selected"</c:if>>이벤트명순</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="select-box">
|
||||
<select id="pageUnit" name="pageUnit" title="페이지당 출력될 목록건수" onchange="console.log('test'); fn_select_crm_mlg_list('1');">
|
||||
<c:forEach items="${ resultMap.paginationInfo.pageUnitArr }" var="pageUnit" varStatus="pageUnitStatus">
|
||||
<option value="<c:out value="${ pageUnit }"/>" <c:if test="${ resultMap.paginationInfo.recordCountPerPage eq pageUnit}">selected="selected"</c:if>><c:out value="${ pageUnit }"/>개씩</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="spacing">
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<!-- 각 열 width 설정 -->
|
||||
<colgroup>
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 12%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>이벤트 구분</th>
|
||||
<th>이벤트명</th>
|
||||
<th>시작일/종료일</th>
|
||||
<th>상태</th>
|
||||
<th>등록일/수정일</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultList && fn:length(resultMap.resultList) > 0 }">
|
||||
<c:forEach items="${ resultMap.resultList }" var="purchsEvtList" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<c:out value="${ resultMap.paginationInfo.totalRecordCount - purchsEvtList.rnum + 1 }" />
|
||||
<input type="hidden" id="evtInnb" name="evtInnb" value="<c:out value="${ purchsEvtList.evtInnb }" />"/>
|
||||
</td>
|
||||
<td><c:out value="${ purchsEvtList.evtDvNm }"/></td>
|
||||
<td class="left">
|
||||
<span class="under-line" onclick="fn_move_dtlupdt('<c:out value="${ purchsEvtList.evtInnb }"/>');">
|
||||
<c:out value="${ purchsEvtList.evtnm }"/>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span><c:out value="${ purchsEvtList.evtBgnDt }"/></span>
|
||||
<br>
|
||||
<span><c:out value="${ purchsEvtList.evtEndDt }"/></span>
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="today" value="<%=new java.util.Date()%>" />
|
||||
<c:set var="date"><fmt:formatDate value="${today}" pattern="yyyy-MM-dd hh:mm:ss" /></c:set>
|
||||
<c:choose>
|
||||
<c:when test="${ purchsEvtList.evtBgnDt gt date }">
|
||||
시작전
|
||||
</c:when>
|
||||
<c:when test="${ purchsEvtList.evtBgnDt le date && date le purchsEvtList.evtEndDt}">
|
||||
진행중
|
||||
</c:when>
|
||||
<c:when test="${ purchsEvtList.evtEndDt lt date }">
|
||||
종료
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>
|
||||
<span><c:out value="${ purchsEvtList.registDt }"/></span>
|
||||
<br>
|
||||
<span><c:out value="${ purchsEvtList.updtDt }"/></span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<button class="btn xsm light-gray" type="button" onclick="fn_move_copyform('<c:out value="${ purchsEvtList.evtInnb }"/>');">복사</button>
|
||||
<button class="btn xsm outline" type="button" onclick="fn_move_dtlupdt('<c:out value="${ purchsEvtList.evtInnb }"/>');">상세</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="100%" ><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_purchsevt_list_inqire" />
|
||||
</div>
|
||||
<%-- 구매이벤트 목록 조회 영역 END --%>
|
||||
@@ -0,0 +1,401 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
|
||||
|
||||
<%--
|
||||
Class Name : PurchsEvtListInqireRForm.jsp
|
||||
Description : 구매이벤트 목록 검색폼
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024-01-30 추지훈 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function(){
|
||||
|
||||
fn_set_date('srchStartDate','srchEndDate','srchEndDate');
|
||||
|
||||
$('#listForm').on('keydown', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
$('#searchBtn').trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
$('#allDays').on('click', function() {
|
||||
$('#srchStartDate, #srchEndDate').val('');
|
||||
});
|
||||
|
||||
$('select').niceSelect();
|
||||
|
||||
let pageIndex = '<c:out value="${ resultMap.paramVO.pageIndex }"/>';
|
||||
let pageUnit = '<c:out value="${ resultMap.paramVO.pageUnit }"/>';
|
||||
|
||||
|
||||
// $('.dateRange-btn').filter('#sevenDays').trigger('click');
|
||||
fn_select_purchsevt_list_inqire(pageIndex, pageUnit);
|
||||
|
||||
|
||||
updateCheckAll();
|
||||
|
||||
$('.b-checkbox-container input[name="srchStatus"]').on('click', function() {
|
||||
updateCheckAll();
|
||||
});
|
||||
|
||||
|
||||
function updateCheckAll() {
|
||||
var allChecked = true;
|
||||
|
||||
$('.b-checkbox-container input[name="srchStatus"]').each(function() {
|
||||
if (!$(this).is(':checked')) {
|
||||
allChecked = false;
|
||||
}
|
||||
});
|
||||
|
||||
$('.b-checkbox-container .check-all input[type="checkbox"]').prop('checked', allChecked);
|
||||
}
|
||||
|
||||
|
||||
fn_return_srchForm();
|
||||
// $('.dateRange-btn').filter('#sevenDays').trigger('click');
|
||||
|
||||
});
|
||||
|
||||
/*이벤트 배너 정렬 모달 노출*/
|
||||
const fn_show_banner_sort_modal = () => {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<c:url value="/mngr/promtn/purchs/selectEvtBannerSortPopupForm"/>",
|
||||
success: function (resultHtml) {
|
||||
fn_close_modal("evtBannerSortPop");
|
||||
$("#modalDiv").html(resultHtml);
|
||||
initializeTableDnD(); //테이블드래그 라이브러리 초기화
|
||||
$("#evtBannerSortPop").modal();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*이벤트 배너 정렬 수정*/
|
||||
const fn_udpate_banner_sort = () => {
|
||||
let dataStr = $("#bannerListForm").serialize();
|
||||
console.log(dataStr);
|
||||
if(confirm("<spring:message code="confirm.common.save"/>")){
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<c:url value="/mngr/promtn/purchs/updateEvtBannerSort"/>",
|
||||
data : dataStr,
|
||||
success: function (result) {
|
||||
result = JSON.parse(result.resBody.result);
|
||||
let msg = '';
|
||||
if(result.result === 'success'){
|
||||
msg = '<spring:message code="success.common.save"/>';
|
||||
}else{
|
||||
msg = '<spring:message code="fail.common.save"/>';
|
||||
}
|
||||
alert(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************
|
||||
* 구매이벤트 등록 폼 이동
|
||||
*************************************************/
|
||||
const fn_move_regpage = function(pageIndex) {
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/purchs/selectPurchsEvtRegistForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/************************************************
|
||||
* 구매이벤트 목록 조회
|
||||
*************************************************/
|
||||
const fn_select_purchsevt_list_inqire = function(pageIndex, pageUnit) {
|
||||
|
||||
let dataStr;
|
||||
if(!pageIndex) {
|
||||
$('#pageIndex').val(1);
|
||||
} else {
|
||||
$('#pageIndex').val(pageIndex);
|
||||
}
|
||||
|
||||
if(!pageUnit) {
|
||||
dataStr = $('#listForm').serialize();
|
||||
} else {
|
||||
if($('#pageUnit').length){
|
||||
$('#pageUnit').val(pageUnit);
|
||||
dataStr = $('#listForm').serialize();
|
||||
} else {
|
||||
dataStr = $('#listForm').serialize()+'&pageUnit='+pageUnit;
|
||||
}
|
||||
}
|
||||
|
||||
$('#pageIndex').val(pageIndex);
|
||||
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url : "<c:url value="/mngr/promtn/purchs/selectPurchsEvtListInqire"/>",
|
||||
data : dataStr,
|
||||
success:function(resultHtml) {
|
||||
$('#pageDiv').html(resultHtml);
|
||||
$('#pageUnit').niceSelect();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/************************************************
|
||||
* 검색조건 초기화
|
||||
*************************************************/
|
||||
const resetForm = function(formId) {
|
||||
|
||||
if ($('#' + formId)[0]) {
|
||||
const radioArr = [];
|
||||
$('#' + formId).eq(0).find('input,select,textarea').each(function() {
|
||||
let type = this.type;
|
||||
let tag = this.tagName.toLowerCase();
|
||||
|
||||
if (type === 'text' || tag === 'textarea') {
|
||||
this.value = '';
|
||||
} else if (type === 'checkbox') {
|
||||
this.checked = false;
|
||||
} else if (type === 'radio') {
|
||||
this.checked = false;
|
||||
if (!radioArr.includes($(this).prop('name'))) {
|
||||
radioArr.push($(this).prop('name'));
|
||||
}
|
||||
} else if (tag === 'select') {
|
||||
const firstOption = $(this).find('option:first');
|
||||
firstOption.prop('selected', true);
|
||||
$(".select-box > select").niceSelect('update');
|
||||
}
|
||||
});
|
||||
radioArr.forEach((element) => $('input[name=' + element + ']').eq(0).prop('checked', 'checked'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* ********************************************************
|
||||
* 데이트 검색 값
|
||||
******************************************************** */
|
||||
const fn_set_datePick = function(_taget) {
|
||||
|
||||
let dateBtn = '#' + $(_taget).attr('id');
|
||||
$('[name=srchDatePick]').val(dateBtn);
|
||||
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 페이지 복귀
|
||||
******************************************************** */
|
||||
const fn_return_srchForm = function() {
|
||||
|
||||
let datePick = '<c:out value="${resultMap.paramVO.srchDatePick}"/>';
|
||||
if (datePick != '') {
|
||||
$(datePick).trigger('click');
|
||||
} else {
|
||||
$('#srchStartDate').val('<c:out value="${resultMap.paramVO.srchStartDate}"/>');
|
||||
$('#srchEndDate').val('<c:out value="${resultMap.paramVO.srchEndDate}"/>');
|
||||
}
|
||||
$('#srchStr').val('<c:out value="${resultMap.paramVO.srchStr}"/>');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/****************************************************
|
||||
* 검색 후 새로 고침 시 검색조건 리셋
|
||||
*****************************************************/
|
||||
history.replaceState({}, null, location.pathname);
|
||||
|
||||
|
||||
/****************************************************
|
||||
* 이벤트 상세 수정폼 이동
|
||||
*****************************************************/
|
||||
const fn_move_dtlupdt = function(evtInnb) {
|
||||
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/purchs/selectPurchsEvtDtlUpdtInqire"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#evtInnb').val(evtInnb);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
|
||||
/****************************************************
|
||||
* 이벤트 복사폼 이동
|
||||
*****************************************************/
|
||||
const fn_move_copyform = function(evtInnb) {
|
||||
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/promtn/purchs/selectPurchsEvtCopyForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#evtInnb').val(evtInnb);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%-- 상단메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Header.jsp"%>
|
||||
<main class="main">
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Left.jsp"%>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">이벤트 관리(할인/사은품)</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<a href="" class="btn primary" id="moveRegist" type="button" onclick="fn_move_regpage(1); return false;">
|
||||
이벤트 <spring:message code="button.insert"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<form id="listForm" name="listForm" method="post" >
|
||||
<input type="hidden" id="evtInnb" name="evtInnb" value=""/>
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.paramVO.pageIndex }"/>"/>
|
||||
<input type="hidden" name="srchDatePick" value="${resultMap.paramVO.srchDatePick}" />
|
||||
<input type="hidden" id="recordCountPerPage" name="recordCountPerPage" value="<c:out value="${ resultMap.paramVO.recordCountPerPage }"/> "/>
|
||||
<input type="hidden" id="sopmalCd" name="sopmalCd"/>
|
||||
<%-- 구매이벤트 검색 영역 START --%>
|
||||
<section class="content-section" id="purchsEvtSearchForm">
|
||||
<h3 class="content-section__title">이벤트 검색</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>검색(이벤트명/상품명)</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" id="srchKeyword" name="srchKeyword" value="<c:out value="${ resultMap.paramVO.srchKeyword }"/>" title="이벤트 목록 검색어">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>날짜</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select title="날짜 구분" id="srchDtDv" name="srchDtDv">
|
||||
<option value="start" <c:if test="${ resultMap.paramVO.srchDtDv eq 'start'}">selected="selected"</c:if>>시작일</option>
|
||||
<option value="end" <c:if test="${ resultMap.paramVO.srchDtDv eq 'end'}">selected="selected"</c:if>>종료일</option>
|
||||
<option value="regist" <c:if test="${ resultMap.paramVO.srchDtDv eq 'regist'}">selected="selected"</c:if>>등록일</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-container">
|
||||
<input type="text" name="srchStartDate" id="srchStartDate" class="datepicker" value="<c:out value="${ resultMap.paramVO.srchStartDate }"/>" onchange="fn_check_date('srchStartDate', 'srchEndDate')" title="시작 날짜 선택" autocomplete="off" pattern="yyyy-MM-dd">
|
||||
<span class="tilde">~</span>
|
||||
<input type="text" name="srchEndDate" id="srchEndDate" class="datepicker" value="<c:out value="${ resultMap.paramVO.srchEndDate }"/>" onchange="fn_check_date('juscrb')" title="종료 날짜 선택" autocomplete="off" pattern="yyyy-MM-dd">
|
||||
</div>
|
||||
<div class="dateRange-btnContainer">
|
||||
<button type="button" class="dateRange-btn" id="yesterday" onclick="fn_set_date('srchStartDate','srchEndDate','srchEndDate','1D'); fn_set_datePick(this);">어제</button>
|
||||
<button type="button" class="dateRange-btn" id="today" onclick="fn_set_date('srchStartDate','srchEndDate','srchEndDate','0'); fn_set_datePick(this); ">오늘</button>
|
||||
<button type="button" class="dateRange-btn" id="threeDays" onclick="fn_set_date('srchStartDate','srchEndDate','srchEndDate','3D'); fn_set_datePick(this);">3일간</button>
|
||||
<button type="button" class="dateRange-btn" id="sevenDays" onclick="fn_set_date('srchStartDate','srchEndDate','srchEndDate','7D'); fn_set_datePick(this);">일주일</button>
|
||||
<button type="button" class="dateRange-btn" id="oneMonth" onclick="fn_set_date('srchStartDate','srchEndDate','srchEndDate','1M'); fn_set_datePick(this);">1개월</button>
|
||||
<button type="button" class="dateRange-btn" id="threeMonth" onclick="fn_set_date('srchStartDate','srchEndDate','srchEndDate','3M'); fn_set_datePick(this);">3개월</button>
|
||||
<button type="button" class="dateRange-btn" id="sixMonth" onclick="fn_set_date('srchStartDate','srchEndDate','srchEndDate','6M'); fn_set_datePick(this);">6개월</button>
|
||||
<button type="button" class="dateRange-btn" id="oneYear" onclick="fn_set_date('srchStartDate','srchEndDate','srchEndDate','1Y'); fn_set_datePick(this);">1년</button>
|
||||
<button type="button" class="dateRange-btn" id="allDays" onclick="fn_set_datePick(this);">전체</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>상태</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox check-all">
|
||||
<input type="checkbox" value="">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">전체</span>
|
||||
</label>
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" value="b" name="srchStatus" <c:if test="${ fn:contains(resultMap.paramVO.srchStatus, 'b') }">checked="checked"</c:if>>
|
||||
<span class="check"></span>
|
||||
<span class="control-label">시작전</span>
|
||||
</label>
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" value="i" name="srchStatus" <c:if test="${ fn:contains(resultMap.paramVO.srchStatus, 'i') }">checked="checked"</c:if>>
|
||||
<span class="check"></span>
|
||||
<span class="control-label">진행중</span>
|
||||
</label>
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" value="e" name="srchStatus" <c:if test="${ fn:contains(resultMap.paramVO.srchStatus, 'e') }">checked="checked"</c:if>>
|
||||
<span class="check"></span>
|
||||
<span class="control-label">종료</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이벤트 구분</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-25" name="srchEvtDv" value="" checked>
|
||||
<label for="r-25">전체</label>
|
||||
</div>
|
||||
<c:forEach var="codeList" items="${ resultMap.purchsEvtDvList }" varStatus="">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="<c:out value="${ codeList.cdNm }"/><c:out value="${ codeList.cd }"/>" name="srchEvtDv" value="<c:out value="${ codeList.cd }"/>" <c:if test="${ resultMap.paramVO.srchEvtDv eq codeList.cd }">checked="checked"</c:if>>
|
||||
<label for="<c:out value="${ codeList.cdNm }"/><c:out value="${ codeList.cd }"/>" ><c:out value="${ codeList.cdNm }"/></label>
|
||||
</div>
|
||||
</c:forEach>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container">
|
||||
<div class="left"></div>
|
||||
<div class="center">
|
||||
<button class="btn outline" id="resetBtn" type="button" onclick="resetForm('purchsEvtSearchForm'); return false;">초기화</button>
|
||||
<button class="btn primary" id="searchBtn" type="button" onclick="fn_select_purchsevt_list_inqire(1); return false;">검색</button>
|
||||
</div>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
</section>
|
||||
<%-- 구매이벤트 검색 영역 END --%>
|
||||
|
||||
<%-- 구매이벤트 목록 DIB --%>
|
||||
<div id="pageDiv">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div id ="modalDiv"></div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user