Просмотр исходного кода

조회일자 없을시 검색구분 선택 및 내용 입력 하게 처리

jsshin 4 лет назад
Родитель
Сommit
c0209a35fb
1 измененных файлов с 10 добавлено и 2 удалено
  1. 10 2
      src/main/webapp/WEB-INF/views/customer/CustomerActiveListForm.html

+ 10 - 2
src/main/webapp/WEB-INF/views/customer/CustomerActiveListForm.html

@@ -248,6 +248,9 @@
 		// 입력 값 체크
 		const $searchGb = $('#custActiveForm select[name=searchGb]');	// 검색구분
 		const $searchTxt = $('#custActiveForm input[name=searchTxt]');	// 검색내용
+		const $stDate = $('#custActiveForm input[name=stDate]');
+		const $edDate = $('#custActiveForm input[name=edDate]');
+
 		let isSearchVaild = true;
 		let validationMessage;
 
@@ -265,7 +268,13 @@
 				validationMessage = '검색구분을 선택해주세요';
 				isSearchVaild = false;
 			}
+		}
 
+		if (gagajf.isNull($stDate.val()) && gagajf.isNull($edDate.val())) {
+			if (gagajf.isNull($searchTxt.val()) && gagajf.isNull($searchGb.val())) {
+				validationMessage = '일자 없이 조회시 <br> 검색구분 선택 및 내용을 입력해주세요';
+				isSearchVaild = false;
+			}
 		}
 
 		if (!isSearchVaild) {
@@ -276,11 +285,10 @@
 				}
 			});
 		}
-
 		return isSearchVaild;
-
 	}
 
+
 	// 검색
 	var fnSearch = function() {
 		// 유효성 체크