<!DOCTYPE html>
<html lang="ko"
	xmlns:th="http://www.thymeleaf.org">
<!--
 *******************************************************************************
 * @source  : DeliveryDetailItemForm.html
 * @desc    : 주문상세 단품 화면
 *============================================================================
 * ISTYLE24
 * Copyright(C) 2021 TSIT, All rights reserved.
 *============================================================================
 * VER  DATE         AUTHOR      DESCRIPTION
 * ===  ===========  ==========  =============================================
 * 1.0  2021.03.05   moon       최초 작성
 *******************************************************************************
 -->


<div class="modalPopup" data-width="750" >
	<div class="panelStyle">
		<div class="panelTitle">
			<h2>세트구성 상품정보</h2>
			<button type="button" class="close" onclick="uifnPopupClose('popupDeliveryDetailItemForm')"><i class="fa fa-times"></i></button>
		</div>
				
		<div class="panelContent" style="overflow-y:auto;">
			<form id="DeliveryDetailItemFrm">
				<div id="gridDelvDetailItemInfo" style="width:100%; height: 260px;" class="ag-theme-balham"></div>
			</form>
		</div>
	</div>
</div>

<script th:inline="javascript">
/*<![CDATA[*/

var delvDetailItemList = [[${delvDetailItemList}]];

	// specify the columns
	var columnDefsDelvDetailItemInfo = [
			{headerName: "상품코드",	field: "itemCd", 	width: 100, cellClass: 'text-center'},
			{headerName: "상품명", 	field: "goodsNm", 	width: 200, cellClass: 'text-left'},
			{headerName: "색상",  	field: "optCd1", 	width: 80, cellClass: 'text-center'},
			{headerName: "사이즈", 	field: "optCd2", 	width: 70, cellClass: 'text-center'},
			{headerName: "수량",  	field: "itemQty", 	width: 45, cellClass: 'text-center'},
			{headerName: "단가", 		field: "itemPrice", width: 70, cellClass: 'text-right',
				cellRenderer: function (params) {
					return params.value.addComma();
				}
			},
			{headerName: "현재고",  	field: "currStockQty", 	width: 70, cellClass: 'text-right'},
			{headerName: "안전재고",  	field: "baseStockQty", 	width: 70, cellClass: 'text-right'}
	];

	$(document).ready(function() {
		// Get GridOptions
		var gridDelvDetailItemInfo = gagaAgGrid.getGridOptions(columnDefsDelvDetailItemInfo);
		gagaAgGrid.createGrid('gridDelvDetailItemInfo', gridDelvDetailItemInfo);
		gridDelvDetailItemInfo.api.setRowData(delvDetailItemList);
		$('.ag-status-bar').hide();
	});
/*]]>*/
</script>

</html>
