|
|
@@ -22,10 +22,13 @@
|
|
|
<!-- 메뉴 설명 -->
|
|
|
<div class="infoBox menu-desc">
|
|
|
</div>
|
|
|
- <form id="cardInterestListForm" name="cardInterestListForm" action="#" th:action="@{'/marketing/card/interest/list'}">
|
|
|
+ <form id="cardInterestSearchForm" name="cardInterestSearchForm" action="#" th:action="@{'/marketing/card/interest/list'}">
|
|
|
<input type="hidden" id="prmtGb" name="prmtGb" value="B" /> <!-- 무이자 -->
|
|
|
<!-- 패널 영역1 -->
|
|
|
<div class="panelStyle" >
|
|
|
+ <div class="panelTitle">
|
|
|
+ <h3><i class="fa fa-info-circle"></i>아래 검색조건 중 하나를 꼭 입력해 주세요.</h3>
|
|
|
+ </div>
|
|
|
<div class="panelContent">
|
|
|
<table class="frmStyle">
|
|
|
<colgroup>
|
|
|
@@ -33,14 +36,15 @@
|
|
|
<col/>
|
|
|
</colgroup>
|
|
|
<tr>
|
|
|
- <th>구분<em class="required" title="필수"></em></th>
|
|
|
+ <th>구분</th>
|
|
|
<td>
|
|
|
- <label class="rdoBtn"><input type="radio" name="sizeGb" value="1" checked/>프로모션ID</label>
|
|
|
- <label class="rdoBtn"><input type="radio" name="sizeGb" value="2"/>프로모션명</label>
|
|
|
+ <label class="rdoBtn"><input type="radio" name="search" value="1" checked/>프로모션ID</label>
|
|
|
+ <label class="rdoBtn"><input type="radio" name="search" value="2"/>프로모션명</label>
|
|
|
+ <input type="text" class="w300" maxlength="30" name="condition"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <th>기간<em class="required" title="필수"></em></th>
|
|
|
+ <th>기간</th>
|
|
|
<td id="sellTerms"></td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
@@ -94,7 +98,7 @@
|
|
|
var columnDefs = [
|
|
|
{width: 40, minWidth: 40, cellClass: 'text-right', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
{headerName: 'No', width: 60, cellClass: 'text-center',
|
|
|
- valueGetter: function(params) { return cfnGridNumner('cardInterestListForm',params.node.rowIndex, 'A');}
|
|
|
+ valueGetter: function(params) { return cfnGridNumner('cardInterestSearchForm',params.node.rowIndex, 'A');}
|
|
|
},
|
|
|
{headerName: "프로모션ID", field: "cardPrmtSq", width: 130, cellClass: 'text-center'},
|
|
|
{headerName: "프로모션명", field: "prmtNm", width: 140, cellClass: 'text-center'
|
|
|
@@ -148,12 +152,12 @@
|
|
|
});
|
|
|
|
|
|
var fnInit = function(){
|
|
|
- $('#cardInterestListForm')[0].reset();
|
|
|
+ $('#cardInterestSearchForm')[0].reset();
|
|
|
}
|
|
|
|
|
|
// 조회클릭시
|
|
|
$('#btnSearch').on('click', function() {
|
|
|
- $("#cardInterestListForm input[name=pageNo]").val('1');
|
|
|
+ $("#cardInterestSearchForm input[name=pageNo]").val('1');
|
|
|
fnCardPromotionListSearch();
|
|
|
});
|
|
|
|
|
|
@@ -162,14 +166,14 @@
|
|
|
|
|
|
if(!fnConditionCheck()) return;
|
|
|
|
|
|
- gagaPaging.init('cardInterestListForm', fnSearchCallBack, 'cardListPagination', $('#cardInterestListForm').find('#pageSize').val());
|
|
|
- gagaPaging.load($("#cardInterestListForm input[name=pageNo]").val());
|
|
|
+ gagaPaging.init('cardInterestSearchForm', fnSearchCallBack, 'cardListPagination', $('#cardInterestSearchForm').find('#pageSize').val());
|
|
|
+ gagaPaging.load($("#cardInterestSearchForm input[name=pageNo]").val());
|
|
|
}
|
|
|
|
|
|
//검색 조건 확인
|
|
|
var fnConditionCheck = function(){
|
|
|
- var formId = '#cardInterestListForm';
|
|
|
- var form = document.cardInterestListForm;
|
|
|
+ var formId = '#cardInterestSearchForm';
|
|
|
+ var form = document.cardInterestSearchForm;
|
|
|
|
|
|
var searchFlag = false;
|
|
|
var cnt = 0;
|
|
|
@@ -191,8 +195,8 @@
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- var fromDate = $('#cardInterestListForm input[name=stDate]').val();
|
|
|
- var toDate = $('#cardInterestListForm input[name=edDate]').val();
|
|
|
+ var fromDate = $('#cardInterestSearchForm input[name=stDate]').val();
|
|
|
+ var toDate = $('#cardInterestSearchForm input[name=edDate]').val();
|
|
|
|
|
|
if (!gagajf.isNull(fromDate) || !gagajf.isNull(toDate)) {
|
|
|
|
|
|
@@ -200,7 +204,7 @@
|
|
|
mcxDialog.alertC("등록일 조회시 시작일자와 종료일자를 입력하세요.", {
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function() {
|
|
|
- $('#cardInterestListForm input[name=stDate]').focus();
|
|
|
+ $('#cardInterestSearchForm input[name=stDate]').focus();
|
|
|
}
|
|
|
});
|
|
|
return false;
|
|
|
@@ -210,7 +214,7 @@
|
|
|
mcxDialog.alert("노출기간 시작일자는 종료일자 보다 클 수 없습니다.", {
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function() {
|
|
|
- $('#cardInterestListForm input[name=stDate]').focus();
|
|
|
+ $('#cardInterestSearchForm input[name=stDate]').focus();
|
|
|
}
|
|
|
});
|
|
|
return false;
|
|
|
@@ -222,26 +226,37 @@
|
|
|
|
|
|
var fnSearchCallBack = function(result){
|
|
|
|
|
|
- $('#cardInterestListForm').find('#gridRowTotalCount').html(result.pageing.pageable.totalCount.addComma());
|
|
|
- $('#cardInterestListForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
|
|
|
- $('#cardInterestListForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
|
|
|
- $('#cardInterestListForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
|
|
|
+ $('#cardInterestSearchForm').find('#gridRowTotalCount').html(result.pageing.pageable.totalCount.addComma());
|
|
|
+ $('#cardInterestSearchForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
|
|
|
+ $('#cardInterestSearchForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
|
|
|
+ $('#cardInterestSearchForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
|
|
|
gridOptions.api.setRowData(result.cardPromotionList);
|
|
|
gagaPaging.createPagination(result.pageing.pageable);
|
|
|
}
|
|
|
|
|
|
//페이징
|
|
|
- $('#cardInterestListForm select[name=pageSize]').on('change', function() {
|
|
|
- $("#cardInterestListForm input[name=pageNo]").val('1');
|
|
|
- fnCardPromotionListSearch($("#cardInterestListForm input[name=searchGb]").val());
|
|
|
+ $('#cardInterestSearchForm select[name=pageSize]').on('change', function() {
|
|
|
+ $("#cardInterestSearchForm input[name=pageNo]").val('1');
|
|
|
+ fnCardPromotionListSearch($("#cardInterestSearchForm input[name=searchGb]").val());
|
|
|
});
|
|
|
|
|
|
//카드 무이자 팝업
|
|
|
$('#btnCardPromotionSave').click(function(e) {
|
|
|
- var actionUrl = "/marketing/card/interest/popup/form";
|
|
|
- cfnOpenModalPopup(actionUrl, 'popupCardInterest');
|
|
|
+ cardInterestPopup();
|
|
|
});
|
|
|
|
|
|
+ var cardInterestPopup = function(cardPrmtSq){
|
|
|
+ var actionUrl = "/marketing/card/interest/popup/form/";
|
|
|
+ if (typeof(cardPrmtSq) != 'undefined' && cardPrmtSq != null ){
|
|
|
+ actionUrl += cardPrmtSq;
|
|
|
+ }else{
|
|
|
+ actionUrl += 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupCardInterest');
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
//카드 프로모션 삭제
|
|
|
$('#btnCardPromotionDelete').click(function(e) {
|
|
|
//상품선택여부 확인처리 추가
|
|
|
@@ -284,7 +299,7 @@
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- mcxDialog.confirm('삭제하시겠습니까?', {
|
|
|
+ mcxDialog.confirm('삭제하시겠습니까? <br/> 삭제한 프로모션은 복구할수 없습니다.', {
|
|
|
cancelBtnText: "취소",
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function(){
|
|
|
@@ -304,9 +319,9 @@
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
- cfnCreateCalendar('#sellTerms', 'stDate', 'edDate', true, '기간');
|
|
|
+ cfnCreateCalendar('#sellTerms', 'stDate', 'edDate', true, '기간', 'X');
|
|
|
var chkBeforSkipFlag = ' <label class="chkBox"><input type="checkbox" name="beforSkipFlag" value="Y" >이전데이터 제외</label>';
|
|
|
- $("#cardInterestListForm").find('#sellTerms').append(chkBeforSkipFlag);
|
|
|
+ $("#cardInterestSearchForm").find('#sellTerms').append(chkBeforSkipFlag);
|
|
|
|
|
|
// Create a agGrid
|
|
|
gagaAgGrid.createGrid('gridList', gridOptions);
|