초기소스
This commit is contained in:
@@ -0,0 +1,206 @@
|
||||
<%@ 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="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%--
|
||||
Class Name : ConditionFreeDlvy.jsp
|
||||
Description : 무료배송 조건부 배송비 jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.01 전일찬 최초 생성
|
||||
--%>
|
||||
<script type="text/javascript">
|
||||
$( document ).ready(function() {
|
||||
/** 무료배송(조건부) 조건 체크박스 컨트롤 */
|
||||
const amtCndUseAt = document.querySelector('#amtCndUseAt');
|
||||
const amtCndAditAmt = document.querySelector('#amtCndAditAmt');
|
||||
const cntCndUseAt = document.querySelector('#cntCndUseAt');
|
||||
const cntCndAditAmt = document.querySelector('#cntCndAditAmt');
|
||||
fn_check_BoxControl(amtCndUseAt,amtCndAditAmt);
|
||||
fn_check_BoxControl(cntCndUseAt,cntCndAditAmt);
|
||||
|
||||
/** 묶음배송 체크박스 컨트롤 */
|
||||
const bundleDlvyY = document.querySelector('#bundleDlvyY');
|
||||
const bundleDlvyN = document.querySelector('#bundleDlvyN');
|
||||
const bundleDlvyCndAmt = document.querySelector('#bundleDlvyCndAmt');
|
||||
fn_click_bundleDlvy(bundleDlvyY, bundleDlvyCndAmt);
|
||||
fn_click_bundleDlvy(bundleDlvyN, bundleDlvyCndAmt);
|
||||
|
||||
/** 배송권역 셀렉트박스 컨트롤 */
|
||||
const dlvyAreaAditAt1 = document.querySelector('#dlvyAreaAditAt');
|
||||
const areaAditDlvyAmt1 = document.querySelector('#areaAditDlvyAmt');
|
||||
fn_change_dlvyArea(dlvyAreaAditAt1, areaAditDlvyAmt1);
|
||||
|
||||
//왕복 여부 체크박스 컨트롤
|
||||
const returnDlvyApplcAt = document.querySelector('#returnDlvyApplcAt');
|
||||
const exchngDlvyAmt = document.querySelector('#exchngDlvyAmt');
|
||||
fn_check_BoxControl(returnDlvyApplcAt,exchngDlvyAmt);
|
||||
|
||||
if ($(".input-text.number").val() === '' || $(".input-text.number").val() == null) {
|
||||
$(".input-text.number").val('0');
|
||||
}
|
||||
|
||||
$(".input-text.number").on("focus", function () {
|
||||
|
||||
if ($(this).val() === '0') {
|
||||
$(this).val('');
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<input type="hidden" name="dlvyGroupDvCd" value="01"/>
|
||||
<section class="content-section">
|
||||
<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">
|
||||
<div class="input-container">
|
||||
<input type="text" class="input-text sm right number"
|
||||
value="<fmt:formatNumber value='${resultMap.dlvyGroup.dftDlvyAmt}' pattern="#,###" />"
|
||||
title="기본배송비" name="dftDlvyAmt" maxlength="13" >
|
||||
<span class="input-unit-text">원</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>조건(다중선택가능)</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" id="amtCndUseAt" name="amtCndUseAt" value="Y" <c:if test="${ resultMap.dlvyGroup.amtCndUseAt eq 'Y' }">checked="checked"</c:if>>
|
||||
<span style="margin-right: 5px;" class="check"></span>
|
||||
<input type="text" class="input-text sm right number" <c:if test="${ resultMap.dlvyGroup.amtCndUseAt ne 'Y' }">disabled="disabled"</c:if> value="<fmt:formatNumber value='${resultMap.dlvyGroup.amtCndAditAmt}' pattern="#,###" />" title="금액 조건" id="amtCndAditAmt" name="amtCndAditAmt" maxlength="13">
|
||||
</label>
|
||||
<span class="control-label">원 이상일 때 무료배송</span>
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" id="cntCndUseAt" name="cntCndUseAt" value="Y" <c:if test="${ resultMap.dlvyGroup.cntCndUseAt eq 'Y' }">checked="checked"</c:if>>
|
||||
<span style="margin-right: 5px;" class="check"></span>
|
||||
<input type="text" class="input-text sm right number" <c:if test="${ resultMap.dlvyGroup.cntCndUseAt ne 'Y' }">disabled="disabled"</c:if> value="<fmt:formatNumber value='${resultMap.dlvyGroup.cntCndAditAmt}' pattern="#,###" />" title="구매 개수 조건" id="cntCndAditAmt" name="cntCndAditAmt" maxlength="13">
|
||||
</label>
|
||||
<span class="control-label">개 이상일 때 무료배송</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">묶음배송</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="bundleDlvyY" name="bundleDlvyUseAt" value="Y"
|
||||
<c:if test="${resultMap.dlvyGroup.bundleDlvyUseAt eq 'Y' }">checked="checked"</c:if> <c:if test="${empty resultMap.dlvyGroup.bundleDlvyUseAt}">checked="checked"</c:if> >
|
||||
<label for="bundleDlvyY">사용함</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="bundleDlvyN" name="bundleDlvyUseAt" value="N"
|
||||
<c:if test="${resultMap.dlvyGroup.bundleDlvyUseAt eq 'N' }">checked="checked"</c:if>>
|
||||
<label for="bundleDlvyN">사용안함</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="td-inner vertical">
|
||||
<div class="input-container">
|
||||
<span class="mr-10">묶음배송 상품 금액 합이</span>
|
||||
<input type="text" class="input-text sm right number"
|
||||
<c:if test="${resultMap.dlvyGroup.bundleDlvyUseAt eq 'N' }">disabled="disabled"</c:if>
|
||||
value="<fmt:formatNumber value='${resultMap.dlvyGroup.bundleDlvyCndAmt}' pattern="#,###" />"
|
||||
title="묶음배송 조건" id="bundleDlvyCndAmt" name="bundleDlvyCndAmt" maxlength="13">
|
||||
<span class="input-unit-text mr-8">원</span>
|
||||
<span>이상일 때 무료배송</span>
|
||||
</div>
|
||||
<div class="gray-7">
|
||||
<p class="fyi">값을 1원 이상 입력 하신 경우 설정이 가능 합니다.</p>
|
||||
<p class="fyi">묶음배송을 사용함으로 설정하신 상품의 경우에만 해당 조건이 적용됩니다.</p>
|
||||
<p class="fyi">묶음배송 상품이 아닌 경우, 상품별로 각각 배송비가 부과될 수 있습니다.</p>
|
||||
<p class="fyi">묶음배송 상품은 2개 이상 주문해야 무료배송 조건이 적용됩니다.</p>
|
||||
<p class="fyi">무료배송 처리된 묶음배송 상품이 있을 경우, 전체 묶음배송 상품이 무료배송 처리됩니다.
|
||||
</p>
|
||||
<p class="fyi">묶음배송 상품인 경우, 금액이 가장 높은 기본 배송비를 한 번만 부과합니다.</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">배송 권역</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select title="배송권역 사용여부" id="dlvyAreaAditAt" name="dlvyAreaAditAt">
|
||||
<option value="N" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt ne 'Y' }">selected="selected"</c:if>>사용안함</option>
|
||||
<option value="Y" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt eq 'Y' }">selected="selected"</c:if>>2권역</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="td-inner vertical">
|
||||
<div class="input-container">
|
||||
<span class="mr-10 fw-500">도서산간지역+제주지역 추가 배송비</span>
|
||||
<input type="text" class="input-text sm right number" id="areaAditDlvyAmt"
|
||||
name="areaAditDlvyAmt" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt ne 'Y' }">disabled="disabled"</c:if>
|
||||
value="<fmt:formatNumber value='${resultMap.dlvyGroup.areaAditDlvyAmt}' pattern="#,###" />"
|
||||
title="배송권역에 대한 추가 배송비" maxlength="13">
|
||||
<span class="input-unit-text mr-8">원</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">반품배송비</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="input-container">
|
||||
<span>편도 :
|
||||
<input type="text" class="input-text sm right number" value="<fmt:formatNumber value='${resultMap.dlvyGroup.returnDlvyAmt}' pattern="#,###" />" title="편도반품배송비" id="returnDlvyAmt" name="returnDlvyAmt" maxlength="13">
|
||||
원
|
||||
</span>
|
||||
</div>
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" id="returnDlvyApplcAt" name="returnDlvyApplcAt" value="Y" <c:if test="${ resultMap.dlvyGroup.returnDlvyApplcAt eq 'Y' }">checked="checked"</c:if>>
|
||||
<span style="margin-right: 5px;" class="check"></span>
|
||||
</label>
|
||||
<span class="control-label">왕복 여부</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="input-container">
|
||||
<span>왕복 :
|
||||
<input type="text" class="input-text sm right number" value="<fmt:formatNumber value='${resultMap.dlvyGroup.exchngDlvyAmt}' pattern="#,###" />" title="왕복반품배송비" id="exchngDlvyAmt" name="exchngDlvyAmt" maxlength="13" <c:if test="${resultMap.dlvyGroup.returnDlvyApplcAt ne 'Y'}"> disabled="disabled" </c:if> >
|
||||
원
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
319
src/main/webapp/WEB-INF/views/mngr/setup/dlvygrp/DlvyGroupC.jsp
Normal file
319
src/main/webapp/WEB-INF/views/mngr/setup/dlvygrp/DlvyGroupC.jsp
Normal file
@@ -0,0 +1,319 @@
|
||||
<%@ 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"%>
|
||||
<%--
|
||||
Class Name : dlvyGroupC.jsp
|
||||
Description : 배송그룹 등록
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.11.28 전일찬 최초 생성11
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Include.jsp" %>
|
||||
</head>
|
||||
<script type="text/javascript">
|
||||
|
||||
/* ********************************************************
|
||||
* Move Tab Action Function
|
||||
******************************************************** */
|
||||
|
||||
$(document).ready(function(){
|
||||
var dlvyGroupDv = 'ConditionFreeDlvy';
|
||||
var dlvyGroupUrl = '';
|
||||
var dlvyGroupDlvyDivId = '';
|
||||
|
||||
/* 해당 그룹 탭으로 이동 */
|
||||
contentTabBtn.removeClass("active");
|
||||
contentTabContent.removeClass("active");
|
||||
|
||||
if(dlvyGroupDv == "ConditionFreeDlvy"){
|
||||
$("#ConditionFreeDlvyBtn").addClass("active");
|
||||
contentTabContent.eq(contentTabBtn.index($("button.active"))).addClass("active");
|
||||
}
|
||||
if(dlvyGroupDv == "FreeDlvy"){
|
||||
$("#FreeDlvyBtn").addClass("active");
|
||||
contentTabContent.eq(contentTabBtn.index($("button.active"))).addClass("active");
|
||||
}
|
||||
if(dlvyGroupDv == "PayDlvy"){
|
||||
$("#PayDlvyBtn").addClass("active");
|
||||
contentTabContent.eq(contentTabBtn.index($("button.active"))).addClass("active");
|
||||
}
|
||||
|
||||
/* html load action */
|
||||
const fn_load_html = () => {
|
||||
switch(dlvyGroupDv) {
|
||||
case 'ConditionFreeDlvy' :
|
||||
dlvyGroupUrl = '<c:url value="/mngr/setup/dlvygrp/conditionFreeDlvy"/>';
|
||||
dlvyGroupDlvyDivId = '#ConditionFreeDlvy';
|
||||
break;
|
||||
case 'FreeDlvy' :
|
||||
dlvyGroupUrl = '<c:url value="/mngr/setup/dlvygrp/freeDlvy"/>';
|
||||
dlvyGroupDlvyDivId = '#FreeDlvy';
|
||||
break;
|
||||
case 'PayDlvy' :
|
||||
dlvyGroupUrl = '<c:url value="/mngr/setup/dlvygrp/payDlvy"/>';
|
||||
dlvyGroupDlvyDivId = '#PayDlvy';
|
||||
break;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : dlvyGroupUrl,
|
||||
data : {dlvyGroupInnb : '', dlvyGroupDvCd : ''},
|
||||
success(response) {
|
||||
$('#ConditionFreeDlvy').html("");
|
||||
$('#FreeDlvy').html("");
|
||||
$('#PayDlvy').html("");
|
||||
$(dlvyGroupDlvyDivId).html(response);
|
||||
$(".select-box > select").niceSelect();
|
||||
$(".input-text.number").on("input", function () {
|
||||
var input = $(this).val();
|
||||
$(this).val(input.replace(/[^0-9]/g, "").replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,").replace(/^0/,""));
|
||||
});
|
||||
},
|
||||
error : console.log
|
||||
});
|
||||
}
|
||||
|
||||
fn_load_html();
|
||||
|
||||
/* tab button click action */
|
||||
$(".content-tab__btn").on('click', function(){
|
||||
fn_set_content_tab($(this).index());
|
||||
dlvyGroupDv = contentTabContent.eq($(this).index()).attr('id');
|
||||
fn_load_html();
|
||||
});
|
||||
|
||||
/* phone - 자동입력 */
|
||||
$(".input-text.phone").on("input", function () {
|
||||
var input = $(this).val();
|
||||
$(this).val(input.replace(/[^0-9]/g, "").replace(/^(\d{2,3})(\d{3,4})(\d{4})$/, "$1-$2-$3").replace(/^(\d{4})(\d{4})$/, "$1-$2"));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 배송권역 변경 시 value 값 변경
|
||||
******************************************************** */
|
||||
const fn_change_dlvyArea = (radio, textbox) => {
|
||||
$(radio).on('change', () => {
|
||||
if(radio.value == 'Y'){
|
||||
textbox.disabled = false;
|
||||
}
|
||||
if(radio.value == 'N'){
|
||||
textbox.disabled = true;
|
||||
textbox.value= '0';
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 묶음배송 변경 시 value 값 변경
|
||||
******************************************************** */
|
||||
const fn_click_bundleDlvy = (radio, textbox) => {
|
||||
$(radio).on('click', () => {
|
||||
if(radio.value == 'Y'){
|
||||
textbox.disabled = false;
|
||||
}
|
||||
if(radio.value == 'N'){
|
||||
textbox.disabled = true;
|
||||
textbox.value= '0';
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 체크박스 변경 시 value 값 변경
|
||||
******************************************************** */
|
||||
const fn_check_BoxControl = function(checkbox, textbox) {
|
||||
$(checkbox).on('click', function(){
|
||||
let targetValue = checkbox.value;
|
||||
if(checkbox.checked == true){
|
||||
targetValue = 'Y';
|
||||
textbox.disabled = false;
|
||||
} else {
|
||||
targetValue = 'N';
|
||||
textbox.disabled = true;
|
||||
textbox.value= '0';
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 배송그룹 목록조회 화면 이동
|
||||
******************************************************** */
|
||||
const fn_select_dlvygroup_list = function() {
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 배송그룹 등록
|
||||
******************************************************** */
|
||||
const fn_save_dlvygrp = function() {
|
||||
let saveForm = $('#DlvyForm').serialize();
|
||||
if(confirm('배송 그룹을 <spring:message code="confirm.common.save"/>')) {
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '<c:url value="/mngr/setup/dlvygrp/insertDlvyGroup"/>',
|
||||
data : saveForm,
|
||||
success : function(data) {
|
||||
var temp = data.resBody.result;
|
||||
var rm = JSON.parse(temp);
|
||||
if(rm.result == 'success'){
|
||||
let dlvyGroupInnb = parseInt(rm.dlvyGroupInnb);
|
||||
let dgiInput = document.createElement('input');
|
||||
<%--$('#listForm').attr('action', '<c:url value="/mngr/setup/dlvygrp/dlvyGroupDtlU"/>');--%>
|
||||
dgiInput.setAttribute('type','hidden');
|
||||
dgiInput.setAttribute('name','dlvyGroupInnb');
|
||||
dgiInput.setAttribute('value',dlvyGroupInnb);
|
||||
$('#listForm').append(dgiInput);
|
||||
let urlParams = new URL(location.href).searchParams;
|
||||
let pageIndex = urlParams.get('pageIndex');
|
||||
let pageUnit = urlParams.get('pageUnit');
|
||||
$('#listForm').submit();
|
||||
alert('<spring:message code="success.common.insert"/>');
|
||||
}
|
||||
else if(rm.result == 'fail'){
|
||||
alert('<spring:message code="fail.common.insert"/>');
|
||||
return;
|
||||
}
|
||||
else{
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* TODO : 우편번호 찾기 임시로 적용한 소스로 추후 목적에 맞춰서 고칠것
|
||||
******************************************************** */
|
||||
const fn_set_postcode = function(data) {
|
||||
$('#postcode').val(data.postcode);
|
||||
$('#adresDv').val(data.addressType);
|
||||
if(data.jibunAddress != '') {
|
||||
$('#address').val(data.jibunAddress);
|
||||
} else {
|
||||
$('#address').val(data.roadAddress);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<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="javascript:void(0);" onclick="fn_select_dlvygroup_list(); return false;" onkeypress="this.onclick" class="btn outline"><spring:message code="button.list"/></a>
|
||||
<button class="btn primary" onclick="fn_save_dlvygrp(); return false;"><spring:message code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-tab">
|
||||
<button id="ConditionFreeDlvyBtn" class="content-tab__btn">무료배송(조건부)</button>
|
||||
<button id="FreeDlvyBtn" class="content-tab__btn">무료배송</button>
|
||||
<button id="PayDlvyBtn" class="content-tab__btn">유료배송</button>
|
||||
</div><br>
|
||||
<form id="DlvyForm" method="post" action="">
|
||||
<input type="hidden" id="adresDv" name="adresDv" value=""/>
|
||||
<section class="content-section">
|
||||
<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">
|
||||
<input class="input-text md" type="text" title="배송그룹명" id="dlvyGroupNm" name="dlvyGroupNm" maxlength="25" value="" >
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<div id="ConditionFreeDlvy" class="content-tab__content">
|
||||
</div>
|
||||
<div id="FreeDlvy" class="content-tab__content">
|
||||
</div>
|
||||
<div id="PayDlvy" class="content-tab__content">
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">반송지</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>주소</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="address-group">
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">우편번호</span>
|
||||
<input type="text" class="input-text xsm mr-2" value="" readonly
|
||||
title="반송지 우편번호" id="postcode" name="rtnlcZip">
|
||||
<button type="button" onclick="fn_select_postcode(fn_set_postcode); return false;" class="address-line__find-btn">주소찾기</button>
|
||||
</div>
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">주소</span>
|
||||
<input type="text" class="input-text lg" value="" readonly
|
||||
title="반송지 주소" id="address" name="rtnlcAdres">
|
||||
</div>
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">상세주소</span>
|
||||
<input type="text" class="input-text md" value="" maxlength="35"
|
||||
title="반송지 상세주소" id="detailAddress" name="rtnlcDtlAdres">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>전화번호</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="phone-container">
|
||||
<input type="text" class="input-text sm phone" value=""
|
||||
title="전화번호" id="rtnlcTelnb" maxlength="13" name="rtnlcTelnb">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
</div>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div><br><br>
|
||||
</main>
|
||||
<form id="listForm" name="listForm" method="post" action="<c:url value="/mngr/setup/dlvygrp/dlvyGroupListR"/>">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="1"/>
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="10"/>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,313 @@
|
||||
<%@ 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"%>
|
||||
<%--
|
||||
Class Name : DlvyGroupDtlU.jsp
|
||||
Description : 배송그룹 수정
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.11.28 작성자명 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Include.jsp" %>
|
||||
</head>
|
||||
<script type="text/javascript">
|
||||
|
||||
/* ********************************************************
|
||||
* Move Tab Action Function
|
||||
******************************************************** */
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
var dlvyGroupDvCd = '<c:out value="${ resultMap.dlvyGroup.dlvyGroupDvCd }"/>';
|
||||
var dlvyGroupDv = '';
|
||||
|
||||
if(dlvyGroupDvCd === "01"){
|
||||
dlvyGroupDv = 'ConditionFreeDlvy'
|
||||
}else if(dlvyGroupDvCd === "02"){
|
||||
dlvyGroupDv = 'FreeDlvy'
|
||||
}else if(dlvyGroupDvCd === "03"){
|
||||
dlvyGroupDv = 'PayDlvy'
|
||||
}
|
||||
|
||||
var dlvyGroupUrl = '';
|
||||
var dlvyGroupDlvyDivId = '';
|
||||
|
||||
/* 해당 그룹 탭으로 이동 */
|
||||
contentTabBtn.removeClass("active");
|
||||
contentTabContent.removeClass("active");
|
||||
|
||||
if(dlvyGroupDv == "ConditionFreeDlvy"){
|
||||
$("#ConditionFreeDlvyBtn").addClass("active");
|
||||
contentTabContent.eq(contentTabBtn.index($("button.active"))).addClass("active");
|
||||
}
|
||||
if(dlvyGroupDv == "FreeDlvy"){
|
||||
$("#FreeDlvyBtn").addClass("active");
|
||||
contentTabContent.eq(contentTabBtn.index($("button.active"))).addClass("active");
|
||||
}
|
||||
if(dlvyGroupDv == "PayDlvy"){
|
||||
$("#PayDlvyBtn").addClass("active");
|
||||
contentTabContent.eq(contentTabBtn.index($("button.active"))).addClass("active");
|
||||
}
|
||||
|
||||
/* html load action */
|
||||
const fn_load_html = () => {
|
||||
switch(dlvyGroupDv) {
|
||||
case 'ConditionFreeDlvy' :
|
||||
dlvyGroupUrl = '<c:url value="/mngr/setup/dlvygrp/conditionFreeDlvy"/>';
|
||||
dlvyGroupDlvyDivId = '#ConditionFreeDlvy';
|
||||
break;
|
||||
case 'FreeDlvy' :
|
||||
dlvyGroupUrl = '<c:url value="/mngr/setup/dlvygrp/freeDlvy"/>';
|
||||
dlvyGroupDlvyDivId = '#FreeDlvy';
|
||||
break;
|
||||
case 'PayDlvy' :
|
||||
dlvyGroupUrl = '<c:url value="/mngr/setup/dlvygrp/payDlvy"/>';
|
||||
dlvyGroupDlvyDivId = '#PayDlvy';
|
||||
break;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : dlvyGroupUrl,
|
||||
data : {dlvyGroupInnb : '${resultMap.dlvyGroup.dlvyGroupInnb}', dlvyGroupDvCd : '${resultMap.dlvyGroup.dlvyGroupDvCd}'},
|
||||
success(response) {
|
||||
$('#ConditionFreeDlvy').html("");
|
||||
$('#FreeDlvy').html("");
|
||||
$('#PayDlvy').html("");
|
||||
$(dlvyGroupDlvyDivId).html(response);
|
||||
$(".select-box > select").niceSelect();
|
||||
$(".input-text.number").on("input", function () {
|
||||
var input = $(this).val();
|
||||
$(this).val(input.replace(/[^0-9]/g, "").replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,").replace(/^0/,""));
|
||||
});
|
||||
},
|
||||
error : console.log
|
||||
});
|
||||
}
|
||||
|
||||
fn_load_html();
|
||||
|
||||
/* click action */
|
||||
$(".content-tab__btn").on('click', function(){
|
||||
fn_set_content_tab($(this).index());
|
||||
dlvyGroupDv = contentTabContent.eq($(this).index()).attr('id');
|
||||
fn_load_html();
|
||||
});
|
||||
|
||||
/* phone - 자동입력 */
|
||||
$(".input-text.phone").on("input", function () {
|
||||
var input = $(this).val();
|
||||
$(this).val(input.replace(/[^0-9]/g, "").replace(/^(\d{2,3})(\d{3,4})(\d{4})$/, "$1-$2-$3").replace(/^(\d{4})(\d{4})$/, "$1-$2"));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 우편번호 입력
|
||||
******************************************************** */
|
||||
const fn_set_postcode = function(data) {
|
||||
$('#rtnlcZip').val(data.postcode);
|
||||
if(data.addressType === '02') {
|
||||
$('#rtnlcAdres').val(data.jibunAddress);
|
||||
} else {
|
||||
$('#rtnlcAdres').val(data.roadAddress);
|
||||
}
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 배송권역 변경 시 value 값 변경
|
||||
******************************************************** */
|
||||
const fn_change_dlvyArea = (radio, textbox) => {
|
||||
$(radio).on('change', () => {
|
||||
if(radio.value == 'Y'){
|
||||
textbox.disabled = false;
|
||||
}
|
||||
if(radio.value == 'N'){
|
||||
textbox.disabled = true;
|
||||
textbox.value= '0';
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 묶음배송 변경 시 value 값 변경
|
||||
******************************************************** */
|
||||
const fn_click_bundleDlvy = (radio, textbox) => {
|
||||
$(radio).on('click', () => {
|
||||
if(radio.value == 'Y'){
|
||||
textbox.disabled = false;
|
||||
}
|
||||
if(radio.value == 'N'){
|
||||
textbox.disabled = true;
|
||||
textbox.value= '0';
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 체크박스 변경 시 value 값 변경
|
||||
******************************************************** */
|
||||
const fn_check_BoxControl = function(checkbox, textbox) {
|
||||
$(checkbox).on('click', function(){
|
||||
let targetValue = checkbox.value;
|
||||
if(checkbox.checked == true){
|
||||
targetValue = "Y";
|
||||
textbox.disabled = false;
|
||||
} else {
|
||||
targetValue = "N";
|
||||
textbox.disabled = true;
|
||||
textbox.value= '0';
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 배송그룹 목록조회 화면 이동
|
||||
******************************************************** */
|
||||
const fn_select_dlvygroup_list = function() {
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* Dlvygrp save Action
|
||||
******************************************************** */
|
||||
let saveDlvygrp = () => {
|
||||
let saveDlvygrp = $('#DlvyForm');
|
||||
if(confirm('배송 그룹을 <spring:message code="confirm.common.update"/>')) {
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '<c:url value="/mngr/setup/dlvygrp/updateDlvyGroupDtl"/>',
|
||||
data : saveDlvygrp.serialize(),
|
||||
success : function(data) {
|
||||
var temp = data.resBody.result;
|
||||
var rm = JSON.parse(temp);
|
||||
if(rm.result == 'success') {
|
||||
alert('<spring:message code="success.common.update"/>');
|
||||
}
|
||||
else if(rm.result == 'fail'){
|
||||
alert('<spring:message code="fail.common.update"/>');
|
||||
return;
|
||||
}
|
||||
else{
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<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="javascript:void(0);" onclick="fn_select_dlvygroup_list(); return false;" onkeypress="this.onclick" class="btn outline"><spring:message code="button.list"/></a>
|
||||
<button class="btn primary" type="button" onclick="saveDlvygrp();"><spring:message code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-tab">
|
||||
<button id="ConditionFreeDlvyBtn" class="content-tab__btn">무료배송(조건부)</button>
|
||||
<button id="FreeDlvyBtn" class="content-tab__btn">무료배송</button>
|
||||
<button id="PayDlvyBtn" class="content-tab__btn">유료배송</button>
|
||||
</div><br>
|
||||
<form id="DlvyForm" method="post" action="/mngr/setup/dlvygrp/updateDlvyGroupDtl">
|
||||
<input type="hidden" id="dlvyGroupInnb" name="dlvyGroupInnb" value="<c:out value="${resultMap.dlvyGroup.dlvyGroupInnb}"/>"/>
|
||||
<input type="hidden" id="rtnlcInnb" name="rtnlcInnb" value="<c:out value="${resultMap.dlvyGroup.rtnlcInnb}"/>"/>
|
||||
<section class="content-section">
|
||||
<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">
|
||||
<input class="input-text md" type="text" title="배송그룹명" id="dlvyGroupNm" name="dlvyGroupNm" maxlength="50" value="<c:out value="${resultMap.dlvyGroup.dlvyGroupNm}"/>">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<div id="ConditionFreeDlvy" class="content-tab__content">
|
||||
</div>
|
||||
<div id="FreeDlvy" class="content-tab__content">
|
||||
</div>
|
||||
<div id="PayDlvy" class="content-tab__content">
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">반송지</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>주소</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="address-group">
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">우편번호</span>
|
||||
<input type="text" class="input-text xsm mr-2" value="<c:out value="${resultMap.dlvyGroup.rtnlcZip}"/>" title="반송지 우편번호" id="rtnlcZip" name="rtnlcZip">
|
||||
<button type="button" onclick="fn_select_postcode(fn_set_postcode); return false;" class="address-line__find-btn">주소찾기</button>
|
||||
</div>
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">주소</span>
|
||||
<input type="text" class="input-text lg" value="<c:out value="${resultMap.dlvyGroup.rtnlcAdres}"/>" title="반송지 주소" id="rtnlcAdres" name="rtnlcAdres">
|
||||
</div>
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">상세주소</span>
|
||||
<input type="text" class="input-text md" value="<c:out value="${resultMap.dlvyGroup.rtnlcDtlAdres}"/>" maxlength="35" title="반송지 상세주소" id="rtnlcDtlAdres" name="rtnlcDtlAdres">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>전화번호</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="phone-container">
|
||||
<input type="text" class="input-text m phone" value="<c:out value="${resultMap.dlvyGroup.rtnlcTelnb}"/>" title="전화번호" id="rtnlcTelnb" maxlength="13" name="rtnlcTelnb">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
</div>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div><br><br>
|
||||
</main>
|
||||
<form id="listForm" name="listForm" method="post" action="<c:url value="/mngr/setup/dlvygrp/dlvyGroupListR"/>">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="1"/>
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="10"/>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,196 @@
|
||||
<%@ 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 : dlvyGroupListR.jsp
|
||||
Description : 배송그룹 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-11-28 전일찬 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Include.jsp" %>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 배송 그룹 수정화면 이동
|
||||
******************************************************** */
|
||||
const fn_move_uptpage = function(value) {
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/setup/dlvygrp/dlvyGroupDtlU"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#dlvyGroupInnb').val(value);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 배송 그룹 등록화면 이동
|
||||
******************************************************** */
|
||||
const fn_move_regpage = function() {
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/setup/dlvygrp/dlvyGroupC"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 배송 그룹 목록조회
|
||||
******************************************************** */
|
||||
const fn_select_dlvygroup_list = function(pageIndex) {
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/setup/dlvygrp/dlvyGroupListR"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#pageIndex').val(pageIndex);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 배송 그룹 삭제
|
||||
******************************************************** */
|
||||
const fn_delete_dlvygroup = function(value) {
|
||||
if(confirm('배송 그룹을 <spring:message code="confirm.common.delete"/>')) {
|
||||
$('#dlvyGroupInnb').val(value);
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '<c:url value="/mngr/setup/dlvygrp/deleteDlvyGroup"/>',
|
||||
data : $('#listForm').serialize(),
|
||||
success : function(data) {
|
||||
var temp = data.resBody.result;
|
||||
var rm = JSON.parse(temp);
|
||||
if(rm.result == 'success') {
|
||||
alert('<spring:message code="success.common.delete"/>');
|
||||
fn_select_dlvygroup_list(1);
|
||||
}
|
||||
else if(rm.result == 'fail'){
|
||||
alert('<spring:message code="fail.common.delete"/>');
|
||||
return;
|
||||
}
|
||||
else if(rm.result == 'includeGoods'){
|
||||
alert('해당 배송그룹은 상품에서 사용하고 있어 삭제할 수 없습니다.');
|
||||
return;
|
||||
}
|
||||
else{
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<%-- 상단메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%-- 좌측메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
|
||||
<%@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(); return false;" onkeypress="this.onclick" class="btn primary">배송그룹 <spring:message code="button.insert"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<form id='listForm' name="listForm" method="post" action="<c:url value="/mngr/setup/dlvygrp/dlvyGroupListR"/>">
|
||||
<input type="hidden" id="dlvyGroupInnb" name="dlvyGroupInnb"/>
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.paginationInfo.currentPageNo }"/>"/>
|
||||
<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_select_dlvygroup_list('1');">
|
||||
<option value="10" <c:if test="${ resultMap.paginationInfo.recordCountPerPage eq 10}">selected="selected"</c:if>>10개씩</option>
|
||||
<option value="50" <c:if test="${ resultMap.paginationInfo.recordCountPerPage eq 50}">selected="selected"</c:if>>50개씩</option>
|
||||
<option value="100" <c:if test="${ resultMap.paginationInfo.recordCountPerPage eq 100}">selected="selected"</c:if>>100개씩</option>
|
||||
<option value="200" <c:if test="${ resultMap.paginationInfo.recordCountPerPage eq 200}">selected="selected"</c:if>>200개씩</option>
|
||||
</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: 16%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 12%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>제목</th>
|
||||
<th>등록일/수정일</th>
|
||||
<th>상태</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.dlvyGroupList }">
|
||||
<c:forEach items="${ resultMap.dlvyGroupList }" var="dlvyGroup" varStatus="status">
|
||||
<tr>
|
||||
<td><c:out value="${resultMap.paginationInfo.totalRecordCount - dlvyGroup.rnum + 1}" /></td>
|
||||
<td class="left"><c:out value="${dlvyGroup.dlvyGroupNm}"/></td>
|
||||
<td>
|
||||
<fmt:parseDate var="registDe" value="${dlvyGroup.registDt}" pattern="yyyy-MM-dd"/>
|
||||
<fmt:parseDate var="updtDe" value="${dlvyGroup.updtDt}" pattern="yyyy-MM-dd"/>
|
||||
<span><fmt:formatDate value="${registDe}" pattern="yyyy-MM-dd"/> / <fmt:formatDate value="${updtDe}" pattern="yyyy-MM-dd"/></span>
|
||||
</td>
|
||||
<td><c:if test="${ dlvyGroup.rnum eq resultMap.paginationInfo.totalRecordCount}">기본값</c:if></td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<button class="btn xsm primary outline" type="button" onclick="fn_move_uptpage('<c:out value="${dlvyGroup.dlvyGroupInnb}"/>'); return false;"><spring:message code="button.update"/></button>
|
||||
<c:if test="${ dlvyGroup.rnum ne resultMap.paginationInfo.totalRecordCount}">
|
||||
<button class="btn xsm dark" type="button" onclick="fn_delete_dlvygroup(<c:out value="${dlvyGroup.dlvyGroupInnb}"/>); return false;"><spring:message code="button.delete"/></button>
|
||||
</c:if>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="3"><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_dlvygroup_list"/>
|
||||
</div>
|
||||
<%-- 하단 스크롤 완료 시 위로가기 버튼 출력 : 2023-11-30 / 박철민 추가 --%>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
111
src/main/webapp/WEB-INF/views/mngr/setup/dlvygrp/FreeDlvy.jsp
Normal file
111
src/main/webapp/WEB-INF/views/mngr/setup/dlvygrp/FreeDlvy.jsp
Normal file
@@ -0,0 +1,111 @@
|
||||
<%@ 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="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%--
|
||||
Class Name : FreeDlvy.jsp
|
||||
Description : 무료배송 배송비 jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.01 전일찬 최초 생성
|
||||
--%>
|
||||
<script type="text/javascript">
|
||||
$( document ).ready(function() {
|
||||
/** 배송권역 셀렉트박스 컨트롤 */
|
||||
const dlvyAreaAditAt = document.querySelector('#dlvyAreaAditAt');
|
||||
const areaAditDlvyAmt = document.querySelector('#areaAditDlvyAmt');
|
||||
fn_change_dlvyArea(dlvyAreaAditAt, areaAditDlvyAmt);
|
||||
|
||||
if ($(".input-text.number").val() === '' || $(".input-text.number").val() == null) {
|
||||
$(".input-text.number").val('0');
|
||||
}
|
||||
|
||||
$(".input-text.number").on("focus", function () {
|
||||
if ($(this).val() === '0') {
|
||||
$(this).val('');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//왕복 여부 체크박스 컨트롤
|
||||
const returnDlvyApplcAt = document.querySelector('#returnDlvyApplcAt');
|
||||
const exchngDlvyAmt = document.querySelector('#exchngDlvyAmt');
|
||||
fn_check_BoxControl(returnDlvyApplcAt,exchngDlvyAmt);
|
||||
});
|
||||
</script>
|
||||
<input type="hidden" name="dlvyGroupDvCd" value="02"/>
|
||||
<section class="content-section">
|
||||
<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 rowspan="2">배송 권역</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select title="배송권역 사용여부" id="dlvyAreaAditAt" name="dlvyAreaAditAt">
|
||||
<option value="N" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt ne 'Y' }">selected="selected"</c:if>>사용안함</option>
|
||||
<option value="Y" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt eq 'Y' }">selected="selected"</c:if>>2권역</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="td-inner vertical">
|
||||
<div class="input-container">
|
||||
<span class="mr-10 fw-500">도서산간지역+제주지역 추가 배송비</span>
|
||||
<input type="text" class="input-text sm right number" id="areaAditDlvyAmt"
|
||||
name="areaAditDlvyAmt" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt ne 'Y' }">disabled="disabled"</c:if>
|
||||
value="<fmt:formatNumber value='${resultMap.dlvyGroup.areaAditDlvyAmt}' pattern="#,###" />"
|
||||
title="배송권역에 대한 추가 배송비" maxlength="13">
|
||||
<span class="input-unit-text mr-8">원</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">반품배송비</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="input-container">
|
||||
<span>편도 :
|
||||
<input type="text" class="input-text sm right number" value="<fmt:formatNumber value='${resultMap.dlvyGroup.returnDlvyAmt}' pattern="#,###" />" title="편도반품배송비" id="returnDlvyAmt" name="returnDlvyAmt" maxlength="13">
|
||||
원
|
||||
</span>
|
||||
</div>
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" id="returnDlvyApplcAt" name="returnDlvyApplcAt" value="Y" <c:if test="${ resultMap.dlvyGroup.returnDlvyApplcAt eq 'Y' }">checked="checked"</c:if>>
|
||||
<span style="margin-right: 5px;" class="check"></span>
|
||||
</label>
|
||||
<span class="control-label">왕복 여부</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="input-container">
|
||||
<span>왕복 :
|
||||
<input type="text" class="input-text sm right number" value="<fmt:formatNumber value='${resultMap.dlvyGroup.exchngDlvyAmt}' pattern="#,###" />" title="왕복반품배송비" id="exchngDlvyAmt" name="exchngDlvyAmt" maxlength="13" <c:if test="${resultMap.dlvyGroup.returnDlvyApplcAt ne 'Y'}"> disabled="disabled" </c:if> >
|
||||
원
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
123
src/main/webapp/WEB-INF/views/mngr/setup/dlvygrp/PayDlvy.jsp
Normal file
123
src/main/webapp/WEB-INF/views/mngr/setup/dlvygrp/PayDlvy.jsp
Normal file
@@ -0,0 +1,123 @@
|
||||
<%@ 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="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%--
|
||||
Class Name : PayDlvy.jsp
|
||||
Description : 유료배송 배송비 jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.01 전일찬 최초 생성
|
||||
--%>
|
||||
<script type="text/javascript">
|
||||
$( document ).ready(function() {
|
||||
/** 배송권역 셀렉트박스 컨트롤 */
|
||||
const dlvyAreaAditAt1 = document.querySelector('#dlvyAreaAditAt');
|
||||
const areaAditDlvyAmt1 = document.querySelector('#areaAditDlvyAmt');
|
||||
fn_change_dlvyArea(dlvyAreaAditAt1, areaAditDlvyAmt1);
|
||||
|
||||
if ($(".input-text.number").val() === '' || $(".input-text.number").val() == null) {
|
||||
$(".input-text.number").val('0');
|
||||
}
|
||||
|
||||
$(".input-text.number").on("focus", function () {
|
||||
if ($(this).val() === '0') {
|
||||
$(this).val('');
|
||||
}
|
||||
});
|
||||
|
||||
//왕복 여부 체크박스 컨트롤
|
||||
const returnDlvyApplcAt = document.querySelector('#returnDlvyApplcAt');
|
||||
const exchngDlvyAmt = document.querySelector('#exchngDlvyAmt');
|
||||
fn_check_BoxControl(returnDlvyApplcAt,exchngDlvyAmt);
|
||||
});
|
||||
</script>
|
||||
<input type="hidden" name="dlvyGroupDvCd" value="03"/>
|
||||
<section class="content-section">
|
||||
<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">
|
||||
<div class="input-container">
|
||||
<input type="text" class="input-text sm right number"
|
||||
value="<fmt:formatNumber value='${resultMap.dlvyGroup.dftDlvyAmt}' pattern="#,###" />"
|
||||
title="기본배송비" name="dftDlvyAmt" maxlength="10">
|
||||
<span class="input-unit-text">원</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">배송 권역</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select title="배송권역 사용여부" id="dlvyAreaAditAt" name="dlvyAreaAditAt">
|
||||
<option value="N" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt ne 'Y' }">selected="selected"</c:if>>사용안함</option>
|
||||
<option value="Y" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt eq 'Y' }">selected="selected"</c:if>>2권역</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="td-inner vertical">
|
||||
<div class="input-container">
|
||||
<span class="mr-10 fw-500">도서산간지역+제주지역 추가 배송비</span>
|
||||
<input type="text" class="input-text sm right number" id="areaAditDlvyAmt"
|
||||
name="areaAditDlvyAmt" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt ne 'Y' }">disabled="disabled"</c:if>
|
||||
value="<fmt:formatNumber value='${resultMap.dlvyGroup.areaAditDlvyAmt}' pattern="#,###" />"
|
||||
title="배송권역에 대한 추가 배송비" maxlength="13">
|
||||
<span class="input-unit-text mr-8">원</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">반품배송비</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="input-container">
|
||||
<span>편도 :
|
||||
<input type="text" class="input-text sm right number" value="<fmt:formatNumber value='${resultMap.dlvyGroup.returnDlvyAmt}' pattern="#,###" />" title="편도반품배송비" id="returnDlvyAmt" name="returnDlvyAmt" maxlength="13">
|
||||
원
|
||||
</span>
|
||||
</div>
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" id="returnDlvyApplcAt" name="returnDlvyApplcAt" value="Y" <c:if test="${ resultMap.dlvyGroup.returnDlvyApplcAt eq 'Y' }">checked="checked"</c:if>>
|
||||
<span style="margin-right: 5px;" class="check"></span>
|
||||
</label>
|
||||
<span class="control-label">왕복 여부</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="input-container">
|
||||
<span>왕복 :
|
||||
<input type="text" class="input-text sm right number" value="<fmt:formatNumber value='${resultMap.dlvyGroup.exchngDlvyAmt}' pattern="#,###" />" title="왕복반품배송비" id="exchngDlvyAmt" name="exchngDlvyAmt" maxlength="13" <c:if test="${resultMap.dlvyGroup.returnDlvyApplcAt ne 'Y'}"> disabled="disabled" </c:if> >
|
||||
원
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
116
src/main/webapp/WEB-INF/views/mngr/setup/mbr/GradBnefListR.jsp
Normal file
116
src/main/webapp/WEB-INF/views/mngr/setup/mbr/GradBnefListR.jsp
Normal file
@@ -0,0 +1,116 @@
|
||||
<%@ 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 : GradBnefListR.jsp
|
||||
Description : 등급별 혜택 목록 jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.26 김혜인 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<form>
|
||||
<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 title="페이지당 출력될 목록건수" name = "pageUnit" id ="pageUnit" onchange = "fn_select_gradBnefList(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: 15%;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 7%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>회원등급 명</th>
|
||||
<th>조건</th>
|
||||
<th>마일리지 혜택</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${not empty resultMap.resultList}">
|
||||
<c:forEach var="resultList" items="${resultMap.resultList}">
|
||||
<tr>
|
||||
<td><c:out value="${resultMap.paginationInfo.totalRecordCount - resultList.rnum+1 }" /></td>
|
||||
<td>
|
||||
<c:out value="${ resultList.mbrGradNm }" />
|
||||
</td>
|
||||
<fmt:formatNumber var="mbrGradAmt" value="${resultList.mbrGradAmt}" pattern="#,###.##"/>
|
||||
<td>
|
||||
<span>
|
||||
<c:out value="${resultList.mbrGradCndCdNm}"/>
|
||||
<c:if test = "${resultList.mbrGradCndCd ne '01'}">
|
||||
<fmt:formatNumber value="${resultList.mbrGradAmt}" pattern="#,###"/>원 이상
|
||||
</c:if>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span>
|
||||
<c:choose>
|
||||
<c:when test = "${empty resultList.mlgAccmlAmt}"><%--혜택 설정을 아직 안했을 때--%>
|
||||
혜택 설정 안함
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
총 결제금액의 <fmt:formatNumber value="${resultList.mlgAccmlAmt}" pattern="#,###"/><c:out value="${resultList.mlgAccmlUnitDvCdNm}"/> 추가 적립
|
||||
<c:if test = "${mlgAccmlUnitDv.cd eq '01' && not empty resultList.mlgMxmmAccmlAmt}">
|
||||
최대 <fmt:formatNumber value="${resultList.mlgMxmmAccmlAmt}" pattern="#,###"/> 마일리지 까지 적립
|
||||
</c:if>
|
||||
<c:if test="${not empty resultList.mlgValidMtCnt}">
|
||||
(유효기간:<c:out value="${resultList.mlgValidMtCnt}"/>개월)
|
||||
</c:if>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<button class="btn xsm primary outline" onclick = "fn_move_gradBnefDtl(<c:out value="${ resultList.mbrGradInnb }"/>)">상세</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="6"><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<div class="pagination__container mt-30">
|
||||
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_gradBnefList" />
|
||||
</div>
|
||||
</form>
|
||||
</html>
|
||||
376
src/main/webapp/WEB-INF/views/mngr/setup/mbr/GradBnefRegistU.jsp
Normal file
376
src/main/webapp/WEB-INF/views/mngr/setup/mbr/GradBnefRegistU.jsp
Normal file
@@ -0,0 +1,376 @@
|
||||
<%@ 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 : GradBnefRegistU.jsp
|
||||
Description : 등급별 혜택 수정 jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.27 김혜인 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Include.jsp" %>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
fn_showHide_html();
|
||||
// 셀렉트 박스 마일리지 지급 단위에 따른 제어 함수
|
||||
$("#mlgDv").on("change", function () {
|
||||
let mlgDvValue = $("#mlgDv option:selected").val();
|
||||
if (mlgDvValue === "02") {
|
||||
$('.mlgPercent').hide();
|
||||
$("#mlgAccmlAmt").attr("maxlength", "11");
|
||||
$("#mlgMxmmAccmlmnyAmt").prop("disabled", true);
|
||||
} else if (mlgDvValue === "01") {
|
||||
$(".mlgPercent").show();
|
||||
$("#mlgAccmlAmt").attr("maxlength", "2");
|
||||
$("#mlgMxmmAccmlmnyAmt").prop("disabled", false);
|
||||
if ($("#mlgMxmmAccmlmnyAmtChk").is(":checked")) {
|
||||
$("#mlgMxmmAccmlmnyAmt").prop("disabled", true);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// 마일리지 지급 설정 라디오버튼 제어 함수javascript 셀렉트 값 가져오기
|
||||
$('input[name="mlgPymnt"]').on("change", function () {
|
||||
let mlgPymntValue = $('input[name="mlgPymnt"]:checked').val();
|
||||
if (mlgPymntValue === "mlgPymntN") {
|
||||
$('.mlgPymnt').hide();
|
||||
$('.red-7').hide();
|
||||
} else if (mlgPymntValue === "mlgPymntY") {
|
||||
//마일리지 지급 설정 노출
|
||||
$('.mlgPymnt').show();
|
||||
$('.red-7').show();
|
||||
//마일리지 적립 금액 값 없을 시 0세팅
|
||||
if ($("#mlgAccmlAmt").val() === "") {
|
||||
$("#mlgAccmlAmt").val('0');
|
||||
}
|
||||
//금액 disabled 비활성
|
||||
$("#mlgAccmlAmt").prop("disabled", false);
|
||||
|
||||
//최대 적립마일리지
|
||||
if ($("#mlgMxmmAccmlmnyAmtChk").is(":checked")) {
|
||||
$("#mlgMxmmAccmlmnyAmt").prop("disabled", true);
|
||||
} else {
|
||||
$("#mlgMxmmAccmlmnyAmt").prop("disabled", false);
|
||||
}
|
||||
$("#mlgMxmmAccmlmnyAmtChk").prop("disabled", false);
|
||||
|
||||
if ($("#mlgDv option:selected").val() == '01') {
|
||||
$('.mlgPercent').show();
|
||||
$("#mlgAccmlAmt").attr("maxlength", "2");
|
||||
//if 비율이 ''일시 0으로 값 수정
|
||||
if (!$("#mlgMxmmAccmlmnyAmtChk").is(":checked")) {
|
||||
$("#mlgMxmmAccmlmnyAmt").prop("disabled", false);
|
||||
}
|
||||
} else if ($("#mlgDv option:selected").val() == '02') {
|
||||
//마일리지 금액 항목 노출
|
||||
$('.mlgPercent').hide();
|
||||
$("#mlgAccmlAmt").attr("maxlength", "11");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
//처음 페이지 이동 시 라디오 버튼 처리
|
||||
const fn_showHide_html = function () {
|
||||
|
||||
let mlgPymntValue = $("[name='mlgPymnt']:checked").val();
|
||||
let mlgDvValue = $("#mlgDv").val();
|
||||
//1. 지급
|
||||
if (mlgPymntValue === "mlgPymntY") {
|
||||
$("#mlgAccmlAmt").show();
|
||||
if (mlgDvValue === "01") {
|
||||
$(".mlgPercent").show();
|
||||
$("#mlgAccmlAmt").attr("maxlength", "2");
|
||||
if ($("#mlgAccmlAmt").val() != "" && $("#mlgMxmmAccmlmnyAmt") == "") {
|
||||
$("#mlgMxmmAccmlmnyAmtChk").prop("checked", true);
|
||||
}
|
||||
} else if (mlgDvValue === "02") {
|
||||
$('.mlgPercent').hide();
|
||||
$("#mlgAccmlAmt").attr("maxlength", "11");
|
||||
$("#mlgMxmmAccmlmnyAmt").prop("disabled", true);
|
||||
}
|
||||
|
||||
//2. 미지급
|
||||
} else if (mlgPymntValue === "mlgPymntN") {
|
||||
$('.mlgPymnt').hide();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 수정 ajax 처리
|
||||
*/
|
||||
const fn_save_gradBnefFrm = function () {
|
||||
if (confirm('<spring:message code="confirm.common.save"/>')) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<c:url value="/mngr/setup/mbr/updateGradBnefUpdt"/>',
|
||||
data: $('#gradBnefFrm').serialize(),
|
||||
success: function (resultData) {
|
||||
alert("<spring:message code="success.common.save"/>");
|
||||
fn_move_gradBnefDtl();
|
||||
$("#pageIndex").val(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//수정 후 재 조회
|
||||
const fn_move_gradBnefDtl = function () {
|
||||
//form 여부 체크
|
||||
if ($('#hiddenDtlForm') != null) {
|
||||
$('#hiddenDtlForm').remove();
|
||||
}
|
||||
//form input 형성
|
||||
const hiddenDtlForm = document.createElement('form');
|
||||
hiddenDtlForm.name = 'hiddenDtlForm';
|
||||
hiddenDtlForm.id = 'hiddenDtlForm';
|
||||
hiddenDtlForm.method = 'post';
|
||||
hiddenDtlForm.action = '/mngr/setup/mbr/selectGradBnefRegistInqire';
|
||||
//memberInnb input 형성
|
||||
let input = document.createElement('input');
|
||||
input.setAttribute("type", "hidden");
|
||||
input.setAttribute("name", "mbrGradInnb");
|
||||
input.setAttribute("value", $("#mbrGradInnb").val());
|
||||
hiddenDtlForm.appendChild(input);
|
||||
//pageIndex input 형성
|
||||
input = document.createElement('input');
|
||||
input.setAttribute("type", "hidden");
|
||||
input.setAttribute("name", "pageIndex");
|
||||
input.setAttribute("value", 1);
|
||||
hiddenDtlForm.appendChild(input);
|
||||
//pageUnit input 형성
|
||||
input = document.createElement('input');
|
||||
input.setAttribute("type", "hidden");
|
||||
input.setAttribute("name", "pageUnit");
|
||||
input.setAttribute("value", $("#pageUnit").val());
|
||||
hiddenDtlForm.appendChild(input);
|
||||
//searchGradNm input 형성
|
||||
if ($("#searchGradNm").val() != undefined) {
|
||||
input = document.createElement('input');
|
||||
input.setAttribute("type", "hidden");
|
||||
input.setAttribute("name", "searchGradNm");
|
||||
input.setAttribute("value", $("#searchGradNm").val());
|
||||
hiddenDtlForm.appendChild(input);
|
||||
}
|
||||
//<body>에 form 추가
|
||||
document.body.appendChild(hiddenDtlForm);
|
||||
//hiddenFform submit();
|
||||
$('#hiddenDtlForm').submit();
|
||||
}
|
||||
/*******************
|
||||
목록 조회
|
||||
************************/
|
||||
const fn_move_gradBnefList = function (pageIndex) {
|
||||
$('#gradBnefFrm').prop('action', '<c:url value="/mngr/setup/mbr/selectMbrGradSrchForm"/>');
|
||||
$('#gradBnefFrm').prop('method', 'post');
|
||||
$('#gradBnefFrm').submit();
|
||||
}
|
||||
/**************************************************************
|
||||
마일리지 설정안함 체크 시 input 제어
|
||||
****************************************************************/
|
||||
const fn_ctr_input = function (obj, tgtSelector) {
|
||||
if ($(obj).prop('checked')) {
|
||||
if ($(tgtSelector).eq(0)) {
|
||||
$(tgtSelector).eq(0).prop('disabled', true);
|
||||
}
|
||||
} else {
|
||||
if ($(tgtSelector).eq(0)) {
|
||||
$(tgtSelector).eq(0).prop('disabled', false);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<%-- 상단메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
<%@include file="/WEB-INF/views/comm/mngr/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%-- 좌측메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
<%@include file="/WEB-INF/views/comm/mngr/Left.jsp" %>
|
||||
<div class="content">
|
||||
<c:set var = "gradDtl" value = "${resultMap.gradDtl.gradDtl}"/>
|
||||
<c:set var = "accmlUnitDv" value = "${resultMap.gradDtl.accmlUnitDv}"/>
|
||||
<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 type="button" onclick="fn_move_gradBnefList()" class="btn outline"><spring:message
|
||||
code="button.list"/></button>
|
||||
<button type="button" onclick="fn_save_gradBnefFrm()" class="btn primary"><spring:message
|
||||
code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<form id="gradBnefFrm">
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">혜택 설정</h3>
|
||||
<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>
|
||||
<div class="td-inner">
|
||||
<span><c:out value="${gradDtl.mbrGradNm}"/></span>
|
||||
<input type="hidden"
|
||||
value="<c:out value = "${gradDtl.mbrGradInnb}"/>"
|
||||
name="mbrGradInnb" id="mbrGradInnb">
|
||||
</div>
|
||||
</td>
|
||||
<th>조건구매금액</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<span>
|
||||
<c:choose>
|
||||
<c:when test = "${gradDtl.mbrGradCndCd eq '01'}">
|
||||
조건 없음
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<fmt:formatNumber value="${gradDtl.mbrGradAmt}" pattern="#,###.##"/>원 이상
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>마일리지</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner vertical">
|
||||
<div class="table-wrapper" style="width: 800px;">
|
||||
<table class="table">
|
||||
<caption>마일리지 지급 설정</caption>
|
||||
<colgroup>
|
||||
<col style="width: 20%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>지급 설정<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner vertical">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="mlgPymntY" name="mlgPymnt"
|
||||
value="mlgPymntY"
|
||||
onclick="fn_ctrl_disable('',['.enable']);"
|
||||
<c:if test="${not empty gradDtl.mlgAccmlAmt}">
|
||||
checked="checked"
|
||||
</c:if>>
|
||||
<label for="mlgPymntY">지급</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="mlgPymntN" name="mlgPymnt"
|
||||
value="mlgPymntN"
|
||||
onclick="fn_ctrl_disable(['.disableMlgPymnt']);"
|
||||
<c:if test="${empty gradDtl.mlgAccmlAmt}">
|
||||
checked="checked"
|
||||
</c:if>>
|
||||
<label for="mlgPymntN">미지급</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mlgPymnt">
|
||||
<div class="input-container disableMlgPymnt ">
|
||||
<span class="mr-5">구매시</span>
|
||||
<span class="mr-5 mlgPercent">총 상품 결제금액의</span>
|
||||
<span class="mr-5">
|
||||
<fmt:formatNumber var="mlgAccmlAmt"
|
||||
value="${gradDtl.mlgAccmlAmt}"
|
||||
pattern="#,###.##"/>
|
||||
<input type="text"
|
||||
class="input-text sm number right mr-5"
|
||||
title="마일리지 적립 금액"
|
||||
id="mlgAccmlAmt"
|
||||
name="mlgAccmlAmt"
|
||||
value="<c:out value = '${mlgAccmlAmt}'/>">
|
||||
</span>
|
||||
<div class="select-box mr-10 enable">
|
||||
<select id="mlgDv" name="mlgAccmlUnitDvCd"
|
||||
class="short" title="마일리지 단위 선택">
|
||||
<c:forEach var="accmlUnitDv" items="${accmlUnitDv}">
|
||||
<option value="${accmlUnitDv.cd}" <c:if test="${accmlUnitDv.cd eq gradDtl.mlgAccmlUnitDvCd}">selected="selected"</c:if>>
|
||||
${accmlUnitDv.cdNm}
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<span class="mr-5">
|
||||
적립
|
||||
</span>
|
||||
</div>
|
||||
<div class="input-container mr-5 mlgPymnt mlgPercent disableMlgPymnt">
|
||||
<span class="mr-5">최대</span>
|
||||
<c:choose>
|
||||
<c:when test="${not empty gradDtl.mlgMxmmAccmlAmt && gradDtl.mlgMxmmAccmlAmt ne '0'}">
|
||||
<fmt:formatNumber var="mlgMxmmAccmlAmt" value="${gradDtl.mlgMxmmAccmlAmt}" pattern="#,###.##"/>
|
||||
<input class="input-text sm number right mr-5"
|
||||
type="text" title="최대 마일리지 적립금액"
|
||||
id="mlgMxmmAccmlmnyAmt"
|
||||
name="mlgMxmmAccmlAmt" maxlength="12"
|
||||
value="<c:out value = '${mlgMxmmAccmlAmt}'/>">
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<input class="input-text sm number right mr-5"
|
||||
type="text" title="최대 마일리지 적립금액"
|
||||
id="mlgMxmmAccmlmnyAmt"
|
||||
name="mlgMxmmAccmlAmt" maxlength="12"
|
||||
value="0" disabled>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<span class="mr-5">마일리지 까지 적립</span>
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" value="Y"
|
||||
name="mlgMxmmAccmlmnyAmtChk"
|
||||
id="mlgMxmmAccmlmnyAmtChk"
|
||||
onclick="fn_ctr_input(this,mlgMxmmAccmlmnyAmt)"
|
||||
<c:if test="${gradDtl.mlgMxmmAccmlAmt eq null && gradDtl.mlgAccmlUnitDvCd eq '01'}">
|
||||
checked="checked" </c:if>>
|
||||
<span class="check"></span>
|
||||
<span class="control-label">설정 안함</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<p class="red-7">*회원 등급 마일리지 유효기간은 주문 설정의 마일리지 유효기간을 따라갑니다.</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--검색 조건 , 페이징 조건 -->
|
||||
<input type="hidden" id="searchGradNm" name="searchGradNm" title="검색_회원등급명" value="${resultMap.vo.searchGradNm}">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="${resultMap.vo.pageIndex}"/>
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="${resultMap.vo.pageUnit}"/>
|
||||
</section>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
136
src/main/webapp/WEB-INF/views/mngr/setup/mbr/GradBnefSrchR.jsp
Normal file
136
src/main/webapp/WEB-INF/views/mngr/setup/mbr/GradBnefSrchR.jsp
Normal file
@@ -0,0 +1,136 @@
|
||||
<%@ 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 : GradBnefSrch.jsp
|
||||
Description : 등급별 혜택 검색 폼 jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2024.01.10 김혜인 최초 생성
|
||||
--%>
|
||||
<!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_gradBnefList(pageIndex,pageUnit);
|
||||
});
|
||||
/**************************************
|
||||
등급 혜택 목록 조회
|
||||
****************************************/
|
||||
const fn_select_gradBnefList = 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;
|
||||
}
|
||||
}
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '/mngr/setup/mbr/selectMbrGradListInqire',
|
||||
data: dataStr,
|
||||
success: function (data) {
|
||||
$('#pageDiv').html(data);
|
||||
$('#pageUnit').niceSelect();
|
||||
}
|
||||
});
|
||||
}
|
||||
/**************************************
|
||||
|
||||
****************************************/
|
||||
document.addEventListener('keydown', function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
fn_select_gradBnefList(1);
|
||||
};
|
||||
}, true);
|
||||
/**************************************
|
||||
등급별 상세 조회 이동
|
||||
****************************************/
|
||||
const fn_move_gradBnefDtl = function(mbrGradInnb){
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/setup/mbr/selectGradBnefRegistInqire"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#mbrGradInnb').val(mbrGradInnb);
|
||||
$('#listForm').submit();
|
||||
};
|
||||
history.replaceState({}, null, location.pathname);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<%-- 상단메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%-- 좌측메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
<%@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>
|
||||
<form id='listForm' name="listForm" method="post" >
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="${ resultMap.paramVO.pageIndex}"/>
|
||||
<input type="hidden" id="mbrGradInnb" name="mbrGradInnb"/>
|
||||
<section class="content-section" id = "gradBnefSrchSectn" >
|
||||
<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 = "searchGradNm" name = "searchGradNm"
|
||||
title="회원 등급 명 검색 키워드" value = "<c:out value = '${resultMap.paramVO.searchGradNm}'/>">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container">
|
||||
<div class="left"></div>
|
||||
<div class="center">
|
||||
<button type = "button" class="btn outline" onclick = "fn_reset_form('gradBnefSrchSectn')">초기화</button>
|
||||
<button type = "button" class="btn primary" onclick = "fn_select_gradBnefList(1); return false;">검색</button>
|
||||
</div>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
</section>
|
||||
<div id = "pageDiv">
|
||||
</div>
|
||||
</form>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
357
src/main/webapp/WEB-INF/views/mngr/setup/mngr/MngrInfoDtlU.jsp
Normal file
357
src/main/webapp/WEB-INF/views/mngr/setup/mngr/MngrInfoDtlU.jsp
Normal file
@@ -0,0 +1,357 @@
|
||||
<%@ 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"%>
|
||||
<%--
|
||||
Class Name : GradBnefSrch.jsp
|
||||
Description : 등급별 혜택 검색 폼 jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2024.01.10 김혜인 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%@include file="/WEB-INF/views/comm/mngr/Include.jsp" %>
|
||||
<title>GC ONE 관리자</title>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
//검색폼 데이트피커 제어
|
||||
fn_set_dateRange_function("#dateRange", "juscrbStrtDt", "juscrbEndDt", "juscrbStrtDt");
|
||||
|
||||
//번호 포매팅
|
||||
$("#mbtlnb").val(fn_format_mbtlnb($("#mbtlnb").val()));
|
||||
$("#telnb").val(fn_format_mbtlnb($("#telnb").val()));
|
||||
|
||||
//이메일 셀렉트박스 값 set
|
||||
$('[name=emailAderss]').change(function () {
|
||||
let selectedEmail = $("#emailAderss option:selected").val();
|
||||
if(selectedEmail !== '99'){
|
||||
selectedEmail = $("#emailAderss option:selected").text().trim();
|
||||
}else{//직접입력
|
||||
selectedEmail = '';
|
||||
}
|
||||
$('#email2').val(selectedEmail);
|
||||
});
|
||||
|
||||
$('input').keydown(function (event) {
|
||||
if (event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
$('#pwChngAt').on("click",function (){
|
||||
if($(this).is(":checked")){
|
||||
$("#pwDiv").show();
|
||||
fn_ctrl_disable('',["#pwDiv"]);
|
||||
}else{
|
||||
$("#pwDiv").hide();
|
||||
fn_ctrl_disable(["#pwDiv"]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 업무사용자 수정
|
||||
******************************************************** */
|
||||
const fn_update = function () {
|
||||
|
||||
if (!confirm('업무사용자를 <spring:message code="confirm.common.update"/>')) return;
|
||||
|
||||
fn_make_eamil();
|
||||
|
||||
let data = $('#jobuserUpdateForm').serialize();
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<c:url value="/mngr/setup/mngr/updateMngrInfoUpdt"/>',
|
||||
data: data,
|
||||
success: function (result) {
|
||||
alert('<spring:message code="success.common.update"/>');
|
||||
/*비밀번호 변경 시*/
|
||||
let chngePwAt = JSON.parse(result.resBody.result);
|
||||
|
||||
chngePwAt = chngePwAt.chngePwAt;
|
||||
|
||||
if (chngePwAt === 'Y') {
|
||||
location.href = "/logout";
|
||||
} else {
|
||||
location.href = "/mngr/setup/mngr/selectMngrInfoInqireForm";
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/* ********************************************************
|
||||
* 접속이력 검색
|
||||
******************************************************** */
|
||||
const fn_select_history = function (_pageIndex) {
|
||||
|
||||
$('#title').text('접속이력 조회');
|
||||
$('#subTitle').text('접속일자');
|
||||
|
||||
let mngrInnb = $('#mngrInnb').val();
|
||||
let srchStartDate = $('#juscrbStrtDt').val();
|
||||
let srchEndDate = $('#juscrbEndDt').val();
|
||||
let params = {
|
||||
'mngrInnb': mngrInnb,
|
||||
'srchStartDate': srchStartDate,
|
||||
'srchEndDate': srchEndDate,
|
||||
'pageIndex': _pageIndex,
|
||||
'pageUnit': '5'
|
||||
};
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<c:url value="/admin/use/mngr/selectJobUserConnHistListInqirePopup"/>',
|
||||
data: params,
|
||||
success: function (result) {
|
||||
$('#jobUserList').html('');
|
||||
$('#jobUserList').html(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
/* ********************************************************
|
||||
* email 합치기
|
||||
******************************************************** */
|
||||
const fn_make_eamil = function () {
|
||||
|
||||
let domain = $('[name=email2]').val();
|
||||
let id = $('[name=email1]').val();
|
||||
$('[name=email]').val(id + '@' + domain);
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 검색조건 > 날짜 전체 클릭 시 날짜 설정 초기화
|
||||
******************************************************** */
|
||||
const fn_reset_date = function (strtDate, endDate) {
|
||||
$('#' + strtDate).datepicker().datepicker("setDate", '');
|
||||
$('#' + endDate).datepicker().datepicker("setDate", '');
|
||||
}
|
||||
|
||||
</script>
|
||||
<body>
|
||||
<%@include file="/WEB-INF/views/comm/mngr/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%-- 좌측메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
<%@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 type="button" class="btn primary" onclick="fn_update();"><spring:message
|
||||
code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<form id="jobuserUpdateForm" class="common-form">
|
||||
<input type="hidden" name="email" value=""/>
|
||||
<input type="hidden" name="mngrInnb" id="mngrInnb" value="${resultMap.detail[0].mngrInnb}"/>
|
||||
<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>사용자 명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text md" type="text" id="mngrNm" name="mngrNm" title="사용자명"
|
||||
value="${ resultMap.detail[0].mngrNm }" maxlength="20">
|
||||
</div>
|
||||
</td>
|
||||
<th>아이디</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${ resultMap.detail[0].mngrId }"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>부서명</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${ resultMap.detail[0].partnm }"/>
|
||||
</div>
|
||||
</td>
|
||||
<th>이메일<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text sm" type="text" id="email1" name="email1" title="이메일1"
|
||||
value="${ resultMap.detail[0].email1 }" maxlength="20">
|
||||
<span>@</span>
|
||||
<input class="input-text sm" type="text" id="email2" name="email2" title="이메일2"
|
||||
value="${ resultMap.detail[0].email2 }" maxlength="20">
|
||||
<div class="select-box" id="emailAderssDv">
|
||||
<div class="select-box">
|
||||
<select id="emailAderss" name="emailAderss">
|
||||
<c:forEach var="email" items="${resultMap.emailCdList}">
|
||||
<option value="<c:out value="${email.cd}"/>" ${f:setSelected(email.cd, '99')}>
|
||||
<c:out value="${email.cdNm}"/>
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>전화번호</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text md" type="text" id="telnb" name="telnb" title="전화번호"
|
||||
oninput="fn_set_event(this, 'keyup', fn_fmt_telno)"
|
||||
placeholder="'-'없이 입력"
|
||||
value="<c:out value="${resultMap.detail[0].telnb}"/>" maxlength="12">
|
||||
</div>
|
||||
</td>
|
||||
<th>휴대전화번호<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text md" type="text" id="mbtlnb" name="mbtlnb"
|
||||
title="휴대전화번호" oninput="fn_set_event(this, 'keyup', fn_fmt_telno)"
|
||||
placeholder="'-'없이 입력"
|
||||
value="<c:out value="${resultMap.detail[0].mbtlnb}"/>" maxlength="13">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비밀번호
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" value="Y" name="pwChngAt" id="pwChngAt">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">변경</span>
|
||||
</label>
|
||||
</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner" id="pwDiv" style="display: none">
|
||||
<div class="address-group">
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">현재 비밀번호  </span>
|
||||
<input type="password" id="recentPw" class="input-text md" value=""
|
||||
title="현재 비밀번호" name="password" disabled>
|
||||
</div>
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">비밀번호 변경  </span>
|
||||
<input type="password" id="chngPw" class="input-text md" value=""
|
||||
title="비밀번호 변경" name="chngPw" disabled>
|
||||
<span class="gray-6"> * 10-20자, 영문 대소문자 또는 숫자, 특수문자 중 2가지 이상 조합</span>
|
||||
</div>
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">비밀번호 변경 확인</span>
|
||||
<input type="password" id="cnfirmChngPw" class="input-text md" value=""
|
||||
title="비밀번호 변경 확인" name="cnfirmChngPw" disabled>
|
||||
<span class="gray-6"> * 사용 가능 특수문자 : ! # $ % & ( ) * + - / : < = > ? @ [ \ ] ^ _ { | } ~</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>관리자 구분</th>
|
||||
<td>
|
||||
<div class="custom-radio-container" id="userDv">
|
||||
<c:forEach var="mngrDv" items="${resultMap.mngrDvCdList}">
|
||||
<c:if test = "${mngrDv.cd eq resultMap.detail[0].mngrDv}"><c:out value="${mngrDv.cdNm}"/></c:if>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>최종접속일시</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${resultMap.detail[0].lastConectDt }"/>
|
||||
<a href="#jobUser-modal" rel="modal:open" class="btn xsm gray ml-5"
|
||||
onclick="fn_select_history('1'); fn_reset_form('srchFormTb');">
|
||||
<spring:message code="button.connectionHistory"/>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!-- 접속이력조회 모달 -->
|
||||
<div id="jobUser-modal" class="modal" style="max-width: 900px; ">
|
||||
<div class="modal-header">
|
||||
<h4 id="title"></h4>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<form>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>검색창</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody id="his">
|
||||
<tr>
|
||||
<th id="subTitle"></th>
|
||||
<td colspan="3" id="srchFormTb">
|
||||
<div class="td-inner">
|
||||
<div class="input-container">
|
||||
<%-- 검색 종료일 현재 날짜 --%>
|
||||
<c:set var="today" value="<%=new java.util.Date()%>"/>
|
||||
<!-- 검색 조건 시작일 -->
|
||||
<input type="text" name="srchStartDate" id="juscrbStrtDt" class="datepicker"
|
||||
title="시작 날짜 선택" autocomplete="off" onchange="fn_check_date('juscrb')"/>
|
||||
<span class="tilde">~</span>
|
||||
<!-- 검색 조건 종료일 -->
|
||||
<input type="text" name="srchEndDate" id="juscrbEndDt" class="datepicker"
|
||||
title="종료 날짜 선택" autocomplete="off" onchange="fn_check_date('juscrb')"/>
|
||||
</div>
|
||||
<div class="dateRange-btnContainer" id="dateRange">
|
||||
<button class="dateRange-btn">어제</button>
|
||||
<button class="dateRange-btn">오늘</button>
|
||||
<button class="dateRange-btn">3일간</button>
|
||||
<button class="dateRange-btn">일주일</button>
|
||||
<button class="dateRange-btn">1개월</button>
|
||||
<button class="dateRange-btn">3개월</button>
|
||||
<button class="dateRange-btn">6개월</button>
|
||||
<button class="dateRange-btn">1년</button>
|
||||
<button class="dateRange-btn selected">전체</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container">
|
||||
<div class="left"></div>
|
||||
<div class="center">
|
||||
<button type="button" class="btn outline" onclick="fn_reset_form('srchFormTb');"><spring:message
|
||||
code="button.init"/></button>
|
||||
<button type="button" class="btn primary" id="btn_search" onclick="fn_select_history('1');"><spring:message
|
||||
code="button.search"/></button>
|
||||
</div>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
<div id="jobUserList"></div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline" onclick="">닫기</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
488
src/main/webapp/WEB-INF/views/mngr/setup/nbkk/NbkkSetupListR.jsp
Normal file
488
src/main/webapp/WEB-INF/views/mngr/setup/nbkk/NbkkSetupListR.jsp
Normal file
@@ -0,0 +1,488 @@
|
||||
<%@ 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" %>
|
||||
<%--
|
||||
Class Name : MbrDlvylcListInqireR.jsp
|
||||
Description : 자주쓰는 배송지틀
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.11.28 김혜인 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%@include file="/WEB-INF/views/comm/mngr/Include.jsp" %>
|
||||
|
||||
<script type="text/javascript">
|
||||
// html이 로딩 될 때 정규표현식, tr 삭제 이벤트 삭제 시 tr 체크
|
||||
$(document).ready(function () {
|
||||
//계좌번호 정규표현식
|
||||
fn_set_event('.acntnb', 'keyup', fn_fmt_accuntno);
|
||||
});
|
||||
|
||||
//무통장 입금 수단 삭제시 버튼 disabled
|
||||
const fn_delete_nbkkListDel = function (tbNm) {
|
||||
let target = event.target;
|
||||
let trCnt = $('#' + tbNm + '>tbody tr').length
|
||||
if (trCnt == 1) {
|
||||
target.disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
//input 생성 함수
|
||||
const fn_create_input = function (type, name, value, tgtForm) {
|
||||
const input = document.createElement('input');
|
||||
input.setAttribute("type", type);
|
||||
input.setAttribute("name", name);
|
||||
input.setAttribute("value", value);
|
||||
tgtForm.appendChild(input);
|
||||
}
|
||||
|
||||
/*무통장 설정 저장 form 형성*/
|
||||
const fn_save_nbkkSetup = function () {
|
||||
if (confirm('무통장 설정을 <spring:message code="confirm.common.save"/>')) {
|
||||
if ($('#hiddenForm') != null) {
|
||||
$('#hiddenForm').remove();
|
||||
}
|
||||
|
||||
const hiddenForm = document.createElement('form');
|
||||
hiddenForm.name = 'hiddenForm';
|
||||
hiddenForm.id = 'hiddenForm';
|
||||
hiddenForm.method = 'post';
|
||||
hiddenForm.action = '';
|
||||
hiddenForm.target = '_blank';
|
||||
|
||||
//무통장 입금 수단
|
||||
$('.nbkkInfo').each(function (idx) {
|
||||
fn_create_input('hidden', "nbkkInfo[" + idx + "].acntDvCd", $('[name=acntDvCd]').eq(idx).val(), hiddenForm);
|
||||
fn_create_input('hidden', "nbkkInfo[" + idx + "].acntDtlDvCd", $('[name=acntDtlDvCd]').eq(idx).val(), hiddenForm);
|
||||
fn_create_input('hidden', "nbkkInfo[" + idx + "].bankCd", $('[name=bankCd]').eq(idx).val(), hiddenForm);
|
||||
fn_create_input('hidden', "nbkkInfo[" + idx + "].dpstrNm", $('[name=dpstrNm]').eq(idx).val(), hiddenForm);
|
||||
fn_create_input('hidden', "nbkkInfo[" + idx + "].acntnb", $('[name=acntnb]').eq(idx).val(), hiddenForm);
|
||||
fn_create_input('hidden', "nbkkInfo[" + idx + "].useAt", $('[name=useAt]').eq(idx).val(), hiddenForm);
|
||||
});
|
||||
//<body>에 form 추가
|
||||
document.body.appendChild(hiddenForm);
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<c:url value="/mngr/setup/nbkk/updateNbkkSetup"/>',
|
||||
data: $("#hiddenForm").serialize(),
|
||||
success: function (resultData) {
|
||||
alert("<spring:message code="success.common.save"/>");
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// tr 추가 기능
|
||||
const fn_add_List = function (standardTb) {
|
||||
$('#' + standardTb + ' > tbody').append('<tr class="nbkkInfo">' + $('#' + standardTb + ' > tbody').find('tr').eq(0).html() + '</tr>');
|
||||
//요소 값 초기화
|
||||
$('#' + standardTb + ' > tbody > tr:last').find('input,select').each(function () {
|
||||
let type = this.type;
|
||||
let tag = this.tagName.toLowerCase();
|
||||
if (type === 'text') {
|
||||
if (type === 'text' || tag === 'textarea') {
|
||||
this.value = '';
|
||||
}
|
||||
} else if (tag === 'select') {
|
||||
this.selectedIndex = 0;//20240223수정
|
||||
$(".select-box > select").niceSelect('update');
|
||||
}
|
||||
});
|
||||
//추가 항목 계좌번호 정규표현식
|
||||
fn_set_event('.acntnb', 'keyup', fn_fmt_accuntno);
|
||||
//tr 요소가 1개 남아 있을 대 button 기능 활성화 시키기
|
||||
$('.nbkkListDel').each(function () {
|
||||
this.disabled = false;
|
||||
});
|
||||
$('#' + standardTb).tableDnDUpdate();
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<%-- 상단메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
<%@include file="/WEB-INF/views/comm/mngr/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%-- 좌측메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
<%@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 type="button" class="btn primary" onclick="fn_save_nbkkSetup(); return false;">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section content-fold">
|
||||
<div class="content-fold__header">
|
||||
<h3 class="content-section__title">무통장 입금 수단</h3>
|
||||
<button type="button" class="circle-btn add" id="addNbkkList"
|
||||
onclick="fn_add_List('nbkkListTb')"><span
|
||||
class="visually-hidden">추가</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="content-fold__content">
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical draggable" id="nbkkListTb">
|
||||
<caption>무통장 입금 수단 설정</caption>
|
||||
<colgroup>
|
||||
<col style="width: 6%;">
|
||||
<col style="width: 8%;">
|
||||
<col style="width: 8%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 8%;">
|
||||
<col style="width: auto;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>순서</th>
|
||||
<th>구분</th>
|
||||
<th>은행</th>
|
||||
<th>예금주<span class="red-7">*</span></th>
|
||||
<th>계좌번호<span class="red-7">*</span></th>
|
||||
<th>사용여부</th>
|
||||
<th>삭제</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${not empty resultMap.nbkkList.acntSetup}">
|
||||
<c:forEach var="nbkkList" items="${resultMap.nbkkList.acntSetup}">
|
||||
<tr class ="nbkkInfo">
|
||||
<input type = "hidden" value="01" name = "acntDvCd"/>
|
||||
<%-- 순서 바꾸기 --%>
|
||||
<td>
|
||||
<div class="draggable-icon-container">
|
||||
<i class="icon icon_draggable"></i>
|
||||
<span class="visually-hidden">순서 바꾸기</span>
|
||||
</div>
|
||||
</td>
|
||||
<%-- 구분 셀렉트 --%>
|
||||
<td class="center">
|
||||
<div class="select-box">
|
||||
<select title="무통장 구분" name="acntDtlDvCd">
|
||||
<c:forEach var="acntDtlDv"
|
||||
items="${resultMap.nbkkList.acntDtlDv}">
|
||||
<option value="<c:out value='${acntDtlDv.cd}'/>"
|
||||
<c:if test="${acntDtlDv.cd eq nbkkList.acntDtlDvCd}">selected="selected"</c:if>>
|
||||
<c:out value="${acntDtlDv.cdNm}"/>
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<%-- 은행 셀렉트 --%>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select title="은행 이름" name="bankCd" class="nbkkBankNm">
|
||||
<c:forEach var="bankCd"
|
||||
items="${resultMap.nbkkList.bankCdList}">
|
||||
<option value="<c:out value='${bankCd.cd}'/>"
|
||||
<c:if test="${bankCd.cd eq nbkkList.bankCd}">selected="selected"</c:if>>
|
||||
<c:out value="${bankCd.cdNm}"/>
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<%-- 예금주 --%>
|
||||
<td>
|
||||
<input class="input-text full" type="text"
|
||||
title="예금주 이름" placeholder="예금주" name="dpstrNm"
|
||||
value="<c:out value='${nbkkList.dpstrNm}'/>"
|
||||
maxLength="40">
|
||||
</td>
|
||||
<%-- 계좌번호 --%>
|
||||
<td>
|
||||
<input class="input-text full acntnb" type="text"
|
||||
title="무통장 계좌번호" placeholder="계좌번호('-'포함하여 입력)"
|
||||
name="acntnb"
|
||||
value="<c:out value='${nbkkList.acntnb}'/>"
|
||||
maxLength="40">
|
||||
</td>
|
||||
<%-- 사용여부 셀렉트 --%>
|
||||
<td>
|
||||
<div class="select-box ">
|
||||
<select title="무통장 사용 여부" name="useAt"
|
||||
class="nbkkUseAt">
|
||||
<option value="Y"
|
||||
<c:if test="${nbkkList.useAt eq 'Y'}">selected="selected"</c:if> >
|
||||
사용
|
||||
</option>
|
||||
<option value="N"
|
||||
<c:if test="${nbkkList.useAt eq 'N'}">selected="selected"</c:if> >
|
||||
미사용
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<%-- 삭제 버튼 --%>
|
||||
<td>
|
||||
<button class="circle-btn delete nbkkListDel"
|
||||
onclick="fn_delete_nbkkListDel('nbkkListTb')"><span
|
||||
class="visually-hidden">삭제</span></button>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr class ="nbkkInfo">
|
||||
<input type = "hidden" value="01" name = "acntDvCd"/>
|
||||
<%-- 순서 바꾸기 --%>
|
||||
<td>
|
||||
<div class="draggable-icon-container">
|
||||
<i class="icon icon_draggable"></i>
|
||||
<span class="visually-hidden">순서 바꾸기</span>
|
||||
</div>
|
||||
</td>
|
||||
<%-- 구분 셀렉트 --%>
|
||||
<td class="center">
|
||||
<div class="select-box">
|
||||
<select title="무통장 구분" name="acntDtlDvCd">
|
||||
<c:forEach var="acntDtlDv" items="${resultMap.nbkkList.acntDtlDv}">
|
||||
<option value="<c:out value='${acntDtlDv.cd}'/>">
|
||||
<c:out value="${acntDtlDv.cdNm}"/>
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<%-- 은행 셀렉트 --%>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select title="은행 이름" name="bankCd">
|
||||
<c:forEach var="bankCd" items="${resultMap.nbkkList.bankCdList}">
|
||||
<option value="<c:out value='${bankCd.cd}'/>">
|
||||
<c:out value="${bankCd.cdNm}"/>
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<%-- 예금주 --%>
|
||||
<td>
|
||||
<input class="input-text full" type="text"
|
||||
title="예금주 이름" placeholder="예금주" name="dpstrNm"
|
||||
maxLength="40">
|
||||
</td>
|
||||
<%-- 계좌번호 --%>
|
||||
<td>
|
||||
<input class="input-text full acntnb" type="text"
|
||||
title="무통장 계좌번호" placeholder="계좌번호('-'포함하여 입력)"
|
||||
name="acntnb" maxLength="40">
|
||||
</td>
|
||||
<%-- 사용여부 셀렉트 --%>
|
||||
<td>
|
||||
<div class="select-box ">
|
||||
<select title="무통장 사용 여부" name="useAt">
|
||||
<option value="Y" selected>사용</option>
|
||||
<option value="N">미사용</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<%-- 삭제 버튼 --%>
|
||||
<td>
|
||||
<button class="circle-btn delete nbkkListDel"
|
||||
onclick="fn_delete_nbkkListDel('nbkkListTb')"><span
|
||||
class="visually-hidden">삭제</span></button>
|
||||
</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="content-section content-fold">
|
||||
<div class="content-fold__header">
|
||||
<h3 class="content-section__title">반품배송비 입금 계좌</h3>
|
||||
<button type="button" class="circle-btn add" onclick="fn_add_List('nbkRtnTb')"><span
|
||||
class="visually-hidden">추가</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="content-fold__content">
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical draggable" id="nbkRtnTb">
|
||||
<caption>무통장 입금 수단 설정</caption>
|
||||
<colgroup>
|
||||
<col style="width: 6%;">
|
||||
<col style="width: 8%;">
|
||||
<col style="width: 8%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 8%;">
|
||||
<col style="width: auto;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>순서</th>
|
||||
<th>구분</th>
|
||||
<th>은행</th>
|
||||
<th>예금주<span class="red-7">*</span></th>
|
||||
<th>계좌번호<span class="red-7">*</span></th>
|
||||
<th>사용여부</th>
|
||||
<th>삭제</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${not empty resultMap.nbkkList.refundAcntSetup}">
|
||||
<c:forEach var="nbkRtn" items="${ resultMap.nbkkList.refundAcntSetup}">
|
||||
<tr class ="nbkkInfo">
|
||||
<input type = "hidden" value="02" name = "acntDvCd"/>
|
||||
<%-- 순서 바꾸기 --%>
|
||||
<td>
|
||||
<div class="draggable-icon-container">
|
||||
<i class="icon icon_draggable"></i>
|
||||
<span class="visually-hidden">순서 바꾸기</span>
|
||||
</div>
|
||||
</td>
|
||||
<%-- 구분 셀렉트 --%>
|
||||
<td class="center">
|
||||
<div class="select-box">
|
||||
<select title="무통장 구분" name="acntDtlDvCd"
|
||||
class="rtngudDlvyAmtNbkkDv">
|
||||
<c:forEach var="acntDtlDv"
|
||||
items="${resultMap.nbkkList.acntDtlDv}">
|
||||
<option value="<c:out value='${acntDtlDv.cd}'/>"
|
||||
<c:if test="${acntDtlDv.cd eq nbkRtn.acntDtlDvCd}">selected="selected"</c:if>>
|
||||
<c:out value="${acntDtlDv.cdNm}"/>
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<%-- 은행 셀렉트 --%>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select title="은행 이름" name="bankCd" class="rtngudDlvyAmtNbkkBankNm">
|
||||
<c:forEach var="bankCd"
|
||||
items="${resultMap.nbkkList.bankCdList}">
|
||||
<option value="<c:out value='${bankCd.cd}'/>"
|
||||
<c:if test="${bankCd.cd eq nbkRtn.bankCd}">selected="selected"</c:if>>
|
||||
<c:out value="${bankCd.cdNm}"/>
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<%-- 예금주 --%>
|
||||
<td>
|
||||
<input class="input-text full" type="text"
|
||||
title="예금주 이름" placeholder="예금주" name="dpstrNm"
|
||||
value="<c:out value='${nbkRtn.dpstrNm}'/>" maxLength="40">
|
||||
</td>
|
||||
<%-- 계좌번호 --%>
|
||||
<td>
|
||||
<input class="input-text full acntnb" type="text"
|
||||
title="무통장 계좌번호" placeholder="계좌번호('-'포함하여 입력)" name="acntnb"
|
||||
value="<c:out value='${nbkRtn.acntnb}'/>" maxLength="40">
|
||||
</td>
|
||||
<%-- 사용여부 셀렉트 --%>
|
||||
<td>
|
||||
<div class="select-box ">
|
||||
<select title="무통장 사용 여부" name="useAt" class="rtngudNbkkUseAt">
|
||||
<option value="Y"
|
||||
<c:if test="${nbkRtn.useAt eq 'Y'}">selected="selected"</c:if> >
|
||||
사용
|
||||
</option>
|
||||
<option value="N"
|
||||
<c:if test="${nbkRtn.useAt eq 'N'}">selected="selected"</c:if> >
|
||||
미사용
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<%-- 삭제 버튼 --%>
|
||||
<td>
|
||||
<button class="circle-btn delete nbkkListDel"
|
||||
onclick="fn_delete_nbkkListDel('nbkRtnTb')"><span
|
||||
class="visually-hidden">삭제</span></button>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr class ="nbkkInfo">
|
||||
<input type = "hidden" value="02" name = "acntDvCd"/>
|
||||
<%-- 순서 바꾸기 --%>
|
||||
<td>
|
||||
<div class="draggable-icon-container">
|
||||
<i class="icon icon_draggable"></i>
|
||||
<span class="visually-hidden">순서 바꾸기</span>
|
||||
</div>
|
||||
</td>
|
||||
<%-- 구분 셀렉트 --%>
|
||||
<td class="center">
|
||||
<div class="select-box">
|
||||
<select title="무통장 구분" name="acntDtlDvCd">
|
||||
<c:forEach var="acntDtlDv" items="${resultMap.nbkkList.acntDtlDv}">
|
||||
<option value="<c:out value='${acntDtlDv.cd}'/>">
|
||||
<c:out value="${acntDtlDv.cdNm}"/>
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<%-- 은행 셀렉트 --%>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select title="은행 이름" name="bankCd">
|
||||
<c:forEach var="bankCd" items="${resultMap.nbkkList.bankCdList}">
|
||||
<option value="<c:out value='${bankCd.cd}'/>">
|
||||
<c:out value="${bankCd.cdNm}"/>
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<%-- 예금주 --%>
|
||||
<td>
|
||||
<input class="input-text full" type="text"
|
||||
title="예금주 이름" placeholder="예금주" name="dpstrNm" maxLength="40">
|
||||
</td>
|
||||
<%-- 계좌번호 --%>
|
||||
<td>
|
||||
<input class="input-text full acntnb" type="text"
|
||||
title="무통장 계좌번호" placeholder="계좌번호('-'포함하여 입력)" name="acntnb"
|
||||
maxLength="40">
|
||||
</td>
|
||||
<%-- 사용여부 셀렉트 --%>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select title="무통장 사용 여부" name="useAt">
|
||||
<option value="Y">사용</option>
|
||||
<option value="N">미사용</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<button class="circle-btn delete nbkkListDel"
|
||||
onclick="fn_delete_nbkkListDel('nbkRtnTb')">
|
||||
<span class="visually-hidden">삭제</span>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
407
src/main/webapp/WEB-INF/views/mngr/setup/ordr/OrdrListR.jsp
Normal file
407
src/main/webapp/WEB-INF/views/mngr/setup/ordr/OrdrListR.jsp
Normal file
@@ -0,0 +1,407 @@
|
||||
<%@ 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" %>
|
||||
<%--
|
||||
Class Name : OrdrListR.jsp
|
||||
Description : 주문설정 jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.11.28 김혜인 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%@include file="/WEB-INF/views/comm/mngr/Include.jsp" %>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#mlgPymntRt").val(function(index, value) {
|
||||
return Number(value).toLocaleString();
|
||||
});
|
||||
$("#mlgMxmmPymntAmt").val(function(index, value) {
|
||||
return Number(value).toLocaleString();
|
||||
});
|
||||
|
||||
/*선물하기 이벤트*/
|
||||
$("input[name = giftDlvyAt]").on("change", function () {
|
||||
const thisVal = $("input[name = giftDlvyAt]:checked").val();
|
||||
const target = $("#giftDlvylcDv");
|
||||
if (thisVal == "N") { //미사용 일 시 주문 취소기간 hide
|
||||
target.hide();
|
||||
target.find("#giftDlvyAtmcCanclPd").prop("disabled", true);
|
||||
} else { //미사용 일 시 주문 취소기간 show
|
||||
target.show();
|
||||
target.find("#giftDlvyAtmcCanclPd").prop("disabled", false);
|
||||
}
|
||||
});
|
||||
/*마일리지 지급 사용 여부에 따른 show hide 처리*/
|
||||
$("input[name='mlgPymntAt']").on("change", function () {
|
||||
if ($("input[name = mlgPymntAt]:checked").val() === "N") {
|
||||
$(".mlgPymntCtrTarget").hide();
|
||||
$(".mlgPymntCtrTarget").find("select,input").each(function () {
|
||||
$(this).prop("disabled", true);
|
||||
});
|
||||
} else {
|
||||
$(".mlgPymntCtrTarget").show();
|
||||
$(".mlgPymntCtrTarget").find("select,input").each(function () {
|
||||
$(this).prop("disabled", false);
|
||||
});
|
||||
if ($("#mlgMxmmPymntAmtAt").is(":checked")) {/*최대지급 마일리지 사용 여부에 따른 disabled 처리*/
|
||||
$("#mlgMxmmPymntAmt").prop("disabled", true);
|
||||
}
|
||||
if ($("#mlgValidPdAt").is(":checked")) {/*마일리지 유효기간 사용 여부에 따른 disabled 처리*/
|
||||
$("#mlgValidPd").prop("disabled", true);
|
||||
}
|
||||
if($("#accmlUnitDv").val() === '02'){
|
||||
$("#mlgMxmmDv").hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
/*최대지급 마일리지 사용 여부에 따른 disabled 처리*/
|
||||
$("#mlgMxmmPymntAmtAt").on("click", function () {
|
||||
if ($(this).is(":checked")) {
|
||||
$("#mlgMxmmPymntAmt").prop("disabled", true);
|
||||
} else {
|
||||
$("#mlgMxmmPymntAmt").prop("disabled", false);
|
||||
}
|
||||
});
|
||||
/*마일리지 유효기간 사용 여부에 따른 disabled 처리*/
|
||||
$("#mlgValidPdAt").on("click", function () {
|
||||
if ($(this).is(":checked")) {
|
||||
$("#mlgValidPd").prop("disabled", true);
|
||||
} else {
|
||||
$("#mlgValidPd").prop("disabled", false);
|
||||
}
|
||||
});
|
||||
/*마일리지 지급 단위 구분에 따른 show hide 처리*/
|
||||
$("#accmlUnitDv").on("change", function () {
|
||||
const thisVal = $(this).val();
|
||||
const dv = $("#mlgMxmmDv");/*최대마일리지 영역*/
|
||||
const target1 = $("#mlgMxmmPymntAmt");/*최대마일리 지급 금액*/
|
||||
const target2 = $("#mlgMxmmPymntAmtAt");/*최대마일리 지급 사용여부*/
|
||||
if (thisVal === '01') {//적립구분이 %일 때
|
||||
//최대 지급 마일리지 disable, show 처리
|
||||
dv.show();
|
||||
$("#mlgPymntRt").attr("maxlength","2");
|
||||
if (!target2.is(":checked")) {/*설정안함 체크 될 시 display 유지 혹은 false 처리*/
|
||||
target1.prop("disabled", false);
|
||||
}
|
||||
target2.prop("disabled", false);
|
||||
} else {//적립구분이 원 일 때
|
||||
//최대 지급 마일리지 disable, hide 처리
|
||||
dv.hide();
|
||||
$("#mlgPymntRt").attr("maxlength","12");
|
||||
target1.prop("disabled", true);
|
||||
target2.prop("disabled", true);
|
||||
}
|
||||
$("#mlgPymntRt").val("0");
|
||||
});
|
||||
});
|
||||
/**************************************************************
|
||||
hidden form 생성 함수
|
||||
****************************************************************/
|
||||
const fn_save_ordrSetup = function () {
|
||||
if (confirm('주문 설정을 <spring:message code="confirm.common.save"/>')) {
|
||||
//hiddenFform 저장
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<c:url value="/mngr/setup/ordr/updateOrdrSetup"/>',
|
||||
data: $('#updtForm').serialize(),
|
||||
success: function (resultData) {
|
||||
alert("<spring:message code="success.common.save"/>");
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<c:set var = "ordrSetupInfo" value="${resultMap.ordrSetupInfo}"/>
|
||||
<%-- 상단메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
<%@include file="/WEB-INF/views/comm/mngr/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%-- 좌측메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
<%@include file="/WEB-INF/views/comm/mngr/Left.jsp" %>
|
||||
<form id = "updtForm">
|
||||
<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 type="button" class="btn primary" onclick="fn_save_ordrSetup(); return false;">
|
||||
<spring:message code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section content-fold">
|
||||
<div class="content-fold__header">
|
||||
</div>
|
||||
<c:if test = "${ordrSetupInfo.sopmalTyCd eq '01'}">
|
||||
<div class="content-fold__content">
|
||||
<h3 class="content-section__inner-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">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="multiDlvyUseAtY" name="multiDlvyAt" value="Y"
|
||||
<c:if test = "${ordrSetupInfo.multiDlvyAt eq 'Y'}">checked</c:if>>
|
||||
<label for="multiDlvyUseAtY">사용</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="multiDlvyUseAtN" name="multiDlvyAt" value="N"
|
||||
<c:if test = "${ordrSetupInfo.multiDlvyAt eq 'N'}">checked</c:if>>
|
||||
<label for="multiDlvyUseAtN">미사용</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-fold__content">
|
||||
<h3 class="content-section__inner-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">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="giftUseAtY" name="giftDlvyAt" value="Y"
|
||||
<c:if test = "${ordrSetupInfo.giftDlvyAt eq 'Y'}">checked</c:if>>
|
||||
<label for="giftUseAtY">사용</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="giftUseAtN" name="giftDlvyAt" value="N"
|
||||
<c:if test = "${ordrSetupInfo.giftDlvyAt eq 'N'}">checked</c:if>>
|
||||
<label for="giftUseAtN">미사용</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="giftDlvylcDv" <c:if test = "${ordrSetupInfo.giftDlvyAt eq 'N'}">style = "display: none"</c:if>>
|
||||
<th>배송주소 등록기간<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="td-inner vertical">
|
||||
<div class="input-container">
|
||||
<input type="text" class="input-text xsm right number"
|
||||
id="giftDlvyAtmcCanclPd" title="배송주소 등록기간 설정"
|
||||
name="giftDlvyAtmcCanclPd" maxlength="2"
|
||||
<c:choose>
|
||||
<c:when test = "${not empty ordrSetupInfo.giftDlvyAtmcCanclPd}">
|
||||
value = "<c:out value="${ordrSetupInfo.giftDlvyAtmcCanclPd}"/>"
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
value = "0"
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<c:if test = "${ordrSetupInfo.giftDlvyAt eq 'N'}">disabled</c:if>>
|
||||
<span class="mr-10input-unit-text"> 일 이내 배송주소 등록되지 않으면 주문 자동취소</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-fold__content">
|
||||
<h3 class="content-section__inner-title">GC 머니</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>GC 머니 사용 여부 설정</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>GC 머니 사용 여부</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="cashAtY" name="cashAt"
|
||||
value="Y"
|
||||
<c:if test="${ordrSetupInfo.cashAt eq 'Y'}">checked</c:if>>
|
||||
<label for="cashAtY">사용</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="cashAtN" name="cashAt"
|
||||
value="N"
|
||||
<c:if test="${ordrSetupInfo.cashAt eq 'N'}">checked</c:if>>
|
||||
<label for="cashAtN">미사용</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<div class="content-fold__content">
|
||||
<h3 class="content-section__inner-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 vertical">
|
||||
<div class="custom-radio-container ">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="mlgPymntY" name="mlgPymntAt" value="Y"
|
||||
<c:if test = "${ordrSetupInfo.mlgPymntAt eq 'Y'}">checked</c:if>>
|
||||
<label for="mlgPymntY">사용</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="mlgPymntN" name="mlgPymntAt" value="N"
|
||||
<c:if test = "${ordrSetupInfo.mlgPymntAt eq 'N'}">checked</c:if>>
|
||||
<label for="mlgPymntN">미사용</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-container ml-5 mlgPymntCtrTarget" <c:if test = "${ordrSetupInfo.mlgPymntAt eq 'N'}">style="display: none"</c:if>><%--사용 여부에 따른 이벤트 컨트롤--%>
|
||||
<span class="mr-5">구매시</span>
|
||||
<span class="mr-5 mlgPercent">총 상품 결제금액의</span>
|
||||
<span class="mr-5 ">
|
||||
<input type="text" class="input-text xsm right number" title="마일리지 적립" id="mlgPymntRt" name="mlgPymntRt"
|
||||
<c:choose>
|
||||
<c:when test = "${ordrSetupInfo.mlgPymntDvCd eq '01'}">
|
||||
maxlength="2"
|
||||
</c:when>
|
||||
<c:when test = "${ordrSetupInfo.mlgPymntDvCd eq '02'}">
|
||||
maxlength="12"
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
maxlength="2"
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<c:choose>
|
||||
<c:when test = "${not empty ordrSetupInfo.mlgPymntRt}">
|
||||
value ="<c:out value="${ordrSetupInfo.mlgPymntRt}"/>"
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
value ="0"
|
||||
</c:otherwise>
|
||||
</c:choose>>
|
||||
</span>
|
||||
<div class="select-box mr-10 ">
|
||||
<select id="accmlUnitDv" name="mlgPymntDvCd" class="short" title="마일리지 단위 선택">
|
||||
<c:forEach var="accmlUnitDv" items="${resultMap.accmlUnitDv}">
|
||||
<option value="<c:out value='${accmlUnitDv.cd}'/>"
|
||||
<c:if test = "${ordrSetupInfo.mlgPymntDvCd eq accmlUnitDv.cd}">selected</c:if>>
|
||||
<c:out value="${accmlUnitDv.cdNm}"/>
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<span class="mr-5">적립</span>
|
||||
</div>
|
||||
<div class="input-container mr-5 mlgPymntCtrTarget " id = "mlgMxmmDv" <c:if test = "${ordrSetupInfo.mlgPymntAt eq 'N' || ordrSetupInfo.mlgPymntDvCd eq '02'}">style="display: none"</c:if>><%--사용 여부에 따른 이벤트 컨트롤--%>
|
||||
<span class="mr-5">최대</span>
|
||||
<input class="input-text sm number right mr-5" type="text"
|
||||
title="최대 마일리지 적립금액" id="mlgMxmmPymntAmt"
|
||||
name="mlgMxmmPymntAmt" maxlength="12"
|
||||
<c:choose>
|
||||
<c:when test = "${not empty ordrSetupInfo.mlgMxmmPymntAmt}">
|
||||
value ="${ordrSetupInfo.mlgMxmmPymntAmt}"
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
value ="0"
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<c:if test = "${ordrSetupInfo.mlgMxmmPymntAmtAt eq 'N'}">disabled</c:if>>
|
||||
<span class="mr-5">마일리지 까지 적립</span>
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" value="N"
|
||||
name="mlgMxmmPymntAmtAt"
|
||||
id="mlgMxmmPymntAmtAt"
|
||||
<c:if test = "${ordrSetupInfo.mlgMxmmPymntAmtAt eq 'N'}">checked</c:if>>
|
||||
<span class="check"></span>
|
||||
<span class="control-label">설정 안함</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="mlgPymntCtrTarget" <c:if test = "${ordrSetupInfo.mlgPymntAt eq 'N'}">style="display: none"</c:if>><%--사용 여부에 따른 이벤트 컨트롤--%>
|
||||
<th>유효기간<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="input-container ml-5 ">
|
||||
<span class="mr-5 left">지급 마일리지의 유효기간은</span>
|
||||
<input class="input-text xsm right number" type="text"
|
||||
title="마일리지 유효기간" id="mlgValidPd" name="mlgValidPd"
|
||||
maxlength="2"
|
||||
<c:choose>
|
||||
<c:when test="${not empty ordrSetupInfo.mlgValidPd}">
|
||||
value="<c:out value="${ordrSetupInfo.mlgValidPd}"/>"
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
value="0"
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<c:if test = "${ordrSetupInfo.mlgValidPdAt eq 'N'}">disabled</c:if>>
|
||||
<span class="mr-5">개월</span>
|
||||
<%-- 유효기간 사용 유무 설정 --%>
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox ">
|
||||
<input type="checkbox" value="N" name="mlgValidPdAt"
|
||||
id="mlgValidPdAt"
|
||||
<c:if test = "${ordrSetupInfo.mlgValidPdAt eq 'N'}">checked</c:if>>
|
||||
<span class="check"></span>
|
||||
<span class="control-label">설정 안함</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
436
src/main/webapp/WEB-INF/views/mngr/setup/popup/PopupDtlU.jsp
Normal file
436
src/main/webapp/WEB-INF/views/mngr/setup/popup/PopupDtlU.jsp
Normal file
@@ -0,0 +1,436 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ 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 : PopupRegistC.jsp
|
||||
Description : 팝업 등록
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024-02-07 리브가 최초생성1
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Include.jsp" %>
|
||||
<script src="<c:url value='/js/fileupload_comm.js'/>"></script>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
// 파일업로드 _ 파일 비어있는지 확인
|
||||
/*
|
||||
if ($('#filCoursChk').val() !== '' && $('#filCoursChk').val() !== 'undefined') {
|
||||
$('#divFile-1').hide();
|
||||
} else {
|
||||
$('#divInfor-1').hide();
|
||||
}
|
||||
*/
|
||||
|
||||
fn_set_date('datepicker_1', 'datepicker_2', 'datepicker_2');
|
||||
|
||||
removeDecimal(document.getElementById("popupLcX"));
|
||||
removeDecimal(document.getElementById("popupLcY"));
|
||||
removeDecimal(document.getElementById("mblPopupLcX"));
|
||||
removeDecimal(document.getElementById("mblPopupLcY"));
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 소수점 제거
|
||||
******************************************************** */
|
||||
function removeDecimal(input) {
|
||||
var value = input.value;
|
||||
var intValue = parseInt(value);
|
||||
input.value = intValue;
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 숫자만 허용
|
||||
******************************************************** */
|
||||
function fn_num_validateInput(input) {
|
||||
var regex = /[^0-9]/g;
|
||||
input.value = input.value.replace(regex, '');
|
||||
input.value = input.value.toUpperCase();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 파일업로드_ 파일 삭제 file button show / file infor hide
|
||||
******************************************************** */
|
||||
const fn_delete_imgFile = function(_arg) {
|
||||
$('#divInfor-' + _arg).hide();
|
||||
$('#f-' + _arg).val('');
|
||||
$('#divFile-' + _arg).show();
|
||||
|
||||
$('#orginlFilNm').val('');
|
||||
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 파일업로드_ 파일 이름 가져오기
|
||||
******************************************************** */
|
||||
const fn_set_fileName = function(_target, _arg, event) {
|
||||
let tmpPath = URL.createObjectURL(event.target.files[0]);
|
||||
let fileName = _target.files[0].name;
|
||||
let fileSize = '( ' + (_target.files[0].size / 1024).toFixed(2) + ' KB )';
|
||||
|
||||
$(_target).closest('tr').find('.filePh').attr('href', tmpPath);
|
||||
$(_target).closest('tr').find('.fileNm').text(fileName);
|
||||
$(_target).closest('tr').find('.fileSz').text(fileSize);
|
||||
|
||||
$('#orginlFilNm').val(fileName);
|
||||
|
||||
$('#divInfor-' + _arg).show();
|
||||
$('#divFile-' + _arg).hide();
|
||||
|
||||
alert('fn_set_fileName');
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 수정폼 이동
|
||||
******************************************************** */
|
||||
const fn_move_dtl_uptpage = function(Innb) {
|
||||
const url = '<c:url value="/mngr/setup/popup/selectPopupUpdtForm"/>';
|
||||
|
||||
$('#listForm').attr('action', url);
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#pageIndex').val(1);
|
||||
$('#popupInnb').val(Innb);
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 목록 조회
|
||||
******************************************************** */
|
||||
const fn_select_list = function() {
|
||||
const url = '<c:url value="/mngr/setup/popup/selectPopupList"/>';
|
||||
|
||||
$('#listForm').attr('action', url);
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 수정 AJAX
|
||||
******************************************************** */
|
||||
const fn_regist = function () {
|
||||
const url = '<c:url value="/mngr/setup/popup/updatePopupDtl"/>';
|
||||
const formData = new FormData();
|
||||
|
||||
var combinedValue = $('#datepicker_1').val() + 'T' + $('#popupExpsrBgnTime').val();
|
||||
$('#popupExpsrBgnDt').val(combinedValue);
|
||||
|
||||
combinedValue = $('#datepicker_2').val() + 'T' + $('#popupExpsrEndTime').val();
|
||||
$('#popupExpsrEndDt').val(combinedValue);
|
||||
|
||||
|
||||
// 타이머 노출 여부
|
||||
let timerAtVal = $('input[name="tmeSetupAt"]:checked').val();
|
||||
|
||||
// 타이머 노출이면
|
||||
if(timerAtVal === 'Y'){
|
||||
// 타이머 날짜 값
|
||||
let timerDate = $('#datepicker_3').val();
|
||||
|
||||
// 타이머 날짜가 빈 값이면
|
||||
if(timerDate == '' || timerDate == null) {
|
||||
alert('타이머 노출 시 시간 설정은 필수입니다.');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
combinedValue = $('#datepicker_3').val() + 'T' + $('#tmeSetupTime').val();
|
||||
$('#tmeSetup').val(combinedValue);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$('#listForm').serializeArray().forEach(function (item) {
|
||||
formData.append(item.name, item.value);
|
||||
});
|
||||
|
||||
let files = $('[name=files]');
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
formData.append('file' + i, files[i].files[0]);
|
||||
}
|
||||
|
||||
//파일데이터
|
||||
$.each(filesTempArr, function(i, file){
|
||||
if(file.upload != 'disable')
|
||||
formData.append('files', file);
|
||||
});
|
||||
|
||||
if (confirm('팝업을 <spring:message code="confirm.common.update"/>')) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
enctype: 'multipart/form-data',
|
||||
url: url,
|
||||
data: formData,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
let str = JSON.parse(data.resBody.result);
|
||||
if (str.result == 'success') {
|
||||
alert('<spring:message code="success.common.update"/>');
|
||||
//등록 후 수정화면으로 이동
|
||||
fn_move_dtl_uptpage(data.resBody.result.replace(/[^0-9]/g, ""));
|
||||
} else {
|
||||
alert('<spring:message code="fail.common.update"/>');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<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">
|
||||
<button onclick="fn_select_list()" onkeypress="this.onclick" class="btn outline"><spring:message code="button.list"/></button>
|
||||
<button class="btn primary" onclick="fn_regist();"><spring:message code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">팝업정보 수정</h3>
|
||||
<form id="listForm" method="post" action="<c:url value="/mngr/setup/popup/updatePopupDtl"/>" enctype="multipart/form-data">
|
||||
<spring:eval expression="@environment.getProperty('spring.servlet.multipart.max-file-size')" var="maxFileSize"/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="hidden" id="popupExpsrBgnDt" name="popupExpsrBgnDt" value="">
|
||||
<input type="hidden" id="popupExpsrEndDt" name="popupExpsrEndDt" value="">
|
||||
<input type="hidden" id="tmeSetup" name="tmeSetup" value="">
|
||||
<input type="hidden" id="filCoursChk" name="filCoursChk" value="<c:out value="${resultMap.list.filCours}"/>">
|
||||
<input type="hidden" id="sopmalCd" name="sopmalCd" value="<c:out value="${resultMap.list.sopmalCd}"/>">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col style="width: auto;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>팝업 제목<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" name="popupNm" id="popupNm"
|
||||
value="<c:out value="${resultMap.list.popupNm}"/>" title="팝업 제목"
|
||||
maxlength="30">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>팝업 기간 설정<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="text" id="datepicker_1" name="datepicker_1" class="datepicker" title="시작 날짜 선택"
|
||||
autocomplete="off" value="<c:out value="${resultMap.list.popupExpsrBgnDtYyyymmdd}"/>">
|
||||
<div class="timepicker-container">
|
||||
<input type="text" class="bs-timepicker" id="popupExpsrBgnTime" name="popupExpsrBgnTime"
|
||||
title="시작 시간 설정" value="<c:out value="${resultMap.list.popupExpsrBgnDtTime}"/>">
|
||||
</div>
|
||||
<span class="tilde">~</span>
|
||||
<input type="text" id="datepicker_2" name="datepicker_2" class="datepicker" title="종료 날짜 선택"
|
||||
autocomplete="off" value="<c:out value="${resultMap.list.popupExpsrEndDtYyyymmdd}"/>">
|
||||
<div class="timepicker-container">
|
||||
<input type="text" class="bs-timepicker" id="popupExpsrEndTime" name="popupExpsrEndTime"
|
||||
title="종료 시간 설정" value="<c:out value="${resultMap.list.popupExpsrEndDtTime}"/>">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>팝업 내용 등록</th>
|
||||
<td>
|
||||
<div class="td-inner vertical">
|
||||
<div class="manage-btn-container fileInfor" id="divInfor-1">
|
||||
<ul class="file-list" id="fileList">
|
||||
<c:if test="${not empty resultMap.list.sysFilNm}">
|
||||
<li id="${resultMap.list.popupInnb}">
|
||||
<a href="#" id="${resultMap.list.orginlFilNm}" onclick="downloadFile(this,'${resultMap.list.sopmalCd}','POUP', 1);">
|
||||
<i class="icon icon_file-list mr-2"></i>
|
||||
<span class="file-list__item-title fileNm"><c:out value="${resultMap.list.orginlFilNm}"/></span>
|
||||
<span class="file-list__item-size fileSz">(<c:out value="${resultMap.list.filMg}"/> KB)</span>
|
||||
</a>
|
||||
<button type="button" class="file-list__delete fileDl" id="" onclick="deleteFile(this,'${resultMap.list.sopmalCd}','POUP', 1);">
|
||||
<span class="visually-hidden">파일 삭제</span>
|
||||
</button>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="manage-btn-container" id="divFile-1">
|
||||
<div class="input-file">
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="file" id="fileUpload" name="file" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>"
|
||||
multiple="multiple" onchange="addFiles(event, 1);">
|
||||
<label for="fileUpload">파일선택</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>연결 URL</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text" type="text" id="cnncUrl" name="cnncUrl" style="max-width:1000px;"
|
||||
value="<c:out value="${resultMap.list.cnncUrl}"/>" title="연결 URL"
|
||||
maxlength="1300">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>팝업 크기<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<span>width :</span>
|
||||
<input class="input-text xsm" type="text" id="popupMgWth" name="popupMgWth"
|
||||
oninput="fn_num_validateInput(this)"
|
||||
value="<c:out value="${resultMap.list.popupMgWth}"/>" title="팝업크기 가로"
|
||||
maxlength="3">
|
||||
<span class="gray-7">px</span>
|
||||
<span class="ml-10">height :</span>
|
||||
<input class="input-text xsm" type="text" id="popupMgVtc" name="popupMgVtc"
|
||||
oninput="fn_num_validateInput(this)"
|
||||
value="<c:out value="${resultMap.list.popupMgVtc}"/>" title="팝업크기 세로"
|
||||
maxlength="3">
|
||||
<span class="gray-7">px</span>
|
||||
|
||||
/
|
||||
|
||||
<span>m_width :</span>
|
||||
<input class="input-text xsm" type="text" id="mblPopupMgWth" name="mblPopupMgWth"
|
||||
oninput="fn_num_validateInput(this)"
|
||||
value="<c:out value="${resultMap.list.mblPopupMgWth}"/>" title="모바일 팝업크기 가로"
|
||||
maxlength="3">
|
||||
<span class="gray-7">px</span>
|
||||
<span class="ml-10">m_height :</span>
|
||||
<input class="input-text xsm" type="text" id="mblPopupMgVtc" name="mblPopupMgVtc"
|
||||
oninput="fn_num_validateInput(this)"
|
||||
value="<c:out value="${resultMap.list.mblPopupMgVtc}"/>" title="모바일 팝업크기 세로"
|
||||
maxlength="3">
|
||||
<span class="gray-7">px</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>팝업 위치<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<span>가로 :</span>
|
||||
<input class="input-text xsm" type="text" id="popupLcX" name="popupLcX"
|
||||
oninput="fn_num_validateInput(this)"
|
||||
value="<c:out value="${resultMap.list.popupLcX}"/>"
|
||||
onchange="removeDecimal(this);" title="팝업위치 가로" maxlength="3">
|
||||
<span class="gray-7">px</span>
|
||||
<span class="ml-10">세로 :</span>
|
||||
<input class="input-text xsm" type="text" id="popupLcY" name="popupLcY"
|
||||
oninput="fn_num_validateInput(this)"
|
||||
value="<c:out value="${resultMap.list.popupLcY}"/>"
|
||||
onchange="removeDecimal(this);" title="팝업위치 세로" maxlength="3">
|
||||
<span class="gray-7">px</span>
|
||||
|
||||
/
|
||||
|
||||
<span>모바일 가로 :</span>
|
||||
<input class="input-text xsm" type="text" id="mblPopupLcX" name="mblPopupLcX"
|
||||
oninput="fn_num_validateInput(this)"
|
||||
value="<c:out value="${resultMap.list.mblPopupLcX}"/>"
|
||||
onchange="removeDecimal(this);" title="모바일 팝업위치 가로" maxlength="3">
|
||||
<span class="gray-7">px</span>
|
||||
<span class="ml-10">모바일 세로 :</span>
|
||||
<input class="input-text xsm" type="text" id="mblPopupLcY" name="mblPopupLcY"
|
||||
oninput="fn_num_validateInput(this)"
|
||||
value="<c:out value="${resultMap.list.mblPopupLcY}"/>"
|
||||
onchange="removeDecimal(this);" title="모바일 팝업위치 세로" maxlength="3">
|
||||
<span class="gray-7">px</span>
|
||||
|
||||
</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-6" name="expsrAt" value="Y"
|
||||
<c:if test="${ resultMap.list.expsrAt == 'Y'}">checked="checked"</c:if>>
|
||||
<label for="r-6">노출</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-7" name="expsrAt" value="N"
|
||||
<c:if test="${ resultMap.list.expsrAt == 'N'}">checked="checked"</c:if>>
|
||||
<label for="r-7">미노출</label>
|
||||
</div>
|
||||
</div>
|
||||
</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-8" name="tmeSetupAt" value="Y"
|
||||
<c:if test="${ resultMap.list.tmeSetupAt == 'Y'}">checked="checked"</c:if>>
|
||||
<label for="r-8">노출</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-9" name="tmeSetupAt" value="N"
|
||||
<c:if test="${ resultMap.list.tmeSetupAt == 'N'}">checked="checked"</c:if>>
|
||||
<label for="r-9">미노출</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>타이머</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="text" id="datepicker_3" name="datepicker_3" class="datepicker" title="시작 날짜 선택"
|
||||
autocomplete="off"
|
||||
value="<c:out value="${resultMap.list.tmeSetupYyyymmdd}"/>">
|
||||
<div class="timepicker-container">
|
||||
<input type="text" class="bs-timepicker" title="시간 설정" id="tmeSetupTime" name="tmeSetupTime"
|
||||
value="<c:out value="${resultMap.list.tmeSetupTime}"/>">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!--검색 조건 , 페이징 조건 -->
|
||||
<input type="hidden" id="popupInnb" name="popupInnb" value="<c:out value="${resultMap.list.popupInnb}"/>"/>
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.BOPopupVO.pageIndex }"/>"/>
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="<c:out value="${ resultMap.BOPopupVO.pageUnit }"/>"/>
|
||||
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
233
src/main/webapp/WEB-INF/views/mngr/setup/popup/PopupListR.jsp
Normal file
233
src/main/webapp/WEB-INF/views/mngr/setup/popup/PopupListR.jsp
Normal file
@@ -0,0 +1,233 @@
|
||||
<%@ 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 : PopupListR.jsp
|
||||
Description : 팝업관리 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024-02-07 리브가 최초생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Include.jsp" %>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
let urlParams = new URLSearchParams(window.location.search);
|
||||
|
||||
/*
|
||||
let pageIndex = '<c:out value="${ resultMap.BOPopupVO.pageIndex }"/>';
|
||||
let pageUnit = '<c:out value="${ resultMap.BOPopupVO.pageUnit }"/>';
|
||||
fn_select_list(pageIndex, pageUnit);
|
||||
|
||||
$('#listForm').on('keydown', function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
fn_select_list(1);
|
||||
}
|
||||
});
|
||||
*/
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 목록 조회
|
||||
******************************************************** */
|
||||
const fn_select_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;
|
||||
}
|
||||
}
|
||||
|
||||
let params = '&pageIndex=' + pageIndex + '&pageUnit=' + '10';
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url : '<c:url value="/mngr/setup/popup/selectPopupList"/>',
|
||||
data : dataStr,
|
||||
success:function(data) {
|
||||
//data html내 목록 섹션 시작
|
||||
const startIndex = data.lastIndexOf('<div id="pageDiv">') + '<div id="pageDiv">'.length;
|
||||
//data html내 목록 섹션 끝
|
||||
const endIndex = data.lastIndexOf("</section>");
|
||||
//페이지에 따른 html 요소 교체
|
||||
$('#pageDiv').html(data.substring(startIndex, endIndex));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 등록폼 이동
|
||||
******************************************************** */
|
||||
const fn_move_regpage = function() {
|
||||
const url = '<c:url value="/mngr/setup/popup/selectPopupRegistForm"/>';
|
||||
|
||||
$('#listForm').attr('action', url);
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 수정폼 이동
|
||||
******************************************************** */
|
||||
const fn_move_dtl_uptpage = function(popupInnb, sopmalCd) {
|
||||
const url = '<c:url value="/mngr/setup/popup/selectPopupUpdtForm"/>';
|
||||
|
||||
$('#listForm').attr('action', url);
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#popupInnb').val(popupInnb);
|
||||
$('#sopmalCd').val(sopmalCd)
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 삭제 AJAX
|
||||
******************************************************** */
|
||||
const fn_delete = function(popupInnb, sopmalCd) {
|
||||
const url = '<c:url value="/mngr/setup/popup/deletePopup"/>';
|
||||
|
||||
if(confirm('팝업을 <spring:message code="confirm.common.delete"/>')) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: url,
|
||||
data: { popupInnb : popupInnb
|
||||
,sopmalCd : sopmalCd
|
||||
},
|
||||
success: function (data) {
|
||||
let str = JSON.parse(data.resBody.result);
|
||||
if(str.result=='success'){
|
||||
alert('<spring:message code="success.common.delete"/>');
|
||||
// 삭제 후 목록 화면으로 이동
|
||||
fn_select_list(1);
|
||||
} else {
|
||||
alert('<spring:message code="fail.common.delete"/>');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
history.replaceState({}, null, location.pathname);
|
||||
|
||||
|
||||
</script>
|
||||
<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">
|
||||
<button onclick="fn_move_regpage()" class="btn primary">팝업정보 <spring:message code="button.insert"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<form id='listForm' name="listForm" method="post" action="<c:url value="/mngr/setup/popup/selectPopupList"/>">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="${ resultMap.BOPopupVO.pageIndex }"/>
|
||||
<input type="hidden" id="popupInnb" name="popupInnb"/>
|
||||
<input type="hidden" id="sopmalCd" name="sopmalCd"/>
|
||||
<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="fn_select_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 id="pageDiv">
|
||||
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<colgroup>
|
||||
<col style="width: 7%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 16%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 15%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>제목</th>
|
||||
<th>기간</th>
|
||||
<th>상태</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.list }">
|
||||
<c:forEach items="${ resultMap.list }" var="list" varStatus="status">
|
||||
<tr>
|
||||
<td><c:out value="${ list.rnum }"/></td>
|
||||
<td class="left"><c:out value="${list.popupNm}"/></td>
|
||||
<td><c:out value="${list.popupExpsrBgnDt}"/><br>
|
||||
<span>~</span><c:out value="${list.popupExpsrEndDt}"/></td>
|
||||
<td><c:if test="${ list.expsrAt eq 'Y'}">노출</c:if>
|
||||
<c:if test="${ list.expsrAt eq 'N'}">미노출</c:if></td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<button class="btn xsm primary outline" onclick="fn_move_dtl_uptpage('<c:out value="${list.popupInnb}"/>', '<c:out value="${list.sopmalCd}"/>')"><spring:message code="button.update"/></button>
|
||||
<button class="btn xsm dark" onclick="fn_delete('<c:out value="${list.popupInnb}"/>', '<c:out value="${list.sopmalCd}"/>')"><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>
|
||||
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_list"/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
348
src/main/webapp/WEB-INF/views/mngr/setup/popup/PopupRegistC.jsp
Normal file
348
src/main/webapp/WEB-INF/views/mngr/setup/popup/PopupRegistC.jsp
Normal file
@@ -0,0 +1,348 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ 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 : PopupRegistC.jsp
|
||||
Description : 팝업 등록
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024-02-07 리브가 최초생성1
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Include.jsp" %>
|
||||
<script src="<c:url value='/js/fileupload_comm.js'/>"></script>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
fn_set_date('datepicker_1', 'datepicker_2', 'datepicker_2');
|
||||
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 숫자만 허용
|
||||
******************************************************** */
|
||||
function fn_num_validateInput(input) {
|
||||
var regex = /[^0-9]/g;
|
||||
input.value = input.value.replace(regex, '');
|
||||
input.value = input.value.toUpperCase();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 수정폼 이동
|
||||
******************************************************** */
|
||||
const fn_move_dtl_uptpage = function (Innb) {
|
||||
const url = '<c:url value="/mngr/setup/popup/selectPopupUpdtForm"/>';
|
||||
|
||||
$('#listForm').attr('action', url);
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#pageIndex').val(1);
|
||||
$('#popupInnb').val(Innb);
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 목록 조회
|
||||
******************************************************** */
|
||||
const fn_select_list = function () {
|
||||
const url = '<c:url value="/mngr/setup/popup/selectPopupList"/>';
|
||||
|
||||
$('#listForm').attr('action', url);
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 등록 AJAX
|
||||
******************************************************** */
|
||||
const fn_regist = function () {
|
||||
const url = '<c:url value="/mngr/setup/popup/insertPopup"/>'
|
||||
const formData = new FormData();
|
||||
|
||||
$('#listForm').serializeArray().forEach(function (item) {
|
||||
formData.append(item.name, item.value);
|
||||
});
|
||||
|
||||
const data = $('#listForm').serializeArray();
|
||||
|
||||
if($('#datepicker_1').val() != null){
|
||||
var combinedValue = $('#datepicker_1').val() + 'T' + $('#popupExpsrBgnTime').val();
|
||||
formData.append('popupExpsrBgnDt', combinedValue);
|
||||
}
|
||||
|
||||
if($('#datepicker_2').val() != null) {
|
||||
combinedValue = $('#datepicker_2').val() + 'T' + $('#popupExpsrEndTime').val();
|
||||
formData.append('popupExpsrEndDt', combinedValue);
|
||||
}
|
||||
|
||||
|
||||
// 타이머 노출 여부
|
||||
let timerAtVal = $('input[name="tmeSetupAt"]:checked').val();
|
||||
|
||||
// 타이머 노출이면
|
||||
if(timerAtVal === 'Y'){
|
||||
// 타이머 날짜 값
|
||||
let timerDate = $('#datepicker_3').val();
|
||||
|
||||
// 타이머 날짜가 빈 값이면
|
||||
if(timerDate == '' || timerDate == null) {
|
||||
alert('타이머 노출 시 시간 설정은 필수입니다.');
|
||||
return;
|
||||
}
|
||||
|
||||
if($('#datepicker_3').val() != null) {
|
||||
combinedValue = $('#datepicker_3').val() + 'T' + $('#tmeSetupTime').val();
|
||||
formData.append('tmeSetup', combinedValue);
|
||||
}
|
||||
}
|
||||
|
||||
//파일데이터 - multiple로 배열저장된 값을 files로 셋팅
|
||||
$.each(filesTempArr, function(i, file){
|
||||
if(file.upload != 'disable')
|
||||
formData.append('files', file);
|
||||
});
|
||||
|
||||
if (confirm('팝업을 <spring:message code="confirm.common.insert"/>')) {
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
enctype: 'multipart/form-data',
|
||||
url: url,
|
||||
data: formData,
|
||||
dataType: 'json',
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
let str = JSON.parse(data.resBody.result);
|
||||
if (str.result == 'success') {
|
||||
alert('<spring:message code="success.common.insert"/>');
|
||||
//등록 후 수정화면으로 이동
|
||||
fn_move_dtl_uptpage(data.resBody.result.replace(/[^0-9]/g, ""));
|
||||
} else {
|
||||
alert('<spring:message code="fail.common.insert"/>');
|
||||
}
|
||||
}/*,
|
||||
error: function(data) {
|
||||
|
||||
}
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
// 에러 응답 처리
|
||||
alert('Error status:'+ jqXHR.status); // 상태 코드 (예: 404, 500 등)
|
||||
alert('Error details:'+ jqXHR.responseText); // 서버에서 제공한 에러 메시지
|
||||
alert('Error text status:'+ textStatus); // 오류 상태 (예: 'error', 'timeout', 'abort', 'parsererror')
|
||||
alert('Error thrown:'+ errorThrown); // 오류 메시지
|
||||
}*/
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<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">
|
||||
<button onclick="fn_select_list()" onkeypress="this.onclick" class="btn outline"><spring:message code="button.list"/></button>
|
||||
<button class="btn primary" onclick="fn_regist();"><spring:message code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">팝업정보 등록</h3>
|
||||
<form id="listForm" method="post" action="<c:url value="/mngr/setup/popup/insertPopup"/>" enctype="multipart/form-data">
|
||||
<spring:eval expression="@environment.getProperty('spring.servlet.multipart.max-file-size')" var="maxFileSize"/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="hidden" id="orginlFilNm" name="orginlFilNm" value=""/>
|
||||
<input type="hidden" id="sopmalCd" name="sopmalCd" value="${resultMap.BOPopupVO.sopmalCd}"/>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col style="width: auto;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>팝업 제목<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" name="popupNm" id="popupNm"
|
||||
title="팝업 제목" maxlength="30">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>팝업 기간 설정<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="text" id="datepicker_1" name="datepicker_1" class="datepicker" title="시작 날짜 선택"
|
||||
autocomplete="off" required="required">
|
||||
<div class="timepicker-container">
|
||||
<input type="text" class="bs-timepicker" title="시작 시간 설정"
|
||||
id="popupExpsrBgnTime" name="popupExpsrBgnTime" value="00:00">
|
||||
</div>
|
||||
<span class="tilde">~</span>
|
||||
<input type="text" id="datepicker_2" name="datepicker_2" class="datepicker" title="종료 날짜 선택"
|
||||
autocomplete="off" required="required">
|
||||
<div class="timepicker-container">
|
||||
<input type="text" class="bs-timepicker" title="종료 시간 설정"
|
||||
id="popupExpsrEndTime" name="popupExpsrEndTime" value="00:00">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>팝업 내용 등록</th>
|
||||
<td>
|
||||
<div class="td-inner vertical">
|
||||
<div class="manage-btn-container fileInfor" id="divInfor-1">
|
||||
<ul class="file-list" id="fileList">
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="manage-btn-container" id="divFile-1">
|
||||
<div class="input-file">
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="file" id="fileUpload" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFiles(event, 1);">
|
||||
<label for="fileUpload">파일선택</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>연결 URL</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text " type="text" id="cnncUrl" name="cnncUrl" style="max-width:1000px;" value="" title="연결 URL" maxlength="1300">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>팝업 크기<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<span>width :</span>
|
||||
<input class="input-text xsm" type="text" id="popupMgWth" name="popupMgWth"
|
||||
oninput="fn_num_validateInput(this)" title="팝업크기 가로" maxlength="3">
|
||||
<span class="gray-7">px</span>
|
||||
<span class="ml-10">height :</span>
|
||||
<input class="input-text xsm" type="text" id="popupMgVtc" name="popupMgVtc"
|
||||
oninput="fn_num_validateInput(this)" title="팝업크기 세로" maxlength="3">
|
||||
<span class="gray-7">px</span>
|
||||
|
||||
/
|
||||
|
||||
<span>m_width :</span>
|
||||
<input class="input-text xsm" type="text" id="mblPopupMgWth" name="mblPopupMgWth"
|
||||
oninput="fn_num_validateInput(this)" title="모바일 팝업크기 가로" maxlength="3">
|
||||
<span class="gray-7">px</span>
|
||||
<span class="ml-10">m_height :</span>
|
||||
<input class="input-text xsm" type="text" id="mblPopupMgVtc" name="mblPopupMgVtc"
|
||||
oninput="fn_num_validateInput(this)" title="모바일 팝업크기 세로" maxlength="3">
|
||||
<span class="gray-7">px</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>팝업 위치<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<span>가로 :</span>
|
||||
<input class="input-text xsm" type="text" id="popupLcX" name="popupLcX"
|
||||
oninput="fn_num_validateInput(this)" title="팝업위치 가로" maxlength="3">
|
||||
<span class="gray-7">px</span>
|
||||
<span class="ml-10">세로 :</span>
|
||||
<input class="input-text xsm" type="text" id="popupLcY" name="popupLcY"
|
||||
oninput="fn_num_validateInput(this)" title="팝업위치 세로" maxlength="3">
|
||||
<span class="gray-7">px</span>
|
||||
|
||||
/
|
||||
|
||||
<span>가로 :</span>
|
||||
<input class="input-text xsm" type="text" id="mblPopupLcX" name="mblPopupLcX"
|
||||
oninput="fn_num_validateInput(this)" title="모바일 팝업위치 가로" maxlength="3">
|
||||
<span class="gray-7">px</span>
|
||||
<span class="ml-10">세로 :</span>
|
||||
<input class="input-text xsm" type="text" id="mblPopupLcY" name="mblPopupLcY"
|
||||
oninput="fn_num_validateInput(this)" title="모바일 팝업위치 세로" maxlength="3">
|
||||
<span class="gray-7">px</span>
|
||||
</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-6" name="expsrAt" value="Y" checked>
|
||||
<label for="r-6">노출</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-7" name="expsrAt" value="N">
|
||||
<label for="r-7">미노출</label>
|
||||
</div>
|
||||
</div>
|
||||
</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-8" name="tmeSetupAt" value="Y">
|
||||
<label for="r-8">노출</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-9" name="tmeSetupAt" value="N" checked>
|
||||
<label for="r-9">미노출</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>타이머</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="text" id="datepicker_3" name="datepicker_3" class="datepicker" title="시작 날짜 선택" autocomplete="off">
|
||||
<div class="timepicker-container">
|
||||
<input type="text" class="bs-timepicker" title="시간 설정" id="tmeSetupTime" name="tmeSetupTime" value="00:00">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!--검색 조건 , 페이징 조건 -->
|
||||
<input type="hidden" id="popupInnb" name="popupInnb" value=""/>
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.BOPopupVO.pageIndex }"/>"/>
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="<c:out value="${ resultMap.BOPopupVO.pageUnit }"/>"/>
|
||||
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
240
src/main/webapp/WEB-INF/views/mngr/setup/site/GoodsGroupC.jsp
Normal file
240
src/main/webapp/WEB-INF/views/mngr/setup/site/GoodsGroupC.jsp
Normal file
@@ -0,0 +1,240 @@
|
||||
<%@ 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 : GoodsGroupC.jsp
|
||||
Description : 상품그룹등록화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-12-04 전일찬 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 상품 그룹 수정화면 이동
|
||||
******************************************************** */
|
||||
const fn_move_uptpage = function(value) {
|
||||
$('#VariusSubmitFrm').attr('action', '<c:url value="/mngr/setup/site/selectGoodsGroupDtlForm"/>');
|
||||
$('#VariusSubmitFrm').attr('method', 'post');
|
||||
$('#goodsGroupInnb').val(value);
|
||||
$('#VariusSubmitFrm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 상품 그룹 목록조회
|
||||
******************************************************** */
|
||||
const fn_select_goodsgroup_list = function() {
|
||||
$('#VariusSubmitFrm').attr('action', '<c:url value="/mngr/setup/site/selectGoodsGroupList"/>');
|
||||
$('#VariusSubmitFrm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 상품 그룹 등록
|
||||
******************************************************** */
|
||||
const fn_regist_goodsgroup = function () {
|
||||
const url = '<c:url value="/mngr/setup/site/insertGoodsGroup"/>';
|
||||
const formData = new FormData();
|
||||
|
||||
$('#VariusSubmitFrm').serializeArray().forEach(function (item) {
|
||||
formData.append(item.name, item.value);
|
||||
});
|
||||
|
||||
var goodsIdArr = [];
|
||||
$('input[name=relatedGoodsId]').each(function (i) {
|
||||
goodsIdArr.push($("input[name='relatedGoodsId']").eq(i).attr("value"));
|
||||
})
|
||||
formData.append('goodsIds', goodsIdArr);
|
||||
|
||||
if (confirm('상품 그룹을 <spring:message code="confirm.common.insert"/>')) {
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
enctype: 'multipart/form-data',
|
||||
url: url,
|
||||
data: formData,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
let str = JSON.parse(data.resBody.result);
|
||||
if (str.result == 'success') {
|
||||
alert('<spring:message code="success.common.insert"/>');
|
||||
//등록 후 수정화면으로 이동
|
||||
fn_move_uptpage(str.goodsGroupInnb);
|
||||
} else {
|
||||
alert('<spring:message code="fail.common.insert"/>');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 상품 검색 팝업 배열 값 불러오기
|
||||
******************************************************** */
|
||||
var selected = [];
|
||||
|
||||
function fn_select_goods_search() {
|
||||
|
||||
selected = [];
|
||||
|
||||
$('#appendList tr').each(function() {
|
||||
const goodsId = $(this).attr('id').replace('choiseListId', '');
|
||||
const goodsImg = $(this).find('input[name="goodsImgCours"]').val();
|
||||
const goodsNm = $(this).find('input[name="goodsNm"]').val();
|
||||
const goodsPrice = $(this).find('input[name="slepric"]').val();
|
||||
const goodsSttusNm = $(this).find('input[name="goodsSttusNm"]').val();
|
||||
|
||||
selected.push({
|
||||
goodsId: goodsId,
|
||||
goodsImg: goodsImg,
|
||||
goodsNm: goodsNm,
|
||||
goodsPrice: goodsPrice,
|
||||
goodsSttusNm: goodsSttusNm
|
||||
});
|
||||
});
|
||||
|
||||
// 각 화면에 맞춰서 HTML 변경 START
|
||||
var tableBody = $("#parentGoodsContainer");
|
||||
tableBody.empty();
|
||||
|
||||
selected.forEach((good, index) => {
|
||||
|
||||
var productHtml = `
|
||||
<div class="product-group__item">
|
||||
<input type="hidden" id="relatedGoodsId" name="relatedGoodsId" value="` + good.goodsId+ `">
|
||||
<input type="hidden" id="goodsSttusNm" name="goodsSttusNm" value="` + good.goodsSttusNm + `">
|
||||
<span class="product-group__item-number">` + (index + 1) + `</span>
|
||||
<div class="product-group__image">
|
||||
<img src="` + good.goodsImg+ `" width="140" alt="` + good.goodsNm+ `"
|
||||
onerror="this.src='/mngr/images/image_placeholder.png'"
|
||||
>
|
||||
</div>
|
||||
<div class="product-group__description">
|
||||
<p>` + good.goodsNm+ `</p>
|
||||
<p class="product-group__description-price">` + good.goodsPrice+ `원</p>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
tableBody.append(productHtml);
|
||||
});
|
||||
// 각 화면에 맞춰서 HTML 변경 END
|
||||
|
||||
fn_close_modal('product-search');
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 상품 검색 팝업 > 상품 목록 조회
|
||||
******************************************************** */
|
||||
const fn_goods_search_popup_list = function (pageIndex,selected) {
|
||||
let dataStr;
|
||||
if (!pageIndex) {
|
||||
$('#pageIndex').val(1);
|
||||
} else {
|
||||
$('#pageIndex').val(pageIndex);
|
||||
}
|
||||
|
||||
$('#popupListForm').find('input[name=pageIndex]').eq(0).val(pageIndex);
|
||||
const popupListForm = $("#popupListForm").serialize();
|
||||
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<c:url value="/mngr/goods/goodsmngr/selectGoodsSrchPopupList"/>",
|
||||
data: popupListForm,
|
||||
success: function (resultHtml) {
|
||||
$('#goodsList').empty();
|
||||
$('#goodsList').html(resultHtml);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<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">
|
||||
<button onclick="fn_select_goodsgroup_list()" onkeypress="this.onclick" class="btn outline"><spring:message code="button.list"/></button>
|
||||
<button class="btn primary" onclick="fn_regist_goodsgroup();"><spring:message code="button.insert"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">상품 그룹</h3>
|
||||
<form id="VariusSubmitFrm" method="post" action="">
|
||||
<input type="hidden" id="goodsGroupInnb" name="goodsGroupInnb" value=""/>
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.BOGoodsgrpVO.pageIndex }"/>"/>
|
||||
<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">
|
||||
<input class="input-text xl" type="text" name="goodsGroupNm" id="goodsGroupNm"
|
||||
title="상품그룹명" maxlength="30">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<div>
|
||||
<span class="ml-10">상품</span>
|
||||
<br>
|
||||
<a href="#" onclick="fn_open_modal('#modalDiv','#product-search','/mngr/goods/goodsmngr/selectGoodsSrchPopupForm',{'goodsKndCd':'01'}); return false;"
|
||||
class="btn xsm primary mt-5">검색</a>
|
||||
</div>
|
||||
<%-- 모든상품 업데이트 삭제 --%>
|
||||
<%-- <br><div class="td-inner">--%>
|
||||
<%-- <div class="b-checkbox-container">--%>
|
||||
<%-- <label class="b-checkbox checkbox">--%>
|
||||
<%-- <input type="checkbox" name="allGoodsUpt" value="Y" >--%>
|
||||
<%-- <span class="check"></span>--%>
|
||||
<%-- <span class="control-label">모든상품 업데이트</span>--%>
|
||||
<%-- </label>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div id="parentGoodsContainer" class="product-group">
|
||||
<!-- 여기에 선택한 상품 정보가 추가됩니다 -->
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</section>
|
||||
<div id="modalDiv"></div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
352
src/main/webapp/WEB-INF/views/mngr/setup/site/GoodsGroupDtlU.jsp
Normal file
352
src/main/webapp/WEB-INF/views/mngr/setup/site/GoodsGroupDtlU.jsp
Normal file
@@ -0,0 +1,352 @@
|
||||
<%@ 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 : GoodsGroupDtlU.jsp
|
||||
Description : 상품그룹수정화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-12-04 전일찬 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
});
|
||||
// 전역변수
|
||||
var cnt = 0;
|
||||
|
||||
/* ********************************************************
|
||||
* 상품 그룹 수정화면 이동
|
||||
******************************************************** */
|
||||
const fn_move_uptpage = function(value) {
|
||||
$('#VariusSubmitFrm').attr('action', '<c:url value="/mngr/setup/site/selectGoodsGroupDtlForm"/>');
|
||||
$('#VariusSubmitFrm').attr('method', 'post');
|
||||
$('#VariusSubmitFrm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 상품 그룹 목록조회
|
||||
******************************************************** */
|
||||
const fn_select_goodsgroup_list = function() {
|
||||
$('#VariusSubmitFrm').attr('action', '<c:url value="/mngr/setup/site/selectGoodsGroupList"/>');
|
||||
$('#VariusSubmitFrm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 상품 그룹 수정
|
||||
******************************************************** */
|
||||
const fn_regist_goodsgroup = function () {
|
||||
const url = '<c:url value="/mngr/setup/site/updateGoodsGroupDtl"/>';
|
||||
const formData = new FormData();
|
||||
|
||||
$('#VariusSubmitFrm').serializeArray().forEach(function (item) {
|
||||
formData.append(item.name, item.value);
|
||||
});
|
||||
|
||||
var goodsIdArr = [];
|
||||
$('input[name=relatedGoodsId]').each(function (i) {
|
||||
goodsIdArr.push($("input[name='relatedGoodsId']").eq(i).attr("value"));
|
||||
})
|
||||
formData.append('goodsIds', goodsIdArr);
|
||||
|
||||
if (confirm('상품 그룹을 <spring:message code="confirm.common.update"/>')) {
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
enctype: 'multipart/form-data',
|
||||
url: url,
|
||||
data: formData,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
let str = JSON.parse(data.resBody.result);
|
||||
if (str.result == 'success') {
|
||||
alert('<spring:message code="success.common.update"/>');
|
||||
fn_move_uptpage(data.resBody.result.replace(/[^0-9]/g, ""));
|
||||
} else {
|
||||
alert('<spring:message code="fail.common.update"/>');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//관련 상품 검색 모달
|
||||
const fn_open_search_modal = function (modalDivSltr, modalSlrt, url, param, callback) {
|
||||
|
||||
submitType = 'POST';
|
||||
|
||||
$.ajax({
|
||||
type: submitType,
|
||||
url: url,
|
||||
data: param,
|
||||
success: function (data) {
|
||||
|
||||
$(modalSlrt).remove();
|
||||
$(modalDivSltr).html(data);
|
||||
|
||||
//최초오픈시에 관련상품 정보 있을 경우 실행
|
||||
if(custom_open_modal_cnt === 0){
|
||||
var tableBody = $("#appendList");
|
||||
const cdnurl = $('#cdnurl').val()
|
||||
selectedDtl.forEach((good, index) => {
|
||||
|
||||
var row = `
|
||||
<tr id="choiseListId` +good.goodsId + `" class="draggable" ondblclick="fn_remove_append_goods_list(this)">
|
||||
<td class="text-left">
|
||||
<input type="hidden" id="goodsInnb" name="goodsInnb" value="` + good.goodsId + `"/>
|
||||
<input type="hidden" id="goodsImgCours" name="goodsImgCours" value="`+cdnurl + good.goodsImg + `"/>
|
||||
<input type="hidden" id="goodsNm" name="goodsNm" value="` + good.goodsNm + `"/>
|
||||
<input type="hidden" id="slepric" name="slepric" value="` + good.goodsPrice + `"/>
|
||||
<input type="hidden" id="goodsSttusNm" name="goodsSttusNm" value="` + good.goodsSttusNm + `"/>
|
||||
<div class="product-search-box__product">
|
||||
<img src="`+cdnurl + good.goodsImg+ `"
|
||||
onerror="this.src='<c:url value="/mngr/images/image_placeholder.png"/>'"
|
||||
alt="` +good.goodsNm+ `" width="64">
|
||||
` +good.goodsNm+ `
|
||||
</div>
|
||||
</td>
|
||||
<td>` +good.goodsPrice+ `</td>
|
||||
<td>` +good.goodsSttusNm+ `</td>
|
||||
</tr>
|
||||
`;
|
||||
|
||||
tableBody.append(row);
|
||||
});
|
||||
|
||||
custom_open_modal_cnt++;
|
||||
}
|
||||
$(modalSlrt).modal();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* custom open modal function
|
||||
******************************************************** */
|
||||
let custom_open_modal_cnt = 0;
|
||||
//현재 등록된 관련 상품 정보
|
||||
let selectedDtl = [];
|
||||
const fn_custom_open_modal = (modalDivSltr, modalSlrt, url, param, callback) => {
|
||||
|
||||
selectedDtl = [];
|
||||
|
||||
if(custom_open_modal_cnt === 0){
|
||||
console.log("df");
|
||||
$('.product-group__item').each(function() {
|
||||
const goodsId = $(this).find('input[name="relatedGoodsId"]').val();
|
||||
const goodsImg = $(this).find('input[name="relatedGoodsImg"]').val();
|
||||
const goodsNm = $(this).find('input[name="relatedGoodsNm"]').val();
|
||||
const goodsPrice = $(this).find('input[name="relatedGoodsPrice"]').val();
|
||||
const goodsSttusNm = $(this).find('input[name="goodsSttusNm"]').val();
|
||||
|
||||
selectedDtl.push({
|
||||
goodsId: goodsId,
|
||||
goodsImg: goodsImg,
|
||||
goodsNm: goodsNm,
|
||||
goodsPrice: goodsPrice,
|
||||
goodsSttusNm: goodsSttusNm
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
console.log("seletedDtl :", selectedDtl);
|
||||
fn_open_search_modal(modalDivSltr, modalSlrt, url, param, callback);
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 상품 검색 팝업 배열 값 불러오기
|
||||
******************************************************** */
|
||||
var selected = [];
|
||||
|
||||
function fn_select_goods_search() {
|
||||
|
||||
selected = [];
|
||||
|
||||
$('#appendList tr').each(function() {
|
||||
const goodsId = $(this).attr('id').replace('choiseListId', '');
|
||||
const goodsImg = $(this).find('input[name="goodsImgCours"]').val();
|
||||
const goodsNm = $(this).find('input[name="goodsNm"]').val();
|
||||
const goodsPrice = $(this).find('input[name="slepric"]').val();
|
||||
const goodsSttusNm = $(this).find('input[name="goodsSttusNm"]').val();
|
||||
|
||||
selected.push({
|
||||
goodsId: goodsId,
|
||||
goodsImg: goodsImg,
|
||||
goodsNm: goodsNm,
|
||||
goodsPrice: goodsPrice,
|
||||
goodsSttusNm: goodsSttusNm
|
||||
});
|
||||
});
|
||||
|
||||
// 각 화면에 맞춰서 HTML 변경 START
|
||||
var tableBody = $("#parentGoodsContainer");
|
||||
tableBody.empty();
|
||||
|
||||
selected.forEach((good, index) => {
|
||||
|
||||
var productHtml = `
|
||||
<div class="product-group__item">
|
||||
<input type="hidden" id="relatedGoodsId" name="relatedGoodsId" value="` + good.goodsId+ `">
|
||||
<input type="hidden" id="goodsSttusNm" name="goodsSttusNm" value="` + good.goodsSttusNm + `">
|
||||
<span class="product-group__item-number">` + (index + 1) + `</span>
|
||||
<div class="product-group__image">
|
||||
<img src="` + good.goodsImg+ `" width="140" alt="` + good.goodsNm+ `"
|
||||
onerror="this.src='/mngr/images/image_placeholder.png'"
|
||||
>
|
||||
</div>
|
||||
<div class="product-group__description">
|
||||
<p>` + good.goodsNm+ `</p>
|
||||
<p class="product-group__description-price">` + good.goodsPrice+ `원</p>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
tableBody.append(productHtml);
|
||||
});
|
||||
// 각 화면에 맞춰서 HTML 변경 END
|
||||
|
||||
fn_close_modal('product-search');
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 상품 검색 팝업 > 상품 목록 조회
|
||||
******************************************************** */
|
||||
const fn_goods_search_popup_list = function (pageIndex,selected) {
|
||||
let dataStr;
|
||||
if (!pageIndex) {
|
||||
$('#pageIndex').val(1);
|
||||
} else {
|
||||
$('#pageIndex').val(pageIndex);
|
||||
}
|
||||
|
||||
$('#popupListForm').find('input[name=pageIndex]').eq(0).val(pageIndex);
|
||||
const popupListForm = $("#popupListForm").serialize();
|
||||
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<c:url value="/mngr/goods/goodsmngr/selectGoodsSrchPopupList"/>",
|
||||
data: popupListForm,
|
||||
success: function (resultHtml) {
|
||||
$('#goodsList').empty();
|
||||
$('#goodsList').html(resultHtml);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<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">
|
||||
<button onclick="fn_select_goodsgroup_list()" onkeypress="this.onclick" class="btn outline"><spring:message code="button.list"/></button>
|
||||
<button class="btn primary" onclick="fn_regist_goodsgroup();"><spring:message code="button.update"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">상품 그룹</h3>
|
||||
<form id="VariusSubmitFrm" method="post" action="">
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
||||
<input type="hidden" id="cdnurl" value="${cdnurl}"/>
|
||||
<input type="hidden" id="goodsGroupInnb" name="goodsGroupInnb" value="<c:out value="${ resultMap.BOGoodsgrpVO.goodsGroupInnb }"/>"/>
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.BOGoodsgrpVO.pageIndex }"/>"/>
|
||||
<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">
|
||||
<input class="input-text xl" type="text" name="goodsGroupNm" id="goodsGroupNm"
|
||||
title="상품그룹명" value="<c:out value="${ resultMap.BOGoodsgrpVO.goodsGroupNm }"/>" maxlength="30">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<div>
|
||||
<span class="ml-10">상품</span>
|
||||
<br>
|
||||
<c:if test="${not empty resultMap.goodsInfo}">
|
||||
<a href="#" onclick="fn_custom_open_modal('#modalDiv','#product-search','/mngr/goods/goodsmngr/selectGoodsSrchPopupForm',{'goodsKndCd':'01'}); return false;"
|
||||
class="btn xsm primary mt-5">검색</a>
|
||||
</c:if>
|
||||
<c:if test="${empty resultMap.goodsInfo}">
|
||||
<a href="#" onclick="fn_open_modal('#modalDiv','#product-search','/mngr/goods/goodsmngr/selectGoodsSrchPopupForm',{'goodsKndCd':'01'}); return false;"
|
||||
class="btn xsm primary mt-5">검색</a>
|
||||
</c:if>
|
||||
</div>
|
||||
<%-- 모든상품 업데이트 삭제 --%>
|
||||
<%-- <br><div class="td-inner">--%>
|
||||
<%-- <div class="b-checkbox-container">--%>
|
||||
<%-- <label class="b-checkbox checkbox">--%>
|
||||
<%-- <input type="checkbox" name="allGoodsUpt" value="Y" <c:if test="resultMap.BOGoodsgrpVO.allGoodsupt eq 'Y'">checked</c:if>>--%>
|
||||
<%-- <span class="check"></span>--%>
|
||||
<%-- <span class="control-label">모든상품 업데이트</span>--%>
|
||||
<%-- </label>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div id="parentGoodsContainer" class="product-group">
|
||||
<%-- <c:if test="${resultMap.BOGoodsgrpVO.allGoodsupt ne 'Y'}">--%>
|
||||
<!-- 여기에 선택한 상품 정보가 추가됩니다 -->
|
||||
<c:if test="${not empty resultMap.goodsInfo}">
|
||||
<c:forEach items="${ resultMap.goodsInfo }" var="goodsInfo" varStatus="gdsInfoStatus">
|
||||
<div class="product-group__item">
|
||||
<input type="hidden" id="relatedGoodsId" name="relatedGoodsId" value="<c:out value="${(goodsInfo.goodsInnb)}"/>">
|
||||
<input type="hidden" name="relatedGoodsNm" value="<c:out value="${(goodsInfo.goodsNm)}"/>">
|
||||
<input type="hidden" name="relatedGoodsImg" value="<c:out value="${(goodsInfo.img)}"/>">
|
||||
<input type="hidden" name="relatedGoodsPrice" value="<c:out value="${(goodsInfo.slepric)}"/>">
|
||||
<input type="hidden" name="goodsSttusNm" value="<c:out value="${(goodsInfo.goodsSttusNm)}"/>">
|
||||
<span class="product-group__item-number"><c:out value="${(gdsInfoStatus.count)}"/></span>
|
||||
<div class="product-group__image">
|
||||
<img src="<c:out value="${cdnurl}${goodsInfo.img}"/>" onerror="this.src='/mngr/images/image_placeholder.png'" width="140" alt="<c:out value="${(goodsInfo.goodsNm)}"/>">
|
||||
</div>
|
||||
<div class="product-group__description">
|
||||
<p><c:out value="${(goodsInfo.goodsNm)}"/></p>
|
||||
<p class="product-group__description-price"><c:out value="${(goodsInfo.slepric)}"/>원</p>
|
||||
</div>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<%-- </c:if>--%>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</section>
|
||||
<div id="modalDiv"></div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,157 @@
|
||||
<%@ 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 : GoodsGroupListR.jsp
|
||||
Description : 상품그룹 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-12-04 전일찬 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
|
||||
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 상품 그룹 수정화면 이동
|
||||
******************************************************** */
|
||||
const fn_move_uptpage = function(value) {
|
||||
$('#VariusSubmitFrm').attr('action', '<c:url value="/mngr/setup/site/selectGoodsGroupDtlForm"/>');
|
||||
$('#VariusSubmitFrm').attr('method', 'post');
|
||||
$('#goodsGroupInnb').val(value);
|
||||
$('#VariusSubmitFrm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 상품 그룹 등록화면 이동
|
||||
******************************************************** */
|
||||
const fn_move_registPg = function() {
|
||||
$('#VariusSubmitFrm').attr('action', '<c:url value="/mngr/setup/site/selectGoodsGroupForm"/>');
|
||||
$('#VariusSubmitFrm').attr('method', 'post');
|
||||
$('#VariusSubmitFrm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 상품 그룹 목록조회
|
||||
******************************************************** */
|
||||
const fn_select_goodsgroup_list = function(pageIndex) {
|
||||
if(!pageIndex) {
|
||||
$('#pageIndex').val(1);
|
||||
} else {
|
||||
$('#pageIndex').val(pageIndex);
|
||||
}
|
||||
|
||||
$('#VariusSubmitFrm').attr('action', '<c:url value="/mngr/setup/site/selectGoodsGroupList"/>');
|
||||
$('#pageIndex').val(pageIndex);
|
||||
$('#VariusSubmitFrm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 상품 그룹 삭제
|
||||
******************************************************** */
|
||||
const fn_delete_goodsgroup = function(value) {
|
||||
if(confirm('상품 그룹을 <spring:message code="confirm.common.delete"/>')) {
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '<c:url value="/mngr/setup/site/deleteGoodsGroup"/>',
|
||||
data : { goodsGroupInnb : value },
|
||||
success : function(data) {
|
||||
let str = JSON.parse(data.resBody.result);
|
||||
if (str.result == 'success') {
|
||||
alert('<spring:message code="success.common.delete"/>');
|
||||
fn_select_goodsgroup_list(1);
|
||||
} else {
|
||||
alert('<spring:message code="fail.common.delete"/>');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<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_move_registPg" onclick="fn_move_registPg(); return false;" class="btn primary">상품그룹 <spring:message code="button.insert"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<form id="VariusSubmitFrm" method="post" action="">
|
||||
<input type="hidden" id="goodsGroupInnb" name="goodsGroupInnb" value=""/>
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.BOGoodsgrpVO.pageIndex }"/>"/>
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>상품그룹 목록</caption>
|
||||
<!-- 각 열 width 설정 -->
|
||||
<colgroup>
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 20%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>그룹구분</th>
|
||||
<th>그룹명</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.goodsGroupList }">
|
||||
<c:forEach items="${ resultMap.goodsGroupList }" var="list" varStatus="status">
|
||||
<tr>
|
||||
<td><c:out value="${ resultMap.paginationInfo.totalRecordCount - list.rnum +1 }"/></td>
|
||||
<td class="center"><c:out value="${list.goodsGroupDvCdNm}"/></td>
|
||||
<td class="left"><c:out value="${list.goodsGroupNm}"/></td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<button class="btn xsm primary outline" onclick="fn_move_uptpage('<c:out value="${list.goodsGroupInnb}"/>')"><spring:message code="button.update"/></button>
|
||||
<c:if test="${ list.goodsGroupDvCd ne '02' }">
|
||||
<button class="btn xsm dark" onclick="fn_delete_goodsgroup('<c:out value="${list.goodsGroupInnb}"/>')"><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>
|
||||
</form>
|
||||
</section>
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_goodsgroup_list"/>
|
||||
</div>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,294 @@
|
||||
<%@ 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"%>
|
||||
<%--
|
||||
Class Name : GoodsSerchPopup.jsp
|
||||
Description : 상품 검색 팝업
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.01 전일찬 최초 생성
|
||||
--%>
|
||||
<div id="product-search" class="modal" style="max-width: 1200px;">
|
||||
<div class="modal-header">
|
||||
<h4>상품 검색</h4>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<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">
|
||||
<input class="input-text xl" type="text" title="해당 인풋에 대한 설명"
|
||||
placeholder="상품명(매입상품명), 상품코드">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>상태</th>
|
||||
<td>
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" value="">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">정상</span>
|
||||
</label>
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" value="">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">품절</span>
|
||||
</label>
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" value="">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">재고확보중</span>
|
||||
</label>
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" value="">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">판매중지</span>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<th>노출 여부</th>
|
||||
<td>
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-200" name="r-group200" checked="">
|
||||
<label for="r-200">전체</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-201" name="r-group200">
|
||||
<label for="r-201">노출</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-203" name="r-group200">
|
||||
<label for="r-203">미노출</label>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>카테고리</th>
|
||||
<td colspan="3">
|
||||
<div class="input-container gap-4">
|
||||
<div class="select-box">
|
||||
<select title="해당 셀렉트에 대한 설명">
|
||||
<option value="">1차 카테고리</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="select-box">
|
||||
<select title="해당 셀렉트에 대한 설명">
|
||||
<option value="">2차 카테고리</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="select-box">
|
||||
<select title="해당 셀렉트에 대한 설명">
|
||||
<option value="">3차 카테고리</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="select-box">
|
||||
<select title="해당 셀렉트에 대한 설명">
|
||||
<option value="">4차 카테고리</option>
|
||||
</select>
|
||||
</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">검색</button>
|
||||
</div>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
<div class="product-search-box">
|
||||
<div class="table-wrapper left">
|
||||
<table class="table vertical tight">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col>
|
||||
<col style="width: 16%;">
|
||||
<col style="width: 16%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>상품명</th>
|
||||
<th>판매가</th>
|
||||
<th>노출여부</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<div class="product-search-box__product">
|
||||
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
|
||||
메타바이옴 V2 다이어트 유산균 1박스
|
||||
</div>
|
||||
</td>
|
||||
<td>55,000</td>
|
||||
<td>노출</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<div class="product-search-box__product">
|
||||
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
|
||||
메타바이옴 V2 다이어트 유산균 1박스
|
||||
</div>
|
||||
</td>
|
||||
<td>55,000</td>
|
||||
<td>노출</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<div class="product-search-box__product">
|
||||
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
|
||||
메타바이옴 V2 다이어트 유산균 1박스
|
||||
</div>
|
||||
</td>
|
||||
<td>55,000</td>
|
||||
<td>노출</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<div class="product-search-box__product">
|
||||
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
|
||||
메타바이옴 V2 다이어트 유산균 1박스
|
||||
</div>
|
||||
</td>
|
||||
<td>55,000</td>
|
||||
<td>노출</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<div class="product-search-box__product">
|
||||
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
|
||||
메타바이옴 V2 다이어트 유산균 1박스
|
||||
</div>
|
||||
</td>
|
||||
<td>55,000</td>
|
||||
<td>노출</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<div class="product-search-box__product">
|
||||
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
|
||||
메타바이옴 V2 다이어트 유산균 1박스
|
||||
</div>
|
||||
</td>
|
||||
<td>55,000</td>
|
||||
<td>노출</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<div class="product-search-box__product">
|
||||
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
|
||||
메타바이옴 V2 다이어트 유산균 1박스
|
||||
</div>
|
||||
</td>
|
||||
<td>55,000</td>
|
||||
<td>노출</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<div class="product-search-box__product">
|
||||
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
|
||||
메타바이옴 V2 다이어트 유산균 1박스
|
||||
</div>
|
||||
</td>
|
||||
<td>55,000</td>
|
||||
<td>노출</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<div class="product-search-box__product">
|
||||
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
|
||||
메타바이옴 V2 다이어트 유산균 1박스
|
||||
</div>
|
||||
</td>
|
||||
<td>55,000</td>
|
||||
<td>노출</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<div class="product-search-box__product">
|
||||
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
|
||||
메타바이옴 V2 다이어트 유산균 1박스
|
||||
</div>
|
||||
</td>
|
||||
<td>55,000</td>
|
||||
<td>노출</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<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>
|
||||
</div>
|
||||
<div class="table-wrapper right">
|
||||
<table class="table vertical tight draggable">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col>
|
||||
<col style="width: 16%;">
|
||||
<col style="width: 16%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>상품명</th>
|
||||
<th>판매가</th>
|
||||
<th>노출여부</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<div class="product-search-box__product">
|
||||
<img src="../resources/images/상품이미지01.png" width="64" alt="상품이미지">
|
||||
1111
|
||||
</div>
|
||||
</td>
|
||||
<td>55,000</td>
|
||||
<td>노출</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">취소</a>
|
||||
<button class="btn primary">확인</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,217 @@
|
||||
<%@ 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-02-19 추지훈 최초 생성
|
||||
--%>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
const hiddenTdVal = '<c:out value="${ resultMap.paramVO.relmTdId }"/>';
|
||||
|
||||
if ($(".table.draggable").length > 0) {
|
||||
$(".table.draggable").tableDnD({
|
||||
onDragClass: "dragging",
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//테이블 행 삭제
|
||||
//
|
||||
var table = $("#bannerPopupTable.table");
|
||||
table.on("click", ".circle-btn.delete", function (e) {
|
||||
e.preventDefault();
|
||||
var tbody = $(this).closest("tbody");
|
||||
var tr = $(this).closest("tr");
|
||||
var th = $(this).closest("th");
|
||||
var allHidden = true;
|
||||
tr.siblings().each(function () {
|
||||
if ($(this).css("display") !== "none") {
|
||||
allHidden = false;
|
||||
}
|
||||
});
|
||||
if (th.attr("rowspan") > 1) {
|
||||
tr.next().remove();
|
||||
th.attr("rowspan", th.attr("rowspan") - 1);
|
||||
}
|
||||
tr.remove();
|
||||
if (tbody.children().length == 0 || allHidden) {
|
||||
tbody.append(
|
||||
"<tr class='row-no-data'><td colspan='100' class='text-center'>데이터가 없습니다.</td></tr>"
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
<%--구분에 따른 이미지 사이즈 및 이름 변수 설정--%>
|
||||
<c:choose>
|
||||
<c:when test="${ resultMap.resultPopupList.resultContent.relmDvCd eq '01' and resultMap.resultPopupList.resultContent.imgExpsrDvCd eq 'P' }">
|
||||
<c:set var = "relmNm" value = "롤링배너(PC)"/>
|
||||
<c:set var = "height" value="480"/>
|
||||
<c:set var = "width" value="1280"/>
|
||||
</c:when>
|
||||
<c:when test="${ resultMap.resultPopupList.resultContent.relmDvCd eq '01' and resultMap.resultPopupList.resultContent.imgExpsrDvCd eq 'M' }">
|
||||
<c:set var = "relmNm" value = "롤링배너(모바일)"/>
|
||||
<c:set var = "height" value="258"/>
|
||||
<c:set var = "width" value="414"/>
|
||||
</c:when>
|
||||
<c:when test="${ resultMap.resultPopupList.resultContent.relmDvCd eq '12' and resultMap.resultPopupList.resultContent.imgExpsrDvCd eq 'P' }">
|
||||
<c:set var = "relmNm" value = "띠배너(PC)"/>
|
||||
<c:set var = "height" value="130"/>
|
||||
<c:set var = "width" value="1280"/>
|
||||
</c:when>
|
||||
<c:when test="${ resultMap.resultPopupList.resultContent.relmDvCd eq '12' and resultMap.resultPopupList.resultContent.imgExpsrDvCd eq 'M' }">
|
||||
<c:set var = "relmNm" value = "띠배너(모바일)"/>
|
||||
<c:set var = "height" value="85"/>
|
||||
<c:set var = "width" value="430"/>
|
||||
</c:when>
|
||||
<c:when test="${ resultMap.resultPopupList.resultContent.relmDvCd eq '15'}">
|
||||
<c:set var = "relmNm" value = "최상단 띠배너"/>
|
||||
<c:set var = "height" value="50"/>
|
||||
<c:set var = "width" value="1730"/>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
<!-- 롤링배너 설정 팝업 -->
|
||||
<div id="rolling-banner-pop" class="modal mainSetupModal" style="max-width: 800px;">
|
||||
<div class="modal-header">
|
||||
<h4><c:out value="${relmNm}"/></h4>
|
||||
</div>
|
||||
<div class="modal-content" style="height: 500px;">
|
||||
<form id="bannerPopupRegistForm">
|
||||
<div class="table-wrapper" id="bannerPopupRegistDiv">
|
||||
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
|
||||
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
|
||||
<table class="table vertical draggable" id="bannerPopupTable">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 5%;">
|
||||
<col style="width: 40%;">
|
||||
<col>
|
||||
<col style="width: 10%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>순서</th>
|
||||
<th>첨부 파일</th>
|
||||
<th>연결 URL</th>
|
||||
<th>
|
||||
<button class="circle-btn add" type="button" onclick="fn_add_tr('bannerPopupTable', 0); fn_category_initialize('bannerPopTbody');"><span class="visually-hidden">추가</span></button>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="bannerPopTbody">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.result && fn:length( resultMap.resultPopupList.result ) > 0 }">
|
||||
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="draggable-icon-container">
|
||||
<i class="icon icon_draggable"></i>
|
||||
<span class="visually-hidden">순서 바꾸기</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="d-flex flex-col align-items-start gap-5">
|
||||
<c:set var = "display" value = ""/>
|
||||
<c:if test = "${not empty list.sysFilNm}">
|
||||
<c:set var = "display" value = "display:none;"/>
|
||||
</c:if>
|
||||
<div class="input-file" style="${display}">
|
||||
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListBanner${ status.index }');"/>
|
||||
<label for="fileUpload${ status.index }">파일선택</label>
|
||||
</div>
|
||||
<ul class="file-list" id="fileListBanner${ status.index }">
|
||||
<c:if test="${ not empty list.sysFilNm}">
|
||||
<li id="${ list.mainSetupItemInnb}">
|
||||
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this,'${resultMap.paramVO.sopmalCd}','MANC', ${ status.index });">
|
||||
<i class="icon icon_file-list mr-2"></i>
|
||||
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
|
||||
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
|
||||
</a>
|
||||
<button type="button" class="file-list__delete fileDl" onclick="fn_delete_file_at.call(this); deleteFile(this,'${resultMap.paramVO.sopmalCd}','MANC',${status.index});"> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
|
||||
<span class="visually-hidden">파일 삭제</span>
|
||||
</button>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="mainSetupItemInnb" value="<c:out value="${ list.mainSetupItemInnb }"/>"/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="요청 URL" name="itmeCnncUrl" value="<c:out value="${ list.itmeCnncUrl }"/>">
|
||||
</td>
|
||||
<td>
|
||||
<button class="circle-btn delete" type="button" onclick="fn_delete_tr_main('bannerPopupTable', 1); "><span class="visually-hidden">삭제</span></button>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="draggable-icon-container">
|
||||
<i class="icon icon_draggable"></i>
|
||||
<span class="visually-hidden">순서 바꾸기</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="d-flex flex-col align-items-start gap-5">
|
||||
<div class="input-file">
|
||||
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListBanner${ status.index }');"/>
|
||||
<label for="fileUpload${ status.index }">파일선택</label>
|
||||
</div>
|
||||
<ul class="file-list" id="fileListBanner${ status.index }">
|
||||
<c:if test="${ not empty list.sysFilNm}">
|
||||
<li id="${ list.mainSetupItemInnb}">
|
||||
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this,${resultMap.paramVO.sopmalCd},'MANC', ${ status.index });">
|
||||
<i class="icon icon_file-list mr-2"></i>
|
||||
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
|
||||
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
|
||||
</a>
|
||||
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, ${ status.index });"> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
|
||||
<span class="visually-hidden">파일 삭제</span>
|
||||
</button>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="mainSetupItemInnb" value=""/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="요청 URL" name="itmeCnncUrl" value="">
|
||||
</td>
|
||||
<td>
|
||||
<button class="circle-btn delete" type="button" onclick="fn_delete_tr_main('bannerPopupTable', 2); "><span class="visually-hidden">삭제</span></button>
|
||||
</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<p class="fyi blue-7">이미지 사이즈: 가로 ${width}px, 세로 ${height}px 권장</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">취소</a>
|
||||
<button class="btn primary" onclick="fn_popup_regist('bannerPopupRegistForm', 'mainSetupItemInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'rolling-banner-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,154 @@
|
||||
<%@ 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() {
|
||||
|
||||
const containers = document.querySelectorAll('.modal .emoji-container');
|
||||
// 이모지마트 생성(공통)
|
||||
containers.forEach((container, index) => {
|
||||
const button = container.querySelector('.emoji-button');
|
||||
if (!button) return;
|
||||
|
||||
const picker = new EmojiMart.Picker({
|
||||
onEmojiSelect: emoji => {
|
||||
const input = container.querySelector('.emoji-input');
|
||||
input.value += emoji.native;
|
||||
},
|
||||
onClickOutside: (e) => {
|
||||
if (e.target !== button)
|
||||
picker.style.display = 'none';
|
||||
},
|
||||
locale: 'kr',
|
||||
});
|
||||
|
||||
picker.style.display = 'none';
|
||||
document.body.appendChild(picker);
|
||||
|
||||
button.addEventListener('click', () => {
|
||||
picker.style.display = picker.style.display === 'none' ? 'flex' : 'none';
|
||||
const rect = button.getBoundingClientRect();
|
||||
picker.style.position = 'absolute';
|
||||
picker.style.left = rect.left+'px';
|
||||
picker.style.top = rect.bottom + window.scrollY+'px';
|
||||
picker.style.zIndex = 1000;
|
||||
});
|
||||
});
|
||||
|
||||
<%--
|
||||
const hiddenTdVal = '<c:out value="${ resultMap.paramVO.relmTdId }"/>';
|
||||
|
||||
const hiddenTdList = fn_get_popup_data(hiddenTdVal);
|
||||
|
||||
console.log("hiddenTdList", hiddenTdList);
|
||||
|
||||
if (hiddenTdList != null && hiddenTdList.length > 0) {
|
||||
|
||||
// 첫 번째 요소만 처리
|
||||
let firstData = hiddenTdList[0];
|
||||
console.log("첫 번째 요소 data : ", firstData);
|
||||
|
||||
// 메인 타이틀 설정
|
||||
$('input[name="mainSj"]').val(firstData.mainSj);
|
||||
|
||||
// 서브 타이틀 설정
|
||||
$('input[name="subSj"]').val(firstData.subSj);
|
||||
|
||||
}
|
||||
--%>
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<!-- 베스트 리뷰, 매거진 설정 팝업 -->
|
||||
<div id="best-review-pop" class="modal">
|
||||
<div class="modal-header">
|
||||
<h4>
|
||||
<c:choose>
|
||||
<c:when test="${ resultMap.resultPopupList.resultContent.relmDvCd eq '10'}">
|
||||
매거진
|
||||
</c:when>
|
||||
<c:when test="${ resultMap.resultPopupList.resultContent.relmDvCd eq '09'}">
|
||||
베스트 리뷰
|
||||
</c:when>
|
||||
</c:choose>
|
||||
설정
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<h3 class="content-section__inner-title">내용</h3>
|
||||
<form id="bbscttRegistForm">
|
||||
<div class="table-wrapper">
|
||||
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
|
||||
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>서브 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.result}">
|
||||
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
|
||||
<c:if test="${ status.first }">
|
||||
<input type="hidden" name="mainSetupItemInnb" value="${ list.mainSetupItemInnb }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<input type="hidden" name="mainSetupItemInnb" value=""/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<input type="hidden" name="mainSetupInnb" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>"/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="subSj"
|
||||
value="<c:out value="${ resultMap.resultPopupList.resultContent.subSj }"/>">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메인 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="mainSj"
|
||||
placeholder="" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSj }"/>">
|
||||
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
|
||||
<i class=" icon icon_emoji"></i>
|
||||
이모지
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">취소</a>
|
||||
<button class="btn primary" type="button" onclick="fn_popup_regist('bbscttRegistForm', 'mainSetupInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'best-review-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,190 @@
|
||||
<%@ 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 : SiteContentBrandPopup.jsp
|
||||
Description : 브랜드 소개 설정 팝업 jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024-02-19 추지훈 최초 생성
|
||||
--%>
|
||||
<!-- 인스타그램(SNS) 설정 팝업 -->
|
||||
<div id="brand-introduce-pop" class="modal" style="max-width: 800px;">
|
||||
<div class="modal-header">
|
||||
<h4>브랜드 소개 설정</h4>
|
||||
</div>
|
||||
<div class="modal-content" style="height: 400px;">
|
||||
<form id="brandRegistForm">
|
||||
<div class="table-wrapper">
|
||||
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
|
||||
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
|
||||
<table class="table vertical">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>첨부 파일</th>
|
||||
<th>권장사이즈</th>
|
||||
<th>연결 URL</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="popupListTbody">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.result && fn:length( resultMap.resultPopupList.result ) > 0 }">
|
||||
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="d-flex flex-col align-items-start gap-5">
|
||||
<c:set var = "display" value = ""/>
|
||||
<c:if test = "${not empty list.sysFilNm}">
|
||||
<c:set var = "display" value = "display:none;"/>
|
||||
</c:if>
|
||||
<div class="input-file" style="${display}">
|
||||
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListBanner${ status.index }');"/>
|
||||
<label for="fileUpload${ status.index }">파일선택</label>
|
||||
</div>
|
||||
<ul class="file-list" id="fileListBanner${ status.index }">
|
||||
<c:if test="${ not empty list.sysFilNm}">
|
||||
<li id="${ list.mainSetupItemInnb}">
|
||||
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this,'${resultMap.paramVO.sopmalCd}','MANC', ${ status.index });">
|
||||
<i class="icon icon_file-list mr-2"></i>
|
||||
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
|
||||
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
|
||||
</a>
|
||||
<button type="button" class="file-list__delete fileDl" onclick="fn_delete_file_at.call(this); deleteFile(this,'${resultMap.paramVO.sopmalCd}','MANC',${status.index});"> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
|
||||
<span class="visually-hidden">파일 삭제</span>
|
||||
</button>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td><span class="blue-7">620 * 400</span></td>
|
||||
<td>
|
||||
<input type="hidden" name="mainSetupItemInnb" value="<c:out value="${ list.mainSetupItemInnb }"/>"/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="요청 URL" name="itmeCnncUrl" value="<c:out value="${ list.itmeCnncUrl }"/>">
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="d-flex flex-col align-items-start gap-5">
|
||||
<div class="input-file">
|
||||
<input type="hidden" id="fileAt1" name="fileAt" value=""/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="file" id="fileUpload1" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListBanner1');"/>
|
||||
<label for="fileUpload1">파일선택</label>
|
||||
</div>
|
||||
<ul class="file-list" id="fileListBanner1">
|
||||
<c:if test="${ not empty list.sysFilNm}">
|
||||
<li id="${ list.sysFilNm}">
|
||||
<a href="#" id="${ list.orginlFilNm}1" onclick="downloadFile(this, 1);">
|
||||
<i class="icon icon_file-list mr-2"></i>
|
||||
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
|
||||
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
|
||||
</a>
|
||||
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, 1); "> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
|
||||
<span class="visually-hidden">파일 삭제</span>
|
||||
</button>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td><span class="blue-7">620 * 400</span></td>
|
||||
<td>
|
||||
<input type="hidden" name="mainSetupItemInnb" value=""/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="요청 URL" name="itmeCnncUrl" value="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="d-flex flex-col align-items-start gap-5">
|
||||
<div class="input-file">
|
||||
<input type="hidden" id="fileAt2" name="fileAt" value=""/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="file" id="fileUpload2" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListBanner2');"/>
|
||||
<label for="fileUpload2">파일선택</label>
|
||||
</div>
|
||||
<ul class="file-list" id="fileListBanner2">
|
||||
<c:if test="${ not empty list.sysFilNm}">
|
||||
<li id="${ list.sysFilNm}">
|
||||
<a href="#" id="${ list.orginlFilNm}2" onclick="downloadFile(this, 2);">
|
||||
<i class="icon icon_file-list mr-2"></i>
|
||||
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
|
||||
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
|
||||
</a>
|
||||
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, 2); "> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
|
||||
<span class="visually-hidden">파일 삭제</span>
|
||||
</button>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td rowspan="2"><span class="blue-7">620 * 180</span></td>
|
||||
<td>
|
||||
<input type="hidden" name="mainSetupItemInnb" value=""/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="요청 URL" name="itmeCnncUrl" value="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="d-flex flex-col align-items-start gap-5">
|
||||
<div class="input-file">
|
||||
<input type="hidden" id="fileAt3" name="fileAt" value=""/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="file" id="fileUpload3" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListBanner3');"/>
|
||||
<label for="fileUpload3">파일선택</label>
|
||||
</div>
|
||||
<ul class="file-list" id="fileListBanner3">
|
||||
<c:if test="${ not empty list.sysFilNm}">
|
||||
<li id="${ list.sysFilNm}">
|
||||
<a href="#" id="${ list.orginlFilNm}3" onclick="downloadFile(this, 3);">
|
||||
<i class="icon icon_file-list mr-2"></i>
|
||||
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
|
||||
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
|
||||
</a>
|
||||
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, 3); "> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
|
||||
<span class="visually-hidden">파일 삭제</span>
|
||||
</button>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="mainSetupItemInnb" value=""/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="요청 URL" name="itmeCnncUrl" value="">
|
||||
</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">취소</a>
|
||||
<button class="btn primary" type="button" onclick="fn_popup_regist('brandRegistForm', 'mainSetupItemInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'brand-introduce-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/admin/js/script.js" defer=""></script>
|
||||
@@ -0,0 +1,304 @@
|
||||
<%@ 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-02-19 추지훈 최초 생성
|
||||
--%>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#boardRegistForm').on('keydown', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
$('#registBtn').trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const containers = document.querySelectorAll('.modal .emoji-container');
|
||||
// 이모지마트 생성(공통)
|
||||
containers.forEach((container, index) => {
|
||||
const button = container.querySelector('.emoji-button');
|
||||
if (!button) return;
|
||||
|
||||
const picker = new EmojiMart.Picker({
|
||||
onEmojiSelect: emoji => {
|
||||
const input = container.querySelector('.emoji-input');
|
||||
input.value += emoji.native;
|
||||
},
|
||||
onClickOutside: (e) => {
|
||||
if (e.target !== button)
|
||||
picker.style.display = 'none';
|
||||
},
|
||||
locale: 'kr',
|
||||
});
|
||||
|
||||
picker.style.display = 'none';
|
||||
document.body.appendChild(picker);
|
||||
|
||||
button.addEventListener('click', () => {
|
||||
picker.style.display = picker.style.display === 'none' ? 'flex' : 'none';
|
||||
const rect = button.getBoundingClientRect();
|
||||
picker.style.position = 'absolute';
|
||||
picker.style.left = rect.left+'px';
|
||||
picker.style.top = rect.bottom + window.scrollY+'px';
|
||||
picker.style.zIndex = 1000;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- FAQ 설정 팝업 -->
|
||||
<div id="faq-pop" class="modal" style="max-width: 1000px;">
|
||||
<div class="modal-header">
|
||||
<h4>FAQ 설정</h4>
|
||||
</div>
|
||||
<div class="modal-content" style="height: 400px;">
|
||||
<h3 class="content-section__inner-title">내용</h3>
|
||||
<form id="boardRegistForm">
|
||||
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
|
||||
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.result }">
|
||||
<c:forEach var="list" items="${ resultMap.resultPopupList.result }" varStatus="status">
|
||||
<c:if test="${ status.first }">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
</colgroup>
|
||||
<tbody id="popupListTbody">
|
||||
<tr>
|
||||
<th>FAQ<br>메인 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input type="hidden" name="mainSetupItemInnb" value="<c:out value="${ list.mainSetupItemInnb }"/>"/>
|
||||
<input class="input-text full emoji-input" type="text" title="FAQ 메인 타이틀" name="itemMainSj"
|
||||
placeholder="" value="<c:out value="${ list.itemMainSj }"/>"/>
|
||||
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
|
||||
<i class=" icon icon_emoji"></i>
|
||||
이모지
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>FAQ<br>서브 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text full" type="text" title="FAQ 서브타이틀" placeholder="" name="itemSubSj"
|
||||
value="<c:out value="${ list.itemSubSj }"/>"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${ status.index == 1 }">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>이용안내<br>메인 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input type="hidden" name="mainSetupItemInnb" value="<c:out value="${ list.mainSetupItemInnb }"/>"/>
|
||||
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="itemMainSj"
|
||||
placeholder="" value="<c:out value="${ list.itemMainSj }"/>"/>
|
||||
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
|
||||
<i class=" icon icon_emoji"></i>
|
||||
이모지
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>이용안내<br>서브 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemSubSj"
|
||||
value="<c:out value="${ list.itemSubSj }"/>"/>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${ status.last }">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
</colgroup>
|
||||
<tbody id="popupListTbody2">
|
||||
<tr>
|
||||
<th>고객센터<br>메인 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input type="hidden" name="mainSetupItemInnb" value="<c:out value="${ list.mainSetupItemInnb }"/>"/>
|
||||
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="cscMainSj"
|
||||
placeholder="" value="<c:out value="${ list.cscMainSj }"/>"/>
|
||||
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
|
||||
<i class=" icon icon_emoji"></i>
|
||||
이모지
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
</colgroup>
|
||||
<tbody >
|
||||
<tr>
|
||||
<th>FAQ<br>메인 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input type="hidden" name="mainSetupItemInnb" value=""/>
|
||||
<input class="input-text full emoji-input" type="text" title="FAQ 메인 타이틀" name="itemMainSj"
|
||||
placeholder="" value=""/>
|
||||
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
|
||||
<i class=" icon icon_emoji"></i>
|
||||
이모지
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>FAQ<br>서브 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text full" type="text" title="FAQ 서브타이틀" placeholder="" name="itemSubSj"
|
||||
value=""/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
</colgroup>
|
||||
<tbody id="">
|
||||
<tr>
|
||||
<th>이용안내<br>메인 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input type="hidden" name="mainSetupItemInnb" value=""/>
|
||||
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="itemMainSj"
|
||||
placeholder="" value=""/>
|
||||
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
|
||||
<i class=" icon icon_emoji"></i>
|
||||
이모지
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>이용안내<br>서브 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemSubSj"
|
||||
value=""/>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
</colgroup>
|
||||
<tbody >
|
||||
<tr>
|
||||
<th>고객센터<br>메인 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input type="hidden" name="mainSetupItemInnb" value=""/>
|
||||
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="cscMainSj"
|
||||
placeholder="" value=""/>
|
||||
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
|
||||
<i class=" icon icon_emoji"></i>
|
||||
이모지
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">취소</a>
|
||||
<button class="btn primary" id="registBtn" type="button" onclick="fn_popup_regist('boardRegistForm', 'mainSetupItemInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'faq-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/mngr/js/script.js" defer=""></script>
|
||||
@@ -0,0 +1,374 @@
|
||||
<%@ 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() {
|
||||
|
||||
$('#goods2TyRegistForm').on('keydown', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
$('#registBtn').trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const containers = document.querySelectorAll('.modal .emoji-container');
|
||||
// 이모지마트 생성(공통)
|
||||
containers.forEach((container, index) => {
|
||||
const button = container.querySelector('.emoji-button');
|
||||
if (!button) return;
|
||||
|
||||
const picker = new EmojiMart.Picker({
|
||||
onEmojiSelect: emoji => {
|
||||
const input = container.querySelector('.emoji-input');
|
||||
input.value += emoji.native;
|
||||
},
|
||||
onClickOutside: (e) => {
|
||||
if (e.target !== button)
|
||||
picker.style.display = 'none';
|
||||
},
|
||||
locale: 'kr',
|
||||
});
|
||||
|
||||
picker.style.display = 'none';
|
||||
document.body.appendChild(picker);
|
||||
|
||||
button.addEventListener('click', () => {
|
||||
picker.style.display = picker.style.display === 'none' ? 'flex' : 'none';
|
||||
const rect = button.getBoundingClientRect();
|
||||
picker.style.position = 'absolute';
|
||||
picker.style.left = rect.left+'px';
|
||||
picker.style.top = rect.bottom + window.scrollY+'px';
|
||||
picker.style.zIndex = 1000;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
<%--
|
||||
const hiddenTdVal = '<c:out value="${ resultMap.paramVO.relmTdId }"/>';
|
||||
|
||||
const hiddenTdList = fn_get_popup_data(hiddenTdVal);
|
||||
|
||||
console.log("hiddenTdList", hiddenTdList);
|
||||
|
||||
if (hiddenTdList != null && hiddenTdList.length > 0) {
|
||||
|
||||
// 첫 번째 요소만 처리
|
||||
let firstData = hiddenTdList[0];
|
||||
console.log("첫 번째 요소 data : ", firstData);
|
||||
|
||||
// 메인 타이틀 설정
|
||||
$('input[name="mainSj"]').val(firstData.mainSj);
|
||||
|
||||
// 서브 타이틀 설정
|
||||
$('input[name="subSj"]').val(firstData.subSj);
|
||||
|
||||
// 우측 메인 타이틀 설정
|
||||
$('input[name="mainRghtSj"]').val(firstData.mainRghtSj);
|
||||
|
||||
// 우측 서브 타이틀 설정
|
||||
$('input[name="subRghtSj"]').val(firstData.subRghtSj);
|
||||
}
|
||||
--%>
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<!-- 상품 - 2열 타입 설정 팝업 -->
|
||||
<div id="twoBytwo-type-pop" class="modal" style="max-width: 1000px;">
|
||||
<div class="modal-header">
|
||||
<h4>상품 - 2X2 타입 설정</h4>
|
||||
</div>
|
||||
<div class="modal-content" style="height: 500px;">
|
||||
<h3 class="content-section__inner-title">내용 <span class="blue-7">*pc만 적용됨</span></h3>
|
||||
<form id="goods2TyRegistForm">
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.result && fn:length(resultMap.resultPopupList.result) > 0 }">
|
||||
<c:forEach var="list" items="${ resultMap.resultPopupList.result }" varStatus="status">
|
||||
<c:if test="${ status.first }">
|
||||
<th>좌측 영역<br>서브 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="hidden" name="mainSetupItemInnb" value="<c:out value="${ list.mainSetupItemInnb }"/>"/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemSubSj"
|
||||
value="<c:out value="${ list.itemSubSj }"/>"/>
|
||||
</div>
|
||||
</td>
|
||||
</c:if>
|
||||
<c:if test="${ status.last }">
|
||||
<th>우측 영역<br>서브 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="hidden" name="mainSetupItemInnb" value="<c:out value="${ list.mainSetupItemInnb }"/>"/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemSubSj"
|
||||
value="<c:out value="${ list.itemSubSj }"/>"/>
|
||||
</div>
|
||||
</td>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<th>좌측 영역<br>서브 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="hidden" name="mainSetupItemInnb" value=""/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemSubSj"
|
||||
value=""/>
|
||||
</div>
|
||||
</td>
|
||||
<th>우측 영역<br>서브 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="hidden" name="mainSetupItemInnb" value=""/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemSubSj"
|
||||
value=""/>
|
||||
</div>
|
||||
</td>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tr>
|
||||
<tr>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.result && fn:length(resultMap.resultPopupList.result) > 0 }">
|
||||
<c:forEach var="list" items="${ resultMap.resultPopupList.result }" varStatus="status">
|
||||
<c:if test="${ status.first }">
|
||||
<th>좌측 영역<br>메인 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="itemMainSj"
|
||||
placeholder="" value="<c:out value="${ list.itemMainSj }"/>"/>
|
||||
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
|
||||
<i class=" icon icon_emoji"></i>
|
||||
이모지
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</c:if>
|
||||
<c:if test="${ status.last }">
|
||||
<th>우측 영역<br>메인 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="itemMainSj"
|
||||
placeholder="" value="<c:out value="${ list.itemMainSj }"/>"/>
|
||||
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
|
||||
<i class=" icon icon_emoji"></i>
|
||||
이모지
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<th>좌측 영역<br>메인 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="itemMainSj"
|
||||
placeholder="" value=""/>
|
||||
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
|
||||
<i class=" icon icon_emoji"></i>
|
||||
이모지
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>우측 영역<br>메인 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="itemMainSj"
|
||||
placeholder="" value=""/>
|
||||
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
|
||||
<i class=" icon icon_emoji"></i>
|
||||
이모지
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container mb-10">
|
||||
<div class="left">
|
||||
<h3 class="content-section__inner-title mb-0">상품 그룹</h3>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<button type="button" id="goodsGrpBtn" onclick="fn_open_goodsGrp();" class="btn xsm outline">설정</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.result && fn:length(resultMap.resultPopupList.result) > 0 }">
|
||||
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
|
||||
<c:if test="${ status.first }">
|
||||
<th>좌측 상품 그룹</th>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
|
||||
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="status">
|
||||
<c:choose>
|
||||
<c:when test="${ list.goodsGroupInnb eq cdList.goodsGroupInnb }">
|
||||
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>" selected="selected"><c:out value="${ cdList.goodsGroupNm }"/></option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</c:if>
|
||||
<c:if test="${ status.last }">
|
||||
<th>우측 상품 그룹</th>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
|
||||
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
|
||||
<c:choose>
|
||||
<c:when test="${ list.goodsGroupInnb eq cdList.goodsGroupInnb }">
|
||||
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>" selected="selected"><c:out value="${ cdList.goodsGroupNm }"/></option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<th>좌측 상품 그룹</th>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
|
||||
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="status">
|
||||
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<th>우측 상품 그룹</th>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
|
||||
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
|
||||
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<%--
|
||||
<div class="form-control-container mb-10">
|
||||
<div class="left">
|
||||
<h3 class="content-section__inner-title mb-0">상품 정보</h3>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<a href="" class="btn xsm outline">설정</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
상품정보
|
||||
</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="full" title="해당 셀렉트에 대한 설명" name="goodsExpsrInfoInnb">
|
||||
<c:forEach var="list" items="${ resultMap.resultPopupList.goodsExpsrInfoList }" varStatus="">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb && resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb eq list.goodsExpsrInfoInnb }">
|
||||
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>" selected="selected" ><c:out value="${ list.goodsInfoSetupSj }"/></option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>"><c:out value="${ list.goodsInfoSetupSj }"/></option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
--%>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">취소</a>
|
||||
<button class="btn primary" id="registBtn" type="button" onclick="fn_popup_regist('goods2TyRegistForm', 'mainSetupItemInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'twoBytwo-type-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/admin/js/script.js" defer=""></script>
|
||||
@@ -0,0 +1,246 @@
|
||||
<%@ 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-02-19 추지훈 최초 생성
|
||||
--%>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
const containers = document.querySelectorAll('.modal .emoji-container');
|
||||
// 이모지마트 생성(공통)
|
||||
containers.forEach((container, index) => {
|
||||
const button = container.querySelector('.emoji-button');
|
||||
if (!button) return;
|
||||
|
||||
const picker = new EmojiMart.Picker({
|
||||
onEmojiSelect: emoji => {
|
||||
const input = container.querySelector('.emoji-input');
|
||||
input.value += emoji.native;
|
||||
},
|
||||
onClickOutside: (e) => {
|
||||
if (e.target !== button)
|
||||
picker.style.display = 'none';
|
||||
},
|
||||
locale: 'kr',
|
||||
});
|
||||
|
||||
picker.style.display = 'none';
|
||||
document.body.appendChild(picker);
|
||||
|
||||
button.addEventListener('click', () => {
|
||||
picker.style.display = picker.style.display === 'none' ? 'flex' : 'none';
|
||||
const rect = button.getBoundingClientRect();
|
||||
picker.style.position = 'absolute';
|
||||
picker.style.left = rect.left+'px';
|
||||
picker.style.top = rect.bottom + window.scrollY+'px';
|
||||
picker.style.zIndex = 1000;
|
||||
});
|
||||
});
|
||||
|
||||
<%--
|
||||
const hiddenTdVal = '<c:out value="${ resultMap.paramVO.relmTdId }"/>';
|
||||
|
||||
const hiddenTdList = fn_get_popup_data(hiddenTdVal);
|
||||
|
||||
console.log("hiddenTdList", hiddenTdList);
|
||||
|
||||
if (hiddenTdList != null && hiddenTdList.length > 0) {
|
||||
|
||||
// 첫 번째 요소만 처리
|
||||
let firstData = hiddenTdList[0];
|
||||
console.log("첫 번째 요소 data : ", firstData);
|
||||
|
||||
// 메인 타이틀 설정
|
||||
$('input[name="mainSj"]').val(firstData.mainSj);
|
||||
|
||||
// 서브 타이틀 설정
|
||||
$('input[name="subSj"]').val(firstData.subSj);
|
||||
|
||||
}
|
||||
--%>
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<!-- 상품 - 4열 타입 설정 팝업 -->
|
||||
<div id="four-type-pop" class="modal" style="max-width: 640px;">
|
||||
<div class="modal-header">
|
||||
<h4>상품 - 4열 타입 설정</h4>
|
||||
</div>
|
||||
<div class="modal-content" style="height: 400px;">
|
||||
<h3 class="content-section__inner-title">내용</h3>
|
||||
<form id="goods4TyRegistForm">
|
||||
<div class="table-wrapper">
|
||||
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
|
||||
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>서브 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="hidden" name="mainSetupInnb" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>"/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="subSj"
|
||||
value="<c:out value="${ resultMap.resultPopupList.resultContent.subSj }"/>"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메인 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="mainSj"
|
||||
placeholder="" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSj }"/>"/>
|
||||
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
|
||||
<i class=" icon icon_emoji"></i>
|
||||
이모지
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container mb-10">
|
||||
<div class="left">
|
||||
<h3 class="content-section__inner-title mb-0">상품 그룹</h3>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<button type="button" id="goodsGrpBtn" onclick="fn_open_goodsGrp();" class="btn xsm outline">설정</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>상품 그룹</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.result }">
|
||||
<c:forEach var="list" items="${ resultMap.resultPopupList.result }" varStatus="status">
|
||||
<c:if test="${ status.first }">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="mainSetupItemInnb" value="${ list.mainSetupItemInnb }"/>
|
||||
<div class="select-box">
|
||||
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
|
||||
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
|
||||
<c:choose>
|
||||
<c:when test="${ list.goodsGroupInnb eq cdList.goodsGroupInnb }">
|
||||
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>" selected="selected"><c:out value="${ cdList.goodsGroupNm }"/></option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="mainSetupItemInnb" value=""/>
|
||||
<div class="select-box">
|
||||
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
|
||||
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
|
||||
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<%--
|
||||
<div class="form-control-container mb-10">
|
||||
<div class="left">
|
||||
<h3 class="content-section__inner-title mb-0">상품 정보</h3>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<a href="" class="btn xsm outline">설정</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
상품정보
|
||||
</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="full" title="해당 셀렉트에 대한 설명" name="goodsExpsrInfoInnb">
|
||||
<c:forEach var="list" items="${ resultMap.resultPopupList.goodsExpsrInfoList }" varStatus="">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb && resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb eq list.goodsExpsrInfoInnb }">
|
||||
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>" selected="selected" ><c:out value="${ list.goodsInfoSetupSj }"/></option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>"><c:out value="${ list.goodsInfoSetupSj }"/></option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
--%>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">취소</a>
|
||||
<button class="btn primary" type="button" onclick="fn_popup_regist('goods4TyRegistForm', 'mainSetupInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'four-type-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/admin/js/script.js" defer=""></script>
|
||||
@@ -0,0 +1,302 @@
|
||||
<%@ 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() {
|
||||
|
||||
$('#goodsCatgryRegistForm').on('keydown', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
$('#registBtn').trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const containers = document.querySelectorAll('.modal .emoji-container');
|
||||
// 이모지마트 생성(공통)
|
||||
containers.forEach((container, index) => {
|
||||
const button = container.querySelector('.emoji-button');
|
||||
if (!button) return;
|
||||
|
||||
const picker = new EmojiMart.Picker({
|
||||
onEmojiSelect: emoji => {
|
||||
const input = container.querySelector('.emoji-input');
|
||||
input.value += emoji.native;
|
||||
},
|
||||
onClickOutside: (e) => {
|
||||
if (e.target !== button)
|
||||
picker.style.display = 'none';
|
||||
},
|
||||
locale: 'kr',
|
||||
});
|
||||
|
||||
picker.style.display = 'none';
|
||||
document.body.appendChild(picker);
|
||||
|
||||
button.addEventListener('click', () => {
|
||||
picker.style.display = picker.style.display === 'none' ? 'flex' : 'none';
|
||||
const rect = button.getBoundingClientRect();
|
||||
picker.style.position = 'absolute';
|
||||
picker.style.left = rect.left+'px';
|
||||
picker.style.top = rect.bottom + window.scrollY+'px';
|
||||
picker.style.zIndex = 1000;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<!-- 상품 - 카테고리별 타입 설정 팝업 -->
|
||||
<div id="category-type-pop" class="modal mainSetupModal" style="max-width: 640px;">
|
||||
<div class="modal-header">
|
||||
<h4>상품 - 카테고리별 타입 설정</h4>
|
||||
</div>
|
||||
<div class="modal-content" style="height: 500px;">
|
||||
<h3 class="content-section__inner-title">내용</h3>
|
||||
<form id="goodsCatgryRegistForm">
|
||||
<div class="table-wrapper">
|
||||
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
|
||||
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>서브 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="subSj"
|
||||
value="<c:out value="${ resultMap.resultPopupList.resultContent.subSj }"/>">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메인 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="mainSj"
|
||||
placeholder="" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSj }"/>">
|
||||
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
|
||||
<i class=" icon icon_emoji"></i>
|
||||
이모지
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container mb-10">
|
||||
<div class="left">
|
||||
<h3 class="content-section__inner-title mb-0">카테고리</h3>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical" id="goodsCatgryTyTable">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 25%;">
|
||||
<col style="width: 65%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>카테고리</th>
|
||||
<th>이미지</th>
|
||||
<th>
|
||||
<button class="circle-btn add" type="button" onclick="fn_add_tr('goodsCatgryTyTable', 0,'','','','N'); fn_category_initialize('categoryPopTbody');"><span class="visually-hidden">추가</span></button>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="categoryPopTbody">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.result && fn:length(resultMap.resultPopupList.result) > 0 }">
|
||||
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select title="해당 셀렉트에 대한 설명" name="ctgryId">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.goodsCatgryList }">
|
||||
<c:forEach var="ctgryList" items="${ resultMap.resultPopupList.goodsCatgryList }" varStatus="">
|
||||
<c:choose>
|
||||
<c:when test="${ list.ctgryId eq ctgryList.ctgryId}">
|
||||
<option value="<c:out value="${ ctgryList.ctgryId }"/>" selected="selected"><c:out value="${ ctgryList.ctgryNm }"/></option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="<c:out value="${ ctgryList.ctgryId }"/>"><c:out value="${ ctgryList.ctgryNm}"/></option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<div class="d-flex align-items-center gap-5">
|
||||
<c:set var="display" value=""/>
|
||||
<c:if test="${not empty list.orginlFilNm}">
|
||||
<c:set var="display" value="display:none;"/>
|
||||
</c:if>
|
||||
<div class="input-file" style="${display}">
|
||||
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListCategory${ status.index }');"/>
|
||||
<label for="fileUpload${ status.index }">파일선택</label>
|
||||
</div>
|
||||
<ul class="file-list" id="fileListCategory${ status.index }">
|
||||
<c:if test="${ not empty list.sysFilNm}">
|
||||
<li id="${ list.mainSetupItemInnb}">
|
||||
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this, '${resultMap.paramVO.sopmalCd}','MANC', ${ status.index });">
|
||||
<i class="icon icon_file-list mr-2"></i>
|
||||
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
|
||||
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
|
||||
</a>
|
||||
<button type="button" class="file-list__delete fileDl" id="" onclick="fn_delete_file_at.call(this); deleteFile(this,'${resultMap.paramVO.sopmalCd}','MANC',${status.index});"> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
|
||||
<span class="visually-hidden">파일 삭제</span>
|
||||
</button>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="mainSetupItemInnb" value="${ list.mainSetupItemInnb }"/>
|
||||
<button class="circle-btn delete" type="button" onclick="fn_delete_tr_main('goodsCatgryTyTable', 1); "><span class="visually-hidden">삭제</span></button>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select class="full" title="해당 셀렉트에 대한 설명" name="ctgryId">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.goodsCatgryList }">
|
||||
<c:forEach var="ctgryList" items="${ resultMap.resultPopupList.goodsCatgryList }" varStatus="">
|
||||
<option value="<c:out value="${ ctgryList.ctgryId }"/>"><c:out value="${ ctgryList.ctgryNm}"/></option>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<div class="d-flex align-items-center gap-5">
|
||||
<div class="input-file">
|
||||
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListCategory${ status.index }');"/>
|
||||
<label for="fileUpload${ status.index }">파일선택</label>
|
||||
</div>
|
||||
<ul class="file-list" id="fileListCategory${ status.index }">
|
||||
<c:if test="${ not empty list.sysFilNm}">
|
||||
<li id="${ list.sysFilNm}">
|
||||
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this, ${ status.index });">
|
||||
<i class="icon icon_file-list mr-2"></i>
|
||||
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
|
||||
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
|
||||
</a>
|
||||
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, ${ status.index }); "> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
|
||||
<span class="visually-hidden">파일 삭제</span>
|
||||
</button>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="mainSetupItemInnb" value=""/>
|
||||
<button class="circle-btn delete" type="button" onclick="fn_delete_tr_main('goodsCatgryTyTable', 1); "><span class="visually-hidden">삭제</span></button>
|
||||
</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="fyi blue-7">이미지 사이즈: 가로 64px, 세로 64px 권장</p>
|
||||
</div>
|
||||
<%--
|
||||
<div class="form-control-container mb-10">
|
||||
<div class="left">
|
||||
<h3 class="content-section__inner-title mb-0">상품 정보</h3>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<a href="" class="btn xsm outline">설정</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
상품정보
|
||||
</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="full" title="해당 셀렉트에 대한 설명" name="goodsExpsrInfoInnb">
|
||||
<c:forEach var="list" items="${ resultMap.resultPopupList.goodsExpsrInfoList }" varStatus="">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb && resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb eq list.goodsExpsrInfoInnb }">
|
||||
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>" selected="selected" ><c:out value="${ list.goodsInfoSetupSj }"/></option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>"><c:out value="${ list.goodsInfoSetupSj }"/></option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
--%>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">취소</a>
|
||||
<button class="btn primary" id="registBtn" type="button" onclick="fn_popup_regist('goodsCatgryRegistForm', 'mainSetupItemInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'category-type-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.resultPopupList.resultContent.relmDvCd }"/>' );">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/mngr/js/script.js" defer=""></script>
|
||||
@@ -0,0 +1,248 @@
|
||||
<%@ 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 src="https://cdn.jsdelivr.net/npm/@joeattardi/emoji-button@3.0.3/dist/index.min.js"></script>
|
||||
|
||||
|
||||
<!-- 이모지 마트 -->
|
||||
<!-- <script src="/mngr/vendor/emoji-mart/browser.js"></script> -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#goodsGroupRegistForm').on('keydown', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
$('#registBtn').trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const containers = document.querySelectorAll('.modal .emoji-container');
|
||||
// 이모지마트 생성(공통)
|
||||
containers.forEach((container, index) => {
|
||||
const button = container.querySelector('.emoji-button');
|
||||
if (!button) return;
|
||||
|
||||
const picker = new EmojiMart.Picker({
|
||||
onEmojiSelect: emoji => {
|
||||
const input = container.querySelector('.emoji-input');
|
||||
input.value += emoji.native;
|
||||
},
|
||||
onClickOutside: (e) => {
|
||||
if (e.target !== button)
|
||||
picker.style.display = 'none';
|
||||
},
|
||||
locale: 'kr',
|
||||
});
|
||||
|
||||
picker.style.display = 'none';
|
||||
document.body.appendChild(picker);
|
||||
|
||||
button.addEventListener('click', () => {
|
||||
picker.style.display = picker.style.display === 'none' ? 'flex' : 'none';
|
||||
const rect = button.getBoundingClientRect();
|
||||
picker.style.position = 'absolute';
|
||||
picker.style.left = rect.left+'px';
|
||||
picker.style.top = rect.bottom + window.scrollY+'px';
|
||||
picker.style.zIndex = 1000;
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<!-- 상품 - 그룹별 타입 설정 팝업 -->
|
||||
<div id="group-type-pop" class="modal" style="max-width: 520px;">
|
||||
<div class="modal-header">
|
||||
<h4>상품 - 그룹별 타입 설정</h4>
|
||||
</div>
|
||||
<div class="modal-content" style="height: 500px;">
|
||||
<h3 class="content-section__inner-title">내용</h3>
|
||||
<form id="goodsGroupRegistForm">
|
||||
<div class="table-wrapper">
|
||||
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
|
||||
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>서브 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text full" type="text" title="서브타이틀" placeholder="" name="subSj"
|
||||
value="<c:out value="${ resultMap.resultPopupList.resultContent.subSj }"/>">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메인 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input class="input-text full emoji-input" type="text" title="메인 타이틀" name="mainSj" id="testId"
|
||||
placeholder="" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSj }"/>">
|
||||
<!-- <button class="btn sm dark emoji-button" type="button" onclick="emoji_open(this, 'modal')"> -->
|
||||
<button class="btn sm dark emoji-button" type="button">
|
||||
<i class="icon icon_emoji"></i> 이모지
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container mb-10">
|
||||
<div class="left">
|
||||
<h3 class="content-section__inner-title mb-0">상품 그룹</h3>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<button type="button" id="goodsGrpBtn" onclick="fn_open_goodsGrp();" class="btn xsm outline">설정</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical" id="goodsGroupTyTable">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 80%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>상품 그룹</th>
|
||||
<th>
|
||||
<button class="circle-btn add" type="button" onclick="fn_add_tr('goodsGroupTyTable', 0, '','','','N');"><span class="visually-hidden">추가</span></button>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="popupListTbody">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.result && fn:length(resultMap.resultPopupList.result) > 0 }">
|
||||
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
|
||||
<option value="">상품을 선택하세요.</option>
|
||||
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
|
||||
<c:choose>
|
||||
<c:when test="${ list.goodsGroupInnb eq cdList.goodsGroupInnb }">
|
||||
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>" selected="selected"><c:out value="${ cdList.goodsGroupNm }"/></option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="mainSetupItemInnb" value="${ list.mainSetupItemInnb }"/>
|
||||
<button class="circle-btn delete" type="button" onclick="fn_delete_tr_main('goodsGroupTyTable', 1);"><span class="visually-hidden">삭제</span></button>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
|
||||
<c:forEach var="list" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
|
||||
<option value="<c:out value="${ list.goodsGroupInnb }"/>"><c:out value="${ list.goodsGroupNm }"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="mainSetupItemInnb" value=""/>
|
||||
<button class="circle-btn delete" type="button" onclick="fn_delete_tr_main('goodsGroupTyTable', 1); "><span class="visually-hidden">삭제</span></button>
|
||||
</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<%--
|
||||
<div class="form-control-container mb-10">
|
||||
<div class="left">
|
||||
<h3 class="content-section__inner-title mb-0">상품 정보</h3>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<a href="" class="btn xsm outline">설정</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
상품정보
|
||||
</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="full" title="해당 셀렉트에 대한 설명" name="goodsExpsrInfoInnb">
|
||||
<c:forEach var="list" items="${ resultMap.resultPopupList.goodsExpsrInfoList }" varStatus="">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb && resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb eq list.goodsExpsrInfoInnb }">
|
||||
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>" selected="selected" ><c:out value="${ list.goodsInfoSetupSj }"/></option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>"><c:out value="${ list.goodsInfoSetupSj }"/></option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
--%>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">취소</a>
|
||||
<button class="btn primary" id="registBtn" type="button" onclick="fn_popup_regist('goodsGroupRegistForm', 'mainSetupItemInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'group-type-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/mngr/js/script.js" defer=""></script>
|
||||
|
||||
|
||||
@@ -0,0 +1,351 @@
|
||||
<%@ 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-02-19 추지훈 최초 생성
|
||||
--%>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
const containers = document.querySelectorAll('.modal .emoji-container');
|
||||
// 이모지마트 생성(공통)
|
||||
containers.forEach((container, index) => {
|
||||
const button = container.querySelector('.emoji-button');
|
||||
if (!button) return;
|
||||
|
||||
const picker = new EmojiMart.Picker({
|
||||
onEmojiSelect: emoji => {
|
||||
const input = container.querySelector('.emoji-input');
|
||||
input.value += emoji.native;
|
||||
},
|
||||
onClickOutside: (e) => {
|
||||
if (e.target !== button)
|
||||
picker.style.display = 'none';
|
||||
},
|
||||
locale: 'kr',
|
||||
});
|
||||
|
||||
picker.style.display = 'none';
|
||||
document.body.appendChild(picker);
|
||||
|
||||
button.addEventListener('click', () => {
|
||||
picker.style.display = picker.style.display === 'none' ? 'flex' : 'none';
|
||||
const rect = button.getBoundingClientRect();
|
||||
picker.style.position = 'absolute';
|
||||
picker.style.left = rect.left+'px';
|
||||
picker.style.top = rect.bottom + window.scrollY+'px';
|
||||
picker.style.zIndex = 1000;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
<%--
|
||||
const hiddenTdVal = '<c:out value="${ resultMap.paramVO.relmTdId }"/>';
|
||||
|
||||
const hiddenTdList = fn_get_popup_data(hiddenTdVal);
|
||||
|
||||
console.log("hiddenTdList", hiddenTdList);
|
||||
|
||||
if (hiddenTdList != null && hiddenTdList.length > 0) {
|
||||
|
||||
// 첫 번째 요소만 처리
|
||||
let firstData = hiddenTdList[0];
|
||||
console.log("첫 번째 요소 data : ", firstData);
|
||||
|
||||
// 메인 타이틀 설정
|
||||
$('input[name="mainSj"]').val(firstData.mainSj);
|
||||
|
||||
// 서브 타이틀 설정
|
||||
$('input[name="subSj"]').val(firstData.subSj);
|
||||
|
||||
// 연결 URL 설정
|
||||
$('input[name="cnncUrl"]').val(firstData.cnncUrl);
|
||||
|
||||
|
||||
|
||||
}
|
||||
--%>
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<!-- 상품 - 이미지배너 타입 설정 팝업 -->
|
||||
<div id="imageBanner-type-pop" class="modal mainSetupModal" style="max-width: 640px;">
|
||||
<div class="modal-header">
|
||||
<h4>상품 - 이미지배너 타입 설정</h4>
|
||||
</div>
|
||||
<div class="modal-content" style="height: 500px;">
|
||||
<h3 class="content-section__inner-title">내용</h3>
|
||||
<form id="goodsImgRegistForm">
|
||||
<div class="table-wrapper">
|
||||
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
|
||||
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>서브 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="hidden" name="mainSetupInnb" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>"/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="subSj"
|
||||
value="<c:out value="${ resultMap.resultPopupList.resultContent.subSj }"/>"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메인 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="mainSj"
|
||||
placeholder="" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSj }"/>"/>
|
||||
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
|
||||
<i class=" icon icon_emoji"></i>
|
||||
이모지
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p class="fyi blue-7">이미지 사이즈: 가로 410px, 세로 410px 권장</p>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.result }">
|
||||
<c:forEach var="list" items="${ resultMap.resultPopupList.result }" varStatus="status">
|
||||
<c:if test="${ status.first }">
|
||||
<tr>
|
||||
<th>이미지</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="d-flex align-items-center gap-5">
|
||||
<div class="input-file" <c:if test = "${not empty list.sysFilNm}">style="display: none;" </c:if>>
|
||||
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListImg${ status.index }');"/>
|
||||
<label for="fileUpload${ status.index }">파일선택</label>
|
||||
</div>
|
||||
<ul class="file-list" id="fileListImg${ status.index }">
|
||||
<c:if test="${ not empty list.sysFilNm}">
|
||||
<li id="${ list.mainSetupItemInnb}">
|
||||
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this,'${resultMap.paramVO.sopmalCd}','MANC', ${ status.index });">
|
||||
<i class="icon icon_file-list mr-2"></i>
|
||||
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
|
||||
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
|
||||
</a>
|
||||
<button type="button" class="file-list__delete fileDl" onclick="fn_delete_file_at.call(this); deleteFile(this, ${ status.index });"> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
|
||||
<span class="visually-hidden">파일 삭제</span>
|
||||
</button>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>URL</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="hidden" name="mainSetupItemInnb" value="${ list.mainSetupItemInnb }"/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itmeCnncUrl"
|
||||
value="<c:out value="${ list.itmeCnncUrl }"/>"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<th>이미지</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="d-flex align-items-center gap-5">
|
||||
<div class="input-file">
|
||||
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListImg${ status.index }');"/>
|
||||
<label for="fileUpload${ status.index }">파일선택</label>
|
||||
</div>
|
||||
<ul class="file-list" id="fileListImg${ status.index }">
|
||||
<c:if test="${ not empty list.sysFilNm}">
|
||||
<li id="${ list.sysFilNm}">
|
||||
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this, ${ status.index });">
|
||||
<i class="icon icon_file-list mr-2"></i>
|
||||
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
|
||||
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
|
||||
</a>
|
||||
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, 1);"> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
|
||||
<span class="visually-hidden">파일 삭제</span>
|
||||
</button>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>URL</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="hidden" name="mainSetupItemInnb" value=""/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itmeCnncUrl"
|
||||
value=""/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container mb-10">
|
||||
<div class="left">
|
||||
<h3 class="content-section__inner-title mb-0">상품 그룹</h3>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<button type="button" id="goodsGrpBtn" onclick="fn_open_goodsGrp();" class="btn xsm outline">설정</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>상품 그룹</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.result }">
|
||||
<c:forEach var="list" items="${ resultMap.resultPopupList.result }" varStatus="status">
|
||||
<c:if test="${ status.first }">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
|
||||
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
|
||||
<c:choose>
|
||||
<c:when test="${ list.goodsGroupInnb eq cdList.goodsGroupInnb }">
|
||||
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>" selected="selected"><c:out value="${ cdList.goodsGroupNm }"/></option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
|
||||
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
|
||||
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<%--
|
||||
<div class="form-control-container mb-10">
|
||||
<div class="left">
|
||||
<h3 class="content-section__inner-title mb-0">상품 정보</h3>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<a href="" class="btn xsm outline">설정</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
상품정보
|
||||
</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="full" title="해당 셀렉트에 대한 설명" name="goodsExpsrInfoInnb">
|
||||
<c:forEach var="list" items="${ resultMap.resultPopupList.goodsExpsrInfoList }" varStatus="">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb && resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb eq list.goodsExpsrInfoInnb }">
|
||||
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>" selected="selected" ><c:out value="${ list.goodsInfoSetupSj }"/></option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>"><c:out value="${ list.goodsInfoSetupSj }"/></option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
--%>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">취소</a>
|
||||
<button class="btn primary" type="button" onclick="fn_popup_regist('goodsImgRegistForm', 'mainSetupInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'imageBanner-type-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/admin/js/script.js" defer=""></script>
|
||||
@@ -0,0 +1,369 @@
|
||||
<%@ 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-02-19 추지훈 최초 생성
|
||||
--%>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
const containers = document.querySelectorAll('.modal .emoji-container');
|
||||
// 이모지마트 생성(공통)
|
||||
containers.forEach((container, index) => {
|
||||
const button = container.querySelector('.emoji-button');
|
||||
if (!button) return;
|
||||
|
||||
const picker = new EmojiMart.Picker({
|
||||
onEmojiSelect: emoji => {
|
||||
const input = container.querySelector('.emoji-input');
|
||||
input.value += emoji.native;
|
||||
},
|
||||
onClickOutside: (e) => {
|
||||
if (e.target !== button)
|
||||
picker.style.display = 'none';
|
||||
},
|
||||
locale: 'kr',
|
||||
});
|
||||
|
||||
picker.style.display = 'none';
|
||||
document.body.appendChild(picker);
|
||||
|
||||
button.addEventListener('click', () => {
|
||||
picker.style.display = picker.style.display === 'none' ? 'flex' : 'none';
|
||||
const rect = button.getBoundingClientRect();
|
||||
picker.style.position = 'absolute';
|
||||
picker.style.left = rect.left+'px';
|
||||
picker.style.top = rect.bottom + window.scrollY+'px';
|
||||
picker.style.zIndex = 1000;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<!-- 상품 - URL타입 설정 팝업 -->
|
||||
<c:choose>
|
||||
<c:when test = "${resultMap.resultPopupList.resultContent.imgExpsrDvCd eq 'P'}"> <%--pc 환경--%>
|
||||
<c:set var="height" value="700"/>
|
||||
<c:set var="width" value="510"/>
|
||||
</c:when>
|
||||
<c:otherwise> <%--모바일 환경--%>
|
||||
<c:set var="height" value="310"/>
|
||||
<c:set var="width" value="332"/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div id="url-type-pop" class="modal mainSetupModal" style="max-width: 640px;">
|
||||
<div class="modal-header">
|
||||
<h4>상품 - URL타입 설정</h4>
|
||||
</div>
|
||||
<div class="modal-content" style="height: 500px;">
|
||||
<h3 class="content-section__inner-title">내용</h3>
|
||||
<form id="goodsUrlRegistForm">
|
||||
<div class="table-wrapper">
|
||||
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
|
||||
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>서브 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="hidden" name="mainSetupInnb" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>"/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="subSj"
|
||||
value="<c:out value="${ resultMap.resultPopupList.resultContent.subSj }"/>"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메인 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="mainSj"
|
||||
placeholder="" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSj }"/>"/>
|
||||
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
|
||||
<i class=" icon icon_emoji"></i>
|
||||
이모지
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p class="fyi blue-7">이미지 사이즈: 가로 ${width}px, 세로 ${height}px 권장</p>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.result}">
|
||||
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
|
||||
<c:if test="${ status.first }">
|
||||
<tr>
|
||||
<th>첨부파일</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="d-flex align-items-center gap-5">
|
||||
<div class="input-file" <c:if test = "${not empty list.sysFilNm}">style="display:none;" </c:if>>
|
||||
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListImg${ status.index }');"/>
|
||||
<label for="fileUpload${ status.index }">파일선택</label>
|
||||
</div>
|
||||
<ul class="file-list" id="fileListImg${ status.index }">
|
||||
<c:if test="${ not empty list.sysFilNm}">
|
||||
<li id="${ list.mainSetupItemInnb}">
|
||||
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this,'${resultMap.paramVO.sopmalCd}','MANC', ${ status.index });">
|
||||
<i class="icon icon_file-list mr-2"></i>
|
||||
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
|
||||
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
|
||||
</a>
|
||||
<button type="button" class="file-list__delete fileDl" onclick="fn_delete_file_at.call(this); deleteFile(this, ${ status.index });"> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
|
||||
<span class="visually-hidden">파일 삭제</span>
|
||||
</button>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메인 설명</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="hidden" name="mainSetupItemInnb" value="${ list.mainSetupItemInnb }"/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemMainDc"
|
||||
value="<c:out value="${ list.itemMainDc }"/>"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>서브 설명</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemSubDc"
|
||||
value="<c:out value="${ list.itemSubDc }"/>"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>URL</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itmeCnncUrl"
|
||||
value="<c:out value="${ list.itmeCnncUrl }"/>"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<th>첨부파일</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="d-flex align-items-center gap-5">
|
||||
<div class="input-file">
|
||||
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListImg${ status.index }');"/>
|
||||
<label for="fileUpload${ status.index }">파일선택</label>
|
||||
</div>
|
||||
<ul class="file-list" id="fileListImg${ status.index }">
|
||||
<c:if test="${ not empty list.sysFilNm}">
|
||||
<li id="${ list.sysFilNm}">
|
||||
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this, ${ status.index });">
|
||||
<i class="icon icon_file-list mr-2"></i>
|
||||
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
|
||||
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
|
||||
</a>
|
||||
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, ${ status.index }); "> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
|
||||
<span class="visually-hidden">파일 삭제</span>
|
||||
</button>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메인 설명</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="hidden" name="mainSetupItemInnb" value=""/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemMainDc"
|
||||
value=""/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>서브 설명</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itemSubDc"
|
||||
value=""/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>URL</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="itmeCnncUrl"
|
||||
value=""/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container mb-10">
|
||||
<div class="left">
|
||||
<h3 class="content-section__inner-title mb-0">상품 그룹</h3>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<button type="button" id="goodsGrpBtn" onclick="fn_open_goodsGrp();" class="btn xsm outline">설정</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>상품 그룹</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.result }">
|
||||
<c:forEach var="list" items="${ resultMap.resultPopupList.result }" varStatus="status">
|
||||
<c:if test="${ status.first }">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
|
||||
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
|
||||
<c:choose>
|
||||
<c:when test="${ list.goodsGroupInnb eq cdList.goodsGroupInnb }">
|
||||
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>" selected="selected"><c:out value="${ cdList.goodsGroupNm }"/></option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="select-box">
|
||||
<select class="full" title="상품 그룹 목록" name="goodsGroupInnb">
|
||||
<c:forEach var="cdList" items="${ resultMap.resultPopupList.goodsGroupList }" varStatus="">
|
||||
<option value="<c:out value="${ cdList.goodsGroupInnb }"/>"><c:out value="${ cdList.goodsGroupNm }"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<%--
|
||||
<div class="form-control-container mb-10">
|
||||
<div class="left">
|
||||
<h3 class="content-section__inner-title mb-0">상품 정보</h3>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<a href="" class="btn xsm outline">설정</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
상품정보
|
||||
</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="full" title="해당 셀렉트에 대한 설명" name="goodsExpsrInfoInnb">
|
||||
<c:forEach var="list" items="${ resultMap.resultPopupList.goodsExpsrInfoList }" varStatus="">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb && resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb eq list.goodsExpsrInfoInnb }">
|
||||
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>" selected="selected" ><c:out value="${ list.goodsInfoSetupSj }"/></option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>"><c:out value="${ list.goodsInfoSetupSj }"/></option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
--%>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">취소</a>
|
||||
<button class="btn primary" type="button" onclick="fn_popup_regist('goodsUrlRegistForm', 'mainSetupInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'url-type-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>', '<c:out value="${ resultMap.paramVO.relmDvCd }"/>' );">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/admin/js/script.js" defer=""></script>
|
||||
1223
src/main/webapp/WEB-INF/views/mngr/setup/site/SiteContentManageU.jsp
Normal file
1223
src/main/webapp/WEB-INF/views/mngr/setup/site/SiteContentManageU.jsp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,162 @@
|
||||
<%@ 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-02-19 추지훈 최초 생성
|
||||
--%>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
<%--
|
||||
const hiddenTdVal = '<c:out value="${ resultMap.paramVO.relmTdId }"/>';
|
||||
|
||||
const hiddenTdList = fn_get_popup_data(hiddenTdVal);
|
||||
|
||||
console.log("hiddenTdList", hiddenTdList);
|
||||
|
||||
if (hiddenTdList != null && hiddenTdList.length > 0) {
|
||||
|
||||
// 첫 번째 요소만 처리
|
||||
let firstData = hiddenTdList[0];
|
||||
console.log("첫 번째 요소 data : ", firstData);
|
||||
|
||||
// 메인 타이틀 설정
|
||||
$('input[name="mainSj"]').val(firstData.mainSj);
|
||||
|
||||
// 계정 설정
|
||||
$('input[name="acnt"]').val(firstData.acnt);
|
||||
|
||||
// 토큰 설정
|
||||
$('input[name="tken"]').val(firstData.tken);
|
||||
|
||||
|
||||
|
||||
}
|
||||
--%>
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<!-- 인스타그램(SNS) 설정 팝업 -->
|
||||
<div id="sns-pop" class="modal">
|
||||
<div class="modal-header">
|
||||
<h4>인스타그램(SNS) 설정</h4>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<h3 class="content-section__inner-title">내용</h3>
|
||||
<form id="snsRegistForm">
|
||||
<div class="table-wrapper">
|
||||
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
|
||||
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>메인 타이틀</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="emoji-container">
|
||||
<input type="hidden" name="mainSetupInnb" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>"/>
|
||||
<input class="input-text full emoji-input" type="text" title="해당 인풋에 대한 설명" name="mainSj"
|
||||
placeholder="" value="<c:out value="${ resultMap.resultPopupList.resultContent.mainSj }"/>"/>
|
||||
<button class="btn sm dark emoji-button" type="button" onclick="initializeEmojiPicker(event)">
|
||||
<i class=" icon icon_emoji"></i>
|
||||
이모지
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<h3 class="content-section__inner-title">인스타그램 연동</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.result }">
|
||||
<c:forEach var="list" items="${ resultMap.resultPopupList.result }" varStatus="status">
|
||||
<c:if test="${ status.first }">
|
||||
<tr>
|
||||
<th>user_id</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="hidden" name="mainSetupItemInnb" value="${ list.mainSetupItemInnb }"/>
|
||||
<input type="hidden" name="pltfomDv" value="instagram"/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="acnt"
|
||||
value="<c:out value="${ list.acnt }"/>"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>token</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="tken"
|
||||
value="<c:out value="${ list.tken }"/>"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<th>user_id</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input type="hidden" name="mainSetupItemInnb" value=""/>
|
||||
<input type="hidden" name="pltfomDv" value="instagram"/>
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="acnt"
|
||||
value=""/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>token</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" placeholder="" name="tken"
|
||||
value=""/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">취소</a>
|
||||
<button class="btn primary" type="button" onclick="fn_popup_regist('snsRegistForm', 'mainSetupInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'sns-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>' );">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/admin/js/script.js" defer=""></script>
|
||||
@@ -0,0 +1,244 @@
|
||||
<%@ 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() {
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<!-- 타임세일 설정 팝업 -->
|
||||
<div id="timesale-pop" class="modal mainSetupModal" style="max-width: 640px;">
|
||||
<div class="modal-header">
|
||||
<h4>타임세일 설정</h4>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<h3 class="content-section__inner-title">배경이미지</h3>
|
||||
<form id="tmeDscntRegistForm">
|
||||
<div class="table-wrapper">
|
||||
<input type="hidden" id="deleteContentsItemList" name="deleteContentsItemList" value=""/>
|
||||
<input type="hidden" id="mainSiteInnb" name="mainSiteInnb" value="<c:out value="${ resultMap.paramVO.mainSiteInnb }"/>"/>
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.result}">
|
||||
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
|
||||
<c:if test="${ status.first }">
|
||||
<tr>
|
||||
<th>첨부파일</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="d-flex align-items-center gap-5">
|
||||
<div class="input-file" <c:if test = "${not empty list.sysFilNm}">style="display:none;" </c:if>>
|
||||
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListImg${ status.index }');"/>
|
||||
<label for="fileUpload${ status.index }">파일선택</label>
|
||||
</div>
|
||||
<ul class="file-list" id="fileListImg${ status.index }">
|
||||
<c:if test="${ not empty list.sysFilNm}">
|
||||
<li id="${ list.mainSetupItemInnb}">
|
||||
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this,${resultMap.paramVO.sopmalCd},'MANC', ${ status.index });">
|
||||
<i class="icon icon_file-list mr-2"></i>
|
||||
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
|
||||
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
|
||||
</a>
|
||||
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, ${ status.index }); fn_delete_file_at.call(this);"> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
|
||||
<span class="visually-hidden">파일 삭제</span>
|
||||
</button>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<th>첨부파일</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="d-flex align-items-center gap-5">
|
||||
<div class="input-file">
|
||||
<input type="hidden" id="fileAt${ status.index }" name="fileAt" value=""/>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<input type="file" id="fileUpload${ status.index }" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" multiple="multiple" onchange="addFilesPopup(event, 1, '#fileListImg${ status.index }');"/>
|
||||
<label for="fileUpload${ status.index }">파일선택</label>
|
||||
</div>
|
||||
<ul class="file-list" id="fileListImg${ status.index }">
|
||||
<c:if test="${ not empty list.sysFilNm}">
|
||||
<li id="${ list.sysFilNm}">
|
||||
<a href="#" id="${ list.orginlFilNm}${ status.index }" onclick="downloadFile(this, ${ status.index });">
|
||||
<i class="icon icon_file-list mr-2"></i>
|
||||
<span class="file-list__item-title fileNm"><c:out value="${ list.orginlFilNm}"/></span>
|
||||
<span class="file-list__item-size fileSz">(<c:out value="${ list.filMg}"/> KB)</span>
|
||||
</a>
|
||||
<button type="button" class="file-list__delete fileDl" onclick="deleteFile(this, ${ status.index }); "> <!-- fn_delete_imgFile('1') deleteFile(this, 1) -->
|
||||
<span class="visually-hidden">파일 삭제</span>
|
||||
</button>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
<span class="blue-7" style="font-size:small">이미지 사이즈: 가로 1280px, 세로 133~850px 권장</span>
|
||||
</div>
|
||||
<div class="form-control-container mb-10">
|
||||
<div class="left">
|
||||
<h3 class="content-section__inner-title mb-0">이벤트 상품</h3>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>이벤트 선택</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.result}">
|
||||
<c:forEach items="${ resultMap.resultPopupList.result }" var="list" varStatus="status">
|
||||
<c:if test="${ status.first }">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="mainSetupItemInnb" value="${ list.mainSetupItemInnb }"/>
|
||||
<c:set var="firstElement" value="${resultMap.resultPopupList.result[0] }" />
|
||||
<div class="select-box">
|
||||
<select class="full" title="이벤트 목록" name="evtInnb">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.tmeDscntEventList }">
|
||||
<c:forEach var="evtList" items="${ resultMap.resultPopupList.tmeDscntEventList }" varStatus="">
|
||||
<c:choose>
|
||||
<c:when test="${ firstElement.evtInnb eq evtList.evtInnb}">
|
||||
<option value="<c:out value="${ evtList.evtInnb }"/>" selected="selected"><c:out value="${ evtList.evtnm}"/></option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="<c:out value="${ evtList.evtInnb }"/>"><c:out value="${ evtList.evtnm}"/></option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="mainSetupItemInnb" value=""/>
|
||||
<div class="select-box">
|
||||
<select class="full" title="이벤트 목록" name="evtInnb">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.tmeDscntEventList }">
|
||||
<c:forEach var="evtList" items="${ resultMap.resultPopupList.tmeDscntEventList }" varStatus="">
|
||||
<option value="<c:out value="${ evtList.evtInnb }"/>"><c:out value="${ evtList.evtnm}"/></option>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<%--
|
||||
<div class="form-control-container mb-10">
|
||||
<div class="left">
|
||||
<h3 class="content-section__inner-title mb-0">상품 정보</h3>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<a href="" class="btn xsm outline">설정</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
상품정보
|
||||
</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="full" title="해당 셀렉트에 대한 설명" name="goodsExpsrInfoInnb">
|
||||
<c:forEach var="list" items="${ resultMap.resultPopupList.goodsExpsrInfoList }" varStatus="">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb && resultMap.resultPopupList.resultContent.goodsExpsrInfoInnb eq list.goodsExpsrInfoInnb }">
|
||||
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>" selected="selected" ><c:out value="${ list.goodsInfoSetupSj }"/></option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="<c:out value="${ list.goodsExpsrInfoInnb }"/>"><c:out value="${ list.goodsInfoSetupSj }"/></option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
--%>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">취소</a>
|
||||
<button class="btn primary" type="button" onclick="fn_popup_regist('tmeDscntRegistForm', 'mainSetupItemInnb', '<c:out value="${ resultMap.paramVO.relmTdId }"/>', 'timesale-pop', '<c:out value="${ resultMap.resultPopupList.resultContent.mainSetupInnb }"/>' );">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
1435
src/main/webapp/WEB-INF/views/mngr/setup/site/SiteHeaderManageU.jsp
Normal file
1435
src/main/webapp/WEB-INF/views/mngr/setup/site/SiteHeaderManageU.jsp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,56 @@
|
||||
<%@ 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 : SiteHeaderPopularGoodsListR.jsp
|
||||
Description : 인기 상품 그룹 상품 목록 조회 jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024-03-19 추지훈 최초 생성
|
||||
--%>
|
||||
|
||||
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.goodsList && fn:length(resultMap.goodsList) > 0 }">
|
||||
<c:set var="count" value="0" />
|
||||
<c:set var="countName" value="0" />
|
||||
<c:forEach items="${ resultMap.goodsList }" var="list" varStatus="status">
|
||||
<tr>
|
||||
|
||||
<td><c:out value="${ list.expsrOrdr }"/></td>
|
||||
<td>
|
||||
<input type="hidden" name="popuylarChngGoodsList[${countName}].goodsInnb" value="<c:out value="${ list.goodsInnb }"/>" />
|
||||
<c:out value="${ list.goodsNm }"/>
|
||||
</td>
|
||||
<td>
|
||||
<div class="custom-radio-container justify-center">
|
||||
<c:forEach var="cdList" items="${ resultMap.populChagCdList }" varStatus="">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="r-${count}" name="popuylarChngGoodsList[${countName}].popularChngDv" value="<c:out value="${ cdList.cd }"/>"
|
||||
<c:if test="${ cdList.cd eq list.popularChngDv }">checked="checked"</c:if>
|
||||
>
|
||||
<label for="r-${count}"><c:out value="${ cdList.cdNm }"/></label>
|
||||
</div>
|
||||
<c:set var="count" value="${count + 1}" />
|
||||
</c:forEach>
|
||||
<c:set var="countName" value="${countName + 1}" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="100%" ><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
Reference in New Issue
Block a user