<!DOCTYPE html>
<html lang="ko"
	xmlns:th="http://www.thymeleaf.org">
<!--
 *******************************************************************************
 * @source  : EnvsetHistoryForm.html
 * @desc    : 환경설정이력 팝업 Page
 *============================================================================
 * STYLE24
 * Copyright(C) 2020 TSIT, All rights reserved.
 *============================================================================
 * VER  DATE         AUTHOR      DESCRIPTION
 * ===  ===========  ==========  =============================================
 * 1.0  2020.10.22   gagamel     최초 작성
 *******************************************************************************
 -->
<div class="modalPopup" data-width="1200">
	<div class="panelStyle">
		<!-- TITLE -->
		<div class="panelTitle">
			<strong th:text="${envsetTypeNm + ' 이력'}">쇼핑몰Meat정보 이력</strong>
			<button type="button" class="close" onclick="uifnPopupClose('popupEnvset');"><i class="fa fa-times" aria-hidden="true"></i></button>
		</div>
		<!-- //TITLE -->
		
		<!-- CONTENT -->
		<div class="panelContent">
			<div id="gridEnvsetHistoryList" style="width: 100%; height: 330px;" class="ag-theme-balham"></div>
		</div>
		<!-- //CONTENT -->
	</div>
</div>

<script th:inline="javascript">
/*<![CDATA[*/
	var envsetType = [[${envsetType}]];
	var payUintType = { "1":"일원 단위", "10":"십원 단위", "100":"백원 단위" };
	var pointGiveType = { "A":"승인후지급", "D":"즉시지급" };
	var pointUseType = { "A":"정액", "R":"정율" };

	// 쇼핑몰Meta정보
	var columnDefsB10 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "웹브라우저Title", field: "strSetVal1", width: 200},
		{headerName: "쇼핑몰Title(og:title)", field: "strSetVal2", width: 200},
		{headerName: "쇼핑몰설명(og:description)", field: "strSetVal3", width: 200},
		{headerName: "쇼핑몰이미지(og:image)", field: "strSetVal4", width: 200},
		{headerName: "키워드(Keywords)", field: "strSetVal5", width: 200},
		{headerName: "파비콘이미지", field: "strSetVal6", width: 200},
		{headerName: "등록자", field: "regNm", width: 150, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	// 회원기본설정
	var columnDefsC10 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "탈퇴후재가입불가기간(일)", field: "strSetVal1", width: 180, cellClass: 'text-center'},
		{headerName: "휴면회원선정기간(일)", field: "strSetVal2", width: 150, cellClass: 'text-center'},
		{headerName: "휴면회원전환기간(일)", field: "strSetVal3", width: 150, cellClass: 'text-center'},
		{headerName: "회원등급산정기간(월)", field: "strSetVal4", width: 150, cellClass: 'text-center'},
		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	// 상품노출
	var columnDefsG10 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "상품평노출여부", field: "strSetVal1", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return params.value == 'Y' ? '노출' : '미노출'; }},
		{headerName: "품절상품노출여부", field: "strSetVal2", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return params.value == 'Y' ? '노출' : '미노출'; }},
		{headerName: "특가세일노출기준", field: "strSetVal3", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return params.value + '%'; }},
		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	// 상품보관
	var columnDefsG11 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "장바구니보관기간", field: "strSetVal1", width: 150, cellClass: 'text-center', cellRenderer: function(params) { return params.value + '일'; }},
		{headerName: "장바구니담기최대상품수", field: "strSetVal2", width: 150, cellClass: 'text-center', cellRenderer: function(params) { return params.value + '일'; }},
		{headerName: "위시리스트보관기간", field: "strSetVal3", width: 150, cellClass: 'text-center', cellRenderer: function(params) { return params.value + '일'; }},
		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];
	
	// 주문/결제
	var columnDefsO10 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "결제단위", field: "strSetVal1", width: 150, cellClass: 'text-center', valueFormatter: function (params) { return gagaAgGrid.lookupValue(payUintType, params.value); }},
		{headerName: "최소결제금액(원)", field: "strSetVal2", width: 150, cellClass: 'text-center'},
		{headerName: "무료배송비최소주문금액(원)", field: "strSetVal3", width: 180, cellClass: 'text-center'},
		{headerName: "총알배송주문가능시간", field: "strSetVal4", width: 150, cellClass: 'text-center', cellRenderer: function(params) { return '오전 ' + params.value + '시'; }},
		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	// 품절안내
	var columnDefsO11 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "품절안내방법", field: "strSetVal1", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return params.value == 'A' ? '자동' : '수동'; }},
		{headerName: "품절안내메시지발송기간(일)", field: "strSetVal2", width: 180, cellClass: 'text-center'},
		{headerName: "품절메시지발송기간(일)", field: "strSetVal3", width: 180, cellClass: 'text-center'},
		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	// 배송/구매확정
	var columnDefsD10 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "배송완료자동처리기간(일)", field: "strSetVal1", width: 180, cellClass: 'text-center'},
		{headerName: "구매확정자동처리기간(일)", field: "strSetVal2", width: 180, cellClass: 'text-center'},
		{headerName: "반품가능기간(일)", field: "strSetVal3", width: 150, cellClass: 'text-center'},
		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

// 	// 회원쿠폰
// 	var columnDefsC11 = [
// 		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
// 		{headerName: "가입축하쿠폰", field: "strSetVal1", width: 150, cellClass: 'text-center'},
// 		{headerName: "앱푸쉬수신동의쿠폰", field: "strSetVal2", width: 150, cellClass: 'text-center'},
// 		{headerName: "생일축하쿠폰", field: "strSetVal2", width: 150, cellClass: 'text-center'},
// 		{headerName: "생일쿠폰발급도래시점", field: "strSetVal1", width: 150, cellClass: 'text-center'},
// 		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
// 		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
// 	];

	// 포인트소멸
	var columnDefsC12 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "구매포인트소멸기한(일)", field: "strSetVal1", width: 200, cellClass: 'text-center', cellRenderer: function(params) { return params.value + '일'; }},
		{headerName: "상품평포인트소멸기한(일)", field: "strSetVal2", width: 200, cellClass: 'text-center', cellRenderer: function(params) { return params.value + '일'; }},
		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

// 	// 회원포인트
// 	var columnDefsC13 = [
// 		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
// 		{headerName: "가입축하기본포인트", field: "strSetVal1", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); }},
// 		{headerName: "가입축하추가포인트", field: "strSetVal6", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); }},
// 		{headerName: "생일축하포인트", field: "strSetVal2", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); }},
// 		{headerName: "앱설치후최초로그인포인트", field: "strSetVal3", width: 200, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); }},
// 		{headerName: "출석체크1일포인트", field: "strSetVal4", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); }},
// 		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
// 		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
// 	];

	// 구매포인트
	var columnDefsC14 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{
			headerName: "자사상품포인트적립율(%)",
			children : [
				{headerName: "정상(PC)", field: "strSetVal1", width: 100, cellClass: 'text-center'},
				{headerName: "정상(모바일)", field: "strSetVal2", width: 100, cellClass: 'text-center'},
				{headerName: "이월(PC)", field: "strSetVal3", width: 100, cellClass: 'text-center'},
				{headerName: "이월(모바일)", field: "strSetVal4", width: 100, cellClass: 'text-center'}
			]
		},
		{
			headerName: "입점상품포인트적립율(%)",
			children : [
				{headerName: "정상(PC)", field: "strSetVal5", width: 100, cellClass: 'text-center'},
				{headerName: "정상(모바일)", field: "strSetVal6", width: 100, cellClass: 'text-center'},
				{headerName: "이월(PC)", field: "strSetVal7", width: 100, cellClass: 'text-center'},
				{headerName: "이월(모바일)", field: "strSetVal8", width: 100, cellClass: 'text-center'}
			]
		},
		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	// 상품평포인트
	var columnDefsC15 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "상품평등록가능기간", field: "strSetVal1", width: 180, cellClass: 'text-center', cellRenderer: function(params) { return params.value + '일'; }},
		{headerName: "텍스트/포토상품평 포인트지급방법", field: "strSetVal2", width: 250, cellClass: 'text-center', valueFormatter: function (params) { return gagaAgGrid.lookupValue(pointGiveType, params.value); }},
		{headerName: "텍스트상품평포인트", field: "strSetVal3", width: 150, cellClass: 'text-center'},
		{headerName: "포토상품평포인트", field: "strSetVal4", width: 150, cellClass: 'text-center'},
		{headerName: "베스트상품평포인트", field: "strSetVal5", width: 150, cellClass: 'text-center'},
		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

// 	// 클레임포인트
// 	var columnDefsP13 = [
// 		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
// 		{headerName: "배송지연보상기준일수", field: "strSetVal1", width: 150, cellClass: 'text-center'},
// 		{headerName: "배송지연보상포인트", field: "strSetVal2", width: 150, cellClass: 'text-center'},
// 		{headerName: "품절보상기준일수", field: "strSetVal3", width: 150, cellClass: 'text-center'},
// 		{headerName: "품절보상포인트", field: "strSetVal4", width: 150, cellClass: 'text-center'},
// 		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
// 		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
// 	];

// 	// 가용포인트전환
// 	var columnDefsP20 = [
// 		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
// 		{headerName: "가용포인트전환대기일수", field: "strSetVal1", width: 150, cellClass: 'text-center'},
// 		{headerName: "가용포인트추가적립율", field: "strSetVal2", width: 150, cellClass: 'text-center'},
// 		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
// 		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
// 	];

	// 포인트사용
	var columnDefsC17 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "포인트사용기준(원)", field: "strSetVal1", width: 200, cellClass: 'text-center'},
		{headerName: "최대사용가능포인트율(%)", field: "strSetVal2", width: 200, cellClass: 'text-center'},
		{headerName: "최대즉시사용포인트율(%)", field: "strSetVal3", width: 200, cellClass: 'text-center'},
		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	// 모바일앱
	var columnDefsM10 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "AOS버전", field: "strSetVal1", width: 100, cellClass: 'text-center'},
		{headerName: "IOS버전", field: "strSetVal2", width: 100, cellClass: 'text-center'},
		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	var columnDefsG12 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "미로그인 시작일(일)", field: "strSetVal1", width: 150, cellClass: 'text-center', cellRenderer: function(params) { return params.value + '일'; }},
		{headerName: "미로그인 종료일(일)", field: "strSetVal2", width: 150, cellClass: 'text-center', cellRenderer: function(params) { return params.value + '일'; }},
		{headerName: "혜택쿠폰", field: "strSetVal3", width: 150, cellClass: 'text-center', cellRenderer: function(params) { return params.value; }},
		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	var columnDefsG13 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "미로그인 시작일(일)", field: "strSetVal1", width: 150, cellClass: 'text-center', cellRenderer: function(params) { return params.value + '일'; }},
		{headerName: "미로그인 종료일(일)", field: "strSetVal2", width: 150, cellClass: 'text-center', cellRenderer: function(params) { return params.value + '일'; }},
		{headerName: "혜택쿠폰", field: "strSetVal3", width: 150, cellClass: 'text-center', cellRenderer: function(params) { return params.value; }},
		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	var columnDefsG14 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "미로그인 시작일(일)", field: "strSetVal1", width: 150, cellClass: 'text-center', cellRenderer: function(params) { return params.value + '일'; }},
		{headerName: "미로그인 종료일(일)", field: "strSetVal2", width: 150, cellClass: 'text-center', cellRenderer: function(params) { return params.value + '일'; }},
		{headerName: "혜택쿠폰", field: "strSetVal3", width: 150, cellClass: 'text-center', cellRenderer: function(params) { return params.value; }},
		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	// Get GridOptions
	var gridOptions = gagaAgGrid.getGridOptions(eval('columnDefs' + envsetType));

	$(document).ready(function() {
		// Create a agGrid
		gagaAgGrid.createGrid('gridEnvsetHistoryList', gridOptions);

		var actionUrl = '/envset/history/' + [[${siteCd}]] + '/' + envsetType;

		// Fetch data
		gagaAgGrid.fetch(actionUrl, gridOptions);
	});
/*]]>*/
</script>

</html>
