Просмотр исходного кода

Merge remote-tracking branch 'origin/xodud1202' into card007

# Conflicts:
#	src/main/java/com/style24/front/biz/web/TsfMypageController.java
card007 5 лет назад
Родитель
Сommit
168b234d4b

+ 9 - 0
src/main/java/com/style24/front/biz/dao/TsfCartDao.java

@@ -291,4 +291,13 @@ public interface TsfCartDao {
 	 * @since 2021. 03. 26
 	 */
 	Collection<Order> getCartDetailInfo(Order param);
+
+	/**
+	 * 장바구니 수량 변경
+	 * @param Order
+	 * @return int
+	 * @author xodud1202
+	 * @since 2021. 04. 04
+	 */
+	int updateCartGoodsQty(Order param);
 }

+ 5 - 0
src/main/java/com/style24/front/biz/dao/TsfCustomerDao.java

@@ -1,10 +1,13 @@
 package com.style24.front.biz.dao;
 
 import com.style24.core.support.annotation.ShopDs;
+import com.style24.persistence.domain.CustDeliveryAddr;
 import com.style24.persistence.domain.CustSnsInfo;
 import com.style24.persistence.domain.Customer;
 import com.style24.persistence.domain.WishList;
 
+import java.util.Collection;
+
 /**
  * 고객(회원) Dao
  * 
@@ -142,4 +145,6 @@ public interface TsfCustomerDao {
 	 * @since 2021. 03. 22
 	 */
 	int updateCustomerInfo(Customer customer);
+
+
 }

+ 11 - 0
src/main/java/com/style24/front/biz/dao/TsfPlanningDao.java

@@ -271,4 +271,15 @@ public interface TsfPlanningDao {
 	 */
 	int getCustAnswerCount(Plan plan);
 	
+	/**
+	 * 설문조사 선착순 키운트
+	 *
+	 * @param poll
+	 * @return int
+	 * @author sowon
+	 * @date 2021. 4. 5
+	 */
+	int getCustAnswerPartiCount(Poll poll);
+	
+	
 }

+ 14 - 2
src/main/java/com/style24/front/biz/service/TsfCartService.java

@@ -1036,6 +1036,8 @@ public class TsfCartService {
 		int custNo = 0;
 		if(TsfSession.isLogin()) {
 			custNo = TsfSession.getInfo().getCustNo();
+		} else {
+			param.setJsessionId(TsfSession.getSessionId());
 		}
 
 		if(param.getCustNo() > 0 && custNo == 0) {
@@ -1071,7 +1073,17 @@ public class TsfCartService {
 	 * @since 2021. 04. 02
 	 */
 	public Order updateCartGoodsQty(Order param) {
-		// TODO 장바구니 GOODS_QTY 변경
-		return null;
+		if(TsfSession.isLogin()) {
+			param.setCustNo(TsfSession.getInfo().getCustNo());
+			param.setUpdNo(param.getCustNo());
+		} else {
+			param.setCustNo(0);
+			param.setUpdNo(0);
+		}
+
+		Order order = new Order();
+		log.info("CHECK UPDATE CART UPDATE INFO ::::: {} / {}", param.getCartSq(), param.getGoodsQty());
+		order.setChangeQty(cartDao.updateCartGoodsQty(param));
+		return order;
 	}
 }

+ 12 - 0
src/main/java/com/style24/front/biz/service/TsfCustomerService.java

@@ -26,6 +26,7 @@ import com.style24.front.support.security.TsfLoginDetails;
 import com.style24.front.support.security.session.TsfSession;
 import com.style24.persistence.domain.Coupon;
 import com.style24.persistence.domain.CustAccount;
+import com.style24.persistence.domain.CustDeliveryAddr;
 import com.style24.persistence.domain.CustSnsInfo;
 import com.style24.persistence.domain.Customer;
 import com.style24.persistence.domain.Login;
@@ -916,4 +917,15 @@ public class TsfCustomerService {
 		return resultMap;
 	}
 
+	/**
+	 * 마이페이지 - 배송지 목록
+	 * @param  custDeliveryAddr - 고객번호
+	 * @return Collection<CustDeliveryAddr> - 배송목록
+	 * @author jsshin
+	 * @since 2021. 04. 01
+	 */
+	public Collection<CustDeliveryAddr> getCustomerDeliveryAddrList(CustDeliveryAddr custDeliveryAddr) {
+		return coreCustomerService.getCustomerDeliveryAddrList(custDeliveryAddr);
+	}
+
 }

+ 13 - 0
src/main/java/com/style24/front/biz/service/TsfPlanningService.java

@@ -418,6 +418,19 @@ public class TsfPlanningService {
 	public int getCustAnswerCount(Plan plan) {
 		return planningDao.getCustAnswerCount(plan);
 	}
+	
+	/**
+	 * 설문조사 중복카운트
+	 *
+	 * @param plan
+	 * @return int
+	 * @author sowon
+	 * @date 2021. 4. 5
+	 */
+	public int getCustAnswerPartiCount(Poll poll) {
+		return planningDao.getCustAnswerPartiCount(poll);
+	}
+
 
 
 }

+ 2 - 1
src/main/java/com/style24/front/biz/web/TsfCartController.java

@@ -255,5 +255,6 @@ public class TsfCartController extends TsfBaseController {
 	@PostMapping("/update/goodsQty")
 	public Order updateCartGoodsQty(@RequestBody Order param) {
 		Order result = new Order();
-		return cartService.updateCartGoodsQty(param);}
+		return cartService.updateCartGoodsQty(param);
+	}
 }

+ 49 - 13
src/main/java/com/style24/front/biz/web/TsfMypageController.java

@@ -4,6 +4,11 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.style24.core.biz.service.TscKcpService;
+import com.style24.persistence.domain.CustDeliveryAddr;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -120,10 +125,13 @@ public class TsfMypageController extends TsfBaseController {
 	
 	@Autowired
 	private TsfCartService cartService;
-	
+
 	@Autowired
 	private TsfCommonService commonService;
 
+	@Autowired
+	private TscKcpService kcpService;
+
 	/**
 	 * 마이페이지 메인 화면
 	 *
@@ -853,7 +861,7 @@ public class TsfMypageController extends TsfBaseController {
 
 	/**
 	 * 마이페이지 배송지 정보 수정
-	 * 
+	 *
 	 * @param Order
 	 * @return GagaMap
 	 * @author card007
@@ -871,10 +879,10 @@ public class TsfMypageController extends TsfBaseController {
 			result.set("status", GagaResponseStatus.FAIL.getCode());
 			result.set("message", "배송지 수정에 실패했습니다.");
 		}
-		
+
 		result.set("status", GagaResponseStatus.SUCCESS.getCode());
 		result.set("message", "정상적으로 배송지가 수정되었습니다.");
-		
+
 		return result;
 	}
 
@@ -1415,16 +1423,12 @@ public class TsfMypageController extends TsfBaseController {
 	@ResponseBody
 	public GagaMap getAccountCheck(@RequestBody CustAccount custAccount) throws Exception {
 		custAccount.setIpAddress(TsfSession.getIpAddress());
-
-		GagaMap result = coreCustomerService.checkAccount(custAccount);
-		
-		if("0000".equals(result.get("resCd"))) {
-			result.set("status", GagaResponseStatus.SUCCESS.getCode());
-			result.set("isValid", true);
-		} else {
-			throw new IllegalStateException(message.getMessage("FAIL_0004"));
+		boolean isValid = false;
+		GagaMap result = kcpService.checkAccount(custAccount);
+		if("0000".equals(result.get("recCd"))) {
+			isValid = true;
 		}
-
+		result.set("isValid", isValid);
 		return result;
 	}
 
@@ -1563,5 +1567,37 @@ public class TsfMypageController extends TsfBaseController {
 		return customerService.changePassword(customer);
 	}
 
+	/**
+	 * 마이페이지 - 배송지관리
+	 *
+	 * @return ModelAndView
+	 * @author jsshin
+	 * @since 2021. 04. 01
+	 */
+	@GetMapping("/delivery/addr/form")
+	public ModelAndView getDeliveryListForm() {
+		ModelAndView mav = new ModelAndView();
+
+		mav.setViewName(super.getDeviceViewName("mypage/MypageCustDeliveryAddrForm"));
+
+		return mav;
+	}
+
+	/**
+	 * 마이페이지 - 배송지목록
+	 *
+	 * @return Collection<CustDeliveryAddr>
+	 * @author jsshin
+	 * @since 2021. 04. 02
+	 */
+	@GetMapping("/customer/delivery/addr/list")
+	@ResponseBody
+	public Collection<CustDeliveryAddr> getCustomerDeliveryAddrList() {
+		CustDeliveryAddr custDeliveryAddr = new CustDeliveryAddr();
+		custDeliveryAddr.setCustNo(TsfSession.getInfo().getCustNo());
+		return customerService.getCustomerDeliveryAddrList(custDeliveryAddr);
+	}
+
+
 	/*신주승 끝*/
 }

+ 10 - 0
src/main/java/com/style24/front/biz/web/TsfPlanningController.java

@@ -358,6 +358,8 @@ public class TsfPlanningController extends TsfBaseController {
 		
 		poll = planningService.getPollQuestionInfo(plan);
 		String partYn = poll.getDupPartiYn(); 
+		String comYn = poll.getFstComYn();
+		int partiCnt = poll.getPartiCnt();
 		// 중복참여가 아닌경우
 		if(partYn.equals("N")) {
 			int count = planningService.getCustAnswerCount(plan);
@@ -366,6 +368,14 @@ public class TsfPlanningController extends TsfBaseController {
 				result.set("status","1");
 			}
 		}
+		else if (comYn.equals("Y")) {
+			int count = planningService.getCustAnswerPartiCount(poll);
+			if (count>=partiCnt) {
+				result.set("msg","선착순 응모가 마감되었습니다.");
+				result.set("status","2");
+			}
+			
+		}
 		return result;
 	}
 	

+ 31 - 8
src/main/java/com/style24/persistence/mybatis/shop/TsfCart.xml

@@ -607,7 +607,9 @@
 		                                     , CASE WHEN G.GOODS_STAT != 'G008_90' AND G.GOODS_STAT != 'G008_70' AND COMP_GOODS.GOODS_STAT != 'G008_70' AND COMP_GOODS.GOODS_STAT != 'G008_90' THEN 'N'
 		                                            ELSE 'Y' END AS ORD_CAN_YN
 		                                     , CASE WHEN G.GOODS_STAT = 'G008_70' OR VS.SOLDOUT_YN = 'Y' OR VS.CURR_STOCK_QTY = 0 THEN 0
-		                                            ELSE TRUNCATE(VS.CURR_STOCK_QTY / GC.QTY, 0) END AS ORD_CAN_QTY
+		                                            ELSE CASE WHEN G.MAX_ORD_QTY > TRUNCATE(VS.CURR_STOCK_QTY / GC.QTY, 0) THEN TRUNCATE(VS.CURR_STOCK_QTY / GC.QTY, 0)
+		                                                      ELSE G.MAX_ORD_QTY END
+		                                            END AS ORD_CAN_QTY
 		                                FROM   TB_CART C
 		                                INNER  JOIN TB_CART_DETAIL CD
 		                                ON     C.CART_SQ = CD.CART_SQ
@@ -638,7 +640,9 @@
 		                                     , CASE WHEN G.GOODS_STAT != 'G008_90' AND G.GOODS_STAT != 'G008_70' THEN 'N'
 		                                            ELSE 'Y' END AS ORD_CAN_YN
 		                                     , CASE WHEN G.GOODS_STAT = 'G008_70' OR VS.SOLDOUT_YN = 'Y' THEN 0
-		                                            ELSE VS.CURR_STOCK_QTY END AS ORD_CAN_QTY
+		                                            ELSE CASE WHEN G.MAX_ORD_QTY > VS.CURR_STOCK_QTY THEN CURR_STOCK_QTY
+		                                                      ELSE G.MAX_ORD_QTY END
+		                                            END AS ORD_CAN_QTY
 		                                FROM   TB_CART C
 		                                INNER  JOIN TB_CART_DETAIL CD
 		                                ON     C.CART_SQ = CD.CART_SQ
@@ -703,8 +707,8 @@
 		     , Z.PNT_PRATE
 		     , Z.PNT_MRATE
 		     , SYS_IMG_NM
-		ORDER  BY Z.DELV_FEE_CD
-		     , Z.CART_SQ DESC
+		ORDER  BY Z.CART_DELV_FEE_CD DESC
+		     , Z.GOODS_CD DESC
 	</select>
 
 	<!-- 장바구니 업체별 배송비 -->
@@ -1046,26 +1050,31 @@
 		/* TsfCart.getCartDetailInfo : 장바구니 상품 상세 조건 정보 조회*/
 		SELECT A.CART_SQ
 		     , A.GOODS_CD
-			 , A.GOODS_STAT
+		     , A.GOODS_STAT
 		     , A.ITEM_CD
 		     , A.ITEM_NM
+		     , A.MIN_ORD_QTY
 		     , A.OPT_CD
 		     , A.OPT_CD1
 		     , A.OPT_CD2
 		     , A.COLOR_NM
 		     , A.SOLDOUT_YN
+		     , A.ORD_CAN_YN
 		     , A.ORD_CAN_QTY
 		FROM   (SELECT C.CART_SQ
 		             , C.GOODS_CD
 		             , G.GOODS_STAT
-		             , COMP_GOODS.GOODS_NM AS ITEM_NM
-		             , CD.ITEM_CD
+					 , CD.ITEM_CD
+					 , COMP_GOODS.GOODS_NM AS ITEM_NM
+		             , G.MIN_ORD_QTY
 		             , CD.OPT_CD
 		             , CD.OPT_CD1
 		             , CD.OPT_CD2
 		             , IFNULL((SELECT COLOR_KNM FROM TB_COLOR C WHERE COLOR_CD = IFNULL(NULLIF(CD.OPT_CD1,'') , G.MAIN_COLOR_CD ) AND USE_YN  = 'Y'), CD.OPT_CD1) AS COLOR_NM
 		             , CASE WHEN VS.SOLDOUT_YN = 'N' AND COMP_GOODS.GOODS_STAT != 'G008_70' AND G.GOODS_STAT != 'G008_70' THEN 'N'
 		                    ELSE 'Y' END AS SOLDOUT_YN
+		             , CASE WHEN G.GOODS_STAT != 'G008_90' AND G.GOODS_STAT != 'G008_70' AND COMP_GOODS.GOODS_STAT != 'G008_70' AND COMP_GOODS.GOODS_STAT != 'G008_90' THEN 'N'
+		                    ELSE 'Y' END AS ORD_CAN_YN
 		             , CASE WHEN G.GOODS_STAT = 'G008_70' OR VS.SOLDOUT_YN = 'Y' OR VS.CURR_STOCK_QTY = 0 THEN 0
 		                    ELSE CASE WHEN G.MAX_ORD_QTY > TRUNCATE(VS.CURR_STOCK_QTY / GC.QTY, 0) THEN TRUNCATE(VS.CURR_STOCK_QTY / GC.QTY, 0)
 		                              ELSE G.MAX_ORD_QTY END
@@ -1090,15 +1099,18 @@
 		        UNION ALL
 		        SELECT C.CART_SQ
 		             , C.GOODS_CD
-					 , G.GOODS_STAT
+		             , G.GOODS_STAT
 		             , CD.ITEM_CD
 		             , G.GOODS_NM AS ITEM_NM
+		             , G.MIN_ORD_QTY
 		             , CD.OPT_CD
 		             , CD.OPT_CD1
 		             , CD.OPT_CD2
 		             , IFNULL((SELECT COLOR_KNM FROM TB_COLOR C WHERE COLOR_CD = IFNULL(NULLIF(CD.OPT_CD1,'') , G.MAIN_COLOR_CD ) AND USE_YN  = 'Y'), CD.OPT_CD1) AS COLOR_NM
 		             , CASE WHEN VS.SOLDOUT_YN = 'N' AND G.GOODS_STAT != 'G008_70' THEN 'N'
 		                    ELSE 'Y' END AS SOLDOUT_YN
+		             , CASE WHEN G.GOODS_STAT != 'G008_90' AND G.GOODS_STAT != 'G008_70' THEN 'N'
+		                    ELSE 'Y' END AS ORD_CAN_YN
 		             , CASE WHEN G.GOODS_STAT = 'G008_70' OR VS.SOLDOUT_YN = 'Y' THEN 0
 		                    ELSE CASE WHEN G.MAX_ORD_QTY > VS.CURR_STOCK_QTY THEN CURR_STOCK_QTY
 		                              ELSE G.MAX_ORD_QTY END
@@ -1117,4 +1129,15 @@
 		        AND    C.CART_SQ =  #{cartSq}
 		) A
 	</select>
+
+	<!-- 장바구니 수량 UPDATE -->
+	<update id="updateCartGoodsQty" parameterType="Cart">
+		/* TsfCart.updateCartGoodsQty : 장바구니 수량 UPDATE */
+		UPDATE TB_CART SET
+		      GOODS_QTY = #{goodsQty}
+		    , UPD_NO = #{updNo}
+		    , UPD_DT = NOW()
+		WHERE CART_SQ = #{cartSq}
+		AND   CUST_NO = #{custNo}
+	</update>
 </mapper>

+ 9 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsfPlanning.xml

@@ -1041,4 +1041,13 @@
 		 AND NOW() BETWEEN P.DISP_STDT AND P.DISP_EDDT 
 		 AND NOW() BETWEEN TP.POLL_STDT AND TP.POLL_EDDT	
 	</select>
+	
+	<!-- 설문자 선착순 카운트 -->
+	<select id="getCustAnswerPartiCount" parameterType="Poll" resultType="int">
+		/* TsfPlanning.getCustAnswerPartiCount */
+		SELECT DISTINCT count(*) AS COUNT
+		FROM TB_POLL_ANSWER A INNER JOIN TB_POLL_QUESTION B ON A.POLL_QSQ = B.POLL_QSQ 
+		WHERE B.POLL_SQ = #{pollSq}
+		GROUP BY b.POLL_QSQ, B.POLL_SQ			
+	</select>
 </mapper>

+ 156 - 321
src/main/webapp/WEB-INF/views/web/cart/CartListAjaxFormWeb.html

@@ -446,7 +446,7 @@
 					</dl>
 				</div>
 				<div class="btn_box">
-					<button class="btn btn_primary btn_block btn_md" onclick="fnSubmitNoMember('all')"><span>구매하기</span></button>
+					<button class="btn btn_primary btn_block btn_md" onclick="fnSubmitNoMember('all'); return false;"><span>구매하기</span></button>
 				</div>
 			</div>
 			<div class="area_salecoupon">
@@ -542,6 +542,7 @@
 		let sumRealPayAmt = [[${order.sumRealPayAmt + order.totDelvFee}]];
 		let totDcAmt = [[${order.totDcAmt}]];
 		let loginInfo = [[${loginInfo}]];
+		let orderFlag = true;
 
 		function NotApplyTmtbCartList() {
 			let tmtbSq = 0;
@@ -570,7 +571,7 @@
 			cfnAddCart(compsList);*/
 
 			if([[${!order.shotCanYn.equals('Y')}]]) {
-				//$(".shotDelvSelect").hide();
+				$(".shotDelvSelect").hide();
 			}
 
 			$("#cartListForm .area_salecoupon .coupon_box").hide();
@@ -579,9 +580,6 @@
 				$("#cartListForm .area_salecoupon").hide();
 			}
 
-			// 다다익선 할인 대상(미적용) 리스트
-			// notApplyTmtbAreaList();
-
 			/* 세트상품 장바구니 */
 			/*let compsList = [];
 			let temp = new Object;
@@ -641,154 +639,6 @@
 			cfnAddCart(compsList);*/
 		});
 
-		function notApplyTmtbAreaList() {
-			/*let notApplyQtyTmtbList = new Array();
-			let notApplyAmtTmtbList = new Array();
-
-			// 수량 다다익선 조회
-			$("#cartListForm input[name=qtyTmtbSq]").each(function (index) {
-				if($(this).val() != "0" && $(this).parent().find("input[name=applyQtySectionYn]").val() == "N") {
-					let obj = new Object();
-					obj.tmtbSq = $(this).val();
-					obj.tmtbNm = $(this).parent().find("input[name=qtyTmtbNm]").val();
-					obj.currPrice = $(this).parent().find("input[name=currPrice]").val();
-					obj.goodsNm = $(this).parent().find(".info_box").find(".name").text();
-					obj.brandNm = $(this).parent().find(".info_box").find(".brand").text();
-					obj.imgPath = $(this).parent().find(".info_item").find(".thumb_box img").attr("src");
-
-					notApplyQtyTmtbList.push(obj);
-				}
-
-				if($(this).parent().find("input[name=applyAmtSectionYn]").val() == "N") {	   // 다다익선 금액은 기본상품만 가져오면됨 (N은 기본상품에 걸려있음)
-					let obj = new Object();
-					obj.tmtbSq = $(this).parent().find("input[name=amtTmtbSq]").val();
-					obj.tmtbNm = $(this).parent().find("input[name=amtTmtbNm]").val();
-
-					notApplyAmtTmtbList.push(obj);
-				}
-			});
-
-			// 수량 다다익선 정렬
-			var t = new Object();
-			for (let i = 0; i < notApplyQtyTmtbList.length; i++) {
-				for (let j = 0; j < notApplyQtyTmtbList.length - i - 1; j++) {
-					if (notApplyQtyTmtbList[j].tmtbSq > notApplyQtyTmtbList[j + 1].tmtbSq) {
-						t = notApplyQtyTmtbList[j];
-						notApplyQtyTmtbList[j] = notApplyQtyTmtbList[j + 1];
-						notApplyQtyTmtbList[j + 1] = t;
-					}
-				}
-			}
-
-			fnCreateNotApplyTmtbAreaList(notApplyQtyTmtbList, notApplyAmtTmtbList);*/
-		}
-
-		/*function fnCreateNotApplyTmtbAreaList(notApplyQtyTmtbList, notApplyAmtTmtbList) {
-			// 정렬 후 같은 다다익선 상품은 한 배열로 묶음
-			let tmtbQtyList = new Array();
-
-			for (let i = 0; i < notApplyQtyTmtbList.length; i++) {
-				let goods = notApplyQtyTmtbList[i];
-				let tmtbInfo = new Object();
-				let chk = false;
-				for (let j = 0; j < tmtbQtyList.length; j++) {
-					let tmtb = tmtbQtyList[j];
-					if (goods.tmtbSq == tmtb.tmtbSq) {
-						tmtbInfo = tmtbQtyList[j];
-						chk = true;
-					}
-				}
-
-				// 현재 상품 정보
-				let goodsInfo = new Object();
-				goodsInfo.brandNm = goods.brandNm;
-				goodsInfo.goodsNm = goods.goodsNm;
-				goodsInfo.imgPath = goods.imgPath;
-				goodsInfo.currPrice = goods.currPrice;
-
-				// 현재 상품 정보 다다익선 정보에 세팅
-				if (chk) {
-					tmtbInfo.goodsList.push(goodsInfo);
-				} else {
-					let obj = new Object();
-					obj.tmtbSq = goods.tmtbSq;
-					obj.tmtbNm = goods.tmtbNm;
-					obj.goodsList = new Array();
-					obj.goodsList.push(goodsInfo);
-					tmtbQtyList.push(obj);
-				}
-			}
-
-			// 수량 다다익선 HTML 작성
-			let tmtbHtml = "";
-			for(let i = 0 ; i < tmtbQtyList.length ; i++) {
-				let tmtb = tmtbQtyList[i];
-				tmtbHtml += '<div class="more_sale qtyNotApplyTmtbList">';
-				for(let j = 0 ; j < tmtb.goodsList.length ; j++) {
-					let goods = tmtb.goodsList[j];
-					tmtbHtml += '<div class="item_gd">\n' +
-						'				<figure>\n' +
-						'					<a href="">\n' +
-						'						<span class="thumb"><img src="';
-					tmtbHtml += goods.imgPath;
-					tmtbHtml += '" alt=""></span>\n' +
-						'					</a>\n' +
-						'					<figcaption>\n' +
-						'						<a href="">\n' +
-						'							<div class="brand">';
-					tmtbHtml += goods.brandNm;
-					tmtbHtml += '</div>\n' +
-						'							<div class="name">';
-					tmtbHtml += goods.goodsNm;
-					tmtbHtml += '</div>\n' +
-						'							<div class="price">\n' +
-						'								<span class="selling_price">';
-					tmtbHtml += Number(goods.currPrice).toLocaleString();
-					tmtbHtml += '</span>\n' +
-						'							</div>\n' +
-						'						</a>\n' +
-						'					</figcaption>\n' +
-						'				</figure>\n' +
-						'			</div>';
-				}
-
-				tmtbHtml += '<div class="txt">\n' +
-					'				<a href="">\n' +
-					'					<i class="ico ico_saletag"></i>\n' +
-					'					<input type="hidden" name="tmtbSq" value="' + tmtb.tmtbSq + '" />' +
-					'					<span>\n';
-				tmtbHtml += tmtb.tmtbNm;
-				tmtbHtml += '</span>\n' +
-					'				</a>\n' +
-					'			</div>\n' +
-					'		</div>';
-			}
-
-			// 금액 다다익선 정보 HTML 작성
-			for(let i = 0 ; i < notApplyAmtTmtbList.length ; i++) {
-				if (notApplyAmtTmtbList[i].tmtbSq != 0) {
-					let tmtb = notApplyAmtTmtbList[i];
-					tmtbHtml += '<div class="more_sale amtNotApplyTmtbList">\n' +
-						'			<div class="txt">\n' +
-						'				<a href="">\n' +
-						'					<i class="ico ico_saletag"></i>\n' +
-						'					<input type="hidden" name="tmtbSq" value="' + tmtb.tmtbSq + '" />' +
-						'					<span>';
-					tmtbHtml += tmtb.tmtbNm;
-					tmtbHtml += '</span>\n' +
-						'				</a>\n' +
-						'			</div>\n' +
-						'		</div>';
-				}
-			}
-
-			if(tmtbHtml != "") {
-				tmtbHtml = "<h4>다다익선 할인 대상이 있습니다.</h4>" + tmtbHtml;
-			}
-
-			$(".area_saleitem").html(tmtbHtml);
-		}*/
-
 		function cancelCartCpn() {
 			$("#cartListForm #sumRealPayAmt").text(Number(sumRealPayAmt).toLocaleString());
 			$("#cartListForm #totDcAmt").text(Number(totDcAmt).toLocaleString());
@@ -1015,25 +865,20 @@
 				$("#cartListForm .shotCartInfo input[name=cartSq]").each(function() {
 					if(shotList[i].cartSq == $(this).val()) {
 						let shot = shotList[i];
-						// $(this).parent().find(".thumb_box img").attr("src", result.imgPath1 + "/" + wms.sysImgNm);
 						$(this).parent().find(".od_moresale .applyTmtbNm > ul").html("");
 						$(this).parent().find(".od_moresale .notApplyTmtbNm > ul").html("");
 
 						// 다다익선 적용 정보 생성성
 						if(shot.qtyTmtbSq > 0 && shot.applyQtySectionYn == "Y") {
-							//$(this).parent().find(".applyTmtb .applyTmtbNm > ul").append("<li>" + shot.qtyTmtbNm + "</li>");
 							$(this).parent().find(".applyTmtb").show();
 						}
 						if(shot.amtTmtbSq > 0 && shot.applyAmtSectionYn == "Y") {
-							//$(this).parent().find(".applyTmtb .applyTmtbNm > ul").append("<li>" + shot.amtTmtbNm + "</li>");
 							$(this).parent().find(".applyTmtb").show();
 						}
 						if(shot.qtyTmtbSq > 0 && shot.applyQtySectionYn == "N") {
-							//$(this).parent().find(".notApplyTmtb .notApplyTmtbNm > ul").append("<li>" + shot.qtyTmtbNm + "<a href=''>대상 상품 보기</a></li>");
 							$(this).parent().find(".notApplyTmtb").show();
 						}
 						if(shot.amtTmtbSq > 0 && shot.applyAmtSectionYn == "N") {
-							//$(this).parent().find(".notApplyTmtb .notApplyTmtbNm > ul").append("<li>" + shot.amtTmtbNm + "<a href=''>대상 상품 보기</a></li>");
 							$(this).parent().find(".notApplyTmtb").show();
 						}
 
@@ -1042,7 +887,6 @@
 							$(this).parent().find(".calc_box .price_sale").text(Number(shot.tmtbDcAmt).toLocaleString() + " 원");
 							$(this).parent().find(".calc_box").prepend("<p><span class='price_org'><em>" + Number(shot.currPrice).toLocaleString() + "</em>원</span></p>");
 							$(this).parent().find("input[name=tmtbDcAmt]").val(shot.tmtbDcAmt);
-							//$(this).parent().find(".calc_box .price").append("<del>" + Number(wms.currPrice).toLocaleString() + " 원</del>");
 						}
 					}
 				});
@@ -1053,25 +897,20 @@
 				$("#cartListForm .wmsCartInfo input[name=cartSq]").each(function() {
 					if(wmsList[i].cartSq == $(this).val()) {
 						let wms = wmsList[i];
-						// $(this).parent().find(".thumb_box img").attr("src", result.imgPath1 + "/" + wms.sysImgNm);
 						$(this).parent().find(".od_moresale .applyTmtbNm > ul").html("");
 						$(this).parent().find(".od_moresale .notApplyTmtbNm > ul").html("");
 
 						// 다다익선 적용 정보 생성성
 						if(wms.qtyTmtbSq > 0 && wms.applyQtySectionYn == "Y") {
-							//$(this).parent().find(".applyTmtb .applyTmtbNm > ul").append("<li>" + wms.qtyTmtbNm + "</li>");
 							$(this).parent().find(".applyTmtb").show();
 						}
 						if(wms.amtTmtbSq > 0 && wms.applyAmtSectionYn == "Y") {
-							//$(this).parent().find(".applyTmtb .applyTmtbNm > ul").append("<li>" + wms.amtTmtbNm + "</li>");
 							$(this).parent().find(".applyTmtb").show();
 						}
 						if(wms.qtyTmtbSq > 0 && wms.applyQtySectionYn == "N") {
-							//$(this).parent().find(".notApplyTmtb .notApplyTmtbNm > ul").append("<li>" + wms.qtyTmtbNm + "<a href=''>대상 상품 보기</a></li>");
 							$(this).parent().find(".notApplyTmtb").show();
 						}
 						if(wms.amtTmtbSq > 0 && wms.applyAmtSectionYn == "N") {
-							//$(this).parent().find(".notApplyTmtb .notApplyTmtbNm > ul").append("<li>" + wms.amtTmtbNm + "<a href=''>대상 상품 보기</a></li>");
 							$(this).parent().find(".notApplyTmtb").show();
 						}
 
@@ -1080,7 +919,6 @@
 							$(this).parent().find(".calc_box .price_sale").text(Number(wms.tmtbDcAmt).toLocaleString() + " 원");
 							$(this).parent().find(".calc_box").prepend("<p><span class='price_org'><em>" + Number(wms.currPrice).toLocaleString() + "</em>원</span></p>");
 							$(this).parent().find("input[name=tmtbDcAmt]").val(wms.tmtbDcAmt);
-							//$(this).parent().find(".calc_box .price").append("<del>" + Number(wms.currPrice).toLocaleString() + " 원</del>");
 						}
 					}
 				});
@@ -1092,7 +930,6 @@
 			} else {
 				let html = "<span class='dlvr_fee'>배송비 <em>" + Number(order.wmsDelvFee).toLocaleString() + "</em> 원</span><a href='#' class='btn_popup_save'>배송비 SAVE 상품 보기</a>";
 				$(".selfGoodsDelv").html(html);
-				// $(".wmsList").find(".delv_" + wms.delvFeeCd).append("<span class='dlvr_shop'>" + wms.supplyCompNm + " 업체직배송</span>");
 			}
 
 			for(let i = 0 ; i < delvList.length ; i++) {
@@ -1100,26 +937,20 @@
 				$("#cartListForm .delvList .delvCartInfo input[name=cartSq]").each(function() {
 					if(delvList[i].cartSq == $(this).val()) {
 						let delv = delvList[i];
-						// $(this).parent().find(".thumb_box img").attr("src", result.imgPath1 + "/" + wms.sysImgNm);
 						$(this).parent().find(".od_moresale .applyTmtbNm > ul").html("");
 						$(this).parent().find(".od_moresale .notApplyTmtbNm > ul").html("");
 
 						// 다다익선 적용 정보 생성성
 						if(delv.qtyTmtbSq > 0 && delv.applyQtySectionYn == "Y") {
-							//$(this).parent().find(".applyTmtb .applyTmtbNm > ul").append("<li>" + delv.qtyTmtbNm + "</li>");
 							$(this).parent().find(".applyTmtb").show();
 						}
 						if(delv.amtTmtbSq > 0 && delv.applyAmtSectionYn == "Y") {
-							//$(this).parent().find(".applyTmtb .applyTmtbNm > ul").append("<li>" + delv.amtTmtbNm + "</li>");
 							$(this).parent().find(".applyTmtb").show();
 						}
 						if(delv.qtyTmtbSq > 0 && delv.applyQtySectionYn == "N") {
-							//$(this).parent().find(".notApplyTmtb .notApplyTmtbNm > ul").append("<li>" + delv.qtyTmtbNm + "<a href=''>대상 상품 보기</a></li>");
 							$(this).parent().find(".notApplyTmtb").show();
 						}
 						if(delv.amtTmtbSq > 0 && delv.applyAmtSectionYn == "N") {
-							//$(this).parent().find(".notApplyTmtb .notApplyTmtbNm > ul").append("<li>" + delv.amtTmtbNm + "<a href=''>대상 상품 보기</a></li>");
-							$(this).parent().find(".notApplyTmtb").show();
 						}
 
 						// 다다익선 할인가 적용
@@ -1127,7 +958,6 @@
 							$(this).parent().find(".calc_box .price_sale").text(Number(delv.tmtbDcAmt).toLocaleString() + " 원");
 							$(this).parent().find(".calc_box").prepend("<p><span class='price_org'><em>" + Number(delv.currPrice).toLocaleString() + "</em>원</span></p>");
 							$(this).parent().find("input[name=tmtbDcAmt]").val(delv.tmtbDcAmt);
-							//$(this).parent().find(".calc_box .price").append("<del>" + Number(delv.currPrice).toLocaleString() + " 원</del>");
 						}
 
 						if(delv.delvFee == 0) {
@@ -1154,46 +984,6 @@
 				$("#cartListForm .sumRealPayAmt").text(Number(order.sumRealPayAmt + order.totDelvFee).toLocaleString());
 				cancelCartCpn();
 			}
-
-			/*let notApplyQtyTmtbList = new Array();
-			let notApplyAmtTmtbList = new Array();
-			for(let i = 0 ; i < cartList.length ; i++) {
-				let cart = cartList[i];
-				if(cart.applyQtySectionYn == "N") {
-					let obj = new Object();
-					obj.tmtbSq = cart.qtyTmtbSq;
-					obj.tmtbNm = cart.qtyTmtbNm;
-					obj.currPrice = cart.currPrice;
-					obj.goodsNm = cart.goodsNm;
-					obj.brandNm = cart.brandEnm + " " + cart.brandKnm;
-					obj.imgPath = order.imgPath1 + "/" + cart.sysImgNm;
-
-					notApplyQtyTmtbList.push(obj);
-				}
-
-				if(cart.applyAmtSectionYn == "N") {
-					let obj = new Object();
-					obj.tmtbSq = cart.amtTmtbSq;
-					obj.tmtbNm = cart.amtTmtbNm;
-
-					notApplyAmtTmtbList.push(obj);
-				}
-			}
-
-			// 수량 다다익선 정렬
-			var t = new Object();
-			for (let i = 0; i < notApplyQtyTmtbList.length; i++) {
-				for (let j = 0; j < notApplyQtyTmtbList.length - i - 1; j++) {
-					if (notApplyQtyTmtbList[j].tmtbSq > notApplyQtyTmtbList[j + 1].tmtbSq) {
-						t = notApplyQtyTmtbList[j];
-						notApplyQtyTmtbList[j] = notApplyQtyTmtbList[j + 1];
-						notApplyQtyTmtbList[j + 1] = t;
-					}
-				}
-			}
-
-			// 다다익선 적용 대상 상품 노출
-			fnCreateNotApplyTmtbAreaList(notApplyQtyTmtbList, notApplyAmtTmtbList);*/
 		}
 
 		//옵션변경 팝업열기
@@ -1204,7 +994,6 @@
 				dataType : 'html',
 				data : {cartSq : cartSq},
 				success : function(result) {
-					//fnChangeCartListInfo(result);
 					$("#cartOptionModal").remove();
 					$("#optModifyPop").html(result);
 					$("#optModifyPop").modal("show");
@@ -1212,120 +1001,142 @@
 			});
 		}
 
-		// 상품상세 페이지 이동 처리
-		/*var fnGoToGoodsDetail = function(param) {
-			let goodsCd = $(param).attr('goodsCd');
-			cfnGoToPage(_PAGE_GOODS_DETAIL + goodsCd);
-		}*/
-
-		// 주문하기
-		function fnSubmitNoMember(cartSq) {
-			let cartSqArr = [];
-
-			if($("#cartListForm input[name=cartSqArr]:checked").length < 1) {
-				mcxDialog.alert("구매하실 상품을 선택해주세요.");
-				return false;
-			}
-
-			// 선택된 장바구니 번호
-			$("#cartListForm input[name=cartSqArr]:checked").each(function () {
-				cartSqArr.push($(this).val());
-			});
-
-			// 선택된 장바구니 정보 가공
-			let data = {	  cartSqArr : cartSqArr
-							, custNo : loginInfo.custNo
+		function fnOrderValidation(list, listIndex, cartSqArr, allYn) {
+			// listIndex가 -1이면 (마지막이 지난후)
+			if(listIndex ==  - 1) {
+				if(allYn == "Y" && orderFlag) {
+					$("#cartListForm").submit();
+				} else {
+					if(orderFlag) {
+						let html	 = "<input type='hidden' name='cartSqArr' value='" + cartSqArr + "' />";
+						html		+= "<input type='hidden' name='shotDelvUseYn' value='" + $("input[name=shotDelvUseYn]:checked").val() + "' />";
+						$("#cartInfoForm").html(html);
+						$("#cartInfoForm").submit();
+					}
+				}
 			}
-			let jsonData = JSON.stringify(data);
 
-			$.ajax( {
-				type: "POST",
-				url : '/cart/order/list/check',
-				contentType: 'application/json',
-				dataType : 'json',
-				data : jsonData,
-				success : function(result) {
-					if(result == null || result.length == 0) {
-						mcxDialog.alert("주문 가능한 상품이 존재하지 않습니다. 새로고침 후 다시 시도해주세요.");
-					} else {
-						for(let i = 0 ; i < result.length ; i++) {
-							let removeCartSq = 0;
-							let updateCartSq = 0;
-							let goodsQty = 0;
-							if(result.ordCanYn == "N") {
-								mcxDialog.confirm(result.goodsNm + " 상품은 구매 할 수 없습니다. 제외하고 계속 주문하시겠습니까?", {
-									cancelBtnText: "취소",		//취소 또는 닫기 버튼명
-									sureBtnText: "확인", 		//처리문 버튼명
-									sureBtnClick: function(){
-										removeCartSq = result.cartSq;
-									}
-								});
+			let info = list[listIndex];
+			let removeCartSq = 0, updateCartSq = 0, goodsQty = 0;
+			listIndex++;
+
+			// list[listIndex]가 null이 아니라면
+			if(info != null) {
+				if (info.ordCanYn == "N") {		// 주문 불가
+					mcxDialog.confirmC(info.goodsNm + " 상품은 구매 할 수 없습니다. 제외하고 계속 주문하시겠습니까?", { //내용
+						btn     : ["취소", "확인"],
+						btnClick: function (index) {
+							if (index == 1) { //button1 일때 처리문
+								orderFlag = false;
+								return false;
+							} else {	//button2 일때 처리문
+								fnCheckOffCartSqArr(cartSqArr, info.cartSq);
+								fnOrderValidation(list, listIndex, cartSqArr, allYn);
 							}
-							if(result.soldoutYn == "Y") {
-								if(result.goodsStat == "G008_70" || result.ordCanQty < result.minOrdQty) {
-									mcxDialog.confirm(result.goodsNm + " 상품은 품절입니다. 제외하고 계속 주문하시겠습니까?", {
-										cancelBtnText: "취소",		//취소 또는 닫기 버튼명
-										sureBtnText: "확인", 		//처리문 버튼명
-										sureBtnClick: function(){
-											removeCartSq = result.cartSq;
-										}
-									});
-								} else if (result.ordCanQty == 0) {
-									mcxDialog.confirm(result.goodsNm + "의 " + result.colorNm + " 옵션이 품절되었습니다. 제외하고 계속 주문하시겠습니까?", {
-										cancelBtnText: "취소",		//취소 또는 닫기 버튼명
-										sureBtnText: "확인", 		//처리문 버튼명
-										sureBtnClick: function(){
-											removeCartSq = result.cartSq;
-										}
-									});
-								} else if (result.ordCanQty == 0) {
-									let message = "";
-									if("G056_S" == result.goodsType) {
-										message = result.goodsNm + " 의" + result.itemNm + "/" + result.colorNm + "/" + result.optCd2 + "의 수량이 부족합니다. 구매가능 수량은 " + result.minOrdQty + "개입니다. 구매가능 수량만큼 주문하시겠습니까?";
-									} else {
-										message = result.goodsNm + " 의" + result.colorNm + "/" + result.optCd2 + "의 수량이 부족합니다. 구매가능 수량은 " + result.minOrdQty + "개입니다. 구매가능 수량만큼 주문하시겠습니까?";
-									}
-									mcxDialog.confirm(message, {
-										cancelBtnText: "취소",		//취소 또는 닫기 버튼명
-										sureBtnText: "확인", 		//처리문 버튼명
-										sureBtnClick: function(){
-											updateCartSq = result.cartSq;
-											goodsQty = result.minOrdQty;
-										}
-									});
+						}
+					});
+				} else if (info.soldoutYn == "Y") {		// 품절
+					if (info.goodsStat == "G008_70" || info.ordCanQty < info.minOrdQty) {		// 상품 상태가 품절이거나 주문 가능 수량이 최소주문수량보다 적을경우
+						mcxDialog.confirmC(info.goodsNm + " 상품은 품절입니다. 제외하고 계속 주문하시겠습니까?", { //내용
+							btn     : ["취소", "확인"],
+							btnClick: function (index) {
+								if (index == 1) { //button1 일때 처리문
+									orderFlag = false;
+									return false;
+								} else {	//button2 일때 처리문
+									fnCheckOffCartSqArr(cartSqArr, info.cartSq);
+									fnOrderValidation(list, listIndex, cartSqArr, allYn);
 								}
 							}
-
-							if(removeCartSq > 0) {
-								// 장바구니 선택된것 삭제 > cartSq 0으로 만들면 될듯함.
-								for(let i = 0 ; i < cartSqArr.length ; i++) {
-									if(cartSqArr[i] == removeCartSq) {
-										cartSqArr[i] = 0;
-									}
+						});
+					} else if (info.ordCanQty == 0) {		// 주문 가능 수량이 0일경우
+						mcxDialog.confirmC(info.goodsNm + "의 " + info.colorNm + " 옵션이 품절되었습니다. 제외하고 계속 주문하시겠습니까?", { //내용
+							btn     : ["취소", "확인"],
+							btnClick: function (index) {
+								if (index == 1) { //button1 일때 처리문
+									orderFlag = false;
+									return false;
+								} else {	//button2 일때 처리문
+									fnCheckOffCartSqArr(cartSqArr, info.cartSq);
+									fnOrderValidation(list, listIndex, cartSqArr, allYn);
 								}
 							}
-							if(updateCartSq > 0) {
-								// 장바구니 goodsQty update
-								updateGoodsQty(updateCartSq, goodsQty);
+						});
+					} else if (listIndex < list.length) {
+						// 혹시 else일 경우
+						fnOrderValidation(list, listIndex, cartSqArr, allYn);
+					}
+				} else if (info.minOrdQty > info.goodsQty) {		// 최소 주문 수량보다 장바구니에 적게 들어왔을 경우
+					let message;
+					if ("G056_S" == info.goodsType) {
+						message = info.goodsNm + " 의" + info.itemNm + "/" + info.colorNm + "/" + info.optCd2 + "의 수량이 부족합니다.\n구매가능 수량은 " + info.minOrdQty + "개입니다.\n구매가능 수량만큼 주문하시겠습니까?";
+					} else {
+						message = info.goodsNm + " 의" + info.colorNm + "/" + info.optCd2 + "의 수량이 부족합니다.\n구매가능 수량은 " + info.minOrdQty + "개입니다.\n구매가능 수량만큼 주문하시겠습니까?";
+					}
+
+					mcxDialog.confirmC(message, { //내용
+						btn     : ["취소", "확인"],
+						btnClick: function (index) {
+							if (index == 1) { //button1 일때 처리문
+								orderFlag = false;
+								return false;
+							} else {	//button2 일때 처리문
+								updateGoodsQty(info.cartSq, info.minOrdQty);
+								fnOrderValidation(list, listIndex, cartSqArr, allYn);
 							}
 						}
-					}
+					});
+				} else if (listIndex < list.length) {
+					fnOrderValidation(list, listIndex, cartSqArr, allYn);
+				} else {
+					fnOrderValidation(list, -1, cartSqArr, allYn);
+				}
+			} else {
+				fnOrderValidation(list, -1, cartSqArr, allYn);
+			}
+		}
+
+		function fnCheckOffCartSqArr(cartSqArr, cartSq) {
+			// 체크박스 해제
+			$("#cartListForm input[name=cartSqArr]").each(function () {
+				if ($(this).val() == cartSq) {
+					$(this).prop("checked", false);
 				}
 			});
 
-			/*if(loginInfo == null || loginInfo.custNo == null || loginInfo.custNo == 0) {
+			// 장바구니 선택된것 삭제 > cartSq 0으로 변경
+			for (let i = 0; i < cartSqArr.length; i++) {
+				if (cartSqArr[i] == cartSq) {
+					cartSqArr[i] = 0;
+				}
+			}
+		}
+
+		// 주문하기
+		function fnSubmitNoMember(cartSq) {
+			let cartSqArr = [];
+			orderFlag = true;
+
+			if($("#cartListForm input[name=cartSqArr]:checked").length < 1) {
+				mcxDialog.alert("구매하실 상품을 선택해주세요.");
+				return false;
+			}
+
+			if(loginInfo == null || loginInfo.custNo == null || loginInfo.custNo == 0) {
 				var btn = ["비회원 구매", "로그인 후 구매"];
 				mcxDialog.confirmC("로그인 후 구매 시 다양한 혜택을 받으실 수 있습니다.", { //내용
 					btn: btn,
 					btnClick: function(index){
 						if (index == 1){ //button1 일때 처리문
 							if(cartSq == "all") {
-								$("#cartListForm").submit();
+								// 선택된 장바구니 번호
+								$("#cartListForm input[name=cartSqArr]:checked").each(function () {
+									cartSqArr.push($(this).val());
+								});
+
+								fnOrderCheck(cartSqArr, 0, "Y");
 							} else {
-								let html	 = "<input type='hidden' name='cartSqArr' value='" + cartSq + "' />";
-								html		+= "<input type='hidden' name='shotDelvUseYn' value='" + $("input[name=shotDelvUseYn]:checked").val() + "' />";
-								$("#cartInfoForm").html(html);
-								$("#cartInfoForm").submit();
+								fnOrderCheck(cartSq, 0, "N");
 							}
 						} else {	//button2 일때 처리문
 							location.href="/signin";
@@ -1334,31 +1145,55 @@
 				});
 			} else {
 				if(cartSq == "all") {
-					$("#cartListForm").submit();
+					// 선택된 장바구니 번호
+					$("#cartListForm input[name=cartSqArr]:checked").each(function () {
+						cartSqArr.push($(this).val());
+					});
+
+					fnOrderCheck(cartSqArr, loginInfo.custNo, "Y");
 				} else {
-					let html	 = "<input type='hidden' name='cartSqArr' value='" + cartSq + "' />";
-					html		+= "<input type='hidden' name='shotDelvUseYn' value='" + $("input[name=shotDelvUseYn]:checked").val() + "' />";
-					$("#cartInfoForm").html(html);
-					$("#cartInfoForm").submit();
+					fnOrderCheck(cartSq, loginInfo.custNo, "N");
 				}
-			}*/
+			}
 		}
 
-		// 장바구니 구매 수량 변경
-		function updateGoodsQty(cartSq, goodsQty) {
+		function fnOrderCheck(cartSq, custNo, allYn) {
+			// 선택된 장바구니 정보 가공
+			let data = {	  cartSqArr : cartSq
+							, custNo : custNo
+			}
+			let jsonData = JSON.stringify(data);
+
 			$.ajax( {
 				type: "POST",
-				url : '/cart/update/goodsQty',
+				url : '/cart/order/list/check',
 				contentType: 'application/json',
 				dataType : 'json',
-				data : {cartSq : cartSq,
-						goodsQty : goodsQty},
+				data : jsonData,
 				success : function(result) {
-
+					if(result == null || result.length == 0) {
+						mcxDialog.alert("주문 가능한 상품이 존재하지 않습니다. 새로고침 후 다시 시도해주세요.");
+					} else {
+						fnOrderValidation(result, 0, cartSq, allYn);
+					}
 				}
 			});
 		}
 
+		// 장바구니 구매 수량 변경
+		function updateGoodsQty(cartSq, goodsQty) {
+			let url = '/cart/update/goodsQty';
+			// 선택된 장바구니 정보 가공
+			let data = {	  cartSq : cartSq
+							, goodsQty : goodsQty
+			}
+			let jsonData = JSON.stringify(data);
+
+			gagajf.ajaxJsonSubmit(url, jsonData, function(result) {
+				//alert(result.changeQty);
+			});
+		}
+
 		function fnGoToGoodsDetail(goodsCd) {
 			cfnGoToPage(_PAGE_GOODS_DETAIL + goodsCd);
 		}

+ 182 - 0
src/main/webapp/WEB-INF/views/web/mypage/MypageCustDeliveryAddrFormWeb.html

@@ -0,0 +1,182 @@
+<!DOCTYPE html>
+<html lang="ko" xmlns:th="http://www.thymeleaf.org"
+	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
+	layout:decorator="web/common/layout/MypageLayoutWeb">
+<!--
+ *******************************************************************************
+ * @source  : MypageCustDeliveryAddrFormWeb.html
+ * @desc    : 마이페이지 > 배송지 관리 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2021 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.04.02   jsshin     최초 작성
+ *******************************************************************************
+ -->
+
+<body>
+<th:block layout:fragment="content">
+<div class="content myAddressList"> <!-- 페이지특정 클래스 = myAddressList -->
+	<div class="cont_body">
+		<!-- CONT-BODY -->
+		<div class="lnb">
+			<div class="lnb_tit">
+				<h2>마이페이지</h2>
+			</div>
+			<div class="lnb_list">
+				<ul id="mypageLnbList"></ul>
+			</div>
+		</div>
+		<div class="cont">
+			<div class="sec_head">
+				<h3 class="subH1">배송지 관리</h3>
+			</div>
+			<div class="sec_body">
+				<h4 class="subH3">배송지 목록</h4>
+				<!-- 데이터 있을 시 -->
+				<div id="data" class="tbl type1">
+					<table>
+						<colgroup>
+							<col width="*">
+							<col width="170">
+						</colgroup>
+						<tbody id="custDeliveryList">
+
+						</tbody>
+					</table>
+				</div>
+				<!-- //데이터 있을 시 -->
+				<!-- 데이터 없을 시 -->
+				<div id="nodata" class="nodata">
+					<div class="txt_box">
+						<p>
+							현재 노출 할 수 있는 데이터가 없습니다.<br>
+						</p>
+					</div>
+				</div>
+				<!-- //데이터 없을 시 -->
+			</div>
+			<div class="btn_footer_area">
+				<button type="button" id="btnAdrsaddPop" class="btn btn_dark btn_md"><span>배송지 추가</span></button>
+			</div>
+		</div>
+		<!-- // CONT-BODY -->
+	</div>
+</div>
+	<script th:inline="javascript">
+	/*<![CDATA[*/
+
+	var fnCustDeliveryAddList = function () {
+		$.get('/mypage/customer/delivery/addr/list', fnCustDeliveryAddListCallback);
+	}
+
+	var fnCustDeliveryAddListCallback = function (result) {
+		console.log('result', result);
+		if (result.length < 1) {
+			$('#nodata').show();
+			return;
+		}
+		$('#nodata').hide();
+		$('#custDeliveryList').html('');
+		let html = '';
+		$.each(result, function (idx, custDeliveryAddr){
+			if (custDeliveryAddr.defaultYn  === 'Y') {
+				html += '<tr class="addrs_default">\n';
+			} else {
+				html += '<tr>\n';
+			}
+			html +=	'    <td>\n';
+			html +=	'        <div class="block_line">\n';
+			html +=	'            <ul>\n';
+			html +=	'                <li>\n';
+			html +=	'                   <span>'+custDeliveryAddr.recipNm +'</span>\n';
+			if (custDeliveryAddr.defaultYn  === 'Y') {
+				html += '                   <span class="tag">기본 배송지</span>\n';
+			}
+			if (custDeliveryAddr.shotDelvUseYn  === 'Y') {
+				html += '                   <span class="tag primary_line">총알배송</span>\n';
+			}
+			html +=	'                </li>\n';
+			html +=	'                <li>\n';
+			html +=	'                    <span class="phone_number">'+custDeliveryAddr.recipPhnno+'</span>\n';
+			html +=	'                </li>\n';
+			html +=	'                <li>\n';
+			html +=	'                   <span>'+custDeliveryAddr.recipBaseAddr + custDeliveryAddr.recipDtlAddr +'</span>\n';
+			html +=	'                </li>\n';
+			html +=	'                <li>\n';
+			html +=	'                   배송요청 사항&nbsp;:&nbsp;<span>'+ custDeliveryAddr.delvMemo +'</span>\n';
+			html +=	'                </li>\n';
+			html +=	'            </ul>\n';
+			html +=	'        </div>\n';
+			html +=	'    </td>\n';
+			html +=	'    <td>\n';
+			html +=	'        <div class="button_box">\n';
+			html +=	'            <p>';
+			html +=	'                <button type="button" class="btn btn_default btn_sm" onclick="fnChangeDeliveryAddr(custDeliveryAddr.custDelvAddrSq)">';
+			html +=	'                    <span>수정</span>';
+			html +=	'                </button>';
+			html +=	'            </p>';
+			html +=	'            <p>';
+			html +=	'                <button type="button" class="btn btn_dark btn_sm">';
+			html +=	'                   <span>삭제</span>';
+			html +=	'                </button>';
+			html +=	'            </p>';
+			html +=	'        </div>\n';
+			html +=	'    </td>\n';
+			html += '</tr>\n';
+		});
+		$('#custDeliveryList').html(html);
+
+	}
+
+	// 배송지 추가
+	$('#btnAdrsaddPop').on('click', function () {
+		$.ajax( {
+			type		: "POST",
+			url 		: '/common/delvAddrAddPop',
+			dataType 	: 'html',
+			beforeSend : function(xhr, settings) {
+				xhr.setRequestHeader("AJAX"			, "true");
+				xhr.setRequestHeader('Accept'		, 'application/json');
+				xhr.setRequestHeader('Content-Type'	, 'application/json');
+				gagajf.showProgressbar(true);
+			},
+			success 	: function(result) {
+				$("#adrsAddPop .modal-dialog .modal-content").html(result);
+				$("#adrsAddPop").modal("show");
+			}
+		});
+	});
+
+	var delvAddrSet = function (delvObj) {
+		if(!gagajf.isNull(delvObj.custDelvAddrSq)) {
+			fnCustDeliveryAddList();
+		}
+	}
+
+	$(document).ready(function() {
+
+		// 마이페이지 LNB 설정
+		fnSetMypageLnbList(8);
+
+		// 마이페이지 location 설정
+		fnSetMypageLocation('배송지 관리');
+
+		// 배송목록 조회
+		fnCustDeliveryAddList();
+
+
+	});
+
+
+
+
+	/*]]>*/
+</script>
+</th:block>
+</body>
+</html>
+
+

+ 4 - 6
src/main/webapp/WEB-INF/views/web/mypage/MypageCustModifyFormWeb.html

@@ -353,18 +353,16 @@
 			return;
 		}
 		let custInfo = {};
-		custInfo.accountNm = $('input[name=accountNm]').val();
-		custInfo.accountNo = $('input[name=accountNo]').val();
-		custInfo.bankCd = $('input[name=bankCd]').val();
+		custInfo.accountNm = $('#custModiFyForm input[name=accountNm]').val();
+		custInfo.accountNo = $('#custModiFyForm input[name=accountNo]').val();
+		custInfo.bankCd = $('#custModiFyForm input[name=bankCd]').val();
 		let jsonData = JSON.stringify(custInfo)
-		console.log(jsonData);
+		//console.log(jsonData);
 		gagajf.ajaxJsonSubmit('/mypage/account/check', jsonData, fnAccountCheckCallback);
-		//ajaxSubmit('/mypage/account/check','html','accountHolder')
 	});
 
 	// 계좌인증 콜백
 	var fnAccountCheckCallback = function (result) {
-		console.log(result);
 		let msg = '계좌인증에 성공했습니다.'
 		if (result.isValid) { // 유효하면 true
 			accountCheck = true;

+ 4 - 0
src/main/webapp/WEB-INF/views/web/planning/PlanningDetailFormWeb.html

@@ -645,6 +645,10 @@ var fnJoinConfirm = function () {
 				mcxDialog.alert(result.msg);
 				return;
 			}
+			if (result.status == "2") {
+				mcxDialog.alert(result.msg);
+				return;
+			}
 			document.pollListForm.submit();
 		}
 	})