초기소스
This commit is contained in:
@@ -0,0 +1,206 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%--
|
||||
Class Name : ConditionFreeDlvy.jsp
|
||||
Description : 무료배송 조건부 배송비 jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.01 전일찬 최초 생성
|
||||
--%>
|
||||
<script type="text/javascript">
|
||||
$( document ).ready(function() {
|
||||
/** 무료배송(조건부) 조건 체크박스 컨트롤 */
|
||||
const amtCndUseAt = document.querySelector('#amtCndUseAt');
|
||||
const amtCndAditAmt = document.querySelector('#amtCndAditAmt');
|
||||
const cntCndUseAt = document.querySelector('#cntCndUseAt');
|
||||
const cntCndAditAmt = document.querySelector('#cntCndAditAmt');
|
||||
fn_check_BoxControl(amtCndUseAt,amtCndAditAmt);
|
||||
fn_check_BoxControl(cntCndUseAt,cntCndAditAmt);
|
||||
|
||||
/** 묶음배송 체크박스 컨트롤 */
|
||||
const bundleDlvyY = document.querySelector('#bundleDlvyY');
|
||||
const bundleDlvyN = document.querySelector('#bundleDlvyN');
|
||||
const bundleDlvyCndAmt = document.querySelector('#bundleDlvyCndAmt');
|
||||
fn_click_bundleDlvy(bundleDlvyY, bundleDlvyCndAmt);
|
||||
fn_click_bundleDlvy(bundleDlvyN, bundleDlvyCndAmt);
|
||||
|
||||
/** 배송권역 셀렉트박스 컨트롤 */
|
||||
const dlvyAreaAditAt1 = document.querySelector('#dlvyAreaAditAt');
|
||||
const areaAditDlvyAmt1 = document.querySelector('#areaAditDlvyAmt');
|
||||
fn_change_dlvyArea(dlvyAreaAditAt1, areaAditDlvyAmt1);
|
||||
|
||||
//왕복 여부 체크박스 컨트롤
|
||||
const returnDlvyApplcAt = document.querySelector('#returnDlvyApplcAt');
|
||||
const exchngDlvyAmt = document.querySelector('#exchngDlvyAmt');
|
||||
fn_check_BoxControl(returnDlvyApplcAt,exchngDlvyAmt);
|
||||
|
||||
if ($(".input-text.number").val() === '' || $(".input-text.number").val() == null) {
|
||||
$(".input-text.number").val('0');
|
||||
}
|
||||
|
||||
$(".input-text.number").on("focus", function () {
|
||||
|
||||
if ($(this).val() === '0') {
|
||||
$(this).val('');
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<input type="hidden" name="dlvyGroupDvCd" value="01"/>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">배송비</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>배송그룹 배송비</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>기본 배송비</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="input-container">
|
||||
<input type="text" class="input-text sm right number"
|
||||
value="<fmt:formatNumber value='${resultMap.dlvyGroup.dftDlvyAmt}' pattern="#,###" />"
|
||||
title="기본배송비" name="dftDlvyAmt" maxlength="13" >
|
||||
<span class="input-unit-text">원</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>조건(다중선택가능)</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" id="amtCndUseAt" name="amtCndUseAt" value="Y" <c:if test="${ resultMap.dlvyGroup.amtCndUseAt eq 'Y' }">checked="checked"</c:if>>
|
||||
<span style="margin-right: 5px;" class="check"></span>
|
||||
<input type="text" class="input-text sm right number" <c:if test="${ resultMap.dlvyGroup.amtCndUseAt ne 'Y' }">disabled="disabled"</c:if> value="<fmt:formatNumber value='${resultMap.dlvyGroup.amtCndAditAmt}' pattern="#,###" />" title="금액 조건" id="amtCndAditAmt" name="amtCndAditAmt" maxlength="13">
|
||||
</label>
|
||||
<span class="control-label">원 이상일 때 무료배송</span>
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" id="cntCndUseAt" name="cntCndUseAt" value="Y" <c:if test="${ resultMap.dlvyGroup.cntCndUseAt eq 'Y' }">checked="checked"</c:if>>
|
||||
<span style="margin-right: 5px;" class="check"></span>
|
||||
<input type="text" class="input-text sm right number" <c:if test="${ resultMap.dlvyGroup.cntCndUseAt ne 'Y' }">disabled="disabled"</c:if> value="<fmt:formatNumber value='${resultMap.dlvyGroup.cntCndAditAmt}' pattern="#,###" />" title="구매 개수 조건" id="cntCndAditAmt" name="cntCndAditAmt" maxlength="13">
|
||||
</label>
|
||||
<span class="control-label">개 이상일 때 무료배송</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">묶음배송</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="custom-radio-container">
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="bundleDlvyY" name="bundleDlvyUseAt" value="Y"
|
||||
<c:if test="${resultMap.dlvyGroup.bundleDlvyUseAt eq 'Y' }">checked="checked"</c:if> <c:if test="${empty resultMap.dlvyGroup.bundleDlvyUseAt}">checked="checked"</c:if> >
|
||||
<label for="bundleDlvyY">사용함</label>
|
||||
</div>
|
||||
<div class="custom-radio">
|
||||
<input type="radio" id="bundleDlvyN" name="bundleDlvyUseAt" value="N"
|
||||
<c:if test="${resultMap.dlvyGroup.bundleDlvyUseAt eq 'N' }">checked="checked"</c:if>>
|
||||
<label for="bundleDlvyN">사용안함</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="td-inner vertical">
|
||||
<div class="input-container">
|
||||
<span class="mr-10">묶음배송 상품 금액 합이</span>
|
||||
<input type="text" class="input-text sm right number"
|
||||
<c:if test="${resultMap.dlvyGroup.bundleDlvyUseAt eq 'N' }">disabled="disabled"</c:if>
|
||||
value="<fmt:formatNumber value='${resultMap.dlvyGroup.bundleDlvyCndAmt}' pattern="#,###" />"
|
||||
title="묶음배송 조건" id="bundleDlvyCndAmt" name="bundleDlvyCndAmt" maxlength="13">
|
||||
<span class="input-unit-text mr-8">원</span>
|
||||
<span>이상일 때 무료배송</span>
|
||||
</div>
|
||||
<div class="gray-7">
|
||||
<p class="fyi">값을 1원 이상 입력 하신 경우 설정이 가능 합니다.</p>
|
||||
<p class="fyi">묶음배송을 사용함으로 설정하신 상품의 경우에만 해당 조건이 적용됩니다.</p>
|
||||
<p class="fyi">묶음배송 상품이 아닌 경우, 상품별로 각각 배송비가 부과될 수 있습니다.</p>
|
||||
<p class="fyi">묶음배송 상품은 2개 이상 주문해야 무료배송 조건이 적용됩니다.</p>
|
||||
<p class="fyi">무료배송 처리된 묶음배송 상품이 있을 경우, 전체 묶음배송 상품이 무료배송 처리됩니다.
|
||||
</p>
|
||||
<p class="fyi">묶음배송 상품인 경우, 금액이 가장 높은 기본 배송비를 한 번만 부과합니다.</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">배송 권역</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select title="배송권역 사용여부" id="dlvyAreaAditAt" name="dlvyAreaAditAt">
|
||||
<option value="N" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt ne 'Y' }">selected="selected"</c:if>>사용안함</option>
|
||||
<option value="Y" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt eq 'Y' }">selected="selected"</c:if>>2권역</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="td-inner vertical">
|
||||
<div class="input-container">
|
||||
<span class="mr-10 fw-500">도서산간지역+제주지역 추가 배송비</span>
|
||||
<input type="text" class="input-text sm right number" id="areaAditDlvyAmt"
|
||||
name="areaAditDlvyAmt" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt ne 'Y' }">disabled="disabled"</c:if>
|
||||
value="<fmt:formatNumber value='${resultMap.dlvyGroup.areaAditDlvyAmt}' pattern="#,###" />"
|
||||
title="배송권역에 대한 추가 배송비" maxlength="13">
|
||||
<span class="input-unit-text mr-8">원</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">반품배송비</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="input-container">
|
||||
<span>편도 :
|
||||
<input type="text" class="input-text sm right number" value="<fmt:formatNumber value='${resultMap.dlvyGroup.returnDlvyAmt}' pattern="#,###" />" title="편도반품배송비" id="returnDlvyAmt" name="returnDlvyAmt" maxlength="13">
|
||||
원
|
||||
</span>
|
||||
</div>
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" id="returnDlvyApplcAt" name="returnDlvyApplcAt" value="Y" <c:if test="${ resultMap.dlvyGroup.returnDlvyApplcAt eq 'Y' }">checked="checked"</c:if>>
|
||||
<span style="margin-right: 5px;" class="check"></span>
|
||||
</label>
|
||||
<span class="control-label">왕복 여부</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="input-container">
|
||||
<span>왕복 :
|
||||
<input type="text" class="input-text sm right number" value="<fmt:formatNumber value='${resultMap.dlvyGroup.exchngDlvyAmt}' pattern="#,###" />" title="왕복반품배송비" id="exchngDlvyAmt" name="exchngDlvyAmt" maxlength="13" <c:if test="${resultMap.dlvyGroup.returnDlvyApplcAt ne 'Y'}"> disabled="disabled" </c:if> >
|
||||
원
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
319
src/main/webapp/WEB-INF/views/mngr/setup/dlvygrp/DlvyGroupC.jsp
Normal file
319
src/main/webapp/WEB-INF/views/mngr/setup/dlvygrp/DlvyGroupC.jsp
Normal file
@@ -0,0 +1,319 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%--
|
||||
Class Name : dlvyGroupC.jsp
|
||||
Description : 배송그룹 등록
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.11.28 전일찬 최초 생성11
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Include.jsp" %>
|
||||
</head>
|
||||
<script type="text/javascript">
|
||||
|
||||
/* ********************************************************
|
||||
* Move Tab Action Function
|
||||
******************************************************** */
|
||||
|
||||
$(document).ready(function(){
|
||||
var dlvyGroupDv = 'ConditionFreeDlvy';
|
||||
var dlvyGroupUrl = '';
|
||||
var dlvyGroupDlvyDivId = '';
|
||||
|
||||
/* 해당 그룹 탭으로 이동 */
|
||||
contentTabBtn.removeClass("active");
|
||||
contentTabContent.removeClass("active");
|
||||
|
||||
if(dlvyGroupDv == "ConditionFreeDlvy"){
|
||||
$("#ConditionFreeDlvyBtn").addClass("active");
|
||||
contentTabContent.eq(contentTabBtn.index($("button.active"))).addClass("active");
|
||||
}
|
||||
if(dlvyGroupDv == "FreeDlvy"){
|
||||
$("#FreeDlvyBtn").addClass("active");
|
||||
contentTabContent.eq(contentTabBtn.index($("button.active"))).addClass("active");
|
||||
}
|
||||
if(dlvyGroupDv == "PayDlvy"){
|
||||
$("#PayDlvyBtn").addClass("active");
|
||||
contentTabContent.eq(contentTabBtn.index($("button.active"))).addClass("active");
|
||||
}
|
||||
|
||||
/* html load action */
|
||||
const fn_load_html = () => {
|
||||
switch(dlvyGroupDv) {
|
||||
case 'ConditionFreeDlvy' :
|
||||
dlvyGroupUrl = '<c:url value="/mngr/setup/dlvygrp/conditionFreeDlvy"/>';
|
||||
dlvyGroupDlvyDivId = '#ConditionFreeDlvy';
|
||||
break;
|
||||
case 'FreeDlvy' :
|
||||
dlvyGroupUrl = '<c:url value="/mngr/setup/dlvygrp/freeDlvy"/>';
|
||||
dlvyGroupDlvyDivId = '#FreeDlvy';
|
||||
break;
|
||||
case 'PayDlvy' :
|
||||
dlvyGroupUrl = '<c:url value="/mngr/setup/dlvygrp/payDlvy"/>';
|
||||
dlvyGroupDlvyDivId = '#PayDlvy';
|
||||
break;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : dlvyGroupUrl,
|
||||
data : {dlvyGroupInnb : '', dlvyGroupDvCd : ''},
|
||||
success(response) {
|
||||
$('#ConditionFreeDlvy').html("");
|
||||
$('#FreeDlvy').html("");
|
||||
$('#PayDlvy').html("");
|
||||
$(dlvyGroupDlvyDivId).html(response);
|
||||
$(".select-box > select").niceSelect();
|
||||
$(".input-text.number").on("input", function () {
|
||||
var input = $(this).val();
|
||||
$(this).val(input.replace(/[^0-9]/g, "").replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,").replace(/^0/,""));
|
||||
});
|
||||
},
|
||||
error : console.log
|
||||
});
|
||||
}
|
||||
|
||||
fn_load_html();
|
||||
|
||||
/* tab button click action */
|
||||
$(".content-tab__btn").on('click', function(){
|
||||
fn_set_content_tab($(this).index());
|
||||
dlvyGroupDv = contentTabContent.eq($(this).index()).attr('id');
|
||||
fn_load_html();
|
||||
});
|
||||
|
||||
/* phone - 자동입력 */
|
||||
$(".input-text.phone").on("input", function () {
|
||||
var input = $(this).val();
|
||||
$(this).val(input.replace(/[^0-9]/g, "").replace(/^(\d{2,3})(\d{3,4})(\d{4})$/, "$1-$2-$3").replace(/^(\d{4})(\d{4})$/, "$1-$2"));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 배송권역 변경 시 value 값 변경
|
||||
******************************************************** */
|
||||
const fn_change_dlvyArea = (radio, textbox) => {
|
||||
$(radio).on('change', () => {
|
||||
if(radio.value == 'Y'){
|
||||
textbox.disabled = false;
|
||||
}
|
||||
if(radio.value == 'N'){
|
||||
textbox.disabled = true;
|
||||
textbox.value= '0';
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 묶음배송 변경 시 value 값 변경
|
||||
******************************************************** */
|
||||
const fn_click_bundleDlvy = (radio, textbox) => {
|
||||
$(radio).on('click', () => {
|
||||
if(radio.value == 'Y'){
|
||||
textbox.disabled = false;
|
||||
}
|
||||
if(radio.value == 'N'){
|
||||
textbox.disabled = true;
|
||||
textbox.value= '0';
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 체크박스 변경 시 value 값 변경
|
||||
******************************************************** */
|
||||
const fn_check_BoxControl = function(checkbox, textbox) {
|
||||
$(checkbox).on('click', function(){
|
||||
let targetValue = checkbox.value;
|
||||
if(checkbox.checked == true){
|
||||
targetValue = 'Y';
|
||||
textbox.disabled = false;
|
||||
} else {
|
||||
targetValue = 'N';
|
||||
textbox.disabled = true;
|
||||
textbox.value= '0';
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 배송그룹 목록조회 화면 이동
|
||||
******************************************************** */
|
||||
const fn_select_dlvygroup_list = function() {
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 배송그룹 등록
|
||||
******************************************************** */
|
||||
const fn_save_dlvygrp = function() {
|
||||
let saveForm = $('#DlvyForm').serialize();
|
||||
if(confirm('배송 그룹을 <spring:message code="confirm.common.save"/>')) {
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '<c:url value="/mngr/setup/dlvygrp/insertDlvyGroup"/>',
|
||||
data : saveForm,
|
||||
success : function(data) {
|
||||
var temp = data.resBody.result;
|
||||
var rm = JSON.parse(temp);
|
||||
if(rm.result == 'success'){
|
||||
let dlvyGroupInnb = parseInt(rm.dlvyGroupInnb);
|
||||
let dgiInput = document.createElement('input');
|
||||
<%--$('#listForm').attr('action', '<c:url value="/mngr/setup/dlvygrp/dlvyGroupDtlU"/>');--%>
|
||||
dgiInput.setAttribute('type','hidden');
|
||||
dgiInput.setAttribute('name','dlvyGroupInnb');
|
||||
dgiInput.setAttribute('value',dlvyGroupInnb);
|
||||
$('#listForm').append(dgiInput);
|
||||
let urlParams = new URL(location.href).searchParams;
|
||||
let pageIndex = urlParams.get('pageIndex');
|
||||
let pageUnit = urlParams.get('pageUnit');
|
||||
$('#listForm').submit();
|
||||
alert('<spring:message code="success.common.insert"/>');
|
||||
}
|
||||
else if(rm.result == 'fail'){
|
||||
alert('<spring:message code="fail.common.insert"/>');
|
||||
return;
|
||||
}
|
||||
else{
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* TODO : 우편번호 찾기 임시로 적용한 소스로 추후 목적에 맞춰서 고칠것
|
||||
******************************************************** */
|
||||
const fn_set_postcode = function(data) {
|
||||
$('#postcode').val(data.postcode);
|
||||
$('#adresDv').val(data.addressType);
|
||||
if(data.jibunAddress != '') {
|
||||
$('#address').val(data.jibunAddress);
|
||||
} else {
|
||||
$('#address').val(data.roadAddress);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Header.jsp" %>
|
||||
<main class="main">
|
||||
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Left.jsp" %>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">배송 그룹 등록</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<a href="javascript:void(0);" onclick="fn_select_dlvygroup_list(); return false;" onkeypress="this.onclick" class="btn outline"><spring:message code="button.list"/></a>
|
||||
<button class="btn primary" onclick="fn_save_dlvygrp(); return false;"><spring:message code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-tab">
|
||||
<button id="ConditionFreeDlvyBtn" class="content-tab__btn">무료배송(조건부)</button>
|
||||
<button id="FreeDlvyBtn" class="content-tab__btn">무료배송</button>
|
||||
<button id="PayDlvyBtn" class="content-tab__btn">유료배송</button>
|
||||
</div><br>
|
||||
<form id="DlvyForm" method="post" action="">
|
||||
<input type="hidden" id="adresDv" name="adresDv" value=""/>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">배송그룹명</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>배송그룹명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>명칭<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text md" type="text" title="배송그룹명" id="dlvyGroupNm" name="dlvyGroupNm" maxlength="25" value="" >
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<div id="ConditionFreeDlvy" class="content-tab__content">
|
||||
</div>
|
||||
<div id="FreeDlvy" class="content-tab__content">
|
||||
</div>
|
||||
<div id="PayDlvy" class="content-tab__content">
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">반송지</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>주소</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="address-group">
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">우편번호</span>
|
||||
<input type="text" class="input-text xsm mr-2" value="" readonly
|
||||
title="반송지 우편번호" id="postcode" name="rtnlcZip">
|
||||
<button type="button" onclick="fn_select_postcode(fn_set_postcode); return false;" class="address-line__find-btn">주소찾기</button>
|
||||
</div>
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">주소</span>
|
||||
<input type="text" class="input-text lg" value="" readonly
|
||||
title="반송지 주소" id="address" name="rtnlcAdres">
|
||||
</div>
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">상세주소</span>
|
||||
<input type="text" class="input-text md" value="" maxlength="35"
|
||||
title="반송지 상세주소" id="detailAddress" name="rtnlcDtlAdres">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>전화번호</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="phone-container">
|
||||
<input type="text" class="input-text sm phone" value=""
|
||||
title="전화번호" id="rtnlcTelnb" maxlength="13" name="rtnlcTelnb">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
</div>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div><br><br>
|
||||
</main>
|
||||
<form id="listForm" name="listForm" method="post" action="<c:url value="/mngr/setup/dlvygrp/dlvyGroupListR"/>">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="1"/>
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="10"/>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,313 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%--
|
||||
Class Name : DlvyGroupDtlU.jsp
|
||||
Description : 배송그룹 수정
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.11.28 작성자명 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Include.jsp" %>
|
||||
</head>
|
||||
<script type="text/javascript">
|
||||
|
||||
/* ********************************************************
|
||||
* Move Tab Action Function
|
||||
******************************************************** */
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
var dlvyGroupDvCd = '<c:out value="${ resultMap.dlvyGroup.dlvyGroupDvCd }"/>';
|
||||
var dlvyGroupDv = '';
|
||||
|
||||
if(dlvyGroupDvCd === "01"){
|
||||
dlvyGroupDv = 'ConditionFreeDlvy'
|
||||
}else if(dlvyGroupDvCd === "02"){
|
||||
dlvyGroupDv = 'FreeDlvy'
|
||||
}else if(dlvyGroupDvCd === "03"){
|
||||
dlvyGroupDv = 'PayDlvy'
|
||||
}
|
||||
|
||||
var dlvyGroupUrl = '';
|
||||
var dlvyGroupDlvyDivId = '';
|
||||
|
||||
/* 해당 그룹 탭으로 이동 */
|
||||
contentTabBtn.removeClass("active");
|
||||
contentTabContent.removeClass("active");
|
||||
|
||||
if(dlvyGroupDv == "ConditionFreeDlvy"){
|
||||
$("#ConditionFreeDlvyBtn").addClass("active");
|
||||
contentTabContent.eq(contentTabBtn.index($("button.active"))).addClass("active");
|
||||
}
|
||||
if(dlvyGroupDv == "FreeDlvy"){
|
||||
$("#FreeDlvyBtn").addClass("active");
|
||||
contentTabContent.eq(contentTabBtn.index($("button.active"))).addClass("active");
|
||||
}
|
||||
if(dlvyGroupDv == "PayDlvy"){
|
||||
$("#PayDlvyBtn").addClass("active");
|
||||
contentTabContent.eq(contentTabBtn.index($("button.active"))).addClass("active");
|
||||
}
|
||||
|
||||
/* html load action */
|
||||
const fn_load_html = () => {
|
||||
switch(dlvyGroupDv) {
|
||||
case 'ConditionFreeDlvy' :
|
||||
dlvyGroupUrl = '<c:url value="/mngr/setup/dlvygrp/conditionFreeDlvy"/>';
|
||||
dlvyGroupDlvyDivId = '#ConditionFreeDlvy';
|
||||
break;
|
||||
case 'FreeDlvy' :
|
||||
dlvyGroupUrl = '<c:url value="/mngr/setup/dlvygrp/freeDlvy"/>';
|
||||
dlvyGroupDlvyDivId = '#FreeDlvy';
|
||||
break;
|
||||
case 'PayDlvy' :
|
||||
dlvyGroupUrl = '<c:url value="/mngr/setup/dlvygrp/payDlvy"/>';
|
||||
dlvyGroupDlvyDivId = '#PayDlvy';
|
||||
break;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : dlvyGroupUrl,
|
||||
data : {dlvyGroupInnb : '${resultMap.dlvyGroup.dlvyGroupInnb}', dlvyGroupDvCd : '${resultMap.dlvyGroup.dlvyGroupDvCd}'},
|
||||
success(response) {
|
||||
$('#ConditionFreeDlvy').html("");
|
||||
$('#FreeDlvy').html("");
|
||||
$('#PayDlvy').html("");
|
||||
$(dlvyGroupDlvyDivId).html(response);
|
||||
$(".select-box > select").niceSelect();
|
||||
$(".input-text.number").on("input", function () {
|
||||
var input = $(this).val();
|
||||
$(this).val(input.replace(/[^0-9]/g, "").replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,").replace(/^0/,""));
|
||||
});
|
||||
},
|
||||
error : console.log
|
||||
});
|
||||
}
|
||||
|
||||
fn_load_html();
|
||||
|
||||
/* click action */
|
||||
$(".content-tab__btn").on('click', function(){
|
||||
fn_set_content_tab($(this).index());
|
||||
dlvyGroupDv = contentTabContent.eq($(this).index()).attr('id');
|
||||
fn_load_html();
|
||||
});
|
||||
|
||||
/* phone - 자동입력 */
|
||||
$(".input-text.phone").on("input", function () {
|
||||
var input = $(this).val();
|
||||
$(this).val(input.replace(/[^0-9]/g, "").replace(/^(\d{2,3})(\d{3,4})(\d{4})$/, "$1-$2-$3").replace(/^(\d{4})(\d{4})$/, "$1-$2"));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 우편번호 입력
|
||||
******************************************************** */
|
||||
const fn_set_postcode = function(data) {
|
||||
$('#rtnlcZip').val(data.postcode);
|
||||
if(data.addressType === '02') {
|
||||
$('#rtnlcAdres').val(data.jibunAddress);
|
||||
} else {
|
||||
$('#rtnlcAdres').val(data.roadAddress);
|
||||
}
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 배송권역 변경 시 value 값 변경
|
||||
******************************************************** */
|
||||
const fn_change_dlvyArea = (radio, textbox) => {
|
||||
$(radio).on('change', () => {
|
||||
if(radio.value == 'Y'){
|
||||
textbox.disabled = false;
|
||||
}
|
||||
if(radio.value == 'N'){
|
||||
textbox.disabled = true;
|
||||
textbox.value= '0';
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 묶음배송 변경 시 value 값 변경
|
||||
******************************************************** */
|
||||
const fn_click_bundleDlvy = (radio, textbox) => {
|
||||
$(radio).on('click', () => {
|
||||
if(radio.value == 'Y'){
|
||||
textbox.disabled = false;
|
||||
}
|
||||
if(radio.value == 'N'){
|
||||
textbox.disabled = true;
|
||||
textbox.value= '0';
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 체크박스 변경 시 value 값 변경
|
||||
******************************************************** */
|
||||
const fn_check_BoxControl = function(checkbox, textbox) {
|
||||
$(checkbox).on('click', function(){
|
||||
let targetValue = checkbox.value;
|
||||
if(checkbox.checked == true){
|
||||
targetValue = "Y";
|
||||
textbox.disabled = false;
|
||||
} else {
|
||||
targetValue = "N";
|
||||
textbox.disabled = true;
|
||||
textbox.value= '0';
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* ********************************************************
|
||||
* 배송그룹 목록조회 화면 이동
|
||||
******************************************************** */
|
||||
const fn_select_dlvygroup_list = function() {
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* Dlvygrp save Action
|
||||
******************************************************** */
|
||||
let saveDlvygrp = () => {
|
||||
let saveDlvygrp = $('#DlvyForm');
|
||||
if(confirm('배송 그룹을 <spring:message code="confirm.common.update"/>')) {
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '<c:url value="/mngr/setup/dlvygrp/updateDlvyGroupDtl"/>',
|
||||
data : saveDlvygrp.serialize(),
|
||||
success : function(data) {
|
||||
var temp = data.resBody.result;
|
||||
var rm = JSON.parse(temp);
|
||||
if(rm.result == 'success') {
|
||||
alert('<spring:message code="success.common.update"/>');
|
||||
}
|
||||
else if(rm.result == 'fail'){
|
||||
alert('<spring:message code="fail.common.update"/>');
|
||||
return;
|
||||
}
|
||||
else{
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<body>
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Left.jsp" %>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">배송 그룹 수정</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<a href="javascript:void(0);" onclick="fn_select_dlvygroup_list(); return false;" onkeypress="this.onclick" class="btn outline"><spring:message code="button.list"/></a>
|
||||
<button class="btn primary" type="button" onclick="saveDlvygrp();"><spring:message code="button.save"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-tab">
|
||||
<button id="ConditionFreeDlvyBtn" class="content-tab__btn">무료배송(조건부)</button>
|
||||
<button id="FreeDlvyBtn" class="content-tab__btn">무료배송</button>
|
||||
<button id="PayDlvyBtn" class="content-tab__btn">유료배송</button>
|
||||
</div><br>
|
||||
<form id="DlvyForm" method="post" action="/mngr/setup/dlvygrp/updateDlvyGroupDtl">
|
||||
<input type="hidden" id="dlvyGroupInnb" name="dlvyGroupInnb" value="<c:out value="${resultMap.dlvyGroup.dlvyGroupInnb}"/>"/>
|
||||
<input type="hidden" id="rtnlcInnb" name="rtnlcInnb" value="<c:out value="${resultMap.dlvyGroup.rtnlcInnb}"/>"/>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">배송그룹명</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>배송그룹명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>명칭<span class="red-7">*</span></th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<input class="input-text md" type="text" title="배송그룹명" id="dlvyGroupNm" name="dlvyGroupNm" maxlength="50" value="<c:out value="${resultMap.dlvyGroup.dlvyGroupNm}"/>">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<div id="ConditionFreeDlvy" class="content-tab__content">
|
||||
</div>
|
||||
<div id="FreeDlvy" class="content-tab__content">
|
||||
</div>
|
||||
<div id="PayDlvy" class="content-tab__content">
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">반송지</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>주소</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="address-group">
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">우편번호</span>
|
||||
<input type="text" class="input-text xsm mr-2" value="<c:out value="${resultMap.dlvyGroup.rtnlcZip}"/>" title="반송지 우편번호" id="rtnlcZip" name="rtnlcZip">
|
||||
<button type="button" onclick="fn_select_postcode(fn_set_postcode); return false;" class="address-line__find-btn">주소찾기</button>
|
||||
</div>
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">주소</span>
|
||||
<input type="text" class="input-text lg" value="<c:out value="${resultMap.dlvyGroup.rtnlcAdres}"/>" title="반송지 주소" id="rtnlcAdres" name="rtnlcAdres">
|
||||
</div>
|
||||
<div class="address-line">
|
||||
<span class="address-line__title">상세주소</span>
|
||||
<input type="text" class="input-text md" value="<c:out value="${resultMap.dlvyGroup.rtnlcDtlAdres}"/>" maxlength="35" title="반송지 상세주소" id="rtnlcDtlAdres" name="rtnlcDtlAdres">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>전화번호</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="phone-container">
|
||||
<input type="text" class="input-text m phone" value="<c:out value="${resultMap.dlvyGroup.rtnlcTelnb}"/>" title="전화번호" id="rtnlcTelnb" maxlength="13" name="rtnlcTelnb">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
</div>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div><br><br>
|
||||
</main>
|
||||
<form id="listForm" name="listForm" method="post" action="<c:url value="/mngr/setup/dlvygrp/dlvyGroupListR"/>">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="1"/>
|
||||
<input type="hidden" id="pageUnit" name="pageUnit" value="10"/>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,196 @@
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||
<%--
|
||||
Class Name : dlvyGroupListR.jsp
|
||||
Description : 배송그룹 목록조회 화면
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2023-11-28 전일찬 최초 생성
|
||||
--%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Include.jsp" %>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 배송 그룹 수정화면 이동
|
||||
******************************************************** */
|
||||
const fn_move_uptpage = function(value) {
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/setup/dlvygrp/dlvyGroupDtlU"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#dlvyGroupInnb').val(value);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 배송 그룹 등록화면 이동
|
||||
******************************************************** */
|
||||
const fn_move_regpage = function() {
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/setup/dlvygrp/dlvyGroupC"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 배송 그룹 목록조회
|
||||
******************************************************** */
|
||||
const fn_select_dlvygroup_list = function(pageIndex) {
|
||||
$('#listForm').attr('action', '<c:url value="/mngr/setup/dlvygrp/dlvyGroupListR"/>');
|
||||
$('#listForm').attr('method', 'post');
|
||||
$('#pageIndex').val(pageIndex);
|
||||
$('#listForm').submit();
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 배송 그룹 삭제
|
||||
******************************************************** */
|
||||
const fn_delete_dlvygroup = function(value) {
|
||||
if(confirm('배송 그룹을 <spring:message code="confirm.common.delete"/>')) {
|
||||
$('#dlvyGroupInnb').val(value);
|
||||
$.ajax({
|
||||
type : 'post',
|
||||
url : '<c:url value="/mngr/setup/dlvygrp/deleteDlvyGroup"/>',
|
||||
data : $('#listForm').serialize(),
|
||||
success : function(data) {
|
||||
var temp = data.resBody.result;
|
||||
var rm = JSON.parse(temp);
|
||||
if(rm.result == 'success') {
|
||||
alert('<spring:message code="success.common.delete"/>');
|
||||
fn_select_dlvygroup_list(1);
|
||||
}
|
||||
else if(rm.result == 'fail'){
|
||||
alert('<spring:message code="fail.common.delete"/>');
|
||||
return;
|
||||
}
|
||||
else if(rm.result == 'includeGoods'){
|
||||
alert('해당 배송그룹은 상품에서 사용하고 있어 삭제할 수 없습니다.');
|
||||
return;
|
||||
}
|
||||
else{
|
||||
alert('<spring:message code="error.internal-server"/>');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<%-- 상단메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Header.jsp" %>
|
||||
<main class="main">
|
||||
<%-- 좌측메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Left.jsp" %>
|
||||
<div class="content">
|
||||
<div class="content__inner">
|
||||
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||
<div class="page-title">
|
||||
<h2 class="page-title__title">배송 그룹 목록</h2>
|
||||
<div class="page-title__btn-container">
|
||||
<a href="#fn_move_regpage" onclick="fn_move_regpage(); return false;" onkeypress="this.onclick" class="btn primary">배송그룹 <spring:message code="button.insert"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<form id='listForm' name="listForm" method="post" action="<c:url value="/mngr/setup/dlvygrp/dlvyGroupListR"/>">
|
||||
<input type="hidden" id="dlvyGroupInnb" name="dlvyGroupInnb"/>
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${ resultMap.paginationInfo.currentPageNo }"/>"/>
|
||||
<div class="form-control-container">
|
||||
<div class="left">
|
||||
<div class="search-number">
|
||||
<span class="search-number__text">총 <strong><c:out value="${ resultMap.paginationInfo.totalRecordCount }"/></strong>건</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="select-box">
|
||||
<select id="pageUnit" name="pageUnit" title="페이지당 출력될 목록건수" onchange="fn_select_dlvygroup_list('1');">
|
||||
<option value="10" <c:if test="${ resultMap.paginationInfo.recordCountPerPage eq 10}">selected="selected"</c:if>>10개씩</option>
|
||||
<option value="50" <c:if test="${ resultMap.paginationInfo.recordCountPerPage eq 50}">selected="selected"</c:if>>50개씩</option>
|
||||
<option value="100" <c:if test="${ resultMap.paginationInfo.recordCountPerPage eq 100}">selected="selected"</c:if>>100개씩</option>
|
||||
<option value="200" <c:if test="${ resultMap.paginationInfo.recordCountPerPage eq 200}">selected="selected"</c:if>>200개씩</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="spacing">
|
||||
<div class="table-wrapper">
|
||||
<table class="table vertical">
|
||||
<caption>배송그룹 목록</caption>
|
||||
<!-- 각 열 width 설정 -->
|
||||
<colgroup>
|
||||
<col style="width: 7%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 16%;">
|
||||
<col style="width: 7%;">
|
||||
<col style="width: 12%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>제목</th>
|
||||
<th>등록일/수정일</th>
|
||||
<th>상태</th>
|
||||
<th>관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.dlvyGroupList }">
|
||||
<c:forEach items="${ resultMap.dlvyGroupList }" var="dlvyGroup" varStatus="status">
|
||||
<tr>
|
||||
<td><c:out value="${resultMap.paginationInfo.totalRecordCount - dlvyGroup.rnum + 1}" /></td>
|
||||
<td class="left"><c:out value="${dlvyGroup.dlvyGroupNm}"/></td>
|
||||
<td>
|
||||
<fmt:parseDate var="registDe" value="${dlvyGroup.registDt}" pattern="yyyy-MM-dd"/>
|
||||
<fmt:parseDate var="updtDe" value="${dlvyGroup.updtDt}" pattern="yyyy-MM-dd"/>
|
||||
<span><fmt:formatDate value="${registDe}" pattern="yyyy-MM-dd"/> / <fmt:formatDate value="${updtDe}" pattern="yyyy-MM-dd"/></span>
|
||||
</td>
|
||||
<td><c:if test="${ dlvyGroup.rnum eq resultMap.paginationInfo.totalRecordCount}">기본값</c:if></td>
|
||||
<td>
|
||||
<div class="manage-btn-container">
|
||||
<button class="btn xsm primary outline" type="button" onclick="fn_move_uptpage('<c:out value="${dlvyGroup.dlvyGroupInnb}"/>'); return false;"><spring:message code="button.update"/></button>
|
||||
<c:if test="${ dlvyGroup.rnum ne resultMap.paginationInfo.totalRecordCount}">
|
||||
<button class="btn xsm dark" type="button" onclick="fn_delete_dlvygroup(<c:out value="${dlvyGroup.dlvyGroupInnb}"/>); return false;"><spring:message code="button.delete"/></button>
|
||||
</c:if>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="3"><spring:message code="common.nodata"/></td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
<div class="pagination__container">
|
||||
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_dlvygroup_list"/>
|
||||
</div>
|
||||
<%-- 하단 스크롤 완료 시 위로가기 버튼 출력 : 2023-11-30 / 박철민 추가 --%>
|
||||
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
111
src/main/webapp/WEB-INF/views/mngr/setup/dlvygrp/FreeDlvy.jsp
Normal file
111
src/main/webapp/WEB-INF/views/mngr/setup/dlvygrp/FreeDlvy.jsp
Normal file
@@ -0,0 +1,111 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%--
|
||||
Class Name : FreeDlvy.jsp
|
||||
Description : 무료배송 배송비 jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.01 전일찬 최초 생성
|
||||
--%>
|
||||
<script type="text/javascript">
|
||||
$( document ).ready(function() {
|
||||
/** 배송권역 셀렉트박스 컨트롤 */
|
||||
const dlvyAreaAditAt = document.querySelector('#dlvyAreaAditAt');
|
||||
const areaAditDlvyAmt = document.querySelector('#areaAditDlvyAmt');
|
||||
fn_change_dlvyArea(dlvyAreaAditAt, areaAditDlvyAmt);
|
||||
|
||||
if ($(".input-text.number").val() === '' || $(".input-text.number").val() == null) {
|
||||
$(".input-text.number").val('0');
|
||||
}
|
||||
|
||||
$(".input-text.number").on("focus", function () {
|
||||
if ($(this).val() === '0') {
|
||||
$(this).val('');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//왕복 여부 체크박스 컨트롤
|
||||
const returnDlvyApplcAt = document.querySelector('#returnDlvyApplcAt');
|
||||
const exchngDlvyAmt = document.querySelector('#exchngDlvyAmt');
|
||||
fn_check_BoxControl(returnDlvyApplcAt,exchngDlvyAmt);
|
||||
});
|
||||
</script>
|
||||
<input type="hidden" name="dlvyGroupDvCd" value="02"/>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">배송비</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>배송그룹 배송비</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th rowspan="2">배송 권역</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select title="배송권역 사용여부" id="dlvyAreaAditAt" name="dlvyAreaAditAt">
|
||||
<option value="N" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt ne 'Y' }">selected="selected"</c:if>>사용안함</option>
|
||||
<option value="Y" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt eq 'Y' }">selected="selected"</c:if>>2권역</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="td-inner vertical">
|
||||
<div class="input-container">
|
||||
<span class="mr-10 fw-500">도서산간지역+제주지역 추가 배송비</span>
|
||||
<input type="text" class="input-text sm right number" id="areaAditDlvyAmt"
|
||||
name="areaAditDlvyAmt" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt ne 'Y' }">disabled="disabled"</c:if>
|
||||
value="<fmt:formatNumber value='${resultMap.dlvyGroup.areaAditDlvyAmt}' pattern="#,###" />"
|
||||
title="배송권역에 대한 추가 배송비" maxlength="13">
|
||||
<span class="input-unit-text mr-8">원</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">반품배송비</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="input-container">
|
||||
<span>편도 :
|
||||
<input type="text" class="input-text sm right number" value="<fmt:formatNumber value='${resultMap.dlvyGroup.returnDlvyAmt}' pattern="#,###" />" title="편도반품배송비" id="returnDlvyAmt" name="returnDlvyAmt" maxlength="13">
|
||||
원
|
||||
</span>
|
||||
</div>
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" id="returnDlvyApplcAt" name="returnDlvyApplcAt" value="Y" <c:if test="${ resultMap.dlvyGroup.returnDlvyApplcAt eq 'Y' }">checked="checked"</c:if>>
|
||||
<span style="margin-right: 5px;" class="check"></span>
|
||||
</label>
|
||||
<span class="control-label">왕복 여부</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="input-container">
|
||||
<span>왕복 :
|
||||
<input type="text" class="input-text sm right number" value="<fmt:formatNumber value='${resultMap.dlvyGroup.exchngDlvyAmt}' pattern="#,###" />" title="왕복반품배송비" id="exchngDlvyAmt" name="exchngDlvyAmt" maxlength="13" <c:if test="${resultMap.dlvyGroup.returnDlvyApplcAt ne 'Y'}"> disabled="disabled" </c:if> >
|
||||
원
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
123
src/main/webapp/WEB-INF/views/mngr/setup/dlvygrp/PayDlvy.jsp
Normal file
123
src/main/webapp/WEB-INF/views/mngr/setup/dlvygrp/PayDlvy.jsp
Normal file
@@ -0,0 +1,123 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%--
|
||||
Class Name : PayDlvy.jsp
|
||||
Description : 유료배송 배송비 jsp
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
since : 2023.12.01 전일찬 최초 생성
|
||||
--%>
|
||||
<script type="text/javascript">
|
||||
$( document ).ready(function() {
|
||||
/** 배송권역 셀렉트박스 컨트롤 */
|
||||
const dlvyAreaAditAt1 = document.querySelector('#dlvyAreaAditAt');
|
||||
const areaAditDlvyAmt1 = document.querySelector('#areaAditDlvyAmt');
|
||||
fn_change_dlvyArea(dlvyAreaAditAt1, areaAditDlvyAmt1);
|
||||
|
||||
if ($(".input-text.number").val() === '' || $(".input-text.number").val() == null) {
|
||||
$(".input-text.number").val('0');
|
||||
}
|
||||
|
||||
$(".input-text.number").on("focus", function () {
|
||||
if ($(this).val() === '0') {
|
||||
$(this).val('');
|
||||
}
|
||||
});
|
||||
|
||||
//왕복 여부 체크박스 컨트롤
|
||||
const returnDlvyApplcAt = document.querySelector('#returnDlvyApplcAt');
|
||||
const exchngDlvyAmt = document.querySelector('#exchngDlvyAmt');
|
||||
fn_check_BoxControl(returnDlvyApplcAt,exchngDlvyAmt);
|
||||
});
|
||||
</script>
|
||||
<input type="hidden" name="dlvyGroupDvCd" value="03"/>
|
||||
<section class="content-section">
|
||||
<h3 class="content-section__title">배송비</h3>
|
||||
<div class="table-wrapper">
|
||||
<table class="table">
|
||||
<caption>해당 테이블에 대한 설명</caption>
|
||||
<colgroup>
|
||||
<col style="width: 12%;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>기본 배송비</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="input-container">
|
||||
<input type="text" class="input-text sm right number"
|
||||
value="<fmt:formatNumber value='${resultMap.dlvyGroup.dftDlvyAmt}' pattern="#,###" />"
|
||||
title="기본배송비" name="dftDlvyAmt" maxlength="10">
|
||||
<span class="input-unit-text">원</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">배송 권역</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="select-box">
|
||||
<select title="배송권역 사용여부" id="dlvyAreaAditAt" name="dlvyAreaAditAt">
|
||||
<option value="N" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt ne 'Y' }">selected="selected"</c:if>>사용안함</option>
|
||||
<option value="Y" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt eq 'Y' }">selected="selected"</c:if>>2권역</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="td-inner vertical">
|
||||
<div class="input-container">
|
||||
<span class="mr-10 fw-500">도서산간지역+제주지역 추가 배송비</span>
|
||||
<input type="text" class="input-text sm right number" id="areaAditDlvyAmt"
|
||||
name="areaAditDlvyAmt" <c:if test="${ resultMap.dlvyGroup.dlvyAreaAditAt ne 'Y' }">disabled="disabled"</c:if>
|
||||
value="<fmt:formatNumber value='${resultMap.dlvyGroup.areaAditDlvyAmt}' pattern="#,###" />"
|
||||
title="배송권역에 대한 추가 배송비" maxlength="13">
|
||||
<span class="input-unit-text mr-8">원</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">반품배송비</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<div class="input-container">
|
||||
<span>편도 :
|
||||
<input type="text" class="input-text sm right number" value="<fmt:formatNumber value='${resultMap.dlvyGroup.returnDlvyAmt}' pattern="#,###" />" title="편도반품배송비" id="returnDlvyAmt" name="returnDlvyAmt" maxlength="13">
|
||||
원
|
||||
</span>
|
||||
</div>
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" id="returnDlvyApplcAt" name="returnDlvyApplcAt" value="Y" <c:if test="${ resultMap.dlvyGroup.returnDlvyApplcAt eq 'Y' }">checked="checked"</c:if>>
|
||||
<span style="margin-right: 5px;" class="check"></span>
|
||||
</label>
|
||||
<span class="control-label">왕복 여부</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="input-container">
|
||||
<span>왕복 :
|
||||
<input type="text" class="input-text sm right number" value="<fmt:formatNumber value='${resultMap.dlvyGroup.exchngDlvyAmt}' pattern="#,###" />" title="왕복반품배송비" id="exchngDlvyAmt" name="exchngDlvyAmt" maxlength="13" <c:if test="${resultMap.dlvyGroup.returnDlvyApplcAt ne 'Y'}"> disabled="disabled" </c:if> >
|
||||
원
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user