| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080 |
- <!DOCTYPE html>
- <html lang="ko"
- xmlns:th="http://www.thymeleaf.org">
- <!--
- *******************************************************************************
- * @source : PlanDetailForm.html
- * @desc : 웹 수정 / 웹 등록 팝업 화면 Page
- *============================================================================
- * SISUN
- * Copyright(C) 2020 TSIT, All rights reserved.
- *============================================================================
- * VER DATE AUTHOR DESCRIPTION
- * === =========== ========== =============================================
- * 1.0 2020.02.04 sowon 최초 작성
- *******************************************************************************
- -->
- <div class="modalPopup" data-width="1100" id="planRegisterFormDiv">
- <div class="panelStyle">
- <div class="panelTitle">
- <h2 th:text="${'기획전 ' + (mode == 'N' ? '등록' : '수정')}"></h2>
- <button type="button" class="close" onclick="uifnPopupClose('planRegisterFormDiv')"><i class="fa fa-times"></i></button>
- </div>
-
- <!-- 기획전 웹 수정 -->
- <div class="panelContent" th:if="${mode == 'U'}">
- <form th:object="${planInfo}" id="planUpdateForm" name="planUpdateForm" action="#" th:method="post">
- <input type="hidden" name="mode" th:value="${mode}"/>
- <input type="hidden" name="planSq" th:value="*{planSq}"/>
- <div class="cardArea" style="height: 700px;margin: -5px;">
- <table class="frmStyle">
- <colgroup>
- <col style="width:10%"/>
- <col style="width:40%;"/>
- <col style="width:10%;"/>
- <col style="width:35%;"/>
- <col/>
- </colgroup>
- <tr>
- <th>기획전구분<i class="star"></i></th>
- <td>
- <select name="planGb" id="planGb" th:field="*{planGb}" onchange="fnChangePlanGb(this);">
- <option value="P">기획전</option>
- <option value="E">이벤트</option>
- </select>
- </td>
- <th>기획전탬플릿유형<i class="star"></i></th>
- <td colspan="3">
- <select name="templateType" th:field="*{templateType}">
- <option value="H">HTML</option>
- <option value="T">TEXT</option>
- </select>
- </td>
- </tr>
- <tr>
- <th>프론트 구분<i class="star"></i></th>
- <td>
- <select name="frontGb" id="frontGb" th:field="*{frontGb}">
- <option value="A">전체</option>
- <option value="P">웹</option>
- <option value="M">모바일</option>
- </select>
- </td>
- <th>기획전명<i class="star"></i></th>
- <td colspan="3">
- <input type="text" name="planNm" id="planNm" th:field="*{planNm}"/>
- </td>
- </tr>
- <tr>
- <th>진행기간<i class="star"></i></th>
- <td>
- <input type="text" class="schDate w100" name="startSearchDate" maxlength="10" required="required" data-valid-name="노출기간" th:field="*{startSearchDate}"/>
- <select name="startSearchHour" required="required" data-valid-name="진행기간 시작시간">
- <th:block th:each="num, index : ${#numbers.sequence(0,23)}">
- <option th:value="${#numbers.formatInteger(num,2)}" th:text="|${#numbers.formatInteger(num,2)}시|" th:selected="*{#strings.substring(dispStdt, 11, 13)} == ${#strings.toString(num)} ? 'true'">시간</option>
- </th:block>
- </select>
- <select name="startSearchMin" required="required" data-valid-name="진행기간 시작시간">
- <th:block th:each="num: ${#numbers.sequence(0,59)}">
- <option th:value="${#numbers.formatInteger(num,2)}" th:text="|${#numbers.formatInteger(num,2)}분|" th:selected="*{#strings.substring(dispStdt, 14, 16)} == ${#strings.toString(num)} ? 'true'">분</option>
- </th:block>
- </select>
- ~
- <input type="text" class="schDate w100" name="endSearchDate" maxlength="10" required="required" data-valid-name="노출기간" th:field="*{endSearchDate}"/>
- <select name="endSearchHour" required="required" data-valid-name="진행기간 종료시간">
- <th:block th:each="num, index : ${#numbers.sequence(0,23)}">
- <option th:value="${#numbers.formatInteger(num,2)}" th:text="|${#numbers.formatInteger(num,2)}시|" th:selected="*{#strings.substring(dispEddt, 11, 13)} == ${#strings.toString(num)} ? 'true'">시간</option>
- </th:block>
- </select>
- <select name="endSearchMin" required="required" data-valid-name="진행기간 종료시간">
- <th:block th:each="num: ${#numbers.sequence(0,59)}">
- <option th:value="${#numbers.formatInteger(num,2)}" th:text="|${#numbers.formatInteger(num,2)}분|" th:selected="*{#strings.substring(dispEddt, 14, 16)} == ${#strings.toString(num)} ? 'true'">분</option>
- </th:block>
- </select>
- <input type="hidden" name="dispStdt" id="dispStdt"/>
- <input type="hidden" name="dispEddt" id="dispEddt"/>
- </td>
- <th>서브제목</th>
- <td colspan="3">
- <input type="text" name="dtlTitle1" id="dtlTitle1" th:value="*{dtlTitle1}"/>
- </td>
- </tr>
- <tr>
- <th>코너명노출 여부<i class="star"></i></th>
- <td>
- <select name="cornerNmDispYn" th:field="*{cornerNmDispYn}">
- <option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:selected="${oneData.cd} == 'Y'" th:text="|${oneData.cdNm}|"></option>
- </select>
- </td>
- <th>오픈여부<i class="star"></i></th>
- <td>
- <select name="openYn" th:field="*{openYn}">
- <option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:selected="${oneData.cd} == 'Y'" th:text="|${oneData.cdNm}|"></option>
- </select>
- </td>
- </tr>
- <tr>
- <th>사이트<i class="star"></i></th>
- <td>
- <select name="siteCd" th:field="*{siteCd}">
- <option value="">선택</option>
- <option th:if="${siteList}" th:each="oneData, status : ${siteList}" th:value="${oneData.cd}" th:text="|${oneData.cdNm}|"></option>
- </select>
- </td>
- <th>전시순서</th>
- <td>
- <input type="text" name="dispOrd" class="w100 aR" th:value="*{dispOrd}"/>
- </td>
- </tr>
- <tr>
- <th>사용고객등급구분<em class="required" title="필수"></em></th>
- <td>
- <label class="chkBox" th:if="${usableCustGradeList}" th:each="oneData, status : ${usableCustGradeList}">
- <input type="checkbox" name="usableCustGradeArr" th:value="${oneData.cd}" th:text="${oneData.cdNm}"/>
- </label>
- </td>
- <th>사용가능고객구분<em class="required" title="필수"></em></th>
- <td>
- <label class="chkBox" th:if="${usableCustGbList}" th:each="oneData, status : ${usableCustGbList}">
- <input type="checkbox" name="usableCustGbArr" th:value="${oneData.cd}" th:text="${oneData.cdNm}"/>
- </label>
- </td>
- </tr>
- <tr>
- <th>제휴채널<em class="required" title="필수"></em></th>
- <td>
- <label class="chkBox" th:if="${upperAfLinkCdList}" th:each="oneData, status : ${upperAfLinkCdList}">
- <input type="checkbox" name="upperAfLinkCdArr" th:value="${oneData.cd}" th:text="${oneData.cdNm}"/>
- </label>
- </td>
- <th>댓글여부</th>
- <td>
- <select name="replyYn" th:field="*{replyYn}">
- <option value="">선택</option>
- <option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="|${oneData.cdNm}|"></option>
- </select>
- </td>
- </tr>
- <tr>
- <th>PC 메인 이미지<i id="pMimgStar"></i><br/>[삭제여부<label class="chkBox"><input type="checkbox" name="orgMainPimgDelYn" value="Y"/></label>]</th>
- <td>
- <div th:if=*{mainPimg} id="mainPimgView" style="float:left;">
- <img id="PreMainPimgUrl" th:src="${@environment.getProperty('upload.image.view') + '/planning/'} + *{mainPimg}" style="max-width:720px;"/>
- </div>
- </td>
- <td colspan="4">
- <div class="uFile w400">
- <input id="registerMainPimg" name="registerMainPimg" type="file" accept="image/*" class="uFileInput w400"/>
- <label for="registerMainPimg" class="uFileLabel w400">파일선택</label>
- <input type="hidden" name="orgMainPimg" id="orgMainPimg" th:value="*{mainPimg}"/>
- <input type="hidden" name="mainPimg" id="mainPimg"/>
- </div>
- </td>
- </tr>
- <tr>
- <th>모바일 메인 이미지<i id="mMimgStar"></i><br/>[삭제여부<label class="chkBox"><input type="checkbox" name="orgMainMimgDelYn" value="Y"/></label>]</th>
- <td>
- <div th:if=*{mainMimg} id="imgFileView" style="float:left;">
- <img id="PreMainMimgUrl" th:src="${@environment.getProperty('upload.image.view') + '/planning/'} + *{mainMimg}" style="max-width:720px;"/>
- </div>
- </td>
- <td colspan="4">
- <div class="uFile w400">
- <input id="registerMainMimg" name="registerMainMimg" type="file" accept="image/*" class="uFileInput w400"/>
- <label for="registerMainMimg" class="uFileLabel w400">파일선택</label>
- <input type="hidden" name="orgMainMimg" id="orgMainMimg" th:value="*{mainMimg}"/>
- <input type="hidden" name="mainMimg" id="mainMimg"/>
- </div>
- </td>
- </tr>
- </tbody>
- <tbody>
- <!-- <tr>
- <th>웹용소스</th>
- <td colspan="5">
- <div style="margin-top:5px;">
- <textarea name="fsrcPc" id="fsrcPcDetail" rows="15" cols="95" style="width:1280px;"></textarea>
- </div>
- </td>
- </tr>
- <tr>
- <th>모바일용소스</th>
- <td colspan="5">
- <div style="margin-top:5px;">
- <textarea name="fsrcMobile" id="fsrcMobileDetail" rows="15" cols="95" style="width:1280px;"></textarea>
- </div>
- </td>
- </tr> -->
- </table>
- <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>카테고리/브랜드</th>
- <td>
- <!-- 수정시 프로모션명 입력 : before -->
- <div class="padding10"
- style="display: inline-block; width: 49%;">
- <!--<span>공급업체 설정</span>-->
- <div class="padding10 inner-tb-solid">
- <span class="buttonSpan">
- <button type="button"
- class="btn btnRight btn-success btn-lg"
- id="btnAddCate">카테고리 추가</button>
- <button type="button"
- class="btn btnRight btn-success btn-lg"
- id="btnDeleteCate">선택삭제</button>
- </span> <br />
- <div id="gridFGCateList"
- style="width: 100%; height: 200px;"
- class="ag-theme-balham"></div>
- </div>
- </div>
- <div class="padding10"
- style="display: inline-block; width: 49%;">
- <!--<span>브랜드 설정</span>-->
- <div class="padding10 inner-tb-solid">
- <span class="buttonSpan">
- <button type="button"
- class="btn btnRight btn-success btn-lg" id="btnAddBrand">브랜드
- 추가</button>
- <button type="button"
- class="btn btnRight btn-success btn-lg"
- id="btnDeleteBrand">선택삭제</button>
- </span> <br />
- <div id="gridFGBrandList"
- style="width: 100%; height: 200px;"
- class="ag-theme-balham"></div>
- </div>
- </div>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- <div style='margin: 13px;'>
- <ul class="panelBar">
- <li class="right" th:if="${mode == 'U'}">
- <button type="button" class="btn btn-success btn-lg" onclick="fnPlanSave('#planUpdateForm');">저장</button>
- </li>
- </ul>
- </div>
- </form>
- </div>
-
-
- <!-- 기획전 웹 등록 -->
- <div class="panelContent" th:if="${mode == 'N'}">
- <form id="planRegisterForm" name="planRegisterForm" action="#" th:action="@{'/system/user/save'}" th:method="post">
- <input type="hidden" name="mode" th:value="${mode}"/>
- <div>
- <table class="frmStyle">
- <colgroup>
- <col style="width:13%;"/>
- <col/>
- </colgroup>
- <tr>
- <th>기존 기획전</th>
- <td>
- <!-- <select name="planSq" id="planSq">
- <option value="">선택</option>
- <option th:if="${planList}" th:each="oneData, status : ${planList}" th:value="${oneData.planSq}" th:text="|[${oneData.planSq}] ${oneData.planNm}|"></option>
- </select> -->
- <input type="text" class="w100" name="searchTxt" id="searchTxt" maxlength="20" readonly="readonly"/>
- <input type="hidden" class="w100" name="planSq_Hideen" id="planSq_Hideen" maxlength="20"/>
- <button type="button" class="btn icn" id="btnPopupSearchPlan"><i class="fa fa-search"></i></button>
- <button type="button" class="btn btn-primary btn-lg" onclick="fnPlanCopyPopup();">기획전 복사</button>
- </td>
- </tr>
- </table>
- </div>
- <div class="cardArea">
- <table class="frmStyle">
- <colgroup>
- <col style="width:10%"/>
- <col style="width:40%;"/>
- <col style="width:10%;"/>
- <col style="width:35%;"/>
- <col/>
- </colgroup>
- <tr>
- <th>기획전구분<i class="star"></i></th>
- <td>
- <select name="planGb" required="required" data-valid-name="기획전구분" onchange="fnChangePlanGb(this);">
- <option value="P">기획전</option>
- <option value="E">이벤트</option>
- </select>
- </td>
- <th>기획전탬플릿유형<i class="star"></i></th>
- <td colspan="3">
- <button type="button" class="btn btn-default btn-lg" onclick="fnPlanTemplatePopup();">템플릿</button>
- <!-- <select name="templateType" required="required" data-valid-name="기획전탬플릿유형">
- <option value="H">HTML</option>
- <option value="T">TEXT</option>
- </select> -->
- </td>
- </tr>
- <tr>
- <th>프론트 구분<i class="star"></i></th>
- <td>
- <select name="frontGb" id="frontGb" required="required" data-valid-name="프론트 구분">
- <option value="A">전체</option>
- <option value="P">웹</option>
- <option value="M">모바일</option>
- </select>
- </td>
- <th>기획전명<i class="star"></i></th>
- <td colspan="3">
- <input type="text" name="planNm" id="planNm" maxlength="50" required="required" data-valid-name="기획전명"/>
- </td>
- </tr>
- <tr>
- <th>진행기간<i class="star"></i></th>
- <td>
- <input type="text" class="schDate w100" id="viewStartDtNew" name="startSearchDate" maxlength="10" required="required" data-valid-name="노출기간" />
- <select name="startSearchHour" required="required" data-valid-name="진행기간 시작시간">
- <th:block th:each="num, index : ${#numbers.sequence(0,23)}">
- <option th:value="${#numbers.formatInteger(num,2)}" th:text="|${#numbers.formatInteger(num,2)}시|" >시간</option>
- </th:block>
- </select>
- <select name="startSearchMin" required="required" data-valid-name="진행기간 시작시간">
- <th:block th:each="num: ${#numbers.sequence(0,59)}">
- <option th:value="${#numbers.formatInteger(num,2)}" th:text="|${#numbers.formatInteger(num,2)}분|" >분</option>
- </th:block>
- </select>
- ~
- <input type="text" class="schDate w100" id="viewEndDtNew" name="endSearchDate" maxlength="10" required="required" data-valid-name="노출기간"/>
- <select name="endSearchHour" required="required" data-valid-name="진행기간 종료시간">
- <th:block th:each="num, index : ${#numbers.sequence(0,23)}">
- <option th:value="${#numbers.formatInteger(num,2)}" th:text="|${#numbers.formatInteger(num,2)}시|" th:selected="${#numbers.formatInteger(num,2)}==23 ? 'true'">시간</option>
- </th:block>
- </select>
- <select name="endSearchMin" required="required" data-valid-name="진행기간 종료시간">
- <th:block th:each="num: ${#numbers.sequence(0,59)}">
- <option th:value="${#numbers.formatInteger(num,2)}" th:text="|${#numbers.formatInteger(num,2)}분|" th:selected="${#numbers.formatInteger(num,2)}==59 ? 'true'">분</option>
- </th:block>
- </select>
- <input type="hidden" name="dispStdt" id="dispStdt"/>
- <input type="hidden" name="dispEddt" id="dispEddt"/>
- </td>
- <th>서브제목</th>
- <td colspan="3">
- <input type="text" name="dtlTitle1" id="dtlTitle1"/>
- </td>
- </tr>
- <tr>
- <th>코너명노출 여부<i class="star"></i></th>
- <td>
- <select name="cornerNmDispYn" required="required" data-valid-name="코너명노출 여부">
- <option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:selected="${oneData.cd} == 'Y'" th:text="|${oneData.cdNm}|"></option>
- </select>
- </td>
- <th>오픈여부<i class="star"></i></th>
- <td colspan="3">
- <select name="openYn" required="required" data-valid-name="오픈여부">
- <option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:selected="${oneData.cd} == 'Y'" th:text="|${oneData.cdNm}|"></option>
- </select>
- </td>
- </tr>
- <tr>
- <th>사이트<i class="star"></i></th>
- <td>
- <select name="siteCd" required="required" data-valid-name="사이트">
- <option th:if="${siteList}" th:each="oneData, status : ${siteList}" th:value="${oneData.cd}" th:text="|${oneData.cdNm}|"></option>
- </select>
- </td>
- <th>전시순서</th>
- <td colspan="3">
- <input type="text" class="w100 aR" name="dispOrd"/>
- </td>
- </tr>
- <tr>
- <th>사용고객등급구분<em class="required" title="필수"></em></th>
- <td>
- <label class="chkBox" th:if="${usableCustGradeList}" th:each="oneData, status : ${usableCustGradeList}">
- <input type="checkbox" name="usableCustGradeArr" th:value="${oneData.cd}" th:text="${oneData.cdNm}"/>
- </label>
- </td>
- <th>사용가능고객구분<em class="required" title="필수"></em></th>
- <td>
- <label class="chkBox" th:if="${usableCustGbList}" th:each="oneData, status : ${usableCustGbList}">
- <input type="checkbox" name="usableCustGbArr" th:value="${oneData.cd}" th:text="${oneData.cdNm}"/>
- </label>
- </td>
- </tr>
- <tr>
- <th>제휴채널<em class="required" title="필수"></em></th>
- <td>
- <label class="chkBox" th:if="${upperAfLinkCdList}" th:each="oneData, status : ${upperAfLinkCdList}">
- <input type="checkbox" name="upperAfLinkCdArr" th:value="${oneData.cd}" th:text="${oneData.cdNm}"/>
- </label>
- </td>
- <th>댓글여부</th>
- <td colspan="5">
- <select name="replyYn">
- <option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:selected="${oneData.cd} == 'N'" th:text="|${oneData.cdNm}|"></option>
- </select>
- </td>
- </tr>
- <tr>
- <th>PC 메인 이미지<i id="pMimgStar"></i></th>
- <td colspan="5">
- <div class="uFile w400">
- <input id="registerMainPimg" name="registerMainPimg" type="file" accept="image/*" class="uFileInput w400"/>
- <label for="registerMainPimg" class="uFileLabel w400">파일선택</label>
- <input type="hidden" name="mainPimg" id="mainPimg" value=""/>
- </div>
- </td>
- </tr>
- <tr>
- <th>모바일 메인 이미지<i id="mMimgStar"></i></th>
- <td colspan="5">
- <div class="uFile w400">
- <input id="registerMainMimg" name="registerMainMimg" type="file" accept="image/*" class="uFileInput w400"/>
- <label for="registerMainMimg" class="uFileLabel w400">파일선택</label>
- <input type="hidden" name="mainMimg" id="mainMimg" value=""/>
- </div>
- </td>
- </tr>
- </tbody>
- <tbody>
- <!-- <tr>
- <th>웹용소스</th>
- <td colspan="5">
- <div style="margin-top:5px;">
- <textarea name="fsrcPc" id="fsrcPcRegister" rows="15" cols="95" style="width:1280px;"></textarea>
- <textarea class="textareaR4" id="fsrcPcDetail" name="fsrcPc"></textarea>
- </div>
- </td>
- </tr>
- <tr>
- <th>모바일용소스</th>
- <td colspan="5">
- <div style="margin-top:5px;">
- <textarea name="fsrcMobile" id="fsrcMobileRegister" rows="15" cols="95" style="width:1280px;"></textarea>
- <textarea class="textareaR4" id="fsrcMobileDetail" name="fsrcMobile"></textarea>
- </div>
- </td>
- </tr> -->
- </table>
- <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>카테고리/브랜드</th>
- <td>
- <!-- 수정시 프로모션명 입력 : before -->
- <div class="padding10"
- style="display: inline-block; width: 49%;">
- <!--<span>공급업체 설정</span>-->
- <div class="padding10 inner-tb-solid">
- <span class="buttonSpan">
- <button type="button"
- class="btn btnRight btn-success btn-lg"
- id="btnAddCate">카테고리 추가</button>
- <button type="button"
- class="btn btnRight btn-success btn-lg"
- id="btnDeleteCate">선택삭제</button>
- </span> <br />
- <div id="gridFGCateList"
- style="width: 100%; height: 200px;"
- class="ag-theme-balham"></div>
- </div>
- </div>
- <div class="padding10"
- style="display: inline-block; width: 49%;">
- <!--<span>브랜드 설정</span>-->
- <div class="padding10 inner-tb-solid">
- <span class="buttonSpan">
- <button type="button"
- class="btn btnRight btn-success btn-lg" id="btnAddBrand">브랜드
- 추가</button>
- <button type="button"
- class="btn btnRight btn-success btn-lg"
- id="btnDeleteBrand">선택삭제</button>
- </span> <br />
- <!-- 브랜드 선택 팝업(단수 선택 팝업... 복수를 새로 만들어야하는지 ? 아니면 변수처리해야하는지 ? -->
- <div id="gridFGBrandList"
- style="width: 100%; height: 200px;"
- class="ag-theme-balham"></div>
- </div>
- </div>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- <ul class="panelBar">
- <li class="right" th:if="${mode == 'N'}">
- <button type="button" class="btn btn-info btn-lg" onclick="fnPlanSave('#planRegisterForm');">저장</button>
- </li>
- </ul>
- </form>
- </div>
- </div>
- </div>
- <script type="text/javascript" src="/ux/plugins/summernote/summernote.js?v=2020103001"></script>
- <script type="text/javascript" src="/ux/plugins/gaga/gaga.summernote.js?v=2020103001"></script>
- <script th:inline="javascript">
- /*<![CDATA[*/
- var mode = [[${mode}]];
- var planInfo = [[${planInfo}]];
- var fsrcPc = [[${fsrcPc}]];
- var fsrcMobile = [[${fsrcMobile}]];
- var planBrandList = [[${planBrandList}]];
- var planCateList = [[${planCateList}]];
- var snOptions;
- // 카테고리 전시 여부
- var fnCataCheck = function(is, formId) {
- if (is.checked) {
- $(formId + ' input[name=cateDispYn]').val('Y');
- // 추후 카테고리 표시
- } else {
- $(formId + ' input[name=cateDispYn]').val('N');
- }
- }
- // 상품제한여부
- var fnGoodsCheck = function(is, formId) {
- if (is.checked) {
- $(formId + ' input[name=goodsLimitYn]').val('Y');
- $(formId + ' input[name=goodsLimitQty]').show();
- $(formId + ' input[name=goodsLimitQty]').focus();
- // 추후 카테고리 표시
- } else {
- $(formId + ' input[name=goodsLimitYn]').val('N');
- $(formId + ' input[name=goodsLimitQty]').hide();
- }
- }
-
- //템플릿 유형 설정
- var fnPlanTemplatePopup = function () {
- var actionUrl = "/marketing/planning/detail/template/form?mode=C";
- cfnOpenModalPopup(actionUrl,'popupPlanTemplate');
- }
-
- // 기존 기획전 조회 선택시
- $('#btnPopupSearchPlan').on('click', function(result) {
- cfnOpenPlanPopup('popupPlan');
-
- });
-
- var popupPlan = function (result) {
- $("#planSq_Hideen").val(result[0].planSq);
- $("#searchTxt").val("[" + result[0].planSq + "] " +result[0].planNm);
-
- }
- // 기획전 복사
- var fnPlanCopyPopup = function() {
- var planSq = $("#planSq_Hideen").val();
- if (gagajf.isNull(planSq)) {
- mcxDialog.alert('복사할 기획전을 선택하세요.');
- return;
- }
- mcxDialog.confirm('선택 된 기획전을 복사 하시겠습니까?', {
- cancelBtnText: "취소",
- sureBtnText: "확인",
- sureBtnClick: function() {
- var actionUrl = '/marketing/planning/copy';
- var data = {copyPlanSq : planSq};
- var jsonData = JSON.stringify(data);
- gagajf.ajaxJsonSubmit(actionUrl, jsonData, fnCopyCallback);
- }
- });
- }
- // 기획전 복사 callback
- var fnCopyCallback = function(result) {
- uifnPopupClose('planRegisterFormDiv');
- fnPlanListSearch();
- var actionUrl = "/marketing/planning/detail/form?mode=U&planSq=" + result.planSq;
- cfnOpenModalPopup(actionUrl,'popupPlan');
- }
- var fnPlanSave = function(formId) {
- if (!gagajf.validation(formId))
- return;
- // 날짜 유효성 체크
- var stDate = $(formId + ' input[name=startSearchDate]').val().replaceAll("-", "");
- var edDate = $(formId + ' input[name=endSearchDate]').val().replaceAll("-", "");
- var toDate = _today.replaceAll("-", "");
- if (Number(stDate) > Number(edDate)) {
- mcxDialog.alert('종료일자는 시작일자 보다 클 수 없습니다.');
- return;
- }
- if (Number(stDate) < Number(toDate) && mode == 'N') {
- mcxDialog.alert('시작일자는 오늘포함 이후로 등록해주세요.');
- return;
- }
- if (Number(edDate) < Number(toDate) && mode == 'N') {
- mcxDialog.alert('종료일자는 오늘포함 이후로 등록해주세요.');
- return;
- }
-
- stDate = $(formId + ' input[name=startSearchDate]').val();
- edDate = $(formId + ' input[name=endSearchDate]').val();
- $(formId + ' input[name=dispStdt]').val(stDate + ' ' + $(formId + ' select[name=startSearchHour]').val() + ':' + $(formId + ' select[name=startSearchMin]').val() + ':00');
- $(formId + ' input[name=dispEddt]').val(edDate + ' ' + $(formId + ' select[name=endSearchHour]').val() + ':' + $(formId + ' select[name=endSearchMin]').val() + ':59');
- /* // 댓글여부에 따른 위치 체크
- if ($('#replyYn').val() == 'Y') {
- var replyLoc = $(':radio[name="replyLoc"]:checked').val();
- if (typeof replyLoc == 'undefined') {
- mcxDialog.alert('댓글 사용 시 댓글위치를 선택해야합니다.');
- return;
- }
- } */
- // poll 관리일련번호 유효성 체크
- /* if (!gagajf.isNull($(formId + ' input[name=pollSq]').val())) {
- gagajf.ajaxFormSubmit('/marketing/poll/list', formId, function(result) {
- console.log(result);
- if (result.length < 1) {
- mcxDialog.alert('입력하신 투표 일련번호가 존재 하지않습니다.');
- return;
- }
- });
- } */
- var privacyPolicy = '';
- var frontGb = $('#frontGb').val();
- if (mode =='U') {
- //if($("#planGb").val()=='E'){
- // privacyPolicy = gagaSn.getContents('privacyPolicyDetail');
- //}
-
- // 이미지 처리
- if ((!$('input[name=orgMainPimgDelYn]').is(':checked') ? true : false) &&
- (gagajf.isNull($(formId + ' input[name=mainPimg]').val()) == true) ) {
- $(formId + ' input[name=mainPimg]').val($(formId + ' input[name=orgMainPimg]').val());
- }
- if ((!$('input[name=orgMainMimgDelYn]').is(':checked') ? true : false) &&
- (gagajf.isNull($(formId + ' input[name=mainMimg]').val()) == true) ) {
- $(formId + ' input[name=mainMimg]').val($(formId + ' input[name=orgMainMimg]').val());
- }
- if ((!$('input[name=orgDtlPimgDelYn]').is(':checked') ? true : false) &&
- (gagajf.isNull($(formId + ' input[name=dtlPimg]').val()) == true) ) {
- $(formId + ' input[name=dtlPimg]').val($(formId + ' input[name=orgDtlPimg]').val());
- }
- if ((!$('input[name=orgDtlMimgDelYn]').is(':checked') ? true : false) &&
- (gagajf.isNull($(formId + ' input[name=dtlMimg]').val()) == true) ) {
- $(formId + ' input[name=dtlMimg]').val($(formId + ' input[name=orgDtlMimg]').val());
- }
- if ((!$('input[name=orgReplyImgYn]').is(':checked') ? true : false) &&
- (gagajf.isNull($(formId + ' input[name=replyImg]').val()) == true) ) {
- $(formId + ' input[name=replyImg]').val($(formId + ' input[name=orgReplyImg]').val());
- }
- } else {
- //gagaSn.getContents('fsrcPcRegister');
- //gagaSn.getContents('fsrcMobileRegister');
- //if($("#planGb").val()=='E'){
- // privacyPolicy = gagaSn.getContents('privacyPolicyRegister');
- //}
- }
- if(!gagajf.isNull($(formId + ' input[name=planQtitle]').val()) && gagajf.isNull(privacyPolicy.replace(/<br>/gi, '').replace(/<p>/gi, '').replace(/<\/\p>/gi, ''))){
- mcxDialog.alert('입력항목 등록 시 개인정보 수집동의를 입력해 주세요.');
- return;
- }
- //var jsonData = JSON.stringify($("#planRegisterForm").serializeObject());
-
- let allBrandData = gagaAgGrid.getAllRowData(gridOptionsFGBrandList);
- var multiBrand = [];
- $.each(allBrandData, function(idx, item) {
- multiBrand.push(item.brandCd);
- });
-
- let allCateData = gagaAgGrid.getAllRowData(gridOptionsFGCateList);
- var multiCate = [];
- $.each(allCateData, function(idx, item) {
- multiCate.push(item.cateNo);
- });
-
- // 기획전 등록
- if (formId == '#planRegisterForm') {
- mcxDialog.confirm('등록 하시겠습니까?', {
- cancelBtnText: "취소",
- sureBtnText: "확인",
- sureBtnClick: function() {
-
- let data = {
- multiBrand : multiBrand
- ,brandList : allBrandData
- ,multiCate : multiCate
- ,CateList : allCateData
- ,mode : $('#planRegisterForm input[name=mode]').val()
- ,planSq : $('#planRegisterForm input[name=planSq]').val()
- ,planGb : $('#planRegisterForm select[name=planGb]').val()
- ,templateType : $('#planRegisterForm select[name=templateType]').val()
- ,frontGb : $('#planRegisterForm select[name=frontGb]').val()
- ,planNm : $('#planRegisterForm input[name=planNm]').val()
- ,startSearchDate : $('#planRegisterForm input[name=startSearchDate]').val()
- ,startSearchHour : $('#planRegisterForm input[name=startSearchHour]').val()
- ,startSearchMin : $('#planRegisterForm input[name=startSearchMin]').val()
- ,endSearchDate : $('#planRegisterForm input[name=endSearchDate]').val()
- ,endSearchHour : $('#planRegisterForm input[name=endSearchHour]').val()
- ,endSearchMin : $('#planRegisterForm input[name=endSearchMin]').val()
- ,dispStdt : $('#planRegisterForm input[name=dispStdt]').val()
- ,dispEddt : $('#planRegisterForm input[name=dispEddt]').val()
- ,dtlTitle1 : $('#planRegisterForm input[name=dtlTitle1]').val()
- ,cornerNmDispYn : $('#planRegisterForm select[name=cornerNmDispYn]').val()
- ,openYn : $('#planRegisterForm select[name=openYn]').val()
- ,siteCd :$('#planRegisterForm select[name=siteCd]').val()
- ,dispOrd : $('#planRegisterForm input[name=dispOrd]').val()
- ,replyYn : $('#planRegisterForm select[name=replyYn]').val()
- ,mainPimg :$('#planRegisterForm input[name=mainPimg]').val()
- ,mainMimg : $('#planRegisterForm input[name=mainMimg]').val()
- ,fsrcPc : $('#planRegisterForm input[name=fsrcPc]').val()
- ,fsrcMobile : $('#planRegisterForm input[name=fsrcMobile]').val()
- }
-
- var jsonData = JSON.stringify(data);
- gagajf.ajaxJsonSubmit("/marketing/planning/detail/create", jsonData, fnPlanDetailCallBack);
- uifnPopupClose('planRegisterFormDiv');
- fnPlanListSearch();
- //fnPlanDetailClose();
- }
- });
- } else { // 기획전 수정
- mcxDialog.confirm('저장 하시겠습니까?', {
- cancelBtnText: "취소",
- sureBtnText: "확인",
- sureBtnClick: function() {
-
- let data = {
- multiBrand : multiBrand
- ,brandList : allBrandData
- ,multiCate : multiCate
- ,CateList : allCateData
- ,mode : $('#planUpdateForm input[name=mode]').val()
- ,planSq : $('#planUpdateForm input[name=planSq]').val()
- ,planGb : $('#planUpdateForm select[name=planGb]').val()
- ,templateType : $('#planUpdateForm select[name=templateType]').val()
- ,frontGb : $('#planUpdateForm select[name=frontGb]').val()
- ,planNm : $('#planUpdateForm input[name=planNm]').val()
- ,startSearchDate : $('#planUpdateForm input[name=startSearchDate]').val()
- ,startSearchHour : $('#planUpdateForm input[name=startSearchHour]').val()
- ,startSearchMin : $('#planUpdateForm input[name=startSearchMin]').val()
- ,endSearchDate : $('#planUpdateForm input[name=endSearchDate]').val()
- ,endSearchHour : $('#planUpdateForm input[name=endSearchHour]').val()
- ,endSearchMin : $('#planUpdateForm input[name=endSearchMin]').val()
- ,dispStdt : $('#planUpdateForm input[name=dispStdt]').val()
- ,dispEddt : $('#planUpdateForm input[name=dispEddt]').val()
- ,dtlTitle1 : $('#planUpdateForm input[name=dtlTitle1]').val()
- ,cornerNmDispYn : $('#planUpdateForm select[name=cornerNmDispYn]').val()
- ,openYn : $('#planUpdateForm select[name=openYn]').val()
- ,siteCd :$('#planUpdateForm select[name=siteCd]').val()
- ,dispOrd : $('#planUpdateForm input[name=dispOrd]').val()
- ,replyYn : $('#planUpdateForm select[name=replyYn]').val()
- ,mainPimg :$('#planUpdateForm input[name=mainPimg]').val()
- ,mainMimg : $('#planUpdateForm input[name=mainMimg]').val()
- ,fsrcPc : $('#planUpdateForm input[name=fsrcPc]').val()
- ,fsrcMobile : $('#planUpdateForm input[name=fsrcMobile]').val()
- }
-
-
- var actionUrl = '/marketing/plan/detail/update';
- var jsonData = JSON.stringify(data);
- gagajf.ajaxJsonSubmit(actionUrl, jsonData, fnPlanDetailCallBack);
- uifnPopupClose('planRegisterFormDiv');
- fnPlanListSearch();
- //fnPlanDetailClose();
- }
- });
- }
- }
- // 이미지 첨부
- $('input[name=registerMainPimg],input[name=registerMainMimg],input[name=registerDtlPimg],input[name=registerDtlMimg],input[name=registerReplyImg]').on('change', function() {
- var name = $(this)[0].name;
- var file = this.files[0];
- gagajf.ajaxFileUpload('/common/file/upload?subDir=/planning'
- , file
- , function(result) {
- if (name == 'registerMainPimg')
- $('input[name=mainPimg]').val(result.newFileName);
- if (name == 'registerMainMimg')
- $('input[name=mainMimg]').val(result.newFileName);
- if (name == 'registerDtlPimg')
- $('input[name=dtlPimg]').val(result.newFileName);
- if (name == 'registerDtlMimg')
- $('input[name=dtlMimg]').val(result.newFileName);
- if (name == 'registerReplyImg')
- $('input[name=replyImg]').val(result.newFileName);
- }
- , 'image'
- );
- });
- var fnChangePlanGb = function(obj) {
- if($(obj).val()=='E'){
- $("#questionEventInsert").show();
- $("#questionEventUpdate").show();
- if (mode =='U') {
- if($("#privacyPolicyDetail").closest('div').children('#the_iframe').length==0){
- gagaSn.createSummernote(snOptions, '#privacyPolicyDetail');
- }
- }else{
- if($("#privacyPolicyRegister").closest('div').children('#the_iframe').length==0){
- gagaSn.createSummernote(snOptions, '#privacyPolicyRegister');
- }
- }
- }else{
- $("#questionEventInsert").hide();
- $("#questionEventUpdate").hide();
- }
- }
- var fnAddRow = function(obj){
- var html = '<div>';
- html += '<input type="text" class="w200" name="planQtitle"/>';
- html += '<label class="chkBox"><input type="checkbox" onclick="fnAttachYnClick(this);" />첨부파일</label>';
- html += '<button type="button" class="btn icn" onclick="fnDeleteRow(this);"><i class="fa fa-times" aria-hidden="true"></i></button>';
- html += '<input type="hidden" name="attachYn" value="N"/>';
- html += '</div>';
- $(obj).closest('td').append(html);
- }
- var fnDeleteRow = function(obj){
- $(obj).closest('div').remove();
- }
- var fnAttachYnClick = function(obj){
- var val = 'N';
- if($(obj).prop('checked')){
- val = 'Y';
- }
- $(obj).closest('div').find('input[name="attachYn"]').val(val);
- }
- var fnPlanDetailCallBack = function() {
- uifnPopupClose('planRegisterForm');
- fnPlanListSearch();
-
- }
-
- // 브랜드 리스트 설정
- var columnBrandList = [
- {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
- {headerName: "브랜드ID", field: "brandCd", width: 110, cellClass: 'text-center'},
- {headerName: "브랜드명", field: "brandEnm", width: 120, cellClass: 'text-center'},
- {headerName: "브랜드그룹명", field: "brandGrpNm", width: 150, cellClass: 'text-center'},
- {headerName: "", field: "brandKnm", width: 150, cellClass: 'text-center'},
- /* {headerName: "적용대상", field: "targetGb", width: 150, cellClass: 'text-center', hide: true},
- {headerName: "시퀀스", field: "tmtbGoodsSq", width: 150, cellClass: 'text-center', hide: true},
- {headerName: "삭제여부", field: "delYn", width: 150, cellClass: 'text-center', hide: true} */
- ];
-
- // 브랜드 그리드 설정
- var gridOptionsFGBrandList = gagaAgGrid.getGridOptions(columnBrandList);
- gridOptionsFGBrandList.rowSelection = "multiple";
- gridOptionsFGBrandList.suppressRowClickSelection = true;
-
- // 브랜드 추가 버튼 클릭시 (복수 브랜드때 수정 필요)
- $('#btnAddBrand').on('click', function() {
- cfnOpenBrandListPopup("fnSetPopupBrandInfo", "M");
- });
-
- // 브랜드 설정 선택삭제 버튼 클릭시
- $('#btnDeleteBrand').on('click', function() {
- gridOptionsFGBrandList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGBrandList)});
- });
-
- // 브랜드 설정 / 브랜드 추가 콜백함수 (단수로 가져오므로 복수일 경우에 수정 확인 필요)
- var fnSetPopupBrandInfo = function(result) {
- for(let i = 0 ; i < result.length ; i++) {
- let addChk = true, gridListValue = gagaAgGrid.getAllRowData(gridOptionsFGBrandList); // 받아온 모든 데이터
- // 받아온 data for
- for(let j = 0 ; j < gridListValue.length ; j++) {
- if(gridListValue[j].brandCd == result[i].brandCd) { addChk = false; } // 중복체크
- }
- // 중복되지 않은 데이터 리스트에 추가
- if(addChk) {
- gagaAgGrid.addRowData(gridOptionsFGBrandList, {"brandCd" : result[i].brandCd, "brandEnm" : result[i].brandEnm, "brandKnm" : result[i].brandKnm});
- }
- }
- };
-
- // 카테고리 리스트 설정
- var columnCateList = [
- {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
- {headerName: "사이트", field: "siteCd", width: 120, cellClass: 'text-center'},
- {headerName: "카테고리 구분", field: "cateGb", width: 110, cellClass: 'text-center'},
- {headerName: "카테고리 이름", field: "cateNm", width: 120, cellClass: 'text-center'},
- {headerName: "번호", field: "cateNo", width: 150, cellClass: 'text-center', hide: true},
- /* {headerName: "시퀀스", field: "tmtbGoodsSq", width: 150, cellClass: 'text-center', hide: true},
- {headerName: "삭제여부", field: "delYn", width: 150, cellClass: 'text-center', hide: true} */
- ];
-
- // 카테고리 그리드 설정
- var gridOptionsFGCateList = gagaAgGrid.getGridOptions(columnCateList);
- gridOptionsFGCateList.rowSelection = "multiple";
- gridOptionsFGCateList.suppressRowClickSelection = true;
-
- // 브랜드 설정 선택삭제 버튼 클릭시
- $('#btnDeleteCate').on('click', function() {
- gridOptionsFGCateList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGCateList)});
- });
-
-
-
- // 카테고리 추가
- $('#btnAddCate').on('click' , function () {
- cfnOpenCategoryPopup("fnSetPopupCategoryInfo");
- });
-
- // 카테고리 추가 콜백 함수
- var fnSetPopupCategoryInfo = function (result) {
- // 기존 리스트 데이터 for
- for(let i = 0 ; i < result.length ; i++) {
- let addChk = true, gridListValue = gagaAgGrid.getAllRowData(gridOptionsFGCateList); // 받아온 모든 데이터
- // 받아온 data for
- for(let j = 0 ; j < gridListValue.length ; j++) {
- // 동일한 data는 추가하지 않음
- if(gridListValue[j].cateNo == result[i].cateNo) { addChk = false; } // 중복체크
- }
- // 중복되지 않은 데이터 리스트에 추가
- if(addChk) {
- if(result[i].cate2No!=null)
- {
- mcxDialog.alert('카테고리1에서 선택하세요.');
- return;
- }
- gagaAgGrid.addRowData(gridOptionsFGCateList, {"siteCd":result[i].siteCd , "cateGb":result[i].cateGb, "cateNm":result[i].cateNm, "cateNo":result[i].cateNo});
- }
- }
- }
-
-
- $(document).ready(function() {
-
- snOptions = gagaSn.getToolbarOptions('media');
-
- // 썸머노트 그리기
- gagaSn.createSummernote(snOptions, '#fsrcPcDetail');
- gagaSn.createSummernote(snOptions, '#fsrcMobileDetail');
-
- // 그리드 그리기
- gagaAgGrid.createGrid("gridFGBrandList", gridOptionsFGBrandList);
- gagaAgGrid.createGrid("gridFGCateList", gridOptionsFGCateList);
-
- if (mode =='U') {
- /* $('#planDetailForm input[name=badgeFcolor]').spectrum({
- preferredFormat: "hex",
- showInput: true,
- allowEmpty: true
- });
- $('#planDetailForm input[name=badgeBcolor]').spectrum({
- preferredFormat: "hex",
- showInput: true,
- allowEmpty: true
- }); */
-
- gridOptionsFGBrandList.api.setRowData(planBrandList);
- gridOptionsFGCateList.api.setRowData(planCateList);
- if (planInfo.goodsLimitYn == 'N') {
- $('#planDetailForm input[name=goodsLimitQty]').hide();
- } else {
- $('#planDetailForm input[name=goodsLimitQty]').show();
- }
- // 썸머노트 값 설정
- $('#fsrcPcDetail').summernote('code', fsrcPc.fsrc);
- $('#fsrcMobileDetail').summernote('code', fsrcMobile.fsrc);
- if($("#planGb").val()!='E'){
- $("#questionEventInsert").hide();
- $("#questionEventUpdate").hide();
- }else{
- gagaSn.createSummernote(snOptions, '#privacyPolicyRegister');
- }
- } else {
- /* $('#planRegisterForm input[name=badgeFcolor]').spectrum({
- preferredFormat: "hex",
- showInput: true,
- allowEmpty: true
- });
- $('#planRegisterForm input[name=badgeBcolor]').spectrum({
- preferredFormat: "hex",
- showInput: true,
- allowEmpty: true
- }); */
- $("#viewStartDtNew").val(_today);
- $("#viewEndDtNew").val(_today);
- $("#questionEventInsert").hide();
- $("#questionEventUpdate").hide();
- }
- $('#frontGb').trigger('change');
- });
- /*]]>*/
- </script>
- </html>
|