|
|
@@ -107,16 +107,8 @@
|
|
|
}
|
|
|
},
|
|
|
{headerName: "노출여부", field: "dispYn", width: 100, cellClass: 'text-center'},
|
|
|
- {headerName: "시작일", field: "prmtStd", width: 120, cellClass: 'text-center',
|
|
|
- cellRenderer: function(params) {
|
|
|
- return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDD").format("YYYY-MM-DD") : '';
|
|
|
- }
|
|
|
- },
|
|
|
- {headerName: "종료일", field: "prmtEdd", width: 120, cellClass: 'text-center',
|
|
|
- cellRenderer: function(params) {
|
|
|
- return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDD").format("YYYY-MM-DD") : '';
|
|
|
- }
|
|
|
- },
|
|
|
+ {headerName: "시작일", field: "prmtStd", width: 120, cellClass: 'text-center'},
|
|
|
+ {headerName: "종료일", field: "prmtEdd", width: 120, cellClass: 'text-center'},
|
|
|
{headerName: "수정자", field: "updNm" , width: 150, cellClass: 'text-center'},
|
|
|
{headerName: "수정일시", field: "updDt", width: 150, cellClass: 'text-center',
|
|
|
cellRenderer: function(params) {
|
|
|
@@ -254,10 +246,9 @@
|
|
|
|
|
|
cfnOpenModalPopup(actionUrl, 'popupCardInterest');
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- //카드 프로모션 삭제
|
|
|
- $('#btnCardPromotionDelete').click(function(e) {
|
|
|
+
|
|
|
+ //카드 프로모션 비노출
|
|
|
+ $('#btnCardPromotionDispUpdate').click(function(e) {
|
|
|
//상품선택여부 확인처리 추가
|
|
|
var selectedData = gridOptions.api.getSelectedRows();
|
|
|
|
|
|
@@ -266,32 +257,68 @@
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- var arrGoodsCd = [];
|
|
|
- var arrGoodsTnmResSq = [];
|
|
|
+ var arrCardPrmtSq = [];
|
|
|
var chkFlag = false;
|
|
|
- //selectedData = gagaAgGrid.getAllRowData(gridOptions);
|
|
|
$.each(selectedData, function(idx, item) {
|
|
|
|
|
|
- if (gagajf.isNull(item.goodsTnmResSq) || item.goodsTnmResSq == "0"){
|
|
|
+ var toDateStr = new Date().format("YYYYMMDD");
|
|
|
+ if (toDateStr > item.prmtEdd.replace(/-/gi,'') ){
|
|
|
chkFlag = true;
|
|
|
- mcxDialog.alert(item.goodsCd +"상품은 상품타이틀이 예약된 상품이 아닙니다.");
|
|
|
+ mcxDialog.alertC("종료된 무이자할부정보는 삭제할 수 없습니다.", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ gridOptions.api.setFocusedCell(idx, "prmtEdd", null);
|
|
|
+ }
|
|
|
+ });
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+ arrCardPrmtSq.push(item.cardPrmtSq);
|
|
|
+ });
|
|
|
+
|
|
|
+ if (chkFlag){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ mcxDialog.confirm('비노출 처리 하시겠습니까? ', {
|
|
|
+ cancelBtnText: "취소",
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function(){
|
|
|
+ var data = {arrCardPrmtSq : arrCardPrmtSq};
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
+ gagajf.ajaxJsonSubmit('/marketing/card/promotion/dispYn/update', jsonData, fnCardPromotionDeleteCollBack);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ //카드 프로모션 삭제
|
|
|
+ $('#btnCardPromotionDelete').click(function(e) {
|
|
|
+ //상품선택여부 확인처리 추가
|
|
|
+ var selectedData = gridOptions.api.getSelectedRows();
|
|
|
+
|
|
|
+ if (selectedData.length == 0) {
|
|
|
+ mcxDialog.alert('선택된 행이 없습니다.');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ var arrCardPrmtSq = [];
|
|
|
+ var chkFlag = false;
|
|
|
+ $.each(selectedData, function(idx, item) {
|
|
|
|
|
|
- var toDateStr = new Date().format("YYYYMMDDHHmmss");
|
|
|
- if (toDateStr > item.applyEddt){
|
|
|
+ var toDateStr = new Date().format("YYYYMMDD");
|
|
|
+ if (toDateStr > item.prmtEdd.replace(/-/gi,'') ){
|
|
|
chkFlag = true;
|
|
|
- mcxDialog.alertC("종료된 예약 상품은 삭제할 수 없습니다.", {
|
|
|
+ mcxDialog.alertC("종료된 무이자할부정보는 삭제할 수 없습니다.", {
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function() {
|
|
|
- $('#goodsRsvtTnmForm input[name=applyEdYMD]').focus();
|
|
|
+ gridOptions.api.setFocusedCell(idx, "prmtEdd", null);
|
|
|
}
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- arrGoodsCd.push(item.goodsCd);
|
|
|
- arrGoodsTnmResSq.push(item.goodsTnmResSq);
|
|
|
+ arrCardPrmtSq.push(item.cardPrmtSq);
|
|
|
});
|
|
|
|
|
|
if (chkFlag){
|
|
|
@@ -302,18 +329,15 @@
|
|
|
cancelBtnText: "취소",
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function(){
|
|
|
- var data = {arrGoodsCd : arrGoodsCd
|
|
|
- ,arrGoodsTnmResSq : arrGoodsTnmResSq
|
|
|
- };
|
|
|
-
|
|
|
- var jsonData = JSON.stringify(data);
|
|
|
- gagajf.ajaxJsonSubmit('/goods/title/reserve/delete', jsonData, fnCardPromotionDeleteCollBack);
|
|
|
+ var data = {arrCardPrmtSq : arrCardPrmtSq};
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
+ gagajf.ajaxJsonSubmit('/marketing/card/promotion/delete', jsonData, fnCardPromotionDeleteCollBack);
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
var fnCardPromotionDeleteCollBack = function(){
|
|
|
- //fnCardPromotionListSearch($();
|
|
|
+ fnCardPromotionListSearch();
|
|
|
}
|
|
|
|
|
|
$(document).ready(function() {
|