fix : 구독서비스 - 결제 처리 전 정합성 검사
This commit is contained in:
@@ -46,12 +46,12 @@
|
||||
$('#dlvyCnt').text(data.dlvyCnt);
|
||||
$('#dlvyCycle').text(data.dlvyCycle);
|
||||
$('#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 + '%');
|
||||
$('#subsvcDc').html(
|
||||
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) {
|
||||
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) {
|
||||
return !val || val === 0;
|
||||
}
|
||||
@@ -88,8 +88,8 @@
|
||||
hideIf(isEmpty(subPd), 'dl', '#subPd');
|
||||
hideIf(isEmpty(dlvyCnt), 'dl', '#dlvyCnt');
|
||||
hideIf(isEmpty(subPd) && isEmpty(dlvyCnt), '.productDetailInfo__info');
|
||||
hideIf(isEmpty(selpric), '.productDetailInfo__price');
|
||||
hideIf(isEmpty(selpric), '#subscribeBtn');
|
||||
hideIf(isEmpty(slepric), '.productDetailInfo__price');
|
||||
hideIf(isEmpty(slepric), '#subscribeBtn');
|
||||
}
|
||||
|
||||
/*************************************************************
|
||||
@@ -97,20 +97,22 @@
|
||||
**************************************************************/
|
||||
const fn_purchs_subsvc = function() {
|
||||
var checkedValue = $("input[name='subsvcInnb']:checked").val();
|
||||
location.href = "/sopmal/ordr/selectSubsvcPurchsForm" +
|
||||
"?subsvcInnb=" + encodeURIComponent(checkedValue);
|
||||
|
||||
var tempForm = $('<form>', {
|
||||
method: 'post',
|
||||
action: '/sopmal/ordr/selectSubsvcPurchsForm'
|
||||
});
|
||||
$('<input>', {
|
||||
type: 'hidden',
|
||||
name: 'subsvcInnb',
|
||||
value: checkedValue
|
||||
}).appendTo(tempForm);
|
||||
|
||||
tempForm.appendTo('body');
|
||||
tempForm.submit();
|
||||
tempForm.remove();
|
||||
// var tempForm = $('<form>', {
|
||||
// method: 'post',
|
||||
// action: '/sopmal/ordr/selectSubsvcPurchsForm'
|
||||
// });
|
||||
// $('<input>', {
|
||||
// type: 'hidden',
|
||||
// name: 'subsvcInnb',
|
||||
// value: checkedValue
|
||||
// }).appendTo(tempForm);
|
||||
//
|
||||
// tempForm.appendTo('body');
|
||||
// tempForm.submit();
|
||||
// tempForm.remove();
|
||||
}
|
||||
|
||||
/******************************************************
|
||||
@@ -166,7 +168,7 @@
|
||||
<div class="productDetailInfo__price">
|
||||
<div class="productDetailInfo__price__price">
|
||||
<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 class="productDetailInfo__price__sale">
|
||||
<span id="dscntRaito" class="percent" style="color: red">%</span>
|
||||
|
||||
@@ -1985,7 +1985,7 @@
|
||||
// }
|
||||
div += ' <p class="cartItem__productBottom">';
|
||||
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 class="cartItem__productDot">·</span>';
|
||||
div += ' <span class="cartItem__productQuantity">' + goods.qy + '개</span>';
|
||||
@@ -3301,7 +3301,7 @@
|
||||
// const enuriObj = JSON.parse(enuri);
|
||||
// const setleAmtFromEnuri = enuriObj['setleAmt']; // 계산된 결제금액
|
||||
const setleAmtFromSubsvc = order.goodsList.reduce(function(sum, item){
|
||||
return sum + Number(item.selpric || 0); // 계산된 결제금액
|
||||
return sum + Number(item.slepric || 0); // 계산된 결제금액
|
||||
}, 0);
|
||||
|
||||
if (setleAmtFromOrder !== setleAmtFromSubsvc.toString()) {
|
||||
|
||||
Reference in New Issue
Block a user