<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<!--
 *******************************************************************************
 * @source  : OrderDetailPointHst.html
 * @desc    : 주문상품 상세 마일리지 이력 화면
 *============================================================================
 * STYLE24
 * Copyright(C) 2019 TSIT, All rights reserved.
 *============================================================================
 * VER  DATE         AUTHOR      DESCRIPTION
 * ===  ===========  ==========  =============================================
 * 1.0  2020.12.16   jsh77b       최초 작성
 *******************************************************************************
 -->
<div class="modalPopup" data-width="900">
	<div class="panelStyle">
		<div class="panelTitle">
			<h2>포인트 사용 내역</h2>
			<button type="button" class="close" onclick="uifnPopupClose('popupOrderDetailPointHstForm');"><i class="fa fa-times"></i></button>
		</div>
			
		<div class="panelContent" style="overflow-y:auto;">
			<form id="pointHstFrm">
				<div id="gridOrderPointInfo" style="width:100%; height:260px;" class="ag-theme-balham"></div>
			</form>
		</div>
	</div>
</div>

<!-- data -->
<script th:inline="javascript">
/*<![CDATA[*/
var orderPointHstList = [[${orderPointHstList}]];

// specify the columns
var columnDefsOrderPointInfo = [
		{headerName: "상품코드", 		field: "goodsCd", 		width: 100, cellClass: 'text-center'},
		{headerName: "적립율(PC)", 	field: "pntPrate", 		width: 100, cellClass: 'text-center'},
		{headerName: "적립율(모바일)", 	field: "pntMrate", 		width: 100, cellClass: 'text-center'},
		{
			headerName			: "판매상품가격"
			, field				: "currPrice"
			, width				: 120
			, cellClass			: 'text-center'
			, valueFormatter	: function(params) {
				return params.value.addComma();
			}	
		},
		{
			headerName			: "실결제상품가격"
			, field				: "realOrdAmt"
			, width				: 140
			, cellClass			: 'text-center'
			, valueFormatter	: function(params) {
				return params.value.addComma();
			}	
		},
		{
			headerName			: "사용포인트"
			, field				: "pntAmt"
			, width				: 100
			, cellClass			: 'text-center'
			, valueFormatter	: function(params) {
				return params.value.addComma();
			}	
		},
		{headerName: "사유", 			field: "occurDtlDesc", 	width: 180, cellClass: 'text-center'},
		{
			headerName			: "등록일시"	
			, field				: "regDt"
			, width				: 130
			, cellClass			: 'text-center' 
			, cellRenderer: function(params) {
				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmm").format("YYYY-MM-DD HH:mm") : '';
			}
		}
];

var gridOptionsOrderPointInfo = gagaAgGrid.getGridOptions(columnDefsOrderPointInfo);

$(document).ready(function() {	
	// Create a agGrid
	gagaAgGrid.createGrid('gridOrderPointInfo', gridOptionsOrderPointInfo);
	gridOptionsOrderPointInfo.api.setRowData(orderPointHstList);
	gagaAgGrid.hideStatusBar('gridOrderPointInfo');
});
/*]]>*/

</script>

</html>





