Kaynağa Gözat

Merge remote-tracking branch 'origin/jsh77b' into order

card007 5 yıl önce
ebeveyn
işleme
137a6a34a7

+ 5 - 0
src/main/java/com/style24/front/biz/web/TsfCommonController.java

@@ -262,6 +262,8 @@ public class TsfCommonController extends TsfBaseController {
 			}
 		} 
 		
+		//deliveryAddrInfo.getRecipPhnno();
+		
 		mav.addObject("deliveryAddrInfo", deliveryAddrInfo);						// 배송지정보
 		mav.setViewName(super.getDeviceViewName("popup/DelvAddrModifyPop"));
 		
@@ -286,6 +288,9 @@ public class TsfCommonController extends TsfBaseController {
 			order.setCustNo(0);
 		}
 		
+		// recipPhnno '-' 처리
+		order.setHypenRecipPhone();
+		
 		coreOrderService.updateCustDeliveryAddr(order);
 		
 		return message.getMessage("SUCC_0001");

+ 18 - 1
src/main/java/com/style24/front/biz/web/TsfOrderController.java

@@ -188,7 +188,6 @@ public class TsfOrderController extends TsfBaseController {
 		} else {
 			// 2021.04.08 휴대폰번호 하이픈 처리
 			order.setHypenCellPhone();
-			log.info("order.getCellPhnno() ::: {}", order.getCellPhnno());
 		}
 
 		// 2.1 총알배송여부가 null 이면 Y로 설정
@@ -277,6 +276,8 @@ public class TsfOrderController extends TsfBaseController {
 			custemerInfo.setCustNm(order.getCustNm());
 			custemerInfo.setCellPhnno(order.getCellPhnno());
 			custemerInfo.setEmail(order.getEmail());
+			custemerInfo.setSexGb(order.getSexGb());
+			custemerInfo.setBirthYmd(order.getBirthYmd());
 		}
 		
 		ModelAndView mav = new ModelAndView();
@@ -443,6 +444,9 @@ public class TsfOrderController extends TsfBaseController {
 
 		// 3.2 배송정보조회(장바구니상품목록)
 		GagaMap delvOrderMap = coreOrderService.getCartDelvGoodsCntList(tmtbGoodsApplyList, order);
+		
+		// 3.3 할인정보조회(상품금액, 선포인트, 다다익선할인금액)
+		GagaMap goodsDcAmtMap = coreOrderService.getGoodsDcAmt(tmtbGoodsApplyList);
 				
 		ModelAndView mav = new ModelAndView();
 		mav.addObject("goodsTotCnt" 		, delvOrderMap.get("goodsTotCnt"));			// 총상품건수
@@ -452,6 +456,14 @@ public class TsfOrderController extends TsfBaseController {
 		mav.addObject("wmsCnt" 				, delvOrderMap.get("wmsCnt"));				// 자사일반상품건수
 		mav.addObject("isLogin"				, TsfSession.isLogin());					// 로그인여부
 		mav.addObject("IMG_PATH"			, env.getProperty("upload.goods.view"));	// 이미지경로
+		mav.addObject("isLogin"				, TsfSession.isLogin());					// 로그인여부
+		
+		// 4.2 할인정보(상품금액, 즉시할인, 다다익선, 선포인트, 적립예정포인트) 
+		mav.addObject("orgGoodsSumAmt"		, goodsDcAmtMap.get("orgGoodsSumAmt"));		// 상품금액합계
+		mav.addObject("cpn1DcSumAmt"		, goodsDcAmtMap.get("cpn1DcSumAmt"));		// 즉시할인금액합계
+		mav.addObject("tmtbDcSumAmt"		, goodsDcAmtMap.get("tmtbDcSumAmt"));		// 다다익선할인금액합계
+		mav.addObject("prePntDcAmt"			, goodsDcAmtMap.get("prePntDcAmt"));		// 선포인트사용가능금액
+		mav.addObject("savePntSumAmt"		, goodsDcAmtMap.get("savePntSumAmt"));		// 적립예정포인트합계
 		mav.setViewName(super.getDeviceViewName("order/OrderListInfo"));
 		
 		return mav;
@@ -666,6 +678,8 @@ public class TsfOrderController extends TsfBaseController {
 		log.info("order.getFreegiftValArr()    ::: {}", order.getFreegiftValArr());
 		log.info("order.getFreegiftValArr()    ::: {}", order.getFreegiftValArr());
 		log.info("order.getFreegiftSqArr()     ::: {}", order.getFreegiftSqArr());
+		log.info("order.getSexGb()             ::: {}", order.getSexGb());
+		log.info("order.getBirthYmd()          ::: {}", order.getBirthYmd());
 		
 		for(int i = 0 ; i < order.getFreegiftGoodsArr().length ; i++) {
 			log.info("order.getFreegiftGoodsArr()  ::: {}", order.getFreegiftGoodsArr()[i]);
@@ -732,11 +746,14 @@ public class TsfOrderController extends TsfBaseController {
 		// TODO 3. 주문정보 업데이트
 		coreOrderService.updateOrderInfo(order);
 		
+		// TODO 4. 보증보험 API 연동
+		
 		// 2021.03.16 주문완료화면이동처리
 		//mav.addObject("payment", param);
 		//mav.setViewName(super.getDeviceViewName("pg/kcpOrder"));
 		
 		mav.setViewName("redirect:/order/complete?ordNo=" + order.getOrdNo());
+		
 		return mav;
 	}
 

+ 2 - 0
src/main/webapp/WEB-INF/views/mob/order/OrderCustemerInfoMob.html

@@ -16,6 +16,8 @@
 <input type="hidden" name="custNm" 		th:value="${custemerInfo.custNm}"/>
 <input type="hidden" name="email" 		th:value="${custemerInfo.email}"/>
 <input type="hidden" name="cellPhnno" 	th:value="${custemerInfo.cellPhnno}"/>
+<input type="hidden" name="sexGb" 		th:value="${custemerInfo.sexGb}"/>
+<input type="hidden" name="birthYmd" 	th:value="${custemerInfo.birthYmd}"/>
 	
 <!-- 주문고객 -->
 <div class="foldGroup">

+ 2 - 2
src/main/webapp/WEB-INF/views/mob/order/OrderDcAmtInfoMob.html

@@ -178,7 +178,7 @@
 											<!-- 스타일 포인트 3만원 이상 결제시 노출 -->
 											<th:block th:if="${orgGoodsSumAmt} >= 30000">
 												<div class="input_wrap">
-													<input type="text" name="pntDcAmtStr" class="form_control" maxlength="11" placeholder="사용할 포인트를 입력해주세요.">
+													<input type="text" name="pntDcAmtStr" class="form_control" maxlength="11" placeholder="사용할 포인트를 입력해주세요." onkeyup="inputNumberFormat(this);">
 													<button type="button" class="btn btn_dark btn_sm" id="btn_point_apply">
 														<span>적용</span>
 													</button>
@@ -210,7 +210,7 @@
 									<dd>
 										<div class="form_field">
 											<div class="input_wrap">
-												<input type="text" name="gfcdUseAmtStr" class="form_control" maxlength="11" placeholder="사용할 금액을 입력해주세요.">
+												<input type="text" name="gfcdUseAmtStr" class="form_control" maxlength="11" placeholder="사용할 금액을 입력해주세요." onkeyup="inputNumberFormat(this);">
 												<button type="button" class="btn btn_dark btn_sm" id="btn_gfcd_apply">
 													<span>적용</span>
 												</button>

+ 60 - 31
src/main/webapp/WEB-INF/views/mob/order/OrderFormMob.html

@@ -42,6 +42,8 @@
 				<th>recipBaseAddr</th>
 				<th>recipDtlAddr</th>
 				<th>delvMemo</th>
+				<th>sexGb</th>
+				<th>birthYmd</th>
 			</tr>
 			<tr style="height:30px;">
 				<td class="custNm"></td>
@@ -53,6 +55,8 @@
 				<td class="recipBaseAddr"></td>
 				<td class="recipDtlAddr"></td>
 				<td class="delvMemo"></td>
+				<td class="sexGb"></td>
+				<td class="birthYmd"></td>
 			</tr>
 		</tbody>
 	</table>
@@ -290,16 +294,21 @@
 										<dl>
 											<div>
 												<dt>주문금액</dt>
-												<dd><div><span class="orgGoodsSumAmt"></span>원</div></dd>
+												<dd><div><span class="orgGoodsSumAmt" th:text="${#numbers.formatInteger(orgGoodsSumAmt, 1, 'COMMA')}"></span>원</div></dd>
 											</div>
 											<div>
-												<dt>할인금액</dt>
-												<dd><div><span class="dcSumAmt"></span>원</div>
-												</dd>
+												<dt>배송비</dt>
+												<dd><div><span class="delvSumAmt" th:text="${#numbers.formatInteger(sumDelvFee, 1, 'COMMA')}"></span>원</div></dd>
 											</div>
 											<div>
-												<dt>배송비</dt>
-												<dd><div><span class="delvSumAmt"></span>원</div></dd>
+												<dt>할인금액</dt>
+													<th:block th:if="${cpn1DcSumAmt} > 0">
+														<dd><div><span class="dcSumAmt disc_amount" id="cpn1DcSumAmt" th:text="|-${#numbers.formatInteger(cpn1DcSumAmt, 1, 'COMMA')}|"></span>원</div></dd>
+													</th:block>
+													<th:block th:if="${cpn1DcSumAmt} < 1">
+														<dd><div><span class="dcSumAmt disc_amount" id="cpn1DcSumAmt" th:text="|${#numbers.formatInteger(cpn1DcSumAmt, 1, 'COMMA')}|"></span>원</div></dd>
+													</th:block>
+												</dd>
 											</div>
 										</dl>
 									</td>
@@ -484,6 +493,9 @@ var custemerInfoSet = function() {
 				$("#orderAmtForm .custNm").text($("#orderForm input[name='custNm']").val());
 				$("#orderAmtForm .email").text($("#orderForm input[name='email']").val());
 				$("#orderAmtForm .cellPhnno").text($("#orderForm input[name='cellPhnno']").val());
+				
+				$("#orderAmtForm .sexGb").text($("#orderForm input[name='sexGb']").val());
+				$("#orderAmtForm .birthYmd").text($("#orderForm input[name='birthYmd']").val());
 			}
 			
 			// 1.2 개인통관부호 정보
@@ -958,6 +970,8 @@ var paymentInfoSet = function() {
 						,"recipBaseAddr"		: $("#orderAmtForm .recipBaseAddr").text()
 						,"recipDtlAddr"			: $("#orderAmtForm .recipDtlAddr").text()
 						,"delvMemo"				: $("#orderAmtForm .delvMemo").text()
+						,"sexGb"				: $("#orderAmtForm .sexGb").text()
+						,"birthYmd"				: $("#orderAmtForm .birthYmd").text()
 						,"prePntDcAmtYn"		: prePntDcAmtYn
 						,"orderDetailList"		: orderDetailList
 						,"delvFeeCdList"		: delvFeeCdList
@@ -1181,7 +1195,7 @@ var dcAmtInfoSet = function() {
 				$("#btn_point_apply").on("click", function(){
 					var rmPntAmt 			= parseInt($("#orderForm input[name='rmPntAmt']").val());
 					var freegiftUsePnt 		= parseInt($("#orderAmtForm .freegiftUsePnt").text());
-					var pntDcAmt 			= parseInt($("#orderForm input[name='pntDcAmtStr']").val());
+					var pntDcAmt 			= parseInt(uncomma($("#orderForm input[name='pntDcAmtStr']").val()));
 					var realOrdAmt 			= parseInt($("#orderAmtForm .realOrdSumAmt").text());
 					var applyPntDcAmt 		= (realOrdAmt * 40) / 100;
 					
@@ -1227,7 +1241,7 @@ var dcAmtInfoSet = function() {
 					
 					// 포인트 적용
 					$("#orderAmtForm .pntDcSumAmt").text(pntDcAmt);
-					$("#pntDcAmt").text("-"+pntDcAmt.addComma()+" 원");
+					$("#pntDcAmt").text(getZeroMinusDelAmt(pntDcAmt)+" 원");
 					
 					// 상품권리렛기능
 					gfcdUseAmtReset();
@@ -1236,7 +1250,7 @@ var dcAmtInfoSet = function() {
 				// 1.8.8 상품권 적용버튼 기능
 				$("#btn_gfcd_apply").on("click", function(){
 					var rmGfcdAmt 		= parseInt($("#orderForm input[name='rmGfcdAmt']").val());
-					var gfcdUseAmt 		= parseInt($("#orderForm input[name='gfcdUseAmtStr']").val());
+					var gfcdUseAmt 		= parseInt(uncomma($("#orderForm input[name='gfcdUseAmtStr']").val()));
 					
 					if (gagajf.isNull($("#orderForm input[name=gfcdUseAmtStr]").val())) {
 						mcxDialog.alert("사용할 금액을 입력해주세요.");
@@ -1516,11 +1530,7 @@ var custCpnApplyTemp = function(obj, idx, cpnType) {
 	});
 	
 	// 상품, 장바구니쿠폰 할인 금액만 합계 적용
-	if (parseInt(goodsCartCpnSumAmt) > 0) {
-		$("#couponModifyPop .modal-footer .goodsCartCpnSumAmt").text("-"+goodsCartCpnSumAmt.addComma());
-	} else {
-		$("#couponModifyPop .modal-footer .goodsCartCpnSumAmt").text(goodsCartCpnSumAmt.addComma());
-	}
+	$("#couponModifyPop .modal-footer .goodsCartCpnSumAmt").text(getZeroMinusDelAmt(goodsCartCpnSumAmt));
 }
 
 // 1.11 쿠폰중복체크 후 적용가능
@@ -1750,9 +1760,9 @@ var prePntDcAmtReset = function() {
 			
 			// 선포인트적용
 			if ($(this).val() == "Y") {
-				$("#prePntDcAmt").text("-"+rmPrePntAmt.addComma());
+				$("#prePntDcAmt").text(getZeroMinusDelAmt(rmPrePntAmt)+"원");
 			} else {
-				$("#prePntDcAmt").text("0");
+				$("#prePntDcAmt").text("0");
 			}
 			
 			// 쿠폰할인금액 SUM
@@ -1760,7 +1770,7 @@ var prePntDcAmtReset = function() {
 		});
 	});
 
-	$("#prePntDcAmt").text("-"+rmPrePntAmt.addComma());
+	$("#prePntDcAmt").text(getZeroMinusDelAmt(rmPrePntAmt)+"원");
 	
 	// 포인트기능 리렛
 	pntDcAmtReset();
@@ -1816,22 +1826,12 @@ var custCpnSumAmtCal = function() {
 	});
 
 	// 상품, 장바구니쿠폰 할인 금액만 합계 적용
-	if (goodsCartCpnSumAmt > 0) {
-		$(".maxdisc_amount .goodsCartCpnDcAmt").text("-"+goodsCartCpnSumAmt.addComma()); // 쿠폰할인금액합계
-		$("#couponModifyPop .modal-footer .goodsCartCpnSumAmt").text("-"+goodsCartCpnSumAmt.addComma());
-	} else {
-		$(".maxdisc_amount .goodsCartCpnDcAmt").text(goodsCartCpnSumAmt.addComma()); // 쿠폰할인금액합계
-		$("#couponModifyPop .modal-footer .goodsCartCpnSumAmt").text("-"+goodsCartCpnSumAmt.addComma());
-	}
+	$(".maxdisc_amount .goodsCartCpnDcAmt").text(getZeroMinusDelAmt(goodsCartCpnSumAmt)); // 쿠폰할인금액합계
+	$("#couponModifyPop .modal-footer .goodsCartCpnSumAmt").text(getZeroMinusDelAmt(goodsCartCpnSumAmt));
 	
 	// 전체쿠폰 할인 금액 합계 적용
-	if (cpnDcSumAmt > 0) {
-		$(".maxdisc_amount .cpnDcAmt").text("-"+cpnDcSumAmt.addComma()); // 쿠폰할인금액합계
-		$("#couponDcSumAmt").text("-" + cpnDcSumAmt.addComma()); // 쿠폰할인금액합계
-	} else {
-		$(".maxdisc_amount .cpnDcAmt").text(cpnDcSumAmt.addComma()); // 쿠폰할인금액합계
-		$("#couponDcSumAmt").text(cpnDcSumAmt.addComma()); // 쿠폰할인금액합계
-	}
+	$(".maxdisc_amount .cpnDcAmt").text(getZeroMinusDelAmt(cpnDcSumAmt)); // 쿠폰할인금액합계
+	$("#couponDcSumAmt").text(getZeroMinusDelAmt(cpnDcSumAmt)); // 쿠폰할인금액합계
 
 	$("#orderAmtForm .cpnDcSumAmt").text(cpnDcSumAmt);
 	
@@ -2194,6 +2194,35 @@ var fnNaverPaymentRequest = function(paymentId) {
 
 	return true;
 }
+
+// 0원이하이면 '-' 처리 삭제 함수
+var getZeroMinusDelAmt = function(tempAmt) {
+	var rtnAmtStr = "";
+	
+	if (tempAmt > 0) {
+		rtnAmtStr = "-" + tempAmt.addComma();
+	} else {
+		rtnAmtStr = tempAmt.addComma();
+	}
+	
+	return rtnAmtStr;
+}
+
+// START ::: 2021.04.09 숫자입려 천단위 찍기
+var inputNumberFormat = function(obj) {
+    obj.value = comma(uncomma(obj.value));
+}
+
+var comma = function(str) {
+    str = String(str);
+    return str.replace(/(\d)(?=(?:\d{3})+(?!\d))/g, '$1,');
+}
+
+var uncomma = function(str) {
+    str = String(str);
+    return str.replace(/[^\d]+/g, '');
+}
+// 2021.04.09 숫자입려 천단위 찍기 ::: END 
 </script>
 
 </th:block>

+ 57 - 37
src/main/webapp/WEB-INF/views/mob/order/OrderListInfoMob.html

@@ -117,56 +117,76 @@
 					<dl>
 						<div>
 							<dt>상품금액</dt>
-							<dd><em id="orgGoodsSumAmt"></em>원</dd>
+							<dd><em id="orgGoodsSumAmt" th:text="${#numbers.formatInteger(orgGoodsSumAmt, 1, 'COMMA')}"></em>원</dd>
 						</div>
 						<div>
 							<dt>배송비</dt>
-							<dd><em id="delvSumAmt"></em>원</dd>
+							<dd><em id="delvSumAmt" th:text="${#numbers.formatInteger(sumDelvFee, 1, 'COMMA')}"></em>원</dd>
 						</div>
 						<div>
 							<dt>상품할인(즉시할인)</dt>
-							<dd>
-								<span class="disc_amount"><em id="cpn1DcSumAmt"></em>원</span>
-							</dd>
-						</div>
-						<div>
-							<dt>다다익선할인</dt>
-							<dd>
-								<span class="disc_amount"><em id="tmtbDcSumAmt"></em>원</span>
-							</dd>
-						</div>
-						<div>
-							<dt>쿠폰할인</dt>
-							<dd>
-								<span class="disc_amount"><em id="couponDcSumAmt"></em>원</span>
-							</dd>
-						</div>
-						<div>
-							<dt>선포인트 사용</dt>
-							<dd>
-								<span class="disc_amount"><em id="prePntDcAmt"></em>P</span>
-							</dd>
-						</div>
-						<div>
-							<dt>포인트 사용</dt>
-							<dd>
-								<span class="disc_amount"><em id="pntDcAmt"></em>P</span>
-							</dd>
-						</div>
-						<div>
-							<dt>상품권 사용</dt>
-							<dd>
-								<span class="disc_amount"><em id="gfcdUseAmt"></em>원</span>
-							</dd>
+							<th:block th:if="${cpn1DcSumAmt} > 0">
+								<dd><span class="disc_amount" id="cpn1DcSumAmt" th:text="|-${#numbers.formatInteger(cpn1DcSumAmt, 1, 'COMMA')} 원|"></span></dd>
+							</th:block>
+							<th:block th:if="${cpn1DcSumAmt} < 1">
+								<dd><span class="disc_amount" id="cpn1DcSumAmt" th:text="|${#numbers.formatInteger(cpn1DcSumAmt, 1, 'COMMA')} 원|"></span></dd>
+							</th:block>
 						</div>
+						
+						<!-- 회원인경우 노출 -->
+						<th:block th:if="${isLogin}">
+							<div>
+								<dt>다다익선할인</dt>
+								<th:block th:if="${tmtbDcSumAmt} > 0">
+									<dd><span class="disc_amount" id="tmtbDcSumAmt" th:text="|-${#numbers.formatInteger(tmtbDcSumAmt, 1, 'COMMA')} 원|"></span></dd>
+								</th:block>
+								<th:block th:if="${tmtbDcSumAmt} < 1">
+									<dd><span class="disc_amount" id="tmtbDcSumAmt" th:text="|${#numbers.formatInteger(tmtbDcSumAmt, 1, 'COMMA')} 원|"></span></dd>
+								</th:block>
+							</div>
+							<div>
+								<dt>쿠폰할인</dt>
+								<dd>
+									<span class="disc_amount"><em id="couponDcSumAmt"></em>원</span>
+								</dd>
+							</div>
+							<div>
+								<dt>선포인트 사용</dt>
+								<th:block th:if="${prePntDcAmt} > 0">
+									<dd><span class="disc_amount" id="prePntDcAmt" th:text="|-${#numbers.formatInteger(prePntDcAmt, 1, 'COMMA')} 원|"></span></dd>
+								</th:block>
+								<th:block th:if="${prePntDcAmt} < 1">
+									<dd><span class="disc_amount" id="prePntDcAmt" th:text="|${#numbers.formatInteger(prePntDcAmt, 1, 'COMMA')} 원|"></span></dd>
+								</th:block>
+							</div>
+							<div>
+								<dt>포인트 사용</dt>
+								<dd>
+									<span class="disc_amount"><em id="pntDcAmt"></em>P</span>
+								</dd>
+							</div>
+							<div>
+								<dt>상품권 사용</dt>
+								<dd>
+									<span class="disc_amount"><em id="gfcdUseAmt"></em>원</span>
+								</dd>
+							</div>
+						</th:block>
+						<!-- //회원인경우 노출 -->
 					</dl>
 				</div>
 				<div class="totalprice_box">
 					<dl>
 						<dt>총 결제 예정 금액</dt>
-						<dd data-weight="price" data-font="lato"><span id="savePntSumAmt"></span>원</dd>
+						<dd data-weight="price" data-font="lato"><span id="realOrdAmt"></span>원</dd>
 					</dl>
-					<p class="info_point"><span class="save_point" id="savePntSumAmt">P</span> 적립예정
+					<p class="info_point">
+						<th:blcok th:if="${isLogin}">
+							<span span class="save_point" id="savePntSumAmt" th:text="|${#numbers.formatInteger(savePntSumAmt, 1, 'COMMA')} P|"></span> 적립예정
+						</th:blcok>
+						<th:blcok th:if="!${isLogin}">
+							회원가입 후 구매하면&nbsp;&nbsp;<span span class="save_point" id="savePntSumAmt" th:text="|${#numbers.formatInteger(savePntSumAmt, 1, 'COMMA')} P|"></span> 적립예정
+						</th:blcok>
 					</p>
 					<p class="info_delivery">총 <span id="delvFeeCdCnt" th:text="${delvFeeCdCnt}"></span>건으로 나뉘어 배송 예정</p>
 				</div>

+ 4 - 0
src/main/webapp/WEB-INF/views/mob/order/OrderNoMemberMob.html

@@ -41,6 +41,8 @@
 				
 				<form class="form_wrap form_full" id="orderForm" th:action="@{'/order/form'}" th:method="post">
 					<input type="hidden" name="shotDelvUseYn" th:value="${order.shotDelvUseYn}" />
+					<input type="hidden" name="sexGb" />
+					<input type="hidden" name="birthYmd" />
 					<th:block th:each="cartSq , index : ${order.cartSqArr}">
 						<input type="hidden" name="cartSqArr" th:value="${cartSq}" />
 					</th:block>
@@ -199,6 +201,8 @@ var fnUpdateAuthInfoCallback = function (result) {
 	
 	$('#orderForm input[name=custNm]').val(result.sName);
 	$('#orderForm input[name=cellPhnno]').val(result.sMobileNo);
+	$('#orderForm input[name=sexGb]').val(result.sGender);
+	$('#orderForm input[name=birthYmd]').val(result.sBirthDate);
 }
 
 // 우편번호 DAUM을 이용한 우편번호 팝업 레이어

+ 5 - 0
src/main/webapp/WEB-INF/views/mob/popup/DelvAddrAddPopMob.html

@@ -268,6 +268,11 @@ var fnOpenDaumAddr = function() {
 	});
 	cfnOpenDaumAddr(daumZip);
 }
+
+//2021.04.09 하이픈처리
+$(document).on("keyup", "#deliveryAddForm input[name=recipPhnno]", function() { 
+	$(this).val( $(this).val().replace(/[^0-9]/g, "").replace(/(^02|^0505|^1[0-9]{3}|^0[0-9]{2})([0-9]+)?([0-9]{4})$/,"$1-$2-$3").replace("--", "-") ); 
+});
 </script>
 
 

+ 5 - 0
src/main/webapp/WEB-INF/views/mob/popup/DelvAddrModifyPopMob.html

@@ -292,4 +292,9 @@ var fnOpenDaumAddr = function() {
 	
 	cfnOpenDaumAddr(daumZip);
 }
+
+//2021.04.09 하이픈처리
+$(document).on("keyup", "#deliveryModifyForm input[name=recipPhnno]", function() { 
+	$(this).val( $(this).val().replace(/[^0-9]/g, "").replace(/(^02|^0505|^1[0-9]{3}|^0[0-9]{2})([0-9]+)?([0-9]{4})$/,"$1-$2-$3").replace("--", "-") ); 
+});
 </script>

+ 5 - 5
src/main/webapp/WEB-INF/views/web/order/OrderCouponApplyPopWeb.html

@@ -13,12 +13,15 @@
 				<th:block th:if="${goodsApplyCpnList.size() > 0}">
 					<h6>상품쿠폰</h6>
 					<div class="area_item_coupon">
-						<th:block th:each="goods, i : ${goodsApplyCpnList}">
+						<th:block th:each="goods, i : ${goodsApplyCpnList}" th:with="imageUrl=${@environment.getProperty('upload.goods.view')}">
 							<th:block th:if="${goods.goodsCpnList.size() > 0}">
 								<div class="apply_item goodsCpn">
 									<div class="item_gd">
 										<figure>
-											<span class="thumb"><img src="/images/pc/thumb/tmp_odSide1.jpg" alt=""></span>
+											<span class="thumb">
+												<img th:src="${imageUrl + '/' + goods.sysImgNm}" src="/" width="100%" alt="">
+											</span>
+											
 											<figcaption>
 												<div class="brand" th:text="${goods.brandEnm}+' '+${goods.brandKnm}"></div>
 												<div class="name" th:text="${goods.goodsNm}"></div>
@@ -145,9 +148,6 @@ $(document).ready( function() {
 		var od_coupon_modify_selecter1 = new sCombo($(this));
 	});
 });
-//팝업 - 할인혜택 > 상품쿠폰변경 선택           
-//var od_coupon_modify_selecter1 = new sCombo('.od_pop.couponModify_pop #item1 .select_custom.coupon_list');
-//var od_coupon_modify_selecter2 = new sCombo('.od_pop.couponModify_pop #item2 .select_custom.coupon_list');
 </script>
 
 </html>

+ 2 - 0
src/main/webapp/WEB-INF/views/web/order/OrderCustemerInfoWeb.html

@@ -32,6 +32,8 @@
 	<input type="hidden" name="custNm" 		th:value="${custemerInfo.custNm}"/>
 	<input type="hidden" name="email" 		th:value="${custemerInfo.email}"/>
 	<input type="hidden" name="cellPhnno" 	th:value="${custemerInfo.cellPhnno}"/>
+	<input type="hidden" name="sexGb" 		th:value="${custemerInfo.sexGb}"/>
+	<input type="hidden" name="birthYmd" 	th:value="${custemerInfo.birthYmd}"/>
 	
 	<div class="area_mbinfo">
 		<dl>

+ 2 - 2
src/main/webapp/WEB-INF/views/web/order/OrderDcAmtInfoWeb.html

@@ -139,7 +139,7 @@
 								<!-- 스타일 포인트 3만원 이상 결제시 노출 -->
 								<th:block th:if="${orgGoodsSumAmt} >= 30000">
 									<div class="input_wrap">
-										<input type="text" name="pntDcAmtStr" class="form_control" maxlength="11" placeholder="사용할 포인트를 입력해주세요.">
+										<input type="text" name="pntDcAmtStr" class="form_control" maxlength="11" placeholder="사용할 포인트를 입력해주세요." onkeyup="inputNumberFormat(this);">
 										<button type="button" class="btn btn_dark btn_sm" id="btn_point_apply">
 											<span>적용</span>
 										</button>
@@ -174,7 +174,7 @@
 							<div class="form_field">
 								<input type="hidden" name="rmGfcdAmt" th:value="${rmGfcdAmt}"/>
 								<div class="input_wrap">
-									<input type="text" name="gfcdUseAmtStr" class="form_control" maxlength="11" placeholder="사용할 금액을 입력해주세요.">
+									<input type="text" name="gfcdUseAmtStr" class="form_control" maxlength="11" placeholder="사용할 금액을 입력해주세요." onkeyup="inputNumberFormat(this);">
 									<button type="button" class="btn btn_dark btn_sm" id="btn_gfcd_apply">
 										<span>적용</span>
 									</button>

+ 1 - 1
src/main/webapp/WEB-INF/views/web/order/OrderDeliveryAddrInfoWeb.html

@@ -43,7 +43,7 @@
 						<th:block th:if="${deliveryAddrInfo.defaultYn} == 'Y'">
 							<em class="tag gray">기본 배송지</em>
 						</th:block> 
-						<em class="tag primary_line shotDelv">총알배송</em>
+						<em class="tag primary_line shotDelv" style="display:none;">총알배송</em>
 					</span>
 				</dd>
 			</div>

+ 65 - 24
src/main/webapp/WEB-INF/views/web/order/OrderFormWeb.html

@@ -31,6 +31,7 @@
 
 <!-- 주문금액정보표현 -->
 <form id="orderAmtForm" name="orderAmtForm">
+	<!-- 주문자정보 -->
 	<table border="1" style="font-size:10px; text-align:center; margin-top:20px; display:none; width:100%;" name="orderInfo" id="orderInfo">
 		<tbody>
 			<tr style="height:30px;">
@@ -43,6 +44,8 @@
 				<th>recipBaseAddr</th>
 				<th>recipDtlAddr</th>
 				<th>delvMemo</th>
+				<th>sexGb</th>
+				<th>birthYmd</th>
 			</tr>
 			<tr style="height:30px;">
 				<td class="custNm"></td>
@@ -54,9 +57,12 @@
 				<td class="recipBaseAddr"></td>
 				<td class="recipDtlAddr"></td>
 				<td class="delvMemo"></td>
+				<td class="sexGb"></td>
+				<td class="birthYmd"></td>
 			</tr>
 		</tbody>
 	</table>
+	<!-- //주문자정보 -->
 	
 	<!-- 사은품정보 -->
 	<table border="1" style="font-size:10px; text-align:center; margin-top:20px; display:none; width:100%;" name="freegiftInfo">
@@ -73,6 +79,7 @@
 			<td class="freegiftGoodsArr"></td>
 		</tr>
 	</table>
+	<!-- //사은품정보 -->
 	
 	<!-- 주문상세금액 -->
 	<table border="1" style="font-size:10px; text-align:center; margin-top:20px; display:none; width:100%;" name="orderDetailInfo" id="orderDetailInfo">
@@ -165,6 +172,7 @@
 			</th:block>
 		</th:block>
 	</table>
+	<!-- //주문상세금액 -->
 	
 	<!-- 배송단위목록 -->
 	<table border="1" style="font-size:10px; text-align:center;  margin-top:20px; display:none; width:100%;" name="delvFeeCdInfo" id="delvFeeCdInfo">
@@ -185,6 +193,7 @@
 			</tr>
 		</th:block>
 	</table>
+	<!-- //배송단위목록 -->
 	
 	<!-- 주문금액합계 -->
 	<table border="1" style="font-size:10px; text-align:center;  margin-top:20px; display:none; width:100%;" name="orderSumAmtInfo" id="orderSumAmtInfo">
@@ -227,6 +236,7 @@
 			<td class="savePntSumAmt">0</td>
 		</tr>
 	</table>
+	<!-- //주문금액합계 -->
 </form>
 <!-- //주문금액정보표현 -->
 
@@ -585,6 +595,9 @@ var custemerInfoSet = function() {
 				$("#orderAmtForm .custNm").text($("#orderForm input[name='custNm']").val());
 				$("#orderAmtForm .email").text($("#orderForm input[name='email']").val());
 				$("#orderAmtForm .cellPhnno").text($("#orderForm input[name='cellPhnno']").val());
+				
+				$("#orderAmtForm .sexGb").text($("#orderForm input[name='sexGb']").val());
+				$("#orderAmtForm .birthYmd").text($("#orderForm input[name='birthYmd']").val());
 			}
 			// 1.2 배송정보로드
 			deliveryAddrInfoSet(jsonObj, true);
@@ -1036,6 +1049,8 @@ var paymentInfoSet = function() {
 						,"recipBaseAddr"		: $("#orderAmtForm .recipBaseAddr").text()
 						,"recipDtlAddr"			: $("#orderAmtForm .recipDtlAddr").text()
 						,"delvMemo"				: $("#orderAmtForm .delvMemo").text()
+						,"sexGb"				: $("#orderAmtForm .sexGb").text()
+						,"birthYmd"				: $("#orderAmtForm .birthYmd").text()
 						,"prePntDcAmtYn"		: prePntDcAmtYn
 						,"orderDetailList"		: orderDetailList
 						,"delvFeeCdList"		: delvFeeCdList
@@ -1221,7 +1236,7 @@ var dcAmtInfoSet = function() {
 				$("#btn_point_apply").on("click", function(){
 					var rmPntAmt 			= parseInt($("#orderForm input[name='rmPntAmt']").val());
 					var freegiftUsePnt 		= parseInt($("#orderAmtForm .freegiftUsePnt").text());
-					var pntDcAmt 			= parseInt($("#orderForm input[name='pntDcAmtStr']").val());
+					var pntDcAmt 			= parseInt(uncomma($("#orderForm input[name='pntDcAmtStr']").val()));
 					var realOrdAmt 			= parseInt($("#orderAmtForm .realOrdSumAmt").text());
 					var applyPntDcAmt 		= (realOrdAmt * 40) / 100;
 					
@@ -1267,7 +1282,7 @@ var dcAmtInfoSet = function() {
 					
 					// 포인트 적용
 					$("#orderAmtForm .pntDcSumAmt").text(pntDcAmt);
-					$("#pntDcAmt").text("-"+pntDcAmt.addComma()+" 원");
+					$("#pntDcAmt").text(getZeroMinusDelAmt(pntDcAmt)+" 원");
 					
 					// 상품권리렛기능
 					gfcdUseAmtReset();
@@ -1276,7 +1291,7 @@ var dcAmtInfoSet = function() {
 				// 1.8.8 상품권 적용버튼 기능
 				$("#btn_gfcd_apply").on("click", function(){
 					var rmGfcdAmt 		= parseInt($("#orderForm input[name='rmGfcdAmt']").val());
-					var gfcdUseAmt 		= parseInt($("#orderForm input[name='gfcdUseAmtStr']").val());
+					var gfcdUseAmt 		= parseInt(uncomma($("#orderForm input[name='gfcdUseAmtStr']").val()));
 					
 					if (gagajf.isNull($("#orderForm input[name=gfcdUseAmtStr]").val())) {
 						mcxDialog.alert("사용할 금액을 입력해주세요.");
@@ -1548,7 +1563,7 @@ var custCpnApplyTemp = function(obj) {
 	});
 	
 	// 상품, 장바구니쿠폰 할인 금액만 합계 적용
-	$(".modal-footer .goodsCartCpnSumAmt").text("-"+goodsCartCpnSumAmt.addComma());
+	$(".modal-footer .goodsCartCpnSumAmt").text(getZeroMinusDelAmt(goodsCartCpnSumAmt));
 }
 
 // 1.11 쿠폰중복체크 후 적용가능
@@ -1759,7 +1774,12 @@ var custCpnNotApply = function(obj) {
 
 // 1.14 선포인트리셋기능 (사용안함)
 var prePntDcAmtReset = function() {
-	var rmPrePntAmt = parseInt($("#orderForm input[name='rmPrePntAmt']").val());
+	var rmPrePntAmt = 0;
+	
+	if ($("#orderForm input[name='rmPrePntAmt']") != null) {
+		parseInt($("#orderForm input[name='rmPrePntAmt']").val());
+	}
+	
 	$("#orderForm input[name='prePntDcAmt']").val(rmPrePntAmt);
 	
 	// 선포인트사용여부 체크 후 적용
@@ -1771,13 +1791,13 @@ var prePntDcAmtReset = function() {
 		
 		// 버튼기능 구현
 		$(this).on("click", function(){
-			var rmPrePntAmt 		= parseInt($("#orderForm input[name='rmPrePntAmt']").val());
+			var rmPrePntAmt = parseInt($("#orderForm input[name='rmPrePntAmt']").val());
 			
 			// 선포인트적용
 			if ($(this).val() == "Y") {
-				$("#prePntDcAmt").text("-"+rmPrePntAmt.addComma()+"원");
+				$("#prePntDcAmt").text(getZeroMinusDelAmt(rmPrePntAmt)+" 원");
 			} else {
-				$("#prePntDcAmt").text("0원");
+				$("#prePntDcAmt").text("0 원");
 			}
 			
 			// 쿠폰할인금액 SUM
@@ -1785,8 +1805,8 @@ var prePntDcAmtReset = function() {
 		});
 	});
 
-	$("#prePntDcAmt").text("-"+rmPrePntAmt.addComma()+"원");
-	
+	$("#prePntDcAmt").text(getZeroMinusDelAmt(rmPrePntAmt)+" 원");
+
 	// 포인트기능 리렛
 	pntDcAmtReset();
 }
@@ -1834,22 +1854,12 @@ var custCpnSumAmtCal = function() {
 	});
 
 	// 상품, 장바구니쿠폰 할인 금액만 합계 적용
-	if (goodsCartCpnSumAmt > 0) {
-		$(".maxdisc_amount .goodsCartCpnDcAmt").text("-"+goodsCartCpnSumAmt.addComma()); // 쿠폰할인금액합계
-		$(".goodsCartCpnSumAmt").text("-"+goodsCartCpnSumAmt.addComma()); // 쿠폰할인금액합계
-	} else {
-		$(".maxdisc_amount .goodsCartCpnDcAmt").text(goodsCartCpnSumAmt.addComma()); // 쿠폰할인금액합계
-		$(".goodsCartCpnSumAmt").text(goodsCartCpnSumAmt.addComma()); // 쿠폰할인금액합계
-	}
+	$(".maxdisc_amount .goodsCartCpnDcAmt").text(getZeroMinusDelAmt(goodsCartCpnSumAmt)); // 쿠폰할인금액합계
+	$(".goodsCartCpnSumAmt").text(getZeroMinusDelAmt(goodsCartCpnSumAmt)); // 쿠폰할인금액합계
 	
 	// 전체쿠폰 할인 금액 합계 적용
-	if (cpnDcSumAmt > 0) {
-		$(".maxdisc_amount .cpnDcAmt").text("-"+cpnDcSumAmt.addComma()); // 쿠폰할인금액합계
-		$("#couponDcSumAmt").text("-" + cpnDcSumAmt.addComma() + " 원"); // 쿠폰할인금액합계
-	} else {
-		$(".maxdisc_amount .cpnDcAmt").text(cpnDcSumAmt.addComma()); // 쿠폰할인금액합계
-		$("#couponDcSumAmt").text(cpnDcSumAmt.addComma() + " 원"); // 쿠폰할인금액합계
-	}
+	$(".maxdisc_amount .cpnDcAmt").text(getZeroMinusDelAmt(cpnDcSumAmt)); // 쿠폰할인금액합계
+	$("#couponDcSumAmt").text(getZeroMinusDelAmt(cpnDcSumAmt)+ " 원"); // 쿠폰할인금액합계
 
 	$("#orderAmtForm .cpnDcSumAmt").text(cpnDcSumAmt);
 	
@@ -2213,6 +2223,37 @@ var fnNaverPaymentRequest = function(paymentId) {
 
 	return true;
 }
+
+// 0원이하이면 '-' 처리 삭제 함수
+var getZeroMinusDelAmt = function(tempAmt) {
+	var rtnAmtStr = "";
+	
+	if (tempAmt > 0) {
+		rtnAmtStr = "-" + tempAmt.addComma();
+	} else {
+		rtnAmtStr = tempAmt.addComma();
+	}
+	
+	return rtnAmtStr;
+}
+
+//START ::: 2021.04.09 숫자입려 천단위 찍기
+var inputNumberFormat = function(obj) {
+    obj.value = comma(uncomma(obj.value));
+}
+
+var comma = function(str) {
+    str = String(str);
+    return str.replace(/(\d)(?=(?:\d{3})+(?!\d))/g, '$1,');
+}
+
+var uncomma = function(str) {
+    str = String(str);
+    return str.replace(/[^\d]+/g, '');
+}
+// 2021.04.09 숫자입려 천단위 찍기 ::: END 
+
+
 </script>
 
 </th:block>

+ 2 - 2
src/main/webapp/WEB-INF/views/web/order/OrderListInfoWeb.html

@@ -43,11 +43,11 @@
 				</th:block>
 		
 				<div class="gd_list">
-					<th:block th:each="goods, i : ${delvAllCart}">
+					<th:block th:each="goods, i : ${delvAllCart}" th:with="imageUrl=${@environment.getProperty('upload.goods.view')}">
 						<div class="item_gd">
 							<figure>
 								<span class="thumb">
-									<img th:src="${IMG_PATH} + '/' + ${goods.sysImgNm}" src="/" width="100%" alt="">
+									<img th:src="${imageUrl + '/' + goods.sysImgNm}" src="/" width="100%" alt="">
 								</span>
 								<figcaption>
 									<div class="brand" th:text="${goods.brandEnm} + ' ' + ${goods.brandKnm}"></div>

+ 4 - 0
src/main/webapp/WEB-INF/views/web/order/OrderNoMemberWeb.html

@@ -46,6 +46,8 @@
 				<div class="cont_body">
 					<form class="form_wrap form_col_c form_full" id="orderForm" th:action="@{'/order/form'}" th:method="post">
 						<input type="hidden" name="shotDelvUseYn" th:value="${order.shotDelvUseYn}" /><!-- 장바구니화면 총알배송사용여부 -->
+						<input type="hidden" name="sexGb" />
+						<input type="hidden" name="birthYmd" />
 						<!-- 장바구니화면 시퀀스 배열 등록 -->
 						<th:block th:each="cartSq , index : ${order.cartSqArr}">
 							<input type="hidden" name="cartSqArr" th:value="${cartSq}" />
@@ -233,6 +235,8 @@ var fnUpdateAuthInfoCallback = function (result) {
 	
 	$('#orderForm input[name=custNm]').val(result.sName);
 	$('#orderForm input[name=cellPhnno]').val(result.sMobileNo);
+	$('#orderForm input[name=sexGb]').val(result.sGender);
+	$('#orderForm input[name=birthYmd]').val(result.sBirthDate);
 }
 
 // 우편번호 DAUM을 이용한 우편번호 팝업 레이어

+ 12 - 1
src/main/webapp/WEB-INF/views/web/popup/DelvAddrAddPopWeb.html

@@ -24,7 +24,7 @@
 					<label class="input_label sr-only">휴대폰 번호</label>
 					<div class="ui_col_12">
 						<div class="input_wrap"> 
-							<input type="text" name="recipPhnno" placeholder="휴대폰 번호" class="form_control" minlength="10" maxlength="11" required="required" data-valid-type="numeric" data-valid-name="휴대폰"/>
+							<input type="text" name="recipPhnno" placeholder="휴대폰 번호" class="form_control" minlength="10" maxlength="14"/>
 						</div>
 					</div>
 				</div>
@@ -191,6 +191,12 @@ var deliveryAddFormCheck = function() {
 		return false;
 	}
 	
+	if ($("#deliveryAddForm input[name=recipPhnno]").val().length < 10) {
+		mcxDialog.alert("휴대폰번호를 정확히 입력해주세요.");
+		$('#deliveryAddForm input[name=recipPhnno]').focus();
+		return false;
+	}
+	
 	if (gagajf.isNull($("#deliveryAddForm input[name=recipZipcode]").val())) {
 		mcxDialog.alert("배송주소를 입력해주세요.");
 		$('#deliveryAddForm input[name=recipAddr]').focus();
@@ -226,6 +232,11 @@ var fnOpenDaumAddr = function() {
 	});
 	cfnOpenDaumAddr(daumZip);
 }
+
+// 2021.04.09 하이픈처리
+$(document).on("keyup", "#deliveryAddForm input[name=recipPhnno]", function() { 
+	$(this).val( $(this).val().replace(/[^0-9]/g, "").replace(/(^02|^0505|^1[0-9]{3}|^0[0-9]{2})([0-9]+)?([0-9]{4})$/,"$1-$2-$3").replace("--", "-") ); 
+});
 </script>
 
 

+ 18 - 1
src/main/webapp/WEB-INF/views/web/popup/DelvAddrModifyPopWeb.html

@@ -31,7 +31,7 @@
 					<label class="input_label sr-only">휴대폰 번호</label>
 					<div class="ui_col_12">
 						<div class="input_wrap"> 
-							<input type="text" name="recipPhnno" placeholder="휴대폰 번호" class="form_control" minlength="10" maxlength="11" required="required" data-valid-type="numeric" data-valid-name="휴대폰" th:value="${deliveryAddrInfo.recipPhnno}"/>
+							<input type="text" name="recipPhnno" placeholder="휴대폰 번호" class="form_control" minlength="10" maxlength="14" th:value="${deliveryAddrInfo.recipPhnno}"/>
 						</div>
 					</div>
 				</div>
@@ -214,6 +214,18 @@ var deliveryModifyFormCheck = function() {
 		return false;
 	}
 	
+	if (gagajf.isNull($("#deliveryModifyForm input[name=recipPhnno]").val())) {
+		mcxDialog.alert("휴대폰번호를 입력해주세요.");
+		$('#deliveryAddForm input[name=recipPhnno]').focus();
+		return false;
+	}
+	
+	if ($("#deliveryModifyForm input[name=recipPhnno]").val().length < 10) {
+		mcxDialog.alert("휴대폰번호를 정확히 입력해주세요.");
+		$('#deliveryAddForm input[name=recipPhnno]').focus();
+		return false;
+	}
+	
 	if (gagajf.isNull($("#deliveryModifyForm input[name=recipZipcode]").val())) {
 		mcxDialog.alert("배송주소를 입력해주세요.");
 		$('#deliveryModifyForm input[name=recipAddr]').focus();
@@ -250,4 +262,9 @@ var fnOpenDaumAddr = function() {
 	
 	cfnOpenDaumAddr(daumZip);
 }
+
+// 2021.04.09 하이픈처리
+$(document).on("keyup", "#deliveryModifyForm input[name=recipPhnno]", function() { 
+	$(this).val( $(this).val().replace(/[^0-9]/g, "").replace(/(^02|^0505|^1[0-9]{3}|^0[0-9]{2})([0-9]+)?([0-9]{4})$/,"$1-$2-$3").replace("--", "-") ); 
+});
 </script>