فهرست منبع

Merge branch 'develop' into card007

card007 5 سال پیش
والد
کامیت
630b2100e2

+ 1 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsaCustomer.xml

@@ -393,6 +393,7 @@
 		               SELECT SUM(RM_PNT_AMT) AS RM_PNT_AMT
 		               FROM  TB_CUST_POINT
 		               WHERE CUST_NO = C.CUST_NO
+		               AND   GV_PNT_AMT > 0
 		               AND   EXP_BE_DT > NOW()
 		               AND   EXP_BE_DT <![CDATA[<]]> DATE_ADD(NOW(),INTERVAL 31 DAY)
 		                ), 0)                          AS EXPECTED_EXPIRE_PNT_AMT -- 소멸예정포인트(30일)

+ 0 - 10
src/main/webapp/WEB-INF/views/board/NoticeForm.html

@@ -91,16 +91,6 @@
 				<input type="hidden" name="noticeEddt"/> <!-- 공지종료일자 -->
 				
 				<table class="frmStyle" aria-describedby="등록/수정 폼">
-					<colgroup>
-						<col style="width:10%;"/>
-						<col style="width:15%;"/>
-						<col style="width:10%;"/>
-						<col style="width:15%;"/>
-						<col style="width:10%;"/>
-						<col style="width:15%;"/>
-						<col style="width:10%;"/>
-						<col style="width:15%;"/>
-					</colgroup>
 					<tr>
 						<th>공지번호</th>
 						<td>

+ 16 - 9
src/main/webapp/WEB-INF/views/display/MainContentsPopupForm.html

@@ -154,16 +154,20 @@
 				html += '<tr class="cateTypeTr" name="tvY'+i+'">';
 				html += '	<th>미디어<br>컨텐츠키</th>';
 				html += '	<td colspan="3">';
-				html += '		<input name="tvMediaKey'+i+'" type="text" class="w150" maxlength="200" data-valid-name="미디어 컨텐츠키" value="'+result[i].strVar2+'"/>';
+				html += '		<input name="tvMediaKey'+i+'" type="text" class="w150" maxlength="200" data-valid-name="미디어 컨텐츠키" value="'+result[i].strVar2+'" ';
+				if(result[i].strVar1=='M'){
+					html += ' disabled="disabled" ';
+				}
+				html += '/>';
 				html += '	</td>';
 				html += '</tr>';
-				if(result[i].strVar1=='M'){
+				if(result[i].strVar1=='M' && (result[i].strVar2==null || result[i].strVar2=='')){
 					html += '<tr class="cateTypeTr" name="tvM'+i+'">';
 					html +='	<th>파일첨부<em class="required" title="필수"></em></th>';
 					html +='	<td class="infoTxt" colSpan="5">';
 					html +='		<div class="uFile w300">';
 					html +='			<input id="file'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnVideoFileUpload(this, '+i+')"/>';
-					html +='			<label htmlFor="file'+i+'" class="uFileLabel">파일선택</label>';
+					html +='			<label for="file'+i+'" class="uFileLabel">파일선택</label>';
 					html +='			<input type="hidden" name="kufKey" value="'+result[i].strVar3+'"/>';
 					html +='			<input type="hidden" name="kmcKey"/>';
 					html +='		</div>';
@@ -476,9 +480,11 @@
 		if(tvPlayer == 'Y'){
 			$(obj).closest("table").find("[name=tvY"+idx+"]").show();
 			$(obj).closest("table").find("[name=tvM"+idx+"]").hide();
+			$(obj).closest("table").find("[name=tvMediaKey"+idx+"]").prop('disabled',false);
 		}else{
 			$(obj).closest("table").find("[name=tvY"+idx+"]").show();
 			$(obj).closest("table").find("[name=tvM"+idx+"]").show();
+			$(obj).closest("table").find("[name=tvMediaKey"+idx+"]").prop('disabled',true);
 		}
 	}
 
@@ -662,11 +668,11 @@
 			html += '	</td>';
 			html += '</tr>';
 			html += '<tr class="cateTypeTr" name="tvM'+dataIdx+'" style="display: none;">';
-			html +='	<th>파일첨부<em className="required" title="필수"></em></th>';
-			html +='	<td className="infoTxt" colSpan="5">';
-			html +='		<div className="uFile w300">';
-			html +='			<input id="file'+dataIdx+'" name="file" type="file" className="uFileInput w300" onchange="fnVideoFileUpload(this, '+dataIdx+')"/>';
-			html +='			<label htmlFor="file'+dataIdx+'" className="uFileLabel">파일선택</label>';
+			html +='	<th>파일첨부<em class="required" title="필수"></em></th>';
+			html +='	<td class="infoTxt" colSpan="5">';
+			html +='		<div class="uFile w300">';
+			html +='			<input id="file'+dataIdx+'" name="file" type="file" class="uFileInput w300" onchange="fnVideoFileUpload(this, '+dataIdx+')"/>';
+			html +='			<label for="file'+dataIdx+'" class="uFileLabel">파일선택</label>';
 			html +='			<input type="hidden" name="kufKey"/>';
 			html +='			<input type="hidden" name="kmcKey"/>';
 			html +='		</div>';
@@ -959,7 +965,7 @@
 		var dataBool = true;
 		$(".mcTable").each(function(i){
 			var thisIdx = $(this).find("input[name=tableIdx]").val();
-			if($(this).find("input:radio[name=tvPlayer"+thisIdx+"]:checked").val()=='M'){
+			if($(this).find("input:radio[name=tvPlayer"+thisIdx+"]:checked").val()=='M' && ($(this).find("input[name=tvMediaKey"+thisIdx+"]").val()==null || $(this).find("input[name=tvMediaKey"+thisIdx+"]").val()=='')){
 				var fileName = $(this).find("input:file[name=file]").val();
 				var ext =  fileName.split('.').pop().toLowerCase();
 				if(ext!='mp4'&&ext!='MP4'){
@@ -1530,6 +1536,7 @@
 
 	// 동영상파일 선택 시
 	$('#popSortable input[name=file]').on('change', function() {
+		console.log('888');
 		var file = this.files[0];
 		gagaKollus.upload('Display', file, $('input[name=kufKey]'));
 	});

+ 46 - 6
src/main/webapp/WEB-INF/views/display/MainMultiContentsPopupForm.html

@@ -789,6 +789,46 @@ console.log('brandGroupNo:'+brandGroupNo);
 		});
 	});
 
+	var fnUpBtn = function (obj, idx){
+		var ind = $(obj).closest('.item').index();
+		if(ind>0){
+			$('#goodsListTd'+idx).find(".item").eq(ind-1).before($('#goodsListTd'+idx).find(".item").eq(ind));
+			$('#goodsListTd'+idx).find(".item").eq(ind).find("input[name=setDispOrd]").val(Number($('#goodsListTd'+idx).find(".item").eq(ind).find("input[name=setDispOrd]").val())+1);
+			$('#goodsListTd'+idx).find(".item").eq(ind-1).find("input[name=setDispOrd]").val(Number($('#goodsListTd'+idx).find(".item").eq(ind-1).find("input[name=setDispOrd]").val())-1);
+			$('#goodsListTd'+idx).find(".item").eq(ind).find("input[name=dispOrdEdit]").val(Number($('#goodsListTd'+idx).find(".item").eq(ind).find("input[name=dispOrdEdit]").val())+1);
+			$('#goodsListTd'+idx).find(".item").eq(ind-1).find("input[name=dispOrdEdit]").val(Number($('#goodsListTd'+idx).find(".item").eq(ind-1).find("input[name=dispOrdEdit]").val())-1);
+		}
+	}
+
+	var fnDownBtn = function (obj, idx){
+		var ind = $(obj).closest('.item').index();
+		if(ind<$("#goodsListTd"+idx).find('.goodsClass').length){
+			$('#goodsListTd'+idx).find(".item").eq(ind+1).after($('#goodsListTd'+idx).find(".item").eq(ind));
+			$('#goodsListTd'+idx).find(".item").eq(ind).find("input[name=setDispOrd]").val(Number($('#goodsListTd'+idx).find(".item").eq(ind).find("input[name=setDispOrd]").val())-1);
+			$('#goodsListTd'+idx).find(".item").eq(ind+1).find("input[name=setDispOrd]").val(Number($('#goodsListTd'+idx).find(".item").eq(ind+1).find("input[name=setDispOrd]").val())+1);
+			$('#goodsListTd'+idx).find(".item").eq(ind).find("input[name=dispOrdEdit]").val(Number($('#goodsListTd'+idx).find(".item").eq(ind).find("input[name=dispOrdEdit]").val())-1);
+			$('#goodsListTd'+idx).find(".item").eq(ind+1).find("input[name=dispOrdEdit]").val(Number($('#goodsListTd'+idx).find(".item").eq(ind+1).find("input[name=dispOrdEdit]").val())+1);
+		}
+	}
+
+	var fnUpdownBtn = function (obj, gubun, idx){
+		if(gubun=='up'){
+			var ind = $(obj).closest('.item').index();
+			$('#goodsListTd'+idx).find(".item").eq(0).before($('#goodsListTd'+idx).find(".item").eq(ind));
+			$('#goodsListTd'+idx).find('.goodsClass').each(function (j){
+				$(this).find('input[name=dispOrdEdit]').val(j+1);
+			});
+		}else{
+			var ind = $(obj).closest('.item').index();
+			let lastNum = $("#goodsListTd"+idx).find('.goodsClass').length;
+			$('#goodsListTd'+idx).find(".item").eq(lastNum-1).after($('#goodsListTd'+idx).find(".item").eq(ind));
+			$('#goodsListTd'+idx).find('.goodsClass').each(function (j){
+				$(this).find('input[name=dispOrdEdit]').val(j+1);
+			});
+		}
+
+	}
+
 	/**
 	 * 상품추가
 	 */
@@ -809,12 +849,12 @@ console.log('brandGroupNo:'+brandGroupNo);
 				html += '<ul id="goodsUl'+i+'" class="item ui-state-default goodsClass" style="min-height:200px;"> ';
 				html += '<li class="img">';
 				html += '<img src="'+imgPath+ "/" +param[i].sysImgNm+'" onerror="this.src=\'/image/no.png\';"/>';
-				// html += '<div class="btnArea">';
-				// html += '<button type="button" class="icnSm" title="맨위로" onclick="fnUpdownBtn(\''+param[i].goodsCd+'\', \''+param[i].dispOrd+'\', \'up\');"><i class="fa fa-play-circle fa-rotate-270" aria-hidden="true"></i></button>';
-				// html += '<button type="button" class="icnSm" title="위로"><i class="fa fa-arrow-up" aria-hidden="true"></i></button>';
-				// html += '<button type="button" class="icnSm" title="맨아래로" onclick="fnUpdownBtn(\''+param[i].goodsCd+'\', \''+param[i].dispOrd+'\', \'down\');"><i class="fa fa-play-circle fa-rotate-90" aria-hidden="true"></i></button>';
-				// html += '<button type="button" class="icnSm" title="아래로"><i class="fa fa-arrow-down" aria-hidden="true"></i></button>';
-				// html += '</div>';
+				html += '<div class="btnArea">';
+				html += '<button type="button" class="icnSm" title="맨위로" onclick="fnUpdownBtn(this, \'up\', \''+goodsIdx+'\');"><i class="fa fa-play-circle fa-rotate-270" aria-hidden="true"></i></button>';
+				html += '<button type="button" class="icnSm" title="위로" onclick="fnUpBtn(this, \''+goodsIdx+'\');"><i class="fa fa-arrow-up" aria-hidden="true"></i></button>';
+				html += '<button type="button" class="icnSm" title="맨아래로" onclick="fnUpdownBtn(this, \'down\', \''+goodsIdx+'\');"><i class="fa fa-play-circle fa-rotate-90" aria-hidden="true"></i></button>';
+				html += '<button type="button" class="icnSm" title="아래로" onclick="fnDownBtn(this, \''+goodsIdx+'\');"><i class="fa fa-arrow-down" aria-hidden="true"></i></button>';
+				html += '</div>';
 				html += '</li>';
 				html += '<li class="cont">';
 				html += '<ul>';

+ 38 - 35
src/main/webapp/WEB-INF/views/marketing/PlanDetailPopupForm.html

@@ -1031,10 +1031,13 @@
 			for(let i = 0; i < arr.length; i++) {
 			  const currElem = arr[i];
 			  for(let j = i+1; j < arr.length; j++) {
-			    if(currElem === arr[j]) {
-			      dupYn = true;
-			      break;
-			    }
+				if (currElem != "" && arr[j] != "") {
+					if(currElem === arr[j]) {
+				      dupYn = true;
+				      break;
+				    }
+				}
+			    
 			  }
 			}
 			
@@ -1060,6 +1063,9 @@
 					}else if (attendData[i].pntUsableDay == "") {
 						mcxDialog.alert('혜택(포인트/혜택) 유효기간 일수를 입력하세요.');
 						return false;
+					}else if(attendData[i].cpnYn == "N"){
+						mcxDialog.alert('혜택(포인트/혜택) 유효한 쿠폰ID를 입력하세요.');
+						return false;
 					}
 				}
 				if (attendData[i].benefitGb == 'P') {
@@ -1083,31 +1089,14 @@
 					else if (attendData[i].cpnId == "") {
 						mcxDialog.alert('혜택(쿠폰) 적용 쿠폰ID를 입력하세요.');
 						return false;
+					}else if(attendData[i].cpnYn == "N"){
+						mcxDialog.alert('혜택(쿠폰) 유효한 쿠폰ID를 입력하세요.');
+						return false;
 					}
 				}
-				
-				if (attendData[i].benefitGb == 'A' || attendData[i].benefitGb == 'C') {
-					var param = {cpnId : attendData[i].cpnId};
-					var jsonData = JSON.stringify(param);
-					
-					gagajf.ajaxJsonSubmit('marketing/planning/attend/coupon', jsonData, function(result) {
-						if (result.length < 1) {
-							mcxDialog.alert('입력하신 쿠폰 ID ' + attendData[i].cpnId.addComma() + '은(는) 유효하지 않습니다.');
-							return false;
-						}
-					});
-				}
-			};
+			}
 		}
 			
-	
-	 
-	 	gagajf.ajaxFormSubmit('/marketing/poll/list', formId, function(result) {
-				if (result.length < 1) {
-					mcxDialog.alert('입력하신 투표 일련번호가 존재 하지않습니다.');
-					return false;
-				}
-		});
 		
 		// 날짜 유효성 체크
 		var stDate = $(formId + ' input[name=startSearchDate]').val().replaceAll("-", "");
@@ -1632,8 +1621,8 @@
 		{headerName: "혜택", field: "benefit", width: 110, cellClass: 'text-center',
 			cellEditor: 'agRichSelectCellEditor',cellEditorParams: { values: ['포인트', '쿠폰', '포인트/쿠폰'] },
 	    },
-	    {headerName: "", field: "benefitGb", width: 50, cellClass: 'text-center', hide:true
-    	}, 
+	    {headerName: "", field: "benefitGb", width: 50, cellClass: 'text-center', hide:true	},
+	    {headerName: "", field: "cpnYn", width: 50, cellClass: 'text-center', hide:true	},
 	    {headerName: "일수", field: "basDays", width: 50, cellClass: 'text-center', cellEditor: 'numericCellEditor'},
 		{headerName: "포인트", field: "pntAmt", width: 80, cellClass: 'text-center', cellEditor: 'numericCellEditor'
 			,cellEditorParams: { maxlength: 3, required: true }
@@ -1680,7 +1669,7 @@
 			return;
 		} else {
 	
-			var data = { benefit: '포인트',benefitGb: 'P', basDays:'' ,pntAmt:'', cpnId: '', pntUsableDay:''};
+			var data = { benefit: '포인트',benefitGb: 'P', cpnYn:'Y', basDays:'' ,pntAmt:'', cpnId: '', pntUsableDay:''};
 			gagaAgGrid.addRowData(gridOptionsAttendList, data);
 		}
 
@@ -1698,32 +1687,46 @@
 	
 		if (event.colDef.field == "benefit"){
 			if (event.data.benefit == "쿠폰"){
-				
 				gridOptionsAttendList.api.forEachNode(function(rowNode, index) {
 					if (rowNode.data.benefit == "쿠폰"){
-						event.data.benefitGb = "C"
-							gridOptionsAttendList.api.updateRowData({update: [event.data]});
+						event.data.benefitGb = "C";
+						gridOptionsAttendList.api.updateRowData({update: [event.data]});
 						return;
 					}
 				});
 			}else if(event.data.benefit == "포인트"){
 				gridOptionsAttendList.api.forEachNode(function(rowNode, index) {
 					if (rowNode.data.benefit == "포인트"){
-						event.data.benefitGb = "P"
-							gridOptionsAttendList.api.updateRowData({update: [event.data]});
+						event.data.benefitGb = "P";
+						gridOptionsAttendList.api.updateRowData({update: [event.data]});
 						return;
 					}
 				});
 			}else{
 				gridOptionsAttendList.api.forEachNode(function(rowNode, index) {
 					if (rowNode.data.benefit == "포인트/쿠폰"){
-						event.data.benefitGb = "A"
-							gridOptionsAttendList.api.updateRowData({update: [event.data]});
+						event.data.benefitGb = "A";
+						gridOptionsAttendList.api.updateRowData({update: [event.data]});
 						return;
 					}
 				});
 			}	
 		}
+		
+		if (event.colDef.field == "cpnId"){
+			var param = {cpnId : event.data.cpnId};
+			var jsonData = JSON.stringify(param);
+			
+			gagajf.ajaxJsonSubmit('marketing/planning/attend/coupon', jsonData, function(result) {
+				if (result.length < 1) {
+					mcxDialog.alert('입력하신 쿠폰 ID ' + event.data.cpnId + '은(는) 유효하지 않습니다.');
+					event.data.cpnYn = "N";
+					return false;
+				}else{
+					event.data.cpnYn = "Y";
+				}
+			});
+		}
 	}
 	
 	$(document).ready(function() {