|
@@ -0,0 +1,267 @@
|
|
|
|
|
+<!DOCTYPE html>
|
|
|
|
|
+<html lang="ko"
|
|
|
|
|
+ xmlns:th="http://www.thymeleaf.org">
|
|
|
|
|
+<!--
|
|
|
|
|
+ *******************************************************************************
|
|
|
|
|
+ * @source : CouponListForm.html
|
|
|
|
|
+ * @desc : 쿠폰관리 Page
|
|
|
|
|
+ *============================================================================
|
|
|
|
|
+ * STYLE24
|
|
|
|
|
+ * Copyright(C) 2020 TSIT, All rights reserved.
|
|
|
|
|
+ *============================================================================
|
|
|
|
|
+ * VER DATE AUTHOR DESCRIPTION
|
|
|
|
|
+ * === =========== ========== =============================================
|
|
|
|
|
+ * 1.0 2020.12.21 xyzp1539 최초 작성
|
|
|
|
|
+ *******************************************************************************
|
|
|
|
|
+ -->
|
|
|
|
|
+<div id="main">
|
|
|
|
|
+ <!-- 메인타이틀 영역 -->
|
|
|
|
|
+ <div class="main-title">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //메인타이틀 영역 -->
|
|
|
|
|
+
|
|
|
|
|
+ <form id="searchForm" name="searchForm" action="#" th:action="@{'/marketing/coupon/list'}">
|
|
|
|
|
+ <!-- 패널 영역1 -->
|
|
|
|
|
+ <div class="panelStyle" >
|
|
|
|
|
+ <!-- 검색조건 영역 -->
|
|
|
|
|
+ <!-- TITLE -->
|
|
|
|
|
+ <div class="panelTitle">
|
|
|
|
|
+ <h3>검색조건</h3>
|
|
|
|
|
+ <span class="panelControl">
|
|
|
|
|
+ <i class="fa fa-chevron-up"></i>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //TITLE -->
|
|
|
|
|
+ <div class="panelContent">
|
|
|
|
|
+ <table class="frmStyle">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col style="width: 8%;"/>
|
|
|
|
|
+ <col style="width: 12%;"/>
|
|
|
|
|
+ <col style="width: 8%;"/>
|
|
|
|
|
+ <col style="width: 12%;"/>
|
|
|
|
|
+ <col style="width: 8%;"/>
|
|
|
|
|
+ <col style="width: 12%;"/>
|
|
|
|
|
+ <col style="width: 8%;"/>
|
|
|
|
|
+ <col style="width: 12%;"/>
|
|
|
|
|
+ <col style="width: 8%;"/>
|
|
|
|
|
+ <col style="width: 12%;"/>
|
|
|
|
|
+ <col/>
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>사이트</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <select name="site" id="site">
|
|
|
|
|
+ <option value="">[전체]</option>
|
|
|
|
|
+ <option th:if="${siteCdList}" th:each="oneData, status : ${siteCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>쿠폰ID</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" class="w900" name="cpnId" id="cpnId"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>쿠폰유형</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <select name="cpnType" id="cpnType">
|
|
|
|
|
+ <option value="">[전체]</option>
|
|
|
|
|
+ <option th:if="${cpnTypeList}" th:each="oneData, status : ${cpnTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>등록자</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" class="w200" name="regNo" id="regNo">
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>할인유형</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <select name="dcWayList" id="dcWayList">
|
|
|
|
|
+ <option value="">[전체]</option> dcWayList
|
|
|
|
|
+ <option th:if="${dcWayList}" th:each="oneData, status : ${dcWayList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>쿠폰명</th>
|
|
|
|
|
+ <td colspan="10">
|
|
|
|
|
+ <input type="text" class="w800" id="cpnNm" name="cpnNm">
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>유효기간구분</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <select name="pdGb" id="pdGb">
|
|
|
|
|
+ <option value="">[전체]</option>
|
|
|
|
|
+ <option value="P">기간</option>
|
|
|
|
|
+ <option value="D">일</option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>유효기간</th>
|
|
|
|
|
+ <td colspan="5" id="sellTerms"></td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th colspan="1">
|
|
|
|
|
+ <td colspan="9">
|
|
|
|
|
+ <label class="chkBox"><input type="checkbox" id="endCpnExcep" name="chkExcep" value="E" checked>종료쿠폰제외</label>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </th>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ <ul class="panelBar">
|
|
|
|
|
+ <li class="center">
|
|
|
|
|
+ <button type="button" class="btn btn-gray btn-lg" id="btnInit" >초기화</button>
|
|
|
|
|
+ <button type="button" class="btn btn-info btn-lg" id="btnSearch" >조회</button>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //검색조건 영역 -->
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 패널 영역1 -->
|
|
|
|
|
+ <div class="panelStyle">
|
|
|
|
|
+ <!-- 상단버튼 영역 -->
|
|
|
|
|
+ <ul class="panelBar">
|
|
|
|
|
+ <li class="right">
|
|
|
|
|
+ <button type="button" class="btn btn-info btn-lg" onclick="fnCouponCreateForm();">등록</button>
|
|
|
|
|
+ 검색결과 : <strong><span id="gridRowTotalCount">0</span> 건</strong>
|
|
|
|
|
+ 쪽번호 <span id="pgNo">0</span>/ <strong id="endPgNo">0</strong>
|
|
|
|
|
+ <select id="pageSize" name="pageSize">
|
|
|
|
|
+ <option value="50" selected="selected">50개씩 보기</option>
|
|
|
|
|
+ <option value="100">100개씩 보기</option>
|
|
|
|
|
+ <option value="500">500개씩 보기</option>
|
|
|
|
|
+ <option value="1000">1000개씩 보기</option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <input type="hidden" name="pageNo" id="pageNo" value ="1"/>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 검색결과 영역 -->
|
|
|
|
|
+ <div id="gridList" style="width: 100%; height: 700px;" class="ag-theme-balham lh60"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </form>
|
|
|
|
|
+ <script type="text/javascript" src="/ux/plugins/gaga/gaga.paging.js?v=2019072202"></script>
|
|
|
|
|
+ <script th:inline="javascript">
|
|
|
|
|
+ /*<![CDATA[*/
|
|
|
|
|
+ var columnDefs = [];
|
|
|
|
|
+ columnDefs = [
|
|
|
|
|
+ {headerName: "사이트", field: "siteCD", width: 80, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "쿠폰ID", field: "cpnId", width: 130, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "쿠폰명", field: "cpnNm", width: 140, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "사용가능고객구분", field: "useableCustGb", width: 140, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "쿠폰유형", field: "cpnType", width: 140, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "할인방식", field: "dcWay", width: 140, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "할인값(PC)", field: "dcPval", width: 140, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "할인값(MOBILE)", field: "dcMval", width: 140, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "최고할인값", field: "maxDcAmt", width: 140, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "사용 수/발급 수 ", field: "useIssueCnt", width: 140, cellClass: 'text-center',
|
|
|
|
|
+ cellRenderer: function(params) {
|
|
|
|
|
+ return params.data.issueCnt + "/" + params.data.useCnt;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "기간/일수구분", field: "pdGb", width: 140, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "유효시작일시", field: "availStdt", width: 140, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "유효종료일시", field: "availEddt", width: 140, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "등록자", field: "regNo", width: 200, cellClass: 'text-left'},
|
|
|
|
|
+ {headerName: "등록일시", field: "regDt", width: 140, cellClass: 'text-center'},
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+ // Get GridOptions
|
|
|
|
|
+ var gridOptions = gagaAgGrid.getGridOptions(columnDefs);
|
|
|
|
|
+
|
|
|
|
|
+ // 쿠폰등록 팝업창
|
|
|
|
|
+ function fnCouponCreateForm(){
|
|
|
|
|
+ cfnCouponCreatePopup();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // Row Click
|
|
|
|
|
+ /*
|
|
|
|
|
+ gridOptions.onCellClicked = function(event) {
|
|
|
|
|
+ var goodsCd = event.data.goodsCd;
|
|
|
|
|
+ if (event.colDef.field == "freeGiftName"){
|
|
|
|
|
+ // 수ㅜ정 필요
|
|
|
|
|
+ // cfnOpenGoodsDetailPopup('U',goodsCd);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
|
|
+ // 초기화 클릭시
|
|
|
|
|
+ $('#btnInit').on('click', function() {
|
|
|
|
|
+ $('#searchForm')[0].reset();
|
|
|
|
|
+ //$("#searchForm input[type=radio]").removeClass("checked");
|
|
|
|
|
+ $("#searchForm input[type=checkbox]").removeClass("checked");
|
|
|
|
|
+ //$("#searchForm input[type=radio]").parent("label").removeClass("checked");
|
|
|
|
|
+ $("#searchForm input[type=checkbox]").parent("label").removeClass("checked");
|
|
|
|
|
+ $("#searchForm input[type=radio][checked]").parent("label").addClass("checked");
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 조회클릭시
|
|
|
|
|
+ $('#btnSearch').on('click', function() {
|
|
|
|
|
+ $("#searchForm input[name=pageNo]").val('1');
|
|
|
|
|
+ fnCouponListSearch();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 조회
|
|
|
|
|
+ var fnCouponListSearch = function() {
|
|
|
|
|
+ if(!fnConditionCheck()) return;
|
|
|
|
|
+
|
|
|
|
|
+ gagaPaging.init('searchForm', fnSearchCallBack, 'couponListPagination', $('#searchForm').find('#pageSize').val());
|
|
|
|
|
+ gagaPaging.load($("#searchForm input[name=pageNo]").val());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //검색 조건 확인
|
|
|
|
|
+ var fnConditionCheck = function(){
|
|
|
|
|
+ var fromDate = $('#searchForm input[name=availStdt]').val();
|
|
|
|
|
+ var toDate = $('#searchForm input[name=availEddt]').val();
|
|
|
|
|
+
|
|
|
|
|
+ if (!gagajf.isNull(fromDate) || !gagajf.isNull(toDate)) {
|
|
|
|
|
+
|
|
|
|
|
+ if (gagajf.isNull(fromDate) || gagajf.isNull(toDate)) {
|
|
|
|
|
+ mcxDialog.alertC("기간 조회시 시작일자와 종료일자를 입력하세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $('#searchForm input[name=availStdt]').focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (fromDate > toDate) {
|
|
|
|
|
+ mcxDialog.alertC("등록 시작일자는 종료일자 보다 클 수 없습니다.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $('#searchForm input[name=availEddt]').focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var fnSearchCallBack = function(result){
|
|
|
|
|
+
|
|
|
|
|
+ $('#searchForm').find('#gridRowTotalCount').html(result.pageing.pageable.totalCount.addComma());
|
|
|
|
|
+ $('#searchForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
|
|
|
|
|
+ $('#searchForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
|
|
|
|
|
+ $('#searchForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
|
|
|
|
|
+ gridOptions.api.setRowData(result.cpnList);
|
|
|
|
|
+ gagaPaging.createPagination(result.pageing.pageable);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //페이징
|
|
|
|
|
+ $('#searchForm select[name=pageSize]').on('change', function() {
|
|
|
|
|
+ $("#searchForm input[name=pageNo]").val('1');
|
|
|
|
|
+ fnCouponListSearch();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ $(document).ready(function() {
|
|
|
|
|
+ cfnCreateCalendar('#sellTerms', 'availStdt', 'availEddt', true, '기간', 'X');
|
|
|
|
|
+
|
|
|
|
|
+ // Create a agGrid
|
|
|
|
|
+ gagaAgGrid.createGrid('gridList', gridOptions);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ /*]]>*/
|
|
|
|
|
+ </script>
|
|
|
|
|
+</div>
|
|
|
|
|
+
|
|
|
|
|
+</html>
|