|
@@ -1,6 +1,6 @@
|
|
|
<!DOCTYPE html>
|
|
<!DOCTYPE html>
|
|
|
<html lang="ko"
|
|
<html lang="ko"
|
|
|
- xmlns:th="http://www.thymeleaf.org">
|
|
|
|
|
|
|
+ xmlns:th="http://www.thymeleaf.org">
|
|
|
<!--
|
|
<!--
|
|
|
*******************************************************************************
|
|
*******************************************************************************
|
|
|
* @source : FreeGoodsPromotionRegiForm.html
|
|
* @source : FreeGoodsPromotionRegiForm.html
|
|
@@ -13,687 +13,674 @@
|
|
|
* === =========== ========== =============================================
|
|
* === =========== ========== =============================================
|
|
|
* 1.0 2020.12.23 xodud1202 최초 작성
|
|
* 1.0 2020.12.23 xodud1202 최초 작성
|
|
|
*******************************************************************************
|
|
*******************************************************************************
|
|
|
- -->
|
|
|
|
|
- <div class="modalPopup frGoodsPro" data-width="1100">
|
|
|
|
|
- <div class="panelStyle" style="max-height:900px;overflow-y:scroll;">
|
|
|
|
|
- <div class="panelTitle">
|
|
|
|
|
- <h2>사은품 프로모션 관리</h2>
|
|
|
|
|
- <button type="button" class="close" onclick="fnFreeGoodsPromotionFormClose()"><i class="fa fa-times"></i></button>
|
|
|
|
|
|
|
+ -->
|
|
|
|
|
+<div class="modalPopup frGoodsPro" data-width="1100">
|
|
|
|
|
+ <div class="panelStyle" style="max-height:900px;overflow-y:scroll;">
|
|
|
|
|
+ <div class="panelTitle">
|
|
|
|
|
+ <h2>사은품 프로모션 관리</h2>
|
|
|
|
|
+ <button type="button" class="close" onclick="fnFreeGoodsPromotionFormClose()"><i class="fa fa-times"></i></button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <form id="freeGoodsPromotionForm" name="freeGoodsPromotionForm" th:method="post" >
|
|
|
|
|
+ <input type="hidden" name="gbn" th:value="${param.gbn}" /> <!-- 신규/수정 구분 -->
|
|
|
|
|
+ <input type="hidden" id="supplyCompCds" name="supplyCompCds"/> <!-- 공급업체 리스트 -->
|
|
|
|
|
+ <input type="hidden" id="brandCds" name="brandCds"/> <!-- 브랜드 리스트 -->
|
|
|
|
|
+ <input type="hidden" id="applyGoodsCds" name="applyGoodsCds"/> <!-- 적용상품 리스트 -->
|
|
|
|
|
+ <input type="hidden" id="exceptGoodsCds" name="exceptGoodsCds"/> <!-- 제외상품 리스트 -->
|
|
|
|
|
+ <input type="hidden" id="freeGoods1Cds" name="freeGoods1Cds"/> <!-- 적용 사은품1 리스트 -->
|
|
|
|
|
+ <input type="hidden" id="freeGoods2Cds" name="freeGoods2Cds"/> <!-- 적용 사은품2 리스트 -->
|
|
|
|
|
+ <input type="hidden" id="extmallIds" name="extmallIds" value=""/> <!-- 적용 사은품2 리스트 -->
|
|
|
|
|
+
|
|
|
|
|
+ <div class="panelContent">
|
|
|
|
|
+ <table class="frmStyle">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col width="10%"/>
|
|
|
|
|
+ <col width="50%"/>
|
|
|
|
|
+ <col width="10%"/>
|
|
|
|
|
+ <col width="40%"/>
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>프로모션명<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <!-- 수정시 프로모션명 입력 : before -->
|
|
|
|
|
+ <input class="w50p" type="text" id="freegiftNm" name="freegiftNm" minlength="2" maxlength="30" required="required" data-valid-name="프로모션명"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>프로모션ID</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <!-- 프로모션 ID 입력 : before -->
|
|
|
|
|
+ <span />
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>행사 기간<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" class="schDate w100" id="freegiftStdt" name="freegiftStdt" maxlength="10" required="required" data-valid-name="시작일자"/>
|
|
|
|
|
+ ~
|
|
|
|
|
+ <input type="text" class="schDate w100" id="freegiftEddt" name="freegiftEddt" maxlength="10" required="required" data-valid-name="종료일자"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <!-- <td id="promotionTerms">수정시 행사기간 입력되도록 수정(JAVASCRIPT?) : before</td> -->
|
|
|
|
|
+ <th>상태</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <!-- 상태 입력 : before -->
|
|
|
|
|
+ <span />
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>적용 몰 구분<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td colspan="3">
|
|
|
|
|
+ <label class="chkBox"><input type="checkbox" name="mallCds" value="G011_10"/>자사몰</label>
|
|
|
|
|
+ <label class="chkBox" id="G011_20"><input type="checkbox" name="mallCds" value="G011_20"/>제휴몰</label>
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnExtmallPopup">선택</button><span id="extmallCntArea"> 선택 : <span id="extmallCnt">00</span>개</span>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </table>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <form id="freeGoodsPromotionForm" name="freeGoodsPromotionForm" th:method="post" >
|
|
|
|
|
- <input type="hidden" name="gbn" th:value="${param.gbn}" /> <!-- 신규/수정 구분 -->
|
|
|
|
|
- <input type="hidden" id="supplyCompCds" name="supplyCompCds"/> <!-- 공급업체 리스트 -->
|
|
|
|
|
- <input type="hidden" id="brandCds" name="brandCds"/> <!-- 브랜드 리스트 -->
|
|
|
|
|
- <input type="hidden" id="applyGoodsCds" name="applyGoodsCds"/> <!-- 적용상품 리스트 -->
|
|
|
|
|
- <input type="hidden" id="exceptGoodsCds" name="exceptGoodsCds"/> <!-- 제외상품 리스트 -->
|
|
|
|
|
- <input type="hidden" id="freeGoods1Cds" name="freeGoods1Cds"/> <!-- 적용 사은품1 리스트 -->
|
|
|
|
|
- <input type="hidden" id="freeGoods2Cds" name="freeGoods2Cds"/> <!-- 적용 사은품2 리스트 -->
|
|
|
|
|
- <input type="hidden" id="extmallIds" name="extmallIds" value=""/> <!-- 적용 사은품2 리스트 -->
|
|
|
|
|
-
|
|
|
|
|
- <div class="panelContent">
|
|
|
|
|
- <table class="frmStyle">
|
|
|
|
|
- <colgroup>
|
|
|
|
|
- <col width="10%"/>
|
|
|
|
|
- <col width="50%"/>
|
|
|
|
|
- <col width="10%"/>
|
|
|
|
|
- <col width="40%"/>
|
|
|
|
|
- </colgroup>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>프로모션명<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <!-- 수정시 프로모션명 입력 : before -->
|
|
|
|
|
- <input class="w50p" type="text" id="freegiftNm" name="freegiftNm" minlength="2" maxlength="30" required="required" data-valid-name="프로모션명"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>프로모션ID</th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <!-- 프로모션 ID 입력 : before -->
|
|
|
|
|
- <span />
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>행사 기간<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <input type="text" class="schDate w100" id="freegiftStdt" name="freegiftStdt" maxlength="10" required="required" data-valid-name="시작일자"/>
|
|
|
|
|
- ~
|
|
|
|
|
- <input type="text" class="schDate w100" id="freegiftEddt" name="freegiftEddt" maxlength="10" required="required" data-valid-name="종료일자"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <!-- <td id="promotionTerms">수정시 행사기간 입력되도록 수정(JAVASCRIPT?) : before</td> -->
|
|
|
|
|
- <th>상태</th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <!-- 상태 입력 : before -->
|
|
|
|
|
- <span />
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>적용 몰 구분<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td colspan="3">
|
|
|
|
|
- <label class="chkBox"><input type="checkbox" name="mallCds" value="G011_10"/>자사몰</label>
|
|
|
|
|
- <label class="chkBox" id="G011_20"><input type="checkbox" name="mallCds" value="G011_20"/>제휴몰</label>
|
|
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnExtmallPopup">선택</button><span id="extmallCntArea"> 선택 : <span id="extmallCnt">00</span>개</span>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </table>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div class="panelStyle" style="margin:unset;">
|
|
|
|
|
- <!-- TITLE -->
|
|
|
|
|
- <div class="panelTitle">
|
|
|
|
|
- <h2>적용 대상 상품 등록</h2>
|
|
|
|
|
- <span class="panelControl">
|
|
|
|
|
|
|
+ <div class="panelStyle" style="margin:unset;">
|
|
|
|
|
+ <!-- TITLE -->
|
|
|
|
|
+ <div class="panelTitle">
|
|
|
|
|
+ <h2>적용 대상 상품 등록</h2>
|
|
|
|
|
+ <span class="panelControl">
|
|
|
<i class="fa inner-fa-chevron-up"></i> <!-- 열림/닫힘 화살표 -->
|
|
<i class="fa inner-fa-chevron-up"></i> <!-- 열림/닫힘 화살표 -->
|
|
|
</span>
|
|
</span>
|
|
|
- </div>
|
|
|
|
|
- <!-- //TITLE -->
|
|
|
|
|
- <div class="inner-panelContent">
|
|
|
|
|
- <div><i class="fa fa-info-circle"></i> 브랜드/공급업체/상품 중 1가지는 필수로 지정하셔야 합니다.</div>
|
|
|
|
|
- <div><i class="fa fa-info-circle"></i> 브랜드와 공급업체는 지정 시, 해당 브랜드의 공급처와 같은 AND조건으로 적용됩니다.(예시:A브랜드 상품 중 B업체 상품만)</div>
|
|
|
|
|
- <div><i class="fa fa-info-circle"></i> 공급업체와 브랜드를 적용하시더라도 적용상품은 별개로 등록된 상품을 기준으로 사은품 지급기준으로 적용하실 수 있습니다.</div>
|
|
|
|
|
-
|
|
|
|
|
- <div class="panelContent">
|
|
|
|
|
- <table class="frmStyle">
|
|
|
|
|
- <colgroup>
|
|
|
|
|
- <col width="10%"/>
|
|
|
|
|
- <col width="90%"/>
|
|
|
|
|
- </colgroup>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>공급업체/브랜드</th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <!-- 수정시 프로모션명 입력 : before -->
|
|
|
|
|
- <div class="padding10 wid45">
|
|
|
|
|
- <span>공급업체 설정</span>
|
|
|
|
|
- <div class="padding10 inner-tb-solid">
|
|
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnAddCompany">업체 추가</button>
|
|
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteCompany">선택삭제</button>
|
|
|
|
|
- <span>선택 : <span id="companyCnt">00</span>개</span>
|
|
|
|
|
- <br/>
|
|
|
|
|
- <div id="gridFGPromotionCompanyList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="padding10 wid45">
|
|
|
|
|
- <span>브랜드 설정</span>
|
|
|
|
|
- <div class="padding10 inner-tb-solid">
|
|
|
|
|
- <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>선택 : <span id="brandCnt">00</span>개</span>
|
|
|
|
|
- <br/>
|
|
|
|
|
- <!-- 브랜드 선택 팝업(단수 선택 팝업... 복수를 새로 만들어야하는지 ? 아니면 변수처리해야하는지 ? -->
|
|
|
|
|
- <div id="gridFGBrandList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //TITLE -->
|
|
|
|
|
+ <div class="inner-panelContent">
|
|
|
|
|
+ <div><i class="fa fa-info-circle"></i> 브랜드/공급업체/상품 중 1가지는 필수로 지정하셔야 합니다.</div>
|
|
|
|
|
+ <div><i class="fa fa-info-circle"></i> 브랜드와 공급업체는 지정 시, 해당 브랜드의 공급처와 같은 AND조건으로 적용됩니다.(예시:A브랜드 상품 중 B업체 상품만)</div>
|
|
|
|
|
+ <div><i class="fa fa-info-circle"></i> 공급업체와 브랜드를 적용하시더라도 적용상품은 별개로 등록된 상품을 기준으로 사은품 지급기준으로 적용하실 수 있습니다.</div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="panelContent">
|
|
|
|
|
+ <table class="frmStyle">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col width="10%"/>
|
|
|
|
|
+ <col width="90%"/>
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>공급업체/브랜드</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <!-- 수정시 프로모션명 입력 : before -->
|
|
|
|
|
+ <div class="padding10 wid45">
|
|
|
|
|
+ <span>공급업체 설정</span>
|
|
|
|
|
+ <div class="padding10 inner-tb-solid">
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnAddCompany">업체 추가</button>
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteCompany">선택삭제</button>
|
|
|
|
|
+ <span>선택 : <span id="companyCnt">00</span>개</span>
|
|
|
|
|
+ <br/>
|
|
|
|
|
+ <div id="gridFGPromotionCompanyList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
|
|
|
</div>
|
|
</div>
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>적용상품</th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <div class="padding10">
|
|
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnAddApplyGoods">상품 추가</button>
|
|
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteApplyGoods">선택삭제</button>
|
|
|
|
|
- <span>선택 : <span id="applyGoodsCnt">00</span>개</span>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="padding10 wid45">
|
|
|
|
|
+ <span>브랜드 설정</span>
|
|
|
|
|
+ <div class="padding10 inner-tb-solid">
|
|
|
|
|
+ <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>선택 : <span id="brandCnt">00</span>개</span>
|
|
|
<br/>
|
|
<br/>
|
|
|
- <div id="gridFGApplyGoodsList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
|
|
|
|
|
|
|
+ <!-- 브랜드 선택 팝업(단수 선택 팝업... 복수를 새로 만들어야하는지 ? 아니면 변수처리해야하는지 ? -->
|
|
|
|
|
+ <div id="gridFGBrandList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
|
|
|
</div>
|
|
</div>
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </table>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>적용상품</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <div class="padding10">
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnAddApplyGoods">상품 추가</button>
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteApplyGoods">선택삭제</button>
|
|
|
|
|
+ <span>선택 : <span id="applyGoodsCnt">00</span>개</span>
|
|
|
|
|
+ <br/>
|
|
|
|
|
+ <div id="gridFGApplyGoodsList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </table>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
- <div class="panelStyle" style="margin:unset;">
|
|
|
|
|
- <!-- TITLE -->
|
|
|
|
|
- <div class="panelTitle">
|
|
|
|
|
- <h2>제외 대상 상품</h2>
|
|
|
|
|
- <span class="panelControl">
|
|
|
|
|
|
|
+ <div class="panelStyle" style="margin:unset;">
|
|
|
|
|
+ <!-- TITLE -->
|
|
|
|
|
+ <div class="panelTitle">
|
|
|
|
|
+ <h2>제외 대상 상품</h2>
|
|
|
|
|
+ <span class="panelControl">
|
|
|
<i class="fa inner-fa-chevron-up"></i> <!-- 열림/닫힘 화살표 -->
|
|
<i class="fa inner-fa-chevron-up"></i> <!-- 열림/닫힘 화살표 -->
|
|
|
</span>
|
|
</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>
|
|
|
|
|
- <div class="padding10">
|
|
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnAddExceptGoods">상품 추가</button>
|
|
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteExtGoods">선택삭제</button>
|
|
|
|
|
- <span>선택 : <span id="exceptGoodsCnt">00</span>개</span>
|
|
|
|
|
- <br/>
|
|
|
|
|
- <div id="gridFGExceptGoodsList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </table>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //TITLE -->
|
|
|
|
|
+ <div class="inner-panelContent">
|
|
|
|
|
+ <div class="panelContent">
|
|
|
|
|
+ <table class="frmStyle">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col width="10%"/>
|
|
|
|
|
+ <col width="90%"/>
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>제외 대상</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <div class="padding10">
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnAddExceptGoods">상품 추가</button>
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteExtGoods">선택삭제</button>
|
|
|
|
|
+ <span>선택 : <span id="exceptGoodsCnt">00</span>개</span>
|
|
|
|
|
+ <br/>
|
|
|
|
|
+ <div id="gridFGExceptGoodsList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </table>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
- <div class="panelStyle" style="margin:unset;">
|
|
|
|
|
- <!-- TITLE -->
|
|
|
|
|
- <div class="panelTitle">
|
|
|
|
|
- <h2>적용 사은품 정보</h2>
|
|
|
|
|
- <span class="panelControl">
|
|
|
|
|
|
|
+ <div class="panelStyle" style="margin:unset;">
|
|
|
|
|
+ <!-- TITLE -->
|
|
|
|
|
+ <div class="panelTitle">
|
|
|
|
|
+ <h2>적용 사은품 정보</h2>
|
|
|
|
|
+ <span class="panelControl">
|
|
|
<i class="fa inner-fa-chevron-up"></i> <!-- 열림/닫힘 화살표 -->
|
|
<i class="fa inner-fa-chevron-up"></i> <!-- 열림/닫힘 화살표 -->
|
|
|
</span>
|
|
</span>
|
|
|
- </div>
|
|
|
|
|
- <!-- //TITLE -->
|
|
|
|
|
- <div class="inner-panelContent">
|
|
|
|
|
- <div class="panelContent">
|
|
|
|
|
- <table class="frmStyle">
|
|
|
|
|
- <colgroup>
|
|
|
|
|
- <col width="10%"/>
|
|
|
|
|
- <col width="90%"/>
|
|
|
|
|
- </colgroup>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>지급 방법<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <div>
|
|
|
|
|
- <span><label class="rdoBtn"><input type="radio" name="allYn" value="Y" checked/>모두 지급 (설정한 사은품을 모두 지급합니다)</label></span>
|
|
|
|
|
- <span><label class="rdoBtn"><input type="radio" name="allYn" value="N"/>선택 사은품 (목록 중 1개를 선택하게 합니다)</label></span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>사은품 조건1<em class="required" title="필수"></em><br/>(최대 2개)</th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <div>
|
|
|
|
|
- <div><i class="fa fa-info-circle"></i> 사은품은 최대 <font color="red">5</font>개까지 설정하실 수 있습니다.</div>
|
|
|
|
|
- <div><i class="fa fa-info-circle"></i> 구매 금액 조건을 추가하시면 구매 금액 충족 조건에 맞는 것으로 지급됩니다. 구매금액 조건은 최대 2개까지만등록 하실 수 있습니다.</div>
|
|
|
|
|
- <div><i class="fa fa-info-circle"></i> 장바구니에 담았을 때의 가격 기준으로 적용됩니다.(주문상품쿠폰(다운로드쿠폰)/장바구니 쿠폰 할인 적용 전 판매가)</div>
|
|
|
|
|
- <label for="saleAmt">구매금액</label><input type="text" class="w300" id="saleAmt" /> <br/>
|
|
|
|
|
- <span>사은품 목록</span>
|
|
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnAddFreeGoods1">+ 사은품 선택</button>
|
|
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteFreeGoods1">선택삭제</button>
|
|
|
|
|
- <br/>
|
|
|
|
|
- <div id="gridFreeGoods1List" style="width:100%; height:200px;" class="ag-theme-balham"></div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>사은품 조건2<br/>(최대 2개)</th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <div>
|
|
|
|
|
- <label for="saleAmt2">구매금액</label><input type="text" class="w300" id="saleAmt2" /> <br/>
|
|
|
|
|
- <span>사은품 목록</span>
|
|
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnAddFreeGoods2">+ 사은품 선택</button>
|
|
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteFreeGoods2">선택삭제</button>
|
|
|
|
|
- <br/>
|
|
|
|
|
- <div id="gridFreeGoods2List" style="width:100%; height:200px;" class="ag-theme-balham"></div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </table>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //TITLE -->
|
|
|
|
|
+ <div class="inner-panelContent">
|
|
|
|
|
+ <div class="panelContent">
|
|
|
|
|
+ <table class="frmStyle">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col width="10%"/>
|
|
|
|
|
+ <col width="90%"/>
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>지급 방법<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <span><label class="rdoBtn"><input type="radio" name="allYn" value="Y" checked/>모두 지급 (설정한 사은품을 모두 지급합니다)</label></span>
|
|
|
|
|
+ <span><label class="rdoBtn"><input type="radio" name="allYn" value="N"/>선택 사은품 (목록 중 1개를 선택하게 합니다)</label></span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>사은품 조건1<em class="required" title="필수"></em><br/>(최대 2개)</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <div><i class="fa fa-info-circle"></i> 사은품은 최대 <font color="red">5</font>개까지 설정하실 수 있습니다.</div>
|
|
|
|
|
+ <div><i class="fa fa-info-circle"></i> 구매 금액 조건을 추가하시면 구매 금액 충족 조건에 맞는 것으로 지급됩니다. 구매금액 조건은 최대 2개까지만등록 하실 수 있습니다.</div>
|
|
|
|
|
+ <div><i class="fa fa-info-circle"></i> 장바구니에 담았을 때의 가격 기준으로 적용됩니다.(주문상품쿠폰(다운로드쿠폰)/장바구니 쿠폰 할인 적용 전 판매가)</div>
|
|
|
|
|
+ <label for="saleAmt">구매금액</label><input type="text" class="w300" id="saleAmt" /> <br/>
|
|
|
|
|
+ <span>사은품 목록</span>
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnAddFreeGoods1">+ 사은품 선택</button>
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteFreeGoods1">선택삭제</button>
|
|
|
|
|
+ <br/>
|
|
|
|
|
+ <div id="gridFreeGoods1List" style="width:100%; height:200px;" class="ag-theme-balham"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>사은품 조건2<br/>(최대 2개)</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <label for="saleAmt2">구매금액</label><input type="text" class="w300" id="saleAmt2" /> <br/>
|
|
|
|
|
+ <span>사은품 목록</span>
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnAddFreeGoods2">+ 사은품 선택</button>
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnDeleteFreeGoods2">선택삭제</button>
|
|
|
|
|
+ <br/>
|
|
|
|
|
+ <div id="gridFreeGoods2List" style="width:100%; height:200px;" class="ag-theme-balham"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </table>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="panelStyle" th:if="${#strings.toString(param.gbn) == 'U'}" style="margin:unset;">
|
|
|
|
|
- <!-- //TITLE -->
|
|
|
|
|
- <div class="inner-panelContent">
|
|
|
|
|
- <div class="panelContent">
|
|
|
|
|
- <table class="frmStyle">
|
|
|
|
|
- <colgroup>
|
|
|
|
|
- <col width="10%"/>
|
|
|
|
|
- <col width="40%"/>
|
|
|
|
|
- <col width="10%"/>
|
|
|
|
|
- <col width="40%"/>
|
|
|
|
|
- </colgroup>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>등록자</th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <span>등록자이름(연.월.일 시간:분:초)</span>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>최종수정자</th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <span>수정자이름(연.월.일 시간:분:초)</span>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </table>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="panelStyle" th:if="${#strings.toString(param.gbn) == 'U'}" style="margin:unset;">
|
|
|
|
|
+ <!-- //TITLE -->
|
|
|
|
|
+ <div class="inner-panelContent">
|
|
|
|
|
+ <div class="panelContent">
|
|
|
|
|
+ <table class="frmStyle">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col width="10%"/>
|
|
|
|
|
+ <col width="40%"/>
|
|
|
|
|
+ <col width="10%"/>
|
|
|
|
|
+ <col width="40%"/>
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>등록자</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <span>등록자이름(연.월.일 시간:분:초)</span>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>최종수정자</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <span>수정자이름(연.월.일 시간:분:초)</span>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </table>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </form>
|
|
|
|
|
-
|
|
|
|
|
- <ul class="panelBar">
|
|
|
|
|
- <li class="right">
|
|
|
|
|
- <!-- <th:block th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}"> -->
|
|
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnSearchList">목록</button>
|
|
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnFreegoodsPromotionSave">저장</button>
|
|
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnChangeStatIng">진행</button>
|
|
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnPromotionDelete">삭제</button>
|
|
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnPromotionStop">중지</button>
|
|
|
|
|
- <!-- </th:block> -->
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </form>
|
|
|
|
|
+
|
|
|
|
|
+ <ul class="panelBar">
|
|
|
|
|
+ <li class="right">
|
|
|
|
|
+ <!-- <th:block th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}"> -->
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnSearchList">목록</button>
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnFreegoodsPromotionSave">저장</button>
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnChangeStatIng">진행</button>
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnPromotionDelete">삭제</button>
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnPromotionStop">중지</button>
|
|
|
|
|
+ <!-- </th:block> -->
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
- <script th:inline="javascript">
|
|
|
|
|
- let FGAddGoodsStatList = gagajf.convertToArray([[${goodsStatList}]]); // 상품 상태 리스트
|
|
|
|
|
- // 공급업체 리스트 설정
|
|
|
|
|
- let columnFGCompanyList = [
|
|
|
|
|
- {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
|
|
- {headerName: "공급처ID", field: "supplyCompCd", width: 120, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "공급업체명", field: "supplyCompNm", width: 150, cellClass: 'text-center'}
|
|
|
|
|
- ];
|
|
|
|
|
- // 브랜드 리스트 설정
|
|
|
|
|
- let columnBrandList = [
|
|
|
|
|
- {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
|
|
- {headerName: "브랜드ID", field: "brandCd", width: 120, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "공급업체명", field: "brandEnm", width: 150, cellClass: 'text-center'}
|
|
|
|
|
- ];
|
|
|
|
|
- // 적용상품 리스트 설정
|
|
|
|
|
- let columnApplyGoodsList = [
|
|
|
|
|
- {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
|
|
- {headerName: "Product ID", field: "goodsCd", width: 120, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "브랜드명", field: "brandEnm", width: 150, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "상품명", field: "goodsNm", width: 120, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "판매상태", field: "goodsStat" , width: 120, cellClass: 'text-center',
|
|
|
|
|
- cellEditorParams: { values: gagaAgGrid.extractValues(FGAddGoodsStatList) },
|
|
|
|
|
- valueFormatter: function (params) { return gagaAgGrid.lookupValue(FGAddGoodsStatList, params.value); },
|
|
|
|
|
- valueParser: function (params) { return gagaAgGrid.lookupKey(FGAddGoodsStatList, params.newValue); }
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "정상가", field: "listPrice", width: 120, cellClass: 'text-center', valueFormatter: function(params) {return params.value.addComma();}},
|
|
|
|
|
- {headerName: "판매가", field: "currPrice", width: 120, cellClass: 'text-center', valueFormatter: function(params) {return params.value.addComma();}}
|
|
|
|
|
- ];
|
|
|
|
|
- // 제외상품 리스트 설정
|
|
|
|
|
- let columnExceptGoodsList = [
|
|
|
|
|
- {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
|
|
- {headerName: "Product ID", field: "goodsCd", width: 120, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "브랜드명", field: "brandEnm", width: 150, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "상품명", field: "goodsNm", width: 120, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "판매상태", field: "goodsStat" , width: 120, cellClass: 'text-center',
|
|
|
|
|
- cellEditorParams: { values: gagaAgGrid.extractValues(FGAddGoodsStatList) },
|
|
|
|
|
- valueFormatter: function (params) { return gagaAgGrid.lookupValue(FGAddGoodsStatList, params.value); },
|
|
|
|
|
- valueParser: function (params) { return gagaAgGrid.lookupKey(FGAddGoodsStatList, params.newValue); }
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "정상가", field: "listPrice", width: 120, cellClass: 'text-center',valueFormatter: function(params) {return params.value.addComma();}},
|
|
|
|
|
- {headerName: "판매가", field: "currPrice", width: 120, cellClass: 'text-center',valueFormatter: function(params) {return params.value.addComma();}}
|
|
|
|
|
- ];
|
|
|
|
|
- // 사은품 조건1 리스트 설정 (사은품 상품 만들어지면 만들어야함)
|
|
|
|
|
- let columnFreeGoods1List = [
|
|
|
|
|
- {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
|
|
- {headerName: "사은품 코드", field: "goodsCd", width: 120, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "사은품명", field: "goodsNm", width: 150, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "포인트액", field: "pointAmt" , width: 100, cellClass: 'text-center'
|
|
|
|
|
- ,valueFormatter: function(params) {
|
|
|
|
|
- if(params.value && params.value > 0) {
|
|
|
|
|
- return params.value.addComma();
|
|
|
|
|
- } else {
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- cellEditor: 'textCellEditor',
|
|
|
|
|
- cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "지급수량", field: "sendQty" , width: 100, cellClass: 'text-center'
|
|
|
|
|
- ,valueFormatter: function(params) {
|
|
|
|
|
- if(params.value && params.value > 0) {
|
|
|
|
|
- return params.value.addComma();
|
|
|
|
|
- } else {
|
|
|
|
|
- return 1;
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- cellEditor: 'textCellEditor',
|
|
|
|
|
- cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
|
|
|
|
+</div>
|
|
|
|
|
+
|
|
|
|
|
+<script th:inline="javascript">
|
|
|
|
|
+ let FGAddGoodsStatList = gagajf.convertToArray([[${goodsStatList}]]); // 상품 상태 리스트
|
|
|
|
|
+ // 공급업체 리스트 설정
|
|
|
|
|
+ let columnFGCompanyList = [
|
|
|
|
|
+ {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
|
|
+ {headerName: "공급처ID", field: "supplyCompCd", width: 120, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "공급업체명", field: "supplyCompNm", width: 150, cellClass: 'text-center'}
|
|
|
|
|
+ ];
|
|
|
|
|
+ // 브랜드 리스트 설정
|
|
|
|
|
+ let columnBrandList = [
|
|
|
|
|
+ {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
|
|
+ {headerName: "브랜드ID", field: "brandCd", width: 120, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "공급업체명", field: "brandEnm", width: 150, cellClass: 'text-center'}
|
|
|
|
|
+ ];
|
|
|
|
|
+ // 적용상품 리스트 설정
|
|
|
|
|
+ let columnApplyGoodsList = [
|
|
|
|
|
+ {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
|
|
+ {headerName: "Product ID", field: "goodsCd", width: 120, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "브랜드명", field: "brandEnm", width: 150, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "상품명", field: "goodsNm", width: 120, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "판매상태", field: "goodsStat" , width: 120, cellClass: 'text-center',
|
|
|
|
|
+ cellEditorParams: { values: gagaAgGrid.extractValues(FGAddGoodsStatList) },
|
|
|
|
|
+ valueFormatter: function (params) { return gagaAgGrid.lookupValue(FGAddGoodsStatList, params.value); },
|
|
|
|
|
+ valueParser: function (params) { return gagaAgGrid.lookupKey(FGAddGoodsStatList, params.newValue); }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "정상가", field: "listPrice", width: 120, cellClass: 'text-center', valueFormatter: function(params) {return params.value.addComma();}},
|
|
|
|
|
+ {headerName: "판매가", field: "currPrice", width: 120, cellClass: 'text-center', valueFormatter: function(params) {return params.value.addComma();}}
|
|
|
|
|
+ ];
|
|
|
|
|
+ // 제외상품 리스트 설정
|
|
|
|
|
+ let columnExceptGoodsList = [
|
|
|
|
|
+ {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
|
|
+ {headerName: "Product ID", field: "goodsCd", width: 120, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "브랜드명", field: "brandEnm", width: 150, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "상품명", field: "goodsNm", width: 120, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "판매상태", field: "goodsStat" , width: 120, cellClass: 'text-center',
|
|
|
|
|
+ cellEditorParams: { values: gagaAgGrid.extractValues(FGAddGoodsStatList) },
|
|
|
|
|
+ valueFormatter: function (params) { return gagaAgGrid.lookupValue(FGAddGoodsStatList, params.value); },
|
|
|
|
|
+ valueParser: function (params) { return gagaAgGrid.lookupKey(FGAddGoodsStatList, params.newValue); }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "정상가", field: "listPrice", width: 120, cellClass: 'text-center',valueFormatter: function(params) {return params.value.addComma();}},
|
|
|
|
|
+ {headerName: "판매가", field: "currPrice", width: 120, cellClass: 'text-center',valueFormatter: function(params) {return params.value.addComma();}}
|
|
|
|
|
+ ];
|
|
|
|
|
+ // 사은품 조건1 리스트 설정 (사은품 상품 만들어지면 만들어야함)
|
|
|
|
|
+ let columnFreeGoods1List = [
|
|
|
|
|
+ {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
|
|
+ {headerName: "사은품 코드", field: "goodsCd", width: 120, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "사은품명", field: "goodsNm", width: 150, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "포인트액", field: "pointAmt" , width: 100, cellClass: 'text-center'
|
|
|
|
|
+ ,editable: true
|
|
|
|
|
+ ,valueFormatter: function(params) {
|
|
|
|
|
+ if(params.value && params.value > 0) {
|
|
|
|
|
+ return params.value.addComma();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
- {headerName: "한정수량", field: "limitQty" , width: 100, cellClass: 'text-center'
|
|
|
|
|
- ,cellEditor: 'textCellEditor'
|
|
|
|
|
- ,cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
|
|
|
|
+ cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "지급수량", field: "sendQty" , width: 100, cellClass: 'text-center'
|
|
|
|
|
+ ,editable: true
|
|
|
|
|
+ ,valueFormatter: function(params) {
|
|
|
|
|
+ if(params.value && params.value > 0) {
|
|
|
|
|
+ return params.value.addComma();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
- {headerName: "잔여수량", field: "leftQty", width: 120, cellClass: 'text-center'
|
|
|
|
|
- ,valueFormatter: function(params) {
|
|
|
|
|
- if(params.value && params.value > 0) {
|
|
|
|
|
- return params.value.addComma();
|
|
|
|
|
- } else {
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "한정수량", field: "limitQty" , width: 100, cellClass: 'text-center'
|
|
|
|
|
+ ,editable: true
|
|
|
|
|
+ ,cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "잔여수량", field: "leftQty", width: 120, cellClass: 'text-center'
|
|
|
|
|
+ ,valueFormatter: function(params) {
|
|
|
|
|
+ if(params.value && params.value > 0) {
|
|
|
|
|
+ return params.value.addComma();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return 0;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- ];
|
|
|
|
|
- // 사은품 조건2 리스트 설정 (사은품 상품 만들어지면 만들어야함)
|
|
|
|
|
- let columnFreeGoods2List = [
|
|
|
|
|
- {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
|
|
- {headerName: "사은품 코드", field: "goodsCd", width: 120, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "사은품명", field: "goodsNm", width: 150, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "포인트액", field: "pointAmt" , width: 100, cellClass: 'text-center'
|
|
|
|
|
- ,valueFormatter: function(params) {
|
|
|
|
|
- if(params.value && params.value > 0) {
|
|
|
|
|
- return params.value.addComma();
|
|
|
|
|
- } else {
|
|
|
|
|
- return '0';
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- cellEditor: 'textCellEditor',
|
|
|
|
|
- cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "지급수량", field: "sendQty" , width: 100, cellClass: 'text-center'
|
|
|
|
|
- ,valueFormatter: function(params) {
|
|
|
|
|
- if(params.value && params.value > 0) {
|
|
|
|
|
- return params.value.addComma();
|
|
|
|
|
- } else {
|
|
|
|
|
- return '1';
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- cellEditor: 'textCellEditor',
|
|
|
|
|
- cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ ];
|
|
|
|
|
+ // 사은품 조건2 리스트 설정 (사은품 상품 만들어지면 만들어야함)
|
|
|
|
|
+ let columnFreeGoods2List = [
|
|
|
|
|
+ {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
|
|
+ {headerName: "사은품 코드", field: "goodsCd", width: 120, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "사은품명", field: "goodsNm", width: 150, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "포인트액", field: "pointAmt" , width: 100, cellClass: 'text-center'
|
|
|
|
|
+ ,editable: true
|
|
|
|
|
+ ,valueFormatter: function(params) {
|
|
|
|
|
+ if(params.value && params.value > 0) {
|
|
|
|
|
+ return params.value.addComma();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return '0';
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ ,cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "지급수량", field: "sendQty" , width: 100, cellClass: 'text-center'
|
|
|
|
|
+ ,editable: true
|
|
|
|
|
+ ,valueFormatter: function(params) {
|
|
|
|
|
+ if(params.value && params.value > 0) {
|
|
|
|
|
+ return params.value.addComma();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return '1';
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
- {headerName: "한정수량", field: "limitQty" , width: 100, cellClass: 'text-center'
|
|
|
|
|
- ,valueFormatter: function(params) {
|
|
|
|
|
- if(params.value && params.value > 0) {
|
|
|
|
|
- return params.value.addComma();
|
|
|
|
|
- } else {
|
|
|
|
|
- return '0';
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- cellEditor: 'textCellEditor',
|
|
|
|
|
- cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
|
|
|
|
+ cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "한정수량", field: "limitQty" , width: 100, cellClass: 'text-center'
|
|
|
|
|
+ ,editable: true
|
|
|
|
|
+ ,valueFormatter: function(params) {
|
|
|
|
|
+ if(params.value && params.value > 0) {
|
|
|
|
|
+ return params.value.addComma();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return '0';
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
- {headerName: "잔여수량", field: "leftQty", width: 120, cellClass: 'text-center'
|
|
|
|
|
- ,valueFormatter: function(params) {
|
|
|
|
|
- if(params.value && params.value > 0) {
|
|
|
|
|
- return params.value.addComma();
|
|
|
|
|
- } else {
|
|
|
|
|
- return '0';
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "잔여수량", field: "leftQty", width: 120, cellClass: 'text-center'
|
|
|
|
|
+ ,valueFormatter: function(params) {
|
|
|
|
|
+ if(params.value && params.value > 0) {
|
|
|
|
|
+ return params.value.addComma();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return '0';
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- ];
|
|
|
|
|
- // 공급업체 리스트 설정
|
|
|
|
|
- let gridOptionsFGCompanyList = gagaAgGrid.getGridOptions(columnFGCompanyList);
|
|
|
|
|
- gridOptionsFGCompanyList.rowSelection = "multiple";
|
|
|
|
|
- // 브랜드 리스트 설정
|
|
|
|
|
- let gridOptionsFGBrandList = gagaAgGrid.getGridOptions(columnBrandList);
|
|
|
|
|
- gridOptionsFGBrandList.rowSelection = "multiple";
|
|
|
|
|
- // 적용상품 리스트 설정
|
|
|
|
|
- let gridOptionsFGApplyGoodsList = gagaAgGrid.getGridOptions(columnApplyGoodsList);
|
|
|
|
|
- gridOptionsFGApplyGoodsList.rowSelection = "multiple";
|
|
|
|
|
- // 제외상품 리스트 설정
|
|
|
|
|
- let gridOptionsFGExceptGoodsList = gagaAgGrid.getGridOptions(columnExceptGoodsList);
|
|
|
|
|
- gridOptionsFGExceptGoodsList.rowSelection = "multiple";
|
|
|
|
|
- // 사은품 조건1 리스트 설정
|
|
|
|
|
- let gridOptionsFreeGoods1List = gagaAgGrid.getGridOptions(columnFreeGoods1List);
|
|
|
|
|
- gridOptionsFreeGoods1List.rowSelection = "multiple";
|
|
|
|
|
- // 사은품 조건2 리스트 설정
|
|
|
|
|
- let gridOptionsFreeGoods2List = gagaAgGrid.getGridOptions(columnFreeGoods2List);
|
|
|
|
|
- gridOptionsFreeGoods2List.rowSelection = "multiple";
|
|
|
|
|
-
|
|
|
|
|
- $(document).ready(function() {
|
|
|
|
|
- gagaAgGrid.createGrid("gridFGPromotionCompanyList", gridOptionsFGCompanyList);
|
|
|
|
|
- gagaAgGrid.createGrid("gridFGBrandList", gridOptionsFGBrandList);
|
|
|
|
|
- gagaAgGrid.createGrid("gridFGApplyGoodsList", gridOptionsFGApplyGoodsList);
|
|
|
|
|
- gagaAgGrid.createGrid("gridFGExceptGoodsList", gridOptionsFGExceptGoodsList);
|
|
|
|
|
- gagaAgGrid.createGrid("gridFreeGoods1List", gridOptionsFreeGoods1List);
|
|
|
|
|
- gagaAgGrid.createGrid("gridFreeGoods2List", gridOptionsFreeGoods2List);
|
|
|
|
|
-
|
|
|
|
|
- cfnCreateCalendar('#promotionTerms', 'freegoodsStdt', 'freegoodsEddt', true, '행사기간', 'X');
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- // 제휴몰 체크 상태 확인
|
|
|
|
|
- $("#G011_20").on("click", function() {
|
|
|
|
|
- // 체크여부 확인 (선택되면 자동 checked 추가되는데, 추가되기 전 동작해서 반대로 지정)
|
|
|
|
|
- if($("#G011_20").hasClass("checked")) {
|
|
|
|
|
- $("#btnExtmallPopup").hide();
|
|
|
|
|
- $("#extmallCntArea").hide();
|
|
|
|
|
- $("#extmallCnt").text(0);
|
|
|
|
|
- $("#extmallIds").val("");
|
|
|
|
|
- } else {
|
|
|
|
|
- $("#btnExtmallPopup").show();
|
|
|
|
|
- $("#extmallCntArea").show();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- $('#freeGoodsPromotionForm input[name=freegiftNm]').on('focusout', function() {
|
|
|
|
|
- if($('#freeGoodsPromotionForm input[name=freegiftNm]').val().length < 2) {
|
|
|
|
|
- mcxDialog.alert("2자~30자 이상 프로모션명을 입력하세요.");
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- // list 데이터 세팅
|
|
|
|
|
- function setSendGridListVal(gridListOption, key, inputId) {
|
|
|
|
|
- let list = gagaAgGrid.getAllRowData(gridListOption);
|
|
|
|
|
- let cds = [];
|
|
|
|
|
- for(let k = 0 ; k < list.length ; k++) {
|
|
|
|
|
- cds.push(eval("list[k]." + key));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- var jsonData = JSON.stringify(cds);
|
|
|
|
|
- $("#" + inputId).val(jsonData);
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ ];
|
|
|
|
|
+ // 공급업체 리스트 설정
|
|
|
|
|
+ let gridOptionsFGCompanyList = gagaAgGrid.getGridOptions(columnFGCompanyList);
|
|
|
|
|
+ gridOptionsFGCompanyList.rowSelection = "multiple";
|
|
|
|
|
+ // 브랜드 리스트 설정
|
|
|
|
|
+ let gridOptionsFGBrandList = gagaAgGrid.getGridOptions(columnBrandList);
|
|
|
|
|
+ gridOptionsFGBrandList.rowSelection = "multiple";
|
|
|
|
|
+ // 적용상품 리스트 설정
|
|
|
|
|
+ let gridOptionsFGApplyGoodsList = gagaAgGrid.getGridOptions(columnApplyGoodsList);
|
|
|
|
|
+ gridOptionsFGApplyGoodsList.rowSelection = "multiple";
|
|
|
|
|
+ // 제외상품 리스트 설정
|
|
|
|
|
+ let gridOptionsFGExceptGoodsList = gagaAgGrid.getGridOptions(columnExceptGoodsList);
|
|
|
|
|
+ gridOptionsFGExceptGoodsList.rowSelection = "multiple";
|
|
|
|
|
+ // 사은품 조건1 리스트 설정
|
|
|
|
|
+ let gridOptionsFreeGoods1List = gagaAgGrid.getGridOptions(columnFreeGoods1List);
|
|
|
|
|
+ gridOptionsFreeGoods1List.rowSelection = "multiple";
|
|
|
|
|
+ // 사은품 조건2 리스트 설정
|
|
|
|
|
+ let gridOptionsFreeGoods2List = gagaAgGrid.getGridOptions(columnFreeGoods2List);
|
|
|
|
|
+ gridOptionsFreeGoods2List.rowSelection = "multiple";
|
|
|
|
|
+
|
|
|
|
|
+ $(document).ready(function() {
|
|
|
|
|
+ gagaAgGrid.createGrid("gridFGPromotionCompanyList", gridOptionsFGCompanyList);
|
|
|
|
|
+ gagaAgGrid.createGrid("gridFGBrandList", gridOptionsFGBrandList);
|
|
|
|
|
+ gagaAgGrid.createGrid("gridFGApplyGoodsList", gridOptionsFGApplyGoodsList);
|
|
|
|
|
+ gagaAgGrid.createGrid("gridFGExceptGoodsList", gridOptionsFGExceptGoodsList);
|
|
|
|
|
+ gagaAgGrid.createGrid("gridFreeGoods1List", gridOptionsFreeGoods1List);
|
|
|
|
|
+ gagaAgGrid.createGrid("gridFreeGoods2List", gridOptionsFreeGoods2List);
|
|
|
|
|
+
|
|
|
|
|
+ if("C" == [[${param.gbn}]]) {
|
|
|
|
|
+ $("#btnExtmallPopup").hide();
|
|
|
|
|
+ $("#extmallCntArea").hide();
|
|
|
|
|
+ $("#extmallCnt").text(0);
|
|
|
|
|
+ $("#extmallIds").val("");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 저장 버튼 클릭시
|
|
|
|
|
- $('#btnFreegoodsPromotionSave').on('click', function() {
|
|
|
|
|
- // 각 ag-grid list 수량
|
|
|
|
|
- let supplyCompCnt = gagaAgGrid.getAllRowData(gridOptionsFGCompanyList).length;
|
|
|
|
|
- let brandCnt = gagaAgGrid.getAllRowData(gridOptionsFGBrandList).length;
|
|
|
|
|
- let applyGoodsCnt = gagaAgGrid.getAllRowData(gridOptionsFGApplyGoodsList).length;
|
|
|
|
|
- let exceptGoodsCnt = gagaAgGrid.getAllRowData(gridOptionsFGExceptGoodsList).length;
|
|
|
|
|
- let freeGoods1Cnt = gagaAgGrid.getAllRowData(gridOptionsFreeGoods1List).length;
|
|
|
|
|
- let freeGoods2Cnt = gagaAgGrid.getAllRowData(gridOptionsFreeGoods2List).length;
|
|
|
|
|
-
|
|
|
|
|
- if (!gagajf.validation('#freeGoodsPromotionForm')) {
|
|
|
|
|
- return false;
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- if($('#freeGoodsPromotionForm input[name=freegiftNm]').val().length < 2) {
|
|
|
|
|
- mcxDialog.alert("2자~30자 이상 프로모션명을 입력하세요.");
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 행사기간 확인
|
|
|
|
|
- let fromDate = $('#freeGoodsPromotionForm input[name=freegiftStdt]').val();
|
|
|
|
|
- let toDate = $('#freeGoodsPromotionForm input[name=freegiftEddt]').val();
|
|
|
|
|
-
|
|
|
|
|
- if (fromDate > toDate) {
|
|
|
|
|
- mcxDialog.alert("시작일자는 종료일자 보다 늦을 수 없습니다.");
|
|
|
|
|
- $('#freeGoodsPromotionForm input[name=freegiftStdt]').focus();
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 공급업체, 브랜드, 적용상품 중 1개 필수 체크
|
|
|
|
|
- if(supplyCompCnt < 1 && brandCnt < 1 && applyGoodsCnt < 1) {
|
|
|
|
|
- mcxDialog.alert("공급업체, 브랜드, 적용 상품 중 한가지 이상 등록해주세요.");
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 사은품조건1 필수 체크
|
|
|
|
|
- if(freeGoods1Cnt < 1) {
|
|
|
|
|
- mcxDialog.alert("사은품 조건1의 사은품을 등록해주세요.");
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 사은품조건1 의 수량 체크
|
|
|
|
|
- if(freeGoods1Cnt > 2) {
|
|
|
|
|
- mcxDialog.alert("사은품 조건1의 사은품은 최대 2개까지 등록가능합니다.");
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 사은품조건2의 수량 체크
|
|
|
|
|
- if(freeGoods2Cnt > 2) {
|
|
|
|
|
- mcxDialog.alert("사은품 조건2의 사은품은 최대 2개까지 등록가능합니다.");
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ cfnCreateCalendar('#promotionTerms', 'freegoodsStdt', 'freegoodsEddt', true, '행사기간', 'X');
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 제휴몰 체크 상태 확인
|
|
|
|
|
+ $("#G011_20").on("click", function() {
|
|
|
|
|
+ // 체크여부 확인 (선택되면 자동 checked 추가되는데, 추가되기 전 동작해서 반대로 지정)
|
|
|
|
|
+ if($("#G011_20").hasClass("checked")) {
|
|
|
|
|
+ $("#btnExtmallPopup").hide();
|
|
|
|
|
+ $("#extmallCntArea").hide();
|
|
|
|
|
+ $("#extmallCnt").text(0);
|
|
|
|
|
+ $("#extmallIds").val("");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $("#btnExtmallPopup").show();
|
|
|
|
|
+ $("#extmallCntArea").show();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
- // 각 리스트 데이터 세팅
|
|
|
|
|
- if(supplyCompCnt > 0) { setSendGridListVal(gridOptionsFGCompanyList, "supplyCompCd", "supplyCompCds"); } // 공급업체 설정 데이터
|
|
|
|
|
- if(brandCnt > 0) { setSendGridListVal(gridOptionsFGBrandList, "brandCd", "brandCds"); } // 브랜드 설정 데이터
|
|
|
|
|
- if(applyGoodsCnt > 0) { setSendGridListVal(gridOptionsFGApplyGoodsList, "goodsCd", "applyGoodsCds"); } // 적용 상품 설정 데이터
|
|
|
|
|
- if(exceptGoodsCnt > 0) { setSendGridListVal(gridOptionsFGExceptGoodsList, "goodsCd", "exceptGoodsCds"); } // 제외 상품 설정 데이터
|
|
|
|
|
- if(freeGoods1Cnt > 0) { setSendGridListVal(gridOptionsFreeGoods1List, "goodsCd", "freeGoods1Cds"); } // 사은품 조건 1
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- // 공급업체 설정 / 업체 추가 콜백함수
|
|
|
|
|
- var fnSetPopupComapnyInfo = function(result) {
|
|
|
|
|
- // 기존 리스트 데이터 for
|
|
|
|
|
- for(let i = 0 ; i < result.length ; i++) {
|
|
|
|
|
- let addChk = true, gridListValue = gagaAgGrid.getAllRowData(gridOptionsFGCompanyList); // 받아온 모든 데이터
|
|
|
|
|
-
|
|
|
|
|
- // 받아온 data for
|
|
|
|
|
- for(let j = 0 ; j < gridListValue.length ; j++) {
|
|
|
|
|
- // 동일한 data는 추가하지 않음
|
|
|
|
|
- if(gridListValue[j].supplyCompCd == result[i].supplyCompCd) { addChk = false; } // 중복체크
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $('#freeGoodsPromotionForm input[name=freegiftNm]').on('focusout', function() {
|
|
|
|
|
+ if($('#freeGoodsPromotionForm input[name=freegiftNm]').val().length < 2) {
|
|
|
|
|
+ mcxDialog.alert("2자~30자 이상 프로모션명을 입력하세요.");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // list 데이터 setting
|
|
|
|
|
+ function fnSetSendGridListVal(gridListOption, key, inputId) {
|
|
|
|
|
+ let list = gagaAgGrid.getAllRowData(gridListOption);
|
|
|
|
|
+ let cds = [];
|
|
|
|
|
+ for(let k = 0 ; k < list.length ; k++) {
|
|
|
|
|
+ cds.push(eval("list[k]." + key));
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- // 중복되지 않은 데이터 리스트에 추가
|
|
|
|
|
- if(addChk) { gagaAgGrid.addRowData(gridOptionsFGCompanyList, result[i], "supplyCompCd"); }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ let jsonData = JSON.stringify(cds);
|
|
|
|
|
+ $("#" + inputId).val(jsonData);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- $("#companyCnt").text(gridOptionsFGCompanyList.api.getDisplayedRowCount());
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ // 리스트 정보 수정
|
|
|
|
|
+ function fnSetListInfo(result, gridListOption, key) {
|
|
|
|
|
+ let resultList = []; // 최종 상품 리스트
|
|
|
|
|
+ let gridListValue = gagaAgGrid.getAllRowData(gridListOption); // 기존 리스트
|
|
|
|
|
|
|
|
- // 브랜드 설정 / 브랜드 추가 콜백함수 (단수로 가져오므로 복수일 경우에 수정 확인 필요)
|
|
|
|
|
- var fnSetPopupBrandInfo = function(result) {
|
|
|
|
|
- for(let i = 0 ; i < result.length ; i++) {
|
|
|
|
|
- let addChk = true, gridListValue = gagaAgGrid.getAllRowData(gridOptionsFGBrandList); // 받아온 모든 데이터
|
|
|
|
|
|
|
+ // 기존 리스트 데이터 for
|
|
|
|
|
+ for(let i = 0 ; i < result.length ; i++) {
|
|
|
|
|
+ let addChk = true; // 받아온 모든 데이터
|
|
|
|
|
|
|
|
- // 받아온 data for
|
|
|
|
|
- for(let j = 0 ; j < gridListValue.length ; j++) {
|
|
|
|
|
- if(gridListValue[j].brandCd == result[i].brandCd) { addChk = false; } // 중복체크
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 받아온 data for
|
|
|
|
|
+ for(let j = 0 ; j < gridListValue.length ; j++) {
|
|
|
|
|
+ // 기존 데이터 push
|
|
|
|
|
+ // resultList.push(eval("gridListValue[j]." + key));
|
|
|
|
|
|
|
|
- // 중복되지 않은 데이터 리스트에 추가
|
|
|
|
|
- if(addChk) { gagaAgGrid.addRowData(gridOptionsFGBrandList, result[i], "brandCd"); }
|
|
|
|
|
|
|
+ // 조회한 상품 중 동일하지 않은 데이터만 추가
|
|
|
|
|
+ if(eval("gridListValue[j]." + key) == eval("result[i]." + key)) { addChk = false; } // 중복체크
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $("#brandCnt").text(gridOptionsFGBrandList.api.getDisplayedRowCount());
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ // 추가된 데이터 중 중복되지 않은 데이터 리스트에 추가
|
|
|
|
|
+ if(addChk) { resultList.push(eval("result[i]" + key)); }
|
|
|
|
|
+ //if(addChk) { gagaAgGrid.addRowData(gridListOption, result[i], key); }
|
|
|
|
|
+ }
|
|
|
|
|
+ let totalCnt = resultList.length + gridListValue.length;
|
|
|
|
|
+ if(resultList.length > 5) {
|
|
|
|
|
+ mcxDialog.alert("사은품은 최대 5개까지만 등록하실 수 있습니다.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ } else {
|
|
|
|
|
|
|
|
- // 적용 상품 리스트 콜백함수
|
|
|
|
|
- var fnSetPopupApplyGoodsInfo = function(result) {
|
|
|
|
|
- gridAddGoodsList(gridOptionsFGApplyGoodsList, result);
|
|
|
|
|
- $("#applyGoodsCnt").text(gridOptionsFGApplyGoodsList.api.getDisplayedRowCount());
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 저장 버튼 클릭시
|
|
|
|
|
+ $('#btnFreegoodsPromotionSave').on('click', function() {
|
|
|
|
|
+ // 각 ag-grid list 수량
|
|
|
|
|
+ let supplyCompCnt = gagaAgGrid.getAllRowData(gridOptionsFGCompanyList).length;
|
|
|
|
|
+ let brandCnt = gagaAgGrid.getAllRowData(gridOptionsFGBrandList).length;
|
|
|
|
|
+ let applyGoodsCnt = gagaAgGrid.getAllRowData(gridOptionsFGApplyGoodsList).length;
|
|
|
|
|
+ let exceptGoodsCnt = gagaAgGrid.getAllRowData(gridOptionsFGExceptGoodsList).length;
|
|
|
|
|
+ let freeGoods1Cnt = gagaAgGrid.getAllRowData(gridOptionsFreeGoods1List).length;
|
|
|
|
|
+ let freeGoods2Cnt = gagaAgGrid.getAllRowData(gridOptionsFreeGoods2List).length;
|
|
|
|
|
+
|
|
|
|
|
+ if (!gagajf.validation('#freeGoodsPromotionForm')) {
|
|
|
|
|
+ return false;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- // 제외 상품 리스트 콜백함수
|
|
|
|
|
- var fnSetPopupExceptGoodsInfo = function(result) {
|
|
|
|
|
- gridAddGoodsList(gridOptionsFGExceptGoodsList, result);
|
|
|
|
|
- $("#exceptGoodsCnt").text(gridOptionsFGExceptGoodsList.api.getDisplayedRowCount());
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ if($('#freeGoodsPromotionForm input[name=freegiftNm]').val().length < 2) {
|
|
|
|
|
+ mcxDialog.alert("2자~30자 이상 프로모션명을 입력하세요.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- // 사은품 조건1 상품 리스트 콜백함수
|
|
|
|
|
- var fnSetPopupFreeGoods1Info = function(result) {
|
|
|
|
|
- gridAddGoodsList(gridOptionsFreeGoods1List, result);
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ // 행사기간 확인
|
|
|
|
|
+ let fromDate = $('#freeGoodsPromotionForm input[name=freegiftStdt]').val();
|
|
|
|
|
+ let toDate = $('#freeGoodsPromotionForm input[name=freegiftEddt]').val();
|
|
|
|
|
|
|
|
- // 사은품 조건2 상품 리스트 콜백함수
|
|
|
|
|
- var fnSetPopupFreeGoods2Info = function(result) {
|
|
|
|
|
- gridAddGoodsList(gridOptionsFreeGoods2List, result);
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ if (fromDate > toDate) {
|
|
|
|
|
+ mcxDialog.alert("시작일자는 종료일자 보다 늦을 수 없습니다.");
|
|
|
|
|
+ $('#freeGoodsPromotionForm input[name=freegiftStdt]').focus();
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- // ag-grid 상품관련 list 콜백함수
|
|
|
|
|
- function gridAddGoodsList(OriginGridListOption, result) {
|
|
|
|
|
- for(let i = 0 ; i < result.length ; i++) {
|
|
|
|
|
- let addChk = true, gridListValue = gagaAgGrid.getAllRowData(OriginGridListOption); // 받아온 모든 데이터
|
|
|
|
|
|
|
+ // 공급업체, 브랜드, 적용상품 중 1개 필수 체크
|
|
|
|
|
+ if(supplyCompCnt < 1 && brandCnt < 1 && applyGoodsCnt < 1) {
|
|
|
|
|
+ mcxDialog.alert("공급업체, 브랜드, 적용 상품 중 한가지 이상 등록해주세요.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- // 받아온 data for
|
|
|
|
|
- for(let j = 0 ; j < gridListValue.length ; j++) {
|
|
|
|
|
- if(gridListValue[j].goodsCd == result[i].goodsCd) { addChk = false; } // 중복체크
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 사은품조건1 필수 체크
|
|
|
|
|
+ if(freeGoods1Cnt < 1) {
|
|
|
|
|
+ mcxDialog.alert("사은품 조건1의 사은품을 등록해주세요.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- // 중복되지 않은 데이터 리스트에 추가
|
|
|
|
|
- if(addChk) { gagaAgGrid.addRowData(OriginGridListOption, result[i], "goodsCd"); }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 사은품조건1 의 수량 체크
|
|
|
|
|
+ if(freeGoods1Cnt > 2) {
|
|
|
|
|
+ mcxDialog.alert("사은품 조건1의 사은품은 최대 2개까지 등록가능합니다.");
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 제휴몰 list 콜백함수
|
|
|
|
|
- function fnSetPopupExtmallInfo(result) {
|
|
|
|
|
- let extmallIds = [];
|
|
|
|
|
- if($("#extmallIds").val() != null && $("#extmallIds").val() != "") {
|
|
|
|
|
- extmallIds = JSON.parse($("#extmallIds").val());
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 사은품조건2의 수량 체크
|
|
|
|
|
+ if(freeGoods2Cnt > 2) {
|
|
|
|
|
+ mcxDialog.alert("사은품 조건2의 사은품은 최대 2개까지 등록가능합니다.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- for(let i = 0 ; i < result.length ; i++) {
|
|
|
|
|
- let addChk = true;
|
|
|
|
|
- for(let j = 0 ; j < extmallIds.length ; j++) {
|
|
|
|
|
- if(result[i].extmallId == extmallIds[j]) { addChk = false; }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 각 리스트 데이터 세팅
|
|
|
|
|
+ if(supplyCompCnt > 0) { fnSetSendGridListVal(gridOptionsFGCompanyList, "supplyCompCd", "supplyCompCds"); } // 공급업체 설정 데이터
|
|
|
|
|
+ if(brandCnt > 0) { fnSetSendGridListVal(gridOptionsFGBrandList, "brandCd", "brandCds"); } // 브랜드 설정 데이터
|
|
|
|
|
+ if(applyGoodsCnt > 0) { fnSetSendGridListVal(gridOptionsFGApplyGoodsList, "goodsCd", "applyGoodsCds"); } // 적용 상품 설정 데이터
|
|
|
|
|
+ if(exceptGoodsCnt > 0) { fnSetSendGridListVal(gridOptionsFGExceptGoodsList, "goodsCd", "exceptGoodsCds"); } // 제외 상품 설정 데이터
|
|
|
|
|
+ if(freeGoods1Cnt > 0) { fnSetSendGridListVal(gridOptionsFreeGoods1List, "goodsCd", "freeGoods1Cds"); } // 사은품 조건 1
|
|
|
|
|
+ if(freeGoods2Cnt > 0) { fnSetSendGridListVal(gridOptionsFreeGoods1List, "goodsCd", "freeGoods2Cds"); } // 사은품 조건 1
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 공급업체 설정 / 업체 추가 콜백함수
|
|
|
|
|
+ var fnSetPopupComapnyInfo = function(result) {
|
|
|
|
|
+ fnSetListInfo(result, gridOptionsFGCompanyList, "supplyCompCd");
|
|
|
|
|
+ };
|
|
|
|
|
+ // 브랜드 설정 / 브랜드 추가 콜백함수 (단수로 가져오므로 복수일 경우에 수정 확인 필요)
|
|
|
|
|
+ var fnSetPopupBrandInfo = function(result) {
|
|
|
|
|
+ fnSetListInfo(result, gridOptionsFGBrandList, "brandCd");
|
|
|
|
|
+ };
|
|
|
|
|
+ // 적용 상품 리스트 콜백함수
|
|
|
|
|
+ var fnSetPopupApplyGoodsInfo = function(result) {
|
|
|
|
|
+ fnSetListInfo(result, gridOptionsFGApplyGoodsList, "goodsCd");
|
|
|
|
|
+ };
|
|
|
|
|
+ // 제외 상품 리스트 콜백함수
|
|
|
|
|
+ var fnSetPopupExceptGoodsInfo = function(result) {
|
|
|
|
|
+ fnSetListInfo(result, gridOptionsFGExceptGoodsList, "goodsCd");
|
|
|
|
|
+ };
|
|
|
|
|
+ // 사은품 조건1 상품 리스트 콜백함수
|
|
|
|
|
+ var fnSetPopupFreeGoods1Info = function(result) {
|
|
|
|
|
+ fnSetListInfo(result, gridOptionsFreeGoods1List, "goodsCd");
|
|
|
|
|
+ };
|
|
|
|
|
+ // 사은품 조건2 상품 리스트 콜백함수
|
|
|
|
|
+ var fnSetPopupFreeGoods2Info = function(result) {
|
|
|
|
|
+ fnSetListInfo(result, gridOptionsFreeGoods2List, "goodsCd");
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 제휴몰 list 콜백함수
|
|
|
|
|
+ function fnSetPopupExtmallInfo(result) {
|
|
|
|
|
+ let extmallIds = [];
|
|
|
|
|
+ if($("#extmallIds").val() != null && $("#extmallIds").val() != "") {
|
|
|
|
|
+ extmallIds = JSON.parse($("#extmallIds").val());
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- if(addChk) { extmallIds.push(result[i].extmallId) };
|
|
|
|
|
|
|
+ for(let i = 0 ; i < result.length ; i++) {
|
|
|
|
|
+ let addChk = true;
|
|
|
|
|
+ for(let j = 0 ; j < extmallIds.length ; j++) {
|
|
|
|
|
+ if(result[i].extmallId == extmallIds[j]) { addChk = false; }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- var jsonData = JSON.stringify(extmallIds);
|
|
|
|
|
- $("#extmallIds").val(jsonData);
|
|
|
|
|
- $("#extmallCnt").text(extmallIds.length);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 제휴몰 선택 버튼 클릭시
|
|
|
|
|
- $('#freeGoodsPromotionForm #btnExtmallPopup').on('click', function() {
|
|
|
|
|
- cfnOpenExtmallListPopup("fnSetPopupExtmallInfo");
|
|
|
|
|
- });
|
|
|
|
|
- // 공급업체 설정 업체 추가 버튼 클릭시
|
|
|
|
|
- $('#freeGoodsPromotionForm #btnAddCompany').on('click', function() {
|
|
|
|
|
- cfnOpenCompanyListPopup("fnSetPopupComapnyInfo");
|
|
|
|
|
- });
|
|
|
|
|
- // 브랜드 추가 버튼 클릭시 (복수 브랜드때 수정 필요)
|
|
|
|
|
- $('#freeGoodsPromotionForm #btnAddBrand').on('click', function() {
|
|
|
|
|
- cfnOpenBrandListPopup("fnSetPopupBrandInfo", "M");
|
|
|
|
|
- });
|
|
|
|
|
- // 적용 상품 추가 버튼 클릭시
|
|
|
|
|
- $('#freeGoodsPromotionForm #btnAddApplyGoods').on('click', function() {
|
|
|
|
|
- cfnOpenGoodsPopup("fnSetPopupApplyGoodsInfo");
|
|
|
|
|
- });
|
|
|
|
|
- // 제외 상품 추가 버튼 클릭시
|
|
|
|
|
- $('#freeGoodsPromotionForm #btnAddExceptGoods').on('click', function() {
|
|
|
|
|
- cfnOpenGoodsPopup("fnSetPopupExceptGoodsInfo");
|
|
|
|
|
- });
|
|
|
|
|
- // 사은품 조건1 상품 추가 버튼 클릭시
|
|
|
|
|
- $('#freeGoodsPromotionForm #btnAddFreeGoods1').on('click', function() {
|
|
|
|
|
- cfnOpenGoodsPopup("fnSetPopupFreeGoods1Info");
|
|
|
|
|
- });
|
|
|
|
|
- // 사은품 조건2 상품 추가 버튼 클릭시
|
|
|
|
|
- $('#freeGoodsPromotionForm #btnAddFreeGoods2').on('click', function() {
|
|
|
|
|
- cfnOpenGoodsPopup("fnSetPopupFreeGoods2Info");
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- // 공급업체 설정 선택삭제 버튼 클릭시
|
|
|
|
|
- $('#freeGoodsPromotionForm #btnDeleteCompany').on('click', function() {
|
|
|
|
|
- gridOptionsFGCompanyList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGCompanyList)});
|
|
|
|
|
- $("#companyCnt").text(gridOptionsFGCompanyList.api.getDisplayedRowCount());
|
|
|
|
|
- });
|
|
|
|
|
- // 브랜드 설정 선택삭제 버튼 클릭시
|
|
|
|
|
- $('#freeGoodsPromotionForm #btnDeleteBrand').on('click', function() {
|
|
|
|
|
- gridOptionsFGBrandList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGBrandList)});
|
|
|
|
|
- $("#brandCnt").text(gridOptionsFGBrandList.api.getDisplayedRowCount());
|
|
|
|
|
- });
|
|
|
|
|
- // 적용상품 선택삭제 버튼 클릭시
|
|
|
|
|
- $('#freeGoodsPromotionForm #btnDeleteApplyGoods').on('click', function() {
|
|
|
|
|
- gridOptionsFGApplyGoodsList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGApplyGoodsList)});
|
|
|
|
|
- $("#applyGoodsCnt").text(gridOptionsFGApplyGoodsList.api.getDisplayedRowCount());
|
|
|
|
|
- });
|
|
|
|
|
- // 제외상품 선택삭제 버튼 클릭시
|
|
|
|
|
- $('#freeGoodsPromotionForm #btnDeleteExtGoods').on('click', function() {
|
|
|
|
|
- gridOptionsFGExceptGoodsList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGExceptGoodsList)});
|
|
|
|
|
- $("#exceptGoodsCnt").text(gridOptionsFGExceptGoodsList.api.getDisplayedRowCount());
|
|
|
|
|
- });
|
|
|
|
|
- // 사은품조건1 선택삭제 버튼 클릭시
|
|
|
|
|
- $('#freeGoodsPromotionForm #btnDeleteFreeGoods1').on('click', function() {
|
|
|
|
|
- gridOptionsFreeGoods1List.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFreeGoods1List)});
|
|
|
|
|
- });
|
|
|
|
|
- // 사은품조건2 선택삭제 버튼 클릭시
|
|
|
|
|
- $('#freeGoodsPromotionForm #btnDeleteFreeGoods2').on('click', function() {
|
|
|
|
|
- gridOptionsFreeGoods2List.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFreeGoods2List)});
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- //패널영역 줄이기
|
|
|
|
|
- $(document).on("click",".panelControl .inner-fa-chevron-up", function() {
|
|
|
|
|
- $(this).parent().parent().parent().find(".inner-panelContent").slideUp(100);
|
|
|
|
|
- $(this).attr("class","fa inner-fa-chevron-down");
|
|
|
|
|
- });
|
|
|
|
|
- //패널영역 펼치기
|
|
|
|
|
- $(document).on("click",".panelControl .inner-fa-chevron-down", function() {
|
|
|
|
|
- $(this).parent().parent().parent().find(".inner-panelContent").slideDown(100);
|
|
|
|
|
- $(this).attr("class","fa inner-fa-chevron-up");
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- // 창 닫기
|
|
|
|
|
- var fnFreeGoodsPromotionFormClose = function(){
|
|
|
|
|
- uifnPopupClose('popupFreeGoodsPromotionRegi');
|
|
|
|
|
|
|
+ if(addChk) { extmallIds.push(result[i].extmallId) };
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- </script>
|
|
|
|
|
|
|
+ var jsonData = JSON.stringify(extmallIds);
|
|
|
|
|
+ $("#extmallIds").val(jsonData);
|
|
|
|
|
+ $("#extmallCnt").text(extmallIds.length);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 제휴몰 선택 버튼 클릭시
|
|
|
|
|
+ $('#freeGoodsPromotionForm #btnExtmallPopup').on('click', function() {
|
|
|
|
|
+ cfnOpenExtmallListPopup("fnSetPopupExtmallInfo");
|
|
|
|
|
+ });
|
|
|
|
|
+ // 공급업체 설정 업체 추가 버튼 클릭시
|
|
|
|
|
+ $('#freeGoodsPromotionForm #btnAddCompany').on('click', function() {
|
|
|
|
|
+ cfnOpenCompanyListPopup("fnSetPopupComapnyInfo");
|
|
|
|
|
+ });
|
|
|
|
|
+ // 브랜드 추가 버튼 클릭시 (복수 브랜드때 수정 필요)
|
|
|
|
|
+ $('#freeGoodsPromotionForm #btnAddBrand').on('click', function() {
|
|
|
|
|
+ cfnOpenBrandListPopup("fnSetPopupBrandInfo", "M");
|
|
|
|
|
+ });
|
|
|
|
|
+ // 적용 상품 추가 버튼 클릭시
|
|
|
|
|
+ $('#freeGoodsPromotionForm #btnAddApplyGoods').on('click', function() {
|
|
|
|
|
+ cfnOpenGoodsPopup("fnSetPopupApplyGoodsInfo");
|
|
|
|
|
+ });
|
|
|
|
|
+ // 제외 상품 추가 버튼 클릭시
|
|
|
|
|
+ $('#freeGoodsPromotionForm #btnAddExceptGoods').on('click', function() {
|
|
|
|
|
+ cfnOpenGoodsPopup("fnSetPopupExceptGoodsInfo");
|
|
|
|
|
+ });
|
|
|
|
|
+ // 사은품 조건1 상품 추가 버튼 클릭시
|
|
|
|
|
+ $('#freeGoodsPromotionForm #btnAddFreeGoods1').on('click', function() {
|
|
|
|
|
+ cfnOpenGoodsPopup("fnSetPopupFreeGoods1Info");
|
|
|
|
|
+ });
|
|
|
|
|
+ // 사은품 조건2 상품 추가 버튼 클릭시
|
|
|
|
|
+ $('#freeGoodsPromotionForm #btnAddFreeGoods2').on('click', function() {
|
|
|
|
|
+ cfnOpenGoodsPopup("fnSetPopupFreeGoods2Info");
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 공급업체 설정 선택삭제 버튼 클릭시
|
|
|
|
|
+ $('#freeGoodsPromotionForm #btnDeleteCompany').on('click', function() {
|
|
|
|
|
+ gridOptionsFGCompanyList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGCompanyList)});
|
|
|
|
|
+ });
|
|
|
|
|
+ // 브랜드 설정 선택삭제 버튼 클릭시
|
|
|
|
|
+ $('#freeGoodsPromotionForm #btnDeleteBrand').on('click', function() {
|
|
|
|
|
+ gridOptionsFGBrandList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGBrandList)});
|
|
|
|
|
+ });
|
|
|
|
|
+ // 적용상품 선택삭제 버튼 클릭시
|
|
|
|
|
+ $('#freeGoodsPromotionForm #btnDeleteApplyGoods').on('click', function() {
|
|
|
|
|
+ gridOptionsFGApplyGoodsList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGApplyGoodsList)});
|
|
|
|
|
+ });
|
|
|
|
|
+ // 제외상품 선택삭제 버튼 클릭시
|
|
|
|
|
+ $('#freeGoodsPromotionForm #btnDeleteExtGoods').on('click', function() {
|
|
|
|
|
+ gridOptionsFGExceptGoodsList.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFGExceptGoodsList)});
|
|
|
|
|
+ });
|
|
|
|
|
+ // 사은품조건1 선택삭제 버튼 클릭시
|
|
|
|
|
+ $('#freeGoodsPromotionForm #btnDeleteFreeGoods1').on('click', function() {
|
|
|
|
|
+ gridOptionsFreeGoods1List.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFreeGoods1List)});
|
|
|
|
|
+ });
|
|
|
|
|
+ // 사은품조건2 선택삭제 버튼 클릭시
|
|
|
|
|
+ $('#freeGoodsPromotionForm #btnDeleteFreeGoods2').on('click', function() {
|
|
|
|
|
+ gridOptionsFreeGoods2List.api.updateRowData({remove:gagaAgGrid.selectedRowData(gridOptionsFreeGoods2List)});
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //패널영역 줄이기
|
|
|
|
|
+ $(document).on("click",".panelControl .inner-fa-chevron-up", function() {
|
|
|
|
|
+ $(this).parent().parent().parent().find(".inner-panelContent").slideUp(100);
|
|
|
|
|
+ $(this).attr("class","fa inner-fa-chevron-down");
|
|
|
|
|
+ });
|
|
|
|
|
+ //패널영역 펼치기
|
|
|
|
|
+ $(document).on("click",".panelControl .inner-fa-chevron-down", function() {
|
|
|
|
|
+ $(this).parent().parent().parent().find(".inner-panelContent").slideDown(100);
|
|
|
|
|
+ $(this).attr("class","fa inner-fa-chevron-up");
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 창 닫기
|
|
|
|
|
+ var fnFreeGoodsPromotionFormClose = function(){
|
|
|
|
|
+ uifnPopupClose('popupFreeGoodsPromotionRegi');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+</script>
|
|
|
</html>
|
|
</html>
|