fix : 화폐단위 변경 (원 → 円)

This commit is contained in:
이대환
2025-12-18 15:15:56 +09:00
parent acef9e1c0a
commit cee548594f
6 changed files with 43 additions and 33 deletions

View File

@@ -15,6 +15,7 @@
------- -------- --------------------------- ------- -------- ---------------------------
2024-07-23 유재현 최초 생성 2024-07-23 유재현 최초 생성
--%> --%>
<spring:eval expression="@environment.getProperty('currency-unit.default')" var="curUnit"/>
<script defer> <script defer>
//상품 타이틀, 수량, 가격 저장하는 배열 //상품 타이틀, 수량, 가격 저장하는 배열
// 배열 순서 -> [상품명, 수량, 1개당 가격, 상품 총가격(=수량x개당가격), 추가정보(색상, 사이즈등)] // 배열 순서 -> [상품명, 수량, 1개당 가격, 상품 총가격(=수량x개당가격), 추가정보(색상, 사이즈등)]
@@ -101,13 +102,14 @@
// //
// //배열 내용을 바탕으로 각 아이템 텍스트 변경 // //배열 내용을 바탕으로 각 아이템 텍스트 변경
function updateCartCounters() { function updateCartCounters() {
var curUnit = '${curUnit}';
$(".modal .productDetailInfo__count").each(function () { $(".modal .productDetailInfo__count").each(function () {
var $counter = $(this); var $counter = $(this);
var $index = $counter.index(); var $index = $counter.index();
var $number = $counter.find(".productDetailInfo__count__amountNumber"); var $number = $counter.find(".productDetailInfo__count__amountNumber");
var $price = $counter.find(".productDetailInfo__count__priceNum"); var $price = $counter.find(".productDetailInfo__count__priceNum");
$number.text(productArr[$index][1]); $number.text(productArr[$index][1]);
$price.text(addComma(productArr[$index][3]) + "원"); $price.text(addComma(productArr[$index][3]) + curUnit);
}); });
updateCartTotalPrice(); // 총 상품금액 업데이트 updateCartTotalPrice(); // 총 상품금액 업데이트
} }
@@ -292,7 +294,7 @@
</span> </span>
<span class="product-unit-price__current"> <span class="product-unit-price__current">
<span class="comma"> <fmt:formatNumber value="${addCartResultMap.goodsDtl.dcSlepric}"/></span> <span class="comma"> <fmt:formatNumber value="${addCartResultMap.goodsDtl.dcSlepric}"/></span>
<span class="priceUnit">원</span></span> <span class="priceUnit">${curUnit}</span></span>
</div> </div>
<div class="product-unit-price__sale"> <div class="product-unit-price__sale">
<span class="percent"> <span class="percent">
@@ -325,7 +327,7 @@
<c:if test="${goodsOpt01.disableAt eq 'Y'}"> <span>(품절)</span></c:if> <c:if test="${goodsOpt01.disableAt eq 'Y'}"> <span>(품절)</span></c:if>
</div> </div>
<div class="productDetailInfo__option__right"> <div class="productDetailInfo__option__right">
<span class="productDetailInfo__option__price"><span class="comma"><fmt:formatNumber value="${goodsOpt01.slepric}"/></span> <span class="priceUnit"> 원</span></span> <span class="productDetailInfo__option__price"><span class="comma"><fmt:formatNumber value="${goodsOpt01.slepric}"/></span> <span class="priceUnit"> ${curUnit}</span></span>
<span class="productDetailInfo__option__monthly-payment"><c:out value="${goodsOpt01.optnInfo}"/></span> <span class="productDetailInfo__option__monthly-payment"><c:out value="${goodsOpt01.optnInfo}"/></span>
</div> </div>
</c:if> </c:if>
@@ -456,7 +458,7 @@
<span class="product-total__text">총 상품금액</span> <span class="product-total__text">총 상품금액</span>
<span class="product-total__price"> <span class="product-total__price">
<span class="product-total__price__totalPriceNum">0</span> <span class="product-total__price__totalPriceNum">0</span>
<span class="won">원</span> <span class="won">${curUnit}</span>
</span> </span>
</div> </div>
<c:choose> <c:choose>

View File

@@ -14,6 +14,7 @@
------- -------- --------------------------- ------- -------- ---------------------------
2024-05 리브가 2024-05 리브가
--%> --%>
<spring:eval expression="@environment.getProperty('currency-unit.default')" var="curUnit"/>
<div class="left"> <div class="left">
<div class="search-number"> <div class="search-number">
<span class="search-number__text">총 <strong><c:out <span class="search-number__text">총 <strong><c:out
@@ -99,9 +100,9 @@
<div class="product-unit-price col order-${list.pricExpsrOrdr-1}" style="order: ${list.pricExpsrOrdr-1}"> <div class="product-unit-price col order-${list.pricExpsrOrdr-1}" style="order: ${list.pricExpsrOrdr-1}">
<div class="product-unit-price__price"> <div class="product-unit-price__price">
<span class="product-unit-price__original"><fmt:formatNumber <span class="product-unit-price__original"><fmt:formatNumber
value="${list.cnsmrpric}"/> 원</span> value="${list.cnsmrpric}"/> ${curUnit}</span>
<span class="product-unit-price__current"><fmt:formatNumber <span class="product-unit-price__current"><fmt:formatNumber
value="${list.slepric}"/> 원</span> value="${list.slepric}"/> ${curUnit}</span>
</div> </div>
<div class="product-unit-price__sale"> <div class="product-unit-price__sale">
<span class="percent"> <c:out value="${list.slePercent}"/> %</span> <span class="percent"> <c:out value="${list.slePercent}"/> %</span>

View File

@@ -20,6 +20,7 @@
<head> <head>
<%-- 공통 include --%> <%-- 공통 include --%>
<jsp:include page="/WEB-INF/views/comm/Include.jsp"/> <jsp:include page="/WEB-INF/views/comm/Include.jsp"/>
<spring:eval expression="@environment.getProperty('currency-unit.default')" var="curUnit"/>
</head> </head>
<script> <script>
@@ -51,30 +52,31 @@
var startPric = null; var startPric = null;
var endPric = null; var endPric = null;
var buttonText = $(this).text(); var buttonText = $(this).text();
var curUnit = '${curUnit}';
switch (buttonText) { switch (buttonText) {
case '전체': case '전체':
startPric = null; startPric = null;
endPric = null; endPric = null;
break; break;
case '~ 1만원': case '~ 1000' + curUnit:
startPric = 0; startPric = 0;
endPric = 10000; endPric = 1000;
break; break;
case '1 ~ 5만원': case '1000 ~ 5000' + curUnit:
startPric = 10000; startPric = 1000;
endPric = 50000; endPric = 5000;
break; break;
case '5 ~ 15만원': case '5000 ~ 15000' + curUnit:
startPric = 50000; startPric = 5000;
endPric = 150000; endPric = 15000;
break; break;
case '15 ~ 30만원': case '15000 ~ 30000' + curUnit:
startPric = 150000; startPric = 15000;
endPric = 300000; endPric = 30000;
break; break;
case '30만원 이상': case '30000' + curUnit + ' 이상':
startPric = 300000; startPric = 30000;
endPric = null; endPric = null;
break; break;
default: default:
@@ -1072,25 +1074,25 @@
<input type="hidden" id="pricDv" name="pricDv" value="slepric"> <input type="hidden" id="pricDv" name="pricDv" value="slepric">
<div class="searchPrice__select"> <div class="searchPrice__select">
<button value="btnAll" class="searchPrice__select__btn <c:if test="${resultMap.BOGoodsVO.priceRange == null or resultMap.BOGoodsVO.priceRange == 'btnAll'}">selected</c:if>">전체</button> <button value="btnAll" class="searchPrice__select__btn <c:if test="${resultMap.BOGoodsVO.priceRange == null or resultMap.BOGoodsVO.priceRange == 'btnAll'}">selected</c:if>">전체</button>
<button value="btn1" class="searchPrice__select__btn <c:if test="${resultMap.BOGoodsVO.priceRange == 'btn1'}">selected</c:if>">~ 1만원</button> <button value="btn1" class="searchPrice__select__btn <c:if test="${resultMap.BOGoodsVO.priceRange == 'btn1'}">selected</c:if>">~ 1000${curUnit}</button>
<button value="btn2" class="searchPrice__select__btn <c:if test="${resultMap.BOGoodsVO.priceRange == 'btn2'}">selected</c:if>">1 ~ 5만원</button> <button value="btn2" class="searchPrice__select__btn <c:if test="${resultMap.BOGoodsVO.priceRange == 'btn2'}">selected</c:if>">1000 ~ 5000${curUnit}</button>
<button value="btn3" class="searchPrice__select__btn <c:if test="${resultMap.BOGoodsVO.priceRange == 'btn3'}">selected</c:if>">5 ~ 15만원</button> <button value="btn3" class="searchPrice__select__btn <c:if test="${resultMap.BOGoodsVO.priceRange == 'btn3'}">selected</c:if>">5000 ~ 15000${curUnit}</button>
<button value="btn4" class="searchPrice__select__btn <c:if test="${resultMap.BOGoodsVO.priceRange == 'btn4'}">selected</c:if>">15 ~ 30만원</button> <button value="btn4" class="searchPrice__select__btn <c:if test="${resultMap.BOGoodsVO.priceRange == 'btn4'}">selected</c:if>">15000 ~ 30000${curUnit}</button>
<button value="btn5" class="searchPrice__select__btn <c:if test="${resultMap.BOGoodsVO.priceRange == 'btn5'}">selected</c:if>">30만원 이상</button> <button value="btn5" class="searchPrice__select__btn <c:if test="${resultMap.BOGoodsVO.priceRange == 'btn5'}">selected</c:if>">30000${curUnit} 이상</button>
</div> </div>
<div class="searchPrice__range"> <div class="searchPrice__range">
<div class="searchPrice__rangeInput"> <div class="searchPrice__rangeInput">
<input type="text" class="searchPrice__input input-text " <input type="text" class="searchPrice__input input-text "
title="가격 입력" placeholder="" id="startPric" name="startPric" title="가격 입력" placeholder="" id="startPric" name="startPric"
value="${ resultMap.BOGoodsVO.startPric }"> value="${ resultMap.BOGoodsVO.startPric }">
<span class="searchPrice__rangeWon">원</span> <span class="searchPrice__rangeWon">${curUnit}</span>
</div> </div>
<span class="searchPrice__rangeTilde">~</span> <span class="searchPrice__rangeTilde">~</span>
<div class="searchPrice__rangeInput"> <div class="searchPrice__rangeInput">
<input type="text" class="searchPrice__input input-text " <input type="text" class="searchPrice__input input-text "
title="가격 입력" placeholder="" id="endPric" name="endPric" title="가격 입력" placeholder="" id="endPric" name="endPric"
value="${ resultMap.BOGoodsVO.endPric }"> value="${ resultMap.BOGoodsVO.endPric }">
<span class="searchPrice__rangeWon">원</span> <span class="searchPrice__rangeWon">${curUnit}</span>
</div> </div>
</div> </div>
<button class="searchPrice__btn btn theme">검색</button> <button class="searchPrice__btn btn theme">검색</button>

View File

@@ -15,6 +15,7 @@
------- -------- --------------------------- ------- -------- ---------------------------
2024-07-23 유재현 최초 생성 2024-07-23 유재현 최초 생성
--%> --%>
<spring:eval expression="@environment.getProperty('currency-unit.default')" var="curUnit"/>
<script defer> <script defer>
fn_set_niceSelect_datePicker('.select-box') fn_set_niceSelect_datePicker('.select-box')
/************************************************************* /*************************************************************
@@ -191,13 +192,14 @@
//배열 내용을 바탕으로 각 아이템 텍스트 변경 //배열 내용을 바탕으로 각 아이템 텍스트 변경
function updateCounters() { function updateCounters() {
var curUnit = '${curUnit}';
$(".productOption .product-count").each(function () { $(".productOption .product-count").each(function () {
var $counter = $(this); var $counter = $(this);
var $index = $counter.index(); var $index = $counter.index();
var $number = $counter.find(".product-count__amount-number"); var $number = $counter.find(".product-count__amount-number");
var $price = $counter.find(".product-count__priceNum"); var $price = $counter.find(".product-count__priceNum");
$number.text(productArr[$index][1]); $number.text(productArr[$index][1]);
$price.text(addComma(productArr[$index][3]) + "원"); $price.text(addComma(productArr[$index][3]) + curUnit);
}); });
updateTotalPrice(); // 총 상품금액 업데이트 updateTotalPrice(); // 총 상품금액 업데이트
console.log(productArr); // 배열 정보확인 console.log(productArr); // 배열 정보확인
@@ -282,7 +284,7 @@
<c:if test="${goodsOpt01.disableAt eq 'Y'}"> <span>(품절)</span></c:if> <c:if test="${goodsOpt01.disableAt eq 'Y'}"> <span>(품절)</span></c:if>
</div> </div>
<div class="product-option__right"> <div class="product-option__right">
<span class="product-option__price"><fmt:formatNumber value="${goodsOpt01.slepric}"/>원</span> <span class="product-option__price"><fmt:formatNumber value="${goodsOpt01.slepric}"/>${curUnit}</span>
<span class="product-option__monthly-payment">${goodsOpt01.optnInfo}</span> <span class="product-option__monthly-payment">${goodsOpt01.optnInfo}</span>
</div> </div>
</c:if> </c:if>
@@ -382,7 +384,7 @@
<span class="product-total__text">총 상품금액</span> <span class="product-total__text">총 상품금액</span>
<span class="product-total__price"> <span class="product-total__price">
<span class="productDetailInfo__priceTotal__totalPriceNum">0</span><span <span class="productDetailInfo__priceTotal__totalPriceNum">0</span><span
class="won">원</span></span> class="won">${curUnit}</span></span>
</div> </div>
<c:choose> <c:choose>
<c:when test="${addCartResultMap.goodsDtl.buttonRplcWordsUseAt ne 'Y'}"> <c:when test="${addCartResultMap.goodsDtl.buttonRplcWordsUseAt ne 'Y'}">

View File

@@ -14,6 +14,7 @@
------- -------- --------------------------- ------- -------- ---------------------------
2024-05 리브가 2024-05 리브가
--%> --%>
<spring:eval expression="@environment.getProperty('currency-unit.default')" var="curUnit"/>
<div class="sub-page"> <div class="sub-page">
<div class="sub-box"> <div class="sub-box">
<!-- 상품 - 카테고리별 타입 (상품 2열) --> <!-- 상품 - 카테고리별 타입 (상품 2열) -->
@@ -111,9 +112,9 @@
<div class="product-unit-price col order-${list.pricExpsrOrdr-1}" style="order: ${list.pricExpsrOrdr-1}"> <div class="product-unit-price col order-${list.pricExpsrOrdr-1}" style="order: ${list.pricExpsrOrdr-1}">
<div class="product-unit-price__price"> <div class="product-unit-price__price">
<span class="product-unit-price__original"><fmt:formatNumber <span class="product-unit-price__original"><fmt:formatNumber
value="${list.cnsmrpric}"/> 원</span> value="${list.cnsmrpric}"/> ${curUnit}</span>
<span class="product-unit-price__current"><fmt:formatNumber <span class="product-unit-price__current"><fmt:formatNumber
value="${list.slepric}"/> 원</span> value="${list.slepric}"/> ${curUnit}</span>
</div> </div>
<div class="product-unit-price__sale"> <div class="product-unit-price__sale">
<span class="percent"> <c:out value="${list.slePercent}"/> %</span> <span class="percent"> <c:out value="${list.slePercent}"/> %</span>

View File

@@ -19,6 +19,7 @@
<html lang="ko"> <html lang="ko">
<head> <head>
<jsp:include page="/WEB-INF/views/comm/mobile/Include.jsp" /> <jsp:include page="/WEB-INF/views/comm/mobile/Include.jsp" />
<spring:eval expression="@environment.getProperty('currency-unit.default')" var="curUnit"/>
</head> </head>
<script defer> <script defer>
//장바구니 버튼 선택 배열 //장바구니 버튼 선택 배열
@@ -149,6 +150,7 @@
success: function (result) { success: function (result) {
const resultList = JSON.parse(result.resBody.result).list const resultList = JSON.parse(result.resBody.result).list
let list = ''; let list = '';
var curUnit = '${curUnit}';
if (resultList != null && resultList.length > 0) { if (resultList != null && resultList.length > 0) {
const cdnurl = $('#cdnurl').val() const cdnurl = $('#cdnurl').val()
resultList.forEach(function (item ,index) { resultList.forEach(function (item ,index) {
@@ -210,8 +212,8 @@
if(!fn_is_empty(item.pricRplcWordsUseAt) && item.pricRplcWordsUseAt !== 'Y'){ if(!fn_is_empty(item.pricRplcWordsUseAt) && item.pricRplcWordsUseAt !== 'Y'){
list += ` <div class="product-unit-price col order-${'${item.pricExpsrOrdr-1}'}" style="order: ${'${item.pricExpsrOrdr-1}'}">`; list += ` <div class="product-unit-price col order-${'${item.pricExpsrOrdr-1}'}" style="order: ${'${item.pricExpsrOrdr-1}'}">`;
list += ' <div class="product-unit-price__price">'; list += ' <div class="product-unit-price__price">';
list += ` <span class="product-unit-price__original">${'${addComma(item.cnsmrpric)}'} 원</span>`; list += ` <span class="product-unit-price__original">${'${addComma(item.cnsmrpric)}'} ` + curUnit + `</span>`;
list += ` <span class="product-unit-price__current">${'${addComma(item.slepric)}'} 원</span>`; list += ` <span class="product-unit-price__current">${'${addComma(item.slepric)}'} ` + curUnit + `</span>`;
list += ' </div>'; list += ' </div>';
list += ' <div class="product-unit-price__sale">'; list += ' <div class="product-unit-price__sale">';
list += ` <span class="percent">${'${item.slePercent}'} %</span>`; list += ` <span class="percent">${'${item.slePercent}'} %</span>`;