|
|
@@ -29,6 +29,7 @@
|
|
|
<input type="hidden" name="rePlanContSq">
|
|
|
<input type="hidden" name="cuPlanContSq">
|
|
|
<input type="hidden" name="filePlanContSq">
|
|
|
+ <input type="hidden" name="noticePlanContSq">
|
|
|
<input type="hidden" name="goodsPlanContSq1">
|
|
|
<input type="hidden" name="goodsPlanContSq2">
|
|
|
<input type="hidden" name="goodsPlanContSq3">
|
|
|
@@ -210,6 +211,56 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <div class="panelContent">
|
|
|
+ <div class="panelStyle" style="margin: unset;">
|
|
|
+ <!-- TITLE -->
|
|
|
+ <div class="panelTitle">
|
|
|
+ <h2>유의사항</h2>
|
|
|
+ <span class="panelControl"> <i
|
|
|
+ class="fa inner-fa-chevron-up"></i> <!-- 열림/닫힘 화살표 -->
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <!-- //TITLE -->
|
|
|
+ <div class="inner-panelContent">
|
|
|
+ <div class="panelContent">
|
|
|
+ <table class="frmStyle">
|
|
|
+ <colgroup>
|
|
|
+ <col width="10%" />
|
|
|
+ <col width="90%" />
|
|
|
+ </colgroup>
|
|
|
+ <tr>
|
|
|
+ <th>유의사항<br/>[전시여부<label class="chkBox"><input type="checkbox" name="noticeDispYn" value="N"/></label>]</th>
|
|
|
+ <td colspan="5">
|
|
|
+ <div id="registeredFile"></div>
|
|
|
+ <div style="display: block">
|
|
|
+ <select name="noticeCnt" id="noticeCnt">
|
|
|
+ <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="${'notice'+num}">
|
|
|
+ <th th:text="${'유의사항' + num}"></th>
|
|
|
+ <td><input type="text" th:id="${'noticeItemVal' + num}" th:name="${'noticeItemVal' + num}" class="w300 aR">
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </th:block>
|
|
|
+ </td>
|
|
|
+
|
|
|
+ <th>전시순서</th>
|
|
|
+ <td><input type="text" name="noticeDispOrd" class="w100 aR" data-valid-type="numeric"></td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
<div class="panelContent">
|
|
|
<div class="panelStyle" style="margin: unset;">
|
|
|
@@ -1017,6 +1068,7 @@
|
|
|
let reviewList = [[${reviewList}]];
|
|
|
let couponList = [[${couponList}]];
|
|
|
let fileList = [[${fileList}]];
|
|
|
+ let noticeList = [[${noticeList}]];
|
|
|
let fsrcListTop = [[${fsrcListTop}]];
|
|
|
let fsrcListBtm = [[${fsrcListBtm}]];
|
|
|
let goodsList = [[${goodsList}]];
|
|
|
@@ -1485,6 +1537,18 @@
|
|
|
$('#file' + i).parent().parent().hide();
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ // 유의사항 개수 선택시
|
|
|
+ $("#noticeCnt").on("change", function() {
|
|
|
+ for (var i = 1; i <= 10; i++) {
|
|
|
+ $('#notice' + i).parent().parent().parent().show();
|
|
|
+ }
|
|
|
+
|
|
|
+ var noticeCnt = $(this).val();
|
|
|
+ for (var i = 10; i > noticeCnt; i--) {
|
|
|
+ $('#notice' + i).parent().parent().parent().hide();
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
// 파일첨부 선택 시
|
|
|
$('#file1').on('change', function() { fnChooseFile(this, 1); });
|
|
|
@@ -1631,6 +1695,18 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //유의사항관련 데이터 담기
|
|
|
+ var multiPlanNotice = [];
|
|
|
+
|
|
|
+ var count = $("#planTemplateForm select[name=noticeCnt]").val();
|
|
|
+ for (var i = 0; i < count; i++) {
|
|
|
+ if($('#noticeItemVal'+(i+1)).val() == '' || typeof $('#noticeItemVal'+(i+1)).val() == 'undeifined'){
|
|
|
+ false;
|
|
|
+ }else{
|
|
|
+ multiPlanNotice.push($('#noticeItemVal'+(i+1)).val());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 리뷰 전시 클릭했을 경우
|
|
|
if($("input:checkbox[name=reDispYn]").prop("checked")){
|
|
|
$("input:checkbox[name=reDispYn]").val('Y');
|
|
|
@@ -1692,6 +1768,23 @@
|
|
|
$("input:checkbox[name=fileDispOrd]").val('N');
|
|
|
}
|
|
|
|
|
|
+ // 유의사항 전시 클랙했을 경우
|
|
|
+ if($("input:checkbox[name=noticeDispYn]").prop("checked")){
|
|
|
+ $("input:checkbox[name=noticeDispYn]").val('Y');
|
|
|
+
|
|
|
+ if($("input[name=noticeDispOrd]").val()==''){
|
|
|
+ mcxDialog.alert('유의사항 전시순서를 입력하세요.');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(multiPlanNotice.length == 0){
|
|
|
+ mcxDialog.alert('등록할 유의사항를 입력하세요.');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
+ $("input:checkbox[name=noticeDispOrd]").val('N');
|
|
|
+ }
|
|
|
+
|
|
|
// html 상단 전시 클릭했을 경우
|
|
|
if($("input:checkbox[name=topFsrcDispYn]").prop("checked")){
|
|
|
$("input:checkbox[name=topFsrcDispYn]").val('Y');
|
|
|
@@ -2049,6 +2142,10 @@
|
|
|
,fileDispYn : $('#planTemplateForm input:checkbox[name=fileDispYn]').val()
|
|
|
,fileDispOrd : $('#planTemplateForm input[name=fileDispOrd]').val()
|
|
|
,filePlanContSq : $('#planTemplateForm input[name=filePlanContSq]').val()
|
|
|
+ ,multiPlanNotice : multiPlanNotice
|
|
|
+ ,noticeDispYn : $('#planTemplateForm input:checkbox[name=noticeDispYn]').val()
|
|
|
+ ,noticeDispOrd : $('#planTemplateForm input[name=noticeDispOrd]').val()
|
|
|
+ ,noticePlanContSq : $('#planTemplateForm input[name=noticePlanContSq]').val()
|
|
|
,topFsrcDispYn : $('#planTemplateForm input:checkbox[name=topFsrcDispYn]').val()
|
|
|
,btmFsrcDispYn : $('#planTemplateForm input:checkbox[name=btmFsrcDispYn]').val()
|
|
|
,topFsrcDispOrd: $('#planTemplateForm input[name=topFsrcDispOrd]').val()
|
|
|
@@ -2200,16 +2297,6 @@ $(document).ready(function() {
|
|
|
{
|
|
|
$("#planTemplateForm select[name=fileCnt]").val(fileList.length);
|
|
|
|
|
|
- /* for (var i = 0; i <fileList.length; i++) {
|
|
|
- var tag = '';
|
|
|
- tag += '<span class="memAdd">';
|
|
|
- tag += ' <a id="dnFile' + (i + 1) + '">' + fileList[i].fileItemVal + '</a>\n';
|
|
|
- tag += ' <button type="button" onclick="fnDeleteFile(this, ' + fileList[i].planSq + ', ' + fileList[i].planContItemSq + ', \'' + fileList[i].fileItemVal + '\')">삭제</button>\n';
|
|
|
- tag += '</span>';
|
|
|
- $('#registeredFile').prepend(tag);
|
|
|
-
|
|
|
- } */
|
|
|
-
|
|
|
for (var i = 0; i <fileList.length; i++) {
|
|
|
$("#planTemplateForm input[name=fileLinkUrl"+ (i+1) +"]").val(fileList[i].linkUrl);
|
|
|
$("#planTemplateForm label[id=file_"+ (i+1) +"]").html(fileList[i].fileItemVal);
|
|
|
@@ -2224,6 +2311,26 @@ $(document).ready(function() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if(typeof noticeList[0] != 'undefined'){
|
|
|
+ //유의사항
|
|
|
+ $('#planTemplateForm input[name=noticeDispOrd]').val(noticeList[0].dispOrd);
|
|
|
+ $('#planTemplateForm input[name=noticePlanContSq]').val(noticeList[0].planContSq);
|
|
|
+
|
|
|
+ if (noticeList[0].dispYn == 'Y') {
|
|
|
+ $('#planTemplateForm input:checkbox[name="noticeDispYn"]').prop('checked', true);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(noticeList.length > 0 && noticeList[0].noticeItemVal != null)
|
|
|
+ {
|
|
|
+ $("#planTemplateForm select[name=noticeCnt]").val(noticeList.length);
|
|
|
+
|
|
|
+ for (var i = 0; i <noticeList.length; i++) {
|
|
|
+ $("#planTemplateForm input[id=noticeItemVal"+ (i+1) +"]").val(noticeList[i].noticeItemVal);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//html(하단)
|
|
|
if(typeof fsrcListBtm[0] != 'undefined'){
|
|
|
$('#planTemplateForm input[name=btmFsrcDispOrd]').val(fsrcListBtm[0].dispOrd);
|
|
|
@@ -2301,6 +2408,7 @@ $(document).ready(function() {
|
|
|
|
|
|
|
|
|
$("#fileCnt").trigger('change');
|
|
|
+ $("#noticeCnt").trigger('change');
|
|
|
|
|
|
});
|
|
|
|