|
|
@@ -39,12 +39,22 @@
|
|
|
<span>1인 최대 <th:block th:text="${(goodsCoupon.custPubLimitQty > 0) ? #numbers.formatInteger(goodsCoupon.custPubLimitQty, 0,'COMMA') +'장' : '무제한'}"></span>
|
|
|
</p>
|
|
|
</div>
|
|
|
- <th:block th:if="${goodsCoupon.custPubLimitQty > 0 and goodsCoupon.custPubLimitQty <= goodsCoupon.custCouponCnt}">
|
|
|
+ <div class="btn_group_flex">
|
|
|
+ <div>
|
|
|
+ <button type="button" class="btn btn_dark" id="btn_result_coupon"
|
|
|
+ th:disabled="${goodsCoupon.custPubLimitQty > 0 and goodsCoupon.custPubLimitQty <= goodsCoupon.custCouponCnt}"
|
|
|
+ th:attr="cpnId=${goodsCoupon.cpnId}" th:id="${'coupon_'+goodsCoupon.cpnId}" onclick="fnGoodsCouponDown(this);">
|
|
|
+ <span>쿠폰받기</span>
|
|
|
+ <span>받기완료</span>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- <th:block th:if="${goodsCoupon.custPubLimitQty > 0 and goodsCoupon.custPubLimitQty <= goodsCoupon.custCouponCnt}">
|
|
|
<button type="button" class="btn btn_dark btn_block btn_coupon_down" disabled="disabled"><span>받기완료</span></button>
|
|
|
</th:block>
|
|
|
<th:block th:unless="${goodsCoupon.custPubLimitQty > 0 and goodsCoupon.custPubLimitQty <= goodsCoupon.custCouponCnt}">
|
|
|
<button type="button" class="btn btn_dark btn_block btn_coupon_down" th:attr="cpnId=${goodsCoupon.cpnId}" th:id="${'coupon_'+goodsCoupon.cpnId}" onclick="fnGoodsCouponDown(this);"><span>쿠폰받기</span></button>
|
|
|
- </th:block>
|
|
|
+ </th:block> -->
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
@@ -72,8 +82,8 @@
|
|
|
let cpnId = $obj.attr('cpnId');
|
|
|
let goodsCd = $('#goodsCouponForm input[name=goodsCd]').val();
|
|
|
|
|
|
- gagajf.ajaxJsonSubmit(_PAGE_GOODS_CPN_DOWNLOAD, JSON.stringify({goodsCd: goodsCd, cpnId: cpnId}), fnGoodsCouponCallBack);
|
|
|
-
|
|
|
+ gagajf.ajaxJsonSubmit(_PAGE_GOODS_CPN_DOWNLOAD, JSON.stringify({goodsCd: goodsCd, cpnId: cpnId}), fnGoodsCouponCallBack);
|
|
|
+
|
|
|
//쿠폰이 발급되었습니다
|
|
|
//죄송합니다. 쿠폰이 모두 소진되었습니다
|
|
|
//죄송합니다. 해당 쿠폰은 다운로드가 불가합니다.
|
|
|
@@ -90,13 +100,13 @@
|
|
|
if (coupon.cpnId == cpnId){
|
|
|
if (Number(coupon.custPubLimitQty) > 0){
|
|
|
if (Number(coupon.custPubLimitQty) <= Number(coupon.custCouponCnt)){
|
|
|
- $('#coupon_'+ coupon.cpnId).html('<span>받기완료</span>');
|
|
|
+ //$('#coupon_'+ coupon.cpnId).html('<span>받기완료</span>');
|
|
|
$('#coupon_'+ coupon.cpnId).attr('disabled', true);
|
|
|
}
|
|
|
}
|
|
|
if (Number(coupon.TotPubLimitQty) > 0){
|
|
|
if (Number(coupon.TotPubLimitQty) <= Number(coupon.CustCouponCnt)){
|
|
|
- $('#coupon_'+ coupon.cpnId).html('<span>받기완료</span>');
|
|
|
+ //$('#coupon_'+ coupon.cpnId).html('<span>받기완료</span>');
|
|
|
$('#coupon_'+ coupon.cpnId).attr('disabled', true);
|
|
|
}
|
|
|
}
|