<!DOCTYPE html>
<html lang="ko"
	xmlns:th="http://www.thymeleaf.org">
<!--
 *******************************************************************************
 * @source  : CouponCreatePopupForm.html
 * @desc    : 쿠폰 등록 팝업 화면
 *============================================================================
 * ISTYLE24
 * Copyright(C) 2020 TSIT, All rights reserved.
 *============================================================================
 * VER  DATE         AUTHOR      DESCRIPTION
 * ===  ===========  ==========  =============================================
 * 1.0  2020.12.23   xyzp1539       최초 작성
 *******************************************************************************
 -->	
	<div class="modalPopup"  data-width="1250" data-height="750">
		<div class="panelStyle">
			<div class="panelTitle">
				<h2>쿠폰등록</h2>
				<button type="button" class="close" onclick="uifnPopupClose('CouponCreatePopup')"><i class="fa fa-times"></i></button>
			</div>
			<form id="couponCreateForm" name="couponCreateForm">
			<div class="panelContent">
				<table class="frmStyle">
					<colgroup>
						<col style="width:10%">
						<col style="width:40%;">
						<col style="width:10%">
						<col style="width:40%;">
					</colgroup>
					<tr>
						<th>쿠폰번호<em class="required" title="필수"></em></th>
						<td colspan="5">
							<input type="hidden" name="copyCpnId" maxlength="50" value="">
							<input type="hidden" name="mode" maxlength="50" value="">
							<input type="text" name="cpnId" maxlength="50" value="" style="width:70%;" disabled="" placeholder="자동생성">
							<label class="chkBox">
								<input type="checkbox" name="cpnCreateType" onchange="fnCreateCpnNoOnChange(this);" value="true" class="type-check" checked="">쿠폰번호 자동생성
							</label>
						</td>
					</tr>
					<tr>
						<th>쿠폰명<em class="required" title="필수"></em></th>
						<td colspan="5">
							<input type="text" name="cpnNm" id="cpnNm" style="width: 70%;">
						</td>
					</tr>
					<tr>
						<th>쿠폰유형<em class="required" title="필수"></em></th>
						<td colspan="5">
							<label class="rdoBtn" th:if="${cpnTypeList}" th:each="oneData, status : ${cpnTypeList}"> <input type="radio" name="cpnType"  th:text="${oneData.cdNm}" th:value="${oneData.cd}"/></label>
						</td>
					</tr>
					<tr>
						<th>사용가능고객구분<em class="required" title="필수"></em></th>
						<td>
							<select name="usableCustGb" id="usableCustGb">
								<option th:if="${usableCustGbList}" th:each="oneData , status : ${usableCustGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
							</select>
						</td>
						<th>사이트<em class="required" title="필수"></em></th>
						<td>
							<select name="siteCd" id="siteCd">
								<option th:if="${siteCdList}" th:each="oneData , status : ${siteCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
							</select>
						</td>
					</tr>
					<tr>
						<th>사용고객등급구분<em class="required" title="필수"></em></th>
						<td>
							<select name="usableCustGradeList" id="usableCustGradeList">
								<option value="">[전체]</option>
								<option th:if="${usableCustGradeList}" th:each="oneData , status : ${usableCustGradeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
							</select>
						</td>
					</tr>
					<tr>
						<th>할인방식<em class="required" title="필수"></em></th>
						<td>
							<label class="rdoBtn" th:if="${dcWayList}" th:each="oneData, status : ${dcWayList}"> <input type="radio" name="dcWay"  th:text="${oneData.cdNm}" th:value="${oneData.cd}"/></label>
						</td>
						<th>할인값(PC)<em class="required" title="필수"></em></th>
						<td>
							<input type="text" class="w200" id="dcPval" name="dcPval" value="0" style="text-align: right"><span id="dcPvalSpan">원</span>
						</td>
					</tr>
					<tr>
						<th>할인값(모바일)<em class="required" title="필수"></em></th>
						<td>
							<input type="text" class="w200" id="dcMval" name="dcMval" value="0" style="text-align: right"><span id="dcMvalSpan">원</span>
						</td>
						<th>최대할인금액<em class="required" title="필수"></em></th>
						<td>
							<input type="text" class="w200" id="maxDcAmt" name="maxDcAmt" value="0"><span id="maxDcAmtSpan">원</span>
						</td>
					</tr>
					<tr>
						<th>다운로드시작일시<em class="required" title="필수"></em></th>
						<td>
							<input type="text" class="schDate w100" name="downStdt" maxlength="10"/>
							<select name="downStHH" id="downStHH">
								<option th:if="${hhList}" th:each="oneData , status : ${hhList}" th:text="${oneData.cdNm}" th:value="${oneData.cd}"></option>
							</select>
							<select name="downStMM" id="downStMM">
								<option th:if="${mmList}" th:each="oneData , status : ${mmList}" th:text="${oneData.cdNm}" th:value="${oneData.cd}"></option>
							</select>
						<th>다운로드종료일시<em class="required" title="필수"></em></th>
						<td>
							<input type="text" class="schDate w100" name="downEddt" maxlength="10"/>
							<select name="downEdHH" id="downEdHH">
								<option th:if="${hhList}" th:each="oneData , status : ${hhList}" th:text="${oneData.cdNm}" th:value="${oneData.cd}"></option>
							</select>
							<select name="downEdMM" id="downEdMM">
								<option th:if="${mmList}" th:each="oneData , status : ${mmList}" th:text="${oneData.cdNm}" th:value="${oneData.cd}"></option>
							</select>
						</td>
					</tr>
					<tr>
						<th>기간/일수구분<em class="required" title="필수"></em></th>
						<td>
							<select name="pdGbList" id="pdGbList">
								<option value="">[전체]</option>
								<option value="P">기간</option>
								<option value="D">일수</option>
							</select>
						</td>
						<th>적용범위<em class="required" title="필수"></em></th>
						<td>
							<label class="rdoBtn"> <input type="radio" name="appliyScope" value="A"/>전체</label>
							<label class="rdoBtn"> <input type="radio" name="appliyScope" value="I"/>개별</label>
						</td>
					</tr>
					<tr>
						<th>유효기간시작일시<em class="required" title="필수"></em></th>
						<td>
							<input type="text" class="schDate w100" name="applyStdt" maxlength="10"/>
							<select name="applyStHH" id="applyStHH">
								<option th:if="${hhList}" th:each="oneData , status : ${hhList}" th:text="${oneData.cdNm}" th:value="${oneData.cd}"></option>
							</select>
							<select name="applyStMM" id="applyStMM">
								<option th:if="${mmList}" th:each="oneData , status : ${mmList}" th:text="${oneData.cdNm}" th:value="${oneData.cd}"></option>
							</select>
						<th>유효기간종료일시<em class="required" title="필수"></em></th>
						<td>
							<input type="text" class="schDate w100" name="applyEddt" maxlength="10"/>
							<select name="applyEdHH" id="applyEdHH">
								<option th:if="${hhList}" th:each="oneData , status : ${hhList}" th:text="${oneData.cdNm}" th:value="${oneData.cd}"></option>
							</select>
							<select name="applyEdMM" id="applyEdMM">
								<option th:if="${mmList}" th:each="oneData , status : ${mmList}" th:text="${oneData.cdNm}" th:value="${oneData.cd}"></option>
							</select>
						</td>
					</tr>
					<tr>
						<th>총발행제한수량<em class="required" title="필수"></em></th>
						<td>
							<input type="text" class="w200" name="totPubLimitQty" id="totPubLimitQty" value="0" style="text-align: right;">개
						</td>
						<th>1인당발행제한수량<em class="required" title="필수"></em></th>
						<td>
							<input type="text" class="w200" name="custPubLimitQty" id="custPubLimitQty" value="0" style="text-align: right;">개
						</td>
					</tr>
					<tr>
						<th>최소주문금액<em class="required" title="필수"></em></th>
						<td><input type="text" class="w200" name="minBuyAmt" id="minBuyAmt" value="0" style="text-align: right;"></td>원
						<th>1회발행수량<em class="required" title="필수"></em></th>
						<td><input type="text" class="w200" name="onePubQty" id="onePubQty" value="1" style="text-align: right;"></td>개
					</tr>
					<tr>
						<th>재발급여부<em class="required" title="필수"></em></th>
						<td>
							<select name="reissuanceList" id="reissuanceList">
								<option th:if="${reissuanceList}" th:each="oneData , status : ${reissuanceList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
							</select>
						</td>
						<th>다운로드구분<em class="required" title="필수"></em></th>
						<td>
							<select name="dnGbList" id="dnGbList">
								<option th:if="${dnGbList}" th:each="oneData , status:${dnGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
							</select>
						</td>
					</tr>
				</table>
			</div>
			<ul class="panelBar">
				<li class="right">
					<button type="button" class="btn btn-info btn-lg" onclick="fnCouponCreate();">등록</button>
				</li>
			</ul>
			</form>
		</div>
	</div>
<script th:inline="javascript">
/*<![CDATA[*/

	$(document).ready(function(){

	});

	// 쿠폰 등록 버튼 클릭시
	function fnCouponCreate(){
		alert("쿠폰 등록 ");
		if(!checkVelidation()) {
			return;
		}
	}

	// 쿠폰등록 유효성 체크
	function checkVelidation(){
		alert("벨리데이션 체크");
		if()

	}


/*]]>*/
</script>
</html>