fix : 구독서비스 - 결제 처리 전 정합성 검사
This commit is contained in:
@@ -52,6 +52,9 @@ public interface BOMaMtngMapper {
|
|||||||
/** 주문 전 쿠폰정보 재확인*/
|
/** 주문 전 쿠폰정보 재확인*/
|
||||||
public List<String> selectBOPreOrderValidationCouponList(BOPreOrderValidVO goods);
|
public List<String> selectBOPreOrderValidationCouponList(BOPreOrderValidVO goods);
|
||||||
|
|
||||||
|
/** 구독서비스 주문 전 주문정보 재확인*/
|
||||||
|
public List<DataMap> selectBOSubsvcPreOrderValidation(BOPreOrderValidVO goods);
|
||||||
|
|
||||||
/*쇼핑몰 구매요청 재검증 확인 여부*/
|
/*쇼핑몰 구매요청 재검증 확인 여부*/
|
||||||
public String selectPurchsValidUseAt(String sopmalCd);
|
public String selectPurchsValidUseAt(String sopmalCd);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -306,8 +306,12 @@ public class BOMaMtngService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(BOPreOrderValidVO goods : goodsList) {
|
for(BOPreOrderValidVO goods : goodsList) {
|
||||||
|
List<DataMap> resultValid = new ArrayList<>();
|
||||||
List<DataMap> resultValid = mapper.selectBOPreOrderValidation(goods);
|
if(goods.getSubsvcInnb() != "") {
|
||||||
|
resultValid = mapper.selectBOSubsvcPreOrderValidation(goods);
|
||||||
|
} else {
|
||||||
|
resultValid = mapper.selectBOPreOrderValidation(goods);
|
||||||
|
}
|
||||||
|
|
||||||
//구매정보 변경대상 필터링
|
//구매정보 변경대상 필터링
|
||||||
// 값이 1인 항목 == 변경항목
|
// 값이 1인 항목 == 변경항목
|
||||||
@@ -473,12 +477,14 @@ public class BOMaMtngService {
|
|||||||
goodsList.forEach(goods -> {
|
goodsList.forEach(goods -> {
|
||||||
|
|
||||||
String goodsInnb = StringUtil.isNullToString(goods.get("goodsInnb"));
|
String goodsInnb = StringUtil.isNullToString(goods.get("goodsInnb"));
|
||||||
|
String subsvcInnb = StringUtil.isNullToString(goods.get("subsvcInnb"));
|
||||||
|
|
||||||
//상품별 수량합계
|
//상품별 수량합계
|
||||||
int goodsTotalQy = 0;
|
int goodsTotalQy = 0;
|
||||||
if(qySums.containsKey(goodsInnb)){
|
if(qySums.containsKey(goodsInnb)){
|
||||||
goodsTotalQy = qySums.getOrDefault(goodsInnb, 0);
|
goodsTotalQy = qySums.getOrDefault(goodsInnb, 0);
|
||||||
|
} else if (qySums.containsKey(subsvcInnb)) {
|
||||||
|
goodsTotalQy = qySums.getOrDefault(subsvcInnb, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -514,6 +520,7 @@ public class BOMaMtngService {
|
|||||||
.sopmalCd(StringUtil.isNullToString(goods.get("sopmalCd")))
|
.sopmalCd(StringUtil.isNullToString(goods.get("sopmalCd")))
|
||||||
.goodsInnb(StringUtil.isNullToString(goods.get("goodsInnb")))
|
.goodsInnb(StringUtil.isNullToString(goods.get("goodsInnb")))
|
||||||
.goodsOptnInnb(StringUtil.isNullToString(goods.get("goodsOptnInnb")))
|
.goodsOptnInnb(StringUtil.isNullToString(goods.get("goodsOptnInnb")))
|
||||||
|
.subsvcInnb(StringUtil.isNullToString(goods.get("subsvcInnb")))
|
||||||
.mbrInnb(StringUtil.isNullToString(goods.get("mbrInnb")))
|
.mbrInnb(StringUtil.isNullToString(goods.get("mbrInnb")))
|
||||||
.mbrDvCd(StringUtil.isNullToString(goods.get("mbrDvCd")))
|
.mbrDvCd(StringUtil.isNullToString(goods.get("mbrDvCd")))
|
||||||
.qy(StringUtil.isNullToString(goods.get("qy")))
|
.qy(StringUtil.isNullToString(goods.get("qy")))
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ public class BOPreOrderValidVO {
|
|||||||
/*상품옵션고유번호*/
|
/*상품옵션고유번호*/
|
||||||
private String goodsOptnInnb;
|
private String goodsOptnInnb;
|
||||||
|
|
||||||
|
/*구독서비스고유번호*/
|
||||||
|
private String subsvcInnb;
|
||||||
|
|
||||||
/*회원고유번호*/
|
/*회원고유번호*/
|
||||||
private String mbrInnb;
|
private String mbrInnb;
|
||||||
|
|
||||||
|
|||||||
@@ -6015,8 +6015,8 @@ public class BOOrdrService{
|
|||||||
LinkedHashMap subsvcOne = subsvcList.get(0);
|
LinkedHashMap subsvcOne = subsvcList.get(0);
|
||||||
log.debug("subsvcOne : {}", subsvcOne);
|
log.debug("subsvcOne : {}", subsvcOne);
|
||||||
|
|
||||||
goodsAmt = BigDecimal.valueOf((Integer) subsvcOne.get("selpric"));
|
goodsAmt = BigDecimal.valueOf((Integer) subsvcOne.get("slepric"));
|
||||||
setleAmt = BigDecimal.valueOf((Integer) subsvcOne.get("selpric"));
|
setleAmt = BigDecimal.valueOf((Integer) subsvcOne.get("slepric"));
|
||||||
log.debug("결제 예정 금액 : {}", setleAmt);
|
log.debug("결제 예정 금액 : {}", setleAmt);
|
||||||
|
|
||||||
// 환율계산
|
// 환율계산
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ mngrfo:
|
|||||||
images: .gif,.jpg,.jpeg,.png
|
images: .gif,.jpg,.jpeg,.png
|
||||||
cdnurl: https://19b0bde6dcdc15ad.kinxzone.com
|
cdnurl: https://19b0bde6dcdc15ad.kinxzone.com
|
||||||
subsvc:
|
subsvc:
|
||||||
dft-goods-optn-innb: 5
|
dft-goods-optn-innb: 1
|
||||||
|
|
||||||
|
|
||||||
secret:
|
secret:
|
||||||
|
|||||||
@@ -769,4 +769,122 @@
|
|||||||
SELECT PURCHS_REVALID_AT FROM GC_SHOP WHERE 1=1 AND SOPMAL_CD = #{sopmalCd}
|
SELECT PURCHS_REVALID_AT FROM GC_SHOP WHERE 1=1 AND SOPMAL_CD = #{sopmalCd}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 주문 전 주문정보 재확인 -->
|
||||||
|
<select id="selectBOSubsvcPreOrderValidation" parameterType="com.wb.domainserver.domain.admin.instcSle.mtng.vo.BOPreOrderValidVO" resultType="dataMap">
|
||||||
|
<![CDATA[
|
||||||
|
SELECT
|
||||||
|
CASE
|
||||||
|
WHEN GOODS.SUBSVC_STTUS_CD = '01' THEN 0
|
||||||
|
ELSE 1
|
||||||
|
END AS GOODS_STTUS, -- 상품상태 정상 확인
|
||||||
|
CASE
|
||||||
|
WHEN GOODS.PURCHS_QY_LMTT_DV_CD = '01' OR GOODS.PURCHS_QY_LMTT_DV_CD IS NULL THEN 0
|
||||||
|
ELSE
|
||||||
|
CASE
|
||||||
|
WHEN #{goodsTotalQy} BETWEEN GOODS.MUMM_PURCHS_QY AND GOODS.MXMM_PURCHS_QY THEN 0
|
||||||
|
ELSE 1
|
||||||
|
END
|
||||||
|
END AS PURCHS_QY_LMTT, -- 상품별 최소 최대 구매수량제한여부
|
||||||
|
CASE
|
||||||
|
WHEN GOODS.INVNTRY_POLICY_CD = '02' THEN 0
|
||||||
|
ELSE
|
||||||
|
CASE
|
||||||
|
WHEN (GOODS.INVNTRY_QY - IFNULL(GOODS.USEFUL_INVNTRY_QY, 0)) >= #{qy} THEN 0
|
||||||
|
ELSE 1
|
||||||
|
END
|
||||||
|
END AS INVNTRY, -- 각 옵션별 재고 유무
|
||||||
|
CASE
|
||||||
|
WHEN GOODS.INVNTRY_POLICY_CD = '02' THEN 0
|
||||||
|
ELSE
|
||||||
|
CASE
|
||||||
|
WHEN (IFNULL(GOODS.REST_INVNTRY_QY, 0) - IFNULL(GOODS.AVLINV_LMTT_QY, 0)) >= #{goodsTotalQy} THEN 0
|
||||||
|
ELSE 1
|
||||||
|
END
|
||||||
|
END AS INVNTRY_POLICY, -- 상품별 옵션 수량합산 재고유무
|
||||||
|
CASE
|
||||||
|
WHEN IFNULL(GOODS.SUBSVC_CT, 0) = #{slepric} THEN 0
|
||||||
|
ELSE 1
|
||||||
|
END AS SELPRIC, -- 판매가 변경여부
|
||||||
|
0 AS DSCNT_AT, -- 구간,복수할인 정보 변경 여부
|
||||||
|
0 AS DLVY_GROUP, -- 배송그룹 변경여부
|
||||||
|
0 AS PURCHS_TRGTER_LMTT, -- 구매대상자 제한
|
||||||
|
0 AS COUPON_STTUS, -- 쿠폰 상태 확인
|
||||||
|
0 AS COUPON_USE_AT, -- 쿠폰 회수여부 확인
|
||||||
|
0 AS COUPON_VALIDPD_DT, -- 쿠폰 유효기간 확인
|
||||||
|
0 AS EVT_TRGET_AT, -- 이벤트 진행여부 이벤트 대상일경우 1을 반환함 = 정상 처리 0 이벤트 대상 아닐경우 1
|
||||||
|
0 AS DPLCT_LMTT_COUPON, -- 이벤트 중복제한 쿠폰 존재여부
|
||||||
|
0 AS OPTN_EXPSR_AT -- 상품옵션 노출여부
|
||||||
|
FROM (
|
||||||
|
SELECT
|
||||||
|
GS.SUBSVC_INNB, -- 구독서비스 고유번호
|
||||||
|
GG.GOODS_INNB, -- 상품 고유번호
|
||||||
|
GS.SOPMAL_CD, -- 쇼핑몰코드
|
||||||
|
GS.SUBSVC_CT, -- 구독료
|
||||||
|
GG.DLVY_GROUP_INNB, -- 배송그룹고유번호
|
||||||
|
GG.GOODS_KND_CD, -- 상품구분 01 상품
|
||||||
|
GS.SUBSVC_STTUS_CD, -- 상품상태 01 정상
|
||||||
|
GS.PURCHS_QY_LMTT_DV_CD, -- 구매수량제한여부 02 제한
|
||||||
|
GS.MUMM_PURCHS_QY, -- 최소구매수량
|
||||||
|
GS.MXMM_PURCHS_QY, -- 최대구매수량
|
||||||
|
GS.INVNTRY_POLICY_CD, -- 재고정책 01 재고가 있으면 판매 02 재고없어도 판매
|
||||||
|
GS.AVLINV_LMTT_QY, -- 가용재고제한수량
|
||||||
|
GG.PURCHS_TRGTER_LMTT_DV_CD, -- 구매 대상자 제한 02 제한
|
||||||
|
SUM(IFNULL(GS.INVNTRY_QY, 0)) AS INVNTRY_QY, -- 상품 재고수량 합계
|
||||||
|
SUM(IFNULL(GS.USEFUL_INVNTRY_QY, 0)) AS USEFUL_INVNTRY_QY, -- 상품 사용 재고수량 합계
|
||||||
|
SUM(IFNULL(GS.INVNTRY_QY, 0)) - SUM(IFNULL(GS.USEFUL_INVNTRY_QY, 0)) AS REST_INVNTRY_QY -- 잔여 재고수량 합계
|
||||||
|
FROM GC_SUBSVC GS
|
||||||
|
INNER JOIN GC_GOODS_OPTION GGO
|
||||||
|
ON GS.SOPMAL_CD = GGO.SOPMAL_CD
|
||||||
|
AND GS.DFT_GOODS_OPTN_INNB = GGO.GOODS_OPTN_INNB
|
||||||
|
AND GS.USE_AT = 'Y'
|
||||||
|
AND GGO.USE_AT = 'Y'
|
||||||
|
INNER JOIN GC_GOODS GG
|
||||||
|
ON GS.SOPMAL_CD = GG.SOPMAL_CD
|
||||||
|
AND GGO.GOODS_INNB = GG.GOODS_INNB
|
||||||
|
AND GG.USE_AT = 'Y'
|
||||||
|
WHERE 1 = 1
|
||||||
|
AND GS.SOPMAL_CD = #{sopmalCd}
|
||||||
|
AND GS.SUBSVC_INNB = #{subsvcInnb}
|
||||||
|
GROUP BY
|
||||||
|
GG.GOODS_INNB
|
||||||
|
) GOODS
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
GM.MBR_INNB,
|
||||||
|
GM.MBR_DV_CD,
|
||||||
|
GMGM.SOPMAL_CD,
|
||||||
|
GMG.MBR_GRAD_INNB
|
||||||
|
FROM
|
||||||
|
GC_MEMBER GM
|
||||||
|
INNER JOIN GC_MEMBER_GRAD_MAPPING GMGM
|
||||||
|
ON GM.MBR_INNB = GMGM.MBR_INNB
|
||||||
|
AND GM.MBR_DV_CD = GMGM.MBR_DV_CD
|
||||||
|
AND GM.USE_AT = 'Y'
|
||||||
|
INNER JOIN GC_MEMBER_GRAD GMG
|
||||||
|
ON GMGM.MBR_GRAD_INNB = GMG.MBR_GRAD_INNB
|
||||||
|
AND GMGM.SOPMAL_CD = GMG.SOPMAL_CD
|
||||||
|
AND GMG.USE_AT = 'Y'
|
||||||
|
WHERE 1 = 1
|
||||||
|
AND GMGM.SOPMAL_CD = #{sopmalCd}
|
||||||
|
AND GM.MBR_INNB = #{mbrInnb}
|
||||||
|
) MBR
|
||||||
|
ON MBR.SOPMAL_CD = GOODS.SOPMAL_CD
|
||||||
|
WHERE 1 = 1
|
||||||
|
GROUP BY
|
||||||
|
GOODS_STTUS,
|
||||||
|
PURCHS_QY_LMTT,
|
||||||
|
INVNTRY,
|
||||||
|
INVNTRY_POLICY,
|
||||||
|
SELPRIC,
|
||||||
|
DSCNT_AT,
|
||||||
|
DLVY_GROUP,
|
||||||
|
PURCHS_TRGTER_LMTT,
|
||||||
|
COUPON_STTUS,
|
||||||
|
COUPON_USE_AT,
|
||||||
|
COUPON_VALIDPD_DT,
|
||||||
|
EVT_TRGET_AT,
|
||||||
|
DPLCT_LMTT_COUPON
|
||||||
|
]]>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
, GS.SUBSVC_CT /*구독료*/
|
, GS.SUBSVC_CT /*구독료*/
|
||||||
, GS.TME_DLVY_AMT /*1회배송비*/
|
, GS.TME_DLVY_AMT /*1회배송비*/
|
||||||
, GS.CNSMRPRIC /*소비자가*/
|
, GS.CNSMRPRIC /*소비자가*/
|
||||||
, GS.SUBSVC_CT + (TME_DLVY_AMT * DLVY_CNT) as SELPRIC /*실판매가=구독료+(1회배송비X배송횟수)*/
|
, GS.SUBSVC_CT + (TME_DLVY_AMT * DLVY_CNT) as SLEPRIC /*실판매가=구독료+(1회배송비X배송횟수)*/
|
||||||
, ROUND((GS.CNSMRPRIC - (GS.SUBSVC_CT + (TME_DLVY_AMT * DLVY_CNT))) / NULLIF(GS.CNSMRPRIC, 0) * 100, 0) AS DSCNT_RAITO
|
, ROUND((GS.CNSMRPRIC - (GS.SUBSVC_CT + (TME_DLVY_AMT * DLVY_CNT))) / NULLIF(GS.CNSMRPRIC, 0) * 100, 0) AS DSCNT_RAITO
|
||||||
, GS.INVNTRY_QY /*재고수량*/
|
, GS.INVNTRY_QY /*재고수량*/
|
||||||
, GS.USEFUL_INVNTRY_QY /*판매재고수량*/
|
, GS.USEFUL_INVNTRY_QY /*판매재고수량*/
|
||||||
|
|||||||
@@ -54,14 +54,14 @@
|
|||||||
$('#dlvyCnt').text(data.dlvyCnt);
|
$('#dlvyCnt').text(data.dlvyCnt);
|
||||||
$('#dlvyCycle').text(data.dlvyCycle);
|
$('#dlvyCycle').text(data.dlvyCycle);
|
||||||
$('#cnsmrpric').text(fn_format_number(data.cnsmrpric) + curUnit);
|
$('#cnsmrpric').text(fn_format_number(data.cnsmrpric) + curUnit);
|
||||||
$('#selpric').text(fn_format_number(data.selpric) + curUnit);
|
$('#slepric').text(fn_format_number(data.slepric) + curUnit);
|
||||||
$('#dscntRaito').text(data.dscntRaito + '%');
|
$('#dscntRaito').text(data.dscntRaito + '%');
|
||||||
$('#subsvcDc').html(data.subsvcDc);
|
$('#subsvcDc').html(data.subsvcDc);
|
||||||
fn_hide_subsvcDetail(data.subPd, data.dlvyCnt, data.selpric);
|
fn_hide_subsvcDetail(data.subPd, data.dlvyCnt, data.slepric);
|
||||||
|
|
||||||
$("#fixedImg").attr("src", cdnurl + data.img);
|
$("#fixedImg").attr("src", cdnurl + data.img);
|
||||||
$('#fixedTitle').text(data.subsvcConcatNm);
|
$('#fixedTitle').text(data.subsvcConcatNm);
|
||||||
$('#fixedPrice').text(fn_format_number(data.selpric));
|
$('#fixedPrice').text(fn_format_number(data.slepric));
|
||||||
|
|
||||||
switch (data.subsvcSttusCd) {
|
switch (data.subsvcSttusCd) {
|
||||||
case '01':
|
case '01':
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
/******************************************************
|
/******************************************************
|
||||||
* 구독서비스 상세 숨기기
|
* 구독서비스 상세 숨기기
|
||||||
* ****************************************************/
|
* ****************************************************/
|
||||||
const fn_hide_subsvcDetail = function(subPd, dlvyCnt, selpric) {
|
const fn_hide_subsvcDetail = function(subPd, dlvyCnt, slepric) {
|
||||||
function isEmpty(val) {
|
function isEmpty(val) {
|
||||||
return !val || val === 0;
|
return !val || val === 0;
|
||||||
}
|
}
|
||||||
@@ -99,8 +99,8 @@
|
|||||||
hideIf(isEmpty(subPd), 'li', '#subPd');
|
hideIf(isEmpty(subPd), 'li', '#subPd');
|
||||||
hideIf(isEmpty(dlvyCnt), 'li', '#dlvyCnt');
|
hideIf(isEmpty(dlvyCnt), 'li', '#dlvyCnt');
|
||||||
hideIf(isEmpty(subPd) && isEmpty(dlvyCnt), '.box', '#subPd');
|
hideIf(isEmpty(subPd) && isEmpty(dlvyCnt), '.box', '#subPd');
|
||||||
hideIf(isEmpty(selpric), '.box', '#selpric');
|
hideIf(isEmpty(slepric), '.box', '#slepric');
|
||||||
hideIf(isEmpty(selpric), '#fixedButton');
|
hideIf(isEmpty(slepric), '#fixedButton');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
@@ -109,19 +109,23 @@
|
|||||||
const fn_purchs_subsvc = function() {
|
const fn_purchs_subsvc = function() {
|
||||||
var checkedValue = $("select[name='subsvcInnb']").val();
|
var checkedValue = $("select[name='subsvcInnb']").val();
|
||||||
|
|
||||||
var tempForm = $('<form>', {
|
sessionStorage.setItem("subsvcInnb", checkedValue);
|
||||||
method: 'post',
|
location.href = "/sopmal/ordr/selectSubsvcPurchsForm" +
|
||||||
action: '/sopmal/ordr/selectSubsvcPurchsForm'
|
"?subsvcInnb=" + encodeURIComponent(checkedValue);
|
||||||
});
|
|
||||||
$('<input>', {
|
|
||||||
type: 'hidden',
|
|
||||||
name: 'subsvcInnb',
|
|
||||||
value: checkedValue
|
|
||||||
}).appendTo(tempForm);
|
|
||||||
|
|
||||||
tempForm.appendTo('body');
|
// var tempForm = $('<form>', {
|
||||||
tempForm.submit();
|
// method: 'post',
|
||||||
tempForm.remove();
|
// action: '/sopmal/ordr/selectSubsvcPurchsForm'
|
||||||
|
// });
|
||||||
|
// $('<input>', {
|
||||||
|
// type: 'hidden',
|
||||||
|
// name: 'subsvcInnb',
|
||||||
|
// value: checkedValue
|
||||||
|
// }).appendTo(tempForm);
|
||||||
|
//
|
||||||
|
// tempForm.appendTo('body');
|
||||||
|
// tempForm.submit();
|
||||||
|
// tempForm.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************
|
/******************************************************
|
||||||
@@ -262,7 +266,7 @@
|
|||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="productDetailInfo__price__price boxTitle">
|
<div class="productDetailInfo__price__price boxTitle">
|
||||||
<span id="cnsmrpric" class="product-unit-price__original"></span>
|
<span id="cnsmrpric" class="product-unit-price__original"></span>
|
||||||
<span id="selpric" class="product-unit-price__current"></span>
|
<span id="slepric" class="product-unit-price__current"></span>
|
||||||
<span id="dscntRaito" style="color: red">%</span>
|
<span id="dscntRaito" style="color: red">%</span>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" id="subscribeBtn" class="btn theme large" onclick="fn_purchs_subsvc();">구독하기</button>
|
<button type="button" id="subscribeBtn" class="btn theme large" onclick="fn_purchs_subsvc();">구독하기</button>
|
||||||
|
|||||||
@@ -2065,7 +2065,7 @@
|
|||||||
tr += ' </td>';
|
tr += ' </td>';
|
||||||
tr += ' <td>';
|
tr += ' <td>';
|
||||||
tr += ' <span class="cartItem__beforePrice"><span class="comma product-subCnsmrpric">' + (goods.cnsmrpric).toLocaleString() + '</span>' + curUnit + '</span>';
|
tr += ' <span class="cartItem__beforePrice"><span class="comma product-subCnsmrpric">' + (goods.cnsmrpric).toLocaleString() + '</span>' + curUnit + '</span>';
|
||||||
tr += ' <span class="cartItem__afterPrice"><span class="comma product-dscntApplyAmt">' + (goods.selpric).toLocaleString() + '</span><span class="priceUnit">' + curUnit + '</span></span>';
|
tr += ' <span class="cartItem__afterPrice"><span class="comma product-dscntApplyAmt">' + (goods.slepric).toLocaleString() + '</span><span class="priceUnit">' + curUnit + '</span></span>';
|
||||||
tr += ' </td>';
|
tr += ' </td>';
|
||||||
tr += '</tr>';
|
tr += '</tr>';
|
||||||
|
|
||||||
@@ -3186,7 +3186,7 @@
|
|||||||
// const enuriObj = JSON.parse(enuri);
|
// const enuriObj = JSON.parse(enuri);
|
||||||
// const setleAmtFromEnuri = enuriObj['setleAmt']; // 계산된 결제금액
|
// const setleAmtFromEnuri = enuriObj['setleAmt']; // 계산된 결제금액
|
||||||
const setleAmtFromSubsvc = order.goodsList.reduce(function(sum, item){
|
const setleAmtFromSubsvc = order.goodsList.reduce(function(sum, item){
|
||||||
return sum + Number(item.selpric || 0); // 계산된 결제금액
|
return sum + Number(item.slepric || 0); // 계산된 결제금액
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
if (setleAmtFromOrder !== setleAmtFromSubsvc.toString()) {
|
if (setleAmtFromOrder !== setleAmtFromSubsvc.toString()) {
|
||||||
|
|||||||
@@ -46,12 +46,12 @@
|
|||||||
$('#dlvyCnt').text(data.dlvyCnt);
|
$('#dlvyCnt').text(data.dlvyCnt);
|
||||||
$('#dlvyCycle').text(data.dlvyCycle);
|
$('#dlvyCycle').text(data.dlvyCycle);
|
||||||
$('#cnsmrpric').text(fn_format_number(data.cnsmrpric) + curUnit);
|
$('#cnsmrpric').text(fn_format_number(data.cnsmrpric) + curUnit);
|
||||||
$('#selpric').text(fn_format_number(data.selpric) + curUnit);
|
$('#slepric').text(fn_format_number(data.slepric) + curUnit);
|
||||||
$('#dscntRaito').text(data.dscntRaito + '%');
|
$('#dscntRaito').text(data.dscntRaito + '%');
|
||||||
$('#subsvcDc').html(
|
$('#subsvcDc').html(
|
||||||
data.mblSubsvcDcPcSameAt === "N" ? data.mblSubsvcDc : data.subsvcDc
|
data.mblSubsvcDcPcSameAt === "N" ? data.mblSubsvcDc : data.subsvcDc
|
||||||
);
|
);
|
||||||
fn_hide_subsvcDetail(data.subPd, data.dlvyCnt, data.selpric);
|
fn_hide_subsvcDetail(data.subPd, data.dlvyCnt, data.slepric);
|
||||||
|
|
||||||
switch (data.subsvcSttusCd) {
|
switch (data.subsvcSttusCd) {
|
||||||
case '01':
|
case '01':
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
/******************************************************
|
/******************************************************
|
||||||
* 구독서비스 상세 숨기기
|
* 구독서비스 상세 숨기기
|
||||||
* ****************************************************/
|
* ****************************************************/
|
||||||
const fn_hide_subsvcDetail = function(subPd, dlvyCnt, selpric) {
|
const fn_hide_subsvcDetail = function(subPd, dlvyCnt, slepric) {
|
||||||
function isEmpty(val) {
|
function isEmpty(val) {
|
||||||
return !val || val === 0;
|
return !val || val === 0;
|
||||||
}
|
}
|
||||||
@@ -88,8 +88,8 @@
|
|||||||
hideIf(isEmpty(subPd), 'dl', '#subPd');
|
hideIf(isEmpty(subPd), 'dl', '#subPd');
|
||||||
hideIf(isEmpty(dlvyCnt), 'dl', '#dlvyCnt');
|
hideIf(isEmpty(dlvyCnt), 'dl', '#dlvyCnt');
|
||||||
hideIf(isEmpty(subPd) && isEmpty(dlvyCnt), '.productDetailInfo__info');
|
hideIf(isEmpty(subPd) && isEmpty(dlvyCnt), '.productDetailInfo__info');
|
||||||
hideIf(isEmpty(selpric), '.productDetailInfo__price');
|
hideIf(isEmpty(slepric), '.productDetailInfo__price');
|
||||||
hideIf(isEmpty(selpric), '#subscribeBtn');
|
hideIf(isEmpty(slepric), '#subscribeBtn');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
@@ -97,20 +97,22 @@
|
|||||||
**************************************************************/
|
**************************************************************/
|
||||||
const fn_purchs_subsvc = function() {
|
const fn_purchs_subsvc = function() {
|
||||||
var checkedValue = $("input[name='subsvcInnb']:checked").val();
|
var checkedValue = $("input[name='subsvcInnb']:checked").val();
|
||||||
|
location.href = "/sopmal/ordr/selectSubsvcPurchsForm" +
|
||||||
|
"?subsvcInnb=" + encodeURIComponent(checkedValue);
|
||||||
|
|
||||||
var tempForm = $('<form>', {
|
// var tempForm = $('<form>', {
|
||||||
method: 'post',
|
// method: 'post',
|
||||||
action: '/sopmal/ordr/selectSubsvcPurchsForm'
|
// action: '/sopmal/ordr/selectSubsvcPurchsForm'
|
||||||
});
|
// });
|
||||||
$('<input>', {
|
// $('<input>', {
|
||||||
type: 'hidden',
|
// type: 'hidden',
|
||||||
name: 'subsvcInnb',
|
// name: 'subsvcInnb',
|
||||||
value: checkedValue
|
// value: checkedValue
|
||||||
}).appendTo(tempForm);
|
// }).appendTo(tempForm);
|
||||||
|
//
|
||||||
tempForm.appendTo('body');
|
// tempForm.appendTo('body');
|
||||||
tempForm.submit();
|
// tempForm.submit();
|
||||||
tempForm.remove();
|
// tempForm.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************
|
/******************************************************
|
||||||
@@ -166,7 +168,7 @@
|
|||||||
<div class="productDetailInfo__price">
|
<div class="productDetailInfo__price">
|
||||||
<div class="productDetailInfo__price__price">
|
<div class="productDetailInfo__price__price">
|
||||||
<span id="cnsmrpric" class="productDetailInfo__price__original"></span>
|
<span id="cnsmrpric" class="productDetailInfo__price__original"></span>
|
||||||
<span id="selpric" class="productDetailInfo__price__current"></span>
|
<span id="slepric" class="productDetailInfo__price__current"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="productDetailInfo__price__sale">
|
<div class="productDetailInfo__price__sale">
|
||||||
<span id="dscntRaito" class="percent" style="color: red">%</span>
|
<span id="dscntRaito" class="percent" style="color: red">%</span>
|
||||||
|
|||||||
@@ -1985,7 +1985,7 @@
|
|||||||
// }
|
// }
|
||||||
div += ' <p class="cartItem__productBottom">';
|
div += ' <p class="cartItem__productBottom">';
|
||||||
div += ' <span class="cartItem__productPrice">';
|
div += ' <span class="cartItem__productPrice">';
|
||||||
div += ' <span class="comma product-dscntApplyAmt">' + (goods.selpric).toLocaleString() + '</span><span class="priceUnit">' + curUnit + '</span>';
|
div += ' <span class="comma product-dscntApplyAmt">' + (goods.slepric).toLocaleString() + '</span><span class="priceUnit">' + curUnit + '</span>';
|
||||||
div += ' </span>';
|
div += ' </span>';
|
||||||
div += ' <span class="cartItem__productDot">·</span>';
|
div += ' <span class="cartItem__productDot">·</span>';
|
||||||
div += ' <span class="cartItem__productQuantity">' + goods.qy + '개</span>';
|
div += ' <span class="cartItem__productQuantity">' + goods.qy + '개</span>';
|
||||||
@@ -3301,7 +3301,7 @@
|
|||||||
// const enuriObj = JSON.parse(enuri);
|
// const enuriObj = JSON.parse(enuri);
|
||||||
// const setleAmtFromEnuri = enuriObj['setleAmt']; // 계산된 결제금액
|
// const setleAmtFromEnuri = enuriObj['setleAmt']; // 계산된 결제금액
|
||||||
const setleAmtFromSubsvc = order.goodsList.reduce(function(sum, item){
|
const setleAmtFromSubsvc = order.goodsList.reduce(function(sum, item){
|
||||||
return sum + Number(item.selpric || 0); // 계산된 결제금액
|
return sum + Number(item.slepric || 0); // 계산된 결제금액
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
if (setleAmtFromOrder !== setleAmtFromSubsvc.toString()) {
|
if (setleAmtFromOrder !== setleAmtFromSubsvc.toString()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user