|
|
@@ -46,9 +46,9 @@
|
|
|
<table class="frmStyle">
|
|
|
<colgroup>
|
|
|
<col style="width:10%">
|
|
|
- <col style="width:40%;">
|
|
|
+ <col style="width:45%;">
|
|
|
<col style="width:10%">
|
|
|
- <col style="width:40%;">
|
|
|
+ <col style="width:35%;">
|
|
|
</colgroup>
|
|
|
<tbody>
|
|
|
<tr th:if="${cpnDetail}">
|
|
|
@@ -94,9 +94,12 @@
|
|
|
<tr>
|
|
|
<th>사용가능고객구분<em class="required" title="필수"></em></th>
|
|
|
<td>
|
|
|
- <select name="usableCustGb" id="usableCustGb" required="required" data-valid-name="사용가능고객구분">
|
|
|
+ <!--<select name="usableCustGb" id="usableCustGb" required="required" data-valid-name="사용가능고객구분">
|
|
|
<option th:if="${usableCustGbList}" th:each="oneData , status : ${usableCustGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
- </select>
|
|
|
+ </select>-->
|
|
|
+ <input type="hidden" name="usableCustGb"/>
|
|
|
+ <label class="chkBox"><input type="checkbox" name="chkUsableCustGb" id="chkUsableCustGb10" value="G100_10">일반회원</label>
|
|
|
+ <label class="chkBox"><input type="checkbox" name="chkUsableCustGb" id="chkUsableCustGb20" value="G100_20">임직원</label>
|
|
|
</td>
|
|
|
<th>사이트<em class="required" title="필수"></em></th>
|
|
|
<td>
|
|
|
@@ -108,10 +111,16 @@
|
|
|
<tr>
|
|
|
<th>사용고객등급구분<em class="required" title="필수"></em></th>
|
|
|
<td>
|
|
|
- <select name="usableCustGrade" id="usableCustGrade" required="required" data-valid-name="사용고객등급구분">
|
|
|
+ <!--<select name="usableCustGrade" id="usableCustGrade" required="required" data-valid-name="사용고객등급구분">
|
|
|
<option value="ALL">[전체]</option>
|
|
|
<option th:if="${usableCustGradeList}" th:each="oneData , status : ${usableCustGradeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
- </select>
|
|
|
+ </select>-->
|
|
|
+ <input type="hidden" name="usableCustGrade"/>
|
|
|
+ <label class="chkBox"><input type="checkbox" name="chkUsableCustGrade" id="chkUsableCustGrade10" value="G110_10">VIP</label>
|
|
|
+ <label class="chkBox"><input type="checkbox" name="chkUsableCustGrade" id="chkUsableCustGrade20" value="G110_20">GOLD</label>
|
|
|
+ <label class="chkBox"><input type="checkbox" name="chkUsableCustGrade" id="chkUsableCustGrade30" value="G110_30">SILVER</label>
|
|
|
+ <label class="chkBox"><input type="checkbox" name="chkUsableCustGrade" id="chkUsableCustGrade40" value="G110_40">BRONZE</label>
|
|
|
+ <label class="chkBox"><input type="checkbox" name="chkUsableCustGrade" id="chkUsableCustGrade50" value="G110_50">WELCOME</label>
|
|
|
</td>
|
|
|
<th>만료알림여부<em class="required" title="필수"></em></th>
|
|
|
<td>
|
|
|
@@ -223,7 +232,7 @@
|
|
|
<tr class="firstBuyTr">
|
|
|
<th>첫구매여부<em class="required" title="필수"></em></th>
|
|
|
<td>
|
|
|
- <select name="firstYn" id="firstYn" onchange="firstYnChange(this)" required="required" data-valid-name="첫구매여부">
|
|
|
+ <select name="firstOrdYn" id="firstOrdYn" onchange="firstOrdYnChange(this)" required="required" data-valid-name="첫구매여부">
|
|
|
<option value="Y">Y</option>
|
|
|
<option value="N" selected="selected">N</option>
|
|
|
</select>
|
|
|
@@ -255,7 +264,7 @@
|
|
|
<tr class="custJoinTr">
|
|
|
<th>신규회원여부<em class="required" title="필수"></em></th>
|
|
|
<td>
|
|
|
- <select name="custJoinYn" id="custJoinYn" onchange="custJoinYnChange(this)" required="required" data-valid-name="신규회원여부">
|
|
|
+ <select name="newCustYn" id="newCustYn" onchange="newCustYnChange(this)" required="required" data-valid-name="신규회원여부">
|
|
|
<option value="Y">Y</option>
|
|
|
<option value="N" selected="selected">N</option>
|
|
|
</select>
|
|
|
@@ -303,7 +312,7 @@
|
|
|
</td>
|
|
|
<th>다운로드가능여부<em class="required" title="필수"></em></th>
|
|
|
<td>
|
|
|
- <select name="downYn" id="downYn" required="required" data-valid-name="다운로드가능여부">
|
|
|
+ <select name="downAblYn" id="downAblYn" required="required" data-valid-name="다운로드가능여부">
|
|
|
<option value="Y">Y</option>
|
|
|
<option value="Y" selected="selected">N</option>
|
|
|
</select>
|
|
|
@@ -323,7 +332,7 @@
|
|
|
</select>
|
|
|
</td>
|
|
|
</tr>-->
|
|
|
- <tr class="payTypeTr" style="display: none;">
|
|
|
+ <!--<tr class="payTypeTr" style="display: none;">
|
|
|
<th>결제수단<em class="required" title="필수"></em></th>
|
|
|
<td colspan="5">
|
|
|
<select name="payType" id="payType" data-valid-name="결제수단">
|
|
|
@@ -332,6 +341,12 @@
|
|
|
</select>
|
|
|
</td>
|
|
|
</tr>
|
|
|
+ <tr>
|
|
|
+ <th>멀티결제수단</th>
|
|
|
+ <td colspan="5">
|
|
|
+
|
|
|
+ </td>
|
|
|
+ </tr>-->
|
|
|
<tr>
|
|
|
<th>쿠폰상태<em class="required" title="필수"></em></th>
|
|
|
<td>
|
|
|
@@ -659,7 +674,35 @@
|
|
|
});
|
|
|
|
|
|
// 쿠폰 등록 버튼 클릭시
|
|
|
+
|
|
|
function fnCouponCreate(){
|
|
|
+ mcxDialog.confirm('저장하시겠습니까?' , {
|
|
|
+ cancelBtnText:"취소",
|
|
|
+ sureBtnText:"확인",
|
|
|
+ sureBtnClick: function () {
|
|
|
+ var chkUsableCustGb = document.getElementsByName("chkUsableCustGb");
|
|
|
+ var chkUsableCustGrade = document.getElementsByName("chkUsableCustGrade");
|
|
|
+ var usableCustGb = "";
|
|
|
+ var usableCustGrade = "";
|
|
|
+
|
|
|
+ for(let i=0; i<chkUsableCustGb.length; i++){
|
|
|
+ if(chkUsableCustGb[i].checked == true){
|
|
|
+ usableCustGb += chkUsableCustGb[i].value+"|";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for(let i=0; i<chkUsableCustGrade.length; i++){
|
|
|
+ if(chkUsableCustGrade[i].checked == true){
|
|
|
+ usableCustGrade += chkUsableCustGrade[i].value+"|";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ $("#CouponForm input[name=usableCustGb]").val(usableCustGb);
|
|
|
+ $("#CouponForm input[name=usableCustGrade]").val(usableCustGrade);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function fnCouponCreate2(){
|
|
|
mcxDialog.confirm('저장하시겠습니까?' , {
|
|
|
cancelBtnText:"취소",
|
|
|
sureBtnText:"확인",
|
|
|
@@ -719,7 +762,7 @@
|
|
|
|
|
|
function checkValidation(){
|
|
|
//신규가입 지급한다면 validation 체크
|
|
|
- if( $('#custJoinYn option:selected').val() == "Y" ){
|
|
|
+ if( $('#newCustYn option:selected').val() == "Y" ){
|
|
|
var fromDate = $('#CouponForm input[name=custJoinStdt]').val();
|
|
|
var toDate = $('#CouponForm input[name=custJoinEddt]').val();
|
|
|
|
|
|
@@ -745,7 +788,7 @@
|
|
|
}
|
|
|
|
|
|
// 첫구매 지급하면 validation 체크
|
|
|
- if( $('#firstYn option:selected').val() == "Y" ){
|
|
|
+ if( $('#firstOrdYn option:selected').val() == "Y" ){
|
|
|
var fromDate = $('#CouponForm input[name=buyStdt]').val();
|
|
|
var toDate = $('#CouponForm input[name=buyEddt]').val();
|
|
|
|
|
|
@@ -880,12 +923,12 @@
|
|
|
|
|
|
// 주문서 쿠폰 선택시 결제수단 노출
|
|
|
if(radioValue == 'G230_20') {
|
|
|
- $('#CouponForm .payTypeTr').show();
|
|
|
- $('#CouponForm #payType').attr('required' , true);
|
|
|
+ //$('#CouponForm .payTypeTr').show();
|
|
|
+ //$('#CouponForm #payType').attr('required' , true);
|
|
|
$("#CouponForm .dcCdGb").show(); // 할인쿠폰유형 노출
|
|
|
} else {
|
|
|
- $('#CouponForm .payTypeTr').hide();
|
|
|
- $('#CouponForm #payType').attr('required' , false );
|
|
|
+ //$('#CouponForm .payTypeTr').hide();
|
|
|
+ //$('#CouponForm #payType').attr('required' , false );
|
|
|
$("#CouponForm .dcCdGb").hide(); // 할인쿠폰유형 숨김
|
|
|
$("#CouponForm input:radio[name='dcCdGb']:radio[value='G233_00']").prop('checked', true); // 주문서 쿠폰이 아닐 경우 일반 쿠폰으로 설정
|
|
|
}
|
|
|
@@ -900,7 +943,7 @@
|
|
|
$("#CouponForm .dcCdCheck2").show();
|
|
|
$("#CouponForm .serialCpnArea").hide();
|
|
|
$("#CouponForm .randomCpnArea").hide();
|
|
|
- $("#CouponForm #custJoinYn").parent().attr("colspan", "");
|
|
|
+ $("#CouponForm #newCustYn").parent().attr("colspan", "");
|
|
|
$("#CouponForm .normalCol").attr("colspan", "5");
|
|
|
$('#CouponForm input[name="serialCpnNm"]').attr('required' , false);
|
|
|
$('#CouponForm input[name="serialCpnQty"]').attr('required' , false);
|
|
|
@@ -923,7 +966,7 @@
|
|
|
}
|
|
|
$("#CouponForm .dcCdCheck1").hide(); // 총발행제한수량, 1회발행수량, 1인당발행제한수량 숨김
|
|
|
$("#CouponForm .dcCdCheck2").hide(); // 총발행제한수량, 1회발행수량, 1인당발행제한수량 숨김
|
|
|
- $("#CouponForm #custJoinYn").parent().attr("colspan", "5"); // 총발행제한 수량을 없애면서 신규회원여부 colspan 수정
|
|
|
+ $("#CouponForm #newCustYn").parent().attr("colspan", "5"); // 총발행제한 수량을 없애면서 신규회원여부 colspan 수정
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -1240,12 +1283,12 @@
|
|
|
}
|
|
|
|
|
|
// 첫구매여부 변경시
|
|
|
- function firstYnChange(pThis){
|
|
|
+ function firstOrdYnChange(pThis){
|
|
|
var selectVal = $(pThis).val();
|
|
|
|
|
|
if(typeof selectVal == "undefined") {
|
|
|
if(mode == "U") {
|
|
|
- selectVal = cpnDetail.firstYn;
|
|
|
+ selectVal = cpnDetail.firstOrdYn;
|
|
|
} else {
|
|
|
selectVal = "N";
|
|
|
}
|
|
|
@@ -1263,12 +1306,12 @@
|
|
|
}
|
|
|
|
|
|
// 신규회원여부 변경시
|
|
|
- function custJoinYnChange(pThis){
|
|
|
+ function newCustYnChange(pThis){
|
|
|
var selectVal = $(pThis).val();
|
|
|
|
|
|
if(typeof selectVal == "undefined") {
|
|
|
if(mode == "U") {
|
|
|
- selectVal = cpnDetail.custJoinYn;
|
|
|
+ selectVal = cpnDetail.newCustYn;
|
|
|
} else {
|
|
|
selectVal = "N";
|
|
|
}
|
|
|
@@ -1442,16 +1485,16 @@
|
|
|
$("#CouponForm #usableCustGb").val(cpnDetail.usableCustGb).prop("selected", true);
|
|
|
$("#CouponForm #usableCustGrade").val(cpnDetail.usableCustGrade).prop("selected", true);
|
|
|
$("#CouponForm #endAlimYn").val(cpnDetail.endAlimYn).prop("selected", true);
|
|
|
- $("#CouponForm #firstYn").val(cpnDetail.firstYn).prop("selected", true);
|
|
|
+ $("#CouponForm #firstOrdYn").val(cpnDetail.firstOrdYn).prop("selected", true);
|
|
|
$("#CouponForm #reissuance").val(cpnDetail.reissuance).prop("selected", true);
|
|
|
$("#CouponForm #dnGb").val(cpnDetail.dnGb).prop("selected", true);
|
|
|
$("#CouponForm #cpnStat").val(cpnDetail.cpnStat).prop("selected", true);
|
|
|
- $("#CouponForm #custJoinYn").val(cpnDetail.custJoinYn).prop("selected", true);
|
|
|
+ $("#CouponForm #newCustYn").val(cpnDetail.newCustYn).prop("selected", true);
|
|
|
$("#CouponForm #pdGb").val(cpnDetail.pdGb).prop("selected", true);
|
|
|
$("#CouponForm #siteCd").val(cpnDetail.siteCd).prop("selected", true);
|
|
|
$("#CouponForm #afChannel").val(cpnDetail.afChannel).prop("selected", true);
|
|
|
$("#CouponForm #cpnNm").val(cpnDetail.cpnNm);
|
|
|
- $("#CouponForm #downYn").val(cpnDetail.downYn);
|
|
|
+ $("#CouponForm #downAblYn").val(cpnDetail.downAblYn);
|
|
|
$("#CouponForm #buyLimitAmt").val(cpnDetail.buyLimitAmt);
|
|
|
$("#CouponForm #cpnId").val(cpnDetail.cpnId);
|
|
|
|
|
|
@@ -1525,18 +1568,18 @@
|
|
|
$("#CouponForm #usableCustGrade").attr('disabled', true);
|
|
|
$("#CouponForm #endAlimYn").attr('readonly', true);
|
|
|
$("#CouponForm #endAlimYn").attr('disabled', true);
|
|
|
- $("#CouponForm #firstYn").attr('readonly', true);
|
|
|
- $("#CouponForm #firstYn").attr('disabled', true);
|
|
|
+ $("#CouponForm #firstOrdYn").attr('readonly', true);
|
|
|
+ $("#CouponForm #firstOrdYn").attr('disabled', true);
|
|
|
$("#CouponForm #reissuance").attr('readonly', true);
|
|
|
$("#CouponForm #reissuance").attr('disabled', true);
|
|
|
$("#CouponForm #dnGb").attr('readonly', true);
|
|
|
$("#CouponForm #dnGb").attr('disabled', true);
|
|
|
- $("#CouponForm #custJoinYn").attr('readonly', true);
|
|
|
- $("#CouponForm #custJoinYn").attr('disabled', true);
|
|
|
+ $("#CouponForm #newCustYn").attr('readonly', true);
|
|
|
+ $("#CouponForm #newCustYn").attr('disabled', true);
|
|
|
$("#CouponForm #pdGb").attr('readonly', true);
|
|
|
$("#CouponForm #pdGb").attr('disabled', true);
|
|
|
- $("#CouponForm #downYn").attr('readonly', true);
|
|
|
- $("#CouponForm #downYn").attr('disabled', true);
|
|
|
+ $("#CouponForm #downAblYn").attr('readonly', true);
|
|
|
+ $("#CouponForm #downAblYn").attr('disabled', true);
|
|
|
$("#CouponForm #siteCd").attr('readonly', true);
|
|
|
$("#CouponForm #siteCd").attr('disabled', true);
|
|
|
$("#CouponForm #cpnNm").attr('readonly', true);
|
|
|
@@ -1594,7 +1637,7 @@
|
|
|
|
|
|
}
|
|
|
// 첫구매여부 적용하는 경우 날짜 세팅
|
|
|
- if (cpnDetail.firstYn == "Y") {
|
|
|
+ if (cpnDetail.firstOrdYn == "Y") {
|
|
|
splitDate("start", cpnDetail.buyStdt, "buy");
|
|
|
splitDate("end", cpnDetail.buyEddt, "buy");
|
|
|
if(issueCnt > 0) {
|
|
|
@@ -1607,7 +1650,7 @@
|
|
|
}
|
|
|
}
|
|
|
// 신규회원여부 적용하는 경우 날짜 세팅
|
|
|
- if (cpnDetail.custJoinYn == "Y") {
|
|
|
+ if (cpnDetail.newCustYn == "Y") {
|
|
|
splitDate("start", cpnDetail.custJoinStdt, "custJoin");
|
|
|
splitDate("end", cpnDetail.custJoinEddt, "custJoin");
|
|
|
if(issueCnt > 0) {
|
|
|
@@ -1622,8 +1665,8 @@
|
|
|
}
|
|
|
// 기본세팅
|
|
|
pdGbChange();
|
|
|
- firstYnChange();
|
|
|
- custJoinYnChange();
|
|
|
+ firstOrdYnChange();
|
|
|
+ newCustYnChange();
|
|
|
fnChangeAfLinkCdList();
|
|
|
|
|
|
// 제휴채널2뎁스 기본세팅
|