|
|
@@ -64,7 +64,7 @@
|
|
|
<tr>
|
|
|
<th>사유</th>
|
|
|
<th>내용</th>
|
|
|
- <th>차감</th>
|
|
|
+ <th id="plusMinus"></th>
|
|
|
<th>일자</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
@@ -77,17 +77,55 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<script th:inline="javascript">
|
|
|
+
|
|
|
// 전체내역 조회
|
|
|
$("#fnSetSearchFullHistory").click(function(){
|
|
|
// Class제거 추가
|
|
|
$("#fnSetSearchCollectHistory").removeClass("on");
|
|
|
$("#fnSetSearchUsedHistory").removeClass("on");
|
|
|
$("#fnSetSearchFullHistory").addClass("on");
|
|
|
+ $("#plusMinus").text("증감/차감");
|
|
|
+
|
|
|
+ let data = {};
|
|
|
+
|
|
|
+ data.searchDt = $('select[name=searchDt]').val();
|
|
|
|
|
|
- // 적립내역 + 사용내역(sum)으로 표시
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
|
+ $.ajax(
|
|
|
+ {
|
|
|
+ type : "POST",
|
|
|
+ data : jsonData,
|
|
|
+ url : '/mypage/allpoint/list',
|
|
|
+ contentType: 'application/json',
|
|
|
+ dataType : 'json',
|
|
|
+ success : function(result){
|
|
|
+ fnPointAllListInfo(result);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
});
|
|
|
|
|
|
+ function fnPointAllListInfo(result) {
|
|
|
+
|
|
|
+ let allPointList = result.allPointList;
|
|
|
+
|
|
|
+ let tmtbHtml = "";
|
|
|
+ for(let i=0; i<allPointList.length; i++){
|
|
|
+ let point = allPointList[i];
|
|
|
+ tmtbHtml +='<tr>';
|
|
|
+ tmtbHtml +='<td>'+ point.occurGb + '</td>';
|
|
|
+ tmtbHtml += '<td class="t_l pl40">'+ point.occurDtlDesc + '</td>';
|
|
|
+ if(point.pntAmt > 0){
|
|
|
+ tmtbHtml += '<td class="c_blue">'+ point.pntAmt + '</td>';
|
|
|
+ }else{
|
|
|
+ tmtbHtml += '<td class="c_primary">'+ point.pntAmt + '</td>';
|
|
|
+ }
|
|
|
+ tmtbHtml += '<td>'+ point.pntUploadDt + '</td>';
|
|
|
+ tmtbHtml += '</tr>';
|
|
|
+ }
|
|
|
+ $("#pointAjaxList").html(tmtbHtml);
|
|
|
+ }
|
|
|
|
|
|
// 적립내역 조회
|
|
|
$("#fnSetSearchCollectHistory").click(function(){
|
|
|
@@ -99,6 +137,7 @@
|
|
|
// 적립내역 포인트 블루
|
|
|
$("#pntAmt").removeClass("c_primary");
|
|
|
$("#pntAmt").addClass("c_blue");
|
|
|
+ $("#plusMinus").text("증감");
|
|
|
|
|
|
let data = {};
|
|
|
|
|
|
@@ -137,7 +176,6 @@
|
|
|
$("#pointAjaxList").html(tmtbHtml);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// 사용내역 조회
|
|
|
$("#fnSetSearchUsedHistory").click(function(){
|
|
|
// Class제거 추가
|
|
|
@@ -148,6 +186,7 @@
|
|
|
// 사용내역 포인트 블루
|
|
|
$("#pntAmt").removeClass("c_blue");
|
|
|
$("#pntAmt").addClass("c_primary");
|
|
|
+ $("#plusMinus").text("차감");
|
|
|
|
|
|
let data = {};
|
|
|
|
|
|
@@ -172,27 +211,29 @@
|
|
|
function fnUsePointListInfo(result) {
|
|
|
|
|
|
let usePointList = result.usePointList;
|
|
|
-
|
|
|
+ console.log(usePointList);
|
|
|
let tmtbHtml = "";
|
|
|
for(let i=0; i<usePointList.length; i++){
|
|
|
- let point = usePointList[i];
|
|
|
+ let usePoint = usePointList[i];
|
|
|
tmtbHtml +='<tr>';
|
|
|
- tmtbHtml +='<td>'+ usePointList.occurGb + '</td>';
|
|
|
- tmtbHtml += '<td class="t_l pl40">'+ usePointList.occurDtlDesc + '</td>';
|
|
|
- tmtbHtml += '<td class="c_primary">'+ usePointList.pntAmt + '</td>';
|
|
|
- tmtbHtml += '<td>'+ usePointList.pntUploadDt + '</td>';
|
|
|
+ tmtbHtml +='<td>'+ usePoint.occurGb + '</td>';
|
|
|
+ tmtbHtml += '<td class="t_l pl40">'+ usePoint.occurDtlDesc + '</td>';
|
|
|
+ tmtbHtml += '<td class="c_primary">'+ usePoint.pntAmt + '</td>';
|
|
|
+ tmtbHtml += '<td>'+ usePoint.pntUploadDt + '</td>';
|
|
|
tmtbHtml += '</tr>';
|
|
|
}
|
|
|
$("#pointAjaxList").html(tmtbHtml);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
$(document).ready(function() {
|
|
|
// 마이페이지 LNB 설정
|
|
|
fnSetMypageLnbList(5);
|
|
|
|
|
|
// 마이페이지 location 설정
|
|
|
fnSetMypageLocation('STYLE24 포인트', '_PAGE_MYPAGE_POINT');
|
|
|
+
|
|
|
+ // 전체내역
|
|
|
+ $("#fnSetSearchFullHistory").trigger('click');
|
|
|
|
|
|
});
|
|
|
|