|
|
@@ -0,0 +1,1173 @@
|
|
|
+<html lang="ko"
|
|
|
+ xmlns:th="http://www.thymeleaf.org">
|
|
|
+<!--
|
|
|
+ *******************************************************************************
|
|
|
+ * @source : cartListFormMob
|
|
|
+ * @desc : 장바구니
|
|
|
+ *============================================================================
|
|
|
+ * STYLE24
|
|
|
+ * Copyright(C) 2020 TSIT, All rights reserved.
|
|
|
+ *============================================================================
|
|
|
+ * VER DATE AUTHOR DESCRIPTION
|
|
|
+ * === =========== ========== =============================================
|
|
|
+ * 1.0 2021.04.07 xodud1202 최초 작성
|
|
|
+ *******************************************************************************
|
|
|
+ -->
|
|
|
+<body>
|
|
|
+<th:block layout:fragment="content">
|
|
|
+ <form id="cartListForm" method="post" action="/order/noMember">
|
|
|
+ <div class="inner shotDelvSelect">
|
|
|
+ <div class="od_method">
|
|
|
+ <div class="tbl_tit">
|
|
|
+ <h3>배송방법 선택</h3>
|
|
|
+ </div>
|
|
|
+ <div class="tbl tbl_radio">
|
|
|
+ <table>
|
|
|
+ <colgroup>
|
|
|
+ <col width="*">
|
|
|
+ </colgroup>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <th class="sr-only">총알배송</th>
|
|
|
+ <td>
|
|
|
+ <div class="form_field">
|
|
|
+ <input type="radio" id="chk-1" name="shotDelvUseYn" value="Y" th:checked="${order.shotDelvUseYn != null and order.shotDelvUseYn.equals('Y')}">
|
|
|
+ <label for="chk-1">
|
|
|
+ <span th:text="|${order.shotDelvDt}일 24:00 까지 도착|"></span>
|
|
|
+ <span class="icon_tag">
|
|
|
+ <em class="tag_stype2">총알배송</em>
|
|
|
+ </span>
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th class="sr-only">총알배송 안함</th>
|
|
|
+ <td>
|
|
|
+ <div class="form_field">
|
|
|
+ <input id="chk-2" type="radio" name="shotDelvUseYn" value="N" th:checked="${order.shotDelvUseYn == null or !order.shotDelvUseYn.equals('Y')}">
|
|
|
+ <label for="chk-2">
|
|
|
+ <span>총알배송 안함</span>
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="inner">
|
|
|
+ <div class="sec_select">
|
|
|
+ <div class="form_field">
|
|
|
+ <input id="od_item_all" type="checkbox" checked="checked"><label for="od_item_all"><span>전체선택</span></label>
|
|
|
+ </div>
|
|
|
+ <button type="button" class="btn btn_default btn_sm" onclick="deleteCart('SELECT', 'cart')"><span>선택삭제</span></button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="inner" th:if="${order.shotCartList.size() > 0 or order.wmsCartList.size() > 0}">
|
|
|
+ <!-- STYLE24 배송 -->
|
|
|
+ <div class="part_goods">
|
|
|
+ <div class="goods_top">
|
|
|
+ <div class="goods_date">STYLE24 배송</div>
|
|
|
+ </div>
|
|
|
+ <!-- 총알 배송 -->
|
|
|
+ <div class="goods_area goods_bullship shotList" th:if="${order.shotCartList != null and order.shotCartList.size() > 0}">
|
|
|
+ <h3>총알배송 <span>오늘 자정까지 도착</span></h3>
|
|
|
+ <div class="goods_section cartInfo shotCartInfo" th:each="cart, status : ${order.shotCartList}">
|
|
|
+ <input type="hidden" name="applyQtySectionYn" th:value="${cart.applyQtySectionYn}" />
|
|
|
+ <input type="hidden" name="applyAmtSectionYn" th:value="${cart.applyAmtSectionYn}" />
|
|
|
+ <input type="hidden" name="qtyTmtbSq" th:value="${cart.qtyTmtbSq}" />
|
|
|
+ <input type="hidden" name="qtyTmtbNm" th:value="${cart.qtyTmtbNm}" />
|
|
|
+ <input type="hidden" name="amtTmtbSq" th:value="${cart.amtTmtbSq}" />
|
|
|
+ <input type="hidden" name="amtTmtbNm" th:value="${cart.amtTmtbNm}" />
|
|
|
+ <input type="hidden" name="currPrice" th:value="${cart.currPrice}" />
|
|
|
+ <input type="hidden" name="tmtbDcAmt" th:value="${cart.tmtbDcAmt}" />
|
|
|
+ <input type="hidden" name="soldoutYn" th:value="${cart.soldoutYn}" />
|
|
|
+ <input type="hidden" name="ordCanYn" th:value="${cart.ordCanYn}" />
|
|
|
+ <input type="hidden" name="cartSq" th:value="${cart.cartSq}" />
|
|
|
+
|
|
|
+ <button type="button" class="btn_delete" th:onclick="|deleteCart(${cart.cartSq}, 'cart')|"><span><em class="sr-only">상품삭제</em></span></button>
|
|
|
+ <div class="goods_detail">
|
|
|
+ <div class="form_field">
|
|
|
+ <input th:id="|od_item_${cart.cartSq}|" name="cartSqArr" type="checkbox" th:value="${cart.cartSq}"
|
|
|
+ th:checked= "${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y') and cart.getGoodsQty() >= cart.getMinOrdQty() and cart.getGoodsQty() <= cart.getMaxOrdQty()}"
|
|
|
+ th:disabled="${!(cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y') and cart.getGoodsQty() >= cart.getMinOrdQty() and cart.getGoodsQty() <= cart.getMaxOrdQty())}" />
|
|
|
+ <label th:for="|od_item_${cart.cartSq}|"><span class="sr-only">상품선택</span></label>
|
|
|
+ </div>
|
|
|
+ <div class="thumb_box">
|
|
|
+ <a th:href="|javascript:fnGoToGoodsDetail('${cart.goodsCd}')|">
|
|
|
+ <img th:src="${IMG_PATH} + '/' + ${cart.sysImgNm}" src="/" th:alt="${cart.sysImgNm}" alt="">
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <div class="info_box">
|
|
|
+ <div class="od_name">
|
|
|
+ <div class="brand">
|
|
|
+ <span th:text="|${cart.brandEnm} ${cart.brandKnm}|"></span>
|
|
|
+ </div>
|
|
|
+ <div class="name"><a th:href="|javascript:fnGoToGoodsDetail('${cart.goodsCd}')|" th:text="${cart.goodsNm}"></a></div>
|
|
|
+ </div>
|
|
|
+ <div class="od_opt">
|
|
|
+ <th:block th:each="opt, index : ${cart.itemNmArr}">
|
|
|
+ <th:block th:if="${cart.goodsType.equals('G056_S')}">
|
|
|
+ <div class="option">
|
|
|
+ <em th:text="${cart.itemNmArr[index.index]}"></em><em th:text="${cart.colorNmArr[index.index]}"></em><em th:text="${cart.optCd2Arr[index.index]}"></em>
|
|
|
+ </div>
|
|
|
+ </th:block>
|
|
|
+ <th:block th:if="${!cart.goodsType.equals('G056_S')}">
|
|
|
+ <div class="option">
|
|
|
+ <em th:text="${cart.colorNmArr[index.index]}"></em><em th:text="${cart.optCd2Arr[index.index]}"></em>
|
|
|
+ </div>
|
|
|
+ </th:block>
|
|
|
+ </th:block>
|
|
|
+ </div>
|
|
|
+ <div class="od_point">
|
|
|
+ <p class="point"><span th:text="${#numbers.formatInteger(cart.savePntAmt, 1, 'COMMA')}"></span>P 적립예정</p>
|
|
|
+ </div>
|
|
|
+ <div class="od_exinfo">
|
|
|
+ <span th:if="${cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'Y'}" class="btn_moresale order_badge order_bullet_badge">다다익선 할인 적용</span>
|
|
|
+ <span th:if="${cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'Y'}" class="btn_moresale order_badge order_bullet_badge">다다익선 할인 적용</span>
|
|
|
+ <a th:if="${cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'N'}" href="javascript:;" id="btn_moresale_pop" class="btn_moresale btn_moresale_pop order_badge order_bullet_badge">다다익선 할인 대상</a>
|
|
|
+ <a th:if="${cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'N'}" href="javascript:;" id="btn_moresale_pop" class="btn_moresale btn_moresale_pop order_badge order_bullet_badge">다다익선 할인 대상</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="od_calc">
|
|
|
+ <p class="count">수량 <em th:text="${cart.goodsQty}"></em>개</p>
|
|
|
+ <p class="price">
|
|
|
+ <th:block th:if="${cart.tmtbDcAmt < cart.currPrice}">
|
|
|
+ <span class="sale_price"><del><em th:text="${#numbers.formatInteger(cart.currPrice, 1, 'COMMA')}"></em>원</del></span>
|
|
|
+ <span class="selling_price"><em th:text="${#numbers.formatInteger(cart.tmtbDcAmt, 1, 'COMMA')}"></em>원</span>
|
|
|
+ </th:block>
|
|
|
+ <th:block th:if="${cart.tmtbDcAmt == cart.currPrice}">
|
|
|
+ <span class="selling_price"><em th:text="${#numbers.formatInteger(cart.currPrice, 1, 'COMMA')}"></em>원</span>
|
|
|
+ </th:block>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div class="goods_btn_wrap btn_group_flex">
|
|
|
+ <div><button type="button" class="btn btn_default btn_option_pop01" th:onclick="|fnChangeCartOptCd(${cart.cartSq})|" th:disabled="${cart.ordCanYn.equals('N')}"><span>옵션/수량변경</span></button></div> <!-- 옵션변경_팝업01 호출 -->
|
|
|
+ <div>
|
|
|
+ <button th:if="${cart.soldoutYn.equals('Y') or cart.ordCanYn.equals('N')}" type="button" id="btn_quick_purchase" class="btn btn_primary_line" disabled=""><span>구매 불가</span></button>
|
|
|
+ <button th:if="${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y')}" type="button" id="btn_quick_purchase" class="btn btn_primary_line"><span>바로주문</span></button>
|
|
|
+ </div> <!-- 210406_ID 추가 -->
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="goods_txt reserv" th:if="${!#strings.isEmpty(cart.delvResDt)}">
|
|
|
+ <span>예약배송 상품</span><span th:text="|${cart.delvResDt} 배송예정|"></span> 배송예정
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="goods_txt" th:if="${cart.ordCanYn.equals('N')}">
|
|
|
+ <span>해당 상품은 구매 불가능한 상품입니다.</span>
|
|
|
+ </div>
|
|
|
+ <div class="goods_txt" th:if="${cart.soldoutYn.equals('Y') and cart.ordCanYn.equals('Y')}">
|
|
|
+ <span>품절된 상품입니다.</span>
|
|
|
+ </div>
|
|
|
+ <div class="goods_txt" th:if="${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y') and cart.goodsQty < cart.minOrdQty}">
|
|
|
+ <span th:text="|해당 상품은 최소 ${cart.minOrdQty}개부터 구매 가능합니다.|"></span>
|
|
|
+ </div>
|
|
|
+ <div class="goods_txt" th:if="${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y') and cart.goodsQty > cart.maxOrdQty}">
|
|
|
+ <span th:text="|해당 상품은 최대 ${cart.maxOrdQty}개까지 구매 가능합니다.|"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 총알 배송 -->
|
|
|
+ <!-- 일반 배송 -->
|
|
|
+ <div class="goods_area goods_basic wmsList" th:if="${order.wmsCartList != null and order.wmsCartList.size() > 0}">
|
|
|
+ <h3>일반배송</h3>
|
|
|
+ <div class="goods_section wmsCartInfo cartInfo" th:each="cart, status : ${order.wmsCartList}">
|
|
|
+ <input type="hidden" name="applyQtySectionYn" th:value="${cart.applyQtySectionYn}" />
|
|
|
+ <input type="hidden" name="applyAmtSectionYn" th:value="${cart.applyAmtSectionYn}" />
|
|
|
+ <input type="hidden" name="qtyTmtbSq" th:value="${cart.qtyTmtbSq}" />
|
|
|
+ <input type="hidden" name="qtyTmtbNm" th:value="${cart.qtyTmtbNm}" />
|
|
|
+ <input type="hidden" name="amtTmtbSq" th:value="${cart.amtTmtbSq}" />
|
|
|
+ <input type="hidden" name="amtTmtbNm" th:value="${cart.amtTmtbNm}" />
|
|
|
+ <input type="hidden" name="currPrice" th:value="${cart.currPrice}" />
|
|
|
+ <input type="hidden" name="tmtbDcAmt" th:value="${cart.tmtbDcAmt}" />
|
|
|
+ <input type="hidden" name="soldoutYn" th:value="${cart.soldoutYn}" />
|
|
|
+ <input type="hidden" name="ordCanYn" th:value="${cart.ordCanYn}" />
|
|
|
+ <input type="hidden" name="cartSq" th:value="${cart.cartSq}" />
|
|
|
+
|
|
|
+ <button type="button" class="btn_delete" th:onclick="|deleteCart(${cart.cartSq}, 'cart')|"><span><em class="sr-only">상품삭제</em></span></button>
|
|
|
+ <div class="goods_detail">
|
|
|
+ <div class="form_field">
|
|
|
+ <input th:id="|od_item_${cart.cartSq}|" name="cartSqArr" type="checkbox" th:value="${cart.cartSq}"
|
|
|
+ th:checked= "${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y') and cart.getGoodsQty() >= cart.getMinOrdQty() and cart.getGoodsQty() <= cart.getMaxOrdQty()}"
|
|
|
+ th:disabled="${!(cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y') and cart.getGoodsQty() >= cart.getMinOrdQty() and cart.getGoodsQty() <= cart.getMaxOrdQty())}">
|
|
|
+ <label th:for="|od_item_${cart.cartSq}|"><span class="sr-only">상품선택</span></label>
|
|
|
+ </div>
|
|
|
+ <div class="thumb_box">
|
|
|
+ <a th:href="|javascript:fnGoToGoodsDetail('${cart.goodsCd}')|">
|
|
|
+ <img th:src="${IMG_PATH} + '/' + ${cart.sysImgNm}" src="/" th:alt="${cart.sysImgNm}" alt="">
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <div class="info_box">
|
|
|
+ <div class="od_name">
|
|
|
+ <div class="brand">
|
|
|
+ <span th:text="|${cart.brandEnm} ${cart.brandKnm}|"></span>
|
|
|
+ </div>
|
|
|
+ <div class="name"><a th:href="|javascript:fnGoToGoodsDetail('${cart.goodsCd}')|" th:text="${cart.goodsNm}"></a></div>
|
|
|
+ </div>
|
|
|
+ <div class="od_opt">
|
|
|
+ <th:block th:each="opt, index : ${cart.itemNmArr}">
|
|
|
+ <th:block th:if="${cart.goodsType.equals('G056_S')}">
|
|
|
+ <div class="option">
|
|
|
+ <em th:text="${cart.itemNmArr[index.index]}"></em><em th:text="${cart.colorNmArr[index.index]}"></em><em th:text="${cart.optCd2Arr[index.index]}"></em>
|
|
|
+ </div>
|
|
|
+ </th:block>
|
|
|
+ <th:block th:if="${!cart.goodsType.equals('G056_S')}">
|
|
|
+ <div class="option">
|
|
|
+ <em th:text="${cart.colorNmArr[index.index]}"></em><em th:text="${cart.optCd2Arr[index.index]}"></em>
|
|
|
+ </div>
|
|
|
+ </th:block>
|
|
|
+ </th:block>
|
|
|
+ </div>
|
|
|
+ <div class="od_point">
|
|
|
+ <p class="point"><span th:text="${#numbers.formatInteger(cart.savePntAmt, 1, 'COMMA')}"></span>P 적립예정</p>
|
|
|
+ </div>
|
|
|
+ <div class="od_exinfo">
|
|
|
+ <span th:if="${cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'Y'}" class="btn_moresale order_badge order_bullet_badge">다다익선 할인 적용</span>
|
|
|
+ <span th:if="${cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'Y'}" class="btn_moresale order_badge order_bullet_badge">다다익선 할인 적용</span>
|
|
|
+ <a th:if="${cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'N'}" href="javascript:;" id="btn_moresale_pop" class="btn_moresale btn_moresale_pop order_badge order_bullet_badge">다다익선 할인 대상</a>
|
|
|
+ <a th:if="${cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'N'}" href="javascript:;" id="btn_moresale_pop" class="btn_moresale btn_moresale_pop order_badge order_bullet_badge">다다익선 할인 대상</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="od_calc">
|
|
|
+ <p class="count">수량 <em th:text="${cart.goodsQty}"></em>개</p>
|
|
|
+ <p class="price">
|
|
|
+ <th:block th:if="${cart.tmtbDcAmt < cart.currPrice}">
|
|
|
+ <span class="sale_price"><del><em th:text="${#numbers.formatInteger(cart.currPrice, 1, 'COMMA')}"></em>원</del></span>
|
|
|
+ <span class="selling_price"><em th:text="${#numbers.formatInteger(cart.tmtbDcAmt, 1, 'COMMA')}"></em>원</span>
|
|
|
+ </th:block>
|
|
|
+ <th:block th:if="${cart.tmtbDcAmt == cart.currPrice}">
|
|
|
+ <span class="selling_price"><em th:text="${#numbers.formatInteger(cart.currPrice, 1, 'COMMA')}"></em>원</span>
|
|
|
+ </th:block>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div class="goods_btn_wrap btn_group_flex">
|
|
|
+ <div><button type="button" class="btn btn_default btn_option_pop01" th:onclick="|fnChangeCartOptCd(${cart.cartSq})|" th:disabled="${cart.ordCanYn.equals('N')}"><span>옵션/수량변경</span></button></div> <!-- 옵션변경_팝업01 호출 -->
|
|
|
+ <div>
|
|
|
+ <button th:if="${cart.soldoutYn.equals('Y') or cart.ordCanYn.equals('N')}" type="button" id="btn_quick_purchase" class="btn btn_primary_line" disabled=""><span>구매 불가</span></button>
|
|
|
+ <button th:if="${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y')}" type="button" id="btn_quick_purchase" class="btn btn_primary_line"><span>바로주문</span></button>
|
|
|
+ </div> <!-- 210406_ID 추가 -->
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="goods_txt reserv" th:if="${!#strings.isEmpty(cart.delvResDt)}">
|
|
|
+ <span>예약배송 상품</span><span th:text="|${cart.delvResDt} 배송예정|"></span> 배송예정
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="goods_txt" th:if="${cart.ordCanYn.equals('N')}">
|
|
|
+ <span>해당 상품은 구매 불가능한 상품입니다.</span>
|
|
|
+ </div>
|
|
|
+ <div class="goods_txt" th:if="${cart.soldoutYn.equals('Y') and cart.ordCanYn.equals('Y')}">
|
|
|
+ <span>품절된 상품입니다.</span>
|
|
|
+ </div>
|
|
|
+ <div class="goods_txt" th:if="${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y') and cart.goodsQty < cart.minOrdQty}">
|
|
|
+ <span th:text="|해당 상품은 최소 ${cart.minOrdQty}개부터 구매 가능합니다.|"></span>
|
|
|
+ </div>
|
|
|
+ <div class="goods_txt" th:if="${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y') and cart.goodsQty > cart.maxOrdQty}">
|
|
|
+ <span th:text="|해당 상품은 최대 ${cart.maxOrdQty}개까지 구매 가능합니다.|"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 일반 배송 -->
|
|
|
+
|
|
|
+ <!-- 자사 배송비 -->
|
|
|
+ <div class="goods_txt selfGoodsDelv" th:classappend="|delv_${order.cartDelvFeeCd}|">
|
|
|
+ <span class="dlvr_fee" th:if="${order.wmsDelvFee == 0}">배송비 무료</span>
|
|
|
+ <span class="dlvr_fee" th:if="${order.wmsDelvFee > 0}">배송비 <em th:text="${#numbers.formatInteger(order.wmsDelvFee, 1, 'COMMA')}"></em>원</span>
|
|
|
+ <span>STYLE24 배송</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="goods_dlvr_save" th:if="${order.wmsDelvFee > 0}">
|
|
|
+ <a href="javascript:;" id="btn_dlvrSave_pop" class="btn_popup_save">배송비 SAVE 상품 보기</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- //STYLE24 배송 -->
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="inner" th:if="${order.delvCartList != null and order.delvCartList.size() > 0}">
|
|
|
+ <!-- 업체직배송 -->
|
|
|
+ <div class="part_goods">
|
|
|
+ <div class="goods_top">
|
|
|
+ <div class="goods_date">업체직 배송</div>
|
|
|
+ </div>
|
|
|
+ <!-- 업체직배송 -->
|
|
|
+ <div class="goods_area">
|
|
|
+ <div class="goods_section delvCartInfo cartInfo" th:each="cart, status : ${order.delvCartList}">
|
|
|
+ <input type="hidden" name="applyQtySectionYn" th:value="${cart.applyQtySectionYn}" />
|
|
|
+ <input type="hidden" name="applyAmtSectionYn" th:value="${cart.applyAmtSectionYn}" />
|
|
|
+ <input type="hidden" name="qtyTmtbSq" th:value="${cart.qtyTmtbSq}" />
|
|
|
+ <input type="hidden" name="qtyTmtbNm" th:value="${cart.qtyTmtbNm}" />
|
|
|
+ <input type="hidden" name="amtTmtbSq" th:value="${cart.amtTmtbSq}" />
|
|
|
+ <input type="hidden" name="amtTmtbNm" th:value="${cart.amtTmtbNm}" />
|
|
|
+ <input type="hidden" name="currPrice" th:value="${cart.currPrice}" />
|
|
|
+ <input type="hidden" name="soldoutYn" th:value="${cart.soldoutYn}" />
|
|
|
+ <input type="hidden" name="ordCanYn" th:value="${cart.ordCanYn}" />
|
|
|
+ <input type="hidden" name="tmtbDcAmt" th:value="${cart.tmtbDcAmt}" />
|
|
|
+ <input type="hidden" name="cartSq" th:value="${cart.cartSq}" />
|
|
|
+
|
|
|
+ <button type="button" class="btn_delete"><span><em class="sr-only">상품삭제</em></span></button>
|
|
|
+ <div class="goods_detail">
|
|
|
+ <div class="form_field">
|
|
|
+ <input th:id="|od_item_${cart.cartSq}|" name="cartSqArr" type="checkbox" th:value="${cart.cartSq}"
|
|
|
+ th:checked= "${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y') and cart.getGoodsQty() >= cart.getMinOrdQty() and cart.getGoodsQty() <= cart.getMaxOrdQty()}"
|
|
|
+ th:disabled="${!(cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y') and cart.getGoodsQty() >= cart.getMinOrdQty() and cart.getGoodsQty() <= cart.getMaxOrdQty())}">
|
|
|
+ <label th:for="|od_item_${cart.cartSq}|"><span class="sr-only">상품선택</span></label>
|
|
|
+ </div>
|
|
|
+ <div class="thumb_box">
|
|
|
+ <a th:href="|javascript:fnGoToGoodsDetail('${cart.goodsCd}')|">
|
|
|
+ <img th:src="${IMG_PATH} + '/' + ${cart.sysImgNm}" src="/" th:alt="${cart.sysImgNm}" alt="">
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <div class="info_box">
|
|
|
+ <div class="od_name">
|
|
|
+ <div class="brand">
|
|
|
+ <span th:text="|${cart.brandEnm} ${cart.brandKnm}|"></span>
|
|
|
+ </div>
|
|
|
+ <div class="name"><a th:href="|javascript:fnGoToGoodsDetail('${cart.goodsCd}')|" th:text="${cart.goodsNm}"></a></div>
|
|
|
+ </div>
|
|
|
+ <div class="od_opt">
|
|
|
+ <th:block th:each="opt, index : ${cart.itemNmArr}">
|
|
|
+ <th:block th:if="${cart.goodsType.equals('G056_S')}">
|
|
|
+ <div class="option">
|
|
|
+ <em th:text="${cart.itemNmArr[index.index]}"></em><em th:text="${cart.colorNmArr[index.index]}"></em><em th:text="${cart.optCd2Arr[index.index]}"></em>
|
|
|
+ </div>
|
|
|
+ </th:block>
|
|
|
+ <th:block th:if="${!cart.goodsType.equals('G056_S')}">
|
|
|
+ <div class="option">
|
|
|
+ <em th:text="${cart.colorNmArr[index.index]}"></em><em th:text="${cart.optCd2Arr[index.index]}"></em>
|
|
|
+ </div>
|
|
|
+ </th:block>
|
|
|
+ </th:block>
|
|
|
+ </div>
|
|
|
+ <div class="od_point">
|
|
|
+ <p class="point"><span th:text="${#numbers.formatInteger(cart.savePntAmt, 1, 'COMMA')}"></span>P 적립예정</p>
|
|
|
+ </div>
|
|
|
+ <div class="od_exinfo">
|
|
|
+ <span th:if="${cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'Y'}" class="btn_moresale order_badge order_bullet_badge">다다익선 할인 적용</span>
|
|
|
+ <span th:if="${cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'Y'}" class="btn_moresale order_badge order_bullet_badge">다다익선 할인 적용</span>
|
|
|
+ <a th:if="${cart.qtyTmtbSq > 0 and cart.applyQtySectionYn == 'N'}" href="javascript:;" id="btn_moresale_pop" class="btn_moresale btn_moresale_pop order_badge order_bullet_badge">다다익선 할인 대상</a>
|
|
|
+ <a th:if="${cart.amtTmtbSq > 0 and cart.applyAmtSectionYn == 'N'}" href="javascript:;" id="btn_moresale_pop" class="btn_moresale btn_moresale_pop order_badge order_bullet_badge">다다익선 할인 대상</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="od_calc">
|
|
|
+ <p class="count">수량 <em th:text="${cart.goodsQty}"></em>개</p>
|
|
|
+ <p class="price">
|
|
|
+ <th:block th:if="${cart.tmtbDcAmt < cart.currPrice}">
|
|
|
+ <span class="sale_price"><del><em th:text="${#numbers.formatInteger(cart.currPrice, 1, 'COMMA')}"></em>원</del></span>
|
|
|
+ <span class="selling_price"><em th:text="${#numbers.formatInteger(cart.tmtbDcAmt, 1, 'COMMA')}"></em>원</span>
|
|
|
+ </th:block>
|
|
|
+ <th:block th:if="${cart.tmtbDcAmt == cart.currPrice}">
|
|
|
+ <span class="selling_price"><em th:text="${#numbers.formatInteger(cart.currPrice, 1, 'COMMA')}"></em>원</span>
|
|
|
+ </th:block>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div class="goods_btn_wrap btn_group_flex">
|
|
|
+ <div><button type="button" class="btn btn_default" th:onclick="|fnChangeCartOptCd(${cart.cartSq})|" th:disabled="${cart.ordCanYn.equals('N')}"><span>옵션/수량변경</span></button></div>
|
|
|
+ <div>
|
|
|
+ <button th:if="${cart.soldoutYn.equals('Y') or cart.ordCanYn.equals('N')}" type="button" id="btn_quick_purchase" class="btn btn_primary_line" disabled=""><span>구매 불가</span></button>
|
|
|
+ <button th:if="${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y')}" type="button" id="btn_quick_purchase" class="btn btn_primary_line"><span>바로주문</span></button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="goods_txt reserv" th:if="${!#strings.isEmpty(cart.delvResDt)}">
|
|
|
+ <span>예약배송 상품</span><span th:text="|${cart.delvResDt} 배송예정|"></span> 배송예정
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="goods_txt" th:if="${cart.ordCanYn.equals('N')}">
|
|
|
+ <span>해당 상품은 구매 불가능한 상품입니다.</span>
|
|
|
+ </div>
|
|
|
+ <div class="goods_txt" th:if="${cart.soldoutYn.equals('Y') and cart.ordCanYn.equals('Y')}">
|
|
|
+ <span>품절된 상품입니다.</span>
|
|
|
+ </div>
|
|
|
+ <div class="goods_txt" th:if="${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y') and cart.goodsQty < cart.minOrdQty}">
|
|
|
+ <span th:text="|해당 상품은 최소 ${cart.minOrdQty}개부터 구매 가능합니다.|"></span>
|
|
|
+ </div>
|
|
|
+ <div class="goods_txt" th:if="${cart.soldoutYn.equals('N') and cart.ordCanYn.equals('Y') and cart.goodsQty > cart.maxOrdQty}">
|
|
|
+ <span th:text="|해당 상품은 최대 ${cart.maxOrdQty}개까지 구매 가능합니다.|"></span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 입점업체 배송비 -->
|
|
|
+ <div class="goods_txt" th:if="${'Y'.equals(cart.addDelvFeeYn)}" th:classappend="|delv_${cart.delvFeeCd}|">
|
|
|
+ <span class="dlvr_fee" th:if="${order.wmsDelvFee == 0}">배송비 무료</span>
|
|
|
+ <span class="dlvr_fee" th:if="${order.wmsDelvFee > 0}">배송비 <em th:text="${#numbers.formatInteger(order.wmsDelvFee, 1, 'COMMA')}"></em>원</span>
|
|
|
+ <span th:text="|${cart.supplyCompNm} 업체직배송|"></span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="goods_dlvr_save" th:if="${'Y'.equals(cart.addDelvFeeYn) and cart.delvFee > 0}">
|
|
|
+ <a href="javascript:;" id="btn_dlvrSave_pop" class="btn_popup_save">배송비 SAVE 상품 보기</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 업체직배송 -->
|
|
|
+ </div>
|
|
|
+ <!-- //업체직배송 -->
|
|
|
+ </div>
|
|
|
+ <div class="inner">
|
|
|
+ <div class="area_order">
|
|
|
+ <div class="tit_box">
|
|
|
+ <h3>결제 정보</h3>
|
|
|
+ <span>
|
|
|
+ <em class="number" th:text="${order.totCartCnt}"></em>개의 상품
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="od_amount_box">
|
|
|
+ <dl>
|
|
|
+ <div>
|
|
|
+ <dt>상품금액</dt>
|
|
|
+ <dd><em class="sumListPrice" th:text="${#numbers.formatInteger(order.sumListPrice, 1, 'COMMA')}"></em>원</dd>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <dt>배송비</dt>
|
|
|
+ <dd><em class="totDelvFee" th:text="${#numbers.formatInteger(order.totDelvFee, 1, 'COMMA')}"></em>원</dd>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <dt>할인금액</dt>
|
|
|
+ <dd><span class="disc_amount"><em class="totDcAmt" id="totDcAmt" th:text="${#numbers.formatInteger(order.totDcAmt, 1, 'COMMA')}"></em>원</span></dd>
|
|
|
+ </div>
|
|
|
+ </dl>
|
|
|
+ </div>
|
|
|
+ <div class="totalprice_box">
|
|
|
+ <dl>
|
|
|
+ <dt>총 결제 예정 금액</dt>
|
|
|
+ <dd><span class="sumRealPayAmt" id="sumRealPayAmt" th:text="${#numbers.formatInteger(order.sumRealPayAmt + order.totDelvFee, 1, 'COMMA')}"></span>원</dd>
|
|
|
+ </dl>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="inner">
|
|
|
+ <div class="area_salecoupon">
|
|
|
+ <h4>할인코드 입력</h4>
|
|
|
+ <div class="form_field">
|
|
|
+ <div class="input_wrap form_full">
|
|
|
+ <label class="input_label sr-only">할인코드입력</label>
|
|
|
+ <input type="text" id="serialCpnNm" class="form_control" placeholder="할인코드를 입력해주세요.">
|
|
|
+ </div>
|
|
|
+ <button type="button" id="btn_salecode" class="btn btn_dark btn_sm" onclick="serialCpnApply()"><span>적용</span></button> <!-- 210406_ID 추가 -->
|
|
|
+ </div>
|
|
|
+ <div class="coupon_box">
|
|
|
+ <div class="coupon">
|
|
|
+ <button type="button" class="btn_delete"><span><em class="sr-only">쿠폰닫기</em></span></button>
|
|
|
+ <div>
|
|
|
+ <p class="cp_name"></p>
|
|
|
+ <p class="cp_cont">
|
|
|
+ <span class="cp_dc_val"></span>
|
|
|
+ </p>
|
|
|
+ <p class="cp_condition"></p>
|
|
|
+ </div>
|
|
|
+ <p class="cp_date">
|
|
|
+ <span class="availStdt"></span> ~ <span class="availEddt"></span>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <button type="button" class="btn_underline" id="btn_couponInfo_pop">
|
|
|
+ <span>사용안내</span>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <div class="inner wide">
|
|
|
+ <div class="od_recommend">
|
|
|
+ <h3>추천상품</h3>
|
|
|
+ <div class="swiper-container item_list">
|
|
|
+ <div class="swiper-wrapper">
|
|
|
+ <div class="swiper-slide">
|
|
|
+ <div class="item_prod"> <!-- item_prod ranker d_detail -->
|
|
|
+ <div class="item_state"> <!-- item_state AD soldout -->
|
|
|
+ <button type="button" class="itemLike">관심상품 추가</button>
|
|
|
+ <a href="#none" class="itemLink">
|
|
|
+ <div class="itemPic">
|
|
|
+ <img class="vLHTC pd_img" src="/images/mo/thumb/br_main03.png" alt="">
|
|
|
+ </div>
|
|
|
+ <p class="itemBrand">BRAND NAME</p>
|
|
|
+ <div class="itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
|
|
|
+ <p class="itemPrice">
|
|
|
+ <span class="itemPrice_original">89,000</span>
|
|
|
+ 80,100
|
|
|
+ <span class="itemPercent">10%</span>
|
|
|
+ </p>
|
|
|
+ <div class="itemcolorchip">
|
|
|
+ <span class="chip_color35" value="ABM">BEIGE</span>
|
|
|
+ <span class="chip_color54" value="BDS">BLACK</span>
|
|
|
+ <span class="chip_color40" value="YBR">WHITE</span>
|
|
|
+ </div>
|
|
|
+ <p class="itemBadge">
|
|
|
+ <span class="badge13">베스트 </span>
|
|
|
+ </p>
|
|
|
+ <div class="itemComment">#주문 폭주 상품</div>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="swiper-slide">
|
|
|
+ <div class="item_prod"> <!-- item_prod ranker d_detail -->
|
|
|
+ <div class="item_state"> <!-- item_state AD soldout -->
|
|
|
+ <button type="button" class="itemLike">관심상품 추가</button>
|
|
|
+ <a href="#none" class="itemLink">
|
|
|
+ <div class="itemPic">
|
|
|
+ <img class="vLHTC pd_img" src="/images/mo/thumb/br_main03.png" alt="">
|
|
|
+ </div>
|
|
|
+ <p class="itemBrand">BRAND NAME</p>
|
|
|
+ <div class="itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
|
|
|
+ <p class="itemPrice">
|
|
|
+ <span class="itemPrice_original">89,000</span>
|
|
|
+ 80,100
|
|
|
+ <span class="itemPercent">10%</span>
|
|
|
+ </p>
|
|
|
+ <div class="itemcolorchip">
|
|
|
+ <span class="chip_color35" value="ABM">BEIGE</span>
|
|
|
+ <span class="chip_color54" value="BDS">BLACK</span>
|
|
|
+ <span class="chip_color40" value="YBR">WHITE</span>
|
|
|
+ </div>
|
|
|
+ <p class="itemBadge">
|
|
|
+ <span class="badge13">베스트 </span>
|
|
|
+ </p>
|
|
|
+ <div class="itemComment">#주문 폭주 상품</div>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="swiper-slide">
|
|
|
+ <div class="item_prod"> <!-- item_prod ranker d_detail -->
|
|
|
+ <div class="item_state"> <!-- item_state AD soldout -->
|
|
|
+ <button type="button" class="itemLike">관심상품 추가</button>
|
|
|
+ <a href="#none" class="itemLink">
|
|
|
+ <div class="itemPic">
|
|
|
+ <img class="vLHTC pd_img" src="/images/mo/thumb/br_main03.png" alt="">
|
|
|
+ </div>
|
|
|
+ <p class="itemBrand">BRAND NAME</p>
|
|
|
+ <div class="itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
|
|
|
+ <p class="itemPrice">
|
|
|
+ <span class="itemPrice_original">89,000</span>
|
|
|
+ 80,100
|
|
|
+ <span class="itemPercent">10%</span>
|
|
|
+ </p>
|
|
|
+ <div class="itemcolorchip">
|
|
|
+ <span class="chip_color35" value="ABM">BEIGE</span>
|
|
|
+ <span class="chip_color54" value="BDS">BLACK</span>
|
|
|
+ <span class="chip_color40" value="YBR">WHITE</span>
|
|
|
+ </div>
|
|
|
+ <p class="itemBadge">
|
|
|
+ <span class="badge13">베스트 </span>
|
|
|
+ </p>
|
|
|
+ <div class="itemComment">#주문 폭주 상품</div>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="swiper-slide">
|
|
|
+ <div class="item_prod"> <!-- item_prod ranker d_detail -->
|
|
|
+ <div class="item_state"> <!-- item_state AD soldout -->
|
|
|
+ <button type="button" class="itemLike">관심상품 추가</button>
|
|
|
+ <a href="#none" class="itemLink">
|
|
|
+ <div class="itemPic">
|
|
|
+ <img class="vLHTC pd_img" src="/images/mo/thumb/br_main03.png" alt="">
|
|
|
+ </div>
|
|
|
+ <p class="itemBrand">BRAND NAME</p>
|
|
|
+ <div class="itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
|
|
|
+ <p class="itemPrice">
|
|
|
+ <span class="itemPrice_original">89,000</span>
|
|
|
+ 80,100
|
|
|
+ <span class="itemPercent">10%</span>
|
|
|
+ </p>
|
|
|
+ <div class="itemcolorchip">
|
|
|
+ <span class="chip_color35" value="ABM">BEIGE</span>
|
|
|
+ <span class="chip_color54" value="BDS">BLACK</span>
|
|
|
+ <span class="chip_color40" value="YBR">WHITE</span>
|
|
|
+ </div>
|
|
|
+ <p class="itemBadge">
|
|
|
+ <span class="badge13">베스트 </span>
|
|
|
+ </p>
|
|
|
+ <div class="itemComment">#주문 폭주 상품</div>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="swiper-slide">
|
|
|
+ <div class="item_prod"> <!-- item_prod ranker d_detail -->
|
|
|
+ <div class="item_state"> <!-- item_state AD soldout -->
|
|
|
+ <button type="button" class="itemLike">관심상품 추가</button>
|
|
|
+ <a href="#none" class="itemLink">
|
|
|
+ <div class="itemPic">
|
|
|
+ <img class="vLHTC pd_img" src="/images/mo/thumb/br_main03.png" alt="">
|
|
|
+ </div>
|
|
|
+ <p class="itemBrand">BRAND NAME</p>
|
|
|
+ <div class="itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
|
|
|
+ <p class="itemPrice">
|
|
|
+ <span class="itemPrice_original">89,000</span>
|
|
|
+ 80,100
|
|
|
+ <span class="itemPercent">10%</span>
|
|
|
+ </p>
|
|
|
+ <div class="itemcolorchip">
|
|
|
+ <span class="chip_color35" value="ABM">BEIGE</span>
|
|
|
+ <span class="chip_color54" value="BDS">BLACK</span>
|
|
|
+ <span class="chip_color40" value="YBR">WHITE</span>
|
|
|
+ </div>
|
|
|
+ <p class="itemBadge">
|
|
|
+ <span class="badge13">베스트 </span>
|
|
|
+ </p>
|
|
|
+ <div class="itemComment">#주문 폭주 상품</div>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="od_calc_wrap" id="bottomOrderArea">
|
|
|
+ <button type="button" class="btn btn_dark"><span>합계 <em class="realOrderAmtText" th:text="${#numbers.formatInteger(order.sumRealPayAmt + order.totDelvFee, 1, 'COMMA')}">0</em>원</span></button>
|
|
|
+ <button type="button" id="btn_purchase" class="btn btn_primary"><span>구매하기 (<em class="realOrderQtyText" th:text="${order.totCartCnt}"></em>개)</span></button> <!-- 210406_ID 추가 -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+
|
|
|
+ <!-- 쿠폰사용안내 팝업 -->
|
|
|
+ <div class="modal fade couponInfo_pop cartCpnInfoModal" id="couponInfoPop" tabindex="-1" role="dialog" aria-labelledby="couponInfoLabel" aria-hidden="true">
|
|
|
+ <div class="modal-dialog" role="document">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title" id="couponInfoLabel"></h5>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="pop_cont">
|
|
|
+ <dl>
|
|
|
+ <div>
|
|
|
+ <dt>사용조건</dt>
|
|
|
+ <dd class="cpnCondition"></dd>
|
|
|
+ </div>
|
|
|
+ <div class="cartCpnPubLimitQty">
|
|
|
+ <dt>발급수량</dt>
|
|
|
+ <dd class="custPubLimitQtyTxt"></dd>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <dt>유효기간</dt>
|
|
|
+ <dd class="availDt"></dd>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <dt>대상조건</dt>
|
|
|
+ <dd class="refVal"></dd>
|
|
|
+ </div>
|
|
|
+ </dl>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <a href="#close-modal" rel="modal:close" id="couponInfoPop_close" class="close-modal">Close</a>
|
|
|
+ </div>
|
|
|
+ <!-- //쿠폰사용안내 팝업 -->
|
|
|
+
|
|
|
+ <script th:inline="javascript">
|
|
|
+ let sumRealPayAmt = [[${order.sumRealPayAmt + order.totDelvFee}]];
|
|
|
+ let totDcAmt = [[${order.totDcAmt}]];
|
|
|
+ let loginInfo = [[${loginInfo}]];
|
|
|
+ let orderFlag = true;
|
|
|
+
|
|
|
+ $(document).ready(function() {
|
|
|
+ if([[${!order.shotCanYn.equals('Y')}]]) {
|
|
|
+ //$(".shotDelvSelect").hide();
|
|
|
+ }
|
|
|
+
|
|
|
+ $("#cartListForm .area_salecoupon .coupon_box").hide();
|
|
|
+
|
|
|
+ if(!loginInfo || loginInfo.custNo == null || loginInfo.custNo == 0) {
|
|
|
+ $("#cartListForm .area_salecoupon").parent().hide();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ function cancelCartCpn() {
|
|
|
+ $("#cartListForm #sumRealPayAmt").text(Number(sumRealPayAmt).toLocaleString());
|
|
|
+ $("#cartListForm #totDcAmt").text(Number(totDcAmt).toLocaleString());
|
|
|
+ $("#cartListForm .area_salecoupon .coupon_box").hide();
|
|
|
+
|
|
|
+ $("#bottomOrderArea .realOrderAmtText").text(Number(sumRealPayAmt).toLocaleString());
|
|
|
+ }
|
|
|
+
|
|
|
+ function serialCpnApply() {
|
|
|
+ let cartArr = [];
|
|
|
+ let currPrices = [];
|
|
|
+ $("#cartListForm input[name=cartSqArr]:checked").each(function(index, item) {
|
|
|
+ cartArr.push($(this).val());
|
|
|
+ currPrices.push($(this).parents(".cartInfo").find("input[name=tmtbDcAmt]").val());
|
|
|
+ });
|
|
|
+
|
|
|
+ let data = {
|
|
|
+ rdCpnNm : $("#cartListForm #serialCpnNm").val(),
|
|
|
+ cartSqArr : cartArr,
|
|
|
+ currPrices : currPrices
|
|
|
+ }
|
|
|
+
|
|
|
+ let jsonData = JSON.stringify(data);
|
|
|
+
|
|
|
+ $.ajax( {
|
|
|
+ type: "POST",
|
|
|
+ url : '/cart/list/serialCpnApply',
|
|
|
+ contentType: 'application/json',
|
|
|
+ dataType : 'json',
|
|
|
+ data : jsonData,
|
|
|
+ success : function(result) {
|
|
|
+ if(result.serialCpnInfo.result == "SUCCESS") {
|
|
|
+ let cpnInfo = result.serialCpnInfo;
|
|
|
+ $("#cartListForm .area_salecoupon .coupon_box").show();
|
|
|
+
|
|
|
+ // 합계 금액
|
|
|
+ if(cartArr.length > 0) {
|
|
|
+ $("#cartListForm #sumRealPayAmt").text(Number(sumRealPayAmt - cpnInfo.dcAmt).toLocaleString());
|
|
|
+ $("#cartListForm #totDcAmt").text(Number(totDcAmt - cpnInfo.dcAmt).toLocaleString());
|
|
|
+ $("#bottomOrderArea .realOrderAmtText").text(Number(sumRealPayAmt - cpnInfo.dcAmt).toLocaleString());
|
|
|
+ }
|
|
|
+
|
|
|
+ // 쿠폰 정보
|
|
|
+ $("#cartListForm .area_salecoupon .cp_name").text(cpnInfo.cpnNm);
|
|
|
+ $("#cartListForm .area_salecoupon .cp_condition").html(cpnInfo.cpnDesc + "<span><em class='tag'>1장 보유</em></span>");
|
|
|
+ $("#cartListForm .area_salecoupon .availStdt").text(cpnInfo.availStdt);
|
|
|
+ $("#cartListForm .area_salecoupon .availEddt").text(cpnInfo.availEddt);
|
|
|
+ if (cpnInfo.dcWay == "G240_10") {
|
|
|
+ $("#cartListForm .area_salecoupon .cp_dc_val").html("<em>" + Number(cpnInfo.dcVal).toLocaleString() + "</em> 원");
|
|
|
+ } else if (cpnInfo.dcWay == "G240_11") {
|
|
|
+ $("#cartListForm .area_salecoupon .cp_dc_val").html("<em>" + cpnInfo.dcVal + "%</em>");
|
|
|
+ }
|
|
|
+
|
|
|
+ let conditionComment = "", refValComment = "";
|
|
|
+
|
|
|
+ if(cpnInfo.buyLimitAmt > 0) { conditionComment += "<span>" + Number(cpnInfo.buyLimitAmt).toLocaleString() + "</span>원 이상 구매 시 "; }
|
|
|
+ if(cpnInfo.maxDcAmt > 0) { conditionComment += "최대 <span>" + Number(cpnInfo.maxDcAmt).toLocaleString() + "</span>원 할인"; }
|
|
|
+
|
|
|
+ if("A" == cpnInfo.applyScope) {
|
|
|
+ refValComment += "전체<br/>";
|
|
|
+ } else {
|
|
|
+ if(cpnInfo.refCateCnt > 0) {
|
|
|
+ refValComment += cpnInfo.refCateNm + " 카테고리";
|
|
|
+ if(cpnInfo.refCateCnt > 1) { refValComment += " 外"; }
|
|
|
+ refValComment += "<br/>";
|
|
|
+ }
|
|
|
+ if(cpnInfo.refSupplyCompCnt > 0) {
|
|
|
+ refValComment += cpnInfo.refSupplyCompNm + " 업체";
|
|
|
+ if(cpnInfo.refSupplyCompCnt > 1) { refValComment += " 外"; }
|
|
|
+ refValComment += "<br/>";
|
|
|
+ }
|
|
|
+ if(cpnInfo.refBrandCnt > 0) {
|
|
|
+ refValComment += cpnInfo.refBrandNm;
|
|
|
+ refValComment += " 브랜드";
|
|
|
+ if(cpnInfo.refBrandCnt > 2) { refValComment += " 外"; }
|
|
|
+ refValComment += "<br/>";
|
|
|
+ }
|
|
|
+ if(cpnInfo.refGoodsCnt > 0) {
|
|
|
+ refValComment += cpnInfo.refGoodsNm + " 상품";
|
|
|
+ if(cpnInfo.refGoodsCnt > 1) { refValComment += " 外"; }
|
|
|
+ refValComment += "<br/>";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ refValComment += "일부상품, 특가상품 제외";
|
|
|
+
|
|
|
+ $(".cartCpnInfoModal .modal-header").html('<h5 class="modal-title" id="couponInfoLabel">' + cpnInfo.cpnNm + '</h5>');
|
|
|
+
|
|
|
+ if(conditionComment != "") { $(".cartCpnInfoModal .cpnCondition").html(conditionComment); }
|
|
|
+ else { $(".cartCpnInfoModal .cartCpnCondition").hide(); }
|
|
|
+
|
|
|
+ if(cpnInfo.custPubLimitQty > 0) { $(".cartCpnInfoModal .custPubLimitQtyTxt").html("1인 최대 <span>" + Number(cpnInfo.custPubLimitQty).toLocaleString() + "</span>매"); }
|
|
|
+ else { $(".cartCpnInfoModal .cartCpnPubLimitQty").hide(); }
|
|
|
+
|
|
|
+ $(".cartCpnInfoModal .availDt").html('<span>' + cpnInfo.availStdtTime + "</span> ~ <span>" + cpnInfo.availEddtTime + "</span>");
|
|
|
+ $(".cartCpnInfoModal .refVal").html(refValComment);
|
|
|
+ } else {
|
|
|
+ mcxDialog.alert(result.serialCpnInfo.result);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ $("input[name=cartSqArr]").on("change", function(e) {
|
|
|
+ changeCartSqArr();
|
|
|
+ });
|
|
|
+
|
|
|
+ function changeCartSqArr() {
|
|
|
+ let cartArr = [];
|
|
|
+
|
|
|
+ // 선택된 장바구니 번호
|
|
|
+ $("#cartListForm input[name=cartSqArr]:checked").each(function () {
|
|
|
+ cartArr.push($(this).val());
|
|
|
+ });
|
|
|
+
|
|
|
+ // 선택된 장바구니 정보 가공
|
|
|
+ let data = { cartSqArr : cartArr }
|
|
|
+ let jsonData = JSON.stringify(data);
|
|
|
+
|
|
|
+ $.ajax( {
|
|
|
+ type: "POST",
|
|
|
+ url : '/cart/change/goods/list',
|
|
|
+ contentType: 'application/json',
|
|
|
+ dataType : 'json',
|
|
|
+ data : jsonData,
|
|
|
+ success : function(result) {
|
|
|
+ fnChangeCartListInfo(result);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function fnChangeCartListInfo(order) {
|
|
|
+ let shotList = order.shotCartList;
|
|
|
+ let wmsList = order.wmsCartList;
|
|
|
+ let delvList = order.delvCartList;
|
|
|
+ let cartList = new Array();
|
|
|
+
|
|
|
+ // 다다익선 정보 숨김
|
|
|
+ $("#cartListForm .applyTmtb").hide();
|
|
|
+ $("#cartListForm .notApplyTmtb").hide();
|
|
|
+
|
|
|
+ // 장바구니 각 상품 가격 정보 할인 전으로 변경
|
|
|
+ $("#cartListForm .cartInfo input[name=cartSq]").each(function() {
|
|
|
+ if($(this).parent().find(".calc_box .price_org").text() != "") {
|
|
|
+ $(this).parent().find(".calc_box .price_sale").text($(this).parent().find(".calc_box .price_org").text());
|
|
|
+ $(this).parent().find(".calc_box .price_org").remove();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#cartListForm").find(".delvFeeArea").html("<div class='info_dlvr'><span class='dlvr_fee'>배송비 무료</span></div>");
|
|
|
+ for(let i = 0 ; i < shotList.length ; i++) {
|
|
|
+ cartList.push(shotList[i]);
|
|
|
+ $("#cartListForm .shotCartInfo input[name=cartSq]").each(function() {
|
|
|
+ if(shotList[i].cartSq == $(this).val()) {
|
|
|
+ let shot = shotList[i];
|
|
|
+ $(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").show();
|
|
|
+ }
|
|
|
+ if(shot.amtTmtbSq > 0 && shot.applyAmtSectionYn == "Y") {
|
|
|
+ $(this).parent().find(".applyTmtb").show();
|
|
|
+ }
|
|
|
+ if(shot.qtyTmtbSq > 0 && shot.applyQtySectionYn == "N") {
|
|
|
+ $(this).parent().find(".notApplyTmtb").show();
|
|
|
+ }
|
|
|
+ if(shot.amtTmtbSq > 0 && shot.applyAmtSectionYn == "N") {
|
|
|
+ $(this).parent().find(".notApplyTmtb").show();
|
|
|
+ }
|
|
|
+
|
|
|
+ // 다다익선 할인가 적용
|
|
|
+ if(shot.tmtbDcAmt < shot.currPrice) {
|
|
|
+ $(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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ for(let i = 0 ; i < wmsList.length ; i++) {
|
|
|
+ cartList.push(wmsList[i]);
|
|
|
+ $("#cartListForm .wmsCartInfo input[name=cartSq]").each(function() {
|
|
|
+ if(wmsList[i].cartSq == $(this).val()) {
|
|
|
+ let wms = wmsList[i];
|
|
|
+ $(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").show();
|
|
|
+ }
|
|
|
+ if(wms.amtTmtbSq > 0 && wms.applyAmtSectionYn == "Y") {
|
|
|
+ $(this).parent().find(".applyTmtb").show();
|
|
|
+ }
|
|
|
+ if(wms.qtyTmtbSq > 0 && wms.applyQtySectionYn == "N") {
|
|
|
+ $(this).parent().find(".notApplyTmtb").show();
|
|
|
+ }
|
|
|
+ if(wms.amtTmtbSq > 0 && wms.applyAmtSectionYn == "N") {
|
|
|
+ $(this).parent().find(".notApplyTmtb").show();
|
|
|
+ }
|
|
|
+
|
|
|
+ // 다다익선 할인가 적용
|
|
|
+ if(wms.tmtbDcAmt < wms.currPrice) {
|
|
|
+ $(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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 자사 상품 배송비
|
|
|
+ if(order.wmsDelvFee == 0) {
|
|
|
+ $(".selfGoodsDelv").html("<span class='dlvr_fee'>배송비 무료</span>");
|
|
|
+ } 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);
|
|
|
+ }
|
|
|
+
|
|
|
+ for(let i = 0 ; i < delvList.length ; i++) {
|
|
|
+ cartList.push(delvList[i]);
|
|
|
+ $("#cartListForm .delvList .delvCartInfo input[name=cartSq]").each(function() {
|
|
|
+ if(delvList[i].cartSq == $(this).val()) {
|
|
|
+ let delv = delvList[i];
|
|
|
+ $(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").show();
|
|
|
+ }
|
|
|
+ if(delv.amtTmtbSq > 0 && delv.applyAmtSectionYn == "Y") {
|
|
|
+ $(this).parent().find(".applyTmtb").show();
|
|
|
+ }
|
|
|
+ if(delv.qtyTmtbSq > 0 && delv.applyQtySectionYn == "N") {
|
|
|
+ $(this).parent().find(".notApplyTmtb").show();
|
|
|
+ }
|
|
|
+ if(delv.amtTmtbSq > 0 && delv.applyAmtSectionYn == "N") {
|
|
|
+ }
|
|
|
+
|
|
|
+ // 다다익선 할인가 적용
|
|
|
+ if(delv.tmtbDcAmt < delv.currPrice) {
|
|
|
+ $(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);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(delv.delvFee == 0) {
|
|
|
+ $(".delvList").find(".delv_" + delv.delvFeeCd).html("<span class='dlvr_fee'>배송비 무료</span><span class='dlvr_fee'><em>" + delv.supplyCompNm + "</em> 업체직배송</span>");
|
|
|
+ } else {
|
|
|
+ let html = "<div className='order_delivery'><span class='dlvr_fee'>배송비 <em>" + Number(delv.delvFee).toLocaleString() + "</em>원</span><span class='dlvr_shop'><em>" + delv.supplyCompNm + "</em> 업체직배송</span><a href='#' className='btn_popup_save'>배송비 SAVE 상품 보기</a></div>";
|
|
|
+ $(".delvList").find(".delv_" + delv.delvFeeCd).html(html);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 결제 총액 영역 수정
|
|
|
+ $("#cartListForm .checkSelectCartListCnt").text(Number(order.totCartCnt).toLocaleString());
|
|
|
+ $("#cartListForm .sumListPrice").text(Number(order.sumListPrice).toLocaleString());
|
|
|
+ $("#cartListForm .totDelvFee").text(Number(order.totDelvFee).toLocaleString());
|
|
|
+ sumRealPayAmt = order.sumRealPayAmt + order.totDelvFee;
|
|
|
+ totDcAmt = order.totDcAmt;
|
|
|
+
|
|
|
+ // 하단 구매하기 버튼 수량 및 금액 변경
|
|
|
+ $("#bottomOrderArea .realOrderQtyText").text(Number(order.totCartCnt).toLocaleString());
|
|
|
+ $("#bottomOrderArea .realOrderAmtText").text(Number(sumRealPayAmt).toLocaleString());
|
|
|
+
|
|
|
+ // 할인코드 쿠폰 금액 재확인
|
|
|
+ if($("#cartListForm #serialCpnNm").val()) {
|
|
|
+ serialCpnApply();
|
|
|
+ } else {
|
|
|
+ $("#cartListForm .totDcAmt").text(Number(totDcAmt).toLocaleString());
|
|
|
+ $("#cartListForm .sumRealPayAmt").text(Number(sumRealPayAmt).toLocaleString());
|
|
|
+ cancelCartCpn();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ 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 info = list[listIndex];
|
|
|
+ let removeCartSq = 0, updateCartSq = 0, goodsQty = 0;
|
|
|
+ listIndex++;
|
|
|
+
|
|
|
+ // list[listIndex]가 null이 아니라면
|
|
|
+ if(info != null) {
|
|
|
+ if (info.ordCanYn == "N") { // 주문 불가
|
|
|
+ let message = info.goodsNm + " 상품은 구매 할 수 없습니다. 제외하고 계속 주문하시겠습니까?";
|
|
|
+ fnRemoveCartSqConfirm(message, cartSqArr, info.cartSq, list, listIndex, allYn);
|
|
|
+ } else if (info.soldoutYn == "Y") { // 품절
|
|
|
+ if (info.goodsStat == "G008_70" || info.ordCanQty < info.minOrdQty) { // 상품 상태가 품절이거나 주문 가능 수량이 최소주문수량보다 적을경우
|
|
|
+ let message = info.goodsNm + " 상품은 품절입니다. 제외하고 계속 주문하시겠습니까?";
|
|
|
+ fnRemoveCartSqConfirm(message, cartSqArr, info.cartSq, list, listIndex, allYn)
|
|
|
+ } else if (info.goodsQty < info.ordCanQty) { // 주문 가능 수량이 0일경우
|
|
|
+ let message = info.goodsNm + "의 " + info.colorNm + " 옵션이 품절되었습니다. 제외하고 계속 주문하시겠습니까?";
|
|
|
+ fnRemoveCartSqConfirm(message, cartSqArr, info.cartSq, list, listIndex, allYn)
|
|
|
+ } else if (listIndex < list.length) {
|
|
|
+ // 혹시 else일 경우
|
|
|
+ fnOrderValidation(list, listIndex, cartSqArr, allYn);
|
|
|
+ }
|
|
|
+ } else if (info.ordCanQty < info.goodsQty) { // 최소 주문 수량보다 장바구니에 적게 들어왔을 경우
|
|
|
+ let message;
|
|
|
+ if ("G056_S" == info.goodsType) {
|
|
|
+ message = info.goodsNm + " 의" + info.itemNm + "/" + info.colorNm + "/" + info.optCd2 + "의 수량이 부족합니다.\n구매가능 수량은 " + info.ordCanQty + "개입니다.\n구매가능 수량만큼 주문하시겠습니까?";
|
|
|
+ } else {
|
|
|
+ message = info.goodsNm + " 의" + info.colorNm + "/" + info.optCd2 + "의 수량이 부족합니다.\n구매가능 수량은 " + info.ordCanQty + "개입니다.\n구매가능 수량만큼 주문하시겠습니까?";
|
|
|
+ }
|
|
|
+
|
|
|
+ fnUpdateConfirmChangeQty(message, info.cartSq, info.minOrdQty, list, listIndex, cartSqArr, allYn);
|
|
|
+ } else if (info.goodsQty < info.minOrdQty) {
|
|
|
+ let message = info.goodsNm + " 의 최소 구매수량은 " + info.minOrdQty + "개입니다.\n최소 구매 수량으로 주문하시겠습니까?";
|
|
|
+ fnUpdateConfirmChangeQty(message, info.cartSq, info.minOrdQty, list, listIndex, cartSqArr, allYn);
|
|
|
+ } else if (info.goodsQty > info.maxOrdQty) {
|
|
|
+ let message = info.goodsNm + " 의 최대 구매 사능 수량은 " + info.maxOrdQty + "개입니다. 최대 구매 가능한 수량으로 주문하시겠습니까?";
|
|
|
+ fnUpdateConfirmChangeQty(message, info.cartSq, info.minOrdQty, 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 fnUpdateConfirmChangeQty(message, cartSq, goodsQty, list, listIndex, cartSqArr, allYn) {
|
|
|
+ mcxDialog.confirmC(message, { //내용
|
|
|
+ btn : ["취소", "확인"],
|
|
|
+ btnClick: function (index) {
|
|
|
+ if (index == 1) { //button1 일때 처리문
|
|
|
+ orderFlag = false; return false;
|
|
|
+ } else { //button2 일때 처리문
|
|
|
+ updateGoodsQty(cartSq, goodsQty);
|
|
|
+ fnOrderValidation(list, listIndex, cartSqArr, allYn);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function fnRemoveCartSqConfirm(message, cartSqArr, cartSq, list, listIndex, allYn) {
|
|
|
+ mcxDialog.confirmC(message, { //내용
|
|
|
+ btn : ["취소", "확인"],
|
|
|
+ btnClick: function (index) {
|
|
|
+ if (index == 1) { //button1 일때 처리문
|
|
|
+ orderFlag = false; return false;
|
|
|
+ } else { //button2 일때 처리문
|
|
|
+ fnCheckOffCartSqArr(cartSqArr, info.cartSq);
|
|
|
+ fnOrderValidation(list, listIndex, cartSqArr, allYn);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function fnCheckOffCartSqArr(cartSqArr, cartSq) {
|
|
|
+ // 체크박스 해제
|
|
|
+ $("#cartListForm input[name=cartSqArr]").each(function () {
|
|
|
+ if ($(this).val() == cartSq) {
|
|
|
+ $(this).prop("checked", false);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 장바구니 선택된것 삭제 > 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 input[name=cartSqArr]:checked").each(function () {
|
|
|
+ cartSqArr.push($(this).val());
|
|
|
+ });
|
|
|
+
|
|
|
+ fnOrderCheck(cartSqArr, 0, "Y");
|
|
|
+ } else {
|
|
|
+ fnOrderCheck(cartSq, 0, "N");
|
|
|
+ }
|
|
|
+ } else { //button2 일때 처리문
|
|
|
+ location.href="/signin";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ if(cartSq == "all") {
|
|
|
+ // 선택된 장바구니 번호
|
|
|
+ $("#cartListForm input[name=cartSqArr]:checked").each(function () {
|
|
|
+ cartSqArr.push($(this).val());
|
|
|
+ });
|
|
|
+
|
|
|
+ fnOrderCheck(cartSqArr, loginInfo.custNo, "Y");
|
|
|
+ } else {
|
|
|
+ fnOrderCheck(cartSq, loginInfo.custNo, "N");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 주문 데이터 밸리데이션 체크
|
|
|
+ function fnOrderCheck(cartSq, custNo, allYn) {
|
|
|
+ // 선택된 장바구니 정보 가공
|
|
|
+ let data = { cartSqArr : cartSq
|
|
|
+ , custNo : custNo
|
|
|
+ }
|
|
|
+ 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 {
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 전체선택 버튼
|
|
|
+ $("#od_item_all").on("change", function() {
|
|
|
+ if($("#od_item_all").is(":checked")) {
|
|
|
+ $("input[name=cartSqArr]").prop("checked", true);
|
|
|
+ changeCartSqArr();
|
|
|
+ } else {
|
|
|
+ $("input[name=cartSqArr]").prop("checked", false);
|
|
|
+ // 하단 합계금액, 구매하기 수량 변경
|
|
|
+ $("#cartListForm .realOrderAmtText").text("0");
|
|
|
+ $("#cartListForm .realOrderQtyText").text("0");
|
|
|
+ $("#cartListForm .area_order .number").text("0");
|
|
|
+ $("#cartListForm .od_amount_box .sumListPrice").text("0");
|
|
|
+ $("#cartListForm .od_amount_box .totDelvFee").text("0");
|
|
|
+ $("#cartListForm .od_amount_box .totDcAmt").text("0");
|
|
|
+ $("#cartListForm .totalprice_box .sumRealPayAmt").text("0");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ </script>
|
|
|
+</th:block>
|
|
|
+</body>
|
|
|
+</html>
|