fix : 구독서비스 - 결제 처리 전 정합성 검사
This commit is contained in:
@@ -54,14 +54,14 @@
|
||||
$('#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.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);
|
||||
$('#fixedTitle').text(data.subsvcConcatNm);
|
||||
$('#fixedPrice').text(fn_format_number(data.selpric));
|
||||
$('#fixedPrice').text(fn_format_number(data.slepric));
|
||||
|
||||
switch (data.subsvcSttusCd) {
|
||||
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) {
|
||||
return !val || val === 0;
|
||||
}
|
||||
@@ -99,8 +99,8 @@
|
||||
hideIf(isEmpty(subPd), 'li', '#subPd');
|
||||
hideIf(isEmpty(dlvyCnt), 'li', '#dlvyCnt');
|
||||
hideIf(isEmpty(subPd) && isEmpty(dlvyCnt), '.box', '#subPd');
|
||||
hideIf(isEmpty(selpric), '.box', '#selpric');
|
||||
hideIf(isEmpty(selpric), '#fixedButton');
|
||||
hideIf(isEmpty(slepric), '.box', '#slepric');
|
||||
hideIf(isEmpty(slepric), '#fixedButton');
|
||||
}
|
||||
|
||||
/*************************************************************
|
||||
@@ -109,19 +109,23 @@
|
||||
const fn_purchs_subsvc = function() {
|
||||
var checkedValue = $("select[name='subsvcInnb']").val();
|
||||
|
||||
var tempForm = $('<form>', {
|
||||
method: 'post',
|
||||
action: '/sopmal/ordr/selectSubsvcPurchsForm'
|
||||
});
|
||||
$('<input>', {
|
||||
type: 'hidden',
|
||||
name: 'subsvcInnb',
|
||||
value: checkedValue
|
||||
}).appendTo(tempForm);
|
||||
sessionStorage.setItem("subsvcInnb", checkedValue);
|
||||
location.href = "/sopmal/ordr/selectSubsvcPurchsForm" +
|
||||
"?subsvcInnb=" + encodeURIComponent(checkedValue);
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
/******************************************************
|
||||
@@ -262,7 +266,7 @@
|
||||
<div class="box">
|
||||
<div class="productDetailInfo__price__price boxTitle">
|
||||
<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>
|
||||
</div>
|
||||
<button type="button" id="subscribeBtn" class="btn theme large" onclick="fn_purchs_subsvc();">구독하기</button>
|
||||
|
||||
@@ -2065,7 +2065,7 @@
|
||||
tr += ' </td>';
|
||||
tr += ' <td>';
|
||||
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 += '</tr>';
|
||||
|
||||
@@ -3186,7 +3186,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