|
|
@@ -42,7 +42,7 @@
|
|
|
<li><a href="javascript:void(0);" id="fnSetSearchUsedHistory">사용내역</a></li>
|
|
|
</ul>
|
|
|
<div class="form_field">
|
|
|
- <select id="mounth">
|
|
|
+ <select id="mounth" name="searchDt">
|
|
|
<option value="hide">2020년 10월</option>
|
|
|
<option value="Test_SELECT_OPTION_1" rel="icon-temperature">2020년 9월</option>
|
|
|
<option value="Test_SELECT_OPTION_2">2020년 8월</option>
|
|
|
@@ -68,13 +68,7 @@
|
|
|
<th>일자</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
- <tbody>
|
|
|
- <tr id="pointAjaxList" >
|
|
|
- <td id="occurGb">구매사유</td>
|
|
|
- <td class="t_l pl40" id="occurDtlDesc">남성 라그란 소매배색 싸이로 티셔츠</td>
|
|
|
- <td class="c_blue" id="pntAmt">150P</td>
|
|
|
- <td id="pntUploadDt">2020.10.06 22:50:14</td>
|
|
|
- </tr>
|
|
|
+ <tbody id="pointAjaxList">
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
@@ -83,9 +77,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<script th:inline="javascript">
|
|
|
- let accumulatePointList = [[${accumulatePointList}]];
|
|
|
-
|
|
|
- console.log(accumulatePointList);
|
|
|
// 전체내역 조회
|
|
|
$("#fnSetSearchFullHistory").click(function(){
|
|
|
// Class제거 추가
|
|
|
@@ -97,6 +88,7 @@
|
|
|
|
|
|
});
|
|
|
|
|
|
+
|
|
|
// 적립내역 조회
|
|
|
$("#fnSetSearchCollectHistory").click(function(){
|
|
|
// Class제거 추가
|
|
|
@@ -107,19 +99,45 @@
|
|
|
// 적립내역 포인트 블루
|
|
|
$("#pntAmt").removeClass("c_primary");
|
|
|
$("#pntAmt").addClass("c_blue");
|
|
|
-
|
|
|
+
|
|
|
+ let data = {};
|
|
|
+
|
|
|
+ data.searchDt = $('select[name=searchDt]').val();
|
|
|
+
|
|
|
+ let jsonData = JSON.stringify(data);
|
|
|
+
|
|
|
$.ajax(
|
|
|
{
|
|
|
type : "POST",
|
|
|
- url : '',
|
|
|
- dataType : 'html',
|
|
|
+ data : jsonData,
|
|
|
+ url : '/mypage/point/list',
|
|
|
+ contentType: 'application/json',
|
|
|
+ dataType : 'json',
|
|
|
success : function(result){
|
|
|
- $("#pointAjaxList").html(result);
|
|
|
+ fnPointCollectListInfo(result);
|
|
|
}
|
|
|
}
|
|
|
)
|
|
|
});
|
|
|
|
|
|
+ function fnPointCollectListInfo(result) {
|
|
|
+
|
|
|
+ let pointList = result.accumulatePointList;
|
|
|
+
|
|
|
+ let tmtbHtml = "";
|
|
|
+ for(let i=0; i<pointList.length; i++){
|
|
|
+ let point = pointList[i];
|
|
|
+ tmtbHtml +='<tr>';
|
|
|
+ tmtbHtml +='<td>'+ point.occurGb + '</td>';
|
|
|
+ tmtbHtml += '<td class="t_l pl40">'+ point.occurDtlDesc + '</td>';
|
|
|
+ tmtbHtml += '<td class="c_blue">'+ point.pntAmt + '</td>';
|
|
|
+ tmtbHtml += '<td>'+ point.pntUploadDt + '</td>';
|
|
|
+ tmtbHtml += '</tr>';
|
|
|
+ }
|
|
|
+ $("#pointAjaxList").html(tmtbHtml);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
// 사용내역 조회
|
|
|
$("#fnSetSearchUsedHistory").click(function(){
|
|
|
// Class제거 추가
|
|
|
@@ -130,15 +148,52 @@
|
|
|
// 사용내역 포인트 블루
|
|
|
$("#pntAmt").removeClass("c_blue");
|
|
|
$("#pntAmt").addClass("c_primary");
|
|
|
+
|
|
|
+ let data = {};
|
|
|
+
|
|
|
+ data.searchDt = $('select[name=searchDt]').val();
|
|
|
+
|
|
|
+ let jsonData = JSON.stringify(data);
|
|
|
+
|
|
|
+ $.ajax(
|
|
|
+ {
|
|
|
+ type : "POST",
|
|
|
+ data : jsonData,
|
|
|
+ url : '/mypage/usepoint/list',
|
|
|
+ contentType: 'application/json',
|
|
|
+ dataType : 'json',
|
|
|
+ success : function(result){
|
|
|
+ fnUsePointListInfo(result);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
});
|
|
|
|
|
|
+ function fnUsePointListInfo(result) {
|
|
|
+
|
|
|
+ let usePointList = result.usePointList;
|
|
|
+
|
|
|
+ let tmtbHtml = "";
|
|
|
+ for(let i=0; i<usePointList.length; i++){
|
|
|
+ let point = 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 += '</tr>';
|
|
|
+ }
|
|
|
+ $("#pointAjaxList").html(tmtbHtml);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
$(document).ready(function() {
|
|
|
// 마이페이지 LNB 설정
|
|
|
fnSetMypageLnbList(5);
|
|
|
|
|
|
// 마이페이지 location 설정
|
|
|
fnSetMypageLocation('STYLE24 포인트', '_PAGE_MYPAGE_POINT');
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
|
|
|
</script>
|