jsh77b 5 tahun lalu
induk
melakukan
215d432e27

+ 7 - 4
src/main/java/com/style24/persistence/domain/Cart.java

@@ -1,11 +1,9 @@
 package com.style24.persistence.domain;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.annotation.JsonInclude;
 import com.style24.persistence.TscBaseDomain;
-import lombok.Data;
 
-import java.util.List;
+import lombok.Data;
 
 /**
  * 장바구니
@@ -18,7 +16,7 @@ import java.util.List;
 public class Cart extends TscBaseDomain {
 	// 장바구니 정보
 	private int cartSq;				// 장바구니 번호
-	private int cartDtlSq;          // 장바구니 상세 번호
+	private int cartDtlSq;			// 장바구니 상세 번호
 	private int custNo;				// 고객번호
 	private int planDtlSq;			// 기획전상세번호
 	private int goodsQty;			// 장바구니 등록 수량
@@ -58,4 +56,9 @@ public class Cart extends TscBaseDomain {
 	private String cpnNm;
 	private String rdCpnNm;
 	private String usedDt;
+
+	private String itemOpts;	// 단품옵션
+	private Integer updCartSq;	// 업데이트할 장바구니번호
+	private Integer delCartSq;	// 삭제할 장바구니번호(0이면 삭제할 장바구니번호 없음)
+
 }

+ 2 - 1
src/main/java/com/style24/persistence/domain/Goods.java

@@ -73,7 +73,8 @@ public class Goods extends TscBaseDomain {
 	private String colorCd;		//색상코드
 	private String colorNM;		//색상코드명
 	private String brandnm;		//브랜드명
-	private String brandGrpNm;	//브랜드그룹명
+	private int brandGroupNo;	//브랜드그룹번호
+	private String brandGroupNm;	//브랜드그룹명
 	private String frontGb;		//프론트구분
 	private String isApp;		//앱구분
 	private String siteCd;		//사이트코드

+ 28 - 10
src/main/webapp/WEB-INF/views/web/customer/JoinFormWeb.html

@@ -206,7 +206,7 @@
 			$usable.show();
 			custIdCheck = true;
 		}
-
+		fnPossibleJoin();
 	};
 
 	// 비밀번호 입력
@@ -300,6 +300,7 @@
 				$avlConPwd.show();
 				passwdCheck = true;
 			}
+			fnPossibleJoin();
 		}
 	};
 
@@ -340,6 +341,7 @@
 			$dupEmailDiv.hide();
 			emailCheck = true;
 		}
+		fnPossibleJoin();
 	};
 
 	//	휴대폰 확인
@@ -348,7 +350,7 @@
 		let cellPhnno = $(this).val();
 		let validation;
 
-		if (gagajf.isNull(cellPhnno)) {
+		if (!gagajf.isNull(cellPhnno)) {
 			if ( 9 < cellPhnno < 12) {
 				$failPhnno.hide();
 				validation = true;
@@ -374,11 +376,12 @@
 			$dupPhnno.show();
 			// $cellPhnno.text(result.cellPhnno);
 			// $cellPhnno.show();
-			authCheck = false;
+			phoneCheck = false;
 		} else {
 			$dupPhnno.hide();
-			authCheck = true;
+			phoneCheck = true;
 		}
+		fnPossibleJoin();
 	};
 	
 
@@ -393,7 +396,7 @@
 			let custInfo = {};
 			custInfo.encData = encData;
 			let jsonData = JSON.stringify(custInfo);
-			gagajf.ajaxJsonSubmit('/customer/authentication/validation', jsonData, fnInfoConfirmCallBack);
+			gagajf.ajaxJsonSubmit('/customer/authentication/check', jsonData, fnInfoConfirmCallBack);
 		}
 	};
 
@@ -411,18 +414,36 @@
 			$dupPhnno.hide();
 			authCheck = true;
 		}
+		fnPossibleJoin();
 	};
 
 	// 저장
 	$('#btnJoin').on('click', function () {
+		mcxDialog.confirm("회원가입을 하시겠습니까?", {
+			cancelBtnText: "취소",
+			sureBtnText: "확인",
+			sureBtnClick: function() {
+				$('#btnJoin').attr('disabled', true);
+				let jsonData = JSON.stringify($('#joinForm').serializeObject());
+				gagajf.ajaxJsonSubmit('/customer/join/save', jsonData, fnJoinSaveCallback);
+			}
+		});
+	});
 
+	var fnJoinSaveCallback = function (result) {
+		if (result.isJoin) {
+			//신규회원 혜택 안내 페이지 없음
+			cfnGoToPage(_PAGE_CUSTOMER_JOIN_COMPLETE);
+		} else {
+			$('#btnJoin').attr('disabled', false);
+		}
 
-	});
+	};
 
 
 	// 가입 가능한지 확인
 	var fnPossibleJoin = function () {
-		const $btnJoin = $('#btnJoin')
+		const $btnJoin = $('#btnJoin');
 		if (custIdCheck && passwdCheck && emailCheck && phoneCheck && authCheck ) {
 			$btnJoin.attr('disabled', false);
 		} else {
@@ -430,9 +451,6 @@
 		}
 	};
 
-	$(document).ready(function() {
-		fnPossibleJoin();
-	});
 
 /*]]>*/
 </script>

+ 124 - 7
src/main/webapp/ux/pc/css/common.css

@@ -1,8 +1,8 @@
 @charset "utf-8";
 
-@import "reset.css?v=20210219";
+@import "reset.css";
 @import "font.css";
-@import "layout.css?v=20210219";
+@import "layout.css";
 
 
 /* h1 ~ h6  */
@@ -627,11 +627,11 @@ content: "〉";font-size: 12px;padding-left: 8px;
     background-repeat: no-repeat;
     background-position: 50% 50%;
 }
-.pageNav .disabled a {width:15px; height: 14px; background: url('/images/pc/ico_paging.png')no-repeat 0 11px; text-indent: -9999px;}
-.pageNav .disabled.prev a {width:8px; height: 14px; background-position: -23px 11px; margin-left: 29px;}
-.pageNav .next a,.pageNav > li:last-child a { width:15px; height: 14px; background: url('/images/pc/ico_paging.png')no-repeat -64px 11px; text-indent: -9999px;}
+.pageNav .disabled a {width:15px; height: 34px; background: url('/images/pc/ico_paging.png')no-repeat 0 11px; text-indent: -9999px;}
+.pageNav .disabled.prev a {width:8px; height: 34px; background-position: -23px 11px; margin-left: 29px;}
+.pageNav .next a,.pageNav > li:last-child a { width:15px; height: 34px; background: url('/images/pc/ico_paging.png')no-repeat -64px 11px; text-indent: -9999px;}
 .pageNav > li:last-child a {margin-left: 29px;}
-.pageNav .next a{width: 8px; height: 14px; background-position: -47px 11px;}
+.pageNav .next a{width: 8px; height: 34px; background-position: -47px 11px;}
 .pageNav > li.active > a {color: #fd4802;}
 .pageNav > li.active > a::after {
   content: ''; display: block; width: 100%; height: 2px; background: #fd4802;
@@ -1030,11 +1030,128 @@ input[type="file"] {
 }
 .select_options li:hover{background-color: #dddddd;}
 .select_options li[rel="hide"] {display: none;}
+.select_options li.disabled {text-decoration:line-through; background:#f5f5f5; color:#bbb}
+.select_options li.disabled:hover,
+.select_options li.disabled:active {cursor:default;}
 .select_dress:active, .select_dress.active {background-color: #ffffff;border: 1px solid #222222;border-bottom: 1px solid #dddddd;}
 .select_dress:active:after, .select_dress.active:after {top: 9px;border-color: transparent transparent #888888 transparent;}
 
+/* select-custom */
+.select_custom {
+	cursor: pointer;
+    display: inline-block;
+    position: relative;
+    font-size: 16px;
+    color: #333333;
+    width: 100%;
+    height: 40px;
+}
+.select_custom .combo {
+    display: inline-block;
+    position: relative;
+    width: 100%;
+}
+.select_custom .combo .select {
+	position: relative;
+    box-sizing: border-box;
+    height: 40px;
+    line-height: 1;
+    cursor: pointer;
+    padding: 10px 15px;
+    background-color: #ffffff;
+    border: 1px solid #dddddd;
+}
+.select_custom .combo .select:after {
+    /* content: '▼'; */
+    /* position: absolute; */
+    /* top: 50%; */
+    /* right: 10px; */
 
-/* list-type */
+	content: '';
+    width: 0;
+    height: 0;
+    box-sizing: border-box;
+    position: absolute;
+    top: 16px;
+    right: 10px;
+    border: 6px solid transparent;
+    border-color: #888888 transparent transparent transparent;
+}
+.select_custom.on .combo .select {
+	border: 1px solid #999999;
+}
+.select_custom.on .combo .select:after {
+    /* content: '▲'; */
+	top: 9px;
+    border-color: transparent transparent #888888 transparent;
+}
+.select_custom .combo .list {
+    display: none;
+    overflow-y: auto;
+    position: absolute;
+    top: 39px;
+    left: 0;
+    z-index: 10;
+    border: 1px solid #999999;
+    border-top: 0;
+    box-sizing: border-box;
+    padding: 10px 0;
+    width: 100%;
+    max-height: 500px;
+    background-color: #fff;
+}
+.select_custom .combo .list::-webkit-scrollbar {
+    width: 10px;
+    height: 0;
+}
+.select_custom .combo .list::-webkit-scrollbar-button:start:decrement,
+.select_custom .combo .list::-webkit-scrollbar-button:end:increment {
+    display: block;
+    height: 0;
+}
+.select_custom .combo .list::-webkit-scrollbar-track {
+    background: rgba(0, 0, 0, .05);
+    -webkit-border-radius: 10px;
+    border-radius: 10px;
+}
+.select_custom .combo .list::-webkit-scrollbar-thumb {
+    height: 50px;
+    width: 50px;
+    background: rgba(0, 0, 0, .2);
+    -webkit-border-radius: 5px;
+    border-radius: 5px;
+}
+.select_custom .combo .list>li[aria-disabled="true"] {
+	text-decoration: line-through;
+    background: #f5f5f5;
+    color: #bbb;
+	pointer-events: none;
+}
+.select_custom .combo .list>li[data-soldout="true"] {
+	pointer-events: none;
+}
+.select_custom .combo .list>li[data-soldout="true"]::after {
+	content: '품절';
+    display: inline-block;
+    font-size: 12px;
+    color: #bbbbbb;
+    position: absolute;
+    right: 10px;
+    top: 0;
+    bottom: 0;
+}
+.select_custom .combo .list>li {
+    box-sizing: border-box;
+    padding: 0 10px;
+    width: 100%;
+    height: auto;
+    line-height: 35px;
+    cursor: pointer;
+	position: relative;
+}
+.select_custom .combo .list>li:hover {
+    background-color: #ccc;
+}/* list-type */
 
 /* description */
 

+ 233 - 0
src/main/webapp/ux/pc/js/cart.js

@@ -0,0 +1,233 @@
+// 주문상세보기 버튼 클릭 이벤트 처리
+var fnGoToOrderDetail = function(param) {
+	let ordNo = $(param).attr('ordNo');
+	cfnGoToPage(_PAGE_MYPAGE_ORDER_DETAIL + ordNo);
+}
+
+// 배송조회 버튼 클릭 이벤트
+var fnGetDeliveryInfo = function(param) {
+	let invoiceNo = $(param).attr('invoiceNo');
+	let shipCompCd = $(param).attr('shipCompCd');
+	
+	// TODO
+	// 배송조회 처리
+}
+
+// 구매확정 버튼 클릭 이벤트
+var fnDecideOrder = function(param) {
+	let ordDtlNoArr = $(param).parent().parent().find('input[name=ordDtlNo]');
+	let ordDtlStatArr = $(param).parent().parent().find('input[name=ordDtlStat]');
+	
+	let orderDecisionArr = [];
+	$.each(ordDtlNoArr, function(idx, item) {
+		if (ordDtlStatArr[idx].value == 'G013_60') {
+			orderDecisionArr.push(item.value);
+		}
+	});
+	
+	if (orderDecisionArr.length == 0) {
+		mcxDialog.alert('구매확정 가능한 상품이 없습니다.');
+		return false;
+	}
+	
+	mcxDialog.confirm('구매확정 처리를 하시겠습니까?', {
+		cancelBtnText: "취소",
+		sureBtnText: "확인",
+		sureBtnClick: function(){
+			let data = {};
+			
+			data.ordNo = ordNo;
+			data.ordDtlNoArr = orderDecisionArr;
+			
+			var jsonData = JSON.stringify(data);
+			gagajf.ajaxJsonSubmit('/mypage/order/decision'
+				, jsonData
+				, function() {
+					cfnGoToPage(_PAGE_MYPAGE_ORDER_DETAIL + ordNo);
+				});
+		}
+	});
+}
+
+// 리뷰작성 버튼 클릭 이벤트
+var fnCreateReview = function(param, bannerYn) {
+	let ordDtlNoArr;
+	let ordDtlStatArr;
+	let reviewSqArr;
+
+	if (bannerYn == 'Y') {
+		ordDtlNoArr = $(param).parent().parent().find('input[name=ordDtlNo]');
+		ordDtlStatArr = $(param).parent().parent().find('input[name=ordDtlStat]');
+		reviewSqArr = $(param).parent().parent().find('input[name=reviewSq]');
+	} else {
+		ordDtlNoArr = $(param).parent().parent().parent().parent().find('input[name=ordDtlNo]');
+		ordDtlStatArr = $(param).parent().parent().parent().parent().find('input[name=ordDtlStat]');
+		reviewSqArr = $(param).parent().parent().parent().parent().find('input[name=reviewSq]');
+	}
+	
+	let canReviewSqArr = [];
+	$.each(ordDtlNoArr, function(idx, item) {
+		if (ordDtlStatArr[idx].value == 'G013_70' && reviewSqArr[idx].value == 0) {
+			canReviewSqArr.push(item.value);
+		}
+	});
+	
+	if (canReviewSqArr.length == 0) {
+		mcxDialog.alert('리뷰작성 가능한 상품이 없습니다.');
+		return false;
+	}
+	
+	// TODO
+	// 리뷰 작성페이지 이동
+	let data = {};
+	
+	data.ordNo = ordNo;
+	data.ordDtlNoArr = canReviewSqArr;
+	
+	var jsonData = JSON.stringify(data);
+	
+	//gagajf.ajaxJsonSubmit('/mypage/order/decision'
+	//	, jsonData
+	//	, function() {
+	//		cfnGoToPage(_PAGE_MYPAGE_ORDER_DETAIL + ordNo);
+	//	});
+	
+}
+
+// 장바구니 담기 버튼 클릭 이벤트
+var fnCreateCart = function(param, bannerYn) {
+	let ordDtlNoArr = '';
+	let ordDtlStatArr = '';
+	let reviewSqArr = '';
+
+	if (bannerYn == 'Y') {
+		ordDtlNoArr = $(param).parent().parent().find('input[name=ordDtlNo]');
+		ordDtlStatArr = $(param).parent().parent().find('input[name=ordDtlStat]');
+		reviewSqArr = $(param).parent().parent().find('input[name=reviewSq]');
+	} else {
+		ordDtlNoArr = $(param).parent().parent().parent().parent().parent().find('input[name=ordDtlNo]');
+		ordDtlStatArr = $(param).parent().parent().parent().parent().parent().find('input[name=ordDtlStat]');
+		reviewSqArr = $(param).parent().parent().parent().parent().parent().find('input[name=reviewSq]');
+	}
+	
+	let cartArr = [];
+	$.each(ordDtlNoArr, function(idx, item) {
+		if (bannerYn != 'Y' || (bannerYn == 'Y' && ordDtlStatArr[idx].value == 'G013_70' && reviewSqArr[idx].value > 0)) {
+			cartArr.push(item.value);
+		}
+	});
+	
+	if (cartArr.length == 0) {
+		mcxDialog.alert('장바구니에 담을 상품이 없습니다.');
+		return false;
+	}
+	
+	// TODO
+	// 장바구니 담기 처리
+	let data = {};
+	
+	data.ordNo = ordNo;
+	data.ordDtlNoArr = cartArr;
+	
+	var jsonData = JSON.stringify(data);
+	
+	//gagajf.ajaxJsonSubmit('/mypage/order/decision'
+	//	, jsonData
+	//	, function() {
+	//		cfnGoToPage(_PAGE_MYPAGE_ORDER_DETAIL + ordNo);
+	//	});
+}
+
+// 선물하기 SMS 재전송 버튼 클릭 이벤트
+var fnReSendSms = function(param) {
+	let ordNo = $(param).attr('ordNo');
+	
+	// TODO
+	// 선물하기 SMS 재발송 처리
+}
+
+// 반품/취소/교환 버튼 클릭 이벤트
+var fnCreateChange = function(param, gubun) {
+	if (ordNo == null) {
+		ordNo = $(param).attr('ordNo');
+	}
+	
+	let ordDtlNoArr = $(param).parent().parent().parent().parent().find('input[name=ordDtlNo]');
+	
+	let changeArr = [];
+	$.each(ordDtlNoArr, function(idx, item) {
+		changeArr.push(item.value);
+	})
+	
+	$('#' + gubun + 'Form input[name=ordNo]').val(ordNo);
+	$('#' + gubun + 'Form input[name=ordDtlNoArr]').val(changeArr);
+	
+	if (gubun == 'cancel') {
+		document.cancelForm.submit();
+	} else {
+		document.exchangeForm.submit();
+	}
+}
+
+// 주문 내역 삭제 처리
+var fnDeleteOrder = function() {
+	mcxDialog.confirm('주문 내역을 삭제하시겠습니까?', {
+		cancelBtnText: "취소",
+		sureBtnText: "확인",
+		sureBtnClick: function(){
+			let data = {};
+			
+			data.ordNo = ordNo;
+			
+			var jsonData = JSON.stringify(data);
+			gagajf.ajaxJsonSubmit('/mypage/order/delete'
+				, jsonData
+				, function() {
+					cfnGoToPage(_PAGE_MYPAGE);
+				});
+		}
+	});
+};
+
+// 문자열 길이를 체크
+var cfnGetTextLength = function(obj, maxLen, dpLoc) {
+	var valLen = $(obj).val().length;
+	var cByte = 0;
+	var sliceLen = 0;
+	
+	for (i = 0; i < valLen; i++) {
+		var aChar = $(obj).val().charAt(i);
+		if (escape(aChar).length == 6) {
+			cByte += 3; //한글이면 3를 더한다
+		} else if (aChar == '\n') {
+			cByte += 2; //엔터면 2을 더한다
+		} else {
+			cByte++; //한글아니면 1을 더한다
+		}
+		
+		if (cByte <= maxLen) {
+			sliceLen = i + 1;
+		}
+	}
+	
+	// 사용자가 입력한 값이 제한 값을 초과하는지를 검사한다.
+	if (parseInt(cByte) > parseInt(maxLen)) {
+		mcxDialog.alert('허용된 글자수가 초과되었습니다.\n초과된 부분은 자동으로 삭제됩니다.');
+		//var orgStr = $(obj).val();
+		var slicedStr = $(obj).val().substr(0, sliceLen);
+		$(obj).val(slicedStr);
+		var cByte = 0;
+		for (i = 0; i < $(obj).val().length; i++) {
+			var aChar = $(obj).val().charAt(i);
+			if (escape(aChar).length == 6) {
+				cByte += 3; //한글이면 3를 더한다
+			} else if (aChar == '\n') {
+				cByte += 2; //엔터면 2을 더한다
+			} else {
+				cByte++; //한글아니면 1을 더한다
+			}
+		}
+	}
+	
+	$(dpLoc).text(cByte.addComma());
+}

+ 77 - 8
src/main/webapp/ux/pc/js/common-ui.js

@@ -24,7 +24,6 @@
 
 
 
-
 /* * * * * * * * * * * * * * * * * * * * * * * 
 
 2. Init    (초기설정)
@@ -32,7 +31,7 @@
 * * * * * * * * * * * * * * * * * * * * * */
 $(document).ready(function(){
 
-	/* header minify */
+	// header minify
 	$(function(){
 		$(window).scroll(function(){
 			//var scroll = $(this).scrollTop();
@@ -49,7 +48,11 @@ $(document).ready(function(){
 			}
 		});
 	});
-	/* //header minify */
+
+	// history back
+	$(".back").on("click", function () {
+		history.back()
+	});
 
 });
 /* * * * * * * * * * * * * * * * * * * * * * * 
@@ -150,7 +153,8 @@ $( document ).ready(function() {
 		for (var i = 0; i < numberOfOptions; i++) {
 			$('<li />', {
 				text: $this.children('option').eq(i).text(),
-				rel: $this.children('option').eq(i).val()
+				rel: $this.children('option').eq(i).val(),
+				class: $this.children('option').eq(i).attr('disabled')
 			}).appendTo($selList);
 		}
 	
@@ -166,10 +170,15 @@ $( document ).ready(function() {
 	
 		$selListItems.click(function(e) {
 			e.stopPropagation();
-			$dressSelect.text($(this).text()).removeClass('active');
-			$this.val($(this).attr('rel'));
-			$selList.hide();
-			//console.log($this.val());
+			
+			if($(this).hasClass('disabled')){
+				$this.val($(this).attr('rel',false));
+			} 
+			else{
+				$dressSelect.text($(this).text()).removeClass('active');
+				$this.val($(this).attr('rel'));
+				$selList.hide();
+			}
 		});
 	
 		$(document).click(function() {
@@ -181,6 +190,56 @@ $( document ).ready(function() {
 });
 
 
+// Select-Combo-Custom
+function sCombo(selector){
+	this.$selectBox = null,
+	this.$select = null,
+	this.$list = null,
+	this.$listLi = null;
+	sCombo.prototype.init = function(selector){
+		this.$selectBox = $(selector);
+		this.$select = this.$selectBox.find('.combo .select');
+		this.$list = this.$selectBox.find('.combo .list');
+		this.$listLi = this.$list.children('li');
+	}
+	sCombo.prototype.initEvent = function(e){
+		var that = this;
+		this.$select.on('click', function(e){
+			that.listOn();
+		});
+		this.$listLi.on('click', function(e){
+			that.listSelect($(this));
+		});
+		$(document).on('click', function(e){
+			that.listOff($(e.target));
+		});
+	}
+	sCombo.prototype.listOn = function(){
+		this.$selectBox.toggleClass('on');
+		if(this.$selectBox.hasClass('on')){
+			this.$list.css('display', 'block');
+		}else{
+			this.$list.css('display', 'none');
+		};
+	}
+	sCombo.prototype.listSelect = function($target){
+		$target.addClass('selected').siblings('li').removeClass('selected');
+		this.$selectBox.removeClass('on');
+		this.$select.text($target.text());
+		this.$list.css('display', 'none');
+	}
+	sCombo.prototype.listOff = function($target){
+		if(!$target.is(this.$select) && this.$selectBox.hasClass('on')){
+			this.$selectBox.removeClass('on');
+			this.$list.css('display', 'none');
+		};
+	}
+	this.init(selector);
+	this.initEvent();
+};
+
+
+
 // selectBrand on/off
 $( document ).ready( function() {
 	$("#selectBrand .brandbox input").on("click", function() {
@@ -190,6 +249,9 @@ $( document ).ready( function() {
 });
 
 
+
+
+
 /* alert */
 $(function(){
 	$('.alertCls').click(function(){
@@ -244,6 +306,13 @@ $(document).ready( function() {
 		$("#rdi-paymethod-quick").trigger("click");
 		return false;
 	});
+
+	/* 상품상세 > 상품문의 _accordion */
+	$(document).on('click','.pd_qnalist_pop .foldGroup .fold_head',function(e){
+		$(this).parents('.foldGroup li').find('.fold_cont').slideToggle(100);
+		$(this).toggleClass('on');
+		return false;
+	});
 	
 	/* 아이디/비밀번호 찾기_accordion:open */
 	$(document).on('click','.mb .foldGroup.checkcase .fold_head',function(e){