초기소스
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%--
|
||||
Class Name : MaBsnmInqirePopupR.jsp
|
||||
Description : 사업자 상세조회 팝업
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.19 rvg 최초 생성
|
||||
--%>
|
||||
<div id="business-info-modal" class="modal" style="max-width: 900px;">
|
||||
<div class="modal-header">
|
||||
<h4>사업자 조회</h4>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<h3 class="content-section__title">사업자 정보</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>사업자</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.list }">
|
||||
<c:forEach items="${ resultMap.list }" var="list" varStatus="status">
|
||||
<tr>
|
||||
<th>사업자(회사명)</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.bsnmNm}"/>
|
||||
</div>
|
||||
</td>
|
||||
<th>업태/종목</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.bizcndCn}"/><span class="mx-5 gray-7">/</span><c:out value="${list.itemCn}"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사업자등록번호</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.bizrnb.substring(0,3)}-${list.bizrnb.substring(3,5)}-${list.bizrnb.substring(5)}"/>
|
||||
</div>
|
||||
</td>
|
||||
<th>통신판매업 신고번호</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.mobDclNb}"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>대표자명</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.reprsntvnm}"/>
|
||||
</div>
|
||||
</td>
|
||||
<th>개인정보 보호책임자</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.indvdlinfoPrtcRspnberNm}"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>전화번호</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.telnb}"/>
|
||||
</div>
|
||||
</td>
|
||||
<th>팩스번호</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.fxnb}"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이메일</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.email}"/>
|
||||
</div>
|
||||
</td>
|
||||
<th>영업신고증</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.bsnDclNb}"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사업장 주소</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="address-group">
|
||||
<div class="address-line">
|
||||
<span class="left">우편번호 : </span>
|
||||
<c:out value="${list.zip}"/>
|
||||
</div>
|
||||
<div class="address-line">
|
||||
<span class="left">주소 : </span>
|
||||
<c:out value="${list.lnbAdres}"/>
|
||||
</div>
|
||||
<div class="address-line">
|
||||
<span class="left">상세주소 : </span>
|
||||
<c:out value="${list.dtlAdres}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline">닫기</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,103 @@
|
||||
<%@ 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 : MaBsnmListInqireR.jsp
|
||||
Description : 사업자 목록조회 리스트
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-12-14 박철민 최초 생성(퍼블리싱 적용)
|
||||
2023-12-19 리브가 수정
|
||||
2023-01-10 리브가 검색조건, 페이징정보 유지되도록 수정
|
||||
--%>
|
||||
<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 class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>사업자 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width: 6%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 10%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>사업자명</th>
|
||||
<th>업태/종목</th>
|
||||
<th>사업자등록번호</th>
|
||||
<th>대표자명</th>
|
||||
<th>대표연락처</th>
|
||||
<th>통신판매업신고번호</th>
|
||||
<th>영업신고증</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.list }">
|
||||
<c:forEach items="${ resultMap.list }" var="list" varStatus="status">
|
||||
<tr>
|
||||
<td><c:out value="${ resultMap.paginationInfo.totalRecordCount - list.rnum + 1 }" /></td>
|
||||
<td class="left">
|
||||
<a onclick="fn_open_modal('#modal','#business-info-modal','selectBsnmInqirePopup',{'bsnmInnb': <c:out value="${list.bsnmInnb}"/>}); return false;"
|
||||
class="under-line"><c:out value="${list.bsnmNm}"/></a></td>
|
||||
<td><c:out value="${list.bizcndCn}"/> <c:if test="${ not empty list.itemCn}">/</c:if> <c:out value="${list.itemCn}"/></td>
|
||||
<td><c:out value="${list.bizrnb}"/></td>
|
||||
<td><c:out value="${list.reprsntvnm}"/></td>
|
||||
<td><c:out value="${list.telnb}"/></td>
|
||||
<td><c:out value="${list.mobDclNb}"/></td>
|
||||
<td><c:out value="${list.bsnDclNb}"/></td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<button class="btn xsm primary outline" type="button"
|
||||
onclick="fn_move_dtl_uptpage(<c:out value="${list.bsnmInnb}"/>)">
|
||||
<spring:message code="button.update"/></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="100%"><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_list"/>
|
||||
</div>
|
||||
@@ -0,0 +1,154 @@
|
||||
<%@ 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 : MaBsnmListInqireRForm.jsp
|
||||
Description : 사업자 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-01-10 리브가 최초생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<%-- 공통 include --%>
|
||||
<head>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Include.jsp" %>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
let pageIndex = '<c:out value="${ resultMap.BOBsnmVO.pageIndex }"/>';
|
||||
let pageUnit = '<c:out value="${ resultMap.BOBsnmVO.pageUnit }"/>';
|
||||
fn_select_list(pageIndex, pageUnit);
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 목록 조회
|
||||
******************************************************** */
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url : "<c:url value="/admin/store/bsnm/selectBsnmListInqire"/>",
|
||||
data : dataStr,
|
||||
success:function(resultHtml) {
|
||||
$('#pageDiv').html(resultHtml);
|
||||
$('#pageUnit').niceSelect();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 수정폼 이동
|
||||
******************************************************** */
|
||||
const fn_move_dtl_uptpage = function(Innb) {
|
||||
const url = '<c:url value="/admin/store/bsnm/selectBsnmUpdtForm"/>';
|
||||
|
||||
$('#listForm').attr('action', url);
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#bsnmInnb').val(Innb);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 등록폼 이동
|
||||
******************************************************** */
|
||||
const fn_move_regpage = function() {
|
||||
const url = '<c:url value="/admin/store/bsnm/selectBsnmRegistForm"/>';
|
||||
|
||||
$('#listForm').attr('action', url);
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
history.replaceState({}, null, location.pathname);
|
||||
|
||||
</script>
|
||||
<body>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/admin/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="/admin/store/bsnm/selectBsnmListInqireForm"/>">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="${ resultMap.BOBsnmVO.pageIndex }"/>
|
||||
<input type="hidden" id="bsnmInnb" name="bsnmInnb"/>
|
||||
<section class="content-section" id="search-section">
|
||||
<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="select-box">
|
||||
<select title="검색타입" id="srchType" name="srchType">
|
||||
<option value="BSNM_NM" <c:if test="${ resultMap.BOBsnmVO.srchType == 'BSNM_NM'}">selected="selected"</c:if>>사업자명</option>
|
||||
<option value="BIZRNB" <c:if test="${ resultMap.BOBsnmVO.srchType == 'BIZRNB'}">selected="selected"</c:if>>사업자등록번호</option>
|
||||
<option value="REPRSNTVNM" <c:if test="${ resultMap.BOBsnmVO.srchType == 'REPRSNTVNM'}">selected="selected"</c:if>>대표자명</option>
|
||||
<option value="MOB_DCL_NB" <c:if test="${ resultMap.BOBsnmVO.srchType == 'MOB_DCL_NB'}">selected="selected"</c:if>>통신판매업신고번호</option>
|
||||
</select>
|
||||
</div>
|
||||
<input class="input-text xl" type="text" title="검색어" id="srchStr" name="srchStr" value="<c:out value="${ resultMap.BOBsnmVO.srchStr }" />">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container">
|
||||
<div class="left"></div>
|
||||
<div class="center">
|
||||
<button class="btn outline" id="resetBtn" type="button" onclick="fn_reset_form('search-section'); return false;">초기화</button>
|
||||
<button class="btn primary" id="searchBtn" type="button" onclick="fn_select_list(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>
|
||||
|
||||
<%--모달--%>
|
||||
<div id="modal"/>
|
||||
|
||||
</html>
|
||||
398
src/main/webapp/WEB-INF/views/admin/store/bsnm/MaBsnmRegistC.jsp
Normal file
398
src/main/webapp/WEB-INF/views/admin/store/bsnm/MaBsnmRegistC.jsp
Normal file
@@ -0,0 +1,398 @@
|
||||
<%@ 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 : MaBsnmRegistC.jsp
|
||||
Description : 사업자 등록
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023.12.19 리브가 최초 생성
|
||||
2023-01-10 리브가 검색조건, 페이징정보 유지되도록 수정
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Include.jsp" %>
|
||||
</head>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
$('.bizrnb-container input').on('input', function () {
|
||||
// 사업자번호 필드 값 결합
|
||||
var combinedValue = $('#bizrnb1').val() + $('#bizrnb2').val() + $('#bizrnb3').val();
|
||||
$('#combiBizrnb').val(combinedValue);
|
||||
});
|
||||
|
||||
$('.email-container input').on('input', function () {
|
||||
fn_email_combinedValue();
|
||||
});
|
||||
|
||||
// 이메일 도메인
|
||||
$('#domain-list').change(function () {
|
||||
fn_updateEmailFields();
|
||||
fn_email_combinedValue();
|
||||
});
|
||||
|
||||
fn_replace_kr_eng('#reprsntvnm');
|
||||
fn_replace_kr('#indvdlinfoPrtcRspnberNm');
|
||||
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 한글 영문 공백변환
|
||||
******************************************************** */
|
||||
const fn_replace_kr_eng = function(id) {
|
||||
$(id).keyup(function() {
|
||||
// 한글, 영문만 허용하고 그 외의 문자는 모두 제거
|
||||
var replace_text = $(this).val().replace(/[^가-힣a-zA-Z\s]/g, '');
|
||||
$(this).val(replace_text);
|
||||
});
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 한글 제외 공백변환
|
||||
******************************************************** */
|
||||
const fn_replace_kr = function(id){
|
||||
$(id).keyup(function() {
|
||||
var replace_text = $(this).val().replace( /[a-z0-9]|[ \[\]{}()<>?|`~!@#$%^&*-_+=,.;:\"'\\]/g, '');
|
||||
$(this).val(replace_text);
|
||||
});
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 이메일 아이디 + '@' + 도메인
|
||||
******************************************************** */
|
||||
const fn_email_combinedValue = function() {
|
||||
if($('#email1').val() != '' && $('#email2').val() != '') {
|
||||
var combinedValue = $('#email1').val() + '@' + $('#email2').val();
|
||||
$('#combiEmail').val(combinedValue);
|
||||
} else {
|
||||
$('#combiEmail').val('');
|
||||
}
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 이메일 도메인 선택
|
||||
******************************************************** */
|
||||
const fn_updateEmailFields = function() {
|
||||
$("#domain-list option:selected").each(function () {
|
||||
if ($(this).val() == '99') { //직접입력일 경우
|
||||
$("#email2").val(''); //값 초기화
|
||||
$("#email2").attr("disabled", false); //활성화
|
||||
} else { //직접입력이 아닐경우
|
||||
$("#email2").val($(this).text()); //선택값 입력
|
||||
$("#email2").attr("disabled", true); //비활성화
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 등록 AJAX
|
||||
******************************************************** */
|
||||
const fn_regist = function() {
|
||||
const url = '<c:url value="/admin/store/bsnm/insertBsnmRegist"/>';
|
||||
const data = $('#listForm').serializeArray();
|
||||
|
||||
data.push({ name: 'email', value: $('#combiEmail').val() });
|
||||
|
||||
const bizrnb1 = $('#bizrnb1').val()
|
||||
const bizrnb2 = $('#bizrnb2').val()
|
||||
const bizrnb3 = $('#bizrnb3').val()
|
||||
|
||||
|
||||
const bizrnb = bizrnb1+'-'+bizrnb2+'-'+bizrnb3
|
||||
data.push({ name: 'bizrnb', value: bizrnb });
|
||||
|
||||
|
||||
|
||||
if(confirm('사업자를 <spring:message code="confirm.common.insert"/>')) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: url,
|
||||
data: data,
|
||||
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 if(str.result=='dublechk'){
|
||||
alert("이미 등록된 사업자등록번호 입니다.");
|
||||
} else{
|
||||
alert('<spring:message code="fail.common.insert"/>');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 사업자등록번호 중복 조회 AJAX
|
||||
******************************************************** */
|
||||
function fn_id_doubleCheck() {
|
||||
const url = '<c:url value="/admin/store/bsnm/selectBizrnbDplctInqire"/>';
|
||||
var combiBizrnb = $('#combiBizrnb').val();
|
||||
|
||||
if(combiBizrnb.length != 10){
|
||||
alert("사업자등록번호는 10자리 입니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
const bizrnb1 = $('#bizrnb1').val()
|
||||
const bizrnb2 = $('#bizrnb2').val()
|
||||
const bizrnb3 = $('#bizrnb3').val()
|
||||
|
||||
|
||||
const bizrnb = bizrnb1+'-'+bizrnb2+'-'+bizrnb3
|
||||
let data = {
|
||||
'bizrnb': bizrnb
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url : url,
|
||||
data : JSON.stringify(data),
|
||||
contentType :'application/json',
|
||||
success:function(result) {
|
||||
const message = JSON.parse(result.resBody.result)
|
||||
if(message === 0){
|
||||
alert('사용가능한 사업자등록번호 입니다.');
|
||||
return false;
|
||||
}else{
|
||||
alert('이미 등록된 사업자등록번호 입니다.');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 우편번호 찾기
|
||||
******************************************************** */
|
||||
const fn_set_postcode = function(data) {
|
||||
$('#postcode').val(data.postcode);
|
||||
if(data.addressType === '02') {
|
||||
$('#address').val(data.jibunAddress);
|
||||
} else {
|
||||
$('#address').val(data.roadAddress);
|
||||
}
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 수정폼 이동
|
||||
******************************************************** */
|
||||
const fn_move_dtl_uptpage = function(Innb) {
|
||||
const url = '<c:url value="/admin/store/bsnm/selectBsnmUpdtForm"/>';
|
||||
|
||||
$('#listForm').attr('action', url);
|
||||
$('#listForm').attr('method', 'get');
|
||||
$('#pageIndex').val(1);
|
||||
$('#bsnmInnb').val(Innb);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 목록 조회
|
||||
******************************************************** */
|
||||
const fn_select_list = function() {
|
||||
const url = '<c:url value="/admin/store/bsnm/selectBsnmListInqireForm"/>';
|
||||
|
||||
$('#listForm').attr('action', url);
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 숫자만 허용
|
||||
******************************************************** */
|
||||
function fn_only_num(input) {
|
||||
var regex = /[^0-9]/g;
|
||||
input.value = input.value.replace(regex, '');
|
||||
input.value = input.value.toUpperCase();
|
||||
}
|
||||
|
||||
</script>
|
||||
<body>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/admin/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.catalog"/></button>
|
||||
<button class="btn primary" onclick="fn_regist();" ><spring:message code="button.insert"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<form id="listForm" method="post" action="<c:url value="/admin/store/bsnm/insertBsnmRegist"/>">
|
||||
<input type="hidden" id="combiBizrnb" name="combiBizrnb" value="">
|
||||
<input type="hidden" id="combiEmail" name="combiEmail" value="">
|
||||
<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="bsnmNm" name="bsnmNm" title="사업자(회사명)" maxlength="35">
|
||||
</div>
|
||||
</td>
|
||||
<th>업태/종목</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text" type="text" id="bizcndCn" name="bizcndCn" title="업태" placeholder="예) 제조업" maxlength="20">
|
||||
<span class="mx-5 gray-7">/</span>
|
||||
<input class="input-text" type="text" id="itemCn" name="itemCn" title="종목" placeholder="예) 건강식품" maxlength="20">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사업자등록번호<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="bizrnb-container">
|
||||
<input type="text" class="input-text xsm" oninput="fn_only_num(this)" id="bizrnb1" name="bizrnb1" min="0" maxlength=3 title="사업자등록번호1" required="required">
|
||||
<span class="mx-3 fs-16">-</span>
|
||||
<input type="text" class="input-text xsm" oninput="fn_only_num(this)" id="bizrnb2" name="bizrnb2" min="0" maxlength=2 title="사업자등록번호2" required="required">
|
||||
<span class="mx-3 fs-16">-</span>
|
||||
<input type="text" class="input-text xsm" oninput="fn_only_num(this)" id="bizrnb3" name="bizrnb3" min="0" maxlength=5 title="사업자등록번호3" required="required">
|
||||
</div>
|
||||
<button type="button"
|
||||
onclick="fn_id_doubleCheck(); return false;"
|
||||
class="address-line__find-btn"><spring:message code="button.doubleCheck"/>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
<th>통신판매업 신고번호<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text" type="text" id="mobDclNb" name="mobDclNb" title="통신판매업 신고번호" maxlength="35">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>대표자명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text" type="text" id="reprsntvnm" name="reprsntvnm" title="대표자명" maxlength="20">
|
||||
</div>
|
||||
</td>
|
||||
<th>개인정보 보호책임자<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text" type="text" id="indvdlinfoPrtcRspnberNm" name="indvdlinfoPrtcRspnberNm" title="개인정보 보호책임자" maxlength="20">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>전화번호<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text" type="text" id="telnb" oninput="fn_set_event(this, 'keyup', fn_fmt_telno)" name="telnb" title="전화번호" maxlength="13">
|
||||
</div>
|
||||
</td>
|
||||
<th>팩스번호</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text" type="text" id="fxnb" name="fxnb" oninput="fn_set_event(this, 'keyup', fn_fmt_telno)" title="팩스번호" maxlength="13">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이메일<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="email-container" id="email" name="email">
|
||||
<input type="text" class="input-text sm" id="email1" name="email1" title="이메일 아이디" maxlength="20" required="required">
|
||||
<span class="mx-3 gray-7 fs-16">@</span>
|
||||
<input type="text" class="input-text sm" id="email2" name="email2" title="이메일 도메인" maxlength="20" required="required">
|
||||
</div>
|
||||
<div class="select-box">
|
||||
<select title="도메인 선택" id="domain-list" name="domain-list">
|
||||
<c:forEach var="codeList" items="${ resultMap.codeList[0].emailAdres }" varStatus="">
|
||||
<c:choose>
|
||||
<c:when test="${codeList.cd eq '99'}">
|
||||
<option value="${codeList.cd}" selected>${codeList.cdNm}</option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="${codeList.cd}">${codeList.cdNm}</option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>영업신고증</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text" type="text" id="bsnDclNb" name="bsnDclNb" title="영업신고증" maxlength="20">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사업장 주소<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="address-group">
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">우편번호</span>
|
||||
<input type="text" id="postcode" class="input-text xsm mr-2" value="" readonly
|
||||
title="사업장 우편번호" name="zip">
|
||||
<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" id="address" class="input-text md" value="" readonly
|
||||
title="사업장 주소" name="lnbAdres">
|
||||
</div>
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">상세주소</span>
|
||||
<input type="text" id="detailAddress" class="input-text md" value="" maxlength="35"
|
||||
title="사업장 상세주소" name="dtlAdres">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!--검색 조건 , 페이징 조건 -->
|
||||
<input type="hidden" id="bsnmInnb" name="bsnmInnb" value=""/>
|
||||
<input type="hidden" id="srchType" name="srchType" title="검색타입" value="<c:out value="${ resultMap.BOBsnmVO.srchType }"/>">
|
||||
<input type="hidden" id="srchStr" name="srchStr" title="검색어" value="<c:out value="${ resultMap.BOBsnmVO.srchStr }"/>">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.BOBsnmVO.pageIndex }"/>"/>
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="<c:out value="${ resultMap.BOBsnmVO.pageUnit }"/>"/>
|
||||
|
||||
|
||||
</form>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
389
src/main/webapp/WEB-INF/views/admin/store/bsnm/MaBsnmUpdtU.jsp
Normal file
389
src/main/webapp/WEB-INF/views/admin/store/bsnm/MaBsnmUpdtU.jsp
Normal file
@@ -0,0 +1,389 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page import="java.util.Arrays" %>
|
||||
<%@ page import="java.util.List" %>
|
||||
<%@ 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 : MaBsnmUpdtU.jsp
|
||||
Description : 사업자 수정
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023.12.19 리브가 최초 생성
|
||||
2023-01-10 리브가 검색조건, 페이징정보 유지되도록 수정
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Include.jsp" %>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$('.email-container input').on('input', function () {
|
||||
fn_email_combinedValue();
|
||||
});
|
||||
|
||||
// 이메일 도메인
|
||||
$('#domain-list').change(function () {
|
||||
fn_updateEmailFields();
|
||||
fn_email_combinedValue();
|
||||
});
|
||||
|
||||
fn_replace_kr('#reprsntvnm');
|
||||
fn_replace_kr('#indvdlinfoPrtcRspnberNm');
|
||||
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 한글 제외 공백처리
|
||||
******************************************************** */
|
||||
const fn_replace_kr = function(id){
|
||||
$(id).keyup(function() {
|
||||
var replace_text = $(this).val().replace( /[a-z0-9]|[ \[\]{}()<>?|`~!@#$%^&*-_+=,.;:\"'\\]/g, '');
|
||||
$(this).val(replace_text);
|
||||
});
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 이메일 아이디 + '@' + 도메인
|
||||
******************************************************** */
|
||||
const fn_email_combinedValue = function() {
|
||||
if($('#email1').val() != '' && $('#email2').val() != '') {
|
||||
var combinedValue = $('#email1').val() + '@' + $('#email2').val();
|
||||
$('#combiEmail').val(combinedValue);
|
||||
} else {
|
||||
$('#combiEmail').val('');
|
||||
}
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 이메일 도메인 선택
|
||||
******************************************************** */
|
||||
const fn_updateEmailFields = function() {
|
||||
$("#domain-list option:selected").each(function () {
|
||||
if ($(this).val() == '99') { //직접입력일 경우
|
||||
$("#email2").val(''); //값 초기화
|
||||
$("#email2").attr("disabled", false); //활성화
|
||||
} else { //직접입력이 아닐경우
|
||||
$("#email2").val($(this).text()); //선택값 입력
|
||||
$("#email2").attr("disabled", true); //비활성화
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 수정 AJAX
|
||||
******************************************************** */
|
||||
const fn_update = function() {
|
||||
const url = '<c:url value="/admin/store/bsnm/updateBsnmUpdt"/>';
|
||||
const data = $('#listForm').serializeArray();
|
||||
|
||||
data.push({ name: 'email', value: $('#combiEmail').val() });
|
||||
data.push({ name: 'bizrnb', value: $('#combiBizrnb').val() });
|
||||
|
||||
if(confirm('사업자를 <spring:message code="confirm.common.update"/>')) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: url,
|
||||
data: data,
|
||||
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();
|
||||
} else {
|
||||
alert('<spring:message code="fail.common.update"/>');
|
||||
}
|
||||
}, error: function(data){
|
||||
$("#overlay").fadeOut();
|
||||
if(!data.responseJSON.resBody.message) {
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
} else {
|
||||
if(fn_check_json(data.responseJSON.resBody.message)) {
|
||||
const errorObject = JSON.parse(data.responseJSON.resBody.message);
|
||||
if(!errorObject) {
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
} else {
|
||||
if(!errorObject.errorMsg) {
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
} else {
|
||||
alert(errorObject.errorMsg);
|
||||
let isMtched = false;
|
||||
$('.main').eq(0).find('input,select,textarea').each(function(){
|
||||
for(let idx=0; idx<errorObject.errorFields.length; idx++) {
|
||||
if(errorObject.errorFields[idx].indexOf($(this).prop('name')) >= 0) {
|
||||
isMtched = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(isMtched) {
|
||||
$(this).focus();
|
||||
return false;
|
||||
} $('[required]').each(function () {
|
||||
if ($(this).val() === '') {
|
||||
$(this).focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(data.responseJSON.resBody.message) {
|
||||
alert(data.responseJSON.resBody.message);
|
||||
} else {
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 삭제 AJAX
|
||||
******************************************************** */
|
||||
const fn_delete = function() {
|
||||
const url = '<c:url value="/admin/store/bsnm/deleteBsnmDel"/>';
|
||||
const data = $('#listForm').serialize();
|
||||
|
||||
if(confirm('사업자를 <spring:message code="confirm.common.delete"/>')) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: url,
|
||||
data: data,
|
||||
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"/>');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 우편번호 찾기
|
||||
******************************************************** */
|
||||
const fn_set_postcode = function(data) {
|
||||
$('#postcode').val(data.postcode);
|
||||
if(data.addressType === '02') {
|
||||
$('#address').val(data.jibunAddress);
|
||||
} else {
|
||||
$('#address').val(data.roadAddress);
|
||||
}
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 목록 조회
|
||||
******************************************************** */
|
||||
const fn_select_list = function(pageIndex) {
|
||||
const url = '<c:url value="/admin/store/bsnm/selectBsnmListInqireForm"/>';
|
||||
|
||||
$('#listForm').attr('action', url);
|
||||
$('#listForm').attr('method', 'post');
|
||||
if(pageIndex) {
|
||||
$('#pageIndex').val(pageIndex);
|
||||
}
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 수정폼 이동
|
||||
******************************************************** */
|
||||
const fn_move_dtl_uptpage = function() {
|
||||
const url = '<c:url value="/admin/store/bsnm/selectBsnmUpdtForm"/>';
|
||||
|
||||
$('#listForm').attr('action', url);
|
||||
$('#listForm').attr('method', 'get');
|
||||
$('#pageIndex').val(1);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
<body>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/admin/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.catalog"/></button>
|
||||
<button class="btn dark" onclick="fn_delete();"><spring:message code="button.delete"/></button>
|
||||
<button class="btn primary outline" onclick="fn_update(); return false;"><spring:message code="button.update"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<form id="listForm" method="post" action="/admin/store/bsnm/selectSopThemaUpdtForm">
|
||||
<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>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.list }">
|
||||
<c:forEach items="${ resultMap.list }" var="list" varStatus="status">
|
||||
<input type="hidden" id="bizrnb" name="bizrnb" value="<c:out value="${list.bizrnb}"/>"/>
|
||||
<input type="hidden" id="bsnmInnb" name="bsnmInnb" value="<c:out value="${list.bsnmInnb}"/>"/>
|
||||
<input type="hidden" id="combiEmail" name="combiEmail" value="<c:out value="${list.email}"/>">
|
||||
<tr>
|
||||
<th>사업자(회사명)<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text md" type="text" id="bsnmNm" name="bsnmNm" value="<c:out value="${list.bsnmNm}"/>" title="사업자(회사명)" maxlength="35">
|
||||
</div>
|
||||
</td>
|
||||
<th>업태/종목</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text" type="text" id="bizcndCn" name="bizcndCn" value="<c:out value="${list.bizcndCn}"/>" title="업태" placeholder="예) 제조업" maxlength="20">
|
||||
<span class="mx-5 gray-7">/</span>
|
||||
<input class="input-text" type="text" id="itemCn" name="itemCn" value="<c:out value="${list.itemCn}"/>" title="종목" placeholder="예) 건강식품" maxlength="20">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사업자등록번호<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="bizrnb-container">
|
||||
<c:out value="${list.bizrnb}"/>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>통신판매업 신고번호<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text" type="text" id="mobDclNb" name="mobDclNb" value="<c:out value="${list.mobDclNb}"/>" title="통신판매업 신고번호" maxlength="35">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>대표자명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text" type="text" id="reprsntvnm" name="reprsntvnm" value="<c:out value="${list.reprsntvnm}"/>" title="대표자명" maxlength="20">
|
||||
</div>
|
||||
</td>
|
||||
<th>개인정보 보호책임자<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text" type="text" id="indvdlinfoPrtcRspnberNm" name="indvdlinfoPrtcRspnberNm" value="<c:out value="${list.indvdlinfoPrtcRspnberNm}"/>" title="개인정보 보호책임자" maxlength="20">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>전화번호<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text" type="text" id="telnb" name="telnb" oninput="fn_set_event(this, 'keyup', fn_fmt_telno)" value="<c:out value="${list.telnb}"/>" title="전화번호" maxlength="13">
|
||||
</div>
|
||||
</td>
|
||||
<th>팩스번호</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text" type="text" id="fxnb" name="fxnb" oninput="fn_set_event(this, 'keyup', fn_fmt_telno)" value="<c:out value="${list.fxnb}"/>" title="팩스번호" maxlength="13">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이메일<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="email-container">
|
||||
<input type="text" class="input-text sm" id="email1" name="email1" value="<c:out value="${list.email1}"/>" title="이메일 아이디" maxlength="20" required="required">
|
||||
<span class="mx-3 gray-7 fs-16">@</span>
|
||||
<input type="text" class="input-text sm" id="email2" name="email2" value="<c:out value="${list.email2}"/>" title="이메일 도메인" maxlength="20" required="required">
|
||||
</div>
|
||||
<div class="select-box">
|
||||
<select title="도메인 선택" id="domain-list" name="domain-list">
|
||||
<c:forEach var="codeList" items="${ resultMap.codeList[0].emailAdres }" varStatus="">
|
||||
<c:choose>
|
||||
<c:when test="${codeList.cd eq '99'}">
|
||||
<option value="${codeList.cd}" selected>${codeList.cdNm}</option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<option value="${codeList.cd}">${codeList.cdNm}</option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>영업신고증</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text" type="text" id="bsnDclNb" name="bsnDclNb" value="<c:out value="${list.bsnDclNb}"/>" title="영업신고증" maxlength="20">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사업장 주소<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="address-group">
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">우편번호</span>
|
||||
<input type="text" id="postcode" class="input-text xsm mr-2" value="<c:out value="${list.zip}"/>" readonly
|
||||
title="사업장 우편번호" name="zip">
|
||||
<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" id="address" class="input-text md" value="<c:out value="${list.lnbAdres}"/>" readonly
|
||||
title="사업장 주소" name="lnbAdres">
|
||||
</div>
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">상세주소</span>
|
||||
<input type="text" id="detailAddress" class="input-text md" value="<c:out value="${list.dtlAdres}"/>" maxlength="35"
|
||||
title="사업장 상세주소" name="dtlAdres">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!--검색 조건 , 페이징 조건 -->
|
||||
<input type="hidden" id="srchType" name="srchType" title="검색타입" value="<c:out value="${ resultMap.BOBsnmVO.srchType }"/>">
|
||||
<input type="hidden" id="srchStr" name="srchStr" title="검색어" value="<c:out value="${ resultMap.BOBsnmVO.srchStr }"/>">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.BOBsnmVO.pageIndex }"/>"/>
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="<c:out value="${ resultMap.BOBsnmVO.pageUnit }"/>"/>
|
||||
|
||||
</form>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
191
src/main/webapp/WEB-INF/views/admin/store/extlink/maExtLinkC.jsp
Normal file
191
src/main/webapp/WEB-INF/views/admin/store/extlink/maExtLinkC.jsp
Normal file
@@ -0,0 +1,191 @@
|
||||
<%@ 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 : maExtLinkC.jsp
|
||||
Description : 외부연동 등록 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024.04.15 전일찬 최초 생성
|
||||
--%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Include.jsp" %>
|
||||
</head>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 외부연동 목록 이동
|
||||
******************************************************** */
|
||||
const fn_goto_list = function() {
|
||||
|
||||
$('#backUpData').attr('action', '<c:url value="/admin/store/extlink/selectExtLinkListForm"/>');
|
||||
$('#backUpData').submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/admin/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 outline" onclick="fn_goto_list()"><spring:message code="button.catalog"/></button>
|
||||
<button type="button" class="btn primary" onclick="fn_regist_extlink();"><spring:message code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<form class="common-form" id="regForm">
|
||||
<input type="hidden" name="srchExtrlNm" value="${resultMap.srchData.srchExtrlNm }" />
|
||||
<input type="hidden" name="srchExtrlSystem" value="${resultMap.srchData.srchExtrlSystem }" />
|
||||
<input type="hidden" name="pageUnit" value="${resultMap.srchData.pageUnit }" />
|
||||
<input type="hidden" name="pageIndex" value="${resultMap.srchData.pageIndex }" />
|
||||
<input type="hidden" name="pageDv" value="" />
|
||||
<input type="hidden" name="useAt" value="Y" />
|
||||
<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%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>외부연동 명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" id="extrlNm" name="extrlNm" title="외부연동명" maxlength="48"/>
|
||||
</div>
|
||||
</td>
|
||||
<th>연동 시스템<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="md" id="extrlSystem" name="extrlSystem" title="외부연동시스템" >
|
||||
<c:forEach var="extlinkSystemList" items="${ resultMap.extLinkSystemList }" varStatus="">
|
||||
<option value="${extlinkSystemList.extlinkSystemCd}"> ${extlinkSystemList.extlinkSystemNm} </option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</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="extrlFunctionLogin" name="extrlFunctionLogin" value="Y">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">가입 및 로그인</span>
|
||||
</label>
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" id="extrlFunctionBuy" name="extrlFunctionBuy" value="Y">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">구매</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Client ID<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" name="extrlClientId" title="clientId" maxlength="150"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Cleint Secret<span class="red-7">*</span></th>
|
||||
<td colspan="2">
|
||||
<div class="td-inner">
|
||||
<textarea class="textarea" name="extrlClientSecret" title="secret" rows="6" maxlength="300"></textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Cleint Pay Secret Key</th>
|
||||
<td colspan="2">
|
||||
<div class="td-inner">
|
||||
<textarea class="textarea" name="extrlClientSecretKey" title="secretKey" rows="6" maxlength="300"></textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="backUpData" method="post" >
|
||||
<input type="hidden" name="srchExtrlNm" value="${resultMap.srchData.srchExtrlNm }" />
|
||||
<input type="hidden" name="srchExtrlSystem" value="${resultMap.srchData.srchExtrlSystem }" />
|
||||
<input type="hidden" name="pageUnit" value="${resultMap.srchData.pageUnit }" />
|
||||
<input type="hidden" name="pageIndex" value="${resultMap.srchData.pageIndex }" />
|
||||
<input type="hidden" name="extrlInnb" value="" />
|
||||
<input type="hidden" name="pageDv" value="" />
|
||||
</form>
|
||||
</main>
|
||||
</body>
|
||||
<script>
|
||||
/* ********************************************************
|
||||
* 외부연동 등록
|
||||
******************************************************** */
|
||||
const fn_regist_extlink = function() {
|
||||
|
||||
if(!confirm('외부연동을 <spring:message code="confirm.common.insert"/>')) return;
|
||||
|
||||
let params = $('#regForm').serialize();
|
||||
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '<c:url value="/admin/store/extlink/insertExtLinkRegist"/>',
|
||||
data : params,
|
||||
success : function (result) {
|
||||
let data = JSON.parse(result.resBody.result);
|
||||
if (data.result === 'fail') {
|
||||
alert('<spring:message code="fail.common.insert"/>');
|
||||
return;
|
||||
}
|
||||
if (data.result === "success") {
|
||||
alert('<spring:message code="success.common.insert"/>');
|
||||
$('#backUpData').find('[name=pageDv]').val('I');
|
||||
$('#backUpData').find('[name=extrlInnb]').val(data.extrlInnb);
|
||||
$('#backUpData').attr('action', '<c:url value="/admin/store/extlink/selectExtLinkUpdtForm"/>');
|
||||
$('#backUpData').submit();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,190 @@
|
||||
<%@ 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 : maExtLinkListForm.jsp
|
||||
Description : 쇼핑몰 외부연동 목록
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024.04.15 전일찬 최초생성
|
||||
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Include.jsp" %>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
let pageIndex = '<c:out value="${ resultMap.paramVO.pageIndex }"/>';
|
||||
let pageUnit = '<c:out value="${ resultMap.paramVO.pageUnit }"/>';
|
||||
let pageDv = '<c:out value="${ resultMap.paramVO.pageDv }"/>';
|
||||
|
||||
if (pageDv == '') {
|
||||
fn_select_extlink_list(pageIndex, pageUnit);
|
||||
} else {
|
||||
fn_select_extlink_list('1', '10');
|
||||
}
|
||||
|
||||
$('[name=srchExtrlNm]').on('keydown', function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
fn_select_extlink_list(1);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/* ********************************************************
|
||||
* 외부연동 목록조회
|
||||
******************************************************** */
|
||||
const fn_select_extlink_list = function(pageIndex, pageUnit) {
|
||||
|
||||
if (pageIndex == undefined || pageUnit == '') {
|
||||
$('#pageIndex').val('1');
|
||||
} else {
|
||||
$('#pageIndex').val(pageIndex);
|
||||
}
|
||||
|
||||
let params = $('#srchForm').serialize();
|
||||
if (pageUnit != undefined || pageUnit == '') {
|
||||
|
||||
params += '&pageUnit=' + pageUnit;
|
||||
} else {
|
||||
params += '&pageUnit=' + $('#pageUnit').val();
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '<c:url value="/admin/store/extlink/selectExtLinkListInqire"/>',
|
||||
data : params,
|
||||
success : function(data) {
|
||||
$('#pageDiv').html(data);
|
||||
$('#pageUnit').niceSelect();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
* 외부연동 검색 초기화
|
||||
***********************************************/
|
||||
const fn_clear_input = function() {
|
||||
|
||||
$('[name=srchExtrlNm]').val('');
|
||||
$('#srchExtrlSystem').val('').niceSelect('update');
|
||||
};
|
||||
|
||||
/**********************************************
|
||||
* 외부연동 등록 화면 이동
|
||||
***********************************************/
|
||||
const fn_move_extlinkRegist = function() {
|
||||
|
||||
$('#srchForm').attr('action', '<c:url value="/admin/store/extlink/selectExtLinkRegistForm"/>');
|
||||
$('#srchForm').attr('method', 'post');
|
||||
$('#srchForm').submit();
|
||||
};
|
||||
/**********************************************
|
||||
* 외부연동 수정 화면 이동
|
||||
***********************************************/
|
||||
const fn_move_extlinkDetail = function(_extlinkInnb) {
|
||||
|
||||
$('#extrlInnb').val(_extlinkInnb);
|
||||
$('#srchForm').attr('action', '<c:url value="/admin/store/extlink/selectExtLinkUpdtForm"/>');
|
||||
$('#srchForm').attr('method', 'post');
|
||||
$('#srchForm').submit();
|
||||
};
|
||||
|
||||
/**********************************************
|
||||
* 외부연동 엑셀 다운로드
|
||||
***********************************************/
|
||||
const fn_down_excelFile = function() {
|
||||
|
||||
$('#srchForm').attr('action', '<c:url value="/admin/store/extlink/excelFileDownload"/>');
|
||||
$('#srchForm').attr('method', 'post');
|
||||
$('#srchForm').submit();
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Left.jsp" %>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">외부연동 목록</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<button class="btn primary" onclick="fn_move_extlinkRegist();">외부연동 <spring:message code="button.insert"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<form id="srchForm">
|
||||
<input type="hidden" id="extrlInnb" name="extrlInnb" />
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="1"/>
|
||||
<%-- 검색 섹션 START --%>
|
||||
<section class="content-section" >
|
||||
<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">
|
||||
<input class="input-text full" type="text" id="srchExtrlNm" name="srchExtrlNm" title="외부연동명" value="${resultMap.paramVO.srchExtrlNm }" />
|
||||
</div>
|
||||
</td>
|
||||
<th>외부연동 시스템</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="md" id="srchExtrlSystem" name="srchExtrlSystem" title="외부연동시스템" >
|
||||
<option value="">전체</option>
|
||||
<c:forEach var="extlinkSystemList" items="${ resultMap.extlinkSystemList }" varStatus="">
|
||||
<option value="${ extlinkSystemList.extlinkSystemCd }" ${f:setSelected(resultMap.paramVO.srchExtrlSystem, extlinkSystemList.extlinkSystemCd)}>${ extlinkSystemList.extlinkSystemNm }</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</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_clear_input();"><spring:message code="button.init"/></button>
|
||||
<button type="button" class="btn primary" onclick="fn_select_extlink_list('1');"><spring:message code="button.search"/></button>
|
||||
</div>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
</section>
|
||||
<%-- 검색 섹션 END --%>
|
||||
<%-- 리스트 출력 섹션 START --%>
|
||||
<div id="pageDiv"></div>
|
||||
</form>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,133 @@
|
||||
<%@ 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 : maExtLinkListR.jsp
|
||||
Description : 외부연동 목록 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024.04.15 전일찬 최초 생성
|
||||
--%>
|
||||
<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_extlink_list('1')">
|
||||
<c:forEach items="${ resultMap.paginationInfo.pageUnitArr }" var="pageUnit" varStatus="pageUnitStatus">
|
||||
<option value="<c:out value="${ pageUnit }"/>" <c:if test="${ resultMap.paramVO.recordCountPerPage eq pageUnit}">selected="selected"</c:if>><c:out value="${ pageUnit }"/>개씩</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="horizontal-line">
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<button type="button" class="btn outline sm" onclick="fn_down_excelFile();">
|
||||
<i class="icon icon_excel"></i>
|
||||
<spring:message code="button.excelDownload"/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="spacing">
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<!-- 각 열 width 설정 -->
|
||||
<colgroup>
|
||||
<col style="width: 4%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 16%;">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 8%;">
|
||||
<col style="width: 8%;">
|
||||
<col style="width: 7%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>외부연동명</th>
|
||||
<th>연동시스템</th>
|
||||
<th>가입 및 로그인</th>
|
||||
<th>구매</th>
|
||||
<th>등록일자</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<%-- 리스트 BODY START --%>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultList }">
|
||||
<c:forEach items="${resultMap.resultList }" var="extLinkList" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<c:out value="${resultMap.paginationInfo.totalRecordCount - extLinkList.rnum + 1 }" />
|
||||
</td>
|
||||
<td class="left">
|
||||
<c:out value="${extLinkList.extrlNm }"/>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${extLinkList.extrlSystemNm}"/>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${ extLinkList.extrlFunctionLogin eq 'Y'}">
|
||||
<span>O</span>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<span>X</span>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${ extLinkList.extrlFunctionBuy eq 'Y'}">
|
||||
<span>O</span>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<span>X</span>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${extLinkList.registDt}"/>
|
||||
</td>
|
||||
<td>
|
||||
<div class="manage-btn-container re">
|
||||
<button type="button" class="btn xsm primary outline" onclick="fn_move_extlinkDetail('${extLinkList.extrlInnb }');"><spring:message code="button.update"/></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td class="row-no-data" colspan="8">조회된 데이터가 없습니다.</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</table>
|
||||
</div>
|
||||
<%-- 리스트 BODY END --%>
|
||||
</section>
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${ resultMap.paginationInfo }" type="image" jsFunction="fn_select_mbrgrad_list" />
|
||||
</div>
|
||||
219
src/main/webapp/WEB-INF/views/admin/store/extlink/maExtLinkU.jsp
Normal file
219
src/main/webapp/WEB-INF/views/admin/store/extlink/maExtLinkU.jsp
Normal file
@@ -0,0 +1,219 @@
|
||||
<%@ 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 : maExtLinkU.jsp
|
||||
Description : 외부연동 수정 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024.04.15 전일찬 최초 생성
|
||||
--%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Include.jsp" %>
|
||||
<%-- <c:import url="/comm/admin/include"/> --%>
|
||||
</head>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 외부연동 목록 이동
|
||||
******************************************************** */
|
||||
const fn_goto_list = function() {
|
||||
|
||||
$('#backUpData').attr('action', '<c:url value="/admin/store/extlink/selectExtLinkListForm"/>');
|
||||
$('#backUpData').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 외부연동 삭제
|
||||
******************************************************** */
|
||||
const fn_delete_extlink = function(_value) {
|
||||
|
||||
if(!confirm('외부연동을 <spring:message code="confirm.common.delete"/>')) return;
|
||||
let params = {'extrlInnb' : _value};
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url : '<c:url value="/admin/store/extlink/deleteExtLinkDel"/>',
|
||||
data: params,
|
||||
success: function (result) {
|
||||
|
||||
let message = JSON.parse(result.resBody.result).result;
|
||||
if (message === 'fail') {
|
||||
alert('<spring:message code="fail.common.delete"/>');
|
||||
return;
|
||||
} else if(message === 'includeShop'){
|
||||
alert('현재 외부연동을 사용 중입니다. 다시 시도해 주세요.');
|
||||
return;
|
||||
} else {
|
||||
alert('<spring:message code="success.common.delete"/>');
|
||||
fn_goto_list();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<body>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Header.jsp" %>
|
||||
<%-- <c:import url="/comm/admin/header"/> --%>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Left.jsp" %>
|
||||
<%-- <c:import url="/comm/admin/left"/> --%>
|
||||
<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 outline" onclick="fn_goto_list()"><spring:message code="button.catalog"/></button>
|
||||
<button type="button" class="btn dark regBtn" onclick="fn_delete_extlink('${resultMap.extLink.extrlInnb }');"><spring:message code="button.delete"/></button>
|
||||
<button type="button" class="btn primary" onclick="fn_update_extlink();"><spring:message code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<form class="common-form" id="regForm">
|
||||
<section class="content-section">
|
||||
<input type="hidden" name="srchExtrlNm" value="${resultMap.srchData.srchExtrlNm }" />
|
||||
<input type="hidden" name="srchExtrlSystem" value="${resultMap.srchData.srchExtrlSystem }" />
|
||||
<input type="hidden" name="pageUnit" value="${resultMap.srchData.pageUnit }" />
|
||||
<input type="hidden" name="pageIndex" value="${resultMap.srchData.pageIndex }" />
|
||||
<input type="hidden" name="extrlInnb" value="${resultMap.extLink.extrlInnb }" />
|
||||
<input type="hidden" name="pageDv" value="" />
|
||||
<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%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>외부연동 명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" name="extrlNm" value="${resultMap.extLink.extrlNm }" title="외부연동명" maxlength="48"/>
|
||||
</div>
|
||||
</td>
|
||||
<th>연동 시스템<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="md" id="extrlSystem" name="extrlSystem" title="외부연동시스템" >
|
||||
<c:forEach var="extLinkSystemList" items="${ resultMap.extLinkSystemList }" varStatus="">
|
||||
<option value="${ extLinkSystemList.extlinkSystemCd }" ${f:setSelected(extLinkSystemList.extlinkSystemCd, resultMap.extLink.extrlSystem)}> ${ extLinkSystemList.extlinkSystemNm }</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</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="extrlFunctionLogin" name="extrlFunctionLogin" ${f:setChecked(resultMap.extLink.extrlFunctionLogin, 'Y')} value="Y">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">가입 및 로그인</span>
|
||||
</label>
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" id="extrlFunctionBuy" name="extrlFunctionBuy" ${f:setChecked(resultMap.extLink.extrlFunctionBuy, 'Y')} value="Y">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">구매</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Client ID<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" name="extrlClientId" value="${resultMap.extLink.extrlClientId }" title="clientId" maxlength="150"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Cleint Secret<span class="red-7">*</span></th>
|
||||
<td colspan="2">
|
||||
<div class="td-inner">
|
||||
<textarea class="textarea" name="extrlClientSecret" title="secret" rows="6" maxlength="300"><c:out value="${resultMap.extLink.extrlClientSecret }"/></textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Cleint Pay Secret Key</th>
|
||||
<td colspan="2">
|
||||
<div class="td-inner">
|
||||
<textarea class="textarea" name="extrlClientSecretKey" title="secretKey" rows="6" maxlength="300"><c:out value="${resultMap.extLink.extrlClientSecretKey }"/></textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="backUpData" method="post" >
|
||||
<input type="hidden" name="srchExtrlNm" value="${resultMap.srchData.srchExtrlNm }" />
|
||||
<input type="hidden" name="srchExtrlSystem" value="${resultMap.srchData.srchExtrlSystem }" />
|
||||
<input type="hidden" name="pageUnit" value="${resultMap.srchData.pageUnit }" />
|
||||
<input type="hidden" name="pageIndex" value="${resultMap.srchData.pageIndex }" />
|
||||
<input type="hidden" name="extrlInnb" value="${resultMap.extLink.extrlInnb }" />
|
||||
<input type="hidden" name="pageDv" value="" />
|
||||
</form>
|
||||
</main>
|
||||
</body>
|
||||
<script>
|
||||
/* ********************************************************
|
||||
* 외부연동 수정
|
||||
******************************************************** */
|
||||
const fn_update_extlink = function() {
|
||||
|
||||
if(!confirm('외부연동을 <spring:message code="confirm.common.update"/>')) return;
|
||||
|
||||
let params = $('#regForm').serialize();
|
||||
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '<c:url value="/admin/store/extlink/updateExtLinkUpdt"/>',
|
||||
data : params,
|
||||
success : function (result) {
|
||||
let data = JSON.parse(result.resBody.result);
|
||||
if (data.result === 'fail') {
|
||||
alert('<spring:message code="fail.common.update"/>');
|
||||
return;
|
||||
}
|
||||
if (data.result === "success") {
|
||||
alert('<spring:message code="success.common.update"/>');
|
||||
$('#backUpData').find('[name=pageDv]').val('I');
|
||||
$('#backUpData').attr('action', '<c:url value="/admin/store/extlink/selectExtLinkUpdtForm"/>');
|
||||
$('#backUpData').submit();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
539
src/main/webapp/WEB-INF/views/admin/store/mbrgrad/maMbrGradC.jsp
Normal file
539
src/main/webapp/WEB-INF/views/admin/store/mbrgrad/maMbrGradC.jsp
Normal file
@@ -0,0 +1,539 @@
|
||||
<%@ 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 : maMbrGradC.jsp
|
||||
Description : 회원 등급 등록 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.22 최범식 최초 생성
|
||||
--%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Include.jsp" %>
|
||||
</head>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
fn_init();
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 숫자만 입력 / 콤마찌긱
|
||||
******************************************************** */
|
||||
const fn_set_comma = function(_target) {
|
||||
|
||||
let str = _target.value;
|
||||
$(_target).val(str.replace(/[^0-9]/g,'').replace(/\B(?=(\d{3})+(?!\d))/g, ','));
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* file button show / file infor hide
|
||||
******************************************************** */
|
||||
const fn_delete_imgFile = function(_arg) {
|
||||
$('#divInfor-' + _arg).hide();
|
||||
$('#f-' + _arg).val('');
|
||||
$('#divFile-' + _arg).show();
|
||||
$('#divInfor-' + _arg).find('.filePh').attr('download', '');
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 파일 이름 가져오기
|
||||
******************************************************** */
|
||||
const fn_set_fileName = function(_target, _arg, event) {
|
||||
|
||||
let tmpPath = URL.createObjectURL(event.target.files[0]);
|
||||
let fileName = _target.files[0].name;
|
||||
let fileSize = '( ' + Math.round(_target.files[0].size / 1024) + ' KB )';
|
||||
|
||||
$(_target).closest('tr').find('.filePh').attr('href', tmpPath);
|
||||
$(_target).closest('tr').find('.fileNm').text(fileName);
|
||||
$(_target).closest('tr').find('.fileSz').text(fileSize);
|
||||
|
||||
$('#divInfor-' + _arg).show();
|
||||
$('#divFile-' + _arg).hide();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 회원 등급 화면 초기 세팅
|
||||
******************************************************** */
|
||||
const fn_init = function() {
|
||||
|
||||
$('[name=rlSetleAmtArr]').prop('disabled', true);
|
||||
$('[name=purchsCntArr]').prop('disabled', true);
|
||||
$('#calcCndD1').prop('checked', true);
|
||||
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 등급 설정 추가
|
||||
******************************************************** */
|
||||
const fn_add_emptyBox = function() {
|
||||
|
||||
let count = $('#tableSorting').children('tr').length + 1;
|
||||
|
||||
let trClone = '<tr>'
|
||||
+ '<td>'
|
||||
+ ' <div>'
|
||||
+ ' <label class="b-checkbox checkbox is-medium center">'
|
||||
+ ' <input type="checkbox" name="gradChkbox" />'
|
||||
+ ' <span class="check"></span>'
|
||||
+ ' </label>'
|
||||
+ ' </div>'
|
||||
+ ' </td>'
|
||||
+ ' <td>'
|
||||
+ ' <div>'
|
||||
+ ' <input class="input-text left mm" type="text" name="gradNmArr" title="등급명" value="" placeholder="등급명" maxlength="40"/>'
|
||||
+ ' </div>'
|
||||
+ ' </td>'
|
||||
+ ' <td>'
|
||||
+ ' <div>'
|
||||
+ ' <div class="select-box">'
|
||||
+ ' <select name="gradMdatCndCdArr" title="조건">'
|
||||
+ ' <c:forEach var="gradMdatCnd" items="${resultMap.codeList[0].cgn006}" varStatus="status">'
|
||||
+ ' <option value="${gradMdatCnd.cd}"> ${gradMdatCnd.cdNm}</option>'
|
||||
+ ' </c:forEach>'
|
||||
+ ' </select>'
|
||||
+ ' </div>'
|
||||
+ ' </div>'
|
||||
+ ' </td>'
|
||||
+ ' <td>'
|
||||
+ ' <div class="td-inner">'
|
||||
+ ' <input class="input-text number right mm" type="text" name="purchsCntArr" title="구매건수" value="0" disabled placeholder="0" onkeyup="fn_set_comma(this);" maxlength="20"/>건'
|
||||
+ ' </div>'
|
||||
+ ' </td>'
|
||||
+ ' <td>'
|
||||
+ ' <div class="td-inner">'
|
||||
+ ' <input class="input-text number right mm" type="text" name="rlSetleAmtArr" title="실 결제금액" value="0" disabled placeholder="0" onkeyup="fn_set_comma(this);" maxlength="12"/>원'
|
||||
+ ' </div>'
|
||||
+ ' </td>'
|
||||
+ ' <td>'
|
||||
+ ' <div class="draggable-icon-container">'
|
||||
+ ' <i class="icon icon_draggable"></i>'
|
||||
+ ' <span class="visually-hidden">순서 바꾸기</span>'
|
||||
+ ' </div>'
|
||||
+ ' </td>'
|
||||
+ ' <td>'
|
||||
+ ' <div class="manage-btn-container fileInfor" id="divInfor-' + count + '" style="display: none;" >'
|
||||
+ ' <ul class="file-list">'
|
||||
+ ' <li>'
|
||||
+ ' <a href="" class="file-list__item filePh" download>'
|
||||
+ ' <i class="icon icon_file-list mr-2"></i>'
|
||||
+ ' <span class="file-list__item-title fileNm"></span>'
|
||||
+ ' <span class="file-list__item-size fileSz"></span>'
|
||||
+ ' </a>'
|
||||
+ ' <button type="button" class="file-list__delete" onclick="fn_delete_imgFile(\'' + count + '\');">'
|
||||
+ ' <span class="visually-hidden">파일 삭제</span>'
|
||||
+ ' </button>'
|
||||
+ ' </li>'
|
||||
+ ' </ul>'
|
||||
+ ' </div>'
|
||||
+ ' <div class="manage-btn-container" id="divFile-' + count + '">'
|
||||
+ ' <div class="input-file">'
|
||||
+ ' <spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions" />'
|
||||
+ ' <input type="hidden" name="mbrInnbArr" value="' + count + '" />'
|
||||
+ ' <input type="file" id="f-' + count + '" name="files" title="아이콘파일" accept="<c:out value="${ acceptFileExtensions }"/>" onchange="fn_set_fileName(this, \'' + count + '\', event);">'
|
||||
+ ' <label for="f-' + count + '">파일선택</label>'
|
||||
+ ' </div>'
|
||||
+ ' </div>'
|
||||
+ ' </td>'
|
||||
+ '</tr>';
|
||||
|
||||
$('#noData').hide();
|
||||
$('#tableSorting').append(trClone);
|
||||
//행 추가 후, tableDnd 업데이트
|
||||
$('#tableUpdate').tableDnDUpdate();
|
||||
fn_add_emptyBox_after();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* niceSelect 설정
|
||||
******************************************************** */
|
||||
const fn_add_emptyBox_after = function() {
|
||||
if($('#purchsCntAt').is(':checked')){
|
||||
$('[name=purchsCntArr]').prop('disabled', false);
|
||||
}else{
|
||||
$('[name=purchsCntArr]').prop('disabled', true);
|
||||
}
|
||||
if($('#rlSetleAmtAt').is(':checked')){
|
||||
$('[name=rlSetleAmtArr]').prop('disabled', false);
|
||||
}else{
|
||||
$('[name=rlSetleAmtArr]').prop('disabled', true);
|
||||
}
|
||||
|
||||
$('[name=gradMdatCndCdArr]').niceSelect();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 회원등급 선정조건에 따른 input event
|
||||
******************************************************** */
|
||||
const fn_mbr_grad_event = (elelment) => {
|
||||
|
||||
if(elelment.checked){
|
||||
if(elelment.getAttribute('id') == 'purchsCntAt'){
|
||||
$('[name=purchsCntArr]').prop('disabled', false);
|
||||
}
|
||||
else{
|
||||
$('[name=rlSetleAmtArr]').prop('disabled', false);
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(elelment.getAttribute('id') == 'purchsCntAt') {
|
||||
$('[name=purchsCntArr]').prop('disabled', true);
|
||||
}
|
||||
else{
|
||||
$('[name=rlSetleAmtArr]').prop('disabled', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 등급 설정 폼 삭제
|
||||
******************************************************** */
|
||||
const fn_remove_box = function() {
|
||||
|
||||
const target = $('[name=gradChkbox]:checked');
|
||||
if (target.length === 0) {
|
||||
alert('항목을 선택해 주세요.');
|
||||
} else {
|
||||
target.each(function() {
|
||||
$(this).parents('tr').remove();
|
||||
});
|
||||
}
|
||||
|
||||
$('#gradAll').prop('checked', false);
|
||||
if ($('[name=gradChkbox]').length === 0) {
|
||||
$('#noData').show();
|
||||
}
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 회원 등급 목록 이동
|
||||
******************************************************** */
|
||||
const fn_goto_list = function() {
|
||||
|
||||
$('#backUpData').attr('action', '<c:url value="/admin/store/mbrgrad/selectMbrGradListInqireForm"/>');
|
||||
$('#backUpData').submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<body>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/admin/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 outline" onclick="fn_goto_list()"><spring:message code="button.catalog"/></button>
|
||||
<button type="button" class="btn primary" onclick="fn_regist_mbrgrad();"><spring:message code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<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" />
|
||||
<form class="common-form" id="regForm" enctype="multipart/form-data">
|
||||
<input type="hidden" name="srchMbrGradNm" value="${resultMap.srchList[0].srchMbrGradNm }" />
|
||||
<input type="hidden" name="srchCalcCndDvCds" value="${resultMap.srchList[0].srchCalcCndDvCds }" />
|
||||
<input type="hidden" name="pageUnit" value="${resultMap.srchList[0].pageUnit }" />
|
||||
<input type="hidden" name="pageIndex" value="${resultMap.srchList[0].pageIndex }" />
|
||||
<input type="hidden" name="pageDv" value="" />
|
||||
<input type="hidden" name="useAt" value="Y" />
|
||||
<input type="hidden" name="trCnt" value="" />
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 21%;">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 21%;">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 21%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>회원등급 그룹명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" name="mbrGradGroupNm" title="회원등급명" maxlength="48"/>
|
||||
</div>
|
||||
</td>
|
||||
<th>선정 조건<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" id="purchsCntAt" name="purchsCntAt" value="Y" onclick="fn_mbr_grad_event(this)">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">구매건수</span>
|
||||
</label>
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" id="rlSetleAmtAt" name="rlSetleAmtAt" value="Y" onclick="fn_mbr_grad_event(this)">
|
||||
<span class="check"></span>
|
||||
<span class="control-label">실 결제금액</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>쇼핑몰<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select title="쇼핑몰" name="sopmalCd" id="sopmalCd">
|
||||
<option value = ''>쇼핑몰 선택</option>
|
||||
<c:if test = "${not empty resultMap.srchList[0].sopmalList}">
|
||||
<c:forEach var="sopmal" items="${resultMap.srchList[0].sopmalList}">
|
||||
<option value="${sopmal.sopmalCd}">${sopmal.sopmalNm}</option>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</select>
|
||||
</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 style="width: 35%;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>산정기간<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
최근
|
||||
<div class="select-box">
|
||||
<select title="산정기간" name="calcPdMtCnt" id="calcPdMtCnt">
|
||||
<c:forEach var="calcPdMt" items="${resultMap.codeList[0].cgn005}" varStatus="status">
|
||||
<option value="${calcPdMt.cd}"> ${calcPdMt.cdNm}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>등급 조정(정산)일<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
등급 기준 월
|
||||
<div class="select-box">
|
||||
<select title="등급 조정 월" name="gradMdatStdrMt" id="gradMdatStdrMt">
|
||||
<c:forEach var="mt" items="${resultMap.codeList[0].mtArr}" varStatus="status">
|
||||
<option value="${fn:trim(mt.cd)}">${mt.cdNm}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div class="select-box">
|
||||
<select title="등급 조정 일" name="gradMdatStdrDe" id="gradMdatStdrDe">
|
||||
<c:forEach var="dt" items="${resultMap.codeList[0].dtArr}" varStatus="status">
|
||||
<option value="${dt.cd}">${dt.cdNm}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>등급 조정 주기<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select title="등급 조정 주기" name="gradMdatCycleMtCnt" id="gradMdatCycleMtCnt">
|
||||
<c:forEach var="gradMdatCycle" items="${resultMap.codeList[0].cgn005}" varStatus="status">
|
||||
<option value="${gradMdatCycle.cd}"> ${gradMdatCycle.cdNm}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>등급 유지 보장 기간<span class="red-7">*</span></th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select title="등급 유지 보장 기간" name="gradMntncPdMtCnt" id="gradMntncPdMtCnt">
|
||||
<c:forEach var="gradMntncPdMt" items="${resultMap.codeList[0].cgn005}" varStatus="status">
|
||||
<option value="${gradMntncPdMt.cd}"> ${gradMntncPdMt.cdNm}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="page-title__btn-container">
|
||||
<button type="button" class="btn xsm dark" onclick="fn_add_emptyBox();">추가</button>
|
||||
<button type="button" class="btn xsm dark" onclick="fn_remove_box();">삭제</button>
|
||||
</div>
|
||||
<h3 class="content-section__inner-title">등급 설정</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical draggable" id="tableUpdate">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 60px;">
|
||||
<col>
|
||||
<col style="width: 18%;">
|
||||
<col style="width: 18%;">
|
||||
<col style="width: 18%;">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 16%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="b-checkbox checkbox is-medium check-all">
|
||||
<input type="checkbox" id="gradAll" value="">
|
||||
<span class="check"></span>
|
||||
</label>
|
||||
</th>
|
||||
<th>등급명<span class="red-7">*</span></th>
|
||||
<th>조건<span class="red-7">*</span></th>
|
||||
<th>구매건수</th>
|
||||
<th>실 결제금액</th>
|
||||
<th>순서</th>
|
||||
<th>등급아이콘</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tableSorting">
|
||||
<tr id="noData">
|
||||
<td colspan="8" class="row-no-data">등급 설정 정보를 입력해 주세요.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="backUpData" method="post" >
|
||||
<input type="hidden" name="srchMbrGradNm" value="${resultMap.srchList[0].srchMbrGradNm }" />
|
||||
<input type="hidden" name="srchCalcCndDvCds" value="${resultMap.srchList[0].srchCalcCndDvCds }" />
|
||||
<input type="hidden" name="pageUnit" value="${resultMap.srchList[0].pageUnit }" />
|
||||
<input type="hidden" name="pageIndex" value="${resultMap.srchList[0].pageIndex }" />
|
||||
<input type="hidden" name="mbrGradGroupInnb" value="" />
|
||||
<input type="hidden" name="pageDv" value="" />
|
||||
</form>
|
||||
</main>
|
||||
</body>
|
||||
<script>
|
||||
/* ********************************************************
|
||||
* 회원 등급 등록
|
||||
******************************************************** */
|
||||
const fn_regist_mbrgrad = function() {
|
||||
|
||||
if(!confirm('회원등급을 <spring:message code="confirm.common.insert"/>')) return;
|
||||
|
||||
let trCnt = $('#tableSorting').find('tr').length - 1;
|
||||
$('[name=trCnt]').val(trCnt);
|
||||
|
||||
const f = new FormData();
|
||||
$('#regForm').serializeArray().forEach(function(item) {
|
||||
f.append(item.name, item.value);
|
||||
});
|
||||
|
||||
// let files = $('[name=files]');
|
||||
// for (let i = 0; i < files.length; i++) {
|
||||
// f.append('file' + i, files[i].files[0]);
|
||||
// }
|
||||
let fileNumber = [];
|
||||
let newFileNumber = '';
|
||||
$('[name=mbrInnbArr]').each(function(idx, item){
|
||||
fileNumber[idx] = $(this).val();
|
||||
});
|
||||
|
||||
let files = $('[name=files]');
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
if (files[i].files[0] !== undefined) {
|
||||
f.append(fileNumber[i], files[i].files[0]);
|
||||
newFileNumber += '$' + fileNumber[i];
|
||||
}
|
||||
}
|
||||
newFileNumber = newFileNumber.substring(1);
|
||||
f.append('filesInnbs', newFileNumber);
|
||||
|
||||
|
||||
let gradMdatCndCdArr = ''
|
||||
|
||||
let purchsCnts = '';
|
||||
if ($('#purchsCntAt').is(':checked')) {
|
||||
$('[name=purchsCntArr]').each(function(){
|
||||
if ($(this).val() == '') return;
|
||||
purchsCnts += '$' + $(this).val();
|
||||
});
|
||||
purchsCnts = purchsCnts.substring(1);
|
||||
f.append('purchsCnts', purchsCnts);
|
||||
}
|
||||
|
||||
let rlSetleAmts = '';
|
||||
if ($('#rlSetleAmtAt').is(':checked')) {
|
||||
$('[name=rlSetleAmtArr]').each(function(){
|
||||
if ($(this).val() == '') return;
|
||||
rlSetleAmts += '$' + $(this).val();
|
||||
});
|
||||
rlSetleAmts = rlSetleAmts.substring(1);
|
||||
f.append('rlSetleAmts', rlSetleAmts);
|
||||
}
|
||||
|
||||
let tempArr = '';
|
||||
if($('#purchsCntAt').is(':checked')){
|
||||
tempArr += $('#purchsCntAt').val();
|
||||
}
|
||||
if($('#rlSetleAmtAt').is(':checked')){
|
||||
tempArr += $('#rlSetleAmtAt').val();
|
||||
}
|
||||
f.append('tempArr', tempArr);
|
||||
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
enctype : 'multipart/form-data',
|
||||
url : '<c:url value="/admin/store/mbrgrad/insertMbrGradRegist"/>',
|
||||
data : f,
|
||||
contentType : false,
|
||||
processData : false,
|
||||
success : function (result) {
|
||||
if (result === 'fileUploadFail') {
|
||||
alert('파일업로드에 문제가 발생했습니다. 다시 시도해 주세요.');
|
||||
return;
|
||||
}
|
||||
let data = JSON.parse(result.resBody.result);
|
||||
if (data.result === 'fail') {
|
||||
alert('<spring:message code="fail.common.insert"/>');
|
||||
return;
|
||||
}
|
||||
|
||||
alert('<spring:message code="success.common.insert"/>');
|
||||
$('#backUpData').find('[name=pageDv]').val('I');
|
||||
$('#backUpData').find('[name=mbrGradGroupInnb]').val(data.mbrGradGroupInnb);
|
||||
$('#backUpData').attr('action', '<c:url value="/admin/store/mbrgrad/selectMbrGradUpdtForm"/>');
|
||||
$('#backUpData').submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,185 @@
|
||||
<%@ 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 : maMbrGradListInqireR.jsp
|
||||
Description : 회원 등급 목록 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-12-20 김혜지 최초 생성(퍼블리싱 적용)
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>GC ONE 통합 관리자</title>
|
||||
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Include.jsp" %>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
let pageIndex = '<c:out value="${ resultMap.paramVO.pageIndex }"/>';
|
||||
let pageUnit = '<c:out value="${ resultMap.paramVO.pageUnit }"/>';
|
||||
let pageDv = '<c:out value="${ resultMap.paramVO.pageDv }"/>';
|
||||
|
||||
if (pageDv == '') {
|
||||
fn_select_mbrgrad_list(pageIndex, pageUnit);
|
||||
} else {
|
||||
fn_select_mbrgrad_list('1', '10');
|
||||
}
|
||||
|
||||
$('[name=srchMbrGradNm]').on('keydown', function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
fn_select_mbrgrad_list(1);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/* ********************************************************
|
||||
* 회원등급 목록조회
|
||||
******************************************************** */
|
||||
const fn_select_mbrgrad_list = function(pageIndex, pageUnit) {
|
||||
|
||||
if (pageIndex == undefined || pageUnit == '') {
|
||||
$('#pageIndex').val('1');
|
||||
} else {
|
||||
$('#pageIndex').val(pageIndex);
|
||||
}
|
||||
|
||||
let params = $('#srchForm').serialize();
|
||||
if (pageUnit != undefined || pageUnit == '') {
|
||||
|
||||
params += '&pageUnit=' + pageUnit;
|
||||
} else {
|
||||
params += '&pageUnit=' + $('#pageUnit').val();
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '<c:url value="/admin/store/mbrgrad/selectMbrGradListInqire"/>',
|
||||
data : params,
|
||||
success : function(data) {
|
||||
$('#pageDiv').html(data);
|
||||
$('#pageUnit').niceSelect();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
* 회원등급 검색 초기화
|
||||
***********************************************/
|
||||
const fn_clear_input = function() {
|
||||
$('[name=srchMbrGradNm]').val('');
|
||||
$('#srchPurchsCntAt').prop('checked', false);
|
||||
$('#srchRlSetleAmtAt').prop('checked', false);
|
||||
};
|
||||
|
||||
/**********************************************
|
||||
* 회원등급 수정 화면 이동
|
||||
***********************************************/
|
||||
const fn_move_mbrGradDetail = function(_mbrGradGroupInnb,sopmalCd) {
|
||||
$('#mbrGradnnb').val(_mbrGradGroupInnb);
|
||||
$('#sopmalCd').val(sopmalCd);
|
||||
$('#srchForm').attr('action', '<c:url value="/admin/store/mbrgrad/selectMbrGradUpdtForm"/>');
|
||||
$('#srchForm').attr('method', 'post');
|
||||
$('#srchForm').submit();
|
||||
};
|
||||
|
||||
/**********************************************
|
||||
* 회원등급 엑셀 다운로드
|
||||
***********************************************/
|
||||
const fn_down_excelFile = function() {
|
||||
$('#srchForm').attr('action', '<c:url value="/admin/store/mbrgrad/excelFileDownload"/>');
|
||||
$('#srchForm').attr('method', 'post');
|
||||
$('#srchForm').submit();
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/admin/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">
|
||||
</div>
|
||||
</div>
|
||||
<form id="srchForm" >
|
||||
<input type="hidden" id="mbrGradnnb" name="mbrGradGroupInnb" />
|
||||
<input type="hidden" id="sopmalCd" name="sopmalCd" />
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${resultMap.paramVO.pageIndex}"/>"/>
|
||||
<%-- 검색 섹션 START --%>
|
||||
<section class="content-section" >
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>회원등급 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width: 16%;">
|
||||
<col style="width: 34%;">
|
||||
<col style="width: 16%;">
|
||||
<col style="width: 34%;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>회원등급 그룹명</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text full" type="text" name="srchMbrGradNm" title="회원등급명" value="<c:out value="${resultMap.paramVO.srchMbrGradNm}"/>" />
|
||||
</div>
|
||||
</td>
|
||||
<th>쇼핑몰</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select title="쇼핑몰" name="srchSopmalCd" id="srchSopmalCd">
|
||||
<option value=''>쇼핑몰 선택</option>
|
||||
<c:if test="${not empty resultMap.sopmalList}">
|
||||
<c:forEach var="sopmal" items="${resultMap.sopmalList}">
|
||||
<option value="${sopmal.sopmalCd}" <c:if test = "${resultMap.paramVO.srchSopmalCd eq sopmal.sopmalCd}">selected</c:if>>${sopmal.sopmalNm}</option>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</select>
|
||||
</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('srchForm');"><spring:message code="button.init"/></button>
|
||||
<button type="button" class="btn primary" onclick="fn_select_mbrgrad_list('1');"><spring:message code="button.search"/></button>
|
||||
</div>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
</section>
|
||||
<%-- 검색 섹션 END --%>
|
||||
<%-- 리스트 출력 섹션 START --%>
|
||||
<div id="pageDiv"></div>
|
||||
</form>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,119 @@
|
||||
<%@ 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 : maMbrGradListInqireR.jsp
|
||||
Description : 회원 등급 목록 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-12-20 김혜지 최초 생성(퍼블리싱 적용)
|
||||
--%>
|
||||
<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_mbrgrad_list('1')">
|
||||
<c:forEach items="${ resultMap.paginationInfo.pageUnitArr }" var="pageUnit" varStatus="pageUnitStatus">
|
||||
<option value="<c:out value="${ pageUnit }"/>" <c:if test="${ resultMap.paramVO.recordCountPerPage eq pageUnit}">selected="selected"</c:if>><c:out value="${ pageUnit }"/>개씩</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="horizontal-line">
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<button type="button" class="btn outline sm" onclick="fn_down_excelFile();">
|
||||
<i class="icon icon_excel"></i>
|
||||
<spring:message code="button.excelDownload"/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="spacing">
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<!-- 각 열 width 설정 -->
|
||||
<colgroup>
|
||||
<col style="width: 4%;">
|
||||
<col style="width: 16%;">
|
||||
<col style="width: 16%;">
|
||||
<col style="width: 8%;">
|
||||
<col style="width: 11%;">
|
||||
<col style="width: 8%;">
|
||||
<col style="width: 7%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>회원등급 그룹명</th>
|
||||
<th>쇼핑몰</th>
|
||||
<th>산정기간</th>
|
||||
<th>등급조정주기</th>
|
||||
<th>등록일자</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<%-- 리스트 BODY START --%>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultList }">
|
||||
<c:forEach items="${resultMap.resultList }" var="mbrGradList" varStatus="status">
|
||||
<tr>
|
||||
<td>
|
||||
<c:out value="${resultMap.paginationInfo.totalRecordCount - mbrGradList.rnum + 1 }" />
|
||||
</td>
|
||||
<td class="left">
|
||||
<c:out value="${mbrGradList.mbrGradGroupNm }"/>
|
||||
</td>
|
||||
<td class="left">
|
||||
<c:out value="${mbrGradList.sopmalNm}"/>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${mbrGradList.calcPdMtCntNm }"/>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${mbrGradList.gradMdatCycleMtCntNm }"/>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${mbrGradList.registDt}"/>
|
||||
</td>
|
||||
<td>
|
||||
<div class="manage-btn-container re">
|
||||
<button type="button" class="btn xsm primary outline" onclick="fn_move_mbrGradDetail('${mbrGradList.mbrGradGroupInnb }','<c:out value="${mbrGradList.sopmalCd}"/>');"><spring:message code="button.update"/></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td class="row-no-data" colspan="8">조회된 데이터가 없습니다.</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</table>
|
||||
</div>
|
||||
<%-- 리스트 BODY END --%>
|
||||
</section>
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${ resultMap.paginationInfo }" type="image" jsFunction="fn_select_mbrgrad_list" />
|
||||
</div>
|
||||
735
src/main/webapp/WEB-INF/views/admin/store/mbrgrad/maMbrGradU.jsp
Normal file
735
src/main/webapp/WEB-INF/views/admin/store/mbrgrad/maMbrGradU.jsp
Normal file
@@ -0,0 +1,735 @@
|
||||
<%@ 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 : maMbrGradU.jsp
|
||||
Description : 회원 등급 등록 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.19 김세엽 최초 생성
|
||||
--%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Include.jsp" %>
|
||||
<script src="<c:url value='/js/fileupload_comm.js'/>"></script>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
fn_init();
|
||||
/*전체 체크박스 클릭시 체크박스 전체 체크*/
|
||||
$("#gradAll").on("click",function(){
|
||||
if($(this).is(":checked")){
|
||||
$("input[name='gradChkbox']").each(function () {
|
||||
$(this).prop("checked", true);
|
||||
});
|
||||
}else{
|
||||
$("input[name='gradChkbox']").each(function () {
|
||||
$(this).prop("checked", false);
|
||||
});
|
||||
}
|
||||
});
|
||||
/* 체크박스 클릭 시 전체 체크박스 체크 해제 */
|
||||
$(document).on("click", "input[name='gradChkbox']", function() {
|
||||
// 현재 체크된 상태를 기준으로 전체 체크 여부 확인
|
||||
let allChecked = $("input[name='gradChkbox']").length === $("input[name='gradChkbox']:checked").length;
|
||||
|
||||
// 만약 모든 체크박스가 체크되지 않았으면, 전체 선택 체크박스 해제
|
||||
if (!allChecked) {
|
||||
$("#gradAll").prop("checked", false);
|
||||
} else {
|
||||
$("#gradAll").prop("checked", true);
|
||||
}
|
||||
});
|
||||
|
||||
$(".file-list__item-title").find("img").each(function(){
|
||||
$(this).css({
|
||||
width : "60px",
|
||||
height : "60px"
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 숫자만 입력 / 콤마찌긱
|
||||
******************************************************** */
|
||||
const fn_set_comma = function (_target) {
|
||||
let str = _target.value;
|
||||
$(_target).val(str.replace(/[^0-9]/g, '').replace(/\B(?=(\d{3})+(?!\d))/g, ','));
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 회원 등급 화면 초기 세팅
|
||||
******************************************************** */
|
||||
const fn_init = function () {
|
||||
$('#noData').hide();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 등급 설정 추가
|
||||
* cd: 공통코드cd
|
||||
******************************************************** */
|
||||
const fn_add_emptyBox = function () {
|
||||
let count = $('#tableSorting').children('tr').length + 1; // tr 개수 +1
|
||||
const index = count-1;
|
||||
const mbrGradCnCdNm = $("#mbrGradCndCdNm").val(); // 회원 등급 코드
|
||||
const acceptFileExtensions = '${acceptFileExtensions}';
|
||||
// 마지막 행을 복제하여 추가
|
||||
let newRow = ` <tr class="mbrGradTr">
|
||||
<input type = "hidden" class= "mbrGradInnb" name = "mbrGradInnbArr" value="x"/>
|
||||
<input type = "hidden" class= "mbrGradCnt"/>
|
||||
<td>
|
||||
<div>
|
||||
<label class="b-checkbox checkbox is-medium center">
|
||||
<input type="checkbox" name="gradChkbox"/>
|
||||
<span class="check"></span>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<input class="input-text full" type="text" name="mbrGradNmArr" title="등급명" value="" placeholder="등급명" maxlength="40"/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
\${mbrGradCnCdNm}
|
||||
<input type = "hidden" name = "mbrGradCndCdArr" value = "02"/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text number right mm" type="text" name="mbrGradAmtArr" title="실 결제금액" value="0" maxlength="10"/>원
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<input type = "hidden" name = "filUploadAt" value = "0"/>
|
||||
<input type = "hidden" value = "x" name="mbrGradIconCoursArr" class="mbrGradIconCours"/>
|
||||
<div class="input-file">
|
||||
<input type="file" id="fileUpload-\${count}" name="files" title="대표이미지" accept="\${acceptFileExtensions}"
|
||||
onchange="fn_add_file_mbrGradNm(1,'fileUl\${count}',\${count})">
|
||||
<label for="fileUpload-\${count}">파일선택</label>
|
||||
</div>
|
||||
<ul class="file-list" id = "fileUl\${count}">
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
0(0)
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
-
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
-
|
||||
</div>
|
||||
</td>
|
||||
</tr>`;
|
||||
$('#tableSorting').append(newRow);
|
||||
//결제금액 이벤트 바인딩
|
||||
$("input[name='mbrGradAmtArr']").eq(index).on("input", function () {
|
||||
var input = $(this).val();
|
||||
$(this).val(input.replace(/[^0-9]/g, "").replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
|
||||
});
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 등급 설정 삭제
|
||||
******************************************************** */
|
||||
const fn_remove_box = function () {
|
||||
const target = $('[name=gradChkbox]:checked');
|
||||
if (target.length === 0) {
|
||||
alert('삭제할 회원등급을 선택해주세요.');
|
||||
} else {
|
||||
/*등급 설정 조건 상태 확인*/
|
||||
const nonRemoveArr = [];
|
||||
target.each(function () {
|
||||
const mbrGradNmArr = $(this).closest("tr").find("input[name='mbrGradNmArr']").val();
|
||||
if(mbrGradNmArr === ''){ //새로 추가한 등급 삭제시
|
||||
$(this).closest("tr").remove();
|
||||
}else{//기존 등급 삭제시
|
||||
const mbrGradCnt = parseInt($(this).closest("tr").find(".mbrGradCnt").val(),10);
|
||||
if(mbrGradCnt > 0) {
|
||||
nonRemoveArr.push(mbrGradCnt);
|
||||
}else{
|
||||
$(this).closest("tr").hide();
|
||||
$(this).closest("tr").find(".useAt").val("N");
|
||||
}
|
||||
}
|
||||
});
|
||||
if (nonRemoveArr.length > 0) {
|
||||
alert("이미 회원에게 지정된 등급을 제외한 나머지 등급이 삭제됩니다.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*동적 요소로 인한 이벤트 바인딩*/
|
||||
$(document).on("click", "#deleteBtn", function () {
|
||||
fn_remove_box();
|
||||
});
|
||||
|
||||
//파일 삭제시 아이콘 컬럼값 삭제
|
||||
const fn_delete_file = (index) => {
|
||||
$(".mbrGradIconCours").eq(index).val("x");
|
||||
$("input[name='filUploadAt']").eq(index).val("0");
|
||||
$('.input-file').eq(index).show();
|
||||
}
|
||||
|
||||
//파일 삭제
|
||||
$(document).on("click",".fileDel", function () {
|
||||
const liId = $(this).closest("li").attr("id");
|
||||
const idx = $(this).closest("tr").index();
|
||||
const sopmalCd = '<c:out value="${resultMap.maMbrGradVO.sopmalCd}"/>';
|
||||
if (liId.indexOf('temp') == 0) { //임시등록파일은 화면에서 삭제
|
||||
$(this).closest("li").remove();
|
||||
fn_delete_file(idx);
|
||||
} else { //업로드된 파일은 서버삭제
|
||||
if (confirm("파일을 삭제하시겠습니까?")) {
|
||||
$(this).closest("li").remove();
|
||||
ajaxFileDelete('', liId, sopmalCd, 'MBRG', 1, fn_delete_file, idx);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 회원 등급 목록 이동
|
||||
******************************************************** */
|
||||
const fn_goto_list = function () {
|
||||
$('#backUpData').attr('action', '<c:url value="/admin/store/mbrgrad/selectMbrGradListInqireForm"/>');
|
||||
$('#backUpData').submit();
|
||||
}
|
||||
const fn_add_file_mbrGradNm = (mode, targetFilListId, index) => {
|
||||
let target = $(event.target);
|
||||
let inputContainer = target.closest('.manage-btn-container').find("input[name='filUploadAt']");
|
||||
inputContainer.val("1");
|
||||
|
||||
let files = event.target.files;
|
||||
let filesArr = Array.prototype.slice.call(files); //file객체 array추가
|
||||
let filesArrLen = filesArr.length;
|
||||
let filesTempArrSize = filesTempArr.length * 1;
|
||||
|
||||
if (mode === 1 && $(targetFilListId + ' li').length > 0) {
|
||||
alert("파일은 한개만 첨부할 수 있습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
let templist = '';
|
||||
for (let i = 0; i < filesArrLen; i++) {
|
||||
filesTempArr.push(filesArr[i]); // 임시 배열에 저장
|
||||
let file = filesArr[i];
|
||||
let reader = new FileReader();
|
||||
|
||||
reader.onload = function (e) {
|
||||
templist = `<li id="temp\${index}" class="fileLi">
|
||||
<a class="file-list__item">
|
||||
<span class="file-list__item-title">
|
||||
<img src="\${e.target.result}"
|
||||
onerror="this.src='/admin/images/image_placeholder.png'; this.style.width='60px'; this.style.height='60px';"
|
||||
style="width: 60px; height: 60px; margin-right: 16px;"/>
|
||||
</span>
|
||||
</a>
|
||||
<a class="file-list__delete fileDel" style="cursor:pointer;">
|
||||
<span class="visually-hidden">파일 삭제</span>
|
||||
</a>
|
||||
</li>`;
|
||||
$("#" + targetFilListId).append(templist);
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
//파일선택 영역 hide 처리
|
||||
target.closest('.manage-btn-container').find(".input-file").hide();
|
||||
}
|
||||
}
|
||||
|
||||
const fn_show_fileUpload = (length) => {
|
||||
$(".input-file").eq(length).show();
|
||||
$(".manage-btn-container").eq(length).find("input[name='filUploadAt']").val("0");
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 회원 등급 수정
|
||||
******************************************************** */
|
||||
const fn_update_mbrgrad = function () {
|
||||
|
||||
if (!confirm('회원등급을 <spring:message code="confirm.common.update"/>')) return;
|
||||
let submitAt = true;
|
||||
//등급 설정 조건 확인
|
||||
//이름 중복 체크
|
||||
let gradNmArr = [];
|
||||
let index;
|
||||
let isDuplicate = false;
|
||||
let isNull = false;
|
||||
|
||||
$("input[name='mbrGradNmArr']").each(function () {
|
||||
let value = $(this).val(); // 현재 input의 값을 가져옴
|
||||
if(value !== ''){
|
||||
if (gradNmArr.includes(value)) {
|
||||
isDuplicate = true; // 중복이 있는 경우 플래그를 설정
|
||||
index = $(this).index("input[name='mbrGradNmArr']");
|
||||
}
|
||||
}else{
|
||||
isNull = true;
|
||||
index = $(this).index("input[name='mbrGradNmArr']");
|
||||
}
|
||||
gradNmArr.push(value); // 배열에 값을 추가
|
||||
});
|
||||
|
||||
if (isDuplicate) {
|
||||
submitAt = false;
|
||||
alert("중복된 등급명이 있습니다."); // 사용자에게 중복 알림
|
||||
$("input[name='mbrGradNmArr']").eq(index).focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
let visibleRows = $(".mbrGradTr:visible");
|
||||
let visibleArr = [];
|
||||
|
||||
visibleRows.each(function() {
|
||||
visibleArr.push($(this).index(".mbrGradTr"));
|
||||
});
|
||||
|
||||
// 각 보이는 tr 요소를 순회합니다.
|
||||
let lastVal = null; // 마지막 값을 저장할 변수를 초기화합니다.
|
||||
|
||||
visibleRows.each(function(rowIndex) {
|
||||
// 현재 tr 내의 모든 input[name='mbrGradAmtArr'] 요소를 가져옵니다.
|
||||
let inputs = $(this).find("input[name='mbrGradAmtArr']");
|
||||
|
||||
inputs.each(function(inputIndex) {
|
||||
// 현재 input의 값이 비어있는 경우
|
||||
if ($(this).val() === '') {
|
||||
submitAt = false;
|
||||
alert("실 결제금액에 입력되지 않은 값이 있습니다");
|
||||
$(this).focus();
|
||||
return false; // inputs.each()의 반복을 중단
|
||||
}
|
||||
|
||||
let currentVal = parseInt($(this).val().replace(/,/g, ""), 10);
|
||||
|
||||
// 이전 값이 있는 경우 비교 시작
|
||||
if (lastVal !== null) {
|
||||
|
||||
// 이전 값과 현재 값을 비교
|
||||
if (currentVal === lastVal) {
|
||||
submitAt = false;
|
||||
alert("전 회원등급 실 결제금액에 같은 값이 있습니다");
|
||||
$(this).focus();
|
||||
return false; // inputs.each()의 반복을 중단
|
||||
} else if (currentVal < lastVal) {
|
||||
submitAt = false;
|
||||
alert("전 회원등급 실 결제금액이 더 큽니다.");
|
||||
$(this).focus();
|
||||
return false; // inputs.each()의 반복을 중단
|
||||
}
|
||||
}
|
||||
|
||||
// 현재 값을 'lastVal'로 업데이트
|
||||
lastVal = currentVal;
|
||||
});
|
||||
|
||||
// 각 tr에 대해 체크를 중단하도록 하는 반환값
|
||||
if (!submitAt) {
|
||||
return false; // visibleRows.each()의 반복을 중단
|
||||
}
|
||||
});
|
||||
|
||||
if (submitAt) {
|
||||
//회원 등급 수정
|
||||
const formData = new FormData();
|
||||
|
||||
$('#udpForm').serializeArray().forEach(function (item) {
|
||||
formData.append(item.name, item.value);
|
||||
});
|
||||
|
||||
// formData에서 배열 데이터를 가져옵니다.
|
||||
const updatedAmounts = formData.getAll("mbrGradAmtArr").map(function(value) {
|
||||
// 쉼표를 제거한 값을 반환합니다.
|
||||
return value.replaceAll(",", "");
|
||||
});
|
||||
|
||||
// 기존의 "mbrGradAmtArr" 필드를 삭제합니다.
|
||||
formData.delete("mbrGradAmtArr");
|
||||
|
||||
// 수정된 값들을 다시 formData에 추가합니다.
|
||||
updatedAmounts.forEach(function(newValue) {
|
||||
formData.append("mbrGradAmtArr", newValue);
|
||||
});
|
||||
|
||||
//파일 data 추출
|
||||
$.each(filesTempArr, function (i, file) {
|
||||
if (file.upload != 'disable') {
|
||||
formData.append('files', file);
|
||||
}
|
||||
});
|
||||
|
||||
//수정 ajax
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<c:url value="/admin/store/mbrgrad/updateMbrGradUpdt"/>',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function (result) {
|
||||
alert('<spring:message code="success.common.save"/>');
|
||||
$('#backUpData').attr('action', '<c:url value="/admin/store/mbrgrad/selectMbrGradUpdtForm"/>');
|
||||
$('#backUpData').attr('method', 'post');
|
||||
$('#backUpData').submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<%@include file="/WEB-INF/views/comm/admin/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Left.jsp" %>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">회원등급 수정</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<button class="btn outline" onclick="fn_goto_list()"><spring:message code="button.catalog"/></button>
|
||||
<button class="btn primary" onclick="fn_update_mbrgrad();"><spring:message code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<form class="common-form" id="udpForm" enctype="multipart/form-data">
|
||||
<input type="hidden" name="mbrGradGroupInnb" value="${resultMap.maMbrGradVO.mbrGradGroupInnb }" />
|
||||
<input type="hidden" name="srchMbrGradNm" value="${resultMap.maMbrGradVO.srchMbrGradNm }" />
|
||||
<input type="hidden" name="srchCalcCndDvCds" value="${resultMap.maMbrGradVO.srchCalcCndDvCds }" />
|
||||
<input type="hidden" name="pageUnit" value="${resultMap.maMbrGradVO.pageUnit }" />
|
||||
<input type="hidden" name="pageIndex" value="${resultMap.maMbrGradVO.pageIndex }" />
|
||||
<input type="hidden" name="sopmalCd" value="${resultMap.maMbrGradVO.sopmalCd }" />
|
||||
<input type="hidden" name="pageDv" value="" />
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>회원등급 수정</caption>
|
||||
<colgroup>
|
||||
<col style="width: 16%;">
|
||||
<col style="width: 34%;">
|
||||
<col style="width: 16%;">
|
||||
<col style="width: 34%;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<%--회원등급 그룹 정보--%>
|
||||
<c:set var = "mbrGradGroupInfo" value = "${resultMap.mbrGradInfo.mbrGradInfo}"/>
|
||||
<tr>
|
||||
<th>회원등급 그룹명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text xl" type="text" name="mbrGradGroupNm" title="회원등급명" value="${mbrGradGroupInfo.mbrGradGroupNm}" maxlength="40"/>
|
||||
</div>
|
||||
</td>
|
||||
<th>쇼핑몰</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${mbrGradGroupInfo.sopmalNm}"/>
|
||||
</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: 16%;">
|
||||
<col style="width: 34%;">
|
||||
<col style="width: 16%;">
|
||||
<col style="width: 34%;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>등급 조정 주기</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select title="등급 조정 주기" name="gradMdatCycleMtCnt"
|
||||
id="gradMdatCycleMtCnt">
|
||||
<c:forEach var="gradMdatCycle"
|
||||
items="${resultMap.mbrGradInfo.codeMap.mtCd}"
|
||||
varStatus="status">
|
||||
<option value="${gradMdatCycle.cd}" ${f:setSelected(mbrGradGroupInfo.gradMdatCycleMtCnt, gradMdatCycle.cd)}> ${gradMdatCycle.cdNm}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
마다 자동 조정
|
||||
</div>
|
||||
</td>
|
||||
<th>산정기간</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
등급 조정일로 부터
|
||||
<div class="select-box">
|
||||
<select title="산정기간" name="calcPdMtCnt" id="calcPdMtCnt">
|
||||
<c:forEach var="calcPdMt" items="${resultMap.mbrGradInfo.codeMap.mtCd}" varStatus="status">
|
||||
<option value="${calcPdMt.cd}"
|
||||
<c:if test = "${calcPdMt.cd eq mbrGradGroupInfo.calcPdMtCnt}">
|
||||
selected
|
||||
</c:if>> ${calcPdMt.cdNm}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
동안 의 실 결제금액으로 산정
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container mb-8">
|
||||
<div class="left">
|
||||
<h3 class="content-section__inner-title">등급 설정</h3>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<button type = "button" class="btn dark xsm" id = "deleteBtn">삭제</button>
|
||||
<button type = "button" class="btn primary outline xsm" onclick="fn_add_emptyBox();">추가</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>등급 설정</caption>
|
||||
<colgroup>
|
||||
<col style="width: 8%;">
|
||||
<col style="width: 17%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 15%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="b-checkbox checkbox is-medium check-all">
|
||||
<input type="checkbox" id="gradAll" >
|
||||
<span class="check"></span>
|
||||
</label>
|
||||
</th>
|
||||
<th>등급명<span class="red-7">*</span></th>
|
||||
<th>조건</th>
|
||||
<th>실 결제금액<span class="red-7">*</span></th>
|
||||
<th>등급아이콘<span class="red-7">*</span></th>
|
||||
<th>현재 통계</th>
|
||||
<th>생성일시</th>
|
||||
<th>최근수정일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tableSorting">
|
||||
<c:choose>
|
||||
<c:when test = "${not empty resultMap.mbrGradInfo.gradStdrList}">
|
||||
<c:forEach var="gradStdr" items="${resultMap.mbrGradInfo.gradStdrList}" varStatus="status">
|
||||
<tr class="mbrGradTr">
|
||||
<input type = "hidden" class= "mbrGradInnb" name = "mbrGradInnbArr" value = "<c:out value = "${gradStdr.mbrGradInnb}"/>"/>
|
||||
<input type = "hidden" class= "mbrGradCnt" value = "<c:out value = "${gradStdr.mbrGradCnt}"/>"/>
|
||||
<input type = "hidden" class= "useAt" name = "useAtArr" value = "<c:out value = "${gradStdr.useAt}"/>"/>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test = "${status.index eq 0}">
|
||||
-
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div>
|
||||
<label class="b-checkbox checkbox is-medium center">
|
||||
<input type="checkbox" name="gradChkbox" />
|
||||
<span class="check"></span>
|
||||
</label>
|
||||
</div>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<input class="input-text full" type="text" name="mbrGradNmArr" title="등급명" value="${gradStdr.mbrGradNm}" placeholder="등급명" maxlength="40"/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<c:forEach var = "mbrGradCnd" items = "${resultMap.mbrGradInfo.codeMap.mbrGradCnd}">
|
||||
<c:if test = "${mbrGradCnd.cd eq gradStdr.mbrGradCndCd}">
|
||||
<c:out value="${mbrGradCnd.cdNm}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<input type = "hidden" name = "mbrGradCndCdArr" value = "<c:out value="${gradStdr.mbrGradCndCd}"/>"/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text number right mm" type="text" name="mbrGradAmtArr" title="실 결제금액"
|
||||
value="<fmt:formatNumber value="${gradStdr.mbrGradAmt}" pattern="#,###" />" maxlength="10"/>원
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<c:choose>
|
||||
<c:when test="${gradStdr.mbrGradIconCours eq 'x'}">
|
||||
<c:set var = "mbrGradIconCours" value = ""/>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:set var = "mbrGradIconCours" value = "${gradStdr.mbrGradIconCours}"/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<input type = "hidden" name = "filUploadAt" value = "0"/>
|
||||
<input type="hidden" value= "<c:out value="${mbrGradIconCours}"/>" name="mbrGradIconCoursArr" class="mbrGradIconCours"/>
|
||||
<%--파일이 없는 경우--%>
|
||||
<div class="input-file" <c:if test = "${not empty mbrGradIconCours}">style="display:none"</c:if>>
|
||||
<input type="file" id="fileUpload-${status.index}" name="files" title="대표이미지" accept="<c:out value="${ acceptFileExtensions }"/>"
|
||||
onchange="fn_add_file_mbrGradNm(1,'fileUl${status.index}',${status.index})">
|
||||
<label for="fileUpload-${status.index}">파일선택</label>
|
||||
</div>
|
||||
<%--파일이 있는 경우--%>
|
||||
<c:choose>
|
||||
<c:when test = "${empty mbrGradIconCours}">
|
||||
<ul class="file-list" id = "fileUl${status.index}">
|
||||
</ul>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<ul class="file-list" id = 'fileUl${status.index}'>
|
||||
<li id = "<c:out value="${gradStdr.mbrGradInnb}"/>" class="fileLi">
|
||||
<a class="file-list__item">
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
||||
<input type = "hidden" value="<c:out value="${cdnurl}${mbrGradIconCours}"/>"/>
|
||||
<span class="file-list__item-title">
|
||||
<img src = "<c:out value="${cdnurl}${mbrGradIconCours}"/>"
|
||||
onerror="this.src='/admin/images/image_placeholder.png'" />
|
||||
</span>
|
||||
</a>
|
||||
<a class="file-list__delete fileDel" style="cursor:pointer">
|
||||
<span class="visually-hidden">파일 삭제</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<fmt:formatNumber value="${gradStdr.mbrGradCnt}" pattern="#,###"/>(<c:out value="${gradStdr.mbrGradInnbPer}"/>)
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<c:out value="${gradStdr.registDt}"/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<c:out value="${gradStdr.updtDt}"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr class="mbrGradTr">
|
||||
<input type = "hidden" class= "mbrGradInnb" name = "mbrGradInnbArr" value = "x"/>
|
||||
<input type = "hidden" class= "mbrGradCnt" value = ""/>
|
||||
<td>
|
||||
<div>
|
||||
<label class="b-checkbox checkbox is-medium center">
|
||||
<input type="checkbox" name="gradChkbox"/>
|
||||
<span class="check"></span>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<input class="input-text full" type="text" name="mbrGradNmArr" title="등급명" value="" placeholder="등급명" maxlength="40"/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<c:forEach var = "mbrGradCnd" items = "${resultMap.mbrGradInfo.codeMap.mbrGradCnd}">
|
||||
<c:if test = "${mbrGradCnd.cd eq '01'}"><c:out value="${mbrGradCnd.cdNm}"/></c:if>
|
||||
</c:forEach>
|
||||
<input type = "hidden" name = "mbrGradCndCdArr" value = "01"/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text number right mm" type="text" name="mbrGradAmtArr" title="실 결제금액"
|
||||
value="0" placeholder="0" maxlength="10" readonly/>원
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<input type = "hidden" name = "filUploadAt" value = "0"/>
|
||||
<input type = "hidden" value = "" name="mbrGradIconCours" class="mbrGradIconCours"/>
|
||||
<%--파일이 없는 경우--%>
|
||||
<div class="input-file">
|
||||
<input type="file" id="fileUpload-0" name="files" title="대표이미지" accept="<c:out value="${ acceptFileExtensions }"/>"
|
||||
onchange="fn_add_file_mbrGradNm(1,'fileUl0',0)">
|
||||
<label for="fileUpload-0">파일선택</label>
|
||||
</div>
|
||||
<ul class="file-list" id = "fileUl0">
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
0(0)
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
-
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
-
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<%--복제시 clone값 set--%>
|
||||
<c:forEach var = "mbrGradCnd" items = "${resultMap.mbrGradInfo.codeMap.mbrGradCnd}">
|
||||
<c:if test = "${mbrGradCnd.cd eq '02'}">
|
||||
<input type="hidden" value="${mbrGradCnd.cd}" id="mbrGradCndCd"/>
|
||||
<input type="hidden" value="${mbrGradCnd.cdNm}" id="mbrGradCndCdNm"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<form id="backUpData" method="post" >
|
||||
<input type="hidden" name="srchMbrGradNm" value="<c:out value="${resultMap.maMbrGradVO.srchMbrGradNm}"/>" />
|
||||
<input type="hidden" name="srchCalcCndDvCds" value="<c:out value="${resultMap.maMbrGradVO.srchCalcCndDvCds }"/>" />
|
||||
<input type="hidden" name="pageUnit" value="<c:out value="${resultMap.maMbrGradVO.pageUnit }"/>" />
|
||||
<input type="hidden" name="pageIndex" value="<c:out value="${resultMap.maMbrGradVO.pageIndex }"/>" />
|
||||
<input type="hidden" name="mbrGradGroupInnb" value="<c:out value="${resultMap.maMbrGradVO.mbrGradGroupInnb}"/>" />
|
||||
<input type="hidden" name="srchSopmalCd" value="<c:out value="${resultMap.maMbrGradVO.srchSopmalCd}"/>" />
|
||||
<input type="hidden" name="sopmalCd" value="<c:out value="${resultMap.maMbrGradVO.sopmalCd}"/>" />
|
||||
<input type="hidden" name="pageDv" />
|
||||
</form>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,132 @@
|
||||
<%@ 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 : MaBsnmInqirePopupR.jsp
|
||||
Description : 사업자 상세조회 팝업
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.19 rvg 최초 생성
|
||||
--%>
|
||||
<div class="modal-header">
|
||||
<h4>사업자 조회</h4>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<h3 class="content-section__title">사업자 정보</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>사업자</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
<col style="width: 15%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultSrchMap.list }">
|
||||
<c:forEach items="${ resultSrchMap.list }" var="list" varStatus="status">
|
||||
<tr>
|
||||
<th>사업자(회사명)</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.bsnmNm}"/>
|
||||
</div>
|
||||
</td>
|
||||
<th>업태/종목</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.bizcndCn}"/><span class="mx-5 gray-7">/</span><c:out value="${list.itemCn}"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사업자등록번호</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.bizrnb}"/>
|
||||
</div>
|
||||
</td>
|
||||
<th>통신판매업 신고번호</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.mobDclNb}"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>대표자명</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.reprsntvnm}"/>
|
||||
</div>
|
||||
</td>
|
||||
<th>개인정보 보호책임자</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.indvdlinfoPrtcRspnberNm}"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>전화번호</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.telnb}"/>
|
||||
</div>
|
||||
</td>
|
||||
<th>팩스번호</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.fxnb}"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이메일</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.email}"/>
|
||||
</div>
|
||||
</td>
|
||||
<th>영업신고증</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.bsnDclNb}"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사업장 주소</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<div class="address-group">
|
||||
<div class="address-line">
|
||||
<span class="left">우편번호 : </span>
|
||||
<c:out value="${list.zip}"/>
|
||||
</div>
|
||||
<div class="address-line">
|
||||
<span class="left">주소 : </span>
|
||||
<c:out value="${list.lnbAdres}"/>
|
||||
</div>
|
||||
<div class="address-line">
|
||||
<span class="left">상세주소 : </span>
|
||||
<c:out value="${list.dtlAdres}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" rel="modal:close" class="btn outline" id="clsMd">닫기</a>
|
||||
</div>
|
||||
2022
src/main/webapp/WEB-INF/views/admin/store/sopmal/maSopmalC.jsp
Normal file
2022
src/main/webapp/WEB-INF/views/admin/store/sopmal/maSopmalC.jsp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,229 @@
|
||||
<%@ 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 : maSopmalListInqireForm.jsp
|
||||
Description : 쇼핑몰 조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024-02-05 최범식 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Include.jsp" %>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
let pageIndex = '<c:out value="${ resultMap.paramVO.pageIndex }"/>';
|
||||
let pageUnit = '<c:out value="${ resultMap.paramVO.pageUnit }"/>';
|
||||
let pageDv = '<c:out value="${ resultMap.paramVO.pageDv }"/>';
|
||||
|
||||
if (pageDv == '') {
|
||||
fn_select_sopmal_list(pageIndex, pageUnit);
|
||||
} else {
|
||||
fn_select_sopmal_list('1', '10');
|
||||
}
|
||||
|
||||
$('#srchStr').on('keydown', function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
fn_select_sopmal_list(1);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/* ********************************************************
|
||||
* 쇼핑몰 목록조회
|
||||
******************************************************** */
|
||||
const fn_select_sopmal_list = function(pageIndex, pageUnit) {
|
||||
|
||||
if (pageIndex == undefined || pageUnit == '') {
|
||||
$('#pageIndex').val('1');
|
||||
} else {
|
||||
$('#pageIndex').val(pageIndex);
|
||||
}
|
||||
|
||||
let params = $('#srchForm').serialize();
|
||||
if (pageUnit != undefined || pageUnit == '') {
|
||||
|
||||
params += '&pageUnit=' + pageUnit;
|
||||
} else {
|
||||
params += '&pageUnit=' + $('#pageUnit').val();
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '<c:url value="/admin/store/sopmal/selectSopmalListInqire"/>',
|
||||
data : params,
|
||||
success : function(data) {
|
||||
$('#pageDiv').html(data);
|
||||
$('#pageUnit').niceSelect();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
* 쇼핑몰 검색 초기화
|
||||
***********************************************/
|
||||
const fn_clear_input = function() {
|
||||
$('#srchType').val('').niceSelect('update');
|
||||
$('#srchStr').val('');
|
||||
$('#srchSopmalTyCd').val('').niceSelect('update');
|
||||
$('#srchBsnmInnb').val('').niceSelect('update');
|
||||
$('#srchOperAt').val('').niceSelect('update');
|
||||
};
|
||||
|
||||
/**********************************************
|
||||
* 쇼핑몰 등록 화면 이동
|
||||
***********************************************/
|
||||
const fn_move_sopmalRegist = function() {
|
||||
|
||||
$('#srchForm').attr('action', '<c:url value="/admin/store/sopmal/selectSopmalRegistForm"/>');
|
||||
$('#srchForm').attr('method', 'post');
|
||||
$('#srchForm').submit();
|
||||
};
|
||||
/**********************************************
|
||||
* 쇼핑몰 수정 화면 이동
|
||||
***********************************************/
|
||||
const fn_move_sopmalDetail = function(_arg) {
|
||||
|
||||
$('#sopmalCd').val(_arg);
|
||||
$('#srchForm').attr('action', '<c:url value="/admin/store/sopmal/selectSopmalUpdtForm"/>');
|
||||
$('#srchForm').attr('method', 'post');
|
||||
$('#srchForm').submit();
|
||||
};
|
||||
|
||||
/**********************************************
|
||||
* 쇼핑몰 엑셀 다운로드
|
||||
***********************************************/
|
||||
const fn_down_excelFile = function() {
|
||||
|
||||
$('#srchForm').attr('action', '<c:url value="/admin/store/sopmal/excelFileDownload"/>');
|
||||
$('#srchForm').attr('method', 'post');
|
||||
$('#srchForm').submit();
|
||||
};
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Left.jsp" %>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">쇼핑몰 목록</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<button class="btn primary" onclick="fn_move_sopmalRegist();">쇼핑몰 <spring:message code="button.insert"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<form id="srchForm" >
|
||||
<input type="hidden" name="sopmalCd" id="sopmalCd"/>
|
||||
<input type="hidden" name="pageIndex" id="pageIndex"/>
|
||||
<%-- 검색 섹션 START --%>
|
||||
<section class="content-section" >
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>쇼핑몰 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 38%;">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 38%;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>검색어</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="serchSelectBox" name="srchType" id="srchType" title="검색타입" ">
|
||||
<option value="" ${f:setSelected(resultMap.paramVO.srchType, 'ALL') }>전체</option>
|
||||
<option value="SOPMALNM" ${f:setSelected(resultMap.paramVO.srchType, 'SOPMALNM') }>쇼핑몰명</option>
|
||||
<option value="DOMAIN" ${f:setSelected(resultMap.paramVO.srchType, 'DOMAIN') }>도메인</option>
|
||||
</select>
|
||||
</div>
|
||||
<input class="input-text lg" type="text" title="검색어" name="srchStr" id="srchStr" value="${resultMap.paramVO.srchStr }"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>쇼핑몰 구분</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="md" name="srchSopmalTyCd" id="srchSopmalTyCd" title="쇼핑몰 구분">
|
||||
<option value="" ${f:setSelected(resultMap.paramVO.srchSopmalTyCd, null) } >전체</option>
|
||||
<c:forEach var="sopmalTyCd" items="${resultMap.sopmalTyCdList}" varStatus="status">
|
||||
<option value="${sopmalTyCd.cd }" ${f:setSelected(resultMap.paramVO.srchSopmalTyCd, sopmalTyCd.cd) }><c:out value="${sopmalTyCd.cdNm }"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>사업자</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="md" name="srchBsnmInnb" id="srchBsnmInnb" title="사업자">
|
||||
<option value="" ${f:setSelected(resultMap.paramVO.srchBsnmInnb, '') }>전체</option>
|
||||
<c:forEach var="company" items="${resultMap.companyAllList}" varStatus="status">
|
||||
<option value="${company.bsnmInnb}" ${f:setSelected(resultMap.paramVO.srchBsnmInnb, company.bsnmInnb) }> ${company.bsnmNm}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>상태</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="md" name="srchOperAt" id="srchOperAt" title="상태">
|
||||
<option value="" ${f:setSelected(resultMap.paramVO.srchOperAt, '') }>전체</option>
|
||||
<option value="Y" ${f:setSelected(resultMap.paramVO.srchOperAt, 'Y') }>운영</option>
|
||||
<option value="N" ${f:setSelected(resultMap.paramVO.srchOperAt, 'N') }>운영중지</option>
|
||||
</select>
|
||||
</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_clear_input();"><spring:message code="button.init"/></button>
|
||||
<button type="button" class="btn primary" onclick="fn_select_sopmal_list('1');"><spring:message code="button.search"/></button>
|
||||
</div>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
</section>
|
||||
<%-- 검색 섹션 END --%>
|
||||
<%-- 리스트 출력 섹션 START --%>
|
||||
<div id="pageDiv"></div>
|
||||
</form>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,124 @@
|
||||
<%@ 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 : maSopmalListInqireR.jsp
|
||||
Description : 몰 리스트
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024-01-19 최범식 최초 생성
|
||||
--%>
|
||||
<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_sopmal_list('1')">
|
||||
<c:forEach items="${ resultMap.paginationInfo.pageUnitArr }" var="pageUnit" varStatus="pageUnitStatus">
|
||||
<option value="<c:out value="${ pageUnit }"/>" <c:if test="${ resultMap.paramVO.recordCountPerPage eq pageUnit}">selected="selected"</c:if>><c:out value="${ pageUnit }"/>개씩</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="horizontal-line">
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<button type="button" class="btn outline sm" onclick="fn_down_excelFile();">
|
||||
<i class="icon icon_excel"></i>
|
||||
<spring:message code="button.excelDownload"/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="spacing">
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>몰 리스트</caption>
|
||||
<!-- 각 열 width 설정 -->
|
||||
<colgroup>
|
||||
<col style="width: 4%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 24%;">
|
||||
<col style="width: 16%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 7%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>쇼핑몰명</th>
|
||||
<th>구분</th>
|
||||
<th>도메인</th>
|
||||
<th>쇼핑몰운영사</th>
|
||||
<th>담당자</th>
|
||||
<th>최종수정일</th>
|
||||
<th>상태</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<%-- 리스트 BODY START --%>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.sopmalList }">
|
||||
<c:forEach items="${resultMap.sopmalList }" var="sopmal" varStatus="status">
|
||||
<tr>
|
||||
<td><c:out value="${resultMap.paginationInfo.totalRecordCount - sopmal.rnum + 1 }" /></td>
|
||||
<td class="text-left"><c:out value="${sopmal.sopmalNm }"/></td>
|
||||
<td><c:out value="${sopmal.sopmalTyCdNm }"/></td>
|
||||
<td class="text-left">
|
||||
PC : <span><c:out value="${sopmal.pcDomnAdres }"/></span><br/>
|
||||
모바일 : <span><c:out value="${sopmal.mblDomnAdres }"/></span>
|
||||
</td>
|
||||
<td class="text-left"><c:out value="${sopmal.bsnmNm }"/></td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<a href="/admin/use/mngr/selectJobUserListInqireForm" class="btn xsm primary outline" target="_blank"><spring:message code="button.view"/></a>
|
||||
</div>
|
||||
</td>
|
||||
<td><c:out value="${sopmal.updtDt }"/></td>
|
||||
<c:set var="oper" value="운영"/>
|
||||
<c:if test="${sopmal.operAt eq 'N'}">
|
||||
<c:set var="oper" value="운영중지"/>
|
||||
</c:if>
|
||||
<td><c:out value="${oper }"/></td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<button type="button" class="btn xsm primary outline" onclick="fn_move_sopmalDetail('${sopmal.sopmalCd }');"><spring:message code="button.update"/></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td class="row-no-data" colspan="9">조회된 데이터가 없습니다.</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</table>
|
||||
</div>
|
||||
<%-- 리스트 BODY END --%>
|
||||
</section>
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${ resultMap.paginationInfo }" type="image" jsFunction="fn_select_sopmal_list" />
|
||||
</div>
|
||||
2294
src/main/webapp/WEB-INF/views/admin/store/sopmal/maSopmalU.jsp
Normal file
2294
src/main/webapp/WEB-INF/views/admin/store/sopmal/maSopmalU.jsp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,92 @@
|
||||
<%@ 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 : MaSopthemaListInqireR.jsp
|
||||
Description : 쇼핑몰테마 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-12-26 리브가 최초 생성
|
||||
2023-01-09 리브가 목록조회 수정
|
||||
--%>
|
||||
<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_sopthema_list(1);">
|
||||
<c:forEach items="${ resultMap.paginationInfo.pageUnitArr }" var="pageUnit" varStatus="pageUnitStatus">
|
||||
<option value="<c:out value="${ pageUnit }"/>" <c:if test="${ resultMap.paginationInfo.recordCountPerPage eq pageUnit}">selected="selected"</c:if>><c:out value="${ pageUnit }"/>개씩</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="spacing">
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>쇼핑몰 테마 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width: 6%;">
|
||||
<col style="width: 14%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 10%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>쇼핑몰테마 명</th>
|
||||
<th>적용쇼핑몰</th>
|
||||
<th>등록일자</th>
|
||||
<th>최종수정일자</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.list }">
|
||||
<c:forEach items="${ resultMap.list }" var="list" varStatus="status">
|
||||
<tr>
|
||||
<td><c:out value="${ resultMap.paginationInfo.totalRecordCount - list.rnum + 1 }" /></td>
|
||||
<td class="left"><c:out value="${list.themaNm}"/></td>
|
||||
<td class="left"><c:out value="${list.sopmalNm}"/></td>
|
||||
<td><c:out value="${list.registDe}"/></td>
|
||||
<td><c:out value="${list.updtDe}"/></td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<button class="btn xsm primary outline" type="button"
|
||||
onclick="fn_move_dtl_uptpage(<c:out value="${list.themaInnb}"/>)">
|
||||
<spring:message code="button.update"/></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="100%"><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_sopthema_list"/>
|
||||
</div>
|
||||
@@ -0,0 +1,156 @@
|
||||
<%@ 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 : MaSopthemaListInqireR.jsp
|
||||
Description : 쇼핑몰테마 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-12-26 리브가 최초 생성
|
||||
2023-01-09 리브가 목록조회 수정
|
||||
2024-01-10 박철민 pageUnit 유지를 위한 코드 추가
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Include.jsp" %>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
let pageIndex = '<c:out value="${ resultMap.BOSopThemaVO.pageIndex }"/>';
|
||||
let pageUnit = '<c:out value="${ resultMap.BOSopThemaVO.pageUnit }"/>';
|
||||
fn_select_sopthema_list(pageIndex, pageUnit);
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 목록 조회
|
||||
******************************************************** */
|
||||
const fn_select_sopthema_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;
|
||||
}
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url : "<c:url value="/admin/store/sopthema/selectSopThemaListInqire"/>",
|
||||
data : dataStr,
|
||||
success:function(resultHtml) {
|
||||
$('#pageDiv').html(resultHtml);
|
||||
$('#pageUnit').niceSelect();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 수정폼 이동
|
||||
******************************************************** */
|
||||
const fn_move_dtl_uptpage = function(themaInnb) {
|
||||
$('#listForm').attr('action', '<c:url value="/admin/store/sopthema/selectSopThemaUpdtForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#themaInnb').val(themaInnb);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 등록폼 이동
|
||||
******************************************************** */
|
||||
const fn_move_regpage = function() {
|
||||
$('#listForm').attr('action', '<c:url value="/admin/store/sopthema/selectSopThemaRegistForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
history.replaceState({}, null, location.pathname);
|
||||
|
||||
</script>
|
||||
<body>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/admin/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="/admin/store/sopthema/selectSopThemaListInqireForm"/>">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="${ resultMap.BOSopThemaVO.pageIndex}"/>
|
||||
<input type="hidden" id="themaInnb" name="themaInnb"/>
|
||||
<section class="content-section" id="search-section">
|
||||
<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">
|
||||
<input class="input-text xl" type="text" id="srchThemaNm" name="srchThemaNm" title="쇼핑몰테마명" value="<c:out value="${ resultMap.BOSopThemaVO.srchThemaNm }" />">
|
||||
</div>
|
||||
</td>
|
||||
<th>쇼핑몰</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="md" id="srchSopmalCd" name="srchSopmalCd" title="쇼핑몰" >
|
||||
<option value="">전체</option>
|
||||
<c:forEach var="sopmalList" items="${ resultMap.SopmalCdNmList }" varStatus="">
|
||||
<option value="${ sopmalList.sopmalCd }" ${f:setSelected(resultMap.BOSopThemaVO.srchSopmalCd, sopmalList.sopmalCd)}>${ sopmalList.sopmalNm }</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container">
|
||||
<div class="left"></div>
|
||||
<div class="center">
|
||||
<button class="btn outline" id="resetBtn" type="button" onclick="fn_reset_form('search-section'); return false;">초기화</button>
|
||||
<button class="btn primary" id="searchBtn" type="button" onclick="fn_select_sopthema_list(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>
|
||||
@@ -0,0 +1,143 @@
|
||||
<%@ 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 : MaSopthemaRegistC.jsp
|
||||
Description : 쇼핑몰테마 등록
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-12-26 리브가 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Include.jsp" %>
|
||||
</head>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 등록 AJAX
|
||||
******************************************************** */
|
||||
const fn_regist = function() {
|
||||
const url = '<c:url value="/admin/store/sopthema/insertSopThemaRegist"/>';
|
||||
const data = $('#listForm').serialize();
|
||||
|
||||
if(confirm('쇼핑몰 테마를 <spring:message code="confirm.common.insert"/>')) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: url,
|
||||
data: data,
|
||||
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"/>');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 수정폼 이동
|
||||
******************************************************** */
|
||||
const fn_move_dtl_uptpage = function(themaInnb) {
|
||||
const url = '<c:url value="/admin/store/sopthema/selectSopThemaUpdtForm"/>';
|
||||
|
||||
$('#listForm').attr('action', url);
|
||||
$('#listForm').attr('method', 'get');
|
||||
$('#pageIndex').val(1);
|
||||
$('#themaInnb').val(themaInnb);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 목록 조회
|
||||
******************************************************** */
|
||||
const fn_select_list = function() {
|
||||
const url = '<c:url value="/admin/store/sopthema/selectSopThemaListInqireForm"/>';
|
||||
|
||||
$('#listForm').attr('action', url);
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
</script>
|
||||
<body>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/admin/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.catalog"/></button>
|
||||
<button class="btn primary" onclick="fn_regist();" ><spring:message code="button.insert"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<form id="listForm" method="post" action="<c:url value="/admin/store/sopthema/insertSopThemaRegist"/>">
|
||||
<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 lg" type="text" id="themaNm" name="themaNm" title="테마 명" maxlength="20">
|
||||
</div>
|
||||
</td>
|
||||
<th>스타일 시트 경로<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text lg" type="text" id="cssCours" name="cssCours" title="CSS 경로" maxlength="30">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>설명</th>
|
||||
<td colspan="3">
|
||||
<textarea class="textarea" id="dcCn" name="dcCn" title="설명" rows="8"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!--검색 조건 , 페이징 조건 -->
|
||||
<input type="hidden" id="themaInnb" name="themaInnb" value=""/>
|
||||
<input type="hidden" id="srchThemaNm" name="srchThemaNm" title="검색_쇼핑몰테마명" value="<c:out value="${ resultMap.BOSopThemaVO.srchThemaNm }"/>">
|
||||
<input type="hidden" id="srchSopmalCd" name="srchSopmalCd" title="검색_쇼핑몰" value="<c:out value="${ resultMap.BOSopThemaVO.srchSopmalCd }"/>">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.BOSopThemaVO.pageIndex }"/>"/>
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="<c:out value="${ resultMap.BOSopThemaVO.pageUnit }"/>"/>
|
||||
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,184 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page import="java.util.Arrays" %>
|
||||
<%@ page import="java.util.List" %>
|
||||
<%@ 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 : MaSopthemaUpdtU.jsp
|
||||
Description : 쇼핑몰테마 수정
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-12-26 리브가 최초 생성
|
||||
2024-01-10 리브가 검색조건, 페이징정보 유지되도록 수정
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Include.jsp" %>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 수정 AJAX
|
||||
******************************************************** */
|
||||
const fn_update = function() {
|
||||
const url = '<c:url value="/admin/store/sopthema/updateSopThemaUpdt"/>';
|
||||
const data = $('#listForm').serialize();
|
||||
|
||||
if(confirm('쇼핑몰 테마를 <spring:message code="confirm.common.update"/>')) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: url,
|
||||
data: data,
|
||||
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();
|
||||
} else {
|
||||
alert('<spring:message code="fail.common.update"/>');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 삭제 AJAX
|
||||
******************************************************** */
|
||||
const fn_delete = function() {
|
||||
const url = '<c:url value="/admin/store/sopthema/deleteSopThemaDel"/>';
|
||||
const data = $('#listForm').serialize();
|
||||
|
||||
if(confirm('쇼핑몰 테마를 <spring:message code="confirm.common.delete"/>')) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: url,
|
||||
data: data,
|
||||
success: function (data) {
|
||||
let str = JSON.parse(data.resBody.result);
|
||||
if(str.result=='success'){
|
||||
alert('<spring:message code="success.common.delete"/>');
|
||||
// 삭제 후 목록 화면으로 이동
|
||||
fn_select_sopthema_list(1);
|
||||
} else {
|
||||
alert(str.result);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 목록 조회
|
||||
******************************************************** */
|
||||
const fn_select_sopthema_list = function(pageIndex) {
|
||||
$('#listForm').attr('action', '<c:url value="/admin/store/sopthema/selectSopThemaListInqireForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
if(pageIndex) {
|
||||
$('#pageIndex').val(pageIndex);
|
||||
}
|
||||
$('#listForm').submit();
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 수정폼 이동
|
||||
******************************************************** */
|
||||
const fn_move_dtl_uptpage = function() {
|
||||
$('#listForm').attr('action', '<c:url value="/admin/store/sopthema/selectSopThemaUpdtForm"/>');
|
||||
$('#listForm').attr('method', 'get');
|
||||
$('#pageIndex').val(1);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
<body>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/admin/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_sopthema_list();" class="btn outline"><spring:message code="button.catalog"/></button>
|
||||
<button class="btn dark" onclick="fn_delete();"><spring:message code="button.delete"/></button>
|
||||
<button class="btn primary outline" onclick="fn_update(); return false;"><spring:message code="button.update"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<form id="listForm" method="post" action="/admin/store/sopthema/selectSopThemaUpdt">
|
||||
<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>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.list }">
|
||||
<c:forEach items="${ resultMap.list }" var="list" varStatus="status">
|
||||
<input type="hidden" id="themaInnb" name="themaInnb" value="${list.themaInnb}"/>
|
||||
<tr>
|
||||
<th>테마 명<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text lg" type="text" id="themaNm" name="themaNm" value="<c:out value="${list.themaNm}"/>" title="테마 명" maxlength="20">
|
||||
</div>
|
||||
</td>
|
||||
<th>스타일 시트 경로<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text lg" type="text" id="cssCours" name="cssCours" value="<c:out value="${list.cssCours}"/>" title="CSS 경로" maxlength="30">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>설명</th>
|
||||
<td colspan="3">
|
||||
<textarea class="textarea" id="dcCn" name="dcCn" title="설명" rows="8"><c:out value="${list.dcCn}"/></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>적용 쇼핑몰</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<c:out value="${list.sopmalNm}"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!--검색 조건 , 페이징 조건 -->
|
||||
<input type="hidden" id="srchThemaNm" name="srchThemaNm" title="검색_쇼핑몰테마명" value="<c:out value="${ resultMap.BOSopThemaVO.srchThemaNm }"/>">
|
||||
<input type="hidden" id="srchSopmalCd" name="srchSopmalCd" title="검색_쇼핑몰" value="<c:out value="${ resultMap.BOSopThemaVO.srchSopmalCd }"/>">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.BOSopThemaVO.pageIndex }"/>"/>
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="<c:out value="${ resultMap.BOSopThemaVO.pageUnit }"/>"/>
|
||||
|
||||
</form>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
232
src/main/webapp/WEB-INF/views/admin/store/stplat/maStplatC.jsp
Normal file
232
src/main/webapp/WEB-INF/views/admin/store/stplat/maStplatC.jsp
Normal file
@@ -0,0 +1,232 @@
|
||||
<%@ 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 : maStplatC.jsp
|
||||
Description : 약관 등록 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-12-20 김혜지 최초 생성(퍼블리싱 적용)
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Include.jsp" %>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
const sopmalCd = $("#sopmalCd").val();
|
||||
fn_create_ckeditor('#stplatCn', sopmalCd); //에디터 적용
|
||||
fn_create_ckeditor('#imprtncStplatCn', sopmalCd); //에디터 적용
|
||||
|
||||
});
|
||||
|
||||
/*********************************************************
|
||||
* 약관 목록조회 (리스트로 가기)
|
||||
*********************************************************/
|
||||
$("#listBtn").on("click", function(){
|
||||
$('#moveForm').attr('action', '<c:url value="/admin/store/stplat/selectStplatListInqireForm"/>');
|
||||
$('#moveForm').attr('method', 'post');
|
||||
$('#moveForm').submit();
|
||||
})
|
||||
|
||||
const fn_select_stplat_list = function() {
|
||||
$('#moveForm').attr('action', '<c:url value="/admin/store/stplat/selectStplatListInqireForm"/>');
|
||||
$('#moveForm').attr('method', 'post');
|
||||
$('#moveForm').submit();
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************
|
||||
* 약관 등록
|
||||
*********************************************************/
|
||||
const fn_insert_stplat = function() {
|
||||
|
||||
let saveForm = $('#listForm');
|
||||
saveForm.find("#stplatCn").val(fn_get_editor_data('#stplatCn'));
|
||||
saveForm.find("#imprtncStplatCn").val(fn_get_editor_data('#imprtncStplatCn'));
|
||||
|
||||
if(confirm('약관을 <spring:message code="confirm.common.save"/>')) {
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '<c:url value="/admin/store/stplat/insertStplatRegist"/>',
|
||||
data : saveForm.serialize(),
|
||||
success : function(result) {
|
||||
let data = JSON.parse(result.resBody.result);
|
||||
if(data.status === "0") {
|
||||
alert('<spring:message code="success.common.insert"/>');
|
||||
let params = '?stplatInnb=' + data.stplatInnb + '&pageDv=' + data.pageDv + '&srchStplatNm=' + data.srchStplatNm
|
||||
+ '&srchStplatDvCd=' + data.srchStplatDvCd + '&srchSopmalCd=' + data.srchSopmalCd;
|
||||
location.href = '<c:url value="/admin/store/stplat/selectStplatUpdtForm"/>' + params;
|
||||
}
|
||||
|
||||
if(data.status === "1") {
|
||||
alert('<spring:message code="fail.common.update"/>');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Left.jsp" %>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">약관 등록</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<button class="btn outline" id="listBtn" onclick="fn_select_stplat_list(${ resultMap.srchData.pageIndex });"><spring:message code="button.catalog"/></button>
|
||||
<button class="btn primary" onclick="fn_insert_stplat();"><spring:message code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<form id="moveForm">
|
||||
</form>
|
||||
<section class="content-section">
|
||||
<form id="listForm" class="common-form">
|
||||
<input type="hidden" name="chngResnCn" value="최초등록"/>
|
||||
<input type="hidden" id="sopmalCd" name="srchSopmalCd" value="${ resultMap.srchData.srchSopmalCd }"/>
|
||||
<input type="hidden" name="srchStplatDvCd" value="${ resultMap.srchData.srchStplatDvCd }"/>
|
||||
<input type="hidden" name="srchStplatNm" value="${ resultMap.srchData.srchStplatNm }"/>
|
||||
<input type="hidden" name="pageIndex" value="${ resultMap.srchData.pageIndex }"/>
|
||||
<input type="hidden" name="pageUnit" value="${ resultMap.srchData.pageUnit }"/>
|
||||
|
||||
<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 lg" id="stplatNm" name="stplatNm" type="text" title="약관명" maxlength="40">
|
||||
</div>
|
||||
</td>
|
||||
<th>약관 구분<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="md" id="stplatDvCd" name="stplatDvCd" title="약관구분코드">
|
||||
<option value="">선택하세요.</option>
|
||||
<c:forEach var="stplatDvList" items="${ resultMap.stplatDvList }" varStatus="">
|
||||
<option value="${ stplatDvList.cd }">${ stplatDvList.cdNm }</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</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="essntlAt-y" name="essntlAt" value="Y"/>
|
||||
<label for="essntlAt-y">예</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="essntlAt-n" name="essntlAt" value="N"/>
|
||||
<label for="essntlAt-n">아니오</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="cnWritngAt-y" name="cnWritngAt" value="Y"/>
|
||||
<label for="cnWritngAt-y">예</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="cnWritngAt-n" name="cnWritngAt" value="N"/>
|
||||
<label for="cnWritngAt-n">아니오</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="joinUseAt-y" name="joinUseAt" value="Y"/>
|
||||
<label for="joinUseAt-y">예</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="joinUseAt-n" name="joinUseAt" value="N"/>
|
||||
<label for="joinUseAt-n">아니오</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="nmbrPurchsAt-y" name="nmbrPurchsAt" value="Y"
|
||||
/>
|
||||
<label for="nmbrPurchsAt-y">예</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="nmbrPurchsAt-n" name="nmbrPurchsAt" value="N"
|
||||
/>
|
||||
<label for="nmbrPurchsAt-n">아니오</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>약관 전문<span class="red-7">*</span></th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<textarea class="textarea" id="stplatCn" name="stplatCn" title="약관전문" rows="8"></textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>중요고지 사항</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<textarea class="textarea" id="imprtncStplatCn" name="imprtncStplatCn" title="중요고지사항" rows="8"></textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,67 @@
|
||||
<%@ 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 : maStplatChangePopupR.jsp
|
||||
Description : 약관 수정이력 상세조회 팝업
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.27 김혜지 최초 생성
|
||||
--%>
|
||||
<div id="stplatHist-dtl-modal" class="modal" style="max-width: 900px;">
|
||||
<div class="modal-header">
|
||||
<h4>약관 변경내용 조회</h4>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<h3 class="content-section__title">약관 변경내용</h3>
|
||||
<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="pop-terms__box" tabindex="0" style="width: 100%;">
|
||||
<div class="terms_box">
|
||||
<c:out value="${resultMap.stplat.stplatCn}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>중요고지사항</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="pop-terms__box" tabindex="0" style="width: 100%;">
|
||||
<div class="terms_box">
|
||||
<c:out value="${resultMap.stplat.imprtncStplatCn}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>변경사유</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:out value="${resultMap.stplat.chngResnCn}"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button onclick="fn_close_modal('stplatHist-dtl-modal')" class="btn outline">닫기</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,141 @@
|
||||
<%@ 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 : maStplatListInqireR.jsp
|
||||
Description : 약관 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2024-01-10 김혜지 최초 생성
|
||||
--%>
|
||||
<%-- 리스트 출력 섹션 START --%>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
/*********************************************************--%>
|
||||
* 약관 수정 폼
|
||||
*********************************************************/
|
||||
$(".updtStplatBtn").on("click", function(){
|
||||
const stplatInnb = $(this).data("innb");
|
||||
let url = '<c:url value="/admin/store/stplat/selectStplatUpdtForm"/>';
|
||||
|
||||
$('#updtForm').attr('action', url);
|
||||
$('#updtForm').attr('method', 'post');
|
||||
$('#stplatInnb').val(stplatInnb);
|
||||
$("#updtForm").find("#stplatInnb").val(stplatInnb);
|
||||
$('#updtForm').submit();
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<section class="content-section">
|
||||
<form id="updtForm">
|
||||
<input type="hidden" id="stplatInnb" name="stplatInnb" value="">
|
||||
</form>
|
||||
<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_stplat_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="horizontal-line">
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<button type="button" class="btn outline sm" onclick="fn_excel_download();">
|
||||
<i class="icon icon_excel"></i>
|
||||
다운로드
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="spacing">
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<!-- 각 열 width 설정 -->
|
||||
<colgroup>
|
||||
<col style="width: 4%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 14%;">
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 7%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>약관명</th>
|
||||
<th>약관구분</th>
|
||||
<th>적용쇼핑몰</th>
|
||||
<th>사용여부</th>
|
||||
<th>등록일자</th>
|
||||
<th>최종수정일자</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<%-- 리스트 BODY START --%>
|
||||
<tbody id="listCount">
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultList }">
|
||||
<c:forEach items="${ resultMap.resultList }" var="stplatList" varStatus="status">
|
||||
<tr>
|
||||
<td><c:out value="${ resultMap.paginationInfo.totalRecordCount - stplatList.rnum + 1 }" /></td>
|
||||
<td style="text-align: left;"><c:out value="${ stplatList.stplatNm }"/></td>
|
||||
<td style="text-align: left;"><c:out value="${ stplatList.stplatDvNm }"/></td>
|
||||
<td style="text-align: left;"><c:out value="${ stplatList.sopmalNm }"/></td>
|
||||
<td style="text-align: center;">
|
||||
<c:if test="${ stplatList.useAt eq 'Y'}">사용</c:if>
|
||||
<c:if test="${ stplatList.useAt eq 'N'}">미사용</c:if>
|
||||
</td>
|
||||
<td><c:out value="${ stplatList.registDt }"/></td>
|
||||
<td><c:out value="${ stplatList.updtDe }"/></td>
|
||||
<td>
|
||||
<div class="manage-btn-container re">
|
||||
<button class="btn xsm primary outline updtStplatBtn" type="button"
|
||||
data-innb="${ stplatList.stplatInnb }">
|
||||
<spring:message code="button.update"/>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="8"><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
<%-- 리스트 BODY END --%>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<%-- 리스트 출력 섹션 END --%>
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${ resultMap.paginationInfo }" type="image" jsFunction="fn_select_stplat_list" />
|
||||
</div>
|
||||
@@ -0,0 +1,215 @@
|
||||
<%@ 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 : maStplatListInqireRForm.jsp
|
||||
Description : 약관 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------sms
|
||||
2023-12-20 김혜지 최초 생성
|
||||
2024-01-10 김혜지 jsp 분리
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Include.jsp" %>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
let pageIndex = '<c:out value="${ resultMap.stplat.pageIndex }"/>';
|
||||
let pageUnit = '<c:out value="${ resultMap.stplat.pageUnit }"/>';
|
||||
let pageDv = '<c:out value="${ resultMap.stplat.pageDv }"/>';
|
||||
|
||||
if (pageDv == '') {
|
||||
|
||||
fn_select_stplat_list(1);
|
||||
} else {
|
||||
pageIndex = '1';
|
||||
pageDv = '10';
|
||||
fn_select_stplat_list(pageIndex, '10');
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('#listForm').on('keydown', function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
fn_select_stplat_list('1', '10');
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/*********************************************************
|
||||
* 약관 목록조회 ajax
|
||||
*********************************************************/
|
||||
const fn_select_stplat_list = function(pageIndex, pageUnit) {
|
||||
|
||||
let dataStr;
|
||||
if(!pageIndex) {
|
||||
$('#pageIndex').val(1);
|
||||
} else {
|
||||
$('#pageIndex').val(pageIndex);
|
||||
}
|
||||
|
||||
$('#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 : "<c:url value='/admin/store/stplat/selectStplatListInqire'/>",
|
||||
data : dataStr,
|
||||
success:function(resultHtml) {
|
||||
|
||||
$('#pageDiv').html(resultHtml);
|
||||
$('#pageUnit').niceSelect();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
* 약관 검색 초기화
|
||||
*********************************************************/
|
||||
const fn_clear_input = function() {
|
||||
$('#srchStplatNm').val("");
|
||||
$('#srchSopmalCd').val("");
|
||||
$('#srchStplatDvCd').val("");
|
||||
|
||||
$('#srchSopmalCd').next(".nice-select").find("li.selected").removeClass("selected");
|
||||
$('#srchStplatDvCd').next(".nice-select").find("li.selected").removeClass("selected");
|
||||
$('#srchSopmalCd').next(".nice-select").find(".current").text("전체");
|
||||
$('#srchStplatDvCd').next(".nice-select").find(".current").text("전체");
|
||||
};
|
||||
|
||||
/*********************************************************
|
||||
* 약관 목록 엑셀 다운
|
||||
*********************************************************/
|
||||
const fn_excel_download = function() {
|
||||
$('#listForm').attr('action', '<c:url value="/admin/store/stplat/selectStplatListExcelDwld"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
* 약관 등록 폼
|
||||
*********************************************************/
|
||||
const fn_insert_stplat_form = function(){
|
||||
$('#listForm').attr('action', '<c:url value="/admin/store/stplat/selectStplatRegistForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************
|
||||
* 새로고침시 검색 초기화
|
||||
*********************************************************/
|
||||
history.replaceState({}, null, location.pathname);
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/admin/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="#" onclick="fn_insert_stplat_form();" class="btn primary">약관 <spring:message code="button.insert"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<form id="listForm" name="listForm" method="post" action="<c:url value="/admin/store/stplat/selectStplatListInqireForm"/>">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex"/>
|
||||
<!-- <input type="hidden" id="recordCountPerPage" name="recordCountPerPage" value="${ resultMap.paginationInfo.recordCountPerPage }"/> -->
|
||||
<input type="hidden" id="stplatInnb" name="stplatInnb"/>
|
||||
<%-- 검색 섹션 START --%>
|
||||
<section class="content-section" id="stplatSearchForm">
|
||||
<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">
|
||||
<input class="input-text xl" type="text" id="srchStplatNm" name="srchStplatNm" title="약관명" maxlength="35"
|
||||
value="<c:out value="${ resultMap.stplat.srchStplatNm }" />">
|
||||
</div>
|
||||
</td>
|
||||
<th>쇼핑몰</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="md" id="srchSopmalCd" name="srchSopmalCd" title="쇼핑몰코드">
|
||||
<option value="">전체</option>
|
||||
<c:forEach var="stplatSopmalList" items="${ resultMap.stplatSopmalList }" varStatus="">
|
||||
<option value="${ stplatSopmalList.sopmalCd }">${ stplatSopmalList.sopmalNm }</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>약관구분</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="md" id="srchStplatDvCd" name="srchStplatDvCd" title="약관구분코드">
|
||||
<option value="">전체</option>
|
||||
<c:forEach var="stplatDvList" items="${ resultMap.stplatDvList }" varStatus="">
|
||||
<option value="${ stplatDvList.cd }">${ stplatDvList.cdNm }</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-control-container">
|
||||
<div class="left"></div>
|
||||
<div class="center">
|
||||
<button class="btn outline" type="button" onclick="fn_clear_input();"><spring:message code="button.init"/></button>
|
||||
<button class="btn primary" type="button" onclick="fn_select_stplat_list(1);"><spring:message code="button.search"/></button>
|
||||
</div>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
</section>
|
||||
<%-- 검색 섹션 END --%>
|
||||
<div id="pageDiv">
|
||||
</div>
|
||||
</form>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
445
src/main/webapp/WEB-INF/views/admin/store/stplat/maStplatU.jsp
Normal file
445
src/main/webapp/WEB-INF/views/admin/store/stplat/maStplatU.jsp
Normal file
@@ -0,0 +1,445 @@
|
||||
<%@ 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 : maStplatU.jsp
|
||||
Description : 약관 수정 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-12-21 김혜지 최초 생성(퍼블리싱 적용)
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Include.jsp" %>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
let saveForm = $("#moveForm");
|
||||
|
||||
const sopmalCd = $("#sopmalCd").val();
|
||||
fn_create_ckeditor('#stplatCn', sopmalCd); //에디터 적용
|
||||
fn_create_ckeditor('#imprtncStplatCn', sopmalCd); //에디터 적용
|
||||
|
||||
/*********************************************************
|
||||
* 약관 목록조회 (리스트로 가기)
|
||||
*********************************************************/
|
||||
$("#listBtn").on("click", function(){
|
||||
$('#moveForm').attr('action', '<c:url value="/admin/store/stplat/selectStplatListInqireForm"/>');
|
||||
$('#moveForm').attr('method', 'post');
|
||||
$('#moveForm').submit();
|
||||
})
|
||||
|
||||
/*********************************************************
|
||||
* 약관 수정
|
||||
*********************************************************/
|
||||
$("#updtBtn").on("click", function() {
|
||||
let saveForm = $('#listForm');
|
||||
saveForm.find("#stplatCn").val(fn_get_editor_data('#stplatCn'));
|
||||
saveForm.find("#imprtncStplatCn").val(fn_get_editor_data('#imprtncStplatCn'));
|
||||
|
||||
if(confirm('약관을 <spring:message code="confirm.common.update"/>')) {
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '<c:url value="/admin/store/stplat/updateStplatUpd"/>',
|
||||
data : saveForm.serialize(),
|
||||
success : function(result) {
|
||||
let data = JSON.parse(result.resBody.result);
|
||||
if(data.status === "0") {
|
||||
alert('<spring:message code="success.common.update"/>');
|
||||
let params = '?stplatInnb=' + data.stplatInnb + '&pageDv=' + data.pageDv + '&srchStplatNm=' + data.srchStplatNm
|
||||
+ '&srchStplatDvCd=' + data.srchStplatDvCd + '&srchSopmalCd=' + data.srchSopmalCd;
|
||||
location.href = '<c:url value="/admin/store/stplat/selectStplatUpdtForm"/>' + params;
|
||||
}
|
||||
|
||||
if(data.status === "1") {
|
||||
alert('<spring:message code="fail.common.update"/>');
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
})
|
||||
|
||||
|
||||
});
|
||||
|
||||
const fn_select_stplat_list = function() {
|
||||
$('#listForm').attr('action', '<c:url value="/admin/store/stplat/selectStplatListInqireForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ********************************************************
|
||||
* 삭제 AJAX
|
||||
******************************************************** */
|
||||
const fn_delete = function() {
|
||||
let deleteForm = $('#listForm');
|
||||
//사용여부 체크 Y - 사용, N - 미사용
|
||||
const checkUrl = '<c:url value="/admin/store/stplat/selectStplatSopmalUse"/>';
|
||||
let useYnResult;
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: checkUrl,
|
||||
data: deleteForm.serialize(),
|
||||
success: function (data) {
|
||||
let str = JSON.parse(data.resBody.result);
|
||||
if(str.result=='Y'){
|
||||
alert("사용중인 약관입니다.");
|
||||
return false;
|
||||
} else {
|
||||
useYnResult = str.result;
|
||||
if(useYnResult == "N") {
|
||||
if(confirm('약관을 <spring:message code="confirm.common.delete"/>')) {
|
||||
const url = '<c:url value="/admin/store/stplat/deleteStplatDel"/>';
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: url,
|
||||
data: deleteForm.serialize(),
|
||||
success: function (data) {
|
||||
let str = JSON.parse(data.resBody.result);
|
||||
if(str.result=='success'){
|
||||
alert('<spring:message code="success.common.delete"/>');
|
||||
// 삭제 후 목록 화면으로 이동
|
||||
//fn_select_stplat_list(1);
|
||||
} else {
|
||||
alert(str.result);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
/*********************************************************
|
||||
* 약관 변경이력 목록 조회
|
||||
*********************************************************/
|
||||
const fn_select_stplatHist_list = function(pageIndex) {
|
||||
$('#listForm').attr('action', '<c:url value="/admin/store/stplat/selectStplatUpdtForm"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#pageIndex').val(pageIndex);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
* 변경내역 불러오기
|
||||
*********************************************************/
|
||||
const fn_apply_chng = function(chngSnb, stplatNms, stplatDvNm, stplatDvCd) {
|
||||
|
||||
$('#stplatCn').val(stplatCn);
|
||||
$('#stplatDvCd').val(stplatDvCd).prop('selected', true);
|
||||
$('#stplatDvCd').find('option').removeAttr('selected')
|
||||
$('#stplatDvCd').next().find('[data-value=' + stplatDvCd + ']').addClass('selected');
|
||||
$('#stplatDvCd').next(".nice-select").find("li.selected").removeClass("selected");
|
||||
$('#stplatDvCd').next(".nice-select").find(".current").text(stplatDvNm);
|
||||
//$('#imprtncStplatCn').value = imprtncStplatCn;
|
||||
|
||||
$("#chngSnb").val(chngSnb)
|
||||
let form = $('#chngForm');
|
||||
|
||||
const url = '<c:url value="/admin/store/stplat/selectStplatInqire"/>';
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: url,
|
||||
data: form.serialize(),
|
||||
success: function (data) {
|
||||
let str = JSON.parse(data.resBody.result);
|
||||
|
||||
fn_set_editor_data("#stplatCn", str.stplat.stplatCn);
|
||||
fn_set_editor_data("#imprtncStplatCn", str.stplat.imprtncStplatCn);
|
||||
$("#stplatNm").val(str.stplat.stplatNm)
|
||||
|
||||
$("#stplatDvNm").val(str.stplat.stplatDvNm)
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
|
||||
/*********************************************************
|
||||
* 약관 수정 폼
|
||||
*********************************************************/
|
||||
$(".updtStplatBtn").on("click", function(){
|
||||
const stplatInnb = $(this).data("innb");
|
||||
let url = '<c:url value="/admin/store/stplat/selectStplatUpdtForm?stplatInnb="/>' + stplatInnb;
|
||||
$('#updtForm').attr('action', url);
|
||||
$('#updtForm').attr('method', 'post');
|
||||
$('#updtForm').submit();
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/admin/Left.jsp" %>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">약관 수정</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<button class="btn outline" type="button" id="listBtn" onclick="fn_select_stplat_list();"><spring:message code="button.catalog"/></button>
|
||||
<button class="btn primary" type="button" id="updtBtn"><spring:message code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<form id="moveForm">
|
||||
</form>
|
||||
<form id="chngForm">
|
||||
<input type="hidden" name="stplatInnb" value="<c:out value="${ resultMap.stplat.stplatInnb }"/>"/>
|
||||
<input type="hidden" id="chngSnb" name="chngSnb" value=""/>
|
||||
</form>
|
||||
<form id="listForm">
|
||||
<input type="hidden" id="stplatInnb" name="stplatInnb" value="<c:out value="${ resultMap.stplat.stplatInnb }"/>"/>
|
||||
<input type="hidden" id="sopmalCd" name="srchSopmalCd" value="${ resultMap.stplat.srchSopmalCd }"/>
|
||||
<input type="hidden" name="srchStplatDvCd" value="${ resultMap.stplat.srchStplatDvCd }"/>
|
||||
<input type="hidden" name="srchStplatNm" value="${ resultMap.stplat.srchStplatNm }"/>
|
||||
<input type="hidden" name="pageIndex" value="${ resultMap.srchData.pageIndex }"/>
|
||||
<input type="hidden" name="pageUnit" value="${ resultMap.srchData.pageUnit }"/>
|
||||
<input type="hidden" name="pageDv" value="${ resultMap.srchData.pageDv }"/>
|
||||
<%-- 수정 섹션 START --%>
|
||||
<section class="content-section">
|
||||
<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 lg" id="stplatNm" name="stplatNm" type="text" title="약관명" maxlength="40" value="<c:out value="${ resultMap.stplat.stplatNm }"/>">
|
||||
</div>
|
||||
</td>
|
||||
<th>약관 구분<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="md" id="stplatDvCd" name="stplatDvCd" title="약관구분코드">
|
||||
<c:forEach var="stplatDvList" items="${ resultMap.stplatDvList }" varStatus="">
|
||||
<option value="${ stplatDvList.cd }" ${ f:setSelected(stplatDvList.cd, resultMap.stplat.stplatDvCd) }>${ stplatDvList.cdNm }</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</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="essntlAt-y" name="essntlAt" value="Y"
|
||||
<c:if test="${resultMap.stplat.essntlAt == 'Y'}">checked</c:if>
|
||||
/>
|
||||
<label for="essntlAt-y">예</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="essntlAt-n" name="essntlAt" value="N"
|
||||
<c:if test="${resultMap.stplat.essntlAt == 'N'}">checked</c:if>
|
||||
/>
|
||||
<label for="essntlAt-n">아니오</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="cnWritngAt-y" name="cnWritngAt" value="Y"
|
||||
<c:if test="${resultMap.stplat.cnWritngAt == 'Y'}">checked</c:if>
|
||||
/>
|
||||
<label for="cnWritngAt-y">예</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="cnWritngAt-n" name="cnWritngAt" value="N"
|
||||
<c:if test="${resultMap.stplat.cnWritngAt == 'N'}">checked</c:if>
|
||||
/>
|
||||
<label for="cnWritngAt-n">아니오</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="joinUseAt-y" name="joinUseAt" value="Y"
|
||||
<c:if test="${resultMap.stplat.joinUseAt == 'Y'}">checked</c:if>
|
||||
/>
|
||||
<label for="joinUseAt-y">예</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="joinUseAt-n" name="joinUseAt" value="N"
|
||||
<c:if test="${resultMap.stplat.joinUseAt == 'N'}">checked</c:if>
|
||||
/>
|
||||
<label for="joinUseAt-n">아니오</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="nmbrPurchsAt-y" name="nmbrPurchsAt" value="Y"
|
||||
<c:if test="${resultMap.stplat.nmbrPurchsAt == 'Y'}">checked</c:if>
|
||||
/>
|
||||
<label for="nmbrPurchsAt-y">예</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="nmbrPurchsAt-n" name="nmbrPurchsAt" value="N"
|
||||
<c:if test="${resultMap.stplat.nmbrPurchsAt == 'N'}">checked</c:if>
|
||||
/>
|
||||
<label for="nmbrPurchsAt-n">아니오</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사용여부<span class="red-7"></span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select class="md" id="useAt" name="useAt" title="약관구분코드">
|
||||
<option value="Y" ${ f:setSelected('Y', resultMap.stplat.useAt) }>사용</option>
|
||||
<option value="N" ${ f:setSelected('N', resultMap.stplat.useAt) }>미사용</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>약관 전문<span class="red-7">*</span></th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<textarea class="textarea" id="stplatCn" name="stplatCn" title="약관전문" rows="8"><c:out value="${ resultMap.stplat.stplatCn }"/></textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>중요고지 사항</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<textarea class="textarea" id="imprtncStplatCn" name="imprtncStplatCn" title="중요고지사항" rows="8"><c:out value="${ resultMap.stplat.imprtncStplatCn }"/></textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>적용 쇼핑몰</th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<c:out value="${ resultMap.stplat.sopmalNm }" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>변경사유<span class="red-7">*</span></th>
|
||||
<td colspan="3">
|
||||
<div class="td-inner">
|
||||
<textarea class="textarea" id="chngResnCn" name="chngResnCn" title="변경사유" rows="4" maxlength="1000"><c:out value="${ resultMap.stplat.chngResnCn }"/></textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<%-- 수정 섹션 END --%>
|
||||
<%-- 리스트 출력 섹션 START --%>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">변경이력</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>약관 변경이력</caption>
|
||||
<!-- 각 열 width 설정 -->
|
||||
<colgroup>
|
||||
<col style="width: 4%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 12%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 7%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>변경사유</th>
|
||||
<th>변경일시</th>
|
||||
<th>변경자</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<%-- 리스트 BODY START --%>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.resultList }">
|
||||
<c:forEach items="${ resultMap.resultList }" var="histList" varStatus="status">
|
||||
<tr>
|
||||
<td><c:out value="${ histList.chngSnb }"/></td>
|
||||
<td class="left">
|
||||
<a class="under-line" onclick="fn_open_modal('#stplat-modal','#stplatHist-dtl-modal','selectStplatChangePopup',
|
||||
{'stplatInnb': <c:out value="${ histList.stplatInnb }"/>,'chngSnb': <c:out value="${ histList.chngSnb }"/>}); return false;">
|
||||
<c:out value="${ histList.chngResnCn }"/></a>
|
||||
</td>
|
||||
<td><c:out value="${ histList.registDt }"/></td>
|
||||
<td><c:out value="${ histList.mngrNm }"/></td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<button class="btn xsm outline" onclick="fn_apply_chng('${ histList.chngSnb }', '${ histList.stplatNm }', '${ histList.stplatDvNm }', '${ histList.stplatDvCd }'); return false;">적용</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="8"><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
<%-- 리스트 BODY END --%>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<%-- 리스트 출력 섹션 END --%>
|
||||
</form>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
<div id="stplat-modal">
|
||||
</div>
|
||||
</html>
|
||||
Reference in New Issue
Block a user