<!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="800">
	<div class="panelStyle">
		<div class="giftcardTitle">
			<h2>다다익선 적용 내역</h2>
			<button type="button" class="close" onclick="uifnPopupClose('popupOrderDetailTmtbHstForm');"><i class="fa fa-times"></i></button>
		</div>
			
		<div class="panelContent" style="overflow-y:auto;">
			<form id="pointHstFrm">
				<div id="gridOrderTmtbInfo" style="width:100%; height:260px;" class="ag-theme-balham"></div>
			</form>
		</div>
	</div>
</div>

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

// specify the columns
var columnDefsOrderGiftcardInfo = [
		{headerName: "다다익선번호"	, field: "tmtbSq", 		width: 100, cellClass: 'text-center'},
		{headerName: "다다익선명"	, field: "tmtbNm", 		width: 180, cellClass: 'text-center'},
		{
			headerName			: "할인금액"
			, field				: "tmtbDcAmt"
			, width				: 120
			, cellClass			: 'text-center'
			, valueFormatter	: function(params) {
				return params.value.addComma();
			}	
		},
		{headerName: "주문상세", 		field: "ordDtlNo",	width: 120, cellClass: 'text-center'},
		{headerName: "상품코드", 		field: "goodsCd",	width: 120, 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 gridOptionsOrderTmtbInfo = gagaAgGrid.getGridOptions(columnDefsOrderGiftcardInfo);

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

</script>
</html>





