|
|
@@ -40,7 +40,7 @@
|
|
|
</p>
|
|
|
</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>
|
|
|
+ <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>
|
|
|
@@ -50,9 +50,9 @@
|
|
|
</ul>
|
|
|
</div>
|
|
|
</form>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
<div class="modal-footer">
|
|
|
- <button type="button" class="btn btn_primary btn_all_cpdown" onclick="fnGoodsCouponDownAll();"><span>쿠폰 모두 받기</span></button>
|
|
|
+ <button type="button" id="btn_all_coupon" class="btn btn_primary btn_all_cpdown" onclick="fnGoodsCouponDownAll();"><span>쿠폰 모두 받기</span></button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -143,12 +143,14 @@
|
|
|
if (Number(coupon.custPubLimitQty) <= Number(coupon.custCouponCnt)){
|
|
|
$('#coupon_'+ coupon.cpnId).html('<span>받기완료</span>');
|
|
|
$('#coupon_'+ coupon.cpnId).attr('disabled', true);
|
|
|
+ $('#coupon_'+ coupon.cpnId).find('span::after').attr('content','');
|
|
|
}
|
|
|
}
|
|
|
if (Number(coupon.TotPubLimitQty) > 0){
|
|
|
if (Number(coupon.TotPubLimitQty) <= Number(coupon.CustCouponCnt)){
|
|
|
$('#coupon_'+ coupon.cpnId).html('<span>받기완료</span>');
|
|
|
$('#coupon_'+ coupon.cpnId).attr('disabled', true);
|
|
|
+ $('#coupon_'+ coupon.cpnId).find('span::after').attr('content','');
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -162,16 +164,18 @@
|
|
|
|
|
|
var jfCouponCheck = function(){
|
|
|
let couponDownAbleYn = "N";
|
|
|
- $('.btn_coupon_down').each(function(){
|
|
|
+ $('#goodsCouponForm').find('.btn_coupon_down').each(function(){
|
|
|
if (!$(this).attr('disabled')){
|
|
|
couponDownAbleYn = "Y";
|
|
|
}
|
|
|
});
|
|
|
|
|
|
if(couponDownAbleYn == "N"){
|
|
|
- $('.btn_all_cpdown').addClass('btn_coupon_done');
|
|
|
- $('.btn_all_cpdown').attr('disabled', true);
|
|
|
- $('.btn_all_cpdown').find('span').text('쿠폰 모두 받기 완료');
|
|
|
+
|
|
|
+ $('#btn_all_coupon').removeClass('btn_primary');
|
|
|
+ $('#btn_all_coupon').addClass('btn_coupon_done');
|
|
|
+ $('#btn_all_coupon').attr('disabled', true);
|
|
|
+ $('#btn_all_coupon').find('span').text('쿠폰 모두 받기 완료');
|
|
|
}
|
|
|
}
|
|
|
|