<!DOCTYPE html>
<html lang="ko"
	xmlns:th="http://www.thymeleaf.org">
<!--
 *******************************************************************************
 * @source  : EnvsetHistoryForm.html
 * @desc    : 환경설정이력 팝업 Page
 *============================================================================
 * Wivismall
 * Copyright(C) 2019 TSIT, All rights reserved.
 *============================================================================
 * VER  DATE         AUTHOR      DESCRIPTION
 * ===  ===========  ==========  =============================================
 * 1.0  2020.03.16   gagamel     최초 작성
 *******************************************************************************
 -->
<ul class="popup modal" data-width="1200">
	<li class="mdPopTitle">
		<strong th:text="${envsetTypeNm + ' 이력'}">쇼핑몰Meat정보 이력</strong>
		<button type="button" class="close" onclick="uifnPopClose('popupEnvset');"><i class="fa fa-times" aria-hidden="true"></i></button>
	</li>

	<li class="mdPopContent">
		<div class="panelContent" style="overflow: hidden;">
			<div id="gridEnvsetHistoryList" style="width: 100%; height: 330px;" class="ag-theme-balham"></div>
		</div>
	</li>
</ul>

<script th:inline="javascript">
/*<![CDATA[*/
	var envsetType = [[${envsetType}]];
	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: "등록자ID", field: "regId", width: 150, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	// 기본설정
	var columnDefsB11 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "탈퇴후재가입불가기간(월)", field: "numSetVal1", width: 150, cellClass: 'text-center'},
		{headerName: "휴면회원선정기간(일)", field: "numSetVal2", width: 150, cellClass: 'text-center'},
		{headerName: "휴면회원전환기간(일)", field: "numSetVal3", width: 150, cellClass: 'text-center'},
		{headerName: "회원등급산정기간(월)", field: "numSetVal4", width: 150, cellClass: 'text-center'},
		{headerName: "무료배송비최소주문금액", field: "numSetVal5", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value);}},
		{headerName: "등록자ID", field: "regId", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	// 회원혜택안내
	var columnDefsB12 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "가입혜택안내배너(A)", field: "strSetVal1", width: 180},
		{headerName: "가입혜택안내배너(B)", field: "strSetVal2", width: 180},
		{headerName: "회원혜택안내배너", field: "strSetVal3", width: 180},
		{headerName: "상품평혜택안내배너(상품상세)", field: "strSetVal4", width: 210},
		{headerName: "상품평혜택안내배너(마이페이지)", field: "strSetVal5", width: 210},
		{headerName: "등록자ID", field: "regId", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	// 상품노출
	var columnDefsB13 = [
		{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: "numSetVal1", width: 150, cellClass: 'text-center'},
		{headerName: "등록자ID", field: "regId", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	// 상품보관
	var columnDefsB17 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "장바구니보관기간", field: "numSetVal1", width: 150, cellClass: 'text-center'},
		{headerName: "위시리스트보관기간", field: "numSetVal2", width: 150, cellClass: 'text-center'},
		{headerName: "등록자ID", field: "regId", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	// 품절안내
	var columnDefsB14 = [
		{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: "numSetVal1", width: 150, cellClass: 'text-center'},
		{headerName: "등록자ID", field: "regId", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	// 배송/구매확정
	var columnDefsB15 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "배송완료처리기간", field: "numSetVal1", width: 150, cellClass: 'text-center'},
		{headerName: "구매확정처리기간", field: "numSetVal2", width: 150, cellClass: 'text-center'},
		{headerName: "등록자ID", field: "regId", width: 100, 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: 150, cellClass: 'text-center'},
		{headerName: "앱푸쉬수신동의쿠폰", field: "strSetVal2", width: 150, cellClass: 'text-center'},
		{headerName: "생일축하쿠폰", field: "strSetVal2", width: 150, cellClass: 'text-center'},
		{headerName: "생일쿠폰발급도래시점", field: "numSetVal1", width: 150, cellClass: 'text-center'},
		{headerName: "등록자ID", field: "regId", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

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

	// 구매포인트
	var columnDefsP11 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "자사상품정상포인트(PC)", field: "numSetVal1", width: 150, cellClass: 'text-center'},
		{headerName: "자사상품정상포인트(모바일)", field: "numSetVal2", width: 150, cellClass: 'text-center'},
		{headerName: "자사상품이월포인트(PC)", field: "numSetVal3", width: 150, cellClass: 'text-center'},
		{headerName: "자사상품이월포인트(모바일)", field: "numSetVal4", width: 150, cellClass: 'text-center'},
		{headerName: "입점상품정상포인트(PC)", field: "numSetVal5", width: 150, cellClass: 'text-center'},
		{headerName: "입점상품정상포인트(모바일)", field: "numSetVal6", width: 150, cellClass: 'text-center'},
		{headerName: "입점상품이월포인트(PC)", field: "numSetVal7", width: 150, cellClass: 'text-center'},
		{headerName: "입점상품이월포인트(모바일)", field: "numSetVal8", width: 150, cellClass: 'text-center'},
		{headerName: "등록자ID", field: "regId", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	// 상품평포인트
	var columnDefsP12 = [
		{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(pointGiveType, params.value); }
		},
		{headerName: "텍스트상품평포인트", field: "numSetVal1", width: 150, cellClass: 'text-center'},
		{headerName: "포토상품평포인트", field: "numSetVal2", width: 150, cellClass: 'text-center'},
		{headerName: "최초텍스트상품평배율", field: "numSetVal3", width: 150, cellClass: 'text-center'},
		{headerName: "최초포토상품평포인트배율", field: "numSetVal4", width: 150, cellClass: 'text-center'},
		{headerName: "등록자ID", field: "regId", 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: "numSetVal1", width: 150, cellClass: 'text-center'},
		{headerName: "배송지연보상포인트", field: "numSetVal2", width: 150, cellClass: 'text-center'},
		{headerName: "품절보상기준일수", field: "numSetVal3", width: 150, cellClass: 'text-center'},
		{headerName: "품절보상포인트", field: "numSetVal4", width: 150, cellClass: 'text-center'},
		{headerName: "등록자ID", field: "regId", 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: "numSetVal1", width: 150, cellClass: 'text-center'},
		{headerName: "가용포인트추가적립율", field: "numSetVal2", width: 150, cellClass: 'text-center'},
		{headerName: "등록자ID", field: "regId", width: 100, cellClass: 'text-center'},
		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toDateTimeFormat(params.value); }}
	];

	// 포인트사용
	var columnDefsP30 = [
		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
		{headerName: "사용방법", field: "strSetVal1", width: 80, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.lookupValue(pointUseType, params.value); }},
		{
			headerName: "사용단위", field: "strSetVal2", width: 100, cellClass: 'text-center',
			cellRenderer: function (params) {
				var value = '';
				if (params.value == '10') { value = '일원'; }
				else if (params.value == '100') { value = '십원'; }
				else if (params.value == '1000') { value = '백원'; }
				return value + '단위절사';
			}
		},
		{headerName: "사용가능보유포인트금액", field: "numSetVal1", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); }},
		{headerName: "사용가능최소포인트금액", field: "numSetVal2", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); }},
		{headerName: "사용가능최대포인트율", field: "numSetVal3", width: 150, cellClass: 'text-center'},
		{headerName: "즉시사용최대포인트금액", field: "numSetVal5", width: 150, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); }},
		{headerName: "최소주문제한금액", field: "numSetVal4", width: 120, cellClass: 'text-center', cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); }},
		{headerName: "등록자ID", field: "regId", 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: "등록자ID", field: "regId", 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 = '/system/envset/history/' + [[${siteCd}]] + '/' + envsetType;

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

</html>
