|
@@ -119,8 +119,29 @@
|
|
|
<td><input type="text" name="cuDispOrd" class="w100 aR" data-valid-type="numeric"></td>
|
|
<td><input type="text" name="cuDispOrd" class="w100 aR" data-valid-type="numeric"></td>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr>
|
|
<tr>
|
|
|
- <th>쿠폰유의사항</th>
|
|
|
|
|
- <td><textarea class="textareaR4 summernote" name="note" id="note" rows="15" cols="40" style="width: 860px;"></textarea></td>
|
|
|
|
|
|
|
+ <th>쿠폰 유의사항</th>
|
|
|
|
|
+ <td colspan="5">
|
|
|
|
|
+ <div id="registeredFile"></div>
|
|
|
|
|
+ <div style="display: block">
|
|
|
|
|
+ <select name="couponCnt" id="couponCnt">
|
|
|
|
|
+ <th:block th:each="num: ${#numbers.sequence(1,10)}">
|
|
|
|
|
+ <option th:value="${num}" th:text="${num}"></option>
|
|
|
|
|
+ </th:block>
|
|
|
|
|
+ </select>* 쿠폰 유의사항 개수 선택(10개까지 가능)
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <th:block th:each="num: ${#numbers.sequence(1,10)}">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <table>
|
|
|
|
|
+ <tr th:id="${'coupon'+num}">
|
|
|
|
|
+ <th th:text="${'유의사항' + num}"></th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" th:id="${'cpnNote' + (num-1)}" th:name="${'cpnNote' + (num-1)}" class="w300 aR">
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </th:block>
|
|
|
|
|
+ </td>
|
|
|
</tr>
|
|
</tr>
|
|
|
</table>
|
|
</table>
|
|
|
<div class="padding10">
|
|
<div class="padding10">
|
|
@@ -128,15 +149,6 @@
|
|
|
<button type="button" class="btn btnRight btn-success btn-lg" onclick="fnAddCoupone()">쿠폰 추가</button>
|
|
<button type="button" class="btn btnRight btn-success btn-lg" onclick="fnAddCoupone()">쿠폰 추가</button>
|
|
|
</span> <br />
|
|
</span> <br />
|
|
|
<table class="frmStyle" id="couponTable">
|
|
<table class="frmStyle" id="couponTable">
|
|
|
- <!-- <tr>
|
|
|
|
|
- <td colspan="3">
|
|
|
|
|
- <input type="checkbox">
|
|
|
|
|
- <input type="text" class="w300" name="cuItemVal1" onkeypress="if (window.event.keyCode == 13) { fnOpenCouponRetrievePopup('input[name=cuItemVal1]', 'input[name=cuItemNm1]'); }"/>
|
|
|
|
|
- <button type="button" class="btn icn" onclick="fnOpenCouponRetrievePopup('input[name=cuItemVal1]', 'input[name=cuItemNm1]');"><i class="fa fa-search cpn" aria-hidden="true"></i></button>
|
|
|
|
|
- <input name="cuItemVal1" type="text" class="w100" maxlength="20" readonly="readonly"/>
|
|
|
|
|
- <button type="button" class="btn icn" onclick="$('input[name=cuItemVal1], input[name=cuItemNm1]').val('');"><i class="fa fa-eraser" aria-hidden="true"></i></button>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr> -->
|
|
|
|
|
</table>
|
|
</table>
|
|
|
</div>
|
|
</div>
|
|
|
</td>
|
|
</td>
|
|
@@ -1067,6 +1079,7 @@
|
|
|
let goodsStatList = gagajf.convertToArray([[${goodsStatList}]]);
|
|
let goodsStatList = gagajf.convertToArray([[${goodsStatList}]]);
|
|
|
let reviewList = [[${reviewList}]];
|
|
let reviewList = [[${reviewList}]];
|
|
|
let couponList = [[${couponList}]];
|
|
let couponList = [[${couponList}]];
|
|
|
|
|
+ let couponNotice = [[${couponNotice}]];
|
|
|
let fileList = [[${fileList}]];
|
|
let fileList = [[${fileList}]];
|
|
|
let noticeList = [[${noticeList}]];
|
|
let noticeList = [[${noticeList}]];
|
|
|
let fsrcListTop = [[${fsrcListTop}]];
|
|
let fsrcListTop = [[${fsrcListTop}]];
|
|
@@ -1549,6 +1562,18 @@
|
|
|
$('#notice' + i).parent().parent().parent().hide();
|
|
$('#notice' + i).parent().parent().parent().hide();
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ // 쿠폰 개수 선택시
|
|
|
|
|
+ $("#couponCnt").on("change", function() {
|
|
|
|
|
+ for (var i = 1; i <= 10; i++) {
|
|
|
|
|
+ $('#coupon' + i).parent().parent().show();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var couponCnt = $(this).val();
|
|
|
|
|
+ for (var i = 10; i > couponCnt; i--) {
|
|
|
|
|
+ $('#coupon' + i).parent().parent().hide();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
// 파일첨부 선택 시
|
|
// 파일첨부 선택 시
|
|
|
$('#file1').on('change', function() { fnChooseFile(this, 1); });
|
|
$('#file1').on('change', function() { fnChooseFile(this, 1); });
|
|
@@ -1707,6 +1732,18 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //쿠폰 유의사항관련 데이터 담기
|
|
|
|
|
+ var multiPlanCouponNotice = [];
|
|
|
|
|
+
|
|
|
|
|
+ var count = $("#planTemplateForm select[name=couponCnt]").val();
|
|
|
|
|
+ for (var i = 0; i < count; i++) {
|
|
|
|
|
+ if($('#cpnNote'+i).val() == '' || typeof $('#cpnNote'+i).val() == 'undeifined'){
|
|
|
|
|
+ false;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ multiPlanCouponNotice.push($('#cpnNote'+i).val());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 리뷰 전시 클릭했을 경우
|
|
// 리뷰 전시 클릭했을 경우
|
|
|
if($("input:checkbox[name=reDispYn]").prop("checked")){
|
|
if($("input:checkbox[name=reDispYn]").prop("checked")){
|
|
|
$("input:checkbox[name=reDispYn]").val('Y');
|
|
$("input:checkbox[name=reDispYn]").val('Y');
|
|
@@ -1742,10 +1779,11 @@
|
|
|
mcxDialog.alert('쿠폰을 선택하세요.');
|
|
mcxDialog.alert('쿠폰을 선택하세요.');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if($("textarea[name=note]").val()=='' && $("textarea[name=note]").val()==''){
|
|
|
|
|
- mcxDialog.alert('쿠폰 유의사항 내용을 입력하세요.');
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
+ if(multiPlanCouponNotice.length == 0){
|
|
|
|
|
+ mcxDialog.alert('쿠폰 유의사항을 입력하세요.');
|
|
|
return;
|
|
return;
|
|
|
- }
|
|
|
|
|
|
|
+ } */
|
|
|
|
|
|
|
|
}else{
|
|
}else{
|
|
|
$("input:checkbox[name=cuDispYn]").val('N');
|
|
$("input:checkbox[name=cuDispYn]").val('N');
|
|
@@ -2134,8 +2172,8 @@
|
|
|
,cuTitle : $('#planTemplateForm input[name=cuTitle]').val()
|
|
,cuTitle : $('#planTemplateForm input[name=cuTitle]').val()
|
|
|
,cuDispOrd : $('#planTemplateForm input[name=cuDispOrd]').val()
|
|
,cuDispOrd : $('#planTemplateForm input[name=cuDispOrd]').val()
|
|
|
,cuPlanContSq : $('#planTemplateForm input[name=cuPlanContSq]').val()
|
|
,cuPlanContSq : $('#planTemplateForm input[name=cuPlanContSq]').val()
|
|
|
- ,cuDispYn : $('#planTemplateForm input:checkbox[name=cuDispYn]').val()
|
|
|
|
|
- ,note : $('#planTemplateForm textarea[name=note]').val()
|
|
|
|
|
|
|
+ ,cuDispYn : $('#planTemplateForm input:checkbox[name=cuDispYn]').val()
|
|
|
|
|
+ ,multiPlanCouponNotice : multiPlanCouponNotice
|
|
|
,multiPlanFile : multiPlanFile
|
|
,multiPlanFile : multiPlanFile
|
|
|
,multiPlanFile2 : multiPlanFile2
|
|
,multiPlanFile2 : multiPlanFile2
|
|
|
,multiPlanFile3 : multiPlanFile3
|
|
,multiPlanFile3 : multiPlanFile3
|
|
@@ -2257,13 +2295,52 @@ $(document).ready(function() {
|
|
|
}
|
|
}
|
|
|
if(typeof couponList[0] != 'undefined'){
|
|
if(typeof couponList[0] != 'undefined'){
|
|
|
//쿠폰
|
|
//쿠폰
|
|
|
- $('#planTemplateForm input[name=cuTitle]').val(couponList[0].title);
|
|
|
|
|
- $('#planTemplateForm input[name=cuDispOrd]').val(couponList[0].dispOrd);
|
|
|
|
|
- $('#planTemplateForm input[name=cuPlanContSq]').val(couponList[0].planContSq);
|
|
|
|
|
- $('#note').summernote('code', couponList[0].note);
|
|
|
|
|
- if (couponList[0].dispYn == 'Y') {
|
|
|
|
|
|
|
+ $('#planTemplateForm input[name=cuTitle]').val(couponNotice.title);
|
|
|
|
|
+ $('#planTemplateForm input[name=cuDispOrd]').val(couponNotice.dispOrd);
|
|
|
|
|
+ $('#planTemplateForm input[name=cuPlanContSq]').val(couponNotice.planContSq);
|
|
|
|
|
+ if (couponNotice.dispYn == 'Y') {
|
|
|
$('#planTemplateForm input:checkbox[name="cuDispYn"]').prop('checked', true);
|
|
$('#planTemplateForm input:checkbox[name="cuDispYn"]').prop('checked', true);
|
|
|
}
|
|
}
|
|
|
|
|
+ if (couponNotice.cpnNote0 != null && couponNotice.cpnNote0 != '') {
|
|
|
|
|
+ $("#planTemplateForm select[name=couponCnt]").val(1);
|
|
|
|
|
+ $("#cpnNote0").val(couponNotice.cpnNote0);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (couponNotice.cpnNote1 != null && couponNotice.cpnNote1 != '') {
|
|
|
|
|
+ $("#planTemplateForm select[name=couponCnt]").val(2);
|
|
|
|
|
+ $("#cpnNote1").val(couponNotice.cpnNote1);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (couponNotice.cpnNote2 != null && couponNotice.cpnNote2 != '') {
|
|
|
|
|
+ $("#planTemplateForm select[name=couponCnt]").val(3);
|
|
|
|
|
+ $("#cpnNote2").val(couponNotice.cpnNote2);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (couponNotice.cpnNote3 != null && couponNotice.cpnNote3 != '') {
|
|
|
|
|
+ $("#planTemplateForm select[name=couponCnt]").val(4);
|
|
|
|
|
+ $("#cpnNote3").val(couponNotice.cpnNote3);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (couponNotice.cpnNote4 != null && couponNotice.cpnNote4 != '') {
|
|
|
|
|
+ $("#planTemplateForm select[name=couponCnt]").val(5);
|
|
|
|
|
+ $("#cpnNote4").val(couponNotice.cpnNote4);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (couponNotice.cpnNote5 != null && couponNotice.cpnNote5 != '') {
|
|
|
|
|
+ $("#planTemplateForm select[name=couponCnt]").val(6);
|
|
|
|
|
+ $("#cpnNote5").val(couponNotice.cpnNote5);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (couponNotice.cpnNote6 != null && couponNotice.cpnNote6 != '') {
|
|
|
|
|
+ $("#planTemplateForm select[name=couponCnt]").val(7);
|
|
|
|
|
+ $("#cpnNote6").val(couponNotice.cpnNote6);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (couponNotice.cpnNote7 != null && couponNotice.cpnNote7 != '') {
|
|
|
|
|
+ $("#planTemplateForm select[name=couponCnt]").val(8);
|
|
|
|
|
+ $("#cpnNote7").val(couponNotice.cpnNote7);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (couponNotice.cpnNote8 != null && couponNotice.cpnNote8 != '') {
|
|
|
|
|
+ $("#planTemplateForm select[name=couponCnt]").val(9);
|
|
|
|
|
+ $("#cpnNote8").val(couponNotice.cpnNote8);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (couponNotice.cpnNote9 != null && couponNotice.cpnNote9 != '') {
|
|
|
|
|
+ $("#planTemplateForm select[name=couponCnt]").val(10);
|
|
|
|
|
+ $("#cpnNote9").val(couponNotice.cpnNote9);
|
|
|
|
|
+ }
|
|
|
if(couponList.length > 0)
|
|
if(couponList.length > 0)
|
|
|
{
|
|
{
|
|
|
for (var i = 0; i <couponList.length; i++) {
|
|
for (var i = 0; i <couponList.length; i++) {
|
|
@@ -2409,7 +2486,7 @@ $(document).ready(function() {
|
|
|
|
|
|
|
|
$("#fileCnt").trigger('change');
|
|
$("#fileCnt").trigger('change');
|
|
|
$("#noticeCnt").trigger('change');
|
|
$("#noticeCnt").trigger('change');
|
|
|
-
|
|
|
|
|
|
|
+ $("#couponCnt").trigger('change');
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
/*]]>*/
|
|
/*]]>*/
|