6193 lines
401 KiB
Plaintext
6193 lines
401 KiB
Plaintext
<%@ 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 : GoodsDtlU.jsp
|
|
Description : 상품 상세
|
|
Modification Information
|
|
|
|
수정일 수정자 수정내용
|
|
------- -------- ---------------------------
|
|
2024-03-20 리브가 최초생성
|
|
--%>
|
|
<!DOCTYPE html>
|
|
<html lang="ko">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<%--<title>일반 관리자</title>--%>
|
|
<%-- 공통 include --%>
|
|
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
|
|
|
|
|
<%--등록한 사진 순서 변경 관련 --%>
|
|
<script defer src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
|
|
<style>
|
|
#sortable {
|
|
display: flex;
|
|
list-style-type: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
overflow: hidden;
|
|
}
|
|
#sortable div.file-preview__container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
margin-right: 10px;
|
|
cursor: move;
|
|
transition: transform 0.2s ease;
|
|
user-select: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
<script>
|
|
$(document).ready(function () {
|
|
|
|
// // 등록한 사진 순서 변경 관련
|
|
$("#sortable").sortable({
|
|
axis: "x"
|
|
});
|
|
$("#sortable").disableSelection();
|
|
|
|
|
|
//페이지 로드 시 숫자 인풋 정규화( 3자리 컴마)
|
|
$('.input-text.number').each(function () {
|
|
var input = $(this).val();
|
|
$(this).val(input.replace(/[^0-9]/g, "").replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
|
|
});
|
|
|
|
const resveGoodsTable = document.getElementById('resveGoods');
|
|
const expsrSetTable = document.getElementById('expsrSet');
|
|
//예약판매 사용시 dsiable 해제
|
|
if($('#goodsExpsrTyCd').val() !=='02'){
|
|
disableTableInputs(resveGoodsTable);
|
|
}
|
|
|
|
//노출예약 체크되어있을 경우 enable 처리
|
|
if($('#expsrDvCdChk').val() ==='03'){
|
|
enableTableInputs(expsrSetTable)
|
|
}
|
|
|
|
//구매대상제한 체크 일 경우 enable 처리
|
|
if($('#r-19').prop('checked')){
|
|
$('#purchaseLimmtBtn').prop('disabled', false)
|
|
}
|
|
|
|
//구매 수량 초기 disable처리
|
|
if(!$('#r-21').prop('checked')){
|
|
fn_ctrl_disable(['.purchsQy'])
|
|
}
|
|
|
|
/*추가구성옵션 사용안함일 경우 display none 처리*/
|
|
if($('#r-702').prop('checked')){
|
|
$('#r-702').click()
|
|
}
|
|
|
|
const sopmalCd = $('#sopmalCd').val()
|
|
fn_create_ckeditor('#goodsDc', sopmalCd); //상세 설명 > 상품 설명 ck에디터 적용
|
|
fn_create_ckeditor('#mblGoodsDc', sopmalCd); // 모바일용 상세 설명 > 모바일용 상품 설명 ck에디터 적용
|
|
// fn_create_ckeditor('#cmnuseInfoCn', sopmalCd); // 배송/반품정보 상세 설명 > ck에디터 적용
|
|
|
|
/** 구매대상자 제한 버튼 활성화 여부 이벤트 */
|
|
$('#r-18').click(function () {
|
|
//설정 버튼 비활성화
|
|
$('#purchaseLimmtBtn').prop('disabled', true)
|
|
})
|
|
$('#r-19').click(function () {
|
|
//설정 버튼 활성화
|
|
$('#purchaseLimmtBtn').prop('disabled', false)
|
|
$(this).prop('checked', true)
|
|
})
|
|
|
|
|
|
/* 카테고리 조회 이벤트 */
|
|
$(document).on('click', '.category-select', function () {
|
|
const upperCtgryId = $(this).val(); // 상위카테고리
|
|
const currCtgryDepth = $(this).attr('id').replace('ctgryDepth', '');
|
|
const targetDepth = (parseInt(currCtgryDepth) + 1);
|
|
const targetCtgryId = 'ctgryDepth' + targetDepth;
|
|
|
|
if (fn_is_empty(upperCtgryId)) {
|
|
for (let i = targetDepth; i < 5; i++) {
|
|
$('#section01').find('#ctgryDepth' + i).empty();
|
|
}
|
|
} else {
|
|
fn_get_goods_ctgry(upperCtgryId, targetCtgryId);
|
|
}
|
|
|
|
// 1차 카테고리 선택 하위 비우기
|
|
if (currCtgryDepth == 1) {
|
|
for (let i = 2; i < 5; i++) {
|
|
$('#section01').find('#ctgryDepth' + i).empty();
|
|
}
|
|
}
|
|
|
|
// 2차 카테고리 선택 하위 비우기
|
|
if (currCtgryDepth == 2) {
|
|
for (let i = 3; i < 5; i++) {
|
|
$('#section01').find('#ctgryDepth' + i).empty();
|
|
}
|
|
}
|
|
|
|
// 3차 카테고리 선택 하위 비우기
|
|
if (currCtgryDepth == 3) {
|
|
for (let i = 4; i < 5; i++) {
|
|
$('#section01').find('#ctgryDepth' + i).empty();
|
|
}
|
|
}
|
|
|
|
$('#section01').find('#ctgryId').val(upperCtgryId);
|
|
});
|
|
|
|
/* 카테고리 선택 이벤트 */
|
|
$('#selectCategoriesBtn').on('click', function (event) {
|
|
event.preventDefault();
|
|
|
|
let selectedCategories = [];
|
|
|
|
// 각 카테고리의 선택된 항목을 가져옴
|
|
$('#ctgryDepth1 option:selected').each(function () {
|
|
let categoryPath = $(this).text();
|
|
let ctgryId = $(this).val();
|
|
selectedCategories.push({path: categoryPath, id: ctgryId});
|
|
});
|
|
|
|
$('#ctgryDepth2 option:selected').each(function () {
|
|
let categoryPath = $('#ctgryDepth1 option:selected').text() + ' > ' + $(this).text();
|
|
let ctgryId = $(this).val();
|
|
selectedCategories.push({path: categoryPath, id: ctgryId});
|
|
});
|
|
|
|
$('#ctgryDepth3 option:selected').each(function () {
|
|
let categoryPath = $('#ctgryDepth1 option:selected').text() + ' > ' + $('#ctgryDepth2 option:selected').text() + ' > ' + $(this).text();
|
|
let ctgryId = $(this).val();
|
|
selectedCategories.push({path: categoryPath, id: ctgryId});
|
|
});
|
|
|
|
$('#ctgryDepth4 option:selected').each(function () {
|
|
let categoryPath = $('#ctgryDepth1 option:selected').text() + ' > ' + $('#ctgryDepth2 option:selected').text() + ' > ' + $('#ctgryDepth3 option:selected').text() + ' > ' + $(this).text();
|
|
let ctgryId = $(this).val();
|
|
selectedCategories.push({path: categoryPath, id: ctgryId});
|
|
});
|
|
|
|
// 선택한 카테고리를 테이블에 추가
|
|
let $tableBody = $('#selectedCategoriesTable tbody');
|
|
// $tableBody.empty(); // 기존 내용을 지움
|
|
|
|
// 이미 선택한 카테고리가 존재할 경우
|
|
if($('input[name="reprsntCtgryAt"]').length > 0){
|
|
let index = $('input[name="reprsntCtgryAt"]').length;
|
|
selectedCategories.forEach((category) => {
|
|
|
|
//선택한 카테고리 중복일 경우 선택한 카테고리 목록에 넣지 않음
|
|
let dupliCtgryAt = false;
|
|
$('input[name="reprsntCtgryAt"]').each(function() {
|
|
// 현재 요소의 tr에서 data-value 속성을 가진 td를 찾아 그 값을 가져옴
|
|
var value = $(this).closest('tr').find('td[data-value]').data('value');
|
|
if(parseInt(value) === parseInt(category.id)){
|
|
dupliCtgryAt = true;
|
|
}
|
|
});
|
|
|
|
if(!dupliCtgryAt) {
|
|
let $row = $('<tr></tr>');
|
|
|
|
let $radioTd = $('<td></td>');
|
|
let $radioDiv = $('<div class="custom-radio no-text"></div>');
|
|
let $radioInput = $('<input type="radio" id="r-' + index + '" name="reprsntCtgryAt" value="1">');
|
|
let $radioLabel = $('<label for="r-' + index + '"></label>');
|
|
$radioDiv.append($radioInput).append($radioLabel);
|
|
$radioTd.append($radioDiv);
|
|
|
|
let $categoryTd = $('<td></td>').css("text-align","left").text(category.path).attr('data-value', category.id);
|
|
let $deleteTd = $('<td></td>');
|
|
let $deleteBtn = $('<button class="circle-btn delete"><span class="visually-hidden">삭제</span></button>');
|
|
|
|
$deleteTd.append($deleteBtn);
|
|
$row.append($radioTd).append($categoryTd).append($deleteTd);
|
|
$tableBody.append($row);
|
|
|
|
// 첫 번째 항목을 기본으로 선택
|
|
if (index === 0) {
|
|
$radioInput.prop('checked', true);
|
|
}
|
|
|
|
// 삭제 버튼에 클릭 이벤트 추가
|
|
$deleteBtn.on('click', function () {
|
|
$(this).closest('tr').remove();
|
|
});
|
|
|
|
index += 1;
|
|
}
|
|
|
|
});
|
|
}else{
|
|
selectedCategories.forEach((category, index) => {
|
|
let $row = $('<tr></tr>');
|
|
|
|
let $radioTd = $('<td></td>');
|
|
let $radioDiv = $('<div class="custom-radio no-text"></div>');
|
|
let $radioInput = $('<input type="radio" id="r-' + index + '" name="reprsntCtgryAt" value="1">');
|
|
let $radioLabel = $('<label for="r-' + index + '"></label>');
|
|
$radioDiv.append($radioInput).append($radioLabel);
|
|
$radioTd.append($radioDiv);
|
|
|
|
let $categoryTd = $('<td></td>').text(category.path).attr('data-value', category.id);
|
|
let $deleteTd = $('<td></td>');
|
|
let $deleteBtn = $('<button class="circle-btn delete"><span class="visually-hidden">삭제</span></button>');
|
|
|
|
$deleteTd.append($deleteBtn);
|
|
$row.append($radioTd).append($categoryTd).append($deleteTd);
|
|
$tableBody.append($row);
|
|
|
|
// 첫 번째 항목을 기본으로 선택
|
|
if (index === 0) {
|
|
$radioInput.prop('checked', true);
|
|
}
|
|
|
|
// 삭제 버튼에 클릭 이벤트 추가
|
|
$deleteBtn.on('click', function () {
|
|
$(this).closest('tr').remove();
|
|
});
|
|
});
|
|
}
|
|
|
|
});
|
|
|
|
/* 일반옵션 행 추가 이벤트 */
|
|
$('#fn_add_normal_option_row').on('click', function (event) {
|
|
event.preventDefault();
|
|
|
|
let rowCount = $('#normal_option_tbody tr').length;
|
|
fn_add_normal_option_row(rowCount);
|
|
});
|
|
|
|
/* 재고옵션 행 추가 이벤트 */
|
|
$('#fn_add_invntry_option_row').on('click', function (event) {
|
|
event.preventDefault();
|
|
|
|
let rowCount = $('#invntry_option_tbody tr').length;
|
|
|
|
fn_add_invntry_option_row(rowCount);
|
|
});
|
|
/* 추가구성옵션 행 추가 이벤트 */
|
|
$('#fn_add_addition_option_row').on('click',function (event) {
|
|
event.preventDefault();
|
|
|
|
let rowCount = $('#addition_option_tbody tr').length;
|
|
|
|
fn_add_addition_option_row(rowCount);
|
|
})
|
|
|
|
/* 모바일용 상세 설명 설정 이벤트 */
|
|
$('#r-31').click(function () {
|
|
$('.mobileGoodsCn').hide();
|
|
})
|
|
|
|
$('#r-32').click(function () {
|
|
$('.mobileGoodsCn').show();
|
|
})
|
|
|
|
|
|
//추가구성옵션 - 재고품절시 노출 상태
|
|
$('[name="invntrySldoutExpsrAt_added"]').on('change',function () {
|
|
if($(this).val()==='Y'){
|
|
$('div.invntrySldoutExpsrAt_added').text('노출')
|
|
|
|
}else{
|
|
$('div.invntrySldoutExpsrAt_added').text('미노출')
|
|
}
|
|
})
|
|
//일반옵션 - 재고품절시 노출 상태
|
|
$('[name="invntrySldoutExpsrAt_normal"]').on('change',function () {
|
|
if($(this).val()==='Y'){
|
|
$('div.invntrySldoutExpsrAt_normal').text('노출')
|
|
}else{
|
|
$('div.invntrySldoutExpsrAt_normal').text('미노출')
|
|
}
|
|
})
|
|
|
|
|
|
//실시간수량배너 이벤트구분에 따른 enable/disable 처리
|
|
$('input[name="rltmQyBannerDvCd"]').each(function () {
|
|
$(this).on('change', function () {
|
|
|
|
let chkVal = $(this).val()
|
|
//실판매
|
|
if(chkVal === '01'){
|
|
$('.evtRl').find('input').prop('disabled', true);
|
|
$('.evtVirtl').find('input').prop('disabled', true);
|
|
|
|
//이벤트 실판매
|
|
}else if(chkVal === '02'){
|
|
$('.evtRl').find('input').prop('disabled', false);
|
|
$('.evtVirtl').find('input').prop('disabled', true);
|
|
|
|
//이벤트 가판매
|
|
}else{
|
|
$('.evtVirtl').find('input').prop('disabled', false);
|
|
$('.evtRl').find('input').prop('disabled', true);
|
|
}
|
|
})
|
|
|
|
//재고정책이 재고와 상관없이 판매일 경우 실시간수량배너 - 실판매 불가 처리
|
|
$(document).on('change', 'input[name="invntryPolicyCd"]', function () {
|
|
if($(this).val() === '02' && $('#rltmQyBannerExpsrAtY').prop('checked')){
|
|
$('#rltmQyBannerDvCd-02').prop('checked', true);
|
|
$('#rltmRlQy').prop('disabled', false)
|
|
$('#rltmQyBannerDvCd-01').addClass('rlSelFail')
|
|
}else{
|
|
$('#rltmQyBannerDvCd-02').prop('checked', false);
|
|
$('#rltmQyBannerDvCd-01').prop('checked', true);
|
|
$('#rltmRlQy').prop('disabled', true)
|
|
$('#rltmQyBannerDvCd-01').removeClass('rlSelFail')
|
|
}
|
|
})
|
|
|
|
//재고정책이 재고와 상관없이 판매일 경우 실시간수량배너 - 실판매 불가 처리에 따른 alert
|
|
$(this).on('click', function () {
|
|
if(($(this).attr('id') ==='rltmQyBannerDvCd-01' && $(this).hasClass('rlSelFail') && $('#rltmQyBannerExpsrAtY').prop('checked'))){
|
|
alert('해당 옵션 설정은 재고에 따른 판매 상태가 재고가 있을경우 가능합니다');
|
|
return false;
|
|
}
|
|
|
|
})
|
|
})
|
|
|
|
});
|
|
|
|
|
|
//숫자 인풋 포커스시 0 제거
|
|
$(document).on("focus", '.input-text.number',function () {
|
|
if(fn_nvl($(this).val(), '0') === '0'){
|
|
$(this).val('');
|
|
}
|
|
});
|
|
|
|
//숫자 입력시 글자 제거
|
|
$(document).on("input", '.input-text.number',function () {
|
|
var input = $(this).val();
|
|
$(this).val(input.replace(/[^0-9]/g, "").replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
|
|
});
|
|
|
|
|
|
//재고와 상관없이 판매일 경우 옵션재고 disabled
|
|
$(document).on('change', 'input[name="invntryPolicyCd"]',function () {
|
|
|
|
let normalQy = $('input[name="invntryQy_normal"]');
|
|
let invntryQy = $('input[name="invntryQy_invntry"]');
|
|
let addeddQy = $('input[name="invntryQy_added"]');
|
|
|
|
if($(this).val() === '02'){
|
|
normalQy.prop('disabled', true)
|
|
invntryQy.prop('disabled', true)
|
|
addeddQy.prop('disabled', true)
|
|
}else{
|
|
normalQy.prop('disabled', false)
|
|
invntryQy.prop('disabled', false)
|
|
addeddQy.prop('disabled', false)
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
//예약 판매설정 체크 해제시 예약상품 배송일자, 안내문구 빈값 처리
|
|
$(document).on('click', '#goodsExpsrTy02', function () {
|
|
if(!$(this).prop('checked')){
|
|
$('#resveGoods input').val('')
|
|
}
|
|
})
|
|
|
|
//노출여부 노출예약이 아닐경우 노출 정보 빈값 처리
|
|
$(document).on('click', 'input[name="expsrDvCd"]', function () {
|
|
const target = $('#expsrCdList3')
|
|
if($(this).attr('id') !== target.attr('id')){
|
|
$('#expsrSet input').val('')
|
|
}
|
|
})
|
|
|
|
//재고와 상관없이 판매일 경우 가용재고제한수량 빈값처리
|
|
$(document).on('click', '#goodsDftinfoInvntryPolicy2', function () {
|
|
$('#avlinvLmttQy').val('')
|
|
})
|
|
|
|
//실시간수량배너 설정 - 이벤트 실판매, 이벤트 가판매 아닐 경우 빈값 처리
|
|
$(document).on('click', 'input[name="rltmQyBannerDvCd"]', function () {
|
|
|
|
if($(this).val() !== '02'){
|
|
$('#rltmRlQy').val('')
|
|
}
|
|
|
|
if($(this).val() !== '03'){
|
|
$('.evtVirtl input').val('')
|
|
}
|
|
|
|
})
|
|
//구매수량제한 제한 아닐 경우 빈값처리
|
|
$(document).on('click', 'input[name="purchsQyLmttDvCd"]', function () {
|
|
if($(this).val() !== '02'){
|
|
$('.purchsQy input').val('')
|
|
}
|
|
})
|
|
|
|
|
|
//실시간수량배너 노출여부에 따른 숨김/보이기 처리
|
|
$(document).on('change', 'input[name="rltmQyBannerExpsrAt"]', function () {
|
|
|
|
if($(this).val() ==='Y'){
|
|
$('input[name="rltmQyBannerDvCd"]').prop('disabled', false)
|
|
}else{
|
|
$('input[name="rltmQyBannerDvCd"]').prop('disabled', true)
|
|
}
|
|
|
|
})
|
|
|
|
//일반옵션 - 기준여부
|
|
$(document).on('change','input[name="stdrDvAt_normal"]',function () {
|
|
|
|
// change 이벤트가 발생한 대상
|
|
const sourceId = $(this)
|
|
|
|
$('input[name="stdrDvAt_normal"]').not(sourceId).removeClass('checked').attr('checked', false);
|
|
|
|
sourceId.addClass('checked').attr('checked', true);
|
|
|
|
|
|
|
|
})
|
|
|
|
//재고옵션 - 재고품절시 노출상태
|
|
$('#invntrySldoutExpsrAt_invntry').on('click',function () {
|
|
if($(this).hasClass('checked')){
|
|
$(this).removeClass('checked')
|
|
}else{
|
|
$(this).addClass('checked')
|
|
}
|
|
})
|
|
//재고옵션 - 기준여부
|
|
$(document).on('change','input[name="stdrDvAt_invntry"]',function () {
|
|
// change 이벤트가 발생한 대상
|
|
const sourceId = $(this)
|
|
|
|
$('input[name="stdrDvAt_invntry"]').not('#'+sourceId.attr('id')).removeClass('checked').attr('checked', false);
|
|
|
|
sourceId.addClass('checked').attr('checked', true);
|
|
|
|
})
|
|
|
|
|
|
//추가구성옵션 - 필수여부
|
|
$(document).on('change','input[name="optnEssntlAt_added"]',function () {
|
|
|
|
if($(this).hasClass('checked')){
|
|
$(this).attr('checked', false)
|
|
$(this).removeClass('checked')
|
|
|
|
}else{
|
|
$(this).attr('checked', true)
|
|
$(this).addClass('checked')
|
|
}
|
|
|
|
})
|
|
|
|
//추가구성옵션 - 하위 필수여부 체크
|
|
$(document).on('change','input[name="optnEssntlAt_added"]',function () {
|
|
|
|
const childDiv = $(this).closest('div.optnEssntlAt_addedList')
|
|
const childChkbox = childDiv.find('input[name="optnEssntlAt_added"]')
|
|
|
|
if($(this).prop('checked')){
|
|
childChkbox.prop('checked', true)
|
|
childChkbox.addClass('checked')
|
|
}else{
|
|
childChkbox.prop('checked', false)
|
|
childChkbox.removeClass('checked')
|
|
}
|
|
|
|
})
|
|
|
|
//입력옵션 - 필수여부
|
|
$(document).on('click','input[name="optnEssntlAt_input"]',function () {
|
|
if($(this).hasClass('checked')){
|
|
$(this).removeClass('checked')
|
|
}else{
|
|
$(this).addClass('checked')
|
|
}
|
|
})
|
|
|
|
|
|
|
|
/* ********************************************************
|
|
* 예약 판매 설정 enable-disable
|
|
******************************************************** */
|
|
function handleRadioClick(radio) {
|
|
const firstRadio = document.querySelector('input[name="goodsSttusCd"]:first-of-type');
|
|
const checkbox = document.getElementById('goodsExpsrTy02');
|
|
const resveGoodsTable = document.getElementById('resveGoods');
|
|
|
|
if (radio === firstRadio) {
|
|
checkbox.disabled = false;
|
|
if(checkbox.checked){
|
|
enableTableInputs(resveGoodsTable);
|
|
} else {
|
|
disableTableInputs(resveGoodsTable);
|
|
}
|
|
} else {
|
|
checkbox.disabled = true;
|
|
checkbox.checked = false; // 체크 상태 해제
|
|
disableTableInputs(resveGoodsTable);
|
|
}
|
|
}
|
|
|
|
function updateHiddenField(checkbox) {
|
|
const hiddenField = document.getElementById('goodsExpsrTy02');
|
|
const resveGoodsTable = document.getElementById('resveGoods');
|
|
|
|
//예약 판매 체크가 되어있을 때만 상태값 02
|
|
if (checkbox.checked) {
|
|
hiddenField.value = "02";
|
|
enableTableInputs(resveGoodsTable);
|
|
} else {
|
|
hiddenField.value = "01";
|
|
disableTableInputs(resveGoodsTable);
|
|
}
|
|
}
|
|
|
|
/* ********************************************************
|
|
* 노출여부 enable-disable
|
|
******************************************************** */
|
|
function handleRadioClick2(radio) {
|
|
const lastRadio = document.querySelector('#expsrCdList3')
|
|
const table = document.getElementById('expsrSet');
|
|
|
|
if (radio === lastRadio) {
|
|
enableTableInputs(table);
|
|
} else {
|
|
disableTableInputs(table);
|
|
}
|
|
|
|
}
|
|
|
|
/* ********************************************************
|
|
* 재고에 따른 판매 enable-disable
|
|
******************************************************** */
|
|
function handleRadioClickDisable(radio) {
|
|
const firstRadio = document.querySelector('input[name="invntryPolicyCd"]:first-of-type');
|
|
const inputText = document.getElementById('avlinvLmttQy');
|
|
|
|
if (radio === firstRadio) {
|
|
inputText.disabled = false;
|
|
} else {
|
|
inputText.disabled = true;
|
|
}
|
|
}
|
|
|
|
|
|
/* ********************************************************
|
|
* enable-disable
|
|
******************************************************** */
|
|
function enableTableInputs(table) {
|
|
const inputs = table.querySelectorAll('input');
|
|
inputs.forEach(input => input.disabled = false);
|
|
}
|
|
|
|
function disableTableInputs(table) {
|
|
const inputs = table.querySelectorAll('input');
|
|
inputs.forEach(input => input.disabled = true);
|
|
}
|
|
|
|
/* ********************************************************
|
|
* 카테고리 조회 AJAX
|
|
******************************************************** */
|
|
const fn_get_goods_ctgry = function (upperCtgryId, targetCtgryId) {
|
|
$.ajax({
|
|
type: 'post',
|
|
url: '<c:url value="/admin/sys/ctgry/selectGoodsCategoryList"/>',
|
|
data: {
|
|
'upperCtgryId': upperCtgryId
|
|
},
|
|
success: function (data) {
|
|
if (data.resBody != null) {
|
|
const result = JSON.parse(data.resBody.result);
|
|
const goodsCategoryList = result.goodsCategoryList;
|
|
|
|
if (goodsCategoryList.length > 0) {
|
|
$('#section01').find('#' + targetCtgryId).empty();
|
|
for (let i = 0; i < goodsCategoryList.length; i++) {
|
|
const goodsCategory = goodsCategoryList[i];
|
|
$('#section01').find('#' + targetCtgryId).append('<option value="' + goodsCategory.ctgryId + '">' + goodsCategory.ctgryNm + '</option>');
|
|
}
|
|
|
|
$('#section01').find('#' + targetCtgryId).niceSelect('update');
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
function convertToDate(dateStr) {
|
|
// 입력된 문자열을 Date 객체로 변환
|
|
const date = new Date(dateStr);
|
|
|
|
// 유효하지 않은 날짜인 경우 null 반환
|
|
if (isNaN(date.getTime())) {
|
|
return null;
|
|
}
|
|
|
|
return date;
|
|
}
|
|
|
|
//시간을 분으로 변경하는 함수
|
|
function timeToMinutes(timeStr) {
|
|
// 시간과 분을 ':'를 기준으로 분리
|
|
const [hours, minutes] = timeStr.split(':').map(Number);
|
|
// 시간을 분으로 변환
|
|
return hours * 60 + minutes;
|
|
}
|
|
|
|
//마지막 컴마 지우기
|
|
const remove_Last_Comma = function removeLastComma(str) {
|
|
const lastCommaIndex = str.lastIndexOf(',');
|
|
if (lastCommaIndex !== -1) {
|
|
return str.substring(0, lastCommaIndex);
|
|
} else {
|
|
return str;
|
|
}
|
|
}
|
|
|
|
const fn_create_input = function (type, name, value, tgtForm) {
|
|
const input = document.createElement('input');
|
|
input.setAttribute("type", type);
|
|
input.setAttribute("name", name);
|
|
input.setAttribute("value", value);
|
|
tgtForm.appendChild(input);
|
|
}
|
|
|
|
|
|
/* ********************************************************
|
|
* 목록 조회
|
|
******************************************************** */
|
|
const fn_select_list = function () {
|
|
const url = '<c:url value="/mngr/goods/goodsmngr/selectGoodsListForm"/>';
|
|
|
|
// $('#listForm').attr('action', url);
|
|
// $('#listForm').attr('method', 'get');
|
|
window.location.href = '/mngr/goods/goodsmngr/selectGoodsListForm?pageIndex=1'
|
|
// $('#listForm').submit();
|
|
};
|
|
|
|
/* ********************************************************
|
|
* 추가 항목 행 추가
|
|
******************************************************** */
|
|
const fn_add_box = function (_target) {
|
|
|
|
let trClone = '';
|
|
let target = '#' + _target;
|
|
|
|
$(target + 'NoData').hide();
|
|
let idx = ($(target).children('tr').length-1);
|
|
trClone = `<tr>
|
|
<td><input class="input-text full" type="text" id="infoSj-`+idx+`" name="infoSj"></td>
|
|
<td><input class="input-text full" type="text" id="infoCn-`+idx+`" name="infoCn"></td>
|
|
<td><button class="circle-btn delete" onclick="fn_remove_row(this); return false;">
|
|
<span class="visually-hidden">삭제</span></button></td>
|
|
</tr>`;
|
|
|
|
$(target).append(trClone);
|
|
|
|
//행 추가 후, tableDnd 업데이트
|
|
$(target + '-row-add').tableDnDUpdate();
|
|
$(target + 'NoData').hide();
|
|
|
|
}
|
|
|
|
/* ********************************************************
|
|
* 일반옵션 행 추가
|
|
******************************************************** */
|
|
const fn_add_normal_option_row = function (rowCount) {
|
|
|
|
const currentInvntrySldoutExpsrAt = $('#invntrySldoutExpsrAt_normal option:selected').val()
|
|
let dynamicInvntrySldoutExpsrAt = '';
|
|
if(currentInvntrySldoutExpsrAt==='Y'){
|
|
dynamicInvntrySldoutExpsrAt =
|
|
`
|
|
<td><div class="optionApply__priceContainer"><div class="optionApply__miscText invntrySldoutExpsrAt_normal">노출</div></div></td>
|
|
`
|
|
}else{
|
|
dynamicInvntrySldoutExpsrAt =
|
|
`
|
|
<td><div class="optionApply__priceContainer"><div class="optionApply__miscText invntrySldoutExpsrAt_normal">미노출</div></div></td>
|
|
`
|
|
}
|
|
let invntry_policy_qy = "";
|
|
if($('input[name="invntryPolicyCd"]:checked').val() ==='02'){
|
|
invntry_policy_qy = `<td><div class="optionApply__priceContainer"><input class="input-text full number right" type="text" value="0" title="일반옵션 재고" id="invntryQy`+rowCount+`" name="invntryQy_normal" disabled></td></div>`
|
|
}else{
|
|
invntry_policy_qy = ` <td><div class="optionApply__priceContainer"><input class="input-text full number right" type="text" value="0" title="일반옵션 재고" id="invntryQy`+rowCount+`" name="invntryQy_normal"></td></div>`
|
|
}
|
|
|
|
|
|
|
|
const newRow = `
|
|
<tr>
|
|
<td>
|
|
<div class="draggable-icon-container">
|
|
<i class="icon icon_draggable"></i>
|
|
<span class="visually-hidden">순서
|
|
바꾸기</span>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__inputList">
|
|
<div class="optionApply__inputContainer">
|
|
<input class="input-text full input-trim"
|
|
type="text" name="optnNm1_normal" id="optnNm1_normal`+rowCount+`"
|
|
title="해당 인풋에 대한 설명">
|
|
<button type="button" class="btn outline xsm optionDel01">삭제</button>
|
|
<button type="button" class="btn outline xsm optionVal98">옵션값 추가</button>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optnExpsrAt_normalList" style="height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<div class="optnExpsrAt_normal">
|
|
<label class="b-checkbox checkbox is-medium">
|
|
<input type="checkbox" id="optnExpsrAt01-`+rowCount+`0" value="Y" name="optnExpsrAt_normal" title="일반옵션 노출여부">
|
|
<span class="check"></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="stdrDvAt_normalList" style=" height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<div class="custom-radio" style="display: flex;align-items: center;justify-content: center;height: 24px;">
|
|
<input type="radio" id="stdrDvAt01-` + rowCount + `" name="stdrDvAt_normal" value="Y">
|
|
<label for="stdrDvAt01-` + rowCount + `"></label>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__inputList">
|
|
<div class="optionApply__inputContainer">
|
|
<div class="optionApply__moveBtnContainer">
|
|
<button type="button" class="optionApply__moveBtn optionMove01 up"><span class="visually-hidden">위로</span></button>
|
|
<button type="button" class="optionApply__moveBtn optionMove01 down"><span class="visually-hidden">아래로</span></button>
|
|
</div>
|
|
<input class="input-text full input-trim" type="text" title="일반옵션 값" id="optnVal1_normal`+rowCount+`" name="optnVal1_normal">
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td><div class="optionApply__priceContainer"><input class="input-text full input-trim" type="text" title="일반옵션코드" name="optnCd1_normal"></td></div>
|
|
`
|
|
+invntry_policy_qy+
|
|
`
|
|
<td><div class="optionApply__priceContainer"><input class="input-text full number right" type="text" value="0" title="일반옵션 소비자가" id="cnsmrpric`+rowCount+`" name="cnsmrpric_normal"></td></div>
|
|
<td><div class="optionApply__priceContainer"><input class="input-text full number right" type="text" value="0" title="일반옵션 판매가" id="slepric`+rowCount+`" name="slepric_normal"></td></div>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<div class="input-container gap-4">
|
|
<div class="select-box">
|
|
<select class="short" name="mlgPolicyCd_normal" id="mlgPolicyCd_normal`+rowCount+`"
|
|
title="일반옵션 마일리지정책코드"
|
|
style="display: none;" >
|
|
<option value="01">통합</option>
|
|
<option value="02">개별</option>
|
|
</select>
|
|
<div class="nice-select short" tabindex="0"><span class="current">통합</span>
|
|
<ul class="list">
|
|
<li data-value="01" class="option selected">통합</li>
|
|
<li data-value="02" class="option">개별</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<input class="input-text sm number right"
|
|
value="" type="text" id="mlgAccmlAmt_normal`+rowCount+`" name="mlgAccmlAmt_normal" disabled
|
|
title="일반옵션 마일리지적립금액">
|
|
<div class="select-box">
|
|
<select class="short" title="일반옵션 마일리지적립구분코드" style="display: none;" name="mlgAccmlCd_normal" disabled>
|
|
<option value="02">원</option>
|
|
<option value="01">%</option>
|
|
</select>
|
|
<div class="nice-select short disabled" tabindex="0"><span class="current">원</span>
|
|
<ul class="list">
|
|
<li data-value="02" class="option selected">원</li>
|
|
<li data-value="01" class="option">%</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
`+
|
|
dynamicInvntrySldoutExpsrAt
|
|
+`
|
|
<td><div class="optionApply__priceContainer"><input class="input-text full" type="text" title="일반옵션 정보" id="optnInfo_normal`+rowCount+`" name="optnInfo_normal"></td></div>
|
|
<td>
|
|
<div class="manage-btn-container">
|
|
<button class="btn xsm dark optionDel02">삭제</button>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
`;
|
|
|
|
$('#normal_option_tbody').append(newRow);
|
|
$('#normal_option').tableDnDUpdate();
|
|
};
|
|
|
|
/* ********************************************************
|
|
* 재고옵션 행 추가
|
|
******************************************************** */
|
|
const fn_add_invntry_option_row = function (rowCount) {
|
|
let firstAdd = '';
|
|
if(rowCount === 1) {
|
|
firstAdd = ` <td>
|
|
<div class="custom-radio">
|
|
<input type="radio" id="stdrDvAt02-` + rowCount + `" name="stdrDvAt_invntry" value="Y" checked="checked" class="checked"/>
|
|
<label for="stdrDvAt02-` + rowCount + `"></label>
|
|
</div>
|
|
</td>
|
|
`
|
|
}else{
|
|
firstAdd = ` <td>
|
|
<div class="custom-radio">
|
|
<input type="radio" id="stdrDvAt02-` + rowCount + `" name="stdrDvAt_invntry" value="Y"/>
|
|
<label for="stdrDvAt02-` + rowCount + `"></label>
|
|
</div>
|
|
</td>
|
|
`
|
|
}
|
|
|
|
let invntry_policy_qy = "";
|
|
if($('input[name="invntryPolicyCd"]:checked').val() ==='02'){
|
|
invntry_policy_qy = `<td><input class="input-text full number right" type="text" value="0" title="재고옵션 재고" name="invntryQy_invntry" disabled/></td>`
|
|
}else{
|
|
invntry_policy_qy = `<td><input class="input-text full number right" type="text" value="0" title="재고옵션 재고" name="invntryQy_invntry"/></td>`
|
|
}
|
|
|
|
let newRow = `
|
|
<tr>
|
|
<td>
|
|
<div class="draggable-icon-container">
|
|
<i class="icon icon_draggable"></i>
|
|
<span class="visually-hidden">순서 바꾸기</span>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<label class="b-checkbox checkbox is-medium" for="optnExpsrAt02-`+rowCount+`">
|
|
<input type="checkbox" id="optnExpsrAt02-`+rowCount+`" value="Y" name="optnExpsrAt_invntry" checked>
|
|
<span class="check"></span>
|
|
</label>
|
|
</td>
|
|
`
|
|
+firstAdd+
|
|
`
|
|
<td><input class="input-text full input-trim" type="text" title="재고옵션 값1" name="optnVal1_invntry" /></td>
|
|
<td><input class="input-text full input-trim" type="text" title="재고옵션 값2" name="optnVal2_invntry"/></td>
|
|
<td><input class="input-text full input-trim" type="text" title="재고옵션 값3" name="optnVal3_invntry"/></td>
|
|
<td><input class="input-text full input-trim" type="text" title="재고옵션 값4" name="optnVal4_invntry"/></td>
|
|
<td><input class="input-text full input-trim" type="text" title="재고옵션 코드" name="optnCd1_invntry"/></td>
|
|
`
|
|
+invntry_policy_qy+
|
|
`
|
|
<td><input class="input-text full number right" type="text" value="" title="재고옵션 가용재고" disabled /></td>
|
|
<td><input class="input-text full number right" type="text" value="0" title="재고옵션 소비자가" name="cnsmrpric_invntry"/></td>
|
|
<td><input class="input-text full number right" type="text" value="0" title="재고옵션 판매가" name="slepric_invntry"/></td>
|
|
<td>
|
|
<div class="input-container gap-4">
|
|
<div class="select-box">
|
|
<select class="short" title="재고옵션 마일리지정책코드" name="mlgPolicyCd_invntry"
|
|
style="display: none;">
|
|
<option value="01">통합</option>
|
|
<option value="02">개별</option>
|
|
</select>
|
|
<div class="nice-select short" tabindex="0">
|
|
<span class="current">통합</span>
|
|
<ul class="list">
|
|
<li data-value="01" class="option selected">통합</li>
|
|
<li data-value="02" class="option">개별</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<input class="input-text sm number right" value="" type="text" title="재고옵션 마일리지적립금액" name="mlgAccmlAmt_invntry" disabled/>
|
|
<div class="select-box">
|
|
<select class="short" title="재고옵션 마일리지적립구분코드" style="display: none;" name="mlgAccmlCd_invntry" disabled >
|
|
<option value="02">원</option>
|
|
<option value="01">%</option>
|
|
</select>
|
|
<div class="nice-select short disabled" tabindex="0">
|
|
<span class="current">원</span>
|
|
<ul class="list">
|
|
<li data-value="02" class="option selected">원</li>
|
|
<li data-value="01" class="option">%</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td><input class="input-text full input-trim" type="text" title="재고옵션 정보" name="optnInfo_invntry"/></td>
|
|
<td>
|
|
<div class="compnbDscntAt_invntry">
|
|
<label class="b-checkbox checkbox" for="compnbDscntAt02_`+rowCount+`">
|
|
<input type="checkbox" value="Y" id="compnbDscntAt02_`+rowCount+`" name="compnbDscntAt_invntry">
|
|
<span class="check"></span><span class="control-label"></span>
|
|
</label>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="sctnDscntAt_invntry">
|
|
<label class="b-checkbox checkbox" for="sctnDscntAt02_`+rowCount+`">
|
|
<input type="checkbox" value="Y" id="sctnDscntAt02_`+rowCount+`" name="sctnDscntAt_invntry">
|
|
<span class="check"></span><span class="control-label"></span>
|
|
</label>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="manage-btn-container">
|
|
<div>
|
|
<button class="btn xsm primary outline" onclick="fn_copy_invntry_option_row(this); return false;">복사</button>
|
|
<button class="btn xsm dark" onclick="fn_remove_invntry_row(this); return false;">삭제</button>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
`;
|
|
|
|
$('#invntry_option_tbody').append(newRow);
|
|
$('#invntry_option').tableDnDUpdate();
|
|
|
|
}
|
|
|
|
|
|
/* ********************************************************
|
|
* 추가구성옵션 행 추가
|
|
******************************************************** */
|
|
const fn_add_addition_option_row = function (rowCount) {
|
|
const currentInvntrySldoutExpsrAt = $('#invntrySldoutExpsrAt_added option:selected').val()
|
|
let dynamicInvntrySldoutExpsrAt = '';
|
|
if(currentInvntrySldoutExpsrAt==='Y'){
|
|
dynamicInvntrySldoutExpsrAt =
|
|
`
|
|
<div class="optionApply__priceContainer"><div class="optionApply__miscText invntrySldoutExpsrAt_added">노출</div></div>
|
|
`
|
|
}else{
|
|
dynamicInvntrySldoutExpsrAt =
|
|
`
|
|
<div class="optionApply__priceContainer"><div class="optionApply__miscText invntrySldoutExpsrAt_added">미노출</div></div>
|
|
`
|
|
}
|
|
|
|
let invntry_policy_qy = "";
|
|
if($('input[name="invntryPolicyCd"]:checked').val() ==='02'){
|
|
invntry_policy_qy = `<td><div class="optionApply__priceContainer"><input class="input-text full number right" type="text" value="0" title="추가옵션 재고" name="invntryQy_added" disabled></td></div>`
|
|
}else{
|
|
invntry_policy_qy = `<td><div class="optionApply__priceContainer"><input class="input-text full number right" type="text" value="0" title="추가옵션 재고" name="invntryQy_added"></td></div>`
|
|
}
|
|
|
|
const newRow = `
|
|
<tr>
|
|
<td>
|
|
<div class="draggable-icon-container">
|
|
<i class="icon icon_draggable"></i>
|
|
<span class="visually-hidden">순서 바꾸기</span>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optnEssntlAt_addedList" style="height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<div class="optnEssntlAt_added">
|
|
<label class="b-checkbox checkbox is-medium" for="optnEssntlAt03-`+rowCount+`0">
|
|
<input type="checkbox" value="Y" id="optnEssntlAt03-`+rowCount+`0" name="optnEssntlAt_added">
|
|
<span class="check"></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__inputList">
|
|
<div class="optionApply__inputContainer">
|
|
<input class="input-text full" type="text" title="추가옵션명" name="optnNm1_added" id="optnNm1_added`+rowCount+`">
|
|
<button class="btn outline xsm" onclick="fn_remove_row(this);">삭제</button>
|
|
<button type="button" class="btn outline xsm optionVal99">옵션값 추가</button>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optnExpsrAt_addedList" style="height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<div class="optnExpsrAt_added">
|
|
<label class="b-checkbox checkbox is-medium" for="optnExpsrAt03-`+rowCount+`0">
|
|
<input type="checkbox" id="optnExpsrAt03-`+rowCount+`0" value="Y" name="optnExpsrAt_added" checked>
|
|
<span class="check"></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__inputList">
|
|
<div class="optionApply__inputContainer">
|
|
<div class="optionApply__moveBtnContainer">
|
|
<button class="optionApply__moveBtn up" onclick="fn_move_row_up(this); return false;"><span class="visually-hidden">위로</span></button>
|
|
<button class="optionApply__moveBtn down" onclick="fn_move_row_down(this); return false;"><span class="visually-hidden">아래로</span></button>
|
|
</div>
|
|
<input class="input-text full" type="text" title="추가옵션값" name="optnVal1_added">
|
|
</div>
|
|
</div>
|
|
<td><div class="optionApply__priceContainer"><input class="input-text full" type="text" title="추가옵션상품코드" name="optnCd1_added"></td></div>
|
|
`+invntry_policy_qy +
|
|
`
|
|
<td><div class="optionApply__priceContainer"><input class="input-text full" type="text" title="추가옵션 가용재고" disabled ></td></div>
|
|
<td><div class="optionApply__priceContainer"><input class="input-text full number right" type="text" value="0" title="추가옵션 소비자가" name="cnsmrpric_added"></td></div>
|
|
<td><div class="optionApply__priceContainer"><input class="input-text full number right" type="text" value="0" title="추가옵션 판매가" name="slepric_added"></td></div>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<div class="input-container gap-4">
|
|
<div class="select-box">
|
|
<select class="short" title="추가옵션 마일리지정책구분코드" style="display: none;" name="mlgPolicyCd_added">
|
|
<option value="01">통합</option>
|
|
<option value="02">개별</option>
|
|
</select><div class="nice-select short" tabindex="0"><span class="current">통합</span><ul class="list"><li data-value="01" class="option selected">통합</li><li data-value="02" class="option">개별</li></ul></div>
|
|
</div>
|
|
<input class="input-text sm number right" value="" type="text" title="추가옵션 마일리지적립금액" name="mlgAccmlAmt_added" disabled >
|
|
<div class="select-box">
|
|
<select class="short" title="추가옵션 마일리지적립구분코드" style="display: none;" name="mlgAccmlCd_added" disabled >
|
|
<option value="02">원</option>
|
|
<option value="01">%</option>
|
|
</select><div class="nice-select short disabled" tabindex="0"><span class="current">원</span><ul class="list"><li data-value="02" class="option selected">원</li><li data-value="01" class="option">%</li></ul></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
`+
|
|
dynamicInvntrySldoutExpsrAt
|
|
+`
|
|
</td>
|
|
<!-- <td>-->
|
|
<!-- <div class="optionApply__priceContainer">-->
|
|
<!-- <div class="select-box">-->
|
|
<!-- <select class="full" title="추가옵션 노출조건" name="optnRelateAt_added">-->
|
|
<!-- <option value="Y">필수옵션1에만 노출</option>-->
|
|
<!-- <option value="N">항시 노출</option>-->
|
|
<!-- </select>-->
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
<!-- </td>-->
|
|
<td><div class="optionApply__priceContainer"><input class="input-text full" type="text" title="추가옵션 정보" name="optnInfo_added"></div></td>
|
|
<td>
|
|
<div class="compnbDscntAt_addedList" style="height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<div class="compnbDscntAt_added">
|
|
<label class="b-checkbox checkbox" for="compnbDscntAt03_`+rowCount+`0">
|
|
<input type="checkbox" value="Y" id="compnbDscntAt03_`+rowCount+`0" name="compnbDscntAt_added" checked>
|
|
<span class="check"></span><span class="control-label"></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="sctnDscntAt_addedList" style="height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<div class="sctnDscntAt_added">
|
|
<label class="b-checkbox checkbox" for="sctnDscntAt03_`+rowCount+`0">
|
|
<input type="checkbox" value="Y" id="sctnDscntAt03_`+rowCount+`0" name="sctnDscntAt_added" checked>
|
|
<span class="check"></span><span class="control-label"></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="manage-btn-container">
|
|
<button type="button" class="btn xsm dark optionDel03">삭제</button>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
`;
|
|
|
|
$('#addition_option_tbody').append(newRow);
|
|
$('#addition_option_tbody').find('.select-box > select').niceSelect(); //niceSelect 적용
|
|
$('#addition_option').tableDnDUpdate();
|
|
};
|
|
|
|
/* ********************************************************
|
|
* 재고옵션 행 복사
|
|
******************************************************** */
|
|
const fn_copy_invntry_option_row = function (_tr) {
|
|
|
|
let $row = $(_tr).closest('tr');
|
|
let clonedRow = $row.clone();
|
|
let rowCount = $('#invntry_option_tbody tr').length;
|
|
clonedRow.find('input[type="radio"]').attr('id', 'stdrDvAt02-' + rowCount).removeAttr('checked').removeClass('checked');
|
|
clonedRow.find('label').attr('for', 'stdrDvAt02-' + rowCount);
|
|
$('#invntry_option_tbody').append(clonedRow);
|
|
$('#invntry_option').tableDnDUpdate();
|
|
|
|
}
|
|
|
|
/* ********************************************************
|
|
* 행 삭제
|
|
******************************************************** */
|
|
let additDeletedIdList = []
|
|
|
|
const fn_remove_row = function (_tr) {
|
|
|
|
let id = '#' + $(_tr).parents('tbody').attr('id');
|
|
//추가정보 아이디 사용여부 N 처리용으로 아이디 받아서 배열 저장
|
|
const additDeletedId = $(_tr).closest('tr').find('input[id^="goodsAditInfoInnb-"]').val()
|
|
|
|
additDeletedIdList.push(additDeletedId);
|
|
|
|
|
|
let cnt = $(id).children('tr').length;
|
|
let target = id + 'NoData';
|
|
if (cnt === 2) $(target).show();
|
|
$(_tr).closest('tr').remove();
|
|
|
|
}
|
|
|
|
|
|
/* ********************************************************
|
|
* 재고옵션 행 삭제
|
|
******************************************************** */
|
|
const fn_remove_invntry_row = function (_tr) {
|
|
|
|
let id = '#' + $(_tr).parents('tbody').attr('id');
|
|
//추가정보 아이디 사용여부 N 처리용으로 아이디 받아서 배열 저장
|
|
const delInvntryInnb = $(_tr).closest('tr').find('input[name="goodsOptnInnb_invntry"]').val()
|
|
|
|
//삭제할 재고옵션 상품옵션고유번호 저장
|
|
fn_del_optn_innb(delInvntryInnb,'invntry')
|
|
|
|
let cnt = $(id).children('tr').length;
|
|
let target = id + 'NoData';
|
|
if (cnt === 2) $(target).show();
|
|
$(_tr).closest('tr').remove();
|
|
|
|
}
|
|
|
|
/* ********************************************************
|
|
* 행 이동 _ 위로
|
|
******************************************************** */
|
|
const fn_move_row_up = function (_tr) {
|
|
|
|
let $row = $(_tr).closest('tr');
|
|
let $prevRow = $row.prev();
|
|
|
|
if ($prevRow.length > 0) $row.insertBefore($prevRow);
|
|
};
|
|
|
|
/* ********************************************************
|
|
* 행 이동 _ 아래로
|
|
******************************************************** */
|
|
const fn_move_row_down = function (_tr) {
|
|
|
|
let $row = $(_tr).closest('tr');
|
|
let $nextRow = $row.next();
|
|
|
|
if ($nextRow.length > 0) $row.insertAfter($nextRow);
|
|
|
|
};
|
|
|
|
/* ********************************************************
|
|
* 상품 검색 팝업 > 상품 목록 조회
|
|
******************************************************** */
|
|
const fn_goods_search_popup_list = function (pageIndex, selected) {
|
|
let dataStr;
|
|
if (!pageIndex) {
|
|
$('#pageIndex').val(1);
|
|
} else {
|
|
$('#pageIndex').val(pageIndex);
|
|
}
|
|
|
|
$('#popupListForm').find('input[name=pageIndex]').eq(0).val(pageIndex);
|
|
const popupListForm = $("#popupListForm").serialize();
|
|
|
|
$.ajax({
|
|
type: "post",
|
|
url: "<c:url value="/mngr/goods/goodsmngr/selectGoodsSrchPopupList"/>",
|
|
data: popupListForm,
|
|
success: function (resultHtml) {
|
|
$('#goodsList').empty();
|
|
$('#goodsList').html(resultHtml);
|
|
}
|
|
});
|
|
}
|
|
|
|
/* ********************************************************
|
|
* 상품 검색 팝업 배열 값 불러오기
|
|
******************************************************** */
|
|
// 등록된 정보 있을 경우
|
|
$(document).ready(function () {
|
|
|
|
$('#appendList tr').each(function () {
|
|
const goodsId = $(this).attr('id').replace('choiseListId', '');
|
|
const goodsImg = $(this).find('input[name="goodsImgCours"]').val();
|
|
const goodsNm = $(this).find('input[name="goodsNm"]').val();
|
|
const goodsPrice = $(this).find('input[name="slepric"]').val();
|
|
const goodsSttusNm = $(this).find('input[name="goodsSttusNm"]').val();
|
|
const expsrNm = $(this).find('input[name="expsrNm"]').val();
|
|
|
|
selected.push({
|
|
goodsId: goodsId,
|
|
goodsImg: goodsImg,
|
|
goodsNm: goodsNm,
|
|
goodsPrice: goodsPrice,
|
|
goodsSttusNm: goodsSttusNm,
|
|
expsrNm :expsrNm
|
|
});
|
|
});
|
|
})
|
|
|
|
|
|
let selected = [];
|
|
|
|
function fn_select_goods_search() {
|
|
|
|
selected = [];
|
|
|
|
$('#appendList tr').each(function () {
|
|
const goodsId = $(this).attr('id').replace('choiseListId', '');
|
|
const goodsImg = $(this).find('input[name="goodsImgCours"]').val();
|
|
const goodsNm = $(this).find('input[name="goodsNm"]').val();
|
|
const goodsPrice = $(this).find('input[name="slepric"]').val();
|
|
const goodsSttusNm = $(this).find('input[name="goodsSttusNm"]').val();
|
|
const expsrNm = $(this).find('input[name="expsrNm"]').val();
|
|
|
|
selected.push({
|
|
goodsId: goodsId,
|
|
goodsImg: goodsImg,
|
|
goodsNm: goodsNm,
|
|
goodsPrice: goodsPrice,
|
|
goodsSttusNm: goodsSttusNm,
|
|
expsrNm: expsrNm
|
|
});
|
|
});
|
|
|
|
// 각 화면에 맞춰서 HTML 변경 START
|
|
var tableBody = $("#parentGoodsContainer");
|
|
tableBody.empty();
|
|
|
|
selected.forEach((good, index) => {
|
|
var productHtml = `
|
|
<div class="product-group__item">
|
|
<input type="hidden" id="relatedGoodsId" name="relatedGoodsId" value="` + good.goodsId + `">
|
|
<input type="hidden" id="goodsSttusNm" name="goodsSttusNm" value="`+ good.goodsSttusNm + `">
|
|
<span class="product-group__item-number">` + (index + 1) + `</span>
|
|
<div class="product-group__image">
|
|
<img src="` + good.goodsImg + `" width="140" alt="` + good.goodsNm + `"
|
|
onerror="this.src='/mngr/images/image_placeholder.png'"
|
|
>
|
|
</div>
|
|
<div class="product-group__description">
|
|
<p>` + good.goodsNm + `</p>
|
|
<p class="product-group__description-price">` + fn_format_comma(good.goodsPrice) + `원</p>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
tableBody.append(productHtml);
|
|
});
|
|
// 각 화면에 맞춰서 HTML 변경 END
|
|
|
|
fn_close_modal('product-search');
|
|
}
|
|
|
|
|
|
|
|
/* ********************************************************
|
|
* 구매 대상자 제한 팝업
|
|
******************************************************** */
|
|
|
|
//구매 대상자 제한 설정버튼 조회여부
|
|
$(document).on('click', '#purchaseLimmtBtn', function () {
|
|
|
|
//구매대상 제한 설정 호출한 적 없는 경우
|
|
if(!$(this).hasClass('purchase_lmmit_chk')){
|
|
|
|
fn_open_modal('#modalDiv','#purchase-limit','/mngr/goods/goodsmngr/selectGoodsPurchaseLimttPopupR',
|
|
{
|
|
goodsInnb : $('#goodsInnb').val()
|
|
, sopmalCd : $('#sopmalCd').val()
|
|
}
|
|
);
|
|
$(this).addClass('purchase_lmmit_chk')
|
|
|
|
}else{ //구매대상 제한 설정 호출한 적 있는 경우
|
|
$('#purchase-limit').modal()
|
|
}
|
|
|
|
})
|
|
|
|
//구매대상자 제한 여부 모든등급 <-> 등급별에 따른 disabled & checked 처리
|
|
$(document).on('change','input[name="gradSet"]', function () {
|
|
|
|
$(this).click()
|
|
|
|
if($(this).val() ==='all'){ //all 이면
|
|
|
|
//가격제한 체크 해제
|
|
const pricChk = $('input[type="checkbox"].gradSetAllChk_pric');
|
|
pricChk.prop('checked', false)
|
|
pricChk.removeClass('checked')
|
|
|
|
//구매제한 체크 해제
|
|
const btnChk = $('input[type="checkbox"].gradSetAllChk_btn');
|
|
btnChk.prop('checked', false)
|
|
btnChk.removeClass('checked')
|
|
|
|
//가격 대체문구 빈값 + 비활성화
|
|
const pricWordInput = $('input[name^="pricRplcWords_"].gradSetAllChk_pric');
|
|
pricWordInput.prop('disabled', true)
|
|
|
|
// //가격 링크연결 빈값 + 비활성화
|
|
const pricLinkInput = $('input[name^="pricRplcLink_"].gradSetAllChk_pric');
|
|
pricLinkInput.prop('disabled', true)
|
|
|
|
// //버튼 대체문구 빈값 + 비활성화
|
|
const btnWordInput = $('input[name^="buttonRplcWords_"].gradSetAllChk_btn');
|
|
btnWordInput.prop('disabled', true)
|
|
|
|
// //버튼 링크연결 빈값 + 비활성화
|
|
const btnLinkInput = $('input[name^="buttonRplcLink_"].gradSetAllChk_btn');
|
|
btnLinkInput.prop('disabled', true)
|
|
|
|
//링크연결 셀렉트 비활성화
|
|
$('select.gradSetAllChk_pric').prop('disabled', true).niceSelect('update')
|
|
$('select.gradSetAllChk_btn').prop('disabled', true).niceSelect('update')
|
|
|
|
|
|
|
|
}else{ //distinct 이면
|
|
|
|
//가격 제한
|
|
const pricEvntSelector = $('#pricRplcWordsUseAt_all')
|
|
const pricEvntId = pricEvntSelector.attr('id')
|
|
const pricEvntTarget = pricEvntId.substring(pricEvntId.indexOf('_')+1, pricEvntId.length)
|
|
|
|
|
|
//버튼 제한
|
|
const btnEvntSelector = $('#buttonRplcWordsUseAt_all')
|
|
const btnEvntId = btnEvntSelector.attr('id')
|
|
const btnEvntTarget = btnEvntId.substring(btnEvntId.indexOf('_')+1, btnEvntId.length)
|
|
|
|
//가격 제한 체크 해제
|
|
pricEvntSelector.removeClass('checked')
|
|
pricEvntSelector.prop('checked', false)
|
|
|
|
//버튼 제한 체크 해제
|
|
btnEvntSelector.removeClass('checked')
|
|
btnEvntSelector.prop('checked', false)
|
|
|
|
//체크 해제에 따른 input, select 비활성화
|
|
rplcActiveAt(false, 'pric', pricEvntTarget)
|
|
rplcActiveAt(false, 'button', btnEvntTarget)
|
|
|
|
// //input 빈값처리
|
|
// $('#pricRplcWords_'+pricEvntTarget).val('')
|
|
// $('#pricRplcLink_'+pricEvntTarget).val('')
|
|
// $('#buttonRplcWords_'+btnEvntTarget).val('')
|
|
// $('#buttonRplcLink_'+btnEvntTarget).val('')
|
|
|
|
}
|
|
|
|
})
|
|
|
|
// 가격 제한 / 구매 제한 체크
|
|
$(document).on('change','[id*="RplcWordsUseAt"]', function () {
|
|
|
|
const evntId = $(this).attr('id')
|
|
const evntTarget = evntId.substring(evntId.indexOf('_')+1, evntId.length)
|
|
const evntType = evntId.substring(0, evntId.indexOf('RplcWordsUseAt_' + evntTarget))
|
|
|
|
//체크박스 선택에 따른 체크 처리
|
|
const hasClass = rplcWordsUseAt(evntType, evntTarget)
|
|
|
|
//체크 상태에 따른 인풋, 셀렉트 활성화
|
|
rplcActiveAt(hasClass, evntType, evntTarget)
|
|
})
|
|
|
|
/** 체크박스 선택에 따른 체크 처리 */
|
|
const rplcWordsUseAt = function (evntType, evntTarget) {
|
|
const target = $('#'+evntType+'RplcWordsUseAt_'+evntTarget);
|
|
|
|
if(target.hasClass('checked')){
|
|
target.removeClass('checked')
|
|
}else{
|
|
target.addClass('checked')
|
|
}
|
|
|
|
return target.hasClass('checked')
|
|
}
|
|
|
|
/** 체크 상태에 따른 인풋, 셀렉트 활성화 */
|
|
const rplcActiveAt = function (hasClass, evntType, evntTarget) {
|
|
if(hasClass){
|
|
$('#'+evntType+'RplcWords_'+evntTarget).prop('disabled', false)
|
|
$('#'+evntType+'RplcLink_'+evntTarget).prop('disabled', false)
|
|
$('#'+evntType+'RplcLinkDvCd_'+evntTarget).prop('disabled', false).niceSelect('update')
|
|
$('#'+evntType+'RplcLinkBrwsrDvCd_'+evntTarget).prop('disabled', false).niceSelect('update')
|
|
}else{
|
|
$('#'+evntType+'RplcWords_'+evntTarget).prop('disabled', true)
|
|
$('#'+evntType+'RplcLink_'+evntTarget).prop('disabled', true)
|
|
$('#'+evntType+'RplcLinkDvCd_'+evntTarget).prop('disabled', true).niceSelect('update')
|
|
$('#'+evntType+'RplcLinkBrwsrDvCd_'+evntTarget).prop('disabled', true).niceSelect('update')
|
|
}
|
|
}
|
|
|
|
//구매 대상자 제한 정보 저장
|
|
const fn_save_purchase_limmit = function () {
|
|
|
|
if ($('#purchase_limmit_hiddenForm') != null) {
|
|
$('#purchase_limmit_hiddenForm').remove();
|
|
}
|
|
|
|
|
|
const sopmalCd = $('#sopmalCd').val();
|
|
const goodsInnb = parseInt($('#goodsInnb').val())
|
|
|
|
const purchase_limmit_hiddenForm = document.createElement('form');
|
|
const url = '<c:url value="/mngr/goods/goodsmngr/updateGoodsDtlTrgterLmtt"/>';
|
|
purchase_limmit_hiddenForm.name = 'purchase_limmit_hiddenForm';
|
|
purchase_limmit_hiddenForm.id = 'purchase_limmit_hiddenForm';
|
|
|
|
const purchsLimitForm = new FormData();
|
|
|
|
// 비회원
|
|
const pricRplcWordsUseAt_none = document.getElementById('pricRplcWordsUseAt_none');
|
|
fn_create_input('hidden', "goodsTrgterLmttNoneVOList.goodsTrgterDvCd", '02', purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttNoneVOList.goodsTrgterLmttInnb",fn_comma_del_str_to_number($('#goodsTrgterLmttInnb_none').val()), purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttNoneVOList.sopmalCd", sopmalCd, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttNoneVOList.goodsInnb", goodsInnb, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttNoneVOList.useAt", 'Y', purchase_limmit_hiddenForm);
|
|
if (pricRplcWordsUseAt_none.checked) {
|
|
|
|
let pricRplcWords_none = $('[name=pricRplcWords_none]').val()
|
|
let pricRplcLink_none = $('[name=pricRplcLink_none]').val();
|
|
let pricRplcLinkDvCd_none = $('[name=pricRplcLinkDvCd_none]').val();
|
|
let pricRplcLinkBrwsrDvCd_none = $('[name=pricRplcLinkBrwsrDvCd_none]').val();
|
|
|
|
fn_create_input('hidden', "goodsTrgterLmttNoneVOList.pricRplcWordsUseAt", 'Y', purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttNoneVOList.pricRplcWords", pricRplcWords_none, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttNoneVOList.pricRplcLink", pricRplcLink_none, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttNoneVOList.pricRplcLinkDvCd", pricRplcLinkDvCd_none, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttNoneVOList.pricRplcLinkBrwsrDvCd", pricRplcLinkBrwsrDvCd_none, purchase_limmit_hiddenForm);
|
|
|
|
} else {
|
|
fn_create_input('hidden', "goodsTrgterLmttNoneVOList.pricRplcWordsUseAt", 'N', purchase_limmit_hiddenForm);
|
|
|
|
}
|
|
|
|
const buttonRplcWordsUseAt_none = document.getElementById('buttonRplcWordsUseAt_none');
|
|
if (buttonRplcWordsUseAt_none.checked) {
|
|
|
|
let buttonRplcWords_none = $('[name=buttonRplcWords_none]').val();
|
|
let buttonRplcLink_none = $('[name=buttonRplcLink_none]').val();
|
|
let buttonRplcLinkDvCd_none = $('[name=buttonRplcLinkDvCd_none]').val()
|
|
let buttonRplcLinkBrwsrDvCd_none = $('[name=buttonRplcLinkBrwsrDvCd_none]').val()
|
|
|
|
fn_create_input('hidden', "goodsTrgterLmttNoneVOList.buttonRplcWordsUseAt", 'Y', purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttNoneVOList.buttonRplcWords", buttonRplcWords_none, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttNoneVOList.buttonRplcLink", buttonRplcLink_none, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttNoneVOList.buttonRplcLinkDvCd", buttonRplcLinkDvCd_none, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttNoneVOList.buttonRplcLinkBrwsrDvCd", buttonRplcLinkBrwsrDvCd_none, purchase_limmit_hiddenForm);
|
|
|
|
} else {
|
|
fn_create_input('hidden', "goodsTrgterLmttNoneVOList.buttonRplcWordsUseAt", 'N', purchase_limmit_hiddenForm);
|
|
|
|
}
|
|
|
|
// 모든 등급
|
|
if($('#gradSetAll').prop('checked')){
|
|
const pricRplcWordsUseAt_all = document.getElementById('pricRplcWordsUseAt_all');
|
|
if (pricRplcWordsUseAt_all) {
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.goodsTrgterDvCd", '01', purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.mbrGradInnb", '0', purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.goodsTrgterLmttInnb", fn_comma_del_str_to_number($('#goodsTrgterLmttInnb_all').val()), purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.sopmalCd", sopmalCd, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.goodsInnb", goodsInnb, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.useAt", 'Y', purchase_limmit_hiddenForm);
|
|
if (pricRplcWordsUseAt_all.checked) {
|
|
let pricRplcWords_all = $('[name=pricRplcWords_all]').val();
|
|
let pricRplcLink_all = $('[name=pricRplcLink_all]').val();
|
|
let pricRplcLinkDvCd_all = $('[name=pricRplcLinkDvCd_all]').val();
|
|
let pricRplcLinkBrwsrDvCd_all = $('[name=pricRplcLinkBrwsrDvCd_all]').val();
|
|
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.pricRplcWordsUseAt", 'Y', purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.pricRplcWords", pricRplcWords_all, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.pricRplcLink", pricRplcLink_all, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.pricRplcLinkDvCd", pricRplcLinkDvCd_all, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.pricRplcLinkBrwsrDvCd", pricRplcLinkBrwsrDvCd_all, purchase_limmit_hiddenForm);
|
|
|
|
} else {
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.pricRplcWordsUseAt", 'N', purchase_limmit_hiddenForm);
|
|
|
|
}
|
|
|
|
|
|
const buttonRplcWordsUseAt_all = document.getElementById('buttonRplcWordsUseAt_all');
|
|
if (buttonRplcWordsUseAt_all.checked) {
|
|
let buttonRplcWords_all = $('[name=buttonRplcWords_all]').val();
|
|
let buttonRplcLink_all = $('[name=buttonRplcLink_all]').val();
|
|
let buttonRplcLinkDvCd_all = $('[name=buttonRplcLinkDvCd_all]').val();
|
|
let buttonRplcLinkBrwsrDvCd_all = $('[name=buttonRplcLinkBrwsrDvCd_all]').val();
|
|
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.buttonRplcWordsUseAt", 'Y', purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.buttonRplcWords", buttonRplcWords_all, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.buttonRplcLink", buttonRplcLink_all, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.buttonRplcLinkDvCd", buttonRplcLinkDvCd_all, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.buttonRplcLinkBrwsrDvCd", buttonRplcLinkBrwsrDvCd_all, purchase_limmit_hiddenForm);
|
|
|
|
} else {
|
|
fn_create_input('hidden', "goodsTrgterLmttMemAllVOList.buttonRplcWordsUseAt", 'N', purchase_limmit_hiddenForm);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// 회원 등급별
|
|
if($('#gradSet').prop('checked')){
|
|
document.querySelectorAll('.individual-grade-row').forEach((container, idx) => {
|
|
const pricRplcWordsUseAt = document.getElementById('pricRplcWordsUseAt_'+ idx);
|
|
if (pricRplcWordsUseAt){
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].goodsTrgterDvCd", '01', purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].goodsTrgterLmttInnb", fn_comma_del_str_to_number($('input[name^="goodsTrgterLmttInnb_mem"]').eq(idx).val()), purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].sopmalCd", sopmalCd, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].goodsInnb", goodsInnb, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].useAt", 'Y', purchase_limmit_hiddenForm);
|
|
if (pricRplcWordsUseAt.checked) {
|
|
|
|
let pricRplcWords = $('[name=pricRplcWords_'+idx+']').val() ;
|
|
let pricRplcLink = $('[name=pricRplcLink_'+idx+']').val()
|
|
let pricRplcLinkDvCd = $('[name=pricRplcLinkDvCd_'+idx+']').val()
|
|
let pricRplcLinkBrwsrDvCd = $('[name=pricRplcLinkBrwsrDvCd_'+idx+']').val()
|
|
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].pricRplcWordsUseAt", 'Y', purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].pricRplcWords", pricRplcWords, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].pricRplcLink", pricRplcLink, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].pricRplcLinkDvCd", pricRplcLinkDvCd, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].pricRplcLinkBrwsrDvCd", pricRplcLinkBrwsrDvCd, purchase_limmit_hiddenForm);
|
|
|
|
}else{
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].pricRplcWordsUseAt", 'N', purchase_limmit_hiddenForm);
|
|
}
|
|
|
|
const buttonRplcWordsUseAt = document.getElementById('buttonRplcWordsUseAt_'+ idx);
|
|
if (buttonRplcWordsUseAt.checked) {
|
|
|
|
let buttonRplcWords = $('[name=buttonRplcWords_'+idx+']').val();
|
|
let buttonRplcLink = $('[name=buttonRplcLink_'+idx+']').val();
|
|
let buttonRplcLinkDvCd = $('[name=buttonRplcLinkDvCd_'+idx+']').val();
|
|
let buttonRplcLinkBrwsrDvCd = $('[name=buttonRplcLinkBrwsrDvCd_'+idx+']').val();
|
|
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].buttonRplcWordsUseAt", 'Y', purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].buttonRplcWords", buttonRplcWords, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].buttonRplcLink", buttonRplcLink, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].buttonRplcLinkDvCd", buttonRplcLinkDvCd, purchase_limmit_hiddenForm);
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].buttonRplcLinkBrwsrDvCd", buttonRplcLinkBrwsrDvCd, purchase_limmit_hiddenForm);
|
|
|
|
|
|
}else{
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].buttonRplcWordsUseAt", 'N', purchase_limmit_hiddenForm);
|
|
}
|
|
|
|
fn_create_input('hidden', "goodsTrgterLmttMemGradVOList[" + idx + "].mbrGradInnb", fn_nvl($('[name=mbrGradInnb]').eq(idx).val(),'0'), purchase_limmit_hiddenForm);
|
|
}
|
|
|
|
})
|
|
}
|
|
|
|
fn_create_input('hidden', 'purchsTrgterLmttDvCd', $('input[name="purchsTrgterLmttDvCd"]:checked').val() , purchase_limmit_hiddenForm)
|
|
fn_create_input('hidden', 'goodsInnb', goodsInnb , purchase_limmit_hiddenForm)
|
|
fn_create_input('hidden', 'sopmalCd', sopmalCd, purchase_limmit_hiddenForm)
|
|
|
|
|
|
document.body.appendChild(purchase_limmit_hiddenForm);
|
|
|
|
$('#purchase_limmit_hiddenForm').serializeArray().forEach(function (item) {
|
|
purchsLimitForm.append(item.name, item.value);
|
|
});
|
|
|
|
updateAjaxInfo("구매대상자제한정보", url, purchsLimitForm)
|
|
|
|
};
|
|
|
|
//구매대상 제한 팝업 닫기 함수
|
|
const fn_close_modal2 = function (modalId) {
|
|
$("#" + modalId + " > a").each(function () {
|
|
if (this.href.indexOf('.close-modal')) {
|
|
$(this).click();
|
|
}
|
|
});
|
|
}
|
|
|
|
//모든 컴마 삭제 및 문자를 숫자로 변환
|
|
const fn_comma_del_str_to_number = function (str) {
|
|
|
|
// null이나 undefined인 경우 0을 반환
|
|
if (str === null || str === undefined || str.trim() === '') {
|
|
return 0;
|
|
}
|
|
|
|
// 쉼표를 제거하고 숫자로 변환
|
|
const numberWithoutCommas = str.replace(/,/g, '');
|
|
const number = parseFloat(numberWithoutCommas);
|
|
|
|
// 변환된 값이 NaN인 경우 0을 반환
|
|
if (isNaN(number)) {
|
|
return 0;
|
|
}
|
|
|
|
return number;
|
|
|
|
}
|
|
|
|
/* 에러메세지 처리 */
|
|
const fn_proc_error_message = 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++) {
|
|
const name = $(this).prop('name');
|
|
|
|
if (!fn_is_empty(name)) {
|
|
if (errorObject.errorFields[idx].indexOf(name) >= 0) {
|
|
isMtched = true;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
if (isMtched) {
|
|
$(this).focus();
|
|
return false;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
} else {
|
|
if (data.responseJSON.resBody.message) {
|
|
alert(data.responseJSON.resBody.message);
|
|
} else {
|
|
alert('<spring:message code="error.internal-server"/>');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
//입력옵션 사용유무에 따른 활성화
|
|
$(document).on('click', 'input[name="optnTy04"]', function () {
|
|
if( $(this).attr('id') ==='r-602'){
|
|
$('#input_option').hide()
|
|
}
|
|
if($(this).attr('id') ==='r-601'){
|
|
$('#input_option').show()
|
|
}
|
|
})
|
|
|
|
|
|
$(document).ready(function () {
|
|
$('#input_option').hide()
|
|
})
|
|
|
|
|
|
$(document).on('change', 'select[name^="mlgPolicyCd"]', function () {
|
|
|
|
if($(this).val() === '02'){
|
|
$(this).closest('.input-container').find('.input-text').prop('disabled', false)
|
|
$(this).closest('.input-container').find('.input-text').val('')
|
|
$(this).closest('.input-container').find('select').not(this).prop('disabled', false).niceSelect('update')
|
|
}
|
|
if($(this).val() === '01'){
|
|
$(this).closest('.input-container').find('.input-text').prop('disabled', true)
|
|
$(this).closest('.input-container').find('.input-text').val('')
|
|
$(this).closest('.input-container').find('select').not(this).prop('disabled', true).niceSelect('update')
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
if($('#hiddenForm_del_img') != null ){
|
|
$('#hiddenForm_del_img').remove()
|
|
}
|
|
|
|
//삭제된 이미지 번호 저장 폼
|
|
let hiddenForm_del_img = document.createElement('form');
|
|
hiddenForm_del_img.name = 'hiddenForm_del_img';
|
|
hiddenForm_del_img.id = 'hiddenForm_del_img';
|
|
hiddenForm_del_img.method = 'post';
|
|
hiddenForm_del_img.action = '';
|
|
|
|
|
|
//상품이미지 삭제
|
|
const deleteFileImg = function (obj) {
|
|
const rmImg = $(obj).siblings('div.file-preview__image')
|
|
const rmImgId = rmImg.children('input[name="goodsImgInnb"]').val()
|
|
const cutNb = rmImg.children('input[name="cutNb"]').val()
|
|
|
|
|
|
|
|
fn_create_input('hidden', "deleteImgId", rmImgId, hiddenForm_del_img);
|
|
fn_create_input('hidden', "cutNb", cutNb, hiddenForm_del_img);
|
|
|
|
document.body.append(hiddenForm_del_img);
|
|
|
|
$(obj).parent('div.file-preview').parent('div.file-preview__container').remove()
|
|
}
|
|
|
|
|
|
/* ********************************************************
|
|
* 개별 수정
|
|
******************************************************** */
|
|
//카테고리 수정
|
|
$(document).on('click', '#btn_update_category', function () {
|
|
|
|
|
|
if ($('#hiddenForm_categry') != null) {
|
|
$('#hiddenForm_categry').remove();
|
|
}
|
|
|
|
const url = '<c:url value="/mngr/goods/goodsmngr/updateGoodsDtlCtgryLink"/>';
|
|
const hiddenForm = document.createElement('form');
|
|
hiddenForm.name = 'hiddenForm_categry';
|
|
hiddenForm.id = 'hiddenForm_categry';
|
|
hiddenForm.method = 'post';
|
|
hiddenForm.action = '';
|
|
|
|
const formData = new FormData();
|
|
|
|
//카테고리 연결 배열 저장
|
|
$('[name=reprsntCtgryAt]').each(function (idx) {
|
|
let reprsntCtgryAtValue = $(this).prop('checked') ? 'Y' : 'N';
|
|
fn_create_input('hidden', "goodsCategoryLinkVOList[" + idx + "].reprsntCtgryAt", reprsntCtgryAtValue, hiddenForm);
|
|
fn_create_input('hidden', "goodsCategoryLinkVOList[" + idx + "].ctgryId", $(this).closest('tr').find('td[data-value]').data('value'), hiddenForm);
|
|
});
|
|
|
|
fn_create_input('hidden', 'goodsInnb', $('#goodsInnb').val() , hiddenForm)
|
|
fn_create_input('hidden', 'sopmalCd', $('#sopmalCd').val(), hiddenForm)
|
|
|
|
|
|
document.body.appendChild(hiddenForm);
|
|
|
|
$('#hiddenForm_categry').serializeArray().forEach(function (item) {
|
|
formData.append(item.name, item.value);
|
|
});
|
|
|
|
updateAjaxInfo("카테고리", url, formData, '01')
|
|
|
|
})
|
|
|
|
|
|
|
|
//상품 기본정보 수정
|
|
$(document).on('click', '#btn_update_BscInfo', function (event) {
|
|
event.preventDefault()
|
|
|
|
if ($('#hiddenForm_bscInfo') != null) {
|
|
$('#hiddenForm_bscInfo').remove();
|
|
}
|
|
|
|
|
|
//상품명 입력여부
|
|
const goodsNm = $('#goodsNm')
|
|
if(fn_is_empty(goodsNm.val())){
|
|
goodsNm.focus()
|
|
alert('상품명을 입력해 주세요')
|
|
return false;
|
|
}
|
|
const goodsNmEn = $('#goodsNmEn')
|
|
if(fn_is_empty(goodsNmEn.val())){
|
|
goodsNmEn.focus()
|
|
alert('상품명(영문)을 입력해 주세요')
|
|
return false;
|
|
}
|
|
const goodsNmEnAlphabet = goodsNmEn.val().replace(/[0-9]/g, '');
|
|
if (goodsNmEnAlphabet.length < 10) {
|
|
goodsNmEn.focus();
|
|
alert('상품명(영문)은 숫자를 제외한 영문 기준 10자 이상 입력해 주세요');
|
|
return false;
|
|
}
|
|
|
|
const url = '<c:url value="/mngr/goods/goodsmngr/updateGoodsDtlBscInfo"/>';
|
|
const hiddenForm = document.createElement('form');
|
|
hiddenForm.name = 'hiddenForm_bscInfo';
|
|
hiddenForm.id = 'hiddenForm_bscInfo';
|
|
hiddenForm.method = 'post';
|
|
hiddenForm.action = '';
|
|
|
|
|
|
const formData = new FormData();
|
|
|
|
//상품명
|
|
fn_create_input('hidden', "goodsNm", $('#goodsNm').val(), hiddenForm);
|
|
//상품명(영문)
|
|
fn_create_input('hidden', "goodsNmEn", $('#goodsNmEn').val(), hiddenForm);
|
|
//브랜드
|
|
fn_create_input('hidden', 'brandCd', $('#brandCd').val(), hiddenForm)
|
|
//대표설명
|
|
fn_create_input('hidden', "reprsntDc", $('#reprsntDc').val(), hiddenForm);
|
|
//검색어
|
|
fn_create_input('hidden', "kwrd", $('#kwrd').val(), hiddenForm);
|
|
//간략설명
|
|
fn_create_input('hidden', "srtDc", $('#srtDc').val(), hiddenForm);
|
|
//리뷰연동
|
|
fn_create_input('hidden', "rvwGroupNb", $('#rvwGroupNb').val(), hiddenForm);
|
|
//한달리뷰작성가능여부
|
|
fn_create_input('hidden', "rvwWritngPosblAt", $('input[name="rvwWritngPosblAt"]:checked').val(), hiddenForm);
|
|
//리뷰작성가능여부
|
|
fn_create_input('hidden', "mtRvwWritngPosblAt", $('input[name="mtRvwWritngPosblAt"]:checked').val(), hiddenForm);
|
|
//추가항목 배열 저장
|
|
$('[name=infoSj]').each(function (idx) {
|
|
|
|
if(!fn_is_empty($('[name=goodsAditInfoInnb]').eq(idx).val())){
|
|
fn_create_input('hidden', "goodsAdditionVOList[" + idx + "].goodsAditInfoInnb", $('[name=goodsAditInfoInnb]').eq(idx).val() , hiddenForm);
|
|
fn_create_input('hidden', "goodsAdditionVOList[" + idx + "].useAt", $('[name=goodsAditInfoUseAt]').eq(idx).val(), hiddenForm);
|
|
}else{
|
|
fn_create_input('hidden', "goodsAdditionVOList[" + idx + "].useAt", "Y", hiddenForm);
|
|
}
|
|
|
|
fn_create_input('hidden', "goodsAdditionVOList[" + idx + "].infoSj", $('[name=infoSj]').eq(idx).val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsAdditionVOList[" + idx + "].infoCn", $('[name=infoCn]').eq(idx).val(), hiddenForm);
|
|
|
|
|
|
});
|
|
|
|
//추가정보 삭제 아이디 저장
|
|
if(additDeletedIdList.length >= 0){
|
|
for(let i = 0; i < additDeletedIdList.length; i++) {
|
|
fn_create_input('hidden', "deleteAdditionVOList[" + i + "].sopmalCd", $('#sopmalCd').val(), hiddenForm);
|
|
fn_create_input('hidden', "deleteAdditionVOList[" + i + "].goodsInnb", parseInt($('#goodsInnb').val()), hiddenForm);
|
|
fn_create_input('hidden', "deleteAdditionVOList[" + i + "].goodsAditInfoInnb", parseInt(additDeletedIdList[i], 10), hiddenForm);
|
|
fn_create_input('hidden', "deleteAdditionVOList[" + i + "].useAt", "N", hiddenForm);
|
|
}
|
|
|
|
}
|
|
|
|
//상품 아이콘 배열 저장
|
|
let checkedIcons = document.querySelectorAll('input[name="iconCd"]:checked');
|
|
let goodsIconCd = '';
|
|
checkedIcons.forEach(function (checkbox) {
|
|
goodsIconCd += checkbox.value + ','
|
|
});
|
|
|
|
fn_create_input('hidden', "goodsIconCd", remove_Last_Comma(goodsIconCd), hiddenForm);
|
|
hiddenForm.append(goodsIconCd)
|
|
|
|
fn_create_input('hidden', 'goodsInnb', $('#goodsInnb').val() , hiddenForm)
|
|
fn_create_input('hidden', 'sopmalCd', $('#sopmalCd').val() , hiddenForm)
|
|
|
|
|
|
|
|
document.body.appendChild(hiddenForm);
|
|
|
|
$('#hiddenForm_bscInfo').serializeArray().forEach(function (item) {
|
|
formData.append(item.name, item.value);
|
|
});
|
|
|
|
updateAjaxInfo("기본정보", url, formData, '02')
|
|
|
|
})
|
|
|
|
|
|
/*상품옵션의 옵션값, 옵션코드를 체크하는 함수*/
|
|
function optnValCdEmptyAt(optnTy){
|
|
|
|
let optnVal1IsEmpty = false;
|
|
let optnCd1IsEmpty = false;
|
|
|
|
$('input[name="optnVal1_'+optnTy+'"]').each(function () {
|
|
if(fn_is_empty($(this).val().trim())){
|
|
optnVal1IsEmpty = true
|
|
}
|
|
})
|
|
|
|
$('input[name="optnCd1_'+optnTy+'"]').each(function () {
|
|
if(fn_is_empty($(this).val().trim())){
|
|
optnCd1IsEmpty = true
|
|
}
|
|
})
|
|
|
|
return {'optnVal1IsEmpty' : optnVal1IsEmpty,
|
|
'optnCd1IsEmpty' : optnCd1IsEmpty}
|
|
}
|
|
|
|
|
|
// 상품 판매정보 수정
|
|
$(document).on('click', '#btn_update_SelInfo', function () {
|
|
|
|
if ($('#hiddenForm_selInfo') != null) {
|
|
$('#hiddenForm_selInfo').remove();
|
|
}
|
|
|
|
if($('#purchase_limmit_hiddenForm') != null){
|
|
$('#purchase_limmit_hiddenForm').remove()
|
|
}
|
|
|
|
//필수옵션의 옵션값 확인
|
|
//필수옵션의 상품코드 확인
|
|
|
|
//일반옵션이면
|
|
let optnVal1IsEmpty = false
|
|
let optnCd1IsEmpty = false
|
|
|
|
|
|
if($('input[name="r-group501"]:checked').attr('id') === 'r-501'){
|
|
|
|
|
|
const normalValCdChk = optnValCdEmptyAt('normal')
|
|
optnVal1IsEmpty = normalValCdChk.optnVal1IsEmpty
|
|
optnCd1IsEmpty = normalValCdChk.optnCd1IsEmpty
|
|
|
|
|
|
|
|
}else{
|
|
//재고옵션이면
|
|
|
|
const invntryValCdChk = optnValCdEmptyAt('invntry')
|
|
optnVal1IsEmpty = invntryValCdChk.optnVal1IsEmpty
|
|
optnCd1IsEmpty = invntryValCdChk.optnCd1IsEmpty
|
|
}
|
|
|
|
//추가옵션이면
|
|
|
|
let optnValAddedIsEmpty = false
|
|
let optnCd1AddedIsEmpty = false
|
|
if($('input[name="r-group701"]:checked').attr('id') === 'r-701'){
|
|
|
|
const addedValCdChk = optnValCdEmptyAt('added')
|
|
optnValAddedIsEmpty = addedValCdChk.optnVal1IsEmpty
|
|
optnCd1AddedIsEmpty = addedValCdChk.optnCd1IsEmpty
|
|
|
|
|
|
}
|
|
|
|
if(optnVal1IsEmpty){
|
|
$('a[href="#section04"]').click()
|
|
alert('필수 옵션값을 입력해 주세요')
|
|
return
|
|
}
|
|
|
|
if(optnCd1IsEmpty){
|
|
$('a[href="#section04"]').click()
|
|
alert('필수 옵션코드를 입력해 주세요')
|
|
return
|
|
}
|
|
|
|
//추가구성옵션이 있을경우 옵션값 확인
|
|
if(optnValAddedIsEmpty){
|
|
$('a[href="#section04"]').click()
|
|
alert('추가 옵션값을 입력해 주세요')
|
|
return
|
|
}
|
|
|
|
//추가구성옵션이 있을경우 상품코드 확인
|
|
if(optnCd1AddedIsEmpty){
|
|
$('a[href="#section04"]').click()
|
|
alert('추가 옵션코드를 입력해 주세요')
|
|
return
|
|
}
|
|
|
|
|
|
// 배송/반품정보 선택여부
|
|
const cmnuseInfoInnb = $('div.cmnuseInfoInnb')
|
|
const cmnuseInfoInnbSelect = $('#cmnuseInfoInnb option:selected')
|
|
if(fn_is_empty(cmnuseInfoInnbSelect.val())){
|
|
cmnuseInfoInnb.focus()
|
|
alert('배송/반품정보를 선택해 주세요')
|
|
return false;
|
|
}
|
|
|
|
// 배송일 선택여부
|
|
const dlvyGroupInnb = $('div.dlvyGroupInnb')
|
|
const dlvyGroupInnbSelect = $('#dlvyGroupInnb option:selected')
|
|
if(fn_is_empty(dlvyGroupInnbSelect.val())){
|
|
dlvyGroupInnb.focus()
|
|
alert('배송일을 선택해 주세요')
|
|
return false;
|
|
}
|
|
|
|
|
|
|
|
|
|
//예약판매 설정 입력 확인
|
|
if($('#goodsExpsrTy02').prop('chcked')){
|
|
if(fn_is_empty($('#datepicker_3').val()) || fn_is_empty($('#resveGoodsGuidanceWordsCn').val())){
|
|
alert('예약판매 정보를 입력해 주세요')
|
|
return;
|
|
}
|
|
}
|
|
|
|
//노출예약설정 입력 확인
|
|
let hasEmptyExpsr = false;
|
|
if($('#expsrCdList3').prop('checked')){
|
|
$('#expsrSet input').each(function (){
|
|
if(fn_is_empty($(this).val())){
|
|
hasEmptyExpsr = true;
|
|
return false;
|
|
}
|
|
})
|
|
|
|
if(hasEmptyExpsr){
|
|
alert('노출예약 정보를 입력해 주세요')
|
|
return
|
|
}
|
|
}
|
|
|
|
//이벤트 실판매일 경우 실시간 실재고수량 미입력시
|
|
if($('#rltmQyBannerDvCd-02').prop('checked') && $('#rltmQyBannerExpsrAtY').prop('checked')){
|
|
if( fn_is_empty($('#rltmRlQy').val()) || $('#rltmRlQy').val() <= 0){
|
|
alert('이벤트 실판매 실시간실재고수량을 입력해 주세요 ')
|
|
return;
|
|
}
|
|
}
|
|
//이벤트 가판매일 경우 정보 미입력시
|
|
if($('#rltmQyBannerDvCd-03').prop('checked') && $('#rltmQyBannerExpsrAtY').prop('checked')){
|
|
if( fn_is_empty($('#rltmVirtlQy').val()) || $('#rltmVirtlQy').val() <= 0
|
|
|| fn_is_empty($('#rltmQyDdctStdrDt').val()) || fn_is_empty($('#rltmQyDdctTme').val())
|
|
|| fn_is_empty($('#rltmDdctQy').val()) || fn_is_empty($('#rltmDdctLimitQy').val())
|
|
){
|
|
alert('이벤트 가판매 입력정보를 모두 입력해 주세요 ')
|
|
return;
|
|
}
|
|
}
|
|
|
|
//가용재고 제한수량 validation - 옵션 재고수 보다 많이 작성할 경우 불가 처리
|
|
if(!fn_is_empty($('#avlinvLmttQy').val()) && $('#goodsDftinfoInvntryPolicy1').prop('checked')){
|
|
|
|
let invntryQyTot = 0;
|
|
$('input[name^="invntryQy_"]').each(function () {
|
|
invntryQyTot += fn_comma_del_str_to_number($(this).val())
|
|
})
|
|
|
|
if(fn_comma_del_str_to_number($('#avlinvLmttQy').val()) > invntryQyTot){
|
|
$('#avlinvLmttQy').focus()
|
|
alert('재고에 따른 판매 - 가용재고제한수량을 현재 옵션 재고수량보다 적게 입력해 주세요');
|
|
return false;
|
|
}
|
|
}
|
|
|
|
const url = '<c:url value="/mngr/goods/goodsmngr/updateGoodsDtlSelInfo"/>';
|
|
const hiddenForm = document.createElement('form');
|
|
hiddenForm.name = 'hiddenForm_selInfo';
|
|
hiddenForm.id = 'hiddenForm_selInfo';
|
|
hiddenForm.method = 'post';
|
|
hiddenForm.action = '';
|
|
|
|
|
|
const formData = new FormData();
|
|
|
|
|
|
//선택한 재고정책
|
|
const choiceInvntryPolicyCd = $('input[name="invntryPolicyCd"]:checked').val()
|
|
const prevInvntryPolicyCd = $('#invntryPolicyCdAsIs').val()
|
|
|
|
//재고에 따른 판매(재고정책)가 수정되었을 경우
|
|
if(choiceInvntryPolicyCd !== prevInvntryPolicyCd){
|
|
alert('재고정책 변경에 따라 판매가능재고수량을 초기화합니다.')
|
|
fn_create_input('hidden', 'usefulInvntryQyInit','Y', hiddenForm)
|
|
}
|
|
|
|
|
|
|
|
fn_create_input('hidden', 'goodsSttusCd',$('input[name="goodsSttusCd"]:checked').val(), hiddenForm)
|
|
//상품예약판매사용 사용여부
|
|
if($('#goodsExpsrTy02').prop('checked')){
|
|
fn_create_input('hidden', "goodsExpsrTyCd", '02', hiddenForm);
|
|
//예약상품 배송일자
|
|
fn_create_input('hidden', "resveGoodsDlvyDe", $('#datepicker_3').val(), hiddenForm);
|
|
//예약상품 안내문구
|
|
fn_create_input('hidden', "resveGoodsGuidanceWordsCn", $('#resveGoodsGuidanceWordsCn').val(), hiddenForm);
|
|
|
|
}else{
|
|
fn_create_input('hidden', "goodsExpsrTyCd", '01', hiddenForm);
|
|
}
|
|
|
|
|
|
// 노출여부
|
|
const expsrDvCd = $('input[name="expsrDvCd"]:checked').val()
|
|
fn_create_input('hidden', 'expsrDvCd',expsrDvCd, hiddenForm)
|
|
|
|
if(expsrDvCd ==='03'){
|
|
//노출기간
|
|
if(!fn_is_empty($('#datepicker_1').val()) && !fn_is_empty($('#datepicker_2').val())){
|
|
const expsrBgnDt = $('#datepicker_1').val() + ' ' +$('#expsrBgnDt_time').val() +':00'
|
|
const expsrEndDt = $('#datepicker_2').val() + ' ' +$('#expsrEndDt_time').val() +':00'
|
|
|
|
|
|
formData.append('expsrBgnDt', expsrBgnDt);
|
|
formData.append('expsrEndDt', expsrEndDt);
|
|
}
|
|
// 노출문구
|
|
fn_create_input('hidden', 'expsrSetupFwords',$('#expsrSetupFwords').val(), hiddenForm)
|
|
}
|
|
|
|
// 재고에따른판매여부
|
|
fn_create_input('hidden', 'invntryPolicyCd',$('input[name="invntryPolicyCd"]:checked').val(), hiddenForm)
|
|
// 가용재고제한수량
|
|
fn_create_input('hidden', 'avlinvLmttQy',parseInt(fn_nvl(fn_comma_del_str_to_number($('#avlinvLmttQy').val()),'0')), hiddenForm)
|
|
// 청약철회여부
|
|
fn_create_input('hidden', 'subscrptWthdrawPosblAt',$('input[name="subscrptWthdrawPosblAt"]:checked').val(), hiddenForm)
|
|
// 과세여부
|
|
fn_create_input('hidden', 'taxAt',$('input[name="taxAt"]:checked').val(), hiddenForm)
|
|
//구매대상자 여부
|
|
fn_create_input('hidden', 'purchsTrgterLmttDvCd',$('input[name="purchsTrgterLmttDvCd"]:checked').val(), hiddenForm)
|
|
const isSetPurhcaseLimmit = document.getElementById('r-19').checked;
|
|
//구매대상자 제한 Form 저장
|
|
if(isSetPurhcaseLimmit){
|
|
$('#purchase_limmit_hiddenForm').serializeArray().forEach(function (item) {
|
|
formData.append(item.name, item.value);
|
|
});
|
|
}
|
|
//구매수량유형
|
|
formData.append('purchsQyLmttDvCd',$('input[name="purchsQyLmttDvCd"]:checked').val())
|
|
if($('#r-21').prop('checked')){
|
|
// 최소구매수량
|
|
fn_create_input('hidden', 'mummPurchsQy',fn_comma_del_str_to_number($('#mummPurchsQy').val()), hiddenForm)
|
|
// 최대구매수량
|
|
fn_create_input('hidden', 'mxmmPurchsQy',fn_comma_del_str_to_number($('#mxmmPurchsQy').val()), hiddenForm)
|
|
}
|
|
|
|
fn_create_input('hidden', 'goodsInnb', parseInt($('#goodsInnb').val()) , hiddenForm)
|
|
fn_create_input('hidden', 'sopmalCd', $('#sopmalCd').val(), hiddenForm)
|
|
|
|
|
|
|
|
|
|
//실시간수량배너 노출여부
|
|
fn_create_input('hidden', 'rltmQyBannerExpsrAt', $('input[name="rltmQyBannerExpsrAt"]:checked').val(), hiddenForm)
|
|
const rltmQyBannerDvCd = fn_nvl($('input[name="rltmQyBannerDvCd"]:checked').val(),'');
|
|
fn_create_input('hidden', 'rltmQyBannerDvCd', rltmQyBannerDvCd, hiddenForm)
|
|
if (rltmQyBannerDvCd === '02'){//이벤트 실판매일 경우 실판매재고수량 0 초기화
|
|
fn_create_input('hidden', 'rltmRlQy', fn_comma_del_str_to_number($('#rltmRlQy').val()), hiddenForm)
|
|
fn_create_input('hidden', 'rltmRlSleQy', parseInt('0'), hiddenForm)
|
|
}
|
|
if(rltmQyBannerDvCd === '03'){
|
|
fn_create_input('hidden', 'rltmVirtlQy', fn_comma_del_str_to_number($('#rltmVirtlQy').val()), hiddenForm)
|
|
fn_create_input('hidden', 'rltmQyDdctStdrDt', ($('#rltmQyDdctStdrDt').val()+" 00:00:00"), hiddenForm)
|
|
fn_create_input('hidden', 'rltmQyDdctTme', fn_comma_del_str_to_number($('#rltmQyDdctTme').val()), hiddenForm)
|
|
fn_create_input('hidden', 'rltmDdctQy', fn_comma_del_str_to_number($('#rltmDdctQy').val()), hiddenForm)
|
|
fn_create_input('hidden', 'rltmDdctLimitQy', fn_comma_del_str_to_number($('#rltmDdctLimitQy').val()), hiddenForm)
|
|
}
|
|
|
|
//판매중지문구 변경 여부
|
|
fn_create_input('hidden', 'selStpgeCustomWordsAt', $('#selStpgeCustomWordsAt').prop('checked')?'Y':'N', hiddenForm)
|
|
|
|
//판매중지 변경 문구
|
|
fn_create_input('hidden', 'selStpgeCustomWords', $('#selStpgeCustomWords').val(), hiddenForm)
|
|
|
|
|
|
document.body.appendChild(hiddenForm);
|
|
|
|
$('#hiddenForm_selInfo').serializeArray().forEach(function (item) {
|
|
formData.append(item.name, item.value);
|
|
});
|
|
|
|
|
|
updateAjaxInfo("판매정보", url, formData,'03')
|
|
|
|
})
|
|
|
|
|
|
|
|
//상품 옵션수정
|
|
$(document).on('click', '#btn_update_opt', function (event) {
|
|
event.preventDefault()
|
|
|
|
if ($('#hiddenForm_opt') != null) {
|
|
$('#hiddenForm_opt').remove();
|
|
}
|
|
|
|
//validation
|
|
|
|
|
|
|
|
//추가구성옵션 사용함인데 빈값일 경우
|
|
const addOptnNm = $('#optnNm1_added0')
|
|
if($('#r-701').prop('checked') && fn_is_empty(addOptnNm.val())){
|
|
addOptnNm.focus()
|
|
alert('추가구성옵션을 입력 주세요')
|
|
return false;
|
|
}
|
|
|
|
//필수옵션(일반, 재고) 작성여부 - 옵션명 기준
|
|
//옵션 체크 여부
|
|
const optnNm1_normal = $('#optnNm1_normal0')
|
|
const optnNm1_invntry = $('input[name="optnNm1_invntry"]').eq(0)
|
|
if(fn_is_empty(optnNm1_normal.val()) && fn_is_empty(optnNm1_invntry.val())){
|
|
|
|
const optnNm1_normalChk = $('#r-501').prop('checked')
|
|
const optnNm1_invntryChk = $('#r-502').prop('checked')
|
|
|
|
if(optnNm1_normalChk){
|
|
optnNm1_normal.focus()
|
|
alert('필수옵션(일반, 재고) 중 하나는 입력해 주세요')
|
|
return false;
|
|
}
|
|
|
|
if(optnNm1_invntryChk){
|
|
optnNm1_invntry.focus()
|
|
alert('필수옵션(일반, 재고) 중 하나는 입력해 주세요')
|
|
return false;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
const url = '<c:url value="/mngr/goods/goodsmngr/updateGoodsDtlOptnInfo"/>';
|
|
const hiddenForm = document.createElement('form');
|
|
hiddenForm.name = 'hiddenForm_opt';
|
|
hiddenForm.id = 'hiddenForm_opt';
|
|
hiddenForm.method = 'post';
|
|
hiddenForm.action = '';
|
|
|
|
const formData = new FormData();
|
|
|
|
|
|
//입력옵션 배열 저장
|
|
//사용함 체크 확인
|
|
// const isUsing = document.getElementById('r-601').checked;
|
|
// if (isUsing) {
|
|
// $('[name=optnNm1_input]').each(function (idx) {
|
|
// if($('#optnEssntlAt04-'+idx).hasClass('checked')){
|
|
// fn_create_input('hidden', "goodsInputOptionVOList[" + idx + "].optnEssntlAt", 'Y', hiddenForm);
|
|
// }else{
|
|
// fn_create_input('hidden', "goodsInputOptionVOList[" + idx + "].optnEssntlAt", 'N', hiddenForm);
|
|
// }
|
|
// fn_create_input('hidden', "goodsInputOptionVOList[" + idx + "].sopmalCd", sopmalCd, hiddenForm);
|
|
// fn_create_input('hidden', "goodsInputOptionVOList[" + idx + "].optnTy", '04', hiddenForm);
|
|
// fn_create_input('hidden', "goodsInputOptionVOList[" + idx + "].optnNm1", $('[name=optnNm1_input]').eq(idx).val(), hiddenForm);
|
|
// fn_create_input('hidden', "goodsInputOptionVOList[" + idx + "].optnOrdr", idx, hiddenForm);
|
|
// fn_create_input('hidden', "goodsInputOptionVOList[" + idx + "].useAt", 'Y', hiddenForm);
|
|
// });
|
|
|
|
// //입력옵션 삭제
|
|
// let delArr = fn_get_del_optn_innb('input')
|
|
// delArr.forEach((id, idx) => {
|
|
// fn_create_input('hidden', "delGoodsInputOptionVOList[" + idx + "].goodsOptnInnb", id, hiddenForm);
|
|
// fn_create_input('hidden', "delGoodsInputOptionVOList[" + idx + "].optnTy", '04', hiddenForm);
|
|
// fn_create_input('hidden', "delGoodsInputOptionVOList[" + idx + "].useAt", 'N', hiddenForm);
|
|
// fn_create_input('hidden', "delGoodsInputOptionVOList[" + idx + "].goodsInnb", goodsInnb, hiddenForm);
|
|
// fn_create_input('hidden', "delGoodsInputOptionVOList[" + idx + "].sopmalCd", sopmalCd, hiddenForm);
|
|
//
|
|
// });
|
|
// }
|
|
|
|
//일반옵션 배열 저장
|
|
//사용함 체크 확인
|
|
|
|
const sopmalCd = $('#sopmalCd').val();
|
|
const goodsInnb = $('#goodsInnb').val();
|
|
|
|
const normalOptionisUsing = document.getElementById('r-501').checked;
|
|
if (normalOptionisUsing) {
|
|
let optnGroupNb = 0;
|
|
let preOptnNm ='';
|
|
let currentOptnNm = '';
|
|
let optnOrdr = 1;
|
|
$('[name="optnNm1_normal"]').each(function (idx) {
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].optnTy", '01', hiddenForm);
|
|
if($('input[name="stdrDvAt_normal"]').eq(idx).hasClass('checked')){
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].stdrDvAt", 'Y', hiddenForm);
|
|
}else{
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].stdrDvAt", 'N', hiddenForm);
|
|
}
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].goodsOptnInnb", fn_comma_del_str_to_number($('[name=goodsOptnInnb_normal]').eq(idx).val()), hiddenForm);
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].optnNm1", $('[name=optnNm1_normal]').eq(0).val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].optnVal1", $('[name=optnVal1_normal]').eq(idx).val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].optnCd1", $('[name=optnCd1_normal]').eq(idx).val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].hscode", $('[name=hscode_normal]').eq(idx).val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].realWt", $('[name=realWt_normal]').eq(idx).val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].sopmalCd", sopmalCd, hiddenForm);
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].invntryQy", fn_comma_del_str_to_number($('[name=invntryQy_normal]').eq(idx).val()), hiddenForm);
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].cnsmrpric", fn_comma_del_str_to_number($('[name=cnsmrpric_normal]').eq(idx).val()), hiddenForm);
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].slepric", fn_comma_del_str_to_number($('[name=slepric_normal]').eq(idx).val()), hiddenForm);
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].optnInfo", $('[name=optnInfo_normal]').eq(idx).val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].mlgPolicyCd", $('[name="mlgPolicyCd_normal"] option:selected').eq(idx).val(), hiddenForm);
|
|
if($('[name="mlgPolicyCd_normal"] option:selected').eq(idx).val() ==='02'){
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].mlgAccmlCd", $('[name="mlgAccmlCd_normal"] option:selected').eq(idx).val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].mlgAccmlAmt", fn_comma_del_str_to_number($('[name=mlgAccmlAmt_normal]').eq(idx).val()), hiddenForm);
|
|
}
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].invntrySldoutExpsrAt", $('#invntrySldoutExpsrAt_normal option:selected').val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].useAt", 'Y', hiddenForm);
|
|
|
|
//옵션그룹번호 저장
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].optnGroupNb", 0, hiddenForm);
|
|
|
|
//옵션번호 설정
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].optnOrdr", idx+1, hiddenForm);
|
|
});
|
|
|
|
|
|
//일반옵션 노출여부 저장
|
|
$('input[type="checkbox"][id^="optnExpsrAt01-"]').each(function(idx, checkbox) {
|
|
var isChecked = checkbox.checked ? 'Y' : 'N';
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].optnExpsrAt", isChecked, hiddenForm);
|
|
});
|
|
|
|
|
|
//일반옵션 복수할인 저장
|
|
var compnbDscntAt01 = document.querySelectorAll('input[type="checkbox"][id^="compnbDscntAt01_"]');
|
|
|
|
// 체크박스를 배열로 변환하여 정렬
|
|
var compnbDscntAt01Sorted = Array.from(compnbDscntAt01).sort(function(a, b) {
|
|
var aNumber = parseInt(a.id.split('-')[1], 10);
|
|
var bNumber = parseInt(b.id.split('-')[1], 10);
|
|
return aNumber - bNumber;
|
|
});
|
|
|
|
// 정렬된 체크박스를 순서대로 처리
|
|
compnbDscntAt01Sorted.forEach(function(checkbox, idx) {
|
|
var isChecked = checkbox.checked ? 'Y' : 'N';
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].compnbDscntAt", isChecked, hiddenForm);
|
|
});
|
|
|
|
//일반옵션 구간할인 저장
|
|
var sctnDscntAt01 = document.querySelectorAll('input[type="checkbox"][id^="sctnDscntAt01_"]');
|
|
|
|
// 체크박스를 배열로 변환하여 정렬
|
|
var sctnDscntAt01Sorted = Array.from(sctnDscntAt01).sort(function(a, b) {
|
|
var aNumber = parseInt(a.id.split('-')[1], 10);
|
|
var bNumber = parseInt(b.id.split('-')[1], 10);
|
|
return aNumber - bNumber;
|
|
});
|
|
|
|
// 정렬된 체크박스를 순서대로 처리
|
|
sctnDscntAt01Sorted.forEach(function(checkbox, idx) {
|
|
var isChecked = checkbox.checked ? 'Y' : 'N';
|
|
fn_create_input('hidden', "goodsNormalOptionVOList[" + idx + "].sctnDscntAt", isChecked, hiddenForm);
|
|
});
|
|
|
|
//삭제한 상품옵션 고유번호
|
|
let delArr = fn_get_del_optn_innb('normal')
|
|
delArr.forEach((id, idx) => {
|
|
fn_create_input('hidden', "delGoodsNormalOptionVOList[" + idx + "].goodsOptnInnb", id, hiddenForm);
|
|
fn_create_input('hidden', "delGoodsNormalOptionVOList[" + idx + "].optnTy", '01', hiddenForm);
|
|
fn_create_input('hidden', "delGoodsNormalOptionVOList[" + idx + "].useAt", 'N', hiddenForm);
|
|
fn_create_input('hidden', "delGoodsNormalOptionVOList[" + idx + "].goodsInnb", goodsInnb, hiddenForm);
|
|
fn_create_input('hidden', "delGoodsNormalOptionVOList[" + idx + "].sopmalCd", sopmalCd, hiddenForm);
|
|
|
|
});
|
|
}
|
|
|
|
//재고옵션 배열 저장
|
|
//사용함 체크 확인
|
|
let invntryOptionisUsing = document.getElementById('r-502').checked;
|
|
if(invntryOptionisUsing){
|
|
const invntrySldoutExpsrAt = $('#invntrySldoutExpsrAt_invntry').prop('checked')?'Y':'N';
|
|
$('[name="optnVal1_invntry"]').each(function (idx) {
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].optnTy", '02', hiddenForm);
|
|
if($('#stdrDvAt02-'+(idx)).hasClass('checked')){
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].stdrDvAt", 'Y', hiddenForm);
|
|
}else{
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].stdrDvAt", 'N', hiddenForm);
|
|
}
|
|
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].goodsOptnInnb", fn_comma_del_str_to_number($('[name=goodsOptnInnb_invntry]').eq(idx).val()), hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].optnNm1", $('[name=optnNm1_invntry]').val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].optnNm2", $('[name=optnNm2_invntry]').val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].optnNm3", $('[name=optnNm3_invntry]').val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].optnNm4", $('[name=optnNm4_invntry]').val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].optnVal1", $('[name=optnVal1_invntry]').eq(idx).val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].optnVal2", $('[name=optnVal2_invntry]').eq(idx).val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].optnVal3", $('[name=optnVal3_invntry]').eq(idx).val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].optnVal4", $('[name=optnVal4_invntry]').eq(idx).val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].optnCd1", $('[name=optnCd1_invntry]').eq(idx).val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].invntryQy", fn_comma_del_str_to_number($('[name=invntryQy_invntry]').eq(idx).val()), hiddenForm);
|
|
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].cnsmrpric", fn_comma_del_str_to_number($('[name=cnsmrpric_invntry]').eq(idx).val()), hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].slepric", fn_comma_del_str_to_number($('[name=slepric_invntry]').eq(idx).val()), hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].optnInfo", $('[name=optnInfo_invntry]').eq(idx).val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].mlgPolicyCd", $('[name="mlgPolicyCd_invntry"] option:selected').eq(idx).val(), hiddenForm);
|
|
if($('[name="mlgPolicyCd_invntry"] option:selected').eq(idx).val() === '02'){
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].mlgAccmlAmt", fn_comma_del_str_to_number($('[name=mlgAccmlAmt_invntry]').eq(idx).val()), hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].mlgAccmlCd", $('[name="mlgAccmlCd_invntry"] option:selected').eq(idx).val(), hiddenForm);
|
|
}
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].invntrySldoutExpsrAt", invntrySldoutExpsrAt, hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].sopmalCd", sopmalCd, hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].optnOrdr", (idx+1), hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].useAt", 'Y', hiddenForm);
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].optnGroupNb", 0, hiddenForm);
|
|
});
|
|
|
|
|
|
// 재고옵션 노출여부 저장
|
|
var optnExpsrAt02 = document.querySelectorAll('input[type="checkbox"][id^="optnExpsrAt02-"]');
|
|
|
|
// 체크박스를 배열로 변환하여 정렬
|
|
var optnExpsrAt02Sort = Array.from(optnExpsrAt02).sort(function(a, b) {
|
|
var optnExpsrAt02SortaNumber = parseInt(a.id.split('-')[1], 10);
|
|
var optnExpsrAt02SortbNumber = parseInt(b.id.split('-')[1], 10);
|
|
return optnExpsrAt02SortaNumber - optnExpsrAt02SortbNumber;
|
|
});
|
|
|
|
// 정렬된 체크박스를 순서대로 처리
|
|
optnExpsrAt02Sort.forEach(function(checkbox, idx) {
|
|
var optnExpsrAt02isChecked = checkbox.checked ? 'Y' : 'N';
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].optnExpsrAt", optnExpsrAt02isChecked, hiddenForm);
|
|
});
|
|
|
|
|
|
|
|
|
|
// 재고옵션 복수할인여부 저장
|
|
var compnbDscntAt02 = document.querySelectorAll('input[type="checkbox"][id^="compnbDscntAt02_"]');
|
|
|
|
// 체크박스를 배열로 변환하여 정렬
|
|
var compnbDscntAt02Sort = Array.from(compnbDscntAt02).sort(function(a, b) {
|
|
var compnbDscntAt02SortaNumber = parseInt(a.id.split('-')[1], 10);
|
|
var compnbDscntAt02SortbNumber = parseInt(b.id.split('-')[1], 10);
|
|
return compnbDscntAt02SortaNumber - compnbDscntAt02SortbNumber;
|
|
});
|
|
|
|
// 정렬된 체크박스를 순서대로 처리
|
|
compnbDscntAt02Sort.forEach(function(checkbox, idx) {
|
|
var compnbDscntAt02isChecked = checkbox.checked ? 'Y' : 'N';
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].compnbDscntAt", compnbDscntAt02isChecked, hiddenForm);
|
|
});
|
|
|
|
|
|
// 재고옵션 구간할인여부 저장
|
|
var sctnDscntAt02 = document.querySelectorAll('input[type="checkbox"][id^="sctnDscntAt02_"]');
|
|
|
|
// 체크박스를 배열로 변환하여 정렬
|
|
var sctnDscntAt02Sort = Array.from(sctnDscntAt02).sort(function(a, b) {
|
|
var sctnDscntAt02SortaNumber = parseInt(a.id.split('-')[1], 10);
|
|
var sctnDscntAt02SortbNumber = parseInt(b.id.split('-')[1], 10);
|
|
return sctnDscntAt02SortaNumber - sctnDscntAt02SortbNumber;
|
|
});
|
|
|
|
// 정렬된 체크박스를 순서대로 처리
|
|
sctnDscntAt02Sort.forEach(function(checkbox, idx) {
|
|
var sctnDscntAt02isChecked = checkbox.checked ? 'Y' : 'N';
|
|
fn_create_input('hidden', "goodsInvntryOptionVOList[" + idx + "].sctnDscntAt", sctnDscntAt02isChecked, hiddenForm);
|
|
});
|
|
|
|
//재고옵션 삭제
|
|
let delArr = fn_get_del_optn_innb('invntry')
|
|
delArr.forEach((id, idx) => {
|
|
fn_create_input('hidden', "delGoodsInvntryOptionVOList[" + idx + "].goodsOptnInnb", id, hiddenForm);
|
|
fn_create_input('hidden', "delGoodsInvntryOptionVOList[" + idx + "].optnTy", '02', hiddenForm);
|
|
fn_create_input('hidden', "delGoodsInvntryOptionVOList[" + idx + "].useAt", 'N', hiddenForm);
|
|
fn_create_input('hidden', "delGoodsInvntryOptionVOList[" + idx + "].goodsInnb", goodsInnb, hiddenForm);
|
|
fn_create_input('hidden', "delGoodsInvntryOptionVOList[" + idx + "].sopmalCd", sopmalCd, hiddenForm);
|
|
|
|
});
|
|
}
|
|
// 추가구성옵션 배열 저장
|
|
const addedOptionisUsing = document.getElementById('r-701').checked;
|
|
if(addedOptionisUsing){
|
|
let optnGroupNb = 0;
|
|
let preOptnNm ='';
|
|
let currentOptnNm = '';
|
|
let optnOrdr = 1;
|
|
$('[name="optnNm1_added"]').each(function (idx) {
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].optnTy", '03', hiddenForm);
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].goodsOptnInnb", fn_comma_del_str_to_number($('[name=goodsOptnInnb_added]').eq(idx).val()), hiddenForm);
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].optnNm1", $('[name=optnNm1_added]').eq(idx).val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].optnVal1",$('[name=optnVal1_added]').eq(idx).val() , hiddenForm);
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].optnCd1",$('[name=optnCd1_added]').eq(idx).val() , hiddenForm);
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].invntryQy",fn_comma_del_str_to_number($('[name=invntryQy_added]').eq(idx).val()) , hiddenForm);
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].cnsmrpric",fn_comma_del_str_to_number($('[name=cnsmrpric_added]').eq(idx).val()) , hiddenForm);
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].slepric",fn_comma_del_str_to_number($('[name=slepric_added]').eq(idx).val()) , hiddenForm);
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].mlgPolicyCd",$('[name=mlgPolicyCd_added] option:selected').eq(idx).val() , hiddenForm);
|
|
if($('[name=mlgPolicyCd_added] option:selected').eq(idx).val() === '02'){
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].mlgAccmlAmt",fn_comma_del_str_to_number($('[name=mlgAccmlAmt_added]').eq(idx).val()) , hiddenForm);
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].mlgAccmlCd",$('[name=mlgAccmlCd_added] option:selected').eq(idx).val() , hiddenForm);
|
|
}
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].invntrySldoutExpsrAt",$('#invntrySldoutExpsrAt_added option:selected').val(), hiddenForm);
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].optnInfo",$('[name=optnInfo_added]').eq(idx).val() , hiddenForm);
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].sopmalCd", sopmalCd, hiddenForm);
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].useAt", 'Y', hiddenForm);
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].usefulInvntryQy", 0, hiddenForm);
|
|
|
|
|
|
currentOptnNm = $('[name=optnNm1_added]').eq(idx).val()
|
|
//옵션그룹번호 설정
|
|
if(idx === 0){
|
|
preOptnNm = currentOptnNm;
|
|
}
|
|
|
|
if(preOptnNm !== currentOptnNm){
|
|
optnGroupNb++;
|
|
optnOrdr = 1
|
|
}
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].optnGroupNb", optnGroupNb, hiddenForm);
|
|
preOptnNm = currentOptnNm;
|
|
|
|
//옵션번호 설정
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].optnOrdr", optnOrdr, hiddenForm);
|
|
optnOrdr++;
|
|
})
|
|
|
|
// 추가옵션 노출여부 저장
|
|
$('input[type="checkbox"][id^="optnExpsrAt03-"]').each(function(idx, checkbox) {
|
|
var isChecked = checkbox.checked ? 'Y' : 'N';
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].optnExpsrAt", isChecked, hiddenForm);
|
|
});
|
|
|
|
|
|
//추가옵션 필수여부 저장
|
|
var optnEssntlAt03 = document.querySelectorAll('input[id^="optnEssntlAt03-"]');
|
|
|
|
// 체크박스를 배열로 변환하여 정렬
|
|
var optnEssntlAt03Sort = Array.from(optnEssntlAt03).sort(function(a, b) {
|
|
var optnEssntlAt03aNumber = parseInt(a.id.split('-')[1], 10);
|
|
var optnEssntlAt03bNumber = parseInt(b.id.split('-')[1], 10);
|
|
return optnEssntlAt03aNumber - optnEssntlAt03bNumber;
|
|
});
|
|
|
|
// 정렬된 체크박스를 순서대로 처리
|
|
optnEssntlAt03Sort.forEach(function(checkbox, idx) {
|
|
var optnEssntlAt03isChecked = checkbox.checked ? 'Y' : 'N';
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].optnEssntlAt", optnEssntlAt03isChecked, hiddenForm);
|
|
});
|
|
|
|
//추가옵션 필수여부 저장
|
|
var compnbDscntAt03 = document.querySelectorAll('input[type="checkbox"][id^="compnbDscntAt03_"]');
|
|
|
|
// 체크박스를 배열로 변환하여 정렬
|
|
var compnbDscntAt03Sort = Array.from(compnbDscntAt03).sort(function(a, b) {
|
|
var compnbDscntAt03aNumber = parseInt(a.id.split('-')[1], 10);
|
|
var compnbDscntAt03bNumber = parseInt(b.id.split('-')[1], 10);
|
|
return compnbDscntAt03aNumber - compnbDscntAt03bNumber;
|
|
});
|
|
|
|
// 정렬된 체크박스를 순서대로 처리
|
|
compnbDscntAt03Sort.forEach(function(checkbox, idx) {
|
|
var compnbDscntAt03isChecked = checkbox.checked ? 'Y' : 'N';
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].compnbDscntAt", compnbDscntAt03isChecked, hiddenForm);
|
|
});
|
|
|
|
//추가옵션 필수여부 저장
|
|
var sctnDscntAt03 = document.querySelectorAll('input[type="checkbox"][id^="sctnDscntAt03_"]');
|
|
|
|
// 체크박스를 배열로 변환하여 정렬
|
|
var sctnDscntAt03Sort = Array.from(sctnDscntAt03).sort(function(a, b) {
|
|
var sctnDscntAt03aNumber = parseInt(a.id.split('-')[1], 10);
|
|
var sctnDscntAt03bNumber = parseInt(b.id.split('-')[1], 10);
|
|
return sctnDscntAt03aNumber - sctnDscntAt03bNumber;
|
|
});
|
|
|
|
// 정렬된 체크박스를 순서대로 처리
|
|
sctnDscntAt03Sort.forEach(function(checkbox, idx) {
|
|
var sctnDscntAt03isChecked = checkbox.checked ? 'Y' : 'N';
|
|
fn_create_input('hidden', "goodsAddedOptionVOList[" + idx + "].sctnDscntAt", sctnDscntAt03isChecked, hiddenForm);
|
|
});
|
|
|
|
}else{
|
|
//사용안함 체크시 사용여부 N설정
|
|
|
|
$('#addition_option_tbody').find('tr').each(function () {
|
|
|
|
$('.optionDel01').click();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
let delArr = fn_get_del_optn_innb('added')
|
|
delArr.forEach((id, idx) => {
|
|
fn_create_input('hidden', "delGoodsAddedOptionVOList[" + idx + "].goodsOptnInnb", id, hiddenForm);
|
|
fn_create_input('hidden', "delGoodsAddedOptionVOList[" + idx + "].optnTy", '03', hiddenForm);
|
|
fn_create_input('hidden', "delGoodsAddedOptionVOList[" + idx + "].useAt", 'N', hiddenForm);
|
|
fn_create_input('hidden', "delGoodsAddedOptionVOList[" + idx + "].goodsInnb", goodsInnb, hiddenForm);
|
|
fn_create_input('hidden', "delGoodsAddedOptionVOList[" + idx + "].sopmalCd", sopmalCd, hiddenForm);
|
|
|
|
});
|
|
|
|
|
|
fn_create_input('hidden', 'goodsInnb', parseInt(goodsInnb) , hiddenForm)
|
|
fn_create_input('hidden', 'sopmalCd', sopmalCd, hiddenForm)
|
|
|
|
document.body.appendChild(hiddenForm);
|
|
|
|
$('#hiddenForm_opt').serializeArray().forEach(function (item) {
|
|
formData.append(item.name, item.value);
|
|
});
|
|
|
|
|
|
//로컬스토리지 저장정보 삭제
|
|
localStorage.removeItem('delGoodsOptnInnb_normal')
|
|
localStorage.removeItem('delGoodsOptnInnb_invntry')
|
|
localStorage.removeItem('delGoodsOptnInnb_input')
|
|
localStorage.removeItem('delGoodsOptnInnb_added')
|
|
|
|
updateAjaxInfo("상품 옵션", url, formData, '04')
|
|
|
|
})
|
|
|
|
|
|
|
|
//상품 이미지 수정
|
|
$(document).on('click', '#btn_update_img', function (event) {
|
|
event.preventDefault()
|
|
if($('#hiddenForm_img') != null) {
|
|
$('#hiddenForm_img').remove();
|
|
}
|
|
|
|
const url = '<c:url value="/mngr/goods/goodsmngr/updateGoodsDtlImg"/>';
|
|
const hiddenForm = document.createElement('form');
|
|
hiddenForm.name = 'hiddenForm_img';
|
|
hiddenForm.id = 'hiddenForm_img';
|
|
hiddenForm.method = 'post';
|
|
hiddenForm.action = '';
|
|
|
|
|
|
const formData = new FormData();
|
|
|
|
//삭제 이미지 정보
|
|
let deleteImgId = $('#hiddenForm_del_img').find('input[name="deleteImgId"]');
|
|
let cutNb = $('#hiddenForm_del_img').find('input[name="cutNb"]');
|
|
deleteImgId.each(function (idx) {
|
|
fn_create_input('hidden', 'delGoodsImageVOList['+idx+'].delGoodsImgInnb', deleteImgId.eq(idx).val(), hiddenForm)
|
|
fn_create_input('hidden', 'delGoodsImageVOList['+idx+'].cutNb', cutNb.eq(idx).val(), hiddenForm)
|
|
fn_create_input('hidden', 'delGoodsImageVOList['+idx+'].goodsInnb', parseInt($('#goodsInnb').val()) , hiddenForm)
|
|
fn_create_input('hidden', 'delGoodsImageVOList['+idx+'].sopmalCd', $('#sopmalCd').val(), hiddenForm)
|
|
})
|
|
fn_create_input('hidden', 'goodsInnb', parseInt($('#goodsInnb').val()) , hiddenForm)
|
|
fn_create_input('hidden', 'sopmalCd', $('#sopmalCd').val(), hiddenForm)
|
|
|
|
|
|
//추가한 이미지 정보
|
|
// 파일데이터 , 이미지 append
|
|
var myDropzone = Dropzone.forElement("#my-dropzone");
|
|
|
|
let fileAt = 'N';
|
|
myDropzone.files.forEach(function (file) {
|
|
if(!fn_is_empty(file)){
|
|
fileAt='Y'
|
|
}
|
|
});
|
|
|
|
//등록된 사진이 없거나 이미지삭제가 아닌경우
|
|
if(fn_is_empty($('#hiddenForm_del_img')) && fn_is_empty($('#sortable div.file-preview__container')) && fileAt==='N'){
|
|
alert('상품이미지를 등록해주세요');
|
|
return false;
|
|
}
|
|
|
|
if(fileAt==='Y'){
|
|
myDropzone.files.forEach(function (file) {
|
|
formData.append('files', file); // 서버에서 파일을 받을 때 'files'라는 이름으로 전송
|
|
});
|
|
}
|
|
|
|
//등록된 이미지
|
|
$('#sortable div.file-preview__container').each(function (idx) {
|
|
|
|
fn_create_input('hidden', 'goodsImageVOList['+idx+'].goodsImgInnb', $(this).find('input[name="goodsImgInnb"]').val(), hiddenForm)
|
|
fn_create_input('hidden', 'goodsImageVOList['+idx+'].cutNb', $(this).find('input[name="cutNb"]').val(), hiddenForm)
|
|
})
|
|
|
|
|
|
document.body.appendChild(hiddenForm);
|
|
|
|
$('#hiddenForm_img').serializeArray().forEach(function (item) {
|
|
formData.append(item.name, item.value);
|
|
});
|
|
|
|
|
|
updateAjaxInfo("상품 이미지", url, formData,'06')
|
|
})
|
|
|
|
|
|
//상품 기타정보 수정
|
|
$(document).on('click', '[name="btn_update_EtcInfo"]', function (event) {
|
|
event.preventDefault()
|
|
if($('#hiddenForm_etcInfo') != null) {
|
|
$('#hiddenForm_etcInfo').remove();
|
|
}
|
|
|
|
const url = '<c:url value="/mngr/goods/goodsmngr/updateGoodsDtlEtcInfo"/>';
|
|
const hiddenForm = document.createElement('form');
|
|
hiddenForm.name = 'hiddenForm_etcInfo';
|
|
hiddenForm.id = 'hiddenForm_etcInfo';
|
|
hiddenForm.method = 'post';
|
|
hiddenForm.action = '';
|
|
|
|
|
|
const formData = new FormData();
|
|
|
|
//PC 상세설명
|
|
//상세 설명 > 상품 설명 get_editor_data
|
|
let goodsDc = fn_get_editor_data('#goodsDc');
|
|
$('#goodsDc').val(goodsDc);
|
|
|
|
if(fn_is_empty($('#goodsDc').val())){
|
|
alert('상품 설명을 입력해주세요')
|
|
return;
|
|
}
|
|
|
|
|
|
fn_create_input('hidden', 'goodsDc',$('#goodsDc').val(), hiddenForm)
|
|
|
|
//PC 모바일 상세설명 동일여부
|
|
const mblGoodsDcPcSameAt = $('input[name="mblGoodsDcPcSameAt"]:checked').val()
|
|
fn_create_input('hidden', 'mblGoodsDcPcSameAt',mblGoodsDcPcSameAt, hiddenForm)
|
|
|
|
//모바일 상세설명
|
|
let mblGoodsDc = fn_get_editor_data('#mblGoodsDc');
|
|
$('#mblGoodsDc').val(mblGoodsDc);
|
|
|
|
const mobileDtlInfoAt = $('#r-32');
|
|
if(mobileDtlInfoAt.prop('checked') && fn_is_empty($('#mblGoodsDc').val()) ){
|
|
mobileDtlInfoAt.focus()
|
|
alert('모바일용 상세 설명을 입력해 주세요')
|
|
return false;
|
|
}
|
|
|
|
if($(this).hasClass('cmnuseInfo')){
|
|
const cmnuseInfoInnb = $('div.cmnuseInfoInnb')
|
|
const cmnuseInfoInnbSelect = $('#cmnuseInfoInnb option:selected')
|
|
if(fn_is_empty(cmnuseInfoInnbSelect.val())){
|
|
cmnuseInfoInnb.focus()
|
|
alert('배송/반품정보를 선택해 주세요')
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
// 배송일 선택여부
|
|
if($(this).hasClass('dlvyGroup')){
|
|
const dlvyGroupInnb = $('div.dlvyGroupInnb')
|
|
const dlvyGroupInnbSelect = $('#dlvyGroupInnb option:selected')
|
|
if(fn_is_empty(dlvyGroupInnbSelect.val())){
|
|
dlvyGroupInnb.focus()
|
|
alert('배송일을 선택해 주세요')
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
fn_create_input('hidden', 'mblGoodsDc',$('#mblGoodsDc').val(), hiddenForm)
|
|
|
|
//배송/반품정보
|
|
fn_create_input('hidden', 'cmnuseInfoInnb',$('#cmnuseInfoInnb option:selected').val(), hiddenForm)
|
|
|
|
//배송그룹
|
|
fn_create_input('hidden', 'dlvyGroupInnb',$('#dlvyGroupInnb option:selected').val(), hiddenForm)
|
|
|
|
//배송안내문구
|
|
fn_create_input('hidden', 'dlvyGuidanceWordsCn',$('#dlvyGuidanceWordsCn').val(), hiddenForm)
|
|
|
|
//입점마케팅 - 네이버연동여부
|
|
formData.append('naverEpIntrlckAt', $('#naverEpIntrlckAt').prop('checked')?$('#naverEpIntrlckAt').val():'N')
|
|
//입점마케팅 - 구글연동여부
|
|
formData.append('googleEpIntrlckAt', $('#googleEpIntrlckAt').prop('checked')?$('#googleEpIntrlckAt').val():'N')
|
|
//입점마케팅 - 메타연동여부
|
|
formData.append('metaEpIntrlckAt', $('#metaEpIntrlckAt').prop('checked')?$('#metaEpIntrlckAt').val():'N')
|
|
//입점마케팅 - 모비온연동여부
|
|
formData.append('mobionEpIntrlckAt', $('#mobionEpIntrlckAt').prop('checked')?$('#mobionEpIntrlckAt').val():'N')
|
|
|
|
fn_create_input('hidden', 'goodsInnb', $('#goodsInnb').val() , hiddenForm)
|
|
fn_create_input('hidden', 'sopmalCd', $('#sopmalCd').val(), hiddenForm)
|
|
|
|
document.body.appendChild(hiddenForm);
|
|
|
|
$('#hiddenForm_etcInfo').serializeArray().forEach(function (item) {
|
|
formData.append(item.name, item.value);
|
|
});
|
|
|
|
const targetId = $(this).attr('id');
|
|
let targetGubun = '';
|
|
let sectionNo = '';
|
|
switch(targetId){
|
|
case 'pcGoodsDc_update': targetGubun = '상세 설명'; sectionNo = '07';
|
|
break;
|
|
case 'mblGoodsDc_update': targetGubun = '모바일용 상세 설명'; sectionNo = '08';
|
|
break;
|
|
case 'cmnuseInfoInnb_update': targetGubun = '배송/반품정보'; sectionNo = '09';
|
|
break;
|
|
case 'dlvyGroupInnb_update': targetGubun = '배송'; sectionNo = '10';
|
|
break;
|
|
case 'nshopngIntrlckAt_update': targetGubun = '입점마케팅'; sectionNo = '11';
|
|
break;
|
|
default:
|
|
targetGubun ='기타 정보';
|
|
sectionNo = '01';
|
|
break;
|
|
|
|
}
|
|
|
|
updateAjaxInfo(targetGubun, url, formData, sectionNo)
|
|
|
|
})
|
|
|
|
|
|
|
|
//관련상품 수정
|
|
$(document).on('click','#btn_update_relateGoods', function (event) {
|
|
event.preventDefault()
|
|
|
|
|
|
if($('#hiddenForm_relateGoods') != null) {
|
|
$('#hiddenForm_relateGoods').remove();
|
|
}
|
|
|
|
const url = '<c:url value="/mngr/goods/goodsmngr/updateGoodsDtlRelateGoods"/>';
|
|
const hiddenForm = document.createElement('form');
|
|
hiddenForm.name = 'hiddenForm_relateGoods';
|
|
hiddenForm.id = 'hiddenForm_relateGoods';
|
|
hiddenForm.method = 'post';
|
|
hiddenForm.action = '';
|
|
|
|
|
|
const formData = new FormData();
|
|
|
|
$('[name="relatedGoodsId"]').each(function (idx) {
|
|
fn_create_input('hidden', 'goodsRelateVOList['+idx+'].relateSleGoodsInnb',$('input[name="relatedGoodsId"]').eq(idx).val(), hiddenForm)
|
|
fn_create_input('hidden', 'goodsRelateVOList['+idx+'].goodsInnb', parseInt($('#goodsInnb').val()) , hiddenForm)
|
|
fn_create_input('hidden', 'goodsRelateVOList['+idx+'].sopmalCd', $('#sopmalCd').val(), hiddenForm)
|
|
})
|
|
|
|
//전체 관련상품 조회용
|
|
fn_create_input('hidden', 'goodsInnb', parseInt($('#goodsInnb').val()) , hiddenForm)
|
|
fn_create_input('hidden', 'sopmalCd', $('#sopmalCd').val(), hiddenForm)
|
|
|
|
|
|
document.body.appendChild(hiddenForm);
|
|
|
|
$('#hiddenForm_relateGoods').serializeArray().forEach(function (item) {
|
|
formData.append(item.name, item.value);
|
|
});
|
|
|
|
|
|
|
|
updateAjaxInfo('함께하면 좋은 상품', url, formData)
|
|
|
|
})
|
|
|
|
|
|
//상품 개별 수정 ajax
|
|
const updateAjaxInfo = (gubun, url, formData, sectionNo) =>{
|
|
if (confirm(gubun+`을(를) <spring:message code="confirm.common.update"/>`)) {
|
|
trimInputValue();
|
|
$.ajax({
|
|
type: 'post',
|
|
enctype: 'multipart/form-data',
|
|
url: url,
|
|
data: formData,
|
|
contentType: false,
|
|
processData: false,
|
|
success: function (data) {
|
|
let str = JSON.parse(data.resBody.result);
|
|
if (str.result === 'success') {
|
|
alert('<spring:message code="success.common.update"/>');
|
|
//등록 후 수정화면으로 이동
|
|
|
|
|
|
if(gubun ==="구매대상자제한정보") {
|
|
//구매대상자제한여부일 경우 모달 닫기
|
|
fn_close_modal2('purchase-limit');
|
|
}
|
|
|
|
window.location.reload();
|
|
|
|
//수정한 section영역으로 이동
|
|
$('a[href="#section'+sectionNo+'"]').click();
|
|
|
|
} else {
|
|
alert('<spring:message code="fail.common.update"/>');
|
|
}
|
|
|
|
}
|
|
});
|
|
}else{
|
|
if(gubun==='구매대상자제한정보'){
|
|
fn_close_modal2('purchase-limit');
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
//판매중지 문구 변경 여부
|
|
$(document).on('click', '#selStpgeCustomWordsAt', function () {
|
|
const goodsSttus = $('input[name="goodsSttusCd"]:checked').val()
|
|
if(goodsSttus !== '03'){
|
|
return false;
|
|
}
|
|
|
|
if(this.checked){
|
|
$('#selStpgeCustomWords').prop('disabled', false)
|
|
}else{
|
|
$('#selStpgeCustomWords').prop('disabled', true)
|
|
}
|
|
|
|
});
|
|
|
|
/*판매상태 변경에 따른 판매 중지 문구 활성화 여부*/
|
|
$(document).on('change', 'input[name="goodsSttusCd"]', function () {
|
|
const goodsSttus = $(this).val()
|
|
|
|
if(goodsSttus !== '03'){
|
|
$('#selStpgeCustomWordsAt').prop('checked', false)
|
|
$('#selStpgeCustomWords').prop('disabled', true)
|
|
}
|
|
});
|
|
|
|
</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">
|
|
<a href="javascript:void(0);" onclick="fn_move_goods_dtl_common(<c:out value="${resultMap.goodsDtl.goodsInnb}"/>, 'sopmal')">
|
|
상품 수정 (상품번호 : ${resultMap.goodsDtl.goodsInnb})</a>
|
|
</h2>
|
|
<div class="page-title__btn-container">
|
|
<button onclick="fn_select_list()" class="btn outline"><spring:message
|
|
code="button.list"/></button>
|
|
<%-- <button class="btn primary" onclick="fn_update();"><spring:message code="button.save"/></button>--%>
|
|
</div>
|
|
</div>
|
|
<div class="content-tab content-tab__fixed">
|
|
<a href="#section01" class="content-tab__scroll-btn">카테고리</a>
|
|
<a href="#section02" class="content-tab__scroll-btn">기본정보</a>
|
|
<a href="#section03" class="content-tab__scroll-btn">판매정보</a>
|
|
<a href="#section04" class="content-tab__scroll-btn">옵션</a>
|
|
<a href="#section06" class="content-tab__scroll-btn">상품 사진</a>
|
|
<a href="#section07" class="content-tab__scroll-btn">상세 설명</a>
|
|
<a href="#section08" class="content-tab__scroll-btn">모바일용 <br/> 상세 설명</a>
|
|
<a href="#section09" class="content-tab__scroll-btn">배송/반품정보</a>
|
|
<a href="#section10" class="content-tab__scroll-btn">배송</a>
|
|
<a href="#section11" class="content-tab__scroll-btn">입점 마케팅</a>
|
|
<a href="#section13" class="content-tab__scroll-btn">함께하면 <br/> 좋은 상품</a>
|
|
</div>
|
|
|
|
<form id="listForm" method="post" action="" enctype="multipart/form-data">
|
|
<input type="hidden" id="goodsKndCd" name="goodsKndCd" value="01">
|
|
<input type="hidden" id="goodsInnb" name="goodsInnb" value="${resultMap.goodsDtl.goodsInnb}">
|
|
<input type="hidden" id="goodsExpsrTyCd" name="goodsExpsrTyCd" value="${resultMap.goodsDtl.goodsExpsrTyCd}">
|
|
<input type="hidden" id="invntryPolicyCdAsIs" value="${resultMap.goodsDtl.invntryPolicyCd}"/>
|
|
<input type="hidden" id="invntryAt_normal" value="${resultMap.normalOptnList.invntryAt}"/>
|
|
<input type="hidden" id="invntryAt_invntry" value="${resultMap.invntryOptnList.invntryAt}"/>
|
|
<input type="hidden" id="invntryAt_added" value="${resultMap.addedOptnList.invntryAt}"/>
|
|
<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"/>
|
|
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
|
<spring:eval expression="@environment.getProperty('currency-unit.default')" var="curUnit"/>
|
|
<input type="hidden" id="cdnurl" value="${cdnurl}"/>
|
|
<section id="section01" class="content-section content-scroll-detect content-fold">
|
|
<div class="content-fold__header">
|
|
<h3 class="content-section__title">카테고리</h3>
|
|
<button class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
|
<button type="button" class="btn primary btn-light" id="btn_update_category">카테고리 수정</button>
|
|
</div>
|
|
<div class="content-fold__content">
|
|
<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="table-wrapper">
|
|
<table class="table vertical">
|
|
<caption>카테고리</caption>
|
|
<colgroup>
|
|
<col style="width: 25%;">
|
|
<col style="width: 25%;">
|
|
<col style="width: 25%;">
|
|
<col style="width: 25%;">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th>1차 카테고리</th>
|
|
<th>2차 카테고리</th>
|
|
<th>3차 카테고리</th>
|
|
<th>4차 카테고리</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<select class="category-select" multiple id="ctgryDepth1" title="1차 카테고리">
|
|
<c:forEach items="${resultMap.goodsCategoryList}" var="goodsCategory" varStatus="status">
|
|
<option value="${goodsCategory.ctgryId}">${goodsCategory.ctgryNm}</option>
|
|
</c:forEach>
|
|
</select>
|
|
</td>
|
|
<td>
|
|
<select class="category-select" multiple id="ctgryDepth2" title="2차 카테고리"> </select>
|
|
</td>
|
|
<td>
|
|
<select class="category-select" multiple id="ctgryDepth3" title="3차 카테고리"></select>
|
|
</td>
|
|
<td>
|
|
<select class="category-select" multiple id="ctgryDepth4" title="4차 카테고리"></select>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="form-control-container mt-10">
|
|
<div class="left"></div>
|
|
<div class="center">
|
|
<button class="btn primary" id="selectCategoriesBtn">선택</button>
|
|
</div>
|
|
<div class="right">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>선택한 카테고리</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<div class="table-wrapper">
|
|
<table class="table vertical" id="selectedCategoriesTable">
|
|
<caption>선택한 카테고리</caption>
|
|
<colgroup>
|
|
<col style="width: 100px;">
|
|
<col style="width: auto;">
|
|
<col style="width: 200px;">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th>대표</th>
|
|
<th>카테고리</th>
|
|
<th>삭제</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<!-- 선택한 카테고리들이 여기에 추가됩니다 -->
|
|
<c:forEach var="selectCtgry" items="${resultMap.goodsCtgryList}" varStatus="selectCtgryIndex">
|
|
<tr>
|
|
<td>
|
|
<div class ="custom-radio no-text">
|
|
<input type="radio" id="r-${selectCtgryIndex.index}" name="reprsntCtgryAt" <c:if test="${selectCtgry.reprsntCtgryAt eq 'Y'}"> value = "1" checked="checked"</c:if> />
|
|
<label for="r-${selectCtgryIndex.index}"></label>
|
|
</div>
|
|
</td>
|
|
<td data-value="${selectCtgry.ctgryId}" style="text-align: left;" ><c:out value="${selectCtgry.fullPath}" /> </td>
|
|
<td>
|
|
<button class="circle-btn delete"><span class="visually-hidden">삭제</span></button>
|
|
</td>
|
|
</tr>
|
|
</c:forEach>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section id="section02" class="content-section content-scroll-detect content-fold">
|
|
<div class="content-fold__header">
|
|
<h3 class="content-section__title">기본정보</h3>
|
|
<button class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
|
<button class="btn primary btn-light" id="btn_update_BscInfo">기본정보 수정</button>
|
|
</div>
|
|
<div class="content-fold__content">
|
|
<div class="table-wrapper">
|
|
<table class="table">
|
|
<caption>기본정보</caption>
|
|
<colgroup>
|
|
<col style="width: 12%;">
|
|
<col style="width: 38%">
|
|
<col style="width: 12%;">
|
|
<col style="width: 38%">
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<th>상품명<span class="red-7">*</span></th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<input class="input-text full input-trim" type="text" title="상품명" id="goodsNm" name="goodsNm" maxlength="35" value="${resultMap.goodsDtl.goodsNm}">
|
|
<input type="hidden" id="sopmalCd" name="sopmalCd" value="${resultMap.BOGoodsVO.sopmalCd}"/>
|
|
</div>
|
|
</td>
|
|
<th>상품명(영문)<span class="red-7">*</span></th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<input class="input-text full input-trim" type="text" title="상품명(영문)" id="goodsNmEn" name="goodsNmEn" maxlength="35" value="${resultMap.goodsDtl.goodsNmEn}">
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>대표설명</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<input class="input-text full input-trim" type="text" title="대표설명" id="reprsntDc" name="reprsntDc" value="${resultMap.goodsDtl.reprsntDc}" >
|
|
</div>
|
|
</td>
|
|
<th>간략설명</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<input class="input-text full input-trim" type="text" title="간략설명" id="srtDc" name="srtDc" value="${resultMap.goodsDtl.srtDc}">
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>검색어</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<input class="input-text full input-trim" type="text" title="검색어" id="kwrd" name="kwrd" value="${resultMap.goodsDtl.kwrd}">
|
|
</div>
|
|
</td>
|
|
<th>브랜드</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<div class="select-box">
|
|
<div class="select-box">
|
|
<select title="브랜드" id="brandCd" name="brandCd">
|
|
<option value="">선택</option>
|
|
<c:forEach var="brandList"
|
|
items="${ resultMap.brandList }" varStatus="">
|
|
<option value="${ brandList.cd }" <c:if test = "${brandList.cd eq resultMap.goodsDtl.brandCd}">selected</c:if> >${ brandList.cdNm }</option>
|
|
</c:forEach>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>리뷰 연동</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<input class="input-text full input-trim" type="text" title="리뷰 연동" id="rvwGroupNb" name="rvwGroupNb" value="${resultMap.goodsDtl.rvwGroupNb}">
|
|
</div>
|
|
</td>
|
|
<th>리뷰 작성 가능 여부</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<div class="custom-radio-container">
|
|
<div class="custom-radio">
|
|
<input type="radio" id="rvwWritngPosblAtY" name="rvwWritngPosblAt" value="Y" <c:if test="${ resultMap.goodsDtl.rvwWritngPosblAt eq 'Y'}">checked</c:if>>
|
|
<label for="rvwWritngPosblAtY">허용</label>
|
|
</div>
|
|
<div class="custom-radio">
|
|
<input type="radio" id="rvwWritngPosblAtN" name="rvwWritngPosblAt" value="N" <c:if test="${ resultMap.goodsDtl.rvwWritngPosblAt eq 'N'}">checked</c:if>>
|
|
<label for="rvwWritngPosblAtN">허용안함</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>한달 리뷰 작성 가능 여부</th>
|
|
<td colspan="3">
|
|
<div class="td-inner">
|
|
<div class="custom-radio-container">
|
|
<div class="custom-radio">
|
|
<input type="radio" id="r-mtRvwWritngPosblAtY" name="mtRvwWritngPosblAt" value="Y" <c:if test="${ resultMap.goodsDtl.mtRvwWritngPosblAt eq 'Y'}">checked</c:if>>
|
|
<label for="r-mtRvwWritngPosblAtY">허용</label>
|
|
</div>
|
|
<div class="custom-radio">
|
|
<input type="radio" id="r-mtRvwWritngPosblAtN" name="mtRvwWritngPosblAt" value="N" <c:if test="${ resultMap.goodsDtl.mtRvwWritngPosblAt eq 'N'}">checked</c:if>>
|
|
<label for="r-mtRvwWritngPosblAtN">허용안함</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>추가정보</th>
|
|
<td colspan="3">
|
|
<div class="td-inner">
|
|
<div class="table-wrapper">
|
|
<table class="table vertical" id="goodsAddition-row-add">
|
|
<caption>추가정보</caption>
|
|
<colgroup>
|
|
<col style="width: 320px;">
|
|
<col style="width: auto;">
|
|
<col style="width: 200px;">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th>추가 정보명</th>
|
|
<th>내용</th>
|
|
<th>
|
|
<button class="circle-btn add" onclick="fn_add_box('goodsAddition'); return false;"><span class="visually-hidden">추가</span></button>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="goodsAddition">
|
|
<c:choose>
|
|
<c:when test="${ not empty resultMap.goodsAdditionList }">
|
|
<c:forEach items="${ resultMap.goodsAdditionList }" var="goodsAdditionList" varStatus="status">
|
|
<tr>
|
|
<td><input class="input-text full" type="text" id="infoSj-${status.index}" name="infoSj" value="${goodsAdditionList.infoSj}">
|
|
<input class="input-text full" type="hidden" id="goodsAditInfoInnb-${status.index}" name="goodsAditInfoInnb" value="${goodsAdditionList.goodsAditInfoInnb}">
|
|
<input class="input-text full" type="hidden" id="goodsAditInfoUseAt-${status.index}" name="goodsAditInfoUseAt" value="${goodsAdditionList.useAt}">
|
|
</td>
|
|
<td><input class="input-text full" type="text" id="infoCn-${status.index}" name="infoCn" value="${goodsAdditionList.infoCn}"></td>
|
|
<td><button class="circle-btn delete" onclick="fn_remove_row(this); return false;">
|
|
<span class="visually-hidden">삭제</span></button></td>
|
|
</tr>
|
|
</c:forEach>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<tr id="goodsAdditionNoData">
|
|
<td colspan="100%">추가 항목이 없습니다.</td>
|
|
</tr>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>아이콘</th>
|
|
<td colspan="3">
|
|
<div class="td-inner">
|
|
<div class="b-checkbox-container">
|
|
|
|
<c:forEach var="iconList" items="${resultMap.iconList}">
|
|
<c:set var="isChecked" value=""/>
|
|
<label class="b-checkbox checkbox">
|
|
<c:forTokens var="iconNm" items="${resultMap.goodsDtl.goodsIconCd}" delims=",">
|
|
<c:if test="${iconNm eq iconList.cd}">
|
|
<c:set var="isChecked" value="checked" />
|
|
</c:if>
|
|
</c:forTokens >
|
|
<input type="checkbox" value="${iconList.cd}" name="iconCd" ${isChecked}/>
|
|
<span class="check"></span>
|
|
<span class="control-label">
|
|
<span class="product-badge ${fn:toLowerCase(iconList.cd)}" style="color: ${iconList.fontColor} !important; background-color: ${iconList.bgColor} !important; border-color: ${iconList.borderColor} !important;">${iconList.cdNm}</span>
|
|
</span>
|
|
</label>
|
|
|
|
</c:forEach>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section id="section03" class="content-section content-scroll-detect content-fold">
|
|
<div class="content-fold__header">
|
|
<h3 class="content-section__title">판매정보</h3>
|
|
<button type="button" class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
|
<button type="button" class="btn primary btn-light" id="btn_update_SelInfo">판매정보 수정</button>
|
|
</div>
|
|
<div class="content-fold__content">
|
|
<div class="table-wrapper">
|
|
<table class="table">
|
|
<caption>판매정보</caption>
|
|
<colgroup>
|
|
<col style="width: 12%;">
|
|
<col>
|
|
<col style="width: 12%;">
|
|
<col>
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<th>판매 상태</th>
|
|
<td colspan="2">
|
|
<div class="td-inner">
|
|
<div class="custom-radio-container">
|
|
<c:forEach items="${resultMap.goodsDftinfoSttusList}" var="goodsDftinfoSttus" varStatus="status">
|
|
<div class="custom-radio">
|
|
<input type="radio" id="${goodsDftinfoSttus.cd}"
|
|
name="goodsSttusCd"
|
|
value="${goodsDftinfoSttus.cd}"
|
|
<c:if test="${resultMap.goodsDtl.goodsSttusCd eq goodsDftinfoSttus.cd}">checked</c:if> >
|
|
<label for="${goodsDftinfoSttus.cd}">${goodsDftinfoSttus.cdNm}</label>
|
|
</div>
|
|
<c:if test="${status.first}">
|
|
<span class="parentheses">(</span>
|
|
<div class="b-checkbox-container inner">
|
|
<label class="b-checkbox checkbox">
|
|
<input type="checkbox" id="goodsExpsrTy02" name="goodsExpsrTy02" onclick="updateHiddenField(this)"
|
|
<c:if test="${resultMap.goodsDtl.goodsExpsrTyCd eq '02'}">checked</c:if>>
|
|
<span class="check"></span>
|
|
<span class="control-label">예약 판매 사용</span>
|
|
</label>
|
|
</div>
|
|
<span class="parentheses">)</span>
|
|
</c:if>
|
|
<c:if test="${status.last}">
|
|
<span class="parentheses">(</span>
|
|
<div class="b-checkbox-container inner">
|
|
<label class="b-checkbox checkbox">
|
|
<input type="checkbox" id="selStpgeCustomWordsAt" name="selStpgeCustomWordsAt" value="Y"
|
|
<c:if test="${resultMap.goodsDtl.selStpgeCustomWordsAt eq 'Y'}">checked</c:if>
|
|
>
|
|
<span class="check"></span>
|
|
<span class="control-label">사용자페이지 판매중지 문구 변경 -> </span>
|
|
</label>
|
|
</div>
|
|
<label for="selStpgeCustomWords"></label><input type="text" class="input-text input-trim" id="selStpgeCustomWords" name="selStpgeCustomWords" value="${resultMap.goodsDtl.selStpgeCustomWords}"
|
|
<c:if test="${resultMap.goodsDtl.selStpgeCustomWordsAt ne 'Y'}"> disabled </c:if>
|
|
/>
|
|
<span class="parentheses">) </span>
|
|
</c:if>
|
|
</c:forEach>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="resveGoods">
|
|
<th>예약 판매 설정</th>
|
|
<td colspan="3">
|
|
<div class="td-inner">
|
|
<div class="table-wrapper">
|
|
<table class="table">
|
|
<caption>예약 판매 설정</caption>
|
|
<colgroup>
|
|
<col style="width: 16%;">
|
|
<col>
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<th>예약 상품 배송일자</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<input type="text" id="datepicker_3"
|
|
class="datepicker" title="시작 날짜 선택"
|
|
autocomplete="off" name="resveGoodsDlvyDe" value="${resultMap.goodsDtl.resveGoodsDlvyDe}"
|
|
>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>예약 상품 안내문구</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<input class="input-text xl input-trim" type="text"
|
|
id="resveGoodsGuidanceWordsCn"
|
|
name="resveGoodsGuidanceWordsCn"
|
|
value="${resultMap.goodsDtl.resveGoodsGuidanceWordsCn}"
|
|
title="예약 상품 안내문구">
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>노출 여부</th>
|
|
<td colspan="3">
|
|
<div class="td-inner vertical">
|
|
<div class="custom-radio-container mt-10">
|
|
<c:forEach items="${resultMap.expsrCdList}" var="expsrCdList" varStatus="status">
|
|
<div class="custom-radio">
|
|
<input type="radio"
|
|
id="expsrCdList${status.count}"
|
|
name="expsrDvCd"
|
|
value="${expsrCdList.cd}"
|
|
<c:if test="${resultMap.goodsDtl.expsrDvCd eq expsrCdList.cd}">checked</c:if>
|
|
<c:if test="${status.first}">checked="checked"</c:if>
|
|
onclick="handleRadioClick2(this)">
|
|
<label for="expsrCdList${status.count}">${expsrCdList.cdNm}</label>
|
|
<input type="hidden" value="${resultMap.goodsDtl.expsrDvCd}" id="expsrDvCdChk"/>
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
<div class="table-wrapper mt-10">
|
|
<table class="table">
|
|
<caption>노출 여부</caption>
|
|
<colgroup>
|
|
<col style="width: 16%;">
|
|
<col>
|
|
</colgroup>
|
|
<tbody id="expsrSet">
|
|
<tr>
|
|
<th>노출 기간</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<input type="text" id="datepicker_1"
|
|
class="datepicker" title="시작 날짜 선택"
|
|
autocomplete="off" value="${fn:split(resultMap.goodsDtl.expsrBgnDt,'T')[0]}" disabled>
|
|
<div class="timepicker-container">
|
|
<input type="text" class="bs-timepicker" id="expsrBgnDt_time"
|
|
title="시간 설정" value="${fn:split(fn:split(resultMap.goodsDtl.expsrBgnDt,'T')[1], ':')[0]}:${fn:split(fn:split(resultMap.goodsDtl.expsrBgnDt,'T')[1], ':')[1]}" disabled>
|
|
</div>
|
|
<span class="tilde">~</span>
|
|
<input type="text" id="datepicker_2"
|
|
class="datepicker" title="시작 날짜 선택"
|
|
autocomplete="off" value="${fn:split(resultMap.goodsDtl.expsrEndDt,'T')[0]}" disabled>
|
|
<div class="timepicker-container">
|
|
<input type="text" class="bs-timepicker" id="expsrEndDt_time"
|
|
title="시간 설정" value="${fn:split(fn:split(resultMap.goodsDtl.expsrEndDt,'T')[1], ':')[0]}:${fn:split(fn:split(resultMap.goodsDtl.expsrEndDt,'T')[1], ':')[1]}" disabled>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>노출 문구</th>
|
|
<td>
|
|
<input class="input-text xl input-trim" type="text"
|
|
title="노출 문구" id="expsrSetupFwords"
|
|
name="expsrSetupFwords"
|
|
<c:choose>
|
|
<c:when test ="${not empty resultMap.goodsDtl.expsrSetupFwords}">value="${resultMap.goodsDtl.expsrSetupFwords}"</c:when>
|
|
<c:otherwise>
|
|
value="" disabled
|
|
</c:otherwise>
|
|
</c:choose>
|
|
>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>재고에 따른 판매</th>
|
|
<td colspan="3">
|
|
<div class="td-inner">
|
|
<div class="custom-radio-container">
|
|
<c:forEach items="${resultMap.goodsDftinfoInvntryPolicyList}"
|
|
var="goodsDftinfoInvntryPolicy" varStatus="status">
|
|
<div class="custom-radio">
|
|
<input type="radio"
|
|
id="goodsDftinfoInvntryPolicy${status.count}"
|
|
name="invntryPolicyCd"
|
|
value="${goodsDftinfoInvntryPolicy.cd}"
|
|
<c:if test="${resultMap.goodsDtl.invntryPolicyCd eq goodsDftinfoInvntryPolicy.cd}">checked</c:if>
|
|
<c:if test="${status.first}">checked="checked"</c:if>
|
|
onclick="handleRadioClickDisable(this)">
|
|
<label for="goodsDftinfoInvntryPolicy${status.count}">${goodsDftinfoInvntryPolicy.cdNm}</label>
|
|
</div>
|
|
<c:if test="${status.first}">
|
|
<div>
|
|
<span class="ml-4">(</span>
|
|
<input class="input-text number xsm ml-5 right"
|
|
id="avlinvLmttQy" name="avlinvLmttQy" value="${resultMap.goodsDtl.avlinvLmttQy}" type="text" title="해당 인풋에 대한 설명" <c:if test="${resultMap.goodsDtl.invntryPolicyCd eq '02'}"> disabled</c:if> />
|
|
개 이하 일 때 품절 처리
|
|
<span class="ml-4">)</span>
|
|
</div>
|
|
</c:if>
|
|
</c:forEach>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>실시간수량배너 노출여부</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<div class="custom-radio-container">
|
|
<div class="custom-radio">
|
|
<input type="radio" id="rltmQyBannerExpsrAtY" name="rltmQyBannerExpsrAt" value="Y" <c:if test="${resultMap.goodsDtl.rltmQyBannerExpsrAt eq'Y'}">checked ="checked"</c:if> >
|
|
<label for="rltmQyBannerExpsrAtY">노출</label>
|
|
</div>
|
|
<div class="custom-radio">
|
|
<input type="radio" id="rltmQyBannerExpsrAtN" name="rltmQyBannerExpsrAt" value="N" <c:if test="${resultMap.goodsDtl.rltmQyBannerExpsrAt eq'N'}">checked ="checked"</c:if> >
|
|
<label for="rltmQyBannerExpsrAtN">미노출</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rltmSetting">
|
|
<th>실시간수량배너 설정</th>
|
|
<td colspan="3">
|
|
<div class="td-inner p-10">
|
|
<div class="custom-radio-container">
|
|
<c:forEach var="rltmQyBannerDvCd" items="${resultMap.rltmQyBannerDvList}" varStatus="rltmQyStatus">
|
|
<div class="custom-radio">
|
|
<input type="radio" id="rltmQyBannerDvCd-${rltmQyBannerDvCd.cd}" name="rltmQyBannerDvCd" value="${rltmQyBannerDvCd.cd}" <c:if test="${resultMap.goodsDtl.rltmQyBannerDvCd eq rltmQyBannerDvCd.cd }">checked="checked"</c:if> >
|
|
<label for="rltmQyBannerDvCd-${rltmQyBannerDvCd.cd}">${rltmQyBannerDvCd.cdNm}</label>
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
</div>
|
|
<div class="td_inner p-5">
|
|
<div class="input-container evtRl">
|
|
<input class="input-text sm right number" id="rltmRlQy" value="${resultMap.goodsDtl.rltmRlQy}" type="text" title="이벤트실판매 실시간실재고수량 설정" <c:if test="${resultMap.goodsDtl.rltmQyBannerDvCd ne '02'}">disabled</c:if> >
|
|
<span class="ml-4">개의 수량을 실판매 수량만큼 차감</span>
|
|
</div>
|
|
</div>
|
|
<div class="td_inner p-5">
|
|
<div class="input-container evtVirtl">
|
|
<input class="input-text sm right number" id="rltmVirtlQy" value="${resultMap.goodsDtl.rltmVirtlQy}" type="text" title="이벤트가판매 가재고수량 설정" <c:if test="${resultMap.goodsDtl.rltmQyBannerDvCd ne '03'}">disabled</c:if>>
|
|
<span class="ml-4">개의 수량을</span>
|
|
<input type="text" id="rltmQyDdctStdrDt" value="${fn:split(resultMap.goodsDtl.rltmQyDdctStdrDt,'T')[0]}" class="datepicker" title="이벤트가판매 가수량차감기준일시 설정" autocomplete="off" <c:if test="${resultMap.goodsDtl.rltmQyBannerDvCd ne '03'}">disabled</c:if> >
|
|
<span class="ml-4">부터</span>
|
|
<input type="text" class="input-text sm right number" title="이벤트가판매 가수량차감시간 설정" value="${resultMap.goodsDtl.rltmQyDdctTme}" id="rltmQyDdctTme" <c:if test="${resultMap.goodsDtl.rltmQyBannerDvCd ne '03'}">disabled</c:if> >
|
|
<span class="ml-4">분마다</span>
|
|
<input class="input-text sm right number" id="rltmDdctQy" value="${resultMap.goodsDtl.rltmDdctQy}" type="text" title="이벤트가판매 가수량차감수량 설정" <c:if test="${resultMap.goodsDtl.rltmQyBannerDvCd ne '03'}">disabled</c:if> >
|
|
<span class="ml-4">개씩 차감</span>
|
|
<span class="ml-4">( 최저</span>
|
|
<input class="input-text sm right number" id="rltmDdctLimitQy" value="${resultMap.goodsDtl.rltmDdctLimitQy}" type="text" title="이벤트가판매 가차감제한수량 설정" <c:if test="${resultMap.goodsDtl.rltmQyBannerDvCd ne '03'}">disabled</c:if> >
|
|
<span class="ml-4">개 유지)</span>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>청약철회</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<div class="custom-radio-container">
|
|
<div class="custom-radio">
|
|
<input type="radio" id="r-22" name="subscrptWthdrawPosblAt" value="Y" <c:if test="${ resultMap.goodsDtl.subscrptWthdrawPosblAt eq 'Y'}">checked</c:if>>
|
|
<label for="r-22">가능</label>
|
|
</div>
|
|
<div class="custom-radio">
|
|
<input type="radio" id="r-23" name="subscrptWthdrawPosblAt" value="N" <c:if test="${ resultMap.goodsDtl.subscrptWthdrawPosblAt eq 'N'}">checked</c:if>>
|
|
<label for="r-23">불가
|
|
<span class="stone-8">(취소/교환/반품 불가)</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<th>과세/비과세</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<div class="custom-radio-container">
|
|
<div class="custom-radio">
|
|
<input type="radio" id="r-16" name="taxAt" value="Y" <c:if test="${ resultMap.goodsDtl.taxAt eq 'Y'}">checked</c:if>>
|
|
<label for="r-16">과세</label>
|
|
</div>
|
|
<div class="custom-radio">
|
|
<input type="radio" id="r-17" name="taxAt" value="N" <c:if test="${ resultMap.goodsDtl.taxAt eq 'N'}">checked</c:if>>
|
|
<label for="r-17">비과세</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>구매 대상자 제한</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<div class="custom-radio-container">
|
|
<div class="custom-radio">
|
|
<input type="radio" id="r-18" name="purchsTrgterLmttDvCd" <c:if test="${ resultMap.goodsDtl.purchsTrgterLmttDvCd eq '01'}">checked</c:if> value="01">
|
|
<label for="r-18">제한 없음</label>
|
|
</div>
|
|
<div class="custom-radio">
|
|
<input type="radio" id="r-19" name="purchsTrgterLmttDvCd" <c:if test="${ resultMap.goodsDtl.purchsTrgterLmttDvCd eq '02'}">checked</c:if> value="02">
|
|
<label for="r-19">구매 대상 제한</label>
|
|
</div>
|
|
</div>
|
|
<button type="button" id="purchaseLimmtBtn"
|
|
class="btn xsm gray ml-5" disabled="disabled">설정</button>
|
|
</div>
|
|
</td>
|
|
<th>구매수량</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<div class="custom-radio-container">
|
|
<div class="custom-radio">
|
|
<input type="radio" id="r-20" name="purchsQyLmttDvCd" value="01" <c:if test="${ resultMap.goodsDtl.purchsQyLmttDvCd eq '01'}">checked</c:if>
|
|
onchange="fn_ctrl_disable(['.purchsQy'])">
|
|
<label for="r-20">제한 없음
|
|
</label>
|
|
</div>
|
|
<div class="custom-radio inner-input">
|
|
<input type="radio" id="r-21" name="purchsQyLmttDvCd" value="02" <c:if test="${ resultMap.goodsDtl.purchsQyLmttDvCd eq '02'}">checked</c:if>
|
|
onchange="fn_ctrl_disable('',['.purchsQy'])">
|
|
<label for="r-21">
|
|
</label>
|
|
<div class="purchsQy">
|
|
주문당
|
|
<input class="input-text xsm ml-5 right number"
|
|
id="mummPurchsQy" name="mummPurchsQy" type="text" value="${resultMap.goodsDtl.mummPurchsQy}"
|
|
title="구매수량_최소">
|
|
개 이상
|
|
<input class="input-text xsm ml-5 right number"
|
|
id="mxmmPurchsQy" name="mxmmPurchsQy" type="text" value="${resultMap.goodsDtl.mxmmPurchsQy}"
|
|
title="구매수량_최대">
|
|
개 이하 구매가능
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section id="section04" class="content-section content-scroll-detect content-fold">
|
|
<div class="content-fold__header">
|
|
<h3 class="content-section__title">옵션</h3>
|
|
<button class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
|
<button class="btn primary btn-light" id="btn_update_opt">옵션 수정</button>
|
|
</div>
|
|
<div class="content-fold__content">
|
|
<div class="table-wrapper">
|
|
<table class="table">
|
|
<caption>옵션</caption>
|
|
<colgroup>
|
|
<col style="width: 5%;">
|
|
<col>
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<th>옵션타입</th>
|
|
<td>
|
|
<div class="td-inner vertical">
|
|
<div class="optionApply">
|
|
<div class="optionApply__radioWrap">
|
|
<div class="custom-radio-container radio-tab-trigger" data-radiotab="radio-tab-01">
|
|
<c:set var="isCheckedNormal" value=""/>
|
|
<c:set var="isCheckedNormal" value=""/>
|
|
<c:choose>
|
|
<c:when test="${not empty resultMap.goodsOptionList.invntryOptnList }">
|
|
<c:set var="isCheckedInvntry" value="checked"/>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<c:set var="isCheckedNormal" value="checked"/>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
|
|
<div class="custom-radio">
|
|
<input type="radio" id="r-501" name="r-group501" ${isCheckedNormal}>
|
|
<label for="r-501">일반옵션</label>
|
|
</div>
|
|
<div class="custom-radio">
|
|
<input type="radio" id="r-502" name="r-group501" ${isCheckedInvntry}>
|
|
<label for="r-502">재고옵션</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="radio-tab-content" id="radio-tab-01">
|
|
<div style="overflow-x: auto; overflow-y: hidden;">
|
|
<div class="table-wrapper" style="width: 100%;">
|
|
<table class="table vertical tight draggable" id="normal_option">
|
|
<caption>일반옵션</caption>
|
|
<colgroup>
|
|
<col style="width: 12%;">
|
|
<col style="width: 60px;">
|
|
<col style="width: 60px;">
|
|
<col style="width: auto;">
|
|
<col style="width: 7%;">
|
|
<col style="width: 4%;">
|
|
<col style="width: 4%;">
|
|
<col style="width: 4%;">
|
|
<c:if test="${not empty resultMap.goodsOptionList.normalOptnList}">
|
|
<col style="width: 4%;">
|
|
</c:if>
|
|
<col style="width: 5%;">
|
|
<col style="width: 5%;">
|
|
<col style="width: 12%;">
|
|
<col style="width: 100px;">
|
|
<col style="width: 5%;">
|
|
<col style="width: 60px;">
|
|
<col style="width: 60px;">
|
|
<col style="width: 80px;">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th>옵션명</th>
|
|
<th>노출</th>
|
|
<th>기준</th>
|
|
<th>옵션값</th>
|
|
<th>상품코드</th>
|
|
<th>HS Code</th>
|
|
<th>실무게(KG)</th>
|
|
<th>재고</th>
|
|
<th>가용재고</th>
|
|
<th>소비자가</th>
|
|
<th>판매가</th>
|
|
<th>마일리지</th>
|
|
<th>재고품절시
|
|
<div class="select-box d-inline-block">
|
|
<select class="short" title="재고품절시 노출 상태" id="invntrySldoutExpsrAt_normal" name="invntrySldoutExpsrAt_normal">
|
|
<c:choose>
|
|
<c:when test="${not empty resultMap.goodsOptionList.normalOptnList}">
|
|
<option value="N" <c:if test="${fn:contains(resultMap.goodsOptionList.normalOptnList[0].invntrySldoutExpsrAt, 'N')}"> selected </c:if>>미노출</option>
|
|
<option value="Y" <c:if test="${fn:contains(resultMap.goodsOptionList.normalOptnList[0].invntrySldoutExpsrAt, 'Y')}"> selected </c:if>>노출</option>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<option value="N" selected>미노출</option>
|
|
<option value="Y">노출</option>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</select>
|
|
</div>
|
|
</th>
|
|
<th>설명</th>
|
|
<th>복수<br/>할인<br/>적용</th>
|
|
<th>구간<br/>할인<br/>적용</th>
|
|
<th>관리</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="normal_option_tbody">
|
|
<c:choose>
|
|
<c:when test="${not empty resultMap.goodsOptionList.normalOptnList}">
|
|
<c:forEach var="optnList01" items="${resultMap.goodsOptionList.normalOptnList}" varStatus="optnTy01idx">
|
|
<tr>
|
|
<%--<td>
|
|
<div class="draggable-icon-container">
|
|
<i class="icon icon_draggable"></i>
|
|
<span class="visually-hidden">순서 바꾸기</span>
|
|
</div>
|
|
</td>--%>
|
|
<td>
|
|
<div class="optionApply__inputList">
|
|
<c:forEach var="optnNm011" items="${fn:split(optnList01.optnNm1,'|')}" varStatus="optnNm01_status">
|
|
<c:choose>
|
|
<c:when test="${optnTy01idx.index eq '0'}">
|
|
<div class="optionApply__inputContainer">
|
|
<c:choose>
|
|
<c:when test="${optnNm01_status.index eq '0'}">
|
|
<input class="input-text full input-trim" value="${optnNm011}" type="text" title="일반옵션명" name="optnNm1_normal" id="optnNm1_normal${optnNm01_status.index}">
|
|
<%-- <button type="button" class="btn outline xsm optionDel02">삭제</button>--%>
|
|
<button type="button" class="btn outline xsm optionVal98">옵션값 추가</button>
|
|
<c:forEach var="goodsOptnInnb01" items="${fn:split(optnList01.goodsOptnInnb, '|')}" varStatus="goodsOptnInnb01_status">
|
|
<c:if test="${goodsOptnInnb01_status.index eq '0'}">
|
|
<input type="hidden" name="goodsOptnInnb_normal" value="${goodsOptnInnb01}"/>
|
|
</c:if>
|
|
</c:forEach>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<input class="input-text full input-trim" value="${optnNm011}" type="hidden" title="일반옵션명" name="optnNm1_normal" id="optnNm1_normal${optnTy01idx.index}${optnNm01_status.index}">
|
|
<c:forEach var="goodsOptnInnb01" items="${fn:split(optnList01.goodsOptnInnb, '|')}" varStatus="goodsOptnInnb01_status">
|
|
<c:if test="${goodsOptnInnb01_status.index ne '0' and optnNm01_status.index eq goodsOptnInnb01_status.index }">
|
|
<input type="hidden" name="goodsOptnInnb_normal" value="${goodsOptnInnb01}"/>
|
|
</c:if>
|
|
</c:forEach>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</div>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<div class="optionApply__inputContainer">
|
|
<c:choose>
|
|
<c:when test="${optnNm01_status.index eq '0'}">
|
|
<input class="input-text full input-trim" value="${optnNm011}" type="text" title="일반옵션명" name="optnNm1_normal" id="optnNm1_normal${optnTy01idx.index}${optnNm01_status.index}">
|
|
<button type="button" class="btn outline xsm optionDel02">삭제</button>
|
|
<button type="button" class="btn outline xsm optionVal98">옵션값 추가</button>
|
|
<c:forEach var="goodsOptnInnb01" items="${fn:split(optnList01.goodsOptnInnb, '|')}" varStatus="goodsOptnInnb01_status">
|
|
<c:if test="${goodsOptnInnb01_status.index eq '0'}">
|
|
<input type="hidden" name="goodsOptnInnb_normal" value="${goodsOptnInnb01}"/>
|
|
</c:if>
|
|
</c:forEach>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<input class="input-text full input-trim" value="${optnNm011}" type="hidden" title="일반옵션명" name="optnNm1_normal" id="optnNm1_normal${optnTy01idx.index}${optnNm01_status.index}">
|
|
<c:forEach var="goodsOptnInnb01" items="${fn:split(optnList01.goodsOptnInnb, '|')}" varStatus="goodsOptnInnb01_status">
|
|
<c:if test="${goodsOptnInnb01_status.index ne '0' and optnNm01_status.index eq goodsOptnInnb01_status.index }">
|
|
<input type="hidden" name="goodsOptnInnb_normal" value="${goodsOptnInnb01}"/>
|
|
</c:if>
|
|
</c:forEach>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</div>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optnExpsrAt_normalList" style="height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<c:forEach var="optnExpsrAt011" items="${fn:split(optnList01.optnExpsrAt, '|')}" varStatus="optnExpsrAt011_status">
|
|
<div class="optnExpsrAt_normal">
|
|
<label class="b-checkbox checkbox is-medium" for="optnExpsrAt01-${optnTy01idx.index}${optnExpsrAt011_status.index}">
|
|
<input type="checkbox" id="optnExpsrAt01-${optnTy01idx.index}${optnExpsrAt011_status.index}" value="Y" name="optnExpsrAt_normal" <c:if test="${optnExpsrAt011 eq 'Y'}"> class="checked" checked </c:if> >
|
|
<span class="check"></span>
|
|
</label>
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td id="td_stdrDvAt_normal">
|
|
<div class="stdrDvAt_normalList" style=" height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<c:forEach var="stdrDvAt011" items="${fn:split(optnList01.stdrDvAt, '|')}" varStatus="stdrDvAt011_status">
|
|
<div class="custom-radio" style="display: flex;align-items: center;justify-content: center;height: 24px;">
|
|
<input type="radio" id="stdrDvAt01-${optnTy01idx.index}${stdrDvAt011_status.index}" name="stdrDvAt_normal" value="Y" <c:if test="${stdrDvAt011 eq 'Y'}"> class="checked" checked </c:if> >
|
|
<label for="stdrDvAt01-${optnTy01idx.index}${stdrDvAt011_status.index}"></label>
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td><div class="optionApply__inputList">
|
|
<c:forEach var="optnVal011" items="${fn:split(optnList01.optnVal1, '|')}" varStatus="optnVal011_status">
|
|
<div class="optionApply__inputContainer">
|
|
<div class="optionApply__moveBtnContainer">
|
|
<button type="button" class="optionApply__moveBtn optionMove01 up"><span class="visually-hidden">위로</span></button>
|
|
<button type="button" class="optionApply__moveBtn optionMove01 down"><span class="visually-hidden">아래로</span></button>
|
|
</div>
|
|
<input class="input-text full input-trim" type="text" id="optnVal1_normal${optnTy01idx.index}${optnVal011_status.index}" name="optnVal1_normal" title="옵션값" value="${optnVal011}">
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="optnCd011" items="${fn:split(optnList01.optnCd1, '|')}">
|
|
<input class="input-text full input-trim" type="text" title="일반옵션 상품코드" name="optnCd1_normal" value="${optnCd011}" >
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="hscode011" items="${fn:split(optnList01.hscode, '|')}">
|
|
<input class="input-text full input-trim" type="text" title="HS Code" name="hscode_normal" value="${hscode011}" maxlength="10" >
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="realWt011" items="${fn:split(optnList01.realWt, '|')}">
|
|
<input class="input-text full" type="text" title="실무게(KG)" name="realWt_normal" value="${realWt011}" >
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="invntryQy011" items="${fn:split(optnList01.invntryQy, '|')}" varStatus="invntryQy011_status">
|
|
<input class="input-text full number right" value="<fmt:formatNumber value="${invntryQy011}"/>" type="text" id="invntryQy_normal${optnTy01idx.index}${invntryQy011_status.index}" name="invntryQy_normal" title="일반옵션 재고" <c:if test="${resultMap.goodsDtl.invntryPolicyCd eq '02'}"> disabled </c:if> >
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="usefulInvntry011" items="${fn:split(optnList01.usefulInvntry, '|')}" varStatus="usefulInvntry011_status">
|
|
<input class="input-text full right" value="<fmt:formatNumber value="${usefulInvntry011}"/>" type="text" id="usefulInvntry_normal${optnTy01idx.index}${usefulInvntry011_status.index}" title="일반옵션 가용재고" disabled >
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="cnsmrpric011" items="${fn:split(optnList01.cnsmrpric, '|')}" varStatus="cnsmrpric011_status">
|
|
<input class="input-text full number right" value="<fmt:formatNumber value="${cnsmrpric011}" pattern="#,###"/>" type="text" id="cnsmrpric_normal${optnTy01idx.index}${cnsmrpric011_status.index}" name="cnsmrpric_normal" title="소비자가">
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="slepric011" items="${fn:split(optnList01.slepric, '|')}" varStatus="slepric011_status">
|
|
<input class="input-text full number right" value="<fmt:formatNumber value="${slepric011}" pattern="#,###"/>" type="text" id="slepric_normal${optnTy01idx.index}${slepric011_status.index}" name="slepric_normal" title="판매가">
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="mlgPolicyCd011" items="${fn:split(optnList01.mlgPolicyCd, '|')}" varStatus="mlgPolicyCd011_status">
|
|
<div class="input-container gap-4">
|
|
<div class="select-box">
|
|
<select class="short" title="일반옵션 마일리지정책코드" style="display: none;" name="mlgPolicyCd_normal">
|
|
<option value="01" <c:if test="${mlgPolicyCd011 eq '01'}" > selected </c:if> >통합</option>
|
|
<option value="02" <c:if test="${mlgPolicyCd011 eq '02'}" > selected </c:if> >개별</option>
|
|
</select>
|
|
<%--<div class="nice-select short" tabindex="0"><span class="current">통합</span>
|
|
<ul class="list">
|
|
<li data-value="01" class="option <c:if test="${optnList01.mlgPolicyCd eq '01'}"> selected </c:if> ">통합</li>
|
|
<li data-value="02" class="option <c:if test="${optnList01.mlgPolicyCd eq '02'}"> selected </c:if> ">개별</li>
|
|
</ul>
|
|
</div>--%>
|
|
</div>
|
|
<c:forEach var="mlgAccmlAmt011" items="${fn:split(optnList01.mlgAccmlAmt, '|')}" varStatus="mlgAccmlAmt011_status">
|
|
<c:if test="${mlgPolicyCd011_status.index eq mlgAccmlAmt011_status.index}">
|
|
<input class="input-text sm number right" value="${mlgAccmlAmt011}" type="text" id="mlgAccmlAmt_normal${optnTy01idx.index}" name="mlgAccmlAmt_normal" title="마일리지" <c:if test="${mlgPolicyCd011 ne '02'}"> disabled </c:if> >
|
|
</c:if>
|
|
</c:forEach>
|
|
<c:forEach var="mlgAccmlCd011" items="${fn:split(optnList01.mlgAccmlCd, '|')}" varStatus="mlgAccmlCd011_status">
|
|
<c:if test="${mlgPolicyCd011_status.index eq mlgAccmlCd011_status.index}">
|
|
<div class="select-box">
|
|
<select class="short" title="일반옵션 마일리지구분코드" style="display: none;" name="mlgAccmlCd_normal" <c:if test="${mlgPolicyCd011 ne '02'}"> disabled </c:if> >
|
|
<option value="02" <c:if test="${mlgAccmlCd011 eq '02'}"> selected </c:if> >원</option>
|
|
<option value="01" <c:if test="${mlgAccmlCd011 eq '01'}"> selected </c:if> >%</option>
|
|
</select>
|
|
</div>
|
|
</c:if>
|
|
</c:forEach>
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="invntrySldoutExpsrAt011" items="${fn:split(optnList01.invntrySldoutExpsrAt, '|')}" varStatus="invntrySldoutExpsrAt011_status">
|
|
<div class="optionApply__miscText invntrySldoutExpsrAt_normal">
|
|
<c:choose>
|
|
<c:when test="${invntrySldoutExpsrAt011 eq 'Y'}"> 노출 </c:when>
|
|
<c:otherwise>미노출</c:otherwise>
|
|
</c:choose>
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="optnInfo011" items="${fn:split(optnList01.optnInfo, '|')}" varStatus="optnInfo011_status">
|
|
<input class="input-text full" type="text" id="optnInfo_normal${optnTy01idx.index}${optnInfo011_status.index}" name="optnInfo_normal" title="설명" value="${optnInfo011}">
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="compnbDscntAt_normalList" style="height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<c:forEach var="compnbDscntAt011" items="${fn:split(optnList01.compnbDscntAt, '|')}" varStatus="compnbDscntAt011_status">
|
|
<div class="compnbDscntAt_normal">
|
|
<label class="b-checkbox checkbox" for="compnbDscntAt01_${optnTy01idx.index}${compnbDscntAt011_status.index}">
|
|
<input type="checkbox" value="Y" id="compnbDscntAt01_${optnTy01idx.index}${compnbDscntAt011_status.index}" name="compnbDscntAt_normal" <c:if test="${compnbDscntAt011 eq 'Y'}"> class="checked" checked </c:if> >
|
|
<span class="check"></span><span class="control-label"></span>
|
|
</label>
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="sctnDscntAt_normalList" style="height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<c:forEach var="sctnDscntAt011" items="${fn:split(optnList01.sctnDscntAt, '|')}" varStatus="sctnDscntAt011_status">
|
|
<div class="sctnDscntAt_normal">
|
|
<label class="b-checkbox checkbox" for="sctnDscntAt01_${optnTy01idx.index}${sctnDscntAt011_status.index}">
|
|
<input type="checkbox" value="Y" id="sctnDscntAt01_${optnTy01idx.index}${sctnDscntAt011_status.index}" name="sctnDscntAt_normal" <c:if test="${sctnDscntAt011 eq 'Y'}"> class="checked" checked </c:if> >
|
|
<span class="check"></span><span class="control-label"></span>
|
|
</label>
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="manage-btn-container">
|
|
<c:forEach var="optnNm0111" items="${fn:split(optnList01.optnNm1, '|')}" varStatus="optnNm0111_status">
|
|
<button class="btn xsm dark optionDel02">삭제</button>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</c:forEach>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<tr>
|
|
<%--<td>
|
|
<div class="draggable-icon-container">
|
|
<i class="icon icon_draggable"></i>
|
|
<span class="visually-hidden">순서 바꾸기</span>
|
|
</div>
|
|
</td>--%>
|
|
<td>
|
|
<div class="optionApply__inputList">
|
|
<div class="optionApply__inputContainer">
|
|
<input class="input-text full input-trim" type="text" name="optnNm1_normal" title="옵션명" id="optnNm1_normal0" value="">
|
|
<button type="button" class="btn outline xsm optionDel01">삭제</button>
|
|
<button type="button" class="btn outline xsm optionVal98" >옵션값 추가</button>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optnExpsrAt_normalList" style="height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<div class="optnExpsrAt_normal">
|
|
<label class="b-checkbox checkbox is-medium" for="optnExpsrAt01-0">
|
|
<input type="checkbox" id="optnExpsrAt01-0" value="Y" name="optnExpsrAt_normal" checked >
|
|
<span class="check"></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td id="td_stdrDvAt_normal">
|
|
<div class="stdrDvAt_normalList" style=" height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<div class="custom-radio" style="display: flex;align-items: center;justify-content: center;height: 24px;">
|
|
<input type="radio" id="stdrDvAt01-0" name="stdrDvAt_normal" value="Y" class="checked" checked="checked" >
|
|
<label for="stdrDvAt01-0"></label>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__inputList">
|
|
<div class="optionApply__inputContainer">
|
|
<div class="optionApply__moveBtnContainer">
|
|
<button type="button" class="optionApply__moveBtn optionMove01 up"><span class="visually-hidden">위로</span></button>
|
|
<button type="button" class="optionApply__moveBtn optionMove01 down"><span class="visually-hidden">아래로</span></button>
|
|
</div>
|
|
<input class="input-text full input-trim" type="text" id="optnVal1_normal0" name="optnVal1_normal" title="옵션값" value="">
|
|
<input type="hidden" name="goodsOptnInnb_normal" value=""/>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<input class="input-text full input-trim" type="text" title="상품코드" name="optnCd1_normal" value="" >
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<input class="input-text full input-trim" type="text" title="HS Code" name="hscode_normal" value="" maxlength="10" >
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<input class="input-text full" type="text" title="실무게(KG)" name="realWt_normal" value="" >
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<input class="input-text full number right" value="" type="text" id="invntryQy_normal0" name="invntryQy_normal" title="재고">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<input class="input-text full number right" value="" type="text" id="cnsmrpric_normal0" name="cnsmrpric_normal" title="소비자가">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<input class="input-text full number right" value="" type="text" id="slepric_normal0" name="slepric_normal" title="판매자가">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<div class="input-container gap-4">
|
|
<div class="select-box">
|
|
<select class="short" title="일반옵션 마일리지정책코드" style="display: none;" name="mlgPolicyCd_normal">
|
|
<option value="01" selected >통합</option>
|
|
<option value="02" >개별</option>
|
|
</select>
|
|
<%--<div class="nice-select short" tabindex="0"><span class="current">통합</span>
|
|
<ul class="list">
|
|
<li data-value="01" class="option <c:if test="${optnList01.mlgPolicyCd eq '01'}"> selected </c:if> ">통합</li>
|
|
<li data-value="02" class="option <c:if test="${optnList01.mlgPolicyCd eq '02'}"> selected </c:if> ">개별</li>
|
|
</ul>
|
|
</div>--%>
|
|
</div>
|
|
<input class="input-text sm number right" value="" type="text" id="mlgAccmlAmt_normal" name="mlgAccmlAmt_normal" title="마일리지" disabled >
|
|
<div class="select-box">
|
|
<select class="short" title="일반옵션 마일리지구분코드" style="display: none;" name="mlgAccmlCd_normal" disabled >
|
|
<option value="02" selected >원</option>
|
|
<option value="01" >%</option>
|
|
</select>
|
|
<%--<div class="nice-select short <c:if test="${optnList01.mlgPolicyCd ne '02'}"> disabled </c:if> "
|
|
tabindex="0"><span class="current">원</span>
|
|
<ul class="list">
|
|
<li data-value="02" class="option <c:if test="${optnList01.mlgAccmlCd eq '02'}"> </c:if> ">원</li>
|
|
<li data-value="01" class="option <c:if test="${optnList01.mlgAccmlCd eq '01'}"> </c:if> ">%</li>
|
|
</ul>
|
|
</div>--%>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<div class="optionApply__miscText invntrySldoutExpsrAt_normal">
|
|
옵션미노출
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<input class="input-text full" type="text" id="optnInfo_normal0" name="optnInfo_normal" title="설명" value="">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__inputList">
|
|
<div class="manage-btn-container">
|
|
<button class="btn xsm dark optionDel02">삭제</button>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="optionApply__controls">
|
|
<button id="fn_add_invntry_option_row" type="button"
|
|
class="btn outline sm primary">옵션값 추가</button>
|
|
<%-- <div class="select-box">--%>
|
|
<%-- <select class="md" title="옵션 불러오기">--%>
|
|
<%-- <option selected disabled>옵션 불러오기</option>--%>
|
|
<%-- <option>직접입력</option>--%>
|
|
<%-- </select>--%>
|
|
<%-- </div>--%>
|
|
</div>
|
|
<div class="table-wrapper">
|
|
<table class="table vertical tight draggable" id="invntry_option">
|
|
<caption>재고옵션</caption>
|
|
<colgroup>
|
|
<col style="width: 50px;">
|
|
<col style="width: 50px;">
|
|
<col style="width: 50px;">
|
|
<col style="width: 8%;">
|
|
<col style="width: 8%;">
|
|
<col style="width: 8%;">
|
|
<col style="width: 8%;">
|
|
<col style="width: 6%;">
|
|
<col style="width: 6%;">
|
|
<col style="width: 6%;">
|
|
<col style="width: 6%;">
|
|
<col style="width: 6%;">
|
|
<col style="width: auto;">
|
|
<col style="width: 10%;">
|
|
<col style="width: 60px;">
|
|
<col style="width: 60px;">
|
|
<col style="width: 80px;">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th>순서</th>
|
|
<th>노출</th>
|
|
<th>기준</th>
|
|
<th>옵션1</th>
|
|
<th>옵션2</th>
|
|
<th>옵션3</th>
|
|
<th>옵션4</th>
|
|
<th>상품코드</th>
|
|
<th>재고</th>
|
|
<th>가용재고</th>
|
|
<th>소비자가</th>
|
|
<th>판매가</th>
|
|
<th>마일리지</th>
|
|
<th>설명</th>
|
|
<th>복수<br/>할인<br/>적용</th>
|
|
<th>구간<br/>할인<br/>적용</th>
|
|
<th>관리</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="invntry_option_tbody">
|
|
<c:choose>
|
|
<c:when test="${not empty resultMap.goodsOptionList.invntryOptnList}">
|
|
<c:forEach var="optnList02" items="${resultMap.goodsOptionList.invntryOptnList}" step="1" begin="0" end="0">
|
|
<tr>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
<input class="input-text full input-trim" name ="optnNm1_invntry" type="text" title="재고옵션명1" value="${optnList02.optnNm1}">
|
|
</td>
|
|
<td>
|
|
<input class="input-text full input-trim" name ="optnNm2_invntry" type="text" title="재고옵선명2" value="${optnList02.optnNm2}">
|
|
</td>
|
|
<td>
|
|
<input class="input-text full input-trim" name="optnNm3_invntry" type="text" title="재고옵션명3" value="${optnList02.optnNm3}">
|
|
</td>
|
|
<td>
|
|
<input class="input-text full input-trim" name="optnNm4_invntry" type="text" title="재고옵션명4" value="${optnList02.optnNm4}">
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
<label class="b-checkbox checkbox" for="invntrySldoutExpsrAt_invntry">
|
|
<input type="checkbox" value="Y" id="invntrySldoutExpsrAt_invntry" name="invntrySldoutExpsrAt_invntry" <c:if test="${optnList02.invntrySldoutExpsrAt eq 'Y'}"> checked </c:if> >
|
|
<span class="check"></span><span class="control-label">재고품절시 노출</span>
|
|
</label>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
</tr>
|
|
</c:forEach>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<tr>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
<input class="input-text full input-trim" name ="optnNm1_invntry" type="text" title="재고옵션명1" value="">
|
|
<input type="hidden" name="goodsOptnInnb_invntry" value="" />
|
|
</td>
|
|
<td>
|
|
<input class="input-text full input-trim" name ="optnNm2_invntry" type="text" title="재고옵선명2" value="">
|
|
</td>
|
|
<td>
|
|
<input class="input-text full input-trim" name="optnNm3_invntry" type="text" title="재고옵션명3" value="">
|
|
</td>
|
|
<td>
|
|
<input class="input-text full input-trim" name="optnNm4_invntry" type="text" title="재고옵션명4" value="">
|
|
</td>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
<label class="b-checkbox checkbox" for="invntrySldoutExpsrAt_invntry">
|
|
<input type="checkbox" value="Y" id="invntrySldoutExpsrAt_invntry" name="invntrySldoutExpsrAt_invntry">
|
|
<span class="check"></span><span class="control-label">재고품절시 노출 상태 숨김</span>
|
|
</label>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
</tr>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
<c:forEach var="goodsOpt02Val" items="${resultMap.goodsOptionList.invntryOptnList}" varStatus="opt02Status">
|
|
<tr>
|
|
<td>
|
|
<div class="draggable-icon-container">
|
|
<i class="icon icon_draggable"></i>
|
|
<span class="visually-hidden">순서 바꾸기</span>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<label class="b-checkbox checkbox is-medium" for="optnExpsrAt02-${opt02Status.index}">
|
|
<input type="checkbox" id="optnExpsrAt02-${opt02Status.index}" value="Y" name="optnExpsrAt_invntry" <c:if test="${goodsOpt02Val.optnExpsrAt eq 'Y'}"> checked</c:if> >
|
|
<span class="check"></span>
|
|
</label>
|
|
</td>
|
|
<td>
|
|
<div class="custom-radio">
|
|
<input type="radio" id="stdrDvAt02-${opt02Status.index}" name="stdrDvAt_invntry" value="Y" <c:if test="${goodsOpt02Val.stdrDvAt eq 'Y'}"> checked="checked" class="checked"</c:if> />
|
|
<label for="stdrDvAt02-${opt02Status.index}"></label>
|
|
</div>
|
|
</td>
|
|
<td><input class="input-text full input-trim" type="text" title="재고옵션 값1" name="optnVal1_invntry" value="${goodsOpt02Val.optnVal1}" />
|
|
<input type="hidden" name="goodsOptnInnb_invntry" value="${goodsOpt02Val.goodsOptnInnb}" />
|
|
</td>
|
|
<td><input class="input-text full input-trim" type="text" title="재고옵션 값2" name="optnVal2_invntry" value="${goodsOpt02Val.optnVal2}"/></td>
|
|
<td><input class="input-text full input-trim" type="text" title="재고옵션 값3" name="optnVal3_invntry" value="${goodsOpt02Val.optnVal3}" /></td>
|
|
<td><input class="input-text full input-trim" type="text" title="재고옵션 값4" name="optnVal4_invntry" value="${goodsOpt02Val.optnVal4} "/></td>
|
|
<td><input class="input-text full input-trim" type="text" title="재고옵션 코드" name="optnCd1_invntry" value="${goodsOpt02Val.optnCd1}" /></td>
|
|
<td><input class="input-text full number right" type="text" value="<fmt:formatNumber value="${goodsOpt02Val.invntryQy}" pattern="#,###"/>" title="재고옵션 재고" name="invntryQy_invntry" <c:if test="${resultMap.goodsDtl.invntryPolicyCd eq '02'}"> disabled </c:if> /></td>
|
|
<td><input class="input-text full right" type="text" value="<fmt:formatNumber value="${goodsOpt02Val.usefulInvntry}" pattern="#,###"/>" title="재고옵션 가용재고" disabled /></td>
|
|
<td><input class="input-text full number right" type="text" value="<fmt:formatNumber value="${goodsOpt02Val.cnsmrpric}" pattern="#,###"/>" title="재고옵션 소비자가" name="cnsmrpric_invntry"/></td>
|
|
<td><input class="input-text full number right" type="text" value="<fmt:formatNumber value="${goodsOpt02Val.slepric}" pattern="#,###"/>" title="재고옵션 판매가" name="slepric_invntry"/></td>
|
|
<td>
|
|
<div class="input-container gap-4">
|
|
<div class="select-box">
|
|
<select class="short" title="재고옵션 마일리지정책코드" name="mlgPolicyCd_invntry"
|
|
style="display: none;">
|
|
<option value="01" <c:if test="${goodsOpt02Val.mlgPolicyCd eq '01' }" > selected</c:if> >통합</option>
|
|
<option value="02" <c:if test="${goodsOpt02Val.mlgPolicyCd eq '02' }" > selected</c:if> >개별</option>
|
|
</select>
|
|
</div>
|
|
<input class="input-text sm number right" value="${goodsOpt02Val.mlgAccmlAmt}" type="text" title="재고옵션 마일리지적립금액" name="mlgAccmlAmt_invntry" disabled/>
|
|
<div class="select-box">
|
|
<select class="short" title="재고옵션 마일리지적립구분코드" style="display: none;" name="mlgAccmlCd_invntry" disabled >
|
|
<option value="02" <c:if test="${goodsOpt02Val.mlgAccmlCd eq '02'}"> selected</c:if> >원</option>
|
|
<option value="01" <c:if test="${goodsOpt02Val.mlgAccmlCd eq '01'}"> selected</c:if> >%</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td><input class="input-text full input-trim" type="text" title="재고옵션 정보" name="optnInfo_invntry" value="${goodsOpt02Val.optnInfo}"/></td>
|
|
<td>
|
|
<div class="compnbDscntAt_invntryList" style="height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<div class="compnbDscntAt_invntry">
|
|
<label class="b-checkbox checkbox" for="compnbDscntAt02_${opt02Status.index}">
|
|
<input type="checkbox" value="Y" id="compnbDscntAt02_${opt02Status.index}" name="compnbDscntAt_invntry" <c:if test="${goodsOpt02Val.compnbDscntAt eq 'Y'}"> class="checked" checked </c:if> >
|
|
<span class="check"></span><span class="control-label"></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="sctnDscntAt_invntryList" style="height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<c:forEach var="sctnDscntAt022" items="${goodsOpt02Val.compnbDscntAt}" varStatus="sctnDscntAt022_status">
|
|
<div class="sctnDscntAt_invntry">
|
|
<label class="b-checkbox checkbox" for="sctnDscntAt02_${opt02Status.index}">
|
|
<input type="checkbox" value="Y" id="sctnDscntAt02_${opt02Status.index}" name="sctnDscntAt_invntry" <c:if test="${goodsOpt02Val.sctnDscntAt eq 'Y'}"> class="checked" checked </c:if> >
|
|
<span class="check"></span><span class="control-label"></span>
|
|
</label>
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="manage-btn-container">
|
|
<div>
|
|
<button class="btn xsm primary outline" onclick="fn_copy_invntry_option_row(this); return false;">복사</button>
|
|
<button class="btn xsm dark" onclick="fn_remove_invntry_row(this); return false;">삭제</button>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</c:forEach>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<%-- <tr>--%>
|
|
<%-- <th>입력옵션</th>--%>
|
|
<%-- <td>--%>
|
|
<%-- <div class="td-inner vertical">--%>
|
|
<%-- <div class="optionApply">--%>
|
|
<%-- <div class="optionApply__radioWrap">--%>
|
|
<%-- <div class="custom-radio-container radio-tab-trigger"--%>
|
|
<%-- data-radiotab="radio-tab-02">--%>
|
|
<%-- <div class="custom-radio">--%>
|
|
<%-- <input type="radio" id="r-601" name="optnTy04"--%>
|
|
<%-- >--%>
|
|
<%-- <label for="r-601">사용함</label>--%>
|
|
<%-- </div>--%>
|
|
<%-- <div class="custom-radio">--%>
|
|
<%-- <input type="radio" id="r-602" name="optnTy04" checked>--%>
|
|
<%-- <label for="r-602">사용안함</label>--%>
|
|
<%-- </div>--%>
|
|
<%-- </div>--%>
|
|
<%-- <p class="fyi gray-7">주문시 특정 문구나 개인별 요청 사항을 직접 입력 받는 항목</p>--%>
|
|
<%-- </div>--%>
|
|
<%-- <div class="radio-tab-content" id="radio-tab-02">--%>
|
|
<%-- <div>--%>
|
|
<%-- <div class="table-wrapper" style="width: 580px;">--%>
|
|
<%-- <table class="table vertical tight draggable" id="input_option">--%>
|
|
<%-- <caption>입력 옵션</caption>--%>
|
|
<%-- <colgroup>--%>
|
|
<%-- <col style="width: 70px;">--%>
|
|
<%-- <col style="width: auto;">--%>
|
|
<%-- </colgroup>--%>
|
|
<%-- <thead>--%>
|
|
<%-- <tr>--%>
|
|
<%-- <th>순서--%>
|
|
<%-- </th>--%>
|
|
<%-- <th>--%>
|
|
<%-- 필수--%>
|
|
<%-- </th>--%>
|
|
<%-- <th>입력 옵션 항목--%>
|
|
<%-- <button id="optionAdd02" type="button" class="btn xxsm outline">추가</button>--%>
|
|
<%-- </th>--%>
|
|
<%-- <th>--%>
|
|
<%-- 관리--%>
|
|
<%-- </th>--%>
|
|
|
|
<%-- </tr>--%>
|
|
<%-- </thead>--%>
|
|
<%-- <tbody id="input_option_tbody">--%>
|
|
<%-- <tr>--%>
|
|
<%-- <td>--%>
|
|
<%-- <div class="draggable-icon-container">--%>
|
|
<%-- <i class="icon icon_draggable"></i>--%>
|
|
<%-- <span class="visually-hidden">순서 바꾸기</span>--%>
|
|
<%-- </div>--%>
|
|
<%-- </td>--%>
|
|
<%-- <td>--%>
|
|
<%-- <label class="b-checkbox checkbox is-medium" for="optnEssntlAt04-0">--%>
|
|
<%-- <input type="checkbox" id="optnEssntlAt04-0" value="Y" name="optnEssntlAt_input">--%>
|
|
<%-- <span class="check"></span>--%>
|
|
<%-- </label>--%>
|
|
<%-- </td>--%>
|
|
<%-- <td>--%>
|
|
<%-- <div class="optionApply__inputList">--%>
|
|
<%-- <div class="optionApply__inputContainer">--%>
|
|
<%-- <input class="input-text full" type="text" name="optnNm1_input" title="옵션명">--%>
|
|
|
|
<%-- </div>--%>
|
|
<%-- </div>--%>
|
|
<%-- </td>--%>
|
|
<%-- <td>--%>
|
|
<%-- <button type="button" class="btn outline xsm optionDel01">삭제</button>--%>
|
|
<%-- </td>--%>
|
|
<%-- </tr>--%>
|
|
<%-- </tbody>--%>
|
|
<%-- </table>--%>
|
|
<%-- </div>--%>
|
|
<%-- </div>--%>
|
|
<%-- <div></div>--%>
|
|
<%-- </div>--%>
|
|
<%-- </div>--%>
|
|
<%-- </div>--%>
|
|
<%-- </td>--%>
|
|
<%-- </tr>--%>
|
|
<tr>
|
|
<th>추가구성<br>옵션</th>
|
|
<td>
|
|
<div class="td-inner vertical">
|
|
<div class="optionApply">
|
|
<div class="optionApply__radioWrap">
|
|
<div class="custom-radio-container radio-tab-trigger"
|
|
data-radiotab="radio-tab-03">
|
|
<c:if test="${not empty resultMap.goodsOptionList.addedOptnList }">
|
|
<c:set var="isCheckedY" value="checked"/>
|
|
</c:if>
|
|
<c:if test="${empty resultMap.goodsOptionList.addedOptnList }">
|
|
<c:set var="isCheckedN" value="checked"/>
|
|
</c:if>
|
|
<div class="custom-radio">
|
|
<input type="radio" id="r-701" name="r-group701" ${isCheckedY}>
|
|
<label for="r-701">사용함</label>
|
|
</div>
|
|
<div class="custom-radio">
|
|
<input type="radio" id="r-702" name="r-group701" ${isCheckedN}>
|
|
<label for="r-702">사용안함</label>
|
|
</div>
|
|
</div>
|
|
<p class="fyi gray-7">주문시 해당상품 이외에 추가로 구매할 수 있는 상품</p>
|
|
</div>
|
|
<div class="radio-tab-content" id="radio-tab-03">
|
|
<div>
|
|
<div class="table-wrapper">
|
|
<table class="table vertical tight draggable" id="addition_option">
|
|
<caption>추가옵션</caption>
|
|
<colgroup>
|
|
<col style="width: 50px;">
|
|
<col style="width: 50px;">
|
|
<col style="width: 20%;">
|
|
<col style="width: auto;">
|
|
<col style="width: 8%;">
|
|
<col style="width: 8%;">
|
|
<col style="width: 10%;">
|
|
<col style="width: 10%;">
|
|
<col style="width: 5%;">
|
|
<col style="width: 18%;">
|
|
<col style="width: 8%;">
|
|
<col style="width: 12%;">
|
|
<col style="width: 8%;">
|
|
<col style="width: 80px;">
|
|
<col style="width: 80px;">
|
|
<col style="width: 80px;">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th>순서</th>
|
|
<th>필수</th>
|
|
<th>옵션명
|
|
<button id="fn_add_addition_option_row" type="button" class="btn xxsm outline">추가</button>
|
|
</th>
|
|
<th>노출</th>
|
|
<th>옵션값</th>
|
|
<th>상품코드</th>
|
|
<th>재고</th>
|
|
<th>가용<br/>재고</th>
|
|
<th>소비자가</th>
|
|
<th>판매가</th>
|
|
<th>마일리지</th>
|
|
<th>재고품절시
|
|
<div class="select-box d-inline-block">
|
|
<select class="short" title="재고품절시 노출 상태" name="invntrySldoutExpsrAt_added" id="invntrySldoutExpsrAt_added">
|
|
<c:choose>
|
|
<c:when test="${not empty resultMap.goodsOptionList.addedOptnList}">
|
|
<option value="N" <c:if test="${fn:contains(resultMap.goodsOptionList.addedOptnList[0].invntrySldoutExpsrAt, 'N')}"> selected </c:if>>미노출</option>
|
|
<option value="Y" <c:if test="${fn:contains(resultMap.goodsOptionList.addedOptnList[0].invntrySldoutExpsrAt, 'Y')}"> selected </c:if>>노출</option>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<option value="N" selected>미노출</option>
|
|
<option value="Y">노출</option>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</select>
|
|
</div>
|
|
</th>
|
|
<%-- <th>노출조건</th>--%>
|
|
<th>설명</th>
|
|
<th>복수<br/>할인<br/>적용</th>
|
|
<th>구간<br/>할인<br/>적용</th>
|
|
<th>관리</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="addition_option_tbody">
|
|
<c:forEach var="optnList03" items="${resultMap.goodsOptionList.addedOptnList}" varStatus="optnTy03idx">
|
|
<tr>
|
|
<td>
|
|
<div class="draggable-icon-container">
|
|
<i class="icon icon_draggable"></i>
|
|
<span class="visually-hidden">순서 바꾸기</span>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optnEssntlAt_addedList" style="height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<c:forEach var="optnEssntlAt033" items="${fn:split(optnList03.optnEssntlAt,'|')}" varStatus="optnEssntlAt033_status">
|
|
<div class="optnEssntlAt_added">
|
|
<c:forEach var="optnOrdr033" items="${fn:split(optnList03.optnOrdr,'|')}" varStatus="optnOrdr033_status">
|
|
<c:choose>
|
|
<c:when test="${optnOrdr033 eq '1'}">
|
|
<c:if test="${optnEssntlAt033_status.index eq optnOrdr033_status.index }">
|
|
<label class="b-checkbox checkbox is-medium" for="optnEssntlAt03-${optnOrdr033_status.index}${optnEssntlAt033_status.index}">
|
|
<input type="checkbox" id="optnEssntlAt03-${optnOrdr033_status.index}${optnEssntlAt033_status.index}" value="Y" name="optnEssntlAt_added" <c:if test="${optnEssntlAt033 eq 'Y'}"> checked="checked" class="checked" </c:if> >
|
|
<span class="check"></span>
|
|
</label>
|
|
</c:if>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<c:if test="${optnEssntlAt033_status.index eq optnOrdr033_status.index }">
|
|
<%-- <label class="b-checkbox checkbox is-medium" for="optnEssntlAt03-${optnTy03idx.index}${optnEssntlAt033_status}">--%>
|
|
<input type="checkbox" id="optnEssntlAt03-${optnOrdr033_status.index}${optnEssntlAt033_status.index}" value="Y" name="optnEssntlAt_added" <c:if test="${optnEssntlAt033 eq 'Y'}"> checked="checked" class="checked" </c:if> >
|
|
<span class="check"></span>
|
|
<%-- </label>--%>
|
|
</c:if>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</c:forEach>
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__inputList">
|
|
<c:forEach var="optnNm033" items="${fn:split(optnList03.optnNm1,'|')}" varStatus="optnNm03_status">
|
|
<c:choose>
|
|
<c:when test="${optnTy03idx.index eq '0'}">
|
|
<div class="optionApply__inputContainer">
|
|
<c:choose>
|
|
<c:when test="${optnNm03_status.index eq '0'}">
|
|
<input class="input-text full" value="${optnNm033}" type="text" title="추가옵션명" name="optnNm1_added" id="optnNm1_added${optnNm03_status.index}">
|
|
<button type="button" class="btn outline xsm optionDel01">삭제</button>
|
|
<button type="button" class="btn outline xsm optionVal99">옵션값 추가</button>
|
|
<c:forEach var="goodsOptnInnb03" items="${fn:split(optnList03.goodsOptnInnb, '|')}" varStatus="goodsOptnInnb03_status">
|
|
<c:if test="${goodsOptnInnb03_status.index eq '0'}">
|
|
<input type="hidden" name="goodsOptnInnb_added" value="${goodsOptnInnb03}"/>
|
|
</c:if>
|
|
</c:forEach>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<input class="input-text full" value="${optnNm033}" type="hidden" title="추가옵션명" name="optnNm1_added" id="optnNm1_added${optnTy03idx.index}${optnNm03_status.index}">
|
|
<c:forEach var="goodsOptnInnb03" items="${fn:split(optnList03.goodsOptnInnb, '|')}" varStatus="goodsOptnInnb03_status">
|
|
<c:if test="${goodsOptnInnb03_status.index ne '0' and optnNm03_status.index eq goodsOptnInnb03_status.index }">
|
|
<input type="hidden" name="goodsOptnInnb_added" value="${goodsOptnInnb03}"/>
|
|
</c:if>
|
|
</c:forEach>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</div>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<div class="optionApply__inputContainer">
|
|
<c:choose>
|
|
<c:when test="${optnNm03_status.index eq '0'}">
|
|
<input class="input-text full" value="${optnNm033}" type="text" title="추가옵션명" name="optnNm1_added" id="optnNm1_added${optnTy03idx.index}${optnNm03_status.index}">
|
|
<button type="button" class="btn outline xsm optionDel01">삭제</button>
|
|
<button type="button" class="btn outline xsm optionVal99">옵션값 추가</button>
|
|
<c:forEach var="goodsOptnInnb03" items="${fn:split(optnList03.goodsOptnInnb, '|')}" varStatus="goodsOptnInnb03_status">
|
|
<c:if test="${goodsOptnInnb03_status.index eq '0'}">
|
|
<input type="hidden" name="goodsOptnInnb_added" value="${goodsOptnInnb03}"/>
|
|
</c:if>
|
|
</c:forEach>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<input class="input-text full" value="${optnNm033}" type="hidden" title="추가옵션명" name="optnNm1_added" id="optnNm1_added${optnTy03idx.index}${optnNm03_status.index}">
|
|
<c:forEach var="goodsOptnInnb03" items="${fn:split(optnList03.goodsOptnInnb, '|')}" varStatus="goodsOptnInnb03_status">
|
|
<c:if test="${goodsOptnInnb03_status.index ne '0' and optnNm03_status.index eq goodsOptnInnb03_status.index }">
|
|
<input type="hidden" name="goodsOptnInnb_added" value="${goodsOptnInnb03}"/>
|
|
</c:if>
|
|
</c:forEach>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</div>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optnExpsrAt_addedList" style="height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<c:forEach var="optnExpsrAt03" items="${fn:split(optnList03.optnExpsrAt,'|')}" varStatus="optnExpsrAt03_status">
|
|
<div class="optnExpsrAt_added">
|
|
<label class="b-checkbox checkbox is-medium" for="optnExpsrAt03-${optnTy03idx.index}${optnExpsrAt03_status.index}">
|
|
<input type="checkbox" id="optnExpsrAt03-${optnTy03idx.index}${optnExpsrAt03_status.index}" value="Y" name="optnExpsrAt_added" <c:if test="${optnExpsrAt03 eq 'Y'}"> checked class="checked" </c:if> >
|
|
<span class="check"></span>
|
|
</label>
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__inputList">
|
|
<c:forEach var="optnVal033" items="${fn:split(optnList03.optnVal1, '|')}">
|
|
<div class="optionApply__inputContainer">
|
|
<div class="optionApply__moveBtnContainer">
|
|
<button type="button" class="optionApply__moveBtn optionMove02 up"><span class="visually-hidden">위로</span></button>
|
|
<button type="button" class="optionApply__moveBtn optionMove02 down"><span class="visually-hidden">아래로</span></button>
|
|
</div>
|
|
<input class="input-text full" type="text" title="추가옵션값" name="optnVal1_added" value="${optnVal033}">
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="optnCd033" items="${fn:split(optnList03.optnCd1, '|')}">
|
|
<input class="input-text full" type="text" title="추가옵션상품코드" name="optnCd1_added" value="${optnCd033}">
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="invntryQy033" items="${fn:split(optnList03.invntryQy, '|')}">
|
|
<input class="input-text full number right" value="<fmt:formatNumber value="${invntryQy033}"/>" type="text" title="추가옵션 재고" name="invntryQy_added" <c:if test="${resultMap.goodsDtl.invntryPolicyCd eq '02'}"> disabled </c:if> >
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="usefulInvntry033" items="${fn:split(optnList03.usefulInvntry, '|')}">
|
|
<input class="input-text full right" value="<fmt:formatNumber value="${usefulInvntry033}"/>" type="text" title="추가옵션 가용재고" disabled >
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="cnsmrpric033" items="${fn:split(optnList03.cnsmrpric, '|')}">
|
|
<input class="input-text full number right" value="<fmt:formatNumber value="${cnsmrpric033}" pattern="#,###"/>" type="text" title="추가옵션 소비자가" name="cnsmrpric_added">
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="slepric033" items="${fn:split(optnList03.slepric, '|')}">
|
|
<input class="input-text full number right" value="<fmt:formatNumber value="${slepric033}" pattern="#,###"/>" type="text" title="추가옵션 판매가" name="slepric_added">
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="mlgPolicyCd033" items="${fn:split(optnList03.mlgPolicyCd, '|')}" varStatus="mlgPolicyCd033_status">
|
|
<div class="input-container gap-4">
|
|
<div class="select-box">
|
|
<select class="short" title="추가옵션 마일리지정책코드" style="display: none;" name="mlgPolicyCd_added">
|
|
<option value="01" <c:if test="${mlgPolicyCd033 eq '01'}" > selected </c:if> >통합</option>
|
|
<option value="02" <c:if test="${mlgPolicyCd033 eq '02'}" > selected </c:if> >개별</option>
|
|
</select>
|
|
</div>
|
|
<c:forEach var="mlgAccmlAmt033" items="${fn:split(optnList03.mlgAccmlAmt, '|')}" varStatus="mlgAccmlAmt033_status">
|
|
<c:if test="${mlgPolicyCd033_status.index eq mlgAccmlAmt033_status.index }">
|
|
<input class="input-text xsm number right" value="${mlgAccmlAmt033}" type="text" title="추가옵션 마일리지적립금액" name="mlgAccmlAmt_added" <c:if test="${mlgPolicyCd ne '02'}"> disabled </c:if> >
|
|
</c:if>
|
|
</c:forEach>
|
|
<c:forEach var="mlgAccmlCd033" items="${fn:split(optnList03.mlgAccmlCd, '|')}" varStatus="mlgAccmlAmt033_status">
|
|
<c:if test="${mlgPolicyCd033_status.index eq mlgAccmlAmt033_status.index}">
|
|
<div class="select-box">
|
|
<select class="short" title="추가옵션 마일리지적립구분코드" name="mlgAccmlCd_added" <c:if test="${mlgPolicyCd033 ne '02'}"> disabled </c:if> >
|
|
<option value="02" <c:if test="${mlgAccmlCd033 eq '02'}"> selected </c:if> >원</option>
|
|
<option value="01" <c:if test="${mlgAccmlCd033 eq '01'}"> selected </c:if> >%</option>
|
|
</select>
|
|
</div>
|
|
</c:if>
|
|
</c:forEach>
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="invntrySldoutExpsrAt033" items="${fn:split(optnList03.invntrySldoutExpsrAt, '|')}" varStatus="invntrySldoutExpsrAt033_status">
|
|
<div class="optionApply__miscText invntrySldoutExpsrAt_added">
|
|
<c:choose>
|
|
<c:when test="${invntrySldoutExpsrAt033 eq 'Y'}">노출 </c:when>
|
|
<c:otherwise>옵션 미노출</c:otherwise>
|
|
</c:choose>
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<%-- <td>--%>
|
|
<%-- <div class="optionApply__priceContainer">--%>
|
|
<%-- <div class="select-box">--%>
|
|
<%-- <select class="full" title="추가옵션 노출조건" name="optnRelateAt_added">--%>
|
|
|
|
<%-- <option value="Y" <c:if test="${not empty optnList03.optnRelateNb and optnList03.optnRelateNb ne '0' }">selected</c:if> >필수옵션1에만 노출</option>--%>
|
|
<%-- <option value="N" <c:if test="${empty optnList03.optnRelateNb or optnList03.optnRelateNb eq '0' }">selected</c:if> >항시 노출</option>--%>
|
|
<%-- </select>--%>
|
|
<%-- </div>--%>
|
|
<%-- </div>--%>
|
|
<%-- </td>--%>
|
|
<td>
|
|
<div class="optionApply__priceContainer">
|
|
<c:forEach var="optnInfo033" items="${fn:split(optnList03.optnInfo, '|')}" varStatus="optnInfo_status">
|
|
<input class="input-text full" type="text" title="추가옵션 정보" name="optnInfo_added" value="${optnInfo033}">
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="compnbDscntAt_addedList" style="height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<c:forEach var="compnbDscntAt033" items="${fn:split(optnList03.compnbDscntAt, '|')}" varStatus="compnbDscntAt033_status">
|
|
<div class="compnbDscntAt_added">
|
|
<label class="b-checkbox checkbox" for="compnbDscntAt03_${optnTy03idx.index}${compnbDscntAt033_status.index}">
|
|
<input type="checkbox" value="Y" id="compnbDscntAt03_${optnTy03idx.index}${compnbDscntAt033_status.index}" name="compnbDscntAt_added" <c:if test="${compnbDscntAt033 eq 'Y'}"> class="checked" checked </c:if> >
|
|
<span class="check"></span><span class="control-label"></span>
|
|
</label>
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="sctnDscntAt_addedList" style="height: 100%; display: flex; flex-direction: column; justify-content: space-around;">
|
|
<c:forEach var="sctnDscntAt033" items="${fn:split(optnList03.sctnDscntAt, '|')}" varStatus="sctnDscntAt033_status">
|
|
<div class="sctnDscntAt_added">
|
|
<label class="b-checkbox checkbox" for="sctnDscntAt03_${optnTy03idx.index}${sctnDscntAt033_status.index}">
|
|
<input type="checkbox" value="Y" id="sctnDscntAt03_${optnTy03idx.index}${sctnDscntAt033_status.index}" name="sctnDscntAt_added" <c:if test="${sctnDscntAt033 eq 'Y'}"> class="checked" checked </c:if> >
|
|
<span class="check"></span><span class="control-label"></span>
|
|
</label>
|
|
</div>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="manage-btn-container">
|
|
<c:forEach var="optnNm033" items="${fn:split(optnList03.optnNm1, '|')}" varStatus="optnNm033_status">
|
|
<button type="button" class="btn xsm dark optionDel03">삭제</button>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</c:forEach>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section id="section06" class="content-section content-scroll-detect content-fold">
|
|
<div class="content-fold__header">
|
|
<h3 class="content-section__title">상품 사진</h3>
|
|
<button class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
|
<button class="btn primary btn-light" id="btn_update_img">상품사진 수정</button>
|
|
</div>
|
|
<div class="content-fold__content">
|
|
<div class="table-wrapper">
|
|
<table class="table">
|
|
<caption>상품 사진</caption>
|
|
<colgroup>
|
|
<col style="width: 12%;">
|
|
<col>
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<th>사진 등록<span class="red-7">*</span></th>
|
|
<td>
|
|
<div class="td-inner vertical">
|
|
<div class="dropzone-wrapper">
|
|
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
|
<div class="dropzone" id="my-dropzone">
|
|
</div><p class="fyi gray-7 mt-15">여러 개의 이미지를 한 번에 등록 가능합니다.</p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>등록한 사진</th>
|
|
<td>
|
|
<div class="td-inner" id="sortable">
|
|
<c:if test="${not empty resultMap.imgList}">
|
|
<c:forEach items="${resultMap.imgList}" var="imglist" varStatus="status">
|
|
<c:if test="${imglist.imgKnd eq '02'}">
|
|
<div class="file-preview__container">
|
|
<div class="file-preview">
|
|
<span class="file-preview__number"></span>
|
|
<button class="file-preview__delete" id="file-preview__delete" onclick="deleteFileImg(this)">
|
|
<span class="visually-hidden">삭제</span></button>
|
|
<div class="file-preview__image">
|
|
<img src="<c:out value="${cdnurl}${imglist.img}"/>" alt="상품 이미지" onerror="this.src='/mngr/images/image_placeholder.png'" >
|
|
<input type="hidden" name="goodsImgInnb" value="${imglist.goodsImgInnb}"/>
|
|
<input type="hidden" name="imgKnd" value="${imglist.imgKnd}"/>
|
|
<input type="hidden" name="cutNb" value="${imglist.cutNb}"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</c:if>
|
|
</c:forEach>
|
|
</c:if>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
</section>
|
|
<section id="section07" class="content-section content-scroll-detect content-fold">
|
|
<div class="content-fold__header">
|
|
<h3 class="content-section__title">상세 설명</h3>
|
|
<button class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
|
<button class="btn primary btn-light" id="pcGoodsDc_update" name="btn_update_EtcInfo">상세설명 수정</button>
|
|
</div>
|
|
<div class="content-fold__content">
|
|
<div class="table-wrapper">
|
|
<table class="table">
|
|
<caption>상세 설명</caption>
|
|
<colgroup>
|
|
<col style="width: 12%;">
|
|
<col>
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<th>상품 설명<span class="red-7">*</span></th>
|
|
<td>
|
|
<div class="td-inner"><textarea class="textarea" title="에디터 입력" cols="30" rows="10" id="goodsDc" name="goodsDc">${resultMap.goodsDtl.goodsDc}</textarea>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section id="section08" class="content-section content-scroll-detect content-fold">
|
|
<div class="content-fold__header">
|
|
<h3 class="content-section__title">모바일용 상세 설명</h3>
|
|
<button class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
|
<button class="btn primary btn-light" id="mblGoodsDc_update" name="btn_update_EtcInfo">모바일 상세설명 수정</button>
|
|
</div>
|
|
<div class="content-fold__content">
|
|
<div class="table-wrapper">
|
|
<table class="table">
|
|
<caption>모바일용 상세 설명</caption>
|
|
<colgroup>
|
|
<col style="width: 12%;">
|
|
<col>
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<th>설정</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<div class="custom-radio-container mr-5">
|
|
<div class="custom-radio">
|
|
<input type="radio" id="r-31" name="mblGoodsDcPcSameAt" value="Y" <c:if test="${ resultMap.goodsDtl.mblGoodsDcPcSameAt eq 'Y'}">checked</c:if>>
|
|
<label for="r-31">PC와 동일</label>
|
|
</div>
|
|
<div class="custom-radio">
|
|
<input type="radio" id="r-32" name="mblGoodsDcPcSameAt" value="N" <c:if test="${ resultMap.goodsDtl.mblGoodsDcPcSameAt eq 'N'}">checked</c:if>>
|
|
<label for="r-32">PC와 모바일 다르게 설정</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="mobileGoodsCn">
|
|
<th>모바일용 상품 설명</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<textarea class="textarea" title="에디터 입력" cols="30" rows="10" id="mblGoodsDc" name="mblGoodsDc">${ resultMap.goodsDtl.mblGoodsDc}</textarea>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section id="section09" class="content-section content-scroll-detect content-fold">
|
|
<div class="content-fold__header">
|
|
<h3 class="content-section__title">배송/반품정보</h3>
|
|
<button class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
|
<button class="btn primary btn-light cmnuseInfo" id="cmnuseInfoInnb_update" name="btn_update_EtcInfo">배송/반품정보 수정</button>
|
|
</div>
|
|
<div class="content-fold__content">
|
|
<div class="table-wrapper">
|
|
<table class="table">
|
|
<caption>배송/반품정보</caption>
|
|
<colgroup>
|
|
<col style="width: 12%;">
|
|
<col style="width: 44%;">
|
|
<col style="width: 44%;">
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<th>배송/반품정보 선택<span class="red-7">*</span></th>
|
|
<td colspan="2">
|
|
<div class="td-inner">
|
|
<div class="select-box">
|
|
<select title="배송/반품정보" id="cmnuseInfoInnb" class="cmnuseInfoInnb" name="cmnuseInfoInnb">
|
|
<option value="" >선택</option>
|
|
<c:forEach var="infoList" items="${ resultMap.infoList }" varStatus="">
|
|
<option value="${ infoList.cmnuseInfoInnb }" <c:if test="${infoList.cmnuseInfoInnb eq resultMap.goodsDtl.cmnuseInfoInnb }"> selected </c:if> >${ infoList.cmnuseInfoSj } </option>
|
|
<%-- <input type="hidden" value="${infoList.infoCn}" name="cmnuseInfoCn">--%>
|
|
</c:forEach>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<%-- <tr>--%>
|
|
<%-- <th>배송/반품정보 설명</th>--%>
|
|
<%-- <td colspan="2">--%>
|
|
<%-- <div class="ck-content">--%>
|
|
<%-- <c:forEach var="infoList" items="${ resultMap.infoList }" varStatus="">--%>
|
|
<%-- <c:if test="${infoList.cmnuseInfoInnb eq resultMap.goodsDtl.cmnuseInfoInnb }">--%>
|
|
<%-- <c:out value="${infoList.infoCn}" escapeXml="false"/>--%>
|
|
<%-- </c:if>--%>
|
|
<%-- </c:forEach>--%>
|
|
<%-- </div>--%>
|
|
<%-- </td>--%>
|
|
<%-- </tr>--%>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section id="section10" class="content-section content-scroll-detect content-fold">
|
|
<div class="content-fold__header">
|
|
<h3 class="content-section__title">배송</h3>
|
|
<button class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
|
<button class="btn primary btn-light dlvyGroup" id="dlvyGroupInnb_update" name="btn_update_EtcInfo">배송 수정</button>
|
|
</div>
|
|
<div class="content-fold__content">
|
|
<div class="table-wrapper">
|
|
<table class="table">
|
|
<caption>배송</caption>
|
|
<colgroup>
|
|
<col style="width: 12%;">
|
|
<col>
|
|
<col style="width: 12%;">
|
|
<col>
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<th>배송일 선택<span class="red-7">*</span></th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<div class="select-box">
|
|
<select title="배송그룹" class="dlvyGroupInnb" id="dlvyGroupInnb" name="dlvyGroupInnb">
|
|
<option value="" >선택</option>
|
|
<c:forEach var="dlvyGrpList" items="${ resultMap.dlvyGrpList }" varStatus="">
|
|
<option value="${ dlvyGrpList.dlvyGroupInnb }" <c:if test="${ resultMap.goodsDtl.dlvyGroupInnb eq dlvyGrpList.dlvyGroupInnb}">selected</c:if> >${ dlvyGrpList.dlvyGroupNm }</option>
|
|
</c:forEach>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<th>배송 안내 문구</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<input class="input-text full input-trim" type="text" id="dlvyGuidanceWordsCn" name="dlvyGuidanceWordsCn" value="${ resultMap.goodsDtl.dlvyGuidanceWordsCn}" title="배송안내문구">
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section id="section11" class="content-section content-scroll-detect content-fold">
|
|
<div class="content-fold__header">
|
|
<h3 class="content-section__title">입점 마케팅</h3>
|
|
<button class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
|
<button class="btn primary btn-light" id="nshopngIntrlckAt_update" name="btn_update_EtcInfo">입점마케팅 수정</button>
|
|
</div>
|
|
<div class="content-fold__content">
|
|
<div class="table-wrapper">
|
|
<table class="table">
|
|
<caption>입점 마케팅</caption>
|
|
<colgroup>
|
|
<col style="width: 12%;">
|
|
<col>
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<th>입점마케팅 연동여부</th>
|
|
<td>
|
|
<div class="b-checkbox-container">
|
|
<c:forEach var="epInfo" items="${ resultMap.epList }" varStatus="status">
|
|
<label class="b-checkbox checkbox" for="${epInfo.cd}EpIntrlckAt">
|
|
<input type="checkbox" value="Y" name="EpIntrlckAt" id="${epInfo.cd}EpIntrlckAt"
|
|
<c:choose>
|
|
<c:when test="${epInfo.cd eq 'naver'}">
|
|
<c:if test="${resultMap.goodsDtl.naverEpIntrlckAt eq'Y'}"> checked </c:if>
|
|
</c:when>
|
|
<c:when test="${epInfo.cd eq 'google'}">
|
|
<c:if test="${resultMap.goodsDtl.googleEpIntrlckAt eq'Y'}"> checked </c:if>
|
|
</c:when>
|
|
<c:when test="${epInfo.cd eq 'meta'}">
|
|
<c:if test="${resultMap.goodsDtl.metaEpIntrlckAt eq'Y'}"> checked </c:if>
|
|
</c:when>
|
|
<c:when test="${epInfo.cd eq 'mobion'}">
|
|
<c:if test="${resultMap.goodsDtl.mobionEpIntrlckAt eq'Y'}"> checked </c:if>
|
|
</c:when>
|
|
</c:choose>
|
|
>
|
|
<span class="check"></span>
|
|
<span class="control-label">
|
|
<span class="text">${epInfo.cdNm}</span>
|
|
</span>
|
|
</label>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p class="fyi gray-7">입점 마케팅 세부 설정은 입점 마케팅에서 가능합니다.</p>
|
|
</div>
|
|
</section>
|
|
<section id="section13" class="content-section content-scroll-detect content-fold">
|
|
<div class="content-fold__header">
|
|
<h3 class="content-section__title">함께하면 좋은 상품</h3>
|
|
<button class="content-fold__btn"><span class="visually-hidden">접기</span></button>
|
|
<button class="btn primary btn-light" id="btn_update_relateGoods">함께하면 좋은 상품 수정</button>
|
|
</div>
|
|
<div class="content-fold__content">
|
|
<div class="table-wrapper">
|
|
<table class="table">
|
|
<caption>함께하면 좋은 상품</caption>
|
|
<colgroup>
|
|
<col style="width: 12%;">
|
|
<col>
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<th>
|
|
<div>
|
|
<span class="ml-10">상품</span>
|
|
<br>
|
|
<c:if test="${not empty resultMap.relatedGoods.goodsInfo}">
|
|
<a type="button" onclick="fn_custom_open_modal('#modalDiv','#product-search','/mngr/goods/goodsmngr/selectGoodsSrchPopupForm',{'goodsKndCd':'01'}); return false;"
|
|
class="btn xsm primary mt-5">검색</a>
|
|
</c:if>
|
|
<c:if test="${empty resultMap.relatedGoods.goodsInfo}">
|
|
<a type="button" onclick="fn_open_modal('#modalDiv','#product-search','/mngr/goods/goodsmngr/selectGoodsSrchPopupForm',{'goodsKndCd':'01'}); return false;"
|
|
class="btn xsm primary mt-5">검색</a>
|
|
</c:if>
|
|
</div>
|
|
</th>
|
|
<td>
|
|
<div class="td-inner">
|
|
<div id="parentGoodsContainer" class="product-group">
|
|
<!-- 여기에 선택한 상품 정보가 추가됩니다 -->
|
|
<c:if test="${not empty resultMap.relatedGoods.goodsInfo}">
|
|
<c:forEach items="${ resultMap.relatedGoods.goodsInfo }" var="goodsInfo" varStatus="gdsInfoStatus">
|
|
<div class="product-group__item">
|
|
<input type="hidden" id="relatedGoodsId" name="relatedGoodsId" value="<c:out value="${goodsInfo.goodsInnb}"/>">
|
|
<input type="hidden" name="relatedGoodsNm" value="<c:out value="${goodsInfo.goodsNm}"/>">
|
|
<input type="hidden" name="relatedGoodsImg" value="<c:out value="${goodsInfo.goodsImgCours}"/>">
|
|
<input type="hidden" name="relatedGoodsPrice" value="<fmt:parseNumber value="${goodsInfo.slepric}"/>">
|
|
<input type="hidden" name="goodsSttusNm" value="<c:out value="${goodsInfo.goodsSttusNm}"/>">
|
|
<input type="hidden" name="expsrNm" value="<c:out value="${goodsInfo.expsrNm}"/>">
|
|
<span class="product-group__item-number"><c:out value="${gdsInfoStatus.count}"/></span>
|
|
<div class="product-group__image">
|
|
<img src="<c:out value="${cdnurl}${goodsInfo.goodsImgCours}"/>" onerror="this.src='/mngr/images/image_placeholder.png'" width="140" alt="<c:out value="${goodsInfo.goodsNm}"/>">
|
|
</div>
|
|
<div class="product-group__description">
|
|
<p><c:out value="${goodsInfo.goodsNm}"/></p>
|
|
<p class="product-group__description-price"><fmt:formatNumber value="${goodsInfo.slepric}" pattern="#,###"/>${curUnit}</p>
|
|
</div>
|
|
</div>
|
|
</c:forEach>
|
|
</c:if>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section id="section14" class="content-section">
|
|
<div class="content-fold__header">
|
|
<h3 class="content-section__title">변경이력</h3>
|
|
<button class="content-fold__btn">
|
|
<span class="visually-hidden">접기</span>
|
|
</button>
|
|
</div>
|
|
<div class="content-fold__content">
|
|
<c:choose>
|
|
<c:when test="${not empty resultMap.goodsLogList}">
|
|
<c:forEach var="logInfo" items="${resultMap.goodsLogList}" varStatus="logStatus">
|
|
<div class="goods-detail-log">
|
|
<p class="goods-detail-log__list">
|
|
<span class="goods-detail-log__date">${logInfo.registDt}</span>
|
|
<span class="goods-detail-log__description">관리자(${logInfo.mngrNm})가 상품을 '수정' 하였습니다(${logInfo.chngDv}) > </span>
|
|
<a href="javascript:void(0);" onclick="fn_admin_update_log_modal('<c:out value="${logInfo.goodsUpdtLogInnb}"/>')" >내역보기</a>
|
|
|
|
</p>
|
|
</div>
|
|
</c:forEach>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<div class="goods-detail-log">
|
|
<p class="goods-detail-log__list">
|
|
<span class="goods-detail-log__description"> 변경이력이 없습니다 </span>
|
|
</p>
|
|
</div>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="modalDiv">
|
|
|
|
</div>
|
|
<%--관리자 수정이력 내역보기 모달 --%>
|
|
<div id="logDiv"></div>
|
|
</main>
|
|
|
|
<!-- 결제수단 설정 모달 -->
|
|
<%--<div id="payment-setting" class="modal">--%>
|
|
<%-- <div class="modal-header">--%>
|
|
<%-- <h4>결제수단 설정</h4>--%>
|
|
<%-- </div>--%>
|
|
<%-- <div class="modal-content">--%>
|
|
<%-- <div class="table-wrapper">--%>
|
|
<%-- <table class="table">--%>
|
|
<%-- <caption>결제수단 설정</caption>--%>
|
|
<%-- <colgroup>--%>
|
|
<%-- <col style="width: 28%;">--%>
|
|
<%-- <col>--%>
|
|
<%-- </colgroup>--%>
|
|
<%-- <tbody>--%>
|
|
<%-- <tr>--%>
|
|
<%-- <th>카카오 페이</th>--%>
|
|
<%-- <td>--%>
|
|
<%-- <div class="td-inner">--%>
|
|
<%-- <div class="custom-radio-container">--%>
|
|
<%-- <div class="custom-radio">--%>
|
|
<%-- <input type="radio" id="r-90" name="r-group90">--%>
|
|
<%-- <label for="r-90">사용함</label>--%>
|
|
<%-- </div>--%>
|
|
<%-- <div class="custom-radio">--%>
|
|
<%-- <input type="radio" id="r-91" name="r-group90">--%>
|
|
<%-- <label for="r-91">사용안함</label>--%>
|
|
<%-- </div>--%>
|
|
<%-- </div>--%>
|
|
<%-- </div>--%>
|
|
<%-- </td>--%>
|
|
<%-- </tr>--%>
|
|
<%-- <tr>--%>
|
|
<%-- <th>네이버 페이</th>--%>
|
|
<%-- <td>--%>
|
|
<%-- <div class="td-inner">--%>
|
|
<%-- <div class="custom-radio-container">--%>
|
|
<%-- <div class="custom-radio">--%>
|
|
<%-- <input type="radio" id="r-92" name="r-group91" <c:if test="${resultMap.goodsDtl.nshopngIntrlckAt eq 'Y'}"> checked </c:if> >--%>
|
|
<%-- <label for="r-92">사용함</label>--%>
|
|
<%-- </div>--%>
|
|
<%-- <div class="custom-radio">--%>
|
|
<%-- <input type="radio" id="r-93" name="r-group91" <c:if test="${resultMap.goodsDtl.nshopngIntrlckAt eq 'N'}"> checked </c:if> >--%>
|
|
<%-- <label for="r-93">사용안함</label>--%>
|
|
<%-- </div>--%>
|
|
<%-- </div>--%>
|
|
<%-- </div>--%>
|
|
<%-- </td>--%>
|
|
<%-- </tr>--%>
|
|
<%-- </tbody>--%>
|
|
<%-- </table>--%>
|
|
<%-- </div>--%>
|
|
<%-- </div>--%>
|
|
<%-- <div class="modal-footer">--%>
|
|
<%-- <a href="#" rel="modal:close" class="btn outline">취소</a>--%>
|
|
<%-- <button class="btn primary">확인</button>--%>
|
|
<%-- </div>--%>
|
|
<%--</div>--%>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
<script defer>
|
|
//관리자 수정이력 내역보기 모달
|
|
const fn_admin_update_log_modal = (goodsUpdtLogInnb) => {
|
|
const url = '<c:out value="/mngr/goods/goodsmngr/selectGoodsLogDtl"/>'
|
|
const sopmalCd = $('#sopmalCd').val()
|
|
const goodsInnb = $('#goodsInnb').val()
|
|
|
|
$.ajax({
|
|
type: 'post',
|
|
contentType: 'application/json',
|
|
url: url,
|
|
data: JSON.stringify(
|
|
{'goodsUpdtLogInnb': goodsUpdtLogInnb
|
|
,'sopmalCd' : sopmalCd
|
|
,'goodsInnb' : goodsInnb
|
|
}
|
|
),
|
|
success: function (data) {
|
|
if (data.resBody != null) {
|
|
const result = JSON.parse(data.resBody.result);
|
|
|
|
if (result.message === 'success') {
|
|
fn_nvl(result.logDtl.registDt,'-')
|
|
const ctgryChngAt = fn_nvl(result.logDtl.ctgryChngAt,'-')
|
|
const goodsNm = fn_nvl(result.logDtl.goodsNm,'-')
|
|
const goodsSttusCd = fn_nvl(result.logDtl.goodsSttusCd,'-')
|
|
const expsrDvCd = fn_nvl(result.logDtl.expsrDvCd,'-')
|
|
const essntlOptnChngAt = fn_nvl(result.logDtl.essntlOptnChngAt,'-')
|
|
const purchsTrgterLmttAt = fn_nvl(result.logDtl.purchsTrgterLmttAt,'-')
|
|
const goodsImgChngAt = fn_nvl(result.logDtl.goodsImgChngAt,'-')
|
|
const pcGoodsDcChngAt = fn_nvl(result.logDtl.pcGoodsDcChngAt,'-')
|
|
const mblGoodsDcChngAt = fn_nvl(result.logDtl.mblGoodsDcChngAt,'-')
|
|
const registDt = fn_nvl(result.logDtl.registDt,'-')
|
|
const mngrNm = fn_nvl(result.logDtl.mngrNm,'-')
|
|
const chngDv = fn_nvl(result.logDtl.chngDv,'-')
|
|
|
|
const modal = `
|
|
<div id="adminUpdateLogDiv" class="modal" style="max-width: 1400px;">
|
|
<div class="modal-header">
|
|
<h4>상품 변경이력</h4>
|
|
</div>
|
|
<div class="modal-content">
|
|
<div class="table-wrapper">
|
|
<table class="table vertical">
|
|
<caption>관리자 변경내역 테이블</caption>
|
|
<!-- 각 열 width 설정 -->
|
|
<colgroup>
|
|
<col style="width: 12%;">
|
|
<col style="width: 10%;">
|
|
<col style="width: 4%;">
|
|
<col style="width: 4%;">
|
|
<col style="width: auto%;">
|
|
<col style="width: 4%;">
|
|
<col style="width: 4%;">
|
|
<col style="width: 4%;">
|
|
<col style="width: 4%;">
|
|
<col style="width: 4%;">
|
|
<col style="width: 4%;">
|
|
<col style="width: 4%;">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th>변경일시</th>
|
|
<th>관리자명</th>
|
|
<th>변경구분</th>
|
|
<th>카테고리</th>
|
|
<th>상품명</th>
|
|
<th>상품상태</th>
|
|
<th>노출구분</th>
|
|
<th>필수옵션</th>
|
|
<th>구매대상자제한</th>
|
|
<th>상품사진</th>
|
|
<th>PC상품설명</th>
|
|
<th>모바일상품설명</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td class="center">`+registDt+`</td>
|
|
<td class="center">`+mngrNm+`</td>
|
|
<td class="center">`+chngDv+`</td>
|
|
<td class="center">`+ctgryChngAt+`</td>
|
|
<td class="center">`+goodsNm+`</td>
|
|
<td class="center">`+goodsSttusCd+`</td>
|
|
<td class="center">`+expsrDvCd+`</td>
|
|
<td class="center">`+essntlOptnChngAt+`</td>
|
|
<td class="center">`+purchsTrgterLmttAt+`</td>
|
|
<td class="center">`+goodsImgChngAt+`</td>
|
|
<td class="center">`+pcGoodsDcChngAt+`</td>
|
|
<td class="center">`+mblGoodsDcChngAt+`</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="alert-btn-container">
|
|
<a href="javascript:void(0);" rel="modal:close" class="alert-btn alert-btn--confirm">닫기</a>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
//장바구니 담은 후 페이지 이동 여부 모달
|
|
$('#adminUpdateLogDiv').remove()
|
|
$('#logDiv').html(modal)
|
|
$('#adminUpdateLogDiv').modal()
|
|
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
|
|
//옵션 삭제 아이디 임시저장
|
|
const fn_del_optn_innb = function (delInnb, type) {
|
|
// 기존 값을 가져오기 없으면 빈 배열을 사용
|
|
let key = 'delGoodsOptnInnb_'+type;
|
|
let deleteIds = JSON.parse(localStorage.getItem(key)) || [];
|
|
|
|
// 새로운 값을 배열에 추가
|
|
deleteIds.push(delInnb);
|
|
|
|
// 배열을 문자열로 변환하여 다시 저장
|
|
localStorage.setItem(key, JSON.stringify(deleteIds));
|
|
}
|
|
|
|
//옵션 삭제 아이디 불러오기
|
|
const fn_get_del_optn_innb = function (type) {
|
|
let key = 'delGoodsOptnInnb_'+type;
|
|
// 값을 불러와서 배열로 변환 없으면 빈 배열을 반환
|
|
return JSON.parse(localStorage.getItem(key)) || [];
|
|
}
|
|
|
|
//상품옵션 로컬스토리지 저장정보 삭제
|
|
const fn_del_optn_innb_storage = function () {
|
|
localStorage.removeItem('delGoodsOptnInnb_normal')
|
|
localStorage.removeItem('delGoodsOptnInnb_invntry')
|
|
localStorage.removeItem('delGoodsOptnInnb_input')
|
|
localStorage.removeItem('delGoodsOptnInnb_added')
|
|
}
|
|
|
|
|
|
//관련 상품 검색 모달
|
|
const fn_open_search_modal = function (modalDivSltr, modalSlrt, url, param, callback) {
|
|
let submitType = 'GET';
|
|
//파라미터가 있을 경우 POST처리
|
|
if (!param) {
|
|
submitType = 'POST';
|
|
}
|
|
$.ajax({
|
|
type: submitType,
|
|
url: url,
|
|
data: param,
|
|
success: function (data) {
|
|
//callback함수가 없을 경우 default로 지정된 영역에 모달팝업 화면을 교체하고 화면 로딩
|
|
if (!callback) {
|
|
$(modalSlrt).remove();
|
|
$(modalDivSltr).html(data);
|
|
|
|
//최초오픈시에 관련상품 정보 있을 경우 실행
|
|
if(custom_open_modal_cnt === 0){
|
|
var tableBody = $("#appendList");
|
|
const cdnurl = $('#cdnurl').val()
|
|
selectedDtl.forEach((good, index) => {
|
|
|
|
var row = `
|
|
<tr id="choiseListId` +good.goodsId + `" class="draggable" ondblclick="fn_remove_append_goods_list(this)">
|
|
<td class="text-left">
|
|
<input type="hidden" id="goodsInnb" name="goodsInnb" value="` + good.goodsId + `"/>
|
|
<input type="hidden" id="goodsImgCours" name="goodsImgCours" value="`+cdnurl + good.goodsImg + `"/>
|
|
<input type="hidden" id="goodsNm" name="goodsNm" value="` + good.goodsNm + `"/>
|
|
<input type="hidden" id="slepric" name="slepric" value="` + good.goodsPrice + `"/>
|
|
<input type="hidden" id="goodsSttusNm" name="goodsSttusNm" value="` + good.goodsSttusNm + `"/>
|
|
<input type="hidden" id="expsrNm" name="expsrNm" value="` + good.expsrNm + `"/>
|
|
<div class="product-search-box__product">
|
|
<img src="`+cdnurl + good.goodsImg+ `"
|
|
onerror="this.src='<c:url value="/mngr/images/image_placeholder.png"/>'"
|
|
alt="` +good.goodsNm+ `" width="64">
|
|
` +good.goodsNm+ `
|
|
</div>
|
|
</td>
|
|
<td>` +fn_format_comma(good.goodsPrice)+ `</td>
|
|
<td>` +good.goodsSttusNm + '(' + good.expsrNm + ')' +`</td>
|
|
</tr>
|
|
`;
|
|
|
|
tableBody.append(row);
|
|
});
|
|
|
|
custom_open_modal_cnt++;
|
|
}
|
|
$(modalSlrt).modal();
|
|
} else {
|
|
callback(data);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
|
|
let custom_open_modal_cnt = 0;
|
|
//현재 등록된 관련 상품 정보
|
|
let selectedDtl = [];
|
|
const fn_custom_open_modal = (modalDivSltr, modalSlrt, url, param, callback) => {
|
|
|
|
selectedDtl = [];
|
|
|
|
if(custom_open_modal_cnt === 0){
|
|
$('.product-group__item').each(function() {
|
|
const goodsId = $(this).find('input[name="relatedGoodsId"]').val();
|
|
const goodsImg = $(this).find('input[name="relatedGoodsImg"]').val();
|
|
const goodsNm = $(this).find('input[name="relatedGoodsNm"]').val();
|
|
const goodsPrice = $(this).find('input[name="relatedGoodsPrice"]').val();
|
|
const goodsSttusNm = $(this).find('input[name="goodsSttusNm"]').val();
|
|
const expsrNm = $(this).find('input[name="expsrNm"]').val();
|
|
|
|
selectedDtl.push({
|
|
goodsId: goodsId,
|
|
goodsImg: goodsImg,
|
|
goodsNm: goodsNm,
|
|
goodsPrice: goodsPrice,
|
|
goodsSttusNm: goodsSttusNm,
|
|
expsrNm: expsrNm
|
|
});
|
|
});
|
|
|
|
}
|
|
fn_open_search_modal(modalDivSltr, modalSlrt, url, param, callback);
|
|
}
|
|
|
|
|
|
|
|
// 옵션타입-일반옵션-옵션값추가
|
|
$(document).on('click', '.optionVal98', function () {
|
|
let optnNm = $(this).siblings([name="optnNm1_normal"])
|
|
const optnNmVal = optnNm.val()
|
|
if(optnNmVal === null || optnNmVal === undefined || optnNmVal === ""){
|
|
alert('옵션명을 입력해주세요')
|
|
return;
|
|
}
|
|
|
|
const currentInvntrySldoutExpsrAt = $('#invntrySldoutExpsrAt_normal option:selected').val()
|
|
let dynamicInvntrySldoutExpsrAt = '';
|
|
if(currentInvntrySldoutExpsrAt==='Y'){
|
|
dynamicInvntrySldoutExpsrAt =
|
|
`
|
|
<div class="optionApply__miscText invntrySldoutExpsrAt_normal">노출</div>
|
|
`
|
|
}else{
|
|
dynamicInvntrySldoutExpsrAt =
|
|
`
|
|
<div class="optionApply__miscText invntrySldoutExpsrAt_normal">미노출</div>
|
|
`
|
|
}
|
|
|
|
|
|
//기준 radio의 id
|
|
const radio = $(this).closest('td').siblings('td').find('input[type="radio"]').first();
|
|
const radioStdrDvAt = radio.attr('id')
|
|
|
|
//기준 여부 라디오 아이디 설정
|
|
let stdrDvAt_normal_length = $(this).closest('td').siblings('td').find('div.custom-radio').length
|
|
let stdrDvAt_normal_num = radioStdrDvAt + stdrDvAt_normal_length
|
|
|
|
//노출여부 체크박스 아이디 설정
|
|
const chkbox = $(this).closest('td').siblings('td').find('input[type="checkbox"]').first();
|
|
const chkboxExpsrAt = chkbox.attr('id')
|
|
|
|
let optnExpsrAt_normal_length = $(this).closest('td').siblings('td').find('div.optnExpsrAt_normal').length
|
|
|
|
let optnExpsrAt_normal_num = removeTrailingNumber(chkboxExpsrAt) + optnExpsrAt_normal_length
|
|
|
|
const $closestTr = $(this).closest('tr');
|
|
|
|
let compnbDscntAt_normal_length = $(this).closest('td').siblings('td').find('div.compnbDscntAt_normal').length
|
|
|
|
let compnbDscntAt_normal_num = removeTrailingNumber(chkboxExpsrAt) + compnbDscntAt_normal_length
|
|
|
|
let sctnDscntAt_normal_length = $(this).closest('td').siblings('td').find('div.sctnDscntAt_normal').length
|
|
|
|
let sctnDscntAt_normal_num = removeTrailingNumber(chkboxExpsrAt) + sctnDscntAt_normal_length
|
|
|
|
let tdCount = 0;
|
|
|
|
//옵션명
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__inputList').append(`
|
|
<div class="optionApply__inputContainer" style="margin: 0">
|
|
<input class="input-text full input-trim `+optnNm.attr('id')+`" type="hidden" value="`+optnNmVal+`" title="일반옵션명" name="optnNm1_normal">
|
|
</div>
|
|
`);
|
|
//노출여부
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optnExpsrAt_normalList').append(`
|
|
<div class="optnExpsrAt_normal">
|
|
<label class="b-checkbox checkbox is-medium" for="`+optnExpsrAt_normal_num+`">
|
|
<input type="checkbox" id="`+optnExpsrAt_normal_num+`" value="Y" name="optnExpsrAt_normal" checked>
|
|
<span class="check"></span>
|
|
</label>
|
|
</div>
|
|
`);
|
|
//기준여부
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .stdrDvAt_normalList').append(`
|
|
<div class="custom-radio">
|
|
<input type="radio" value="Y" title="일반옵션 기준여부" id="`+stdrDvAt_normal_num+`" name="stdrDvAt_normal" style="display: flex;align-items: center;justify-content: center;height: 24px;">
|
|
<label for="`+stdrDvAt_normal_num+`"></label>
|
|
</div>
|
|
`);
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__inputList').append(`
|
|
<div class="optionApply__inputContainer">
|
|
<div class="optionApply__moveBtnContainer">
|
|
<button type="button" class="optionApply__moveBtn optionMove01 up"><span class="visually-hidden">위로</span></button>
|
|
<button type="button" class="optionApply__moveBtn optionMove01 down"><span class="visually-hidden">아래로</span></button>
|
|
</div>
|
|
<input class="input-text full input-trim" value="" type="text" title="일반옵션값" name="optnVal1_normal">
|
|
</div>
|
|
`);
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer').append(`
|
|
<input class="input-text full input-trim" type="text" title="일반옵션코드" name="optnCd1_normal">
|
|
`);
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer').append(`
|
|
<input class="input-text full input-trim" value="220600" type="text" title="HS Code" name="hscode_normal" maxlength="10">
|
|
`);
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer').append(`
|
|
<input class="input-text full" value="0.0" type="text" title="실무게(KG)" name="realWt_normal">
|
|
`);
|
|
|
|
//재고와 상관없이 판매일 경우 옵션재고 disabled
|
|
if($('input[name="invntryPolicyCd"]:checked').val() ==='02'){
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer').append(`
|
|
<input class="input-text full number right" value="0" type="text" title="일반옵션 재고" name="invntryQy_normal" disabled>
|
|
`);
|
|
}else{
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer').append(`
|
|
<input class="input-text full number right" value="0" type="text" title="일반옵션 재고" name="invntryQy_normal">
|
|
`);
|
|
}
|
|
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer').append(`
|
|
<input class="input-text full number right" value="" type="text" title="일반옵션 가용재고" disabled>
|
|
`);
|
|
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer').append(`
|
|
<input class="input-text full number right" value="0" type="text" title="일반옵션 소비자가" name="cnsmrpric_normal">
|
|
`);
|
|
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer').append(`
|
|
<input class="input-text full number right" value="0" type="text" title="일반옵션 판매가" name="slepric_normal">
|
|
`);
|
|
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer').append(`
|
|
<div class="input-container gap-4">
|
|
<div class="select-box">
|
|
<select class="short"
|
|
title="일반옵션 마일리지정책코드"
|
|
style="display: none;" name="mlgPolicyCd_normal">
|
|
<option value="01">통합</option>
|
|
<option value="02">개별</option>
|
|
</select>
|
|
<div class="nice-select short"
|
|
tabindex="0"><span class="current">통합</span>
|
|
<ul class="list">
|
|
<li data-value="01"
|
|
class="option selected">통합
|
|
</li>
|
|
<li data-value="02"
|
|
class="option">개별
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<input class="input-text sm number right"
|
|
value="" type="text" id="mlgAccmlAmt" name="mlgAccmlAmt_normal" disabled
|
|
title="일반옵션 마일리지구분코드">
|
|
<div class="select-box">
|
|
<select class="short"
|
|
title="일반옵션 마일리지구분코드"
|
|
style="display: none;" name="mlgAccmlCd_normal" disabled>
|
|
<option value="02">원</option>
|
|
<option value="01">%</option>
|
|
</select>
|
|
<div class="nice-select short disabled"
|
|
tabindex="0"><span class="current">원</span>
|
|
<ul class="list">
|
|
<li data-value=""
|
|
class="option selected">원
|
|
</li>
|
|
<li data-value=""
|
|
class="option">%
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`);
|
|
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer').append(
|
|
dynamicInvntrySldoutExpsrAt
|
|
);
|
|
|
|
// $closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer').append(
|
|
// `<div class="select-box">
|
|
// <select class="full"
|
|
// title="추가옵션 노출조건" name="optnRelateAt_added">
|
|
// <option value="Y">필수옵션1에만 노출
|
|
// </option>
|
|
// <option value="N">항시 노출
|
|
// </option>
|
|
// </select>
|
|
// </div>`
|
|
// );
|
|
|
|
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer').append(`
|
|
<input class="input-text full" type="text" title="일반옵션 정보" name="optnInfo_normal">
|
|
`);
|
|
|
|
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .compnbDscntAt_normalList').append(`
|
|
<div class="compnbDscntAt_normal">
|
|
<label class="b-checkbox checkbox" for="compnbDscntAt01_`+compnbDscntAt_normal_length+`">
|
|
<input type="checkbox" value="Y" id="compnbDscntAt01_`+compnbDscntAt_normal_length+`" name="compnbDscntAt_normal" checked>
|
|
<span class="check"></span><span class="control-label"></span>
|
|
</label>
|
|
</div>
|
|
`);
|
|
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .sctnDscntAt_normalList').append(`
|
|
<div class="sctnDscntAt_normal">
|
|
<label class="b-checkbox checkbox" for="sctnDscntAt01_`+sctnDscntAt_normal_length+`">
|
|
<input type="checkbox" value="Y" id="sctnDscntAt01_`+sctnDscntAt_normal_length+`" name="sctnDscntAt_normal" checked>
|
|
<span class="check"></span><span class="control-label"></span>
|
|
</label>
|
|
</div>
|
|
`);
|
|
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .manage-btn-container').append(`
|
|
<button class="btn xsm dark optionDel02">삭제</button>
|
|
`);
|
|
});
|
|
|
|
// 옵션타입-옵션명, 옵션값 입력값 제한(영문+숫자만)
|
|
$(document).on('input', 'input[name=optnNm1_normal], input[name=optnVal1_normal]', function () {
|
|
this.value = this.value.replace(/[^a-zA-Z0-9]/g, '');
|
|
});
|
|
|
|
// 실무게 자릿수 제한
|
|
$(document).on('input', 'input[name="realWt_normal"]', function () {
|
|
let value = this.value;
|
|
value = value.replace(/[^\d.]/g, ''); // 숫자와 .만 허용
|
|
value = value.replace(/(\..*)\./g, '$1'); // . 하나만 허용
|
|
value = value.replace(/(\.\d{1}).*/, '$1'); // 소수 1자리 제한
|
|
this.value = value;
|
|
});
|
|
|
|
// 하이픈 뒤에 숫자한자리만 남기기
|
|
function removeTrailingNumber(id) {
|
|
if(fn_is_empty(id)){
|
|
return '0';
|
|
}else{
|
|
return id.replace(/-(\d)\d*$/, '-$1');
|
|
}
|
|
|
|
}
|
|
|
|
// 입력옵션-입력옵션항목추가
|
|
$('#optionAdd02').on('click', function (event) {
|
|
event.preventDefault();
|
|
|
|
let rowCount = $('#input_option_tbody tr').length;
|
|
|
|
$(this).closest('.table').find('tbody').append(
|
|
`<tr>
|
|
<td>
|
|
<div class="draggable-icon-container">
|
|
<i class="icon icon_draggable"></i>
|
|
<span class="visually-hidden">순서
|
|
바꾸기</span>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<label class="b-checkbox checkbox is-medium" for="optnEssntlAt04-`+rowCount+`">
|
|
<input type="checkbox" id="optnEssntlAt04-`+rowCount+`" value="Y" name="optnEssntlAt_input">
|
|
<span class="check"></span>
|
|
</label>
|
|
</td>
|
|
<td>
|
|
<div class="optionApply__inputList">
|
|
<div
|
|
class="optionApply__inputContainer">
|
|
<input class="input-text full"
|
|
type="text" name="optnNm1_input"
|
|
title="입력옵션명">
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<button type="button" class="btn outline xsm optionDel01">삭제</button>
|
|
</td>
|
|
</tr>`
|
|
)
|
|
|
|
//행 추가 후, tableDnd 업데이트
|
|
$(this).closest(".table.draggable").tableDnDUpdate();
|
|
});
|
|
|
|
|
|
//추가구성옵션 - 대표 옵션명 변경시 하위 옵션명 전체적용
|
|
$(document).on('change', '[id^="optnNm1_added"]', function () {
|
|
const changeOptntr = $(this).closest('tr')
|
|
const addedOptnNms = changeOptntr.find('input[name="optnNm1_added"]')
|
|
const sourceId = addedOptnNms.first()
|
|
const targetIds = addedOptnNms.not(sourceId)
|
|
targetIds.val(sourceId.val())
|
|
})
|
|
|
|
|
|
// 추가구성옵션-옵션값추가
|
|
$(document).on('click', '.optionVal99', function () {
|
|
const optnNm = $(this).siblings([name = "optnNm1_normal"])
|
|
const optnNmVal = optnNm.val();
|
|
if (optnNmVal === '' || optnNmVal === undefined || optnNmVal === null) {
|
|
alert('옵션명을 입력해주세요')
|
|
return;
|
|
}
|
|
|
|
const currentInvntrySldoutExpsrAt = $('#invntrySldoutExpsrAt_added option:selected').val()
|
|
let dynamicInvntrySldoutExpsrAt = '';
|
|
if (currentInvntrySldoutExpsrAt === 'Y') {
|
|
dynamicInvntrySldoutExpsrAt =
|
|
`
|
|
<div class="optionApply__miscText invntrySldoutExpsrAt_added">노출</div>
|
|
`
|
|
} else {
|
|
dynamicInvntrySldoutExpsrAt =
|
|
`
|
|
<div class="optionApply__miscText invntrySldoutExpsrAt_added">미노출</div>
|
|
`
|
|
}
|
|
|
|
|
|
//필수 체크박스 id
|
|
const checkbox = $(this).closest('td').siblings('td').find('input[type="checkbox"][id^="optnEssntlAt03-"]').first();
|
|
const OptnEssntlAtId = checkbox.attr('id')
|
|
let OptnEssntlAt_added_length = $(this).closest('td').siblings('td').find('div.optnExpsrAt_added').length
|
|
let OptnEssntlAtt_added_num = removeTrailingNumber(OptnEssntlAtId) + OptnEssntlAt_added_length
|
|
|
|
|
|
//노출여부 체크박스 아이디 설정
|
|
const chkbox = $(this).closest('td').siblings('td').find('input[type="checkbox"][id^="optnExpsrAt03-"]').first();
|
|
const optnExpsrAtId = chkbox.attr('id')
|
|
|
|
let optnExpsrAt_added_length = $(this).closest('td').siblings('td').find('div.optnExpsrAt_added').length
|
|
let optnExpsrAt_added_num = removeTrailingNumber(optnExpsrAtId) + optnExpsrAt_added_length
|
|
|
|
//복수할인 체크박스 아이디 설정
|
|
const compnbDscntAtchkbox = $(this).closest('td').siblings('td').find('input[type="checkbox"][id^="compnbDscntAt03_"]').first();
|
|
const compnbDscntAtId = compnbDscntAtchkbox.attr('id')
|
|
|
|
let compnbDscntAt03_length = $(this).closest('td').siblings('td').find('div.optnExpsrAt_added').length
|
|
let compnbDscntAt03_num = removeTrailingNumber(compnbDscntAtId) + compnbDscntAt03_length
|
|
|
|
|
|
//구간할인 체크박스 아이디 설정
|
|
const sctnDscntAt03chkbox = $(this).closest('td').siblings('td').find('input[type="checkbox"][id^="sctnDscntAt03_"]').first();
|
|
const sctnDscntAt03chkboxId = sctnDscntAt03chkbox.attr('id')
|
|
|
|
let sctnDscntAt03_length = $(this).closest('td').siblings('td').find('div.optnExpsrAt_added').length
|
|
let sctnDscntAt03_num = removeTrailingNumber(sctnDscntAt03chkboxId) + sctnDscntAt03_length
|
|
|
|
|
|
const $closestTr = $(this).closest('tr');
|
|
|
|
//대표 옵션 체크박스 추가시 하위 체크박스 자동 설정
|
|
if (checkbox.prop('checked')) {
|
|
$closestTr.find('td:eq(1) .optnEssntlAt_addedList').append(
|
|
`
|
|
<div class="optnEssntlAt_added">
|
|
<!-- <label class="b-checkbox checkbox is-medium" for="` + OptnEssntlAtt_added_num + `">-->
|
|
<input type="checkbox" value="Y" id="` + OptnEssntlAtt_added_num + `" name="optnEssntlAt_added" checked="checked" class="checked">
|
|
<span class="check"></span>
|
|
<!-- </label>-->
|
|
</div>
|
|
`
|
|
);
|
|
} else {
|
|
$closestTr.find('td:eq(1) .optnEssntlAt_addedList').append(
|
|
`
|
|
<div class="optnEssntlAt_added">
|
|
<!-- <label class="b-checkbox checkbox is-medium" for="` + OptnEssntlAtt_added_num + `">-->
|
|
<input type="checkbox" value="Y" id="` + OptnEssntlAtt_added_num + `" name="optnEssntlAt_added">
|
|
<span class="check"></span>
|
|
<!-- </label>-->
|
|
</div>
|
|
`
|
|
);
|
|
}
|
|
|
|
|
|
$closestTr.find('td:eq(2) .optionApply__inputList').append(
|
|
`
|
|
<div class="optionApply__inputContainer">
|
|
<input class="input-text full ` + optnNm.attr('id') + ` " type="hidden" value="` + optnNmVal + `" title="추가옵션명" name="optnNm1_added">
|
|
<input type="hidden" name="goodsOptnInnb_added" value="0"/>
|
|
</div>
|
|
`
|
|
);
|
|
$closestTr.find('td:eq(3) .optnExpsrAt_addedList').append(
|
|
`
|
|
<div class="optnExpsrAt_added">
|
|
<label class="b-checkbox checkbox is-medium" for="` + optnExpsrAt_added_num + `">
|
|
<input type="checkbox" id="` + optnExpsrAt_added_num + `" value="Y" name="optnExpsrAt_added" checked>
|
|
<span class="check"></span>
|
|
</label>
|
|
</div>
|
|
`
|
|
);
|
|
$closestTr.find('td:eq(4) .optionApply__inputList').append(
|
|
`<div class="optionApply__inputContainer">
|
|
<div class="optionApply__moveBtnContainer">
|
|
<button type="button" class="optionApply__moveBtn optionMove02 up"><span class="visually-hidden">위로</span></button>
|
|
<button type="button" class="optionApply__moveBtn optionMove02 down"><span class="visually-hidden">아래로</span></button>
|
|
</div>
|
|
<input class="input-text full" value="" type="text" title="추가옵션값" name="optnVal1_added">
|
|
</div>`
|
|
);
|
|
$closestTr.find('td:eq(5) .optionApply__priceContainer').append(
|
|
`
|
|
<input class="input-text full" value="" type="text" title="추가옵션상품코드" name="optnCd1_added">
|
|
`
|
|
);
|
|
|
|
if ($('input[name="invntryPolicyCd"]:checked').val() === '02') {
|
|
$closestTr.find('td:eq(6) .optionApply__priceContainer').append(
|
|
`
|
|
<input class="input-text full number right" value="0" type="text" title="추가옵션 재고" name="invntryQy_added" disabled>
|
|
`
|
|
);
|
|
} else {
|
|
$closestTr.find('td:eq(6) .optionApply__priceContainer').append(
|
|
`
|
|
<input class="input-text full number right" value="0" type="text" title="추가옵션 재고" name="invntryQy_added">
|
|
`
|
|
);
|
|
}
|
|
|
|
$closestTr.find('td:eq(7) .optionApply__priceContainer').append(
|
|
`
|
|
<input class="input-text full number right" value="" type="text" title="추가옵션 가용재고" disabled >
|
|
`
|
|
);
|
|
|
|
$closestTr.find('td:eq(8) .optionApply__priceContainer').append(
|
|
`
|
|
<input class="input-text full number right" value="0" type="text" title="추가옵션 소비자가" name="cnsmrpric_added">
|
|
`
|
|
);
|
|
|
|
$closestTr.find('td:eq(9) .optionApply__priceContainer').append(
|
|
`
|
|
<input class="input-text full number right" value="0" type="text" title="추가옵션 판매가" name="slepric_added">
|
|
`
|
|
);
|
|
|
|
$closestTr.find('td:eq(10) .optionApply__priceContainer').append(
|
|
`
|
|
<div class="input-container gap-4">
|
|
<div class="select-box">
|
|
<select class="short"
|
|
title="추가옵션 마일리지정책코드" name="mlgPolicyCd_added">
|
|
<option value="01">통합
|
|
</option>
|
|
<option value="02">개별
|
|
</option>
|
|
</select>
|
|
</div>
|
|
<input
|
|
class="input-text xsm number right"
|
|
value="" type="text"
|
|
title="추가옵션 마일리지적립금액" name="mlgAccmlAmt_added" disabled>
|
|
<div class="select-box">
|
|
<select class="short"
|
|
title="추가옵션 마일리지적립구분코드" name="mlgAccmlCd_added" disabled>
|
|
<option value="02">원
|
|
</option>
|
|
<option value="01">%
|
|
</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
`
|
|
);
|
|
|
|
$closestTr.find('td:eq(11) .optionApply__priceContainer').append(
|
|
dynamicInvntrySldoutExpsrAt
|
|
);
|
|
|
|
$closestTr.find('td:eq(12) .optionApply__priceContainer').append(
|
|
`
|
|
<input class="input-text full" value="" type="text" title="추가옵션 정보" name="optnInfo_added">
|
|
`
|
|
);
|
|
|
|
$closestTr.find('td:eq(13) .compnbDscntAt_addedList').append(
|
|
`
|
|
<div class="compnbDscntAt_added">
|
|
<label class="b-checkbox checkbox" for="`+compnbDscntAt03_num+`">
|
|
<input type="checkbox" value="Y" id="`+compnbDscntAt03_num+`" name="compnbDscntAt_added" checked>
|
|
<span class="check"></span><span class="control-label"></span>
|
|
</label>
|
|
</div>
|
|
`
|
|
);
|
|
$closestTr.find('td:eq(14) .sctnDscntAt_addedList').append(
|
|
`
|
|
<div class="sctnDscntAt_added">
|
|
<label class="b-checkbox checkbox" for="`+sctnDscntAt03_num+`">
|
|
<input type="checkbox" value="Y" id="`+sctnDscntAt03_num+`" name="sctnDscntAt_added" checked>
|
|
<span class="check"></span><span class="control-label"></span>
|
|
</label>
|
|
</div>
|
|
`
|
|
);
|
|
|
|
$closestTr.find('td:eq(15) .manage-btn-container').append(
|
|
`<button type="button" class="btn xsm dark optionDel03">삭제</button>`
|
|
);
|
|
|
|
// 셀렉트박스 스타일 적용
|
|
$(this).closest('.table').find('.select-box > select').niceSelect();
|
|
|
|
});
|
|
|
|
// 추가옵션 옵션 삭제
|
|
$(document).on('click', '.optionDel01', function () {
|
|
|
|
const $closestTr = $(this).closest('tr');
|
|
|
|
//삭제할 옵션값의 상품옵션고유번호 찾고 추가
|
|
const delEle = $closestTr.find('input[name="goodsOptnInnb_added"]')
|
|
|
|
|
|
//삭제할 상품옵션 저장
|
|
if(!fn_is_empty(delEle)){
|
|
|
|
delEle.each(function () {
|
|
fn_del_optn_innb($(this).val(), "added")
|
|
})
|
|
|
|
}
|
|
|
|
$(this).closest('tr').remove();
|
|
|
|
//행 삭제 후, tableDnd 업데이트
|
|
$(this).closest(".table.draggable").tableDnDUpdate();
|
|
});
|
|
|
|
// 옵션타입-일반옵션-옵션값삭제
|
|
$(document).on('click', '.optionDel02', function () {
|
|
var optionIndex = $(this).index();
|
|
var $closestTr = $(this).closest('tr');
|
|
|
|
if(optionIndex === 0){
|
|
return false;
|
|
}
|
|
|
|
//삭제할 옵션값의 상품옵션고유번호 찾고 추가
|
|
|
|
const delEle = $closestTr.find('input[name="goodsOptnInnb_normal"]').eq(optionIndex)
|
|
const delOtpnInnb = delEle.val();
|
|
//삭제할 상품옵션 저장
|
|
if(!fn_is_empty(delOtpnInnb) || delOtpnInnb > 0){
|
|
fn_del_optn_innb(delOtpnInnb, "normal")
|
|
}
|
|
|
|
let tdCount = 0;
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__inputList .optionApply__inputContainer').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optnExpsrAt_normalList .optnExpsrAt_normal').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .stdrDvAt_normalList .custom-radio').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__inputContainer').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer .input-text').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer .input-text').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer .input-text').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer .input-text').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer .input-text').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer .input-text').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer .input-text').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer .input-container').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer .optionApply__miscText').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .optionApply__priceContainer .input-text').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .compnbDscntAt_normalList .compnbDscntAt_normal').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .sctnDscntAt_normalList .sctnDscntAt_normal').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(' + tdCount++ + ') .manage-btn-container .btn').eq(optionIndex).remove();
|
|
|
|
});
|
|
|
|
// 추가구성옵션-옵션값삭제
|
|
$(document).on('click', '.optionDel03', function () {
|
|
var optionIndex = $(this).index();
|
|
var $closestTr = $(this).closest('tr');
|
|
|
|
if($(this).index() === 0){
|
|
return false;
|
|
}
|
|
|
|
//삭제할 옵션값의 상품옵션고유번호 찾고 추가
|
|
const delEle = $closestTr.find('input[name="goodsOptnInnb_added"]').eq(optionIndex)
|
|
const delOtpnInnb = delEle.val();
|
|
|
|
//삭제할 상품옵션 저장
|
|
if(!fn_is_empty(delOtpnInnb) || delOtpnInnb > 0){
|
|
fn_del_optn_innb(delOtpnInnb, "added")
|
|
}
|
|
|
|
|
|
$closestTr.find('td:eq(1) .optnEssntlAt_addedList .optnEssntlAt_added').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(2) .optionApply__inputList .optionApply__inputContainer').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(3) .optnExpsrAt_addedList .optnExpsrAt_added').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(4) .optionApply__inputContainer').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(5) .optionApply__priceContainer .input-text').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(6) .optionApply__priceContainer .input-text').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(7) .optionApply__priceContainer .input-text').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(8) .optionApply__priceContainer .input-text').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(9) .optionApply__priceContainer .input-text').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(10) .optionApply__priceContainer .input-container').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(11) .optionApply__priceContainer .optionApply__miscText').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(12) .optionApply__priceContainer .input-text').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(13) .compnbDscntAt_addedList .compnbDscntAt_added').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(14) .sctnDscntAt_addedList .sctnDscntAt_added').eq(optionIndex).remove();
|
|
$closestTr.find('td:eq(15) .manage-btn-container .btn').eq(optionIndex).remove();
|
|
});
|
|
|
|
// 옵션타입-일반옵션-옵션값 순서변경
|
|
$(document).on('click', '.optionMove01', function () {
|
|
var $closestTr = $(this).closest('tr');
|
|
var optionIndex = $(this).closest('.optionApply__inputContainer').index();
|
|
|
|
const selectors = [
|
|
'.optionApply__inputList',
|
|
'.optnExpsrAt_normalList',
|
|
'.stdrDvAt_normalList',
|
|
'.optionApply__inputList',
|
|
'.optionApply__priceContainer',
|
|
'.optionApply__priceContainer',
|
|
'.optionApply__priceContainer',
|
|
'.optionApply__priceContainer',
|
|
'.optionApply__priceContainer',
|
|
'.optionApply__priceContainer',
|
|
'.optionApply__priceContainer',
|
|
'.optionApply__priceContainer',
|
|
'.optionApply__priceContainer',
|
|
'.optionApply__priceContainer',
|
|
'.compnbDscntAt_normalList',
|
|
'.sctnDscntAt_normalList',
|
|
'.manage-btn-container'
|
|
];
|
|
const targets = selectors.map((sclass, tdCount) => {
|
|
return $closestTr.find('td:eq(' + tdCount + ') ' + sclass);
|
|
});
|
|
const isUp = $(this).hasClass('up');
|
|
const maxLength = targets[0].children().length;
|
|
|
|
targets.forEach(function (target) {
|
|
const current = target.children().eq(optionIndex);
|
|
if (isUp) {
|
|
if (optionIndex > 0)
|
|
current.insertBefore(target.children().eq(optionIndex - 1));
|
|
} else {
|
|
if (optionIndex < maxLength - 1)
|
|
current.insertAfter(target.children().eq(optionIndex + 1));
|
|
}
|
|
});
|
|
});
|
|
|
|
// 추가구성옵션-옵션값 순서변경
|
|
$(document).on('click', '.optionMove02', function () {
|
|
var $closestTr = $(this).closest('tr');
|
|
var optionIndex = $(this).closest('.optionApply__inputContainer').index();
|
|
var optnExpsrAt_addedList = $closestTr.find('td:eq(3) .optnExpsrAt_addedList');
|
|
var $optionApplyInputList = $closestTr.find('td:eq(4) .optionApply__inputList');
|
|
var $optionApplyPriceList = $closestTr.find('td:eq(5) .optionApply__priceContainer');
|
|
var $optionApplyPriceList2 = $closestTr.find('td:eq(6) .optionApply__priceContainer');
|
|
var $optionApplyPriceList3 = $closestTr.find('td:eq(7) .optionApply__priceContainer');
|
|
var $optionApplyPriceList4 = $closestTr.find('td:eq(8) .optionApply__priceContainer');
|
|
var $optionApplyPriceList5 = $closestTr.find('td:eq(9) .optionApply__priceContainer');
|
|
var $optionApplyInputList2 = $closestTr.find('td:eq(10) .input-container');
|
|
var $optionApplymiscTextList = $closestTr.find('td:eq(11) .optionApply__miscText');
|
|
var $optionApplyInputTextList = $closestTr.find('td:eq(12) .input-text');
|
|
var $compnbDscntAt_addedList = $closestTr.find('td:eq(13) .compnbDscntAt_addedList');
|
|
var $sctnDscntAt_addedList = $closestTr.find('td:eq(14) .sctnDscntAt_addedList');
|
|
var $optionApplyBtnList = $closestTr.find('td:eq(15) .manage-btn-container');
|
|
|
|
if ($(this).hasClass('up')) {
|
|
if (optionIndex > 0) {
|
|
optnExpsrAt_addedList.children().eq(optionIndex).insertBefore(optnExpsrAt_addedList.children().eq(optionIndex - 1));
|
|
$optionApplyInputList.children().eq(optionIndex).insertBefore($optionApplyInputList.children().eq(optionIndex - 1));
|
|
$optionApplyPriceList.children().eq(optionIndex).insertBefore($optionApplyPriceList.children().eq(optionIndex - 1));
|
|
$optionApplyPriceList2.children().eq(optionIndex).insertBefore($optionApplyPriceList2.children().eq(optionIndex - 1));
|
|
$optionApplyPriceList3.children().eq(optionIndex).insertBefore($optionApplyPriceList3.children().eq(optionIndex - 1));
|
|
$optionApplyPriceList4.children().eq(optionIndex).insertBefore($optionApplyPriceList4.children().eq(optionIndex - 1));
|
|
$optionApplyPriceList5.children().eq(optionIndex).insertBefore($optionApplyPriceList5.children().eq(optionIndex - 1));
|
|
$optionApplyInputList2.eq(optionIndex).insertBefore($optionApplyInputList2.eq(optionIndex - 1));
|
|
$optionApplymiscTextList.children().eq(optionIndex).insertBefore($optionApplymiscTextList.children().eq(optionIndex - 1));
|
|
$optionApplyInputTextList.eq(optionIndex).insertBefore($optionApplyInputTextList.eq(optionIndex - 1));
|
|
$compnbDscntAt_addedList.children().eq(optionIndex).insertBefore($compnbDscntAt_addedList.children().eq(optionIndex - 1));
|
|
$sctnDscntAt_addedList.children().eq(optionIndex).insertBefore($sctnDscntAt_addedList.children().eq(optionIndex - 1));
|
|
$optionApplyBtnList.children().eq(optionIndex).insertBefore($optionApplyBtnList.children().eq(optionIndex - 1));
|
|
}
|
|
} else {
|
|
if (optionIndex < $optionApplyInputList.children().length - 1) {
|
|
optnExpsrAt_addedList.children().eq(optionIndex).insertAfter(optnExpsrAt_addedList.children().eq(optionIndex + 1));
|
|
$optionApplyInputList.children().eq(optionIndex).insertAfter($optionApplyInputList.children().eq(optionIndex + 1));
|
|
$optionApplyPriceList.children().eq(optionIndex).insertAfter($optionApplyPriceList.children().eq(optionIndex + 1));
|
|
$optionApplyPriceList2.children().eq(optionIndex).insertAfter($optionApplyPriceList2.children().eq(optionIndex + 1));
|
|
$optionApplyPriceList3.children().eq(optionIndex).insertAfter($optionApplyPriceList3.children().eq(optionIndex + 1));
|
|
$optionApplyPriceList4.children().eq(optionIndex).insertAfter($optionApplyPriceList4.children().eq(optionIndex + 1));
|
|
$optionApplyPriceList5.children().eq(optionIndex).insertAfter($optionApplyPriceList5.children().eq(optionIndex + 1));
|
|
$optionApplyInputList2.eq(optionIndex).insertAfter($optionApplyInputList2.eq(optionIndex + 1));
|
|
$optionApplymiscTextList.children().eq(optionIndex).insertAfter($optionApplymiscTextList.children().eq(optionIndex + 1));
|
|
$optionApplyInputTextList.eq(optionIndex).insertAfter($optionApplyInputTextList.eq(optionIndex + 1));
|
|
$compnbDscntAt_addedList.children().eq(optionIndex).insertAfter($compnbDscntAt_addedList.children().eq(optionIndex + 1));
|
|
$sctnDscntAt_addedList.children().eq(optionIndex).insertAfter($sctnDscntAt_addedList.children().eq(optionIndex + 1));
|
|
$optionApplyBtnList.children().eq(optionIndex).insertAfter($optionApplyBtnList.children().eq(optionIndex + 1));
|
|
}
|
|
}
|
|
});
|
|
|
|
$(window).on('load', function () {
|
|
|
|
//재고옵션 있을 경우
|
|
if( $('#r-502').prop('checked')){
|
|
$('#r-502').click();
|
|
}
|
|
|
|
//모바일용 상세설명 여부가 pc와 동일일 경우
|
|
if($('#r-31').prop('checked')){
|
|
$('#r-31').click();
|
|
}
|
|
})
|
|
|
|
|
|
|
|
function convertMinutesToTime(minutes) {
|
|
let hours = Math.floor(minutes / 60);
|
|
let mins = minutes % 60;
|
|
|
|
// 두 자리 숫자로 포맷팅
|
|
let formattedHours = hours.toString().padStart(2, '0');
|
|
let formattedMinutes = mins.toString().padStart(2, '0');
|
|
|
|
return formattedHours+':'+formattedMinutes;
|
|
}
|
|
|
|
|
|
</script>
|