Przeglądaj źródła

Merge branch 'sowon' into develop

sowon4187 5 lat temu
rodzic
commit
c905eb016e

+ 5 - 0
src/main/java/com/style24/persistence/domain/Plan.java

@@ -73,6 +73,9 @@ public class Plan extends TscBaseDomain{
 		private String badgeFcolor;			//뱃지글자컬러
 		private String badgeBcolor;			//뱃지배경컬러
 		private String privacyPolicy;		//개인정보수집동의정책
+		private String newCustYn;			//신규회원여부
+		private String custJoinStdt;		//회원가입시작일시
+		private String custJoinEddt;		//회원가입종료일시
 
 		// 기획전 소스
 		private Integer seq;					//일련번호
@@ -126,6 +129,8 @@ public class Plan extends TscBaseDomain{
 		private String endSearchDate;		// 진행기간 종료일
 		private String endSearchTime;		// 진행기간 종료시간
 		private String excelFileNm;			// 엑셀 파일 명
+		private String custJoinEdDay;
+		private String custJoinStDay;
 		//private int startRow;				// 페이징 시작
 		//private int endRow;					// 피이징 종료
 		@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)

+ 20 - 2
src/main/java/com/style24/persistence/mybatis/shop/TsaPlan.xml

@@ -26,7 +26,10 @@
 		     , REPLY_IMG           
 		     , REPLY_TITLE1        
 		     , REPLY_TITLE2        
-		     , POLL_SQ             
+		     , POLL_SQ       
+		     , NEW_CUST_YN
+		     , CUST_JOIN_STDT
+		     , CUST_JOIN_EDDT     
 		     , DEV_URL             
 		     , CORNER_NM_DISP_YN   
 		     , GOODS_LIMIT_YN      
@@ -61,6 +64,9 @@
 		     , #{replyTitle1}
 		     , #{replyTitle2}
 		     , #{pollSq}
+		     , #{newCustYn}
+		     , #{custJoinStdt}
+		     , #{custJoinEddt}
 		     , #{devUrl}
 		     , #{cornerNmDispYn}
 		     , IFNULL(#{goodsLimitYn}, 'N')
@@ -104,7 +110,10 @@
 					     , REPLY_TITLE2           
 					     , REPLY_LOC              
 					     , REPLY_IMG              
-					     , POLL_SQ                
+					     , POLL_SQ  
+					     , NEW_CUST_YN
+		                 , CUST_JOIN_STDT
+		                 , CUST_JOIN_EDDT                 
 					     , DEV_URL                
 					     , CORNER_NM_DISP_YN      
 					     , GOODS_LIMIT_YN         
@@ -295,6 +304,9 @@
 		     , REPLY_TITLE1 = #{replyTitle1}
 		     , REPLY_TITLE2 = #{replyTitle2}
 		     , POLL_SQ = #{pollSq}
+		     , NEW_CUST_YN = #{newCustYn}
+		     , CUST_JOIN_STDT = #{custJoinStdt}
+		     , CUST_JOIN_EDDT = #{custJoinEddt}
 		     , DEV_URL = #{devUrl}
 		     , REPLY_YN = #{replyYn}
 		     , REPLY_LOC = #{replyLoc}
@@ -359,6 +371,9 @@
 		          , REPLY_TITLE1
 		          , REPLY_TITLE2
 		          , POLL_SQ
+		          , NEW_CUST_YN
+		          , CUST_JOIN_STDT
+		          , CUST_JOIN_EDDT   
 		          , DEV_URL
 		          , CORNER_NM_DISP_YN
 		          , GOODS_LIMIT_YN
@@ -392,6 +407,9 @@
 		             , REPLY_TITLE1
 		             , REPLY_TITLE2
 		             , POLL_SQ
+		             , NEW_CUST_YN
+		             , CUST_JOIN_STDT
+		             , CUST_JOIN_EDDT  
 		             , DEV_URL
 		             , CORNER_NM_DISP_YN
 		             , GOODS_LIMIT_YN

+ 233 - 28
src/main/webapp/WEB-INF/views/marketing/PlanDetailPopupForm.html

@@ -55,11 +55,16 @@
 					<tr>
 						<th>프론트 구분<em class="required" title="필수"></em></th>
 						<td>
-							<select name="frontGb" id="frontGb" th:field="*{frontGb}">
-								<option value="A">전체</option>
-								<option value="P">웹</option>
-								<option value="M">모바일</option>
-							</select>
+							<label class="chkBox" >
+								<input type="checkbox" name="frontGb" value="P" th:text="PC웹"/>
+							</label>
+							<label class="chkBox" >
+								<input type="checkbox" name="frontGb" value="M" th:text="모바일웹"/>
+							</label>
+							<label class="chkBox" >
+								<input type="checkbox" name="frontGb"  value="A" th:text="모바일앱"/>
+							</label>
+							
 						</td>
 						<th>전시순서</th>
 						<td>
@@ -191,6 +196,44 @@
 						<td>
 							<input type="text" class="w100 aR" name="pollSq" th:field="*{pollSq}"/>
 						</td>
+						<th class="custJoinTr">신규회원여부<em class="required" title="필수"></em></th>
+						<td>
+							<select name="newCustYn" id="newCustYn" onchange="newCustYnChange(this)" required="required" data-valid-name="신규회원여부" th:field="*{newCustYn}">
+								<option value="Y" selected="selected">Y</option>
+								<option value="N" >N</option>
+							</select>
+						</td>
+					</tr>
+					<tr>
+						<th class="custJoinDateTr">신규회원기간시작일시<em class="required" title="필수"></em></th>
+						<td class="custJoinDateTr">
+							<input type="hidden" name="custJoinStdt" id="custJoinStdt" data-valid-name="신규회원기간시작일시" >
+							<input type="text" class="schDate w100" name="custJoinStDay" id="custJoinStDay" maxlength="10" th:value="*{custJoinStDay}"/>
+							<select name="startJoinHour" required="required" data-valid-name="진행기간 시작시간">
+								<th:block th:each="num, index  : ${#numbers.sequence(0,23)}">
+								<option th:value="${#numbers.formatInteger(num,2)}"  th:text="|${#numbers.formatInteger(num,2)}시|" th:selected="*{#strings.substring(custJoinStdt, 11, 13)} == ${#strings.toString(num)} ? 'true'">시간</option>
+								</th:block>
+							</select>
+							<select name="startJoinMin" required="required" data-valid-name="진행기간 시작시간">
+								<th:block th:each="num: ${#numbers.sequence(0,59)}">
+								<option th:value="${#numbers.formatInteger(num,2)}"  th:text="|${#numbers.formatInteger(num,2)}분|" th:selected="*{#strings.substring(custJoinStdt, 14, 16)} == ${#strings.toString(num)} ? 'true'">분</option>
+								</th:block>
+							</select>
+						<th class="custJoinDateTr">신규회원기간종료일시<em class="required" title="필수"></em></th>
+						<td class="custJoinDateTr">
+							<input type="hidden" id="custJoinEddt" name="custJoinEddt" data-valid-name="신규회원기간종료일시" >
+							<input type="text" class="schDate w100" name="custJoinEdDay" id="custJoinEdDay" maxlength="10" th:value="*{custJoinEdDay}"/>
+							<select name="endJoinHour" required="required" data-valid-name="진행기간 시작시간">
+								<th:block th:each="num, index  : ${#numbers.sequence(0,23)}">
+								<option th:value="${#numbers.formatInteger(num,2)}"  th:text="|${#numbers.formatInteger(num,2)}시|" th:selected="*{#strings.substring(custJoinEddt, 11, 13)} == ${#strings.toString(num)} ? 'true'">시간</option>
+								</th:block>
+							</select>
+							<select name="endJoinMin" required="required" data-valid-name="진행기간 시작시간">
+								<th:block th:each="num: ${#numbers.sequence(0,59)}">
+								<option th:value="${#numbers.formatInteger(num,2)}"  th:text="|${#numbers.formatInteger(num,2)}분|" th:selected="*{#strings.substring(custJoinEddt, 14, 16)} == ${#strings.toString(num)} ? 'true'">분</option>
+								</th:block>
+							</select>
+						</td>
 					</tr>
 					<tr>
 						<th>댓글여부</th>
@@ -394,11 +437,20 @@
 					<tr>
 						<th>프론트 구분<em class="required" title="필수"></em></th>
 						<td>
-							<select name="frontGb" id="frontGb" required="required" data-valid-name="프론트 구분">
+							<!-- <select name="frontGb" id="frontGb" required="required" data-valid-name="프론트 구분">
 								<option value="A">전체</option>
 								<option value="P">웹</option>
 								<option value="M">모바일</option>
-							</select>
+							</select> -->
+							<label class="chkBox" >
+								<input type="checkbox" name="frontGb" value="P" th:text="PC웹"/>
+							</label>
+							<label class="chkBox" >
+								<input type="checkbox" name="frontGb"  value="M" th:text="모바일웹"/>
+							</label>
+							<label class="chkBox" >
+								<input type="checkbox" name="frontGb" value="A" th:text="모바일앱"/>
+							</label>
 						</td>
 						<th>전시순서</th>
 						<td>
@@ -519,7 +571,43 @@
 						<td>
 							<input type="text" class="w100 aR" name="pollSq"/>
 						</td>
-					
+						<td>
+							<select name="newCustYn" id="newCustYn" onchange="newCustYnChange(this)" required="required" data-valid-name="신규회원여부">
+								<option value="Y" selected="selected">Y</option>
+								<option value="N" >N</option>
+							</select>
+						</td>
+					</tr>
+					<tr>
+						<th class="custJoinDateTr">신규회원기간시작일시<em class="required" title="필수"></em></th>
+						<td class="custJoinDateTr">
+							<input type="hidden" name="custJoinStdt" id="custJoinStdt" data-valid-name="신규회원기간시작일시">
+							<input type="text" class="schDate w100" name="custJoinStDay" id="custJoinStDay" maxlength="10" th:value="${#calendars.format(#calendars.createNow(), 'yyyy-MM-dd')}"/>
+							<select name="startJoinHour" required="required" data-valid-name="진행기간 시작시간">
+								<th:block th:each="num, index  : ${#numbers.sequence(0,23)}">
+								<option th:value="${#numbers.formatInteger(num,2)}"  th:text="|${#numbers.formatInteger(num,2)}시|" th:selected="*{#strings.substring(dispStdt, 11, 13)} == ${#strings.toString(num)} ? 'true'">시간</option>
+								</th:block>
+							</select>
+							<select name="startJoinMin" required="required" data-valid-name="진행기간 시작시간">
+								<th:block th:each="num: ${#numbers.sequence(0,59)}">
+								<option th:value="${#numbers.formatInteger(num,2)}"  th:text="|${#numbers.formatInteger(num,2)}분|" th:selected="*{#strings.substring(dispStdt, 14, 16)} == ${#strings.toString(num)} ? 'true'">분</option>
+								</th:block>
+							</select>
+						<th class="custJoinDateTr">신규회원기간종료일시<em class="required" title="필수"></em></th>
+						<td class="custJoinDateTr">
+							<input type="hidden" id="custJoinEddt" name="custJoinEddt" data-valid-name="신규회원기간종료일시">
+							<input type="text" class="schDate w100" name="custJoinEdDay" id="custJoinEdDay" maxlength="10" th:value="${#calendars.format(#calendars.createNow(), 'yyyy-MM-dd')}"/>
+							<select name="endJoinHour" required="required" data-valid-name="진행기간 시작시간">
+								<th:block th:each="num, index  : ${#numbers.sequence(0,23)}">
+								<option th:value="${#numbers.formatInteger(num,2)}"  th:text="|${#numbers.formatInteger(num,2)}시|" th:selected="*{#strings.substring(dispStdt, 11, 13)} == ${#strings.toString(num)} ? 'true'">시간</option>
+								</th:block>
+							</select>
+							<select name="endJoinMin" required="required" data-valid-name="진행기간 시작시간">
+								<th:block th:each="num: ${#numbers.sequence(0,59)}">
+								<option th:value="${#numbers.formatInteger(num,2)}"  th:text="|${#numbers.formatInteger(num,2)}분|" th:selected="*{#strings.substring(dispStdt, 14, 16)} == ${#strings.toString(num)} ? 'true'">분</option>
+								</th:block>
+							</select>
+						</td>
 					</tr>
 					<tr>
 						<th>댓글여부<em class="required" title="필수"></em></th>
@@ -739,6 +827,28 @@
 			$("#append2").removeAttr('style');
 			$("#append3").removeAttr('style');
 			
+			var frontGbData = planInfo.frontGb.split('|');
+			var chkboxCnt = $('#planUpdateForm input:checkbox[name=frontGb]').length;
+			for(let i=0; i<chkboxCnt; i++){
+				for(let j=0; j<frontGbData.length; j++){
+					var data = frontGbData[j];
+					if($('#planUpdateForm input:checkbox[name=frontGb]').eq(i).val() == data){
+						$('#planUpdateForm input:checkbox[name=frontGb]').eq(i).prop('checked', true);
+						$("#planUpdateForm input:checkbox[name=frontGb]").eq(i).parent().addClass('checked');
+					}
+				}
+			}
+			
+			if(planInfo.newCustYn == 'Y'){
+				$('.custJoinDateTr').css('display' , '');
+				$('#custJoinStdt').attr('required' , true);
+				$('#custJoinEddt').attr('required' , true);
+			} else {
+				$('.custJoinDateTr').css('display' , 'none');
+				$('#custJoinStdt').attr('required' , false);
+				$('#custJoinEddt').attr('required' , false);
+			}
+			
 			if(planInfo.replyLoc == "D"){
 				$('#planUpdateForm input:radio[name=replyLoc]:radio[value="D"]').prop('checked', true);
 			}else {
@@ -777,6 +887,28 @@
 		$("#append2").css('display','none');
 		$("#append3").css('display','none');
 		
+		var frontGbData = planInfo.frontGb.split('|');
+		var chkboxCnt = $('#planUpdateForm input:checkbox[name=frontGb]').length;
+		for(let i=0; i<chkboxCnt; i++){
+			for(let j=0; j<frontGbData.length; j++){
+				var data = frontGbData[j];
+				if($('#planUpdateForm input:checkbox[name=frontGb]').eq(i).val() == data){
+					$('#planUpdateForm input:checkbox[name=frontGb]').eq(i).prop('checked', true);
+					$("#planUpdateForm input:checkbox[name=frontGb]").eq(i).parent().addClass('checked');
+				}
+			}
+		}
+		
+		if(planInfo.newCustYn == 'Y'){
+			$('.custJoinDateTr').css('display' , '');
+			$('#custJoinStdt').attr('required' , true);
+			$('#custJoinEddt').attr('required' , true);
+		} else {
+			$('.custJoinDateTr').css('display' , 'none');
+			$('#custJoinStdt').attr('required' , false);
+			$('#custJoinEddt').attr('required' , false);
+		}
+		
 		if(planInfo.replyLoc == "D"){
 			$('#planUpdateForm input:radio[name=replyLoc]:radio[value="D"]').prop('checked', true);
 		}else {
@@ -856,6 +988,8 @@
 		// 날짜 유효성 체크
 		var stDate = $(formId + ' input[name=startSearchDate]').val().replaceAll("-", "");
 		var edDate = $(formId + ' input[name=endSearchDate]').val().replaceAll("-", "");
+		var stDate2 = $(formId + ' input[name=custJoinStDay]').val().replaceAll("-", "");
+		var edDate2 = $(formId + ' input[name=custJoinEdDay]').val().replaceAll("-", "");
 		var toDate = _today.replaceAll("-", "");
 
 		if (Number(stDate) > Number(edDate)) {
@@ -873,10 +1007,29 @@
 			return;
 		}
 		
+		if (Number(stDate2) > Number(edDate2)) {
+			mcxDialog.alert('신규회원 종료일자는 시작일자 보다 클 수 없습니다.');
+			return;
+		}
+
+		if (Number(stDate2) < Number(toDate) && mode == 'N') {
+			mcxDialog.alert('신규회원 시작일자는 오늘포함 이후로 등록해주세요.');
+			return;
+		}
+
+		if (Number(edDate2) < Number(toDate) && mode == 'N') {
+			mcxDialog.alert('신규회원 종료일자는 오늘포함 이후로 등록해주세요.');
+			return;
+		}
+		
 		stDate = $(formId + ' input[name=startSearchDate]').val();
 		edDate = $(formId + ' input[name=endSearchDate]').val();
+		stDate2 = $(formId + ' input[name=custJoinStDay]').val();
+		edDate2 = $(formId + ' input[name=custJoinEdDay]').val();
 		$(formId + ' input[name=dispStdt]').val(stDate + ' ' + $(formId + ' select[name=startSearchHour]').val() + ':' + $(formId + ' select[name=startSearchMin]').val() + ':00');
 		$(formId + ' input[name=dispEddt]').val(edDate + ' ' + $(formId + ' select[name=endSearchHour]').val() + ':' + $(formId + ' select[name=endSearchMin]').val() + ':59');
+		$(formId + ' input[name=custJoinStdt]').val(stDate2 + ' ' + $(formId + ' select[name=startJoinHour]').val() + ':' + $(formId + ' select[name=startJoinMin]').val() + ':00');
+		$(formId + ' input[name=custJoinEddt]').val(edDate2 + ' ' + $(formId + ' select[name=endJoinHour]').val() + ':' + $(formId + ' select[name=endJoinMin]').val() + ':59');
 
 		
 		if ($('#replyYn').val() == 'Y') {
@@ -930,20 +1083,7 @@
 				(gagajf.isNull($(formId + ' input[name=replyImg]').val()) == true) ) {
 				$(formId + ' input[name=replyImg]').val($(formId + ' input[name=orgReplyImg]').val());
 			}
-		} else {
-			//gagaSn.getContents('fsrcPcRegister');
-			//gagaSn.getContents('fsrcMobileRegister');
-			//if($("#planGb").val()=='E'){
-			//	privacyPolicy = gagaSn.getContents('privacyPolicyRegister');
-			//}
-		}
-
-		/* if(!gagajf.isNull($(formId + ' input[name=planQtitle]').val()) && gagajf.isNull(privacyPolicy.replace(/<br>/gi, '').replace(/<p>/gi, '').replace(/<\/\p>/gi, ''))){
-			mcxDialog.alert('입력항목 등록 시 개인정보 수집동의를 입력해 주세요.');
-			return;
-		} */
-
-		//var jsonData = JSON.stringify($("#planRegisterForm").serializeObject());
+		} 
 		
 		let allBrandData = gagaAgGrid.getAllRowData(gridOptionsFGBrandList);
 		var multiBrand = [];
@@ -974,6 +1114,21 @@
 					if(!validationPlanDetail()){
 						return false;
 					}
+					var chkFrontGb = $('#planRegisterForm input:checkbox[name=frontGb]:checked');
+					
+					if(chkFrontGb.length < 1){
+						mcxDialog.alert("프론트구분을 체크해주세요.");
+						return false;
+					}
+					
+					var frontGb = '';
+					for(let i=0; i< chkFrontGb.length; i++){
+						frontGb += chkFrontGb.eq(i).val();
+						if (i != (chkFrontGb.length-1) ) {
+							frontGb += '|';
+						}
+					}
+					
 					
 					var usableCustGradeArr = [];
 					var chkCustGrade = $('#planRegisterForm input:checkbox[name=usableCustGradeArr]:checked');
@@ -1009,14 +1164,14 @@
 						    ,mode : $('#planRegisterForm input[name=mode]').val()
 						    ,planSq : $('#planRegisterForm input[name=planSq]').val()
 							,planGb	: $('#planRegisterForm select[name=planGb]').val()
-							,frontGb : $('#planRegisterForm select[name=frontGb]').val()
+							,frontGb : frontGb
 							,planNm : $('#planRegisterForm input[name=planNm]').val()
 							,startSearchDate : $('#planRegisterForm input[name=startSearchDate]').val()
-							,startSearchHour : $('#planRegisterForm input[name=startSearchHour]').val()
-							,startSearchMin : $('#planRegisterForm input[name=startSearchMin]').val()
 							,endSearchDate : $('#planRegisterForm input[name=endSearchDate]').val()
-							,endSearchHour : $('#planRegisterForm input[name=endSearchHour]').val()
-							,endSearchMin : $('#planRegisterForm input[name=endSearchMin]').val()
+							,custJoinStdt : $('#planRegisterForm input[name=custJoinStdt]').val()
+							,custJoinEddt : $('#planRegisterForm input[name=custJoinEddt]').val()
+							,custJoinEdDay : $('#planRegisterForm input[name=custJoinEdDay]').val()
+							,custJoinStDay : $('#planRegisterForm input[name=custJoinStDay]').val()
 							,dispStdt : $('#planRegisterForm input[name=dispStdt]').val()
 							,dispEddt : $('#planRegisterForm input[name=dispEddt]').val()
 							,dtlTitle1 : $('#planRegisterForm input[name=dtlTitle1]').val()
@@ -1034,6 +1189,7 @@
 							,replyTitle1 : $('#planRegisterForm input[name=replyTitle1]').val()
 							,replyTitle2 : $('#planRegisterForm input[name=replyTitle2]').val()
 							,pollSq : $('#planRegisterForm input[name=pollSq]').val()
+							,newCustYn :$('#planRegisterForm select[name=newCustYn]').val()
 							 
 						}	
 					
@@ -1054,6 +1210,21 @@
 						return false;
 					}
 					
+					var chkFrontGb = $('#planUpdateForm input:checkbox[name=frontGb]:checked');
+					
+					if(chkFrontGb.length < 1){
+						mcxDialog.alert("프론트구분을 체크해주세요.");
+						return false;
+					}
+					
+					var frontGb = '';
+					for(let i=0; i< chkFrontGb.length; i++){
+						frontGb += chkFrontGb.eq(i).val();
+						if (i != (chkFrontGb.length-1) ) {
+							frontGb += '|';
+						}
+					}
+					
 					var usableCustGradeArr = [];
 					var chkCustGrade = $('#planUpdateForm input:checkbox[name=usableCustGradeArr]:checked');
 					
@@ -1088,7 +1259,7 @@
 						    ,mode : $('#planUpdateForm input[name=mode]').val()
 						    ,planSq : $('#planUpdateForm input[name=planSq]').val()
 							,planGb	: $('#planUpdateForm select[name=planGb]').val()
-							,frontGb : $('#planUpdateForm select[name=frontGb]').val()
+							,frontGb : frontGb
 							,planNm : $('#planUpdateForm input[name=planNm]').val()
 							,startSearchDate : $('#planUpdateForm input[name=startSearchDate]').val()
 							,startSearchHour : $('#planUpdateForm input[name=startSearchHour]').val()
@@ -1096,6 +1267,12 @@
 							,endSearchDate : $('#planUpdateForm input[name=endSearchDate]').val()
 							,endSearchHour : $('#planUpdateForm input[name=endSearchHour]').val()
 							,endSearchMin : $('#planUpdateForm input[name=endSearchMin]').val()
+							,custJoinStdt : $('#planUpdateForm input[name=custJoinStdt]').val()
+							,startJoinHour : $('#planUpdateForm input[name=startJoinHour]').val()
+							,startJoinMin : $('#planUpdateForm input[name=startJoinMin]').val()
+							,custJoinEddt : $('#planUpdateForm input[name=custJoinEddt]').val()
+							,endJoinHour : $('#planUpdateForm input[name=endJoinHour]').val()
+							,endJoinMin : $('#planUpdateForm input[name=endJoinMin]').val()
 							,dispStdt : $('#planUpdateForm input[name=dispStdt]').val()
 							,dispEddt : $('#planUpdateForm input[name=dispEddt]').val()
 							,dtlTitle1 : $('#planUpdateForm input[name=dtlTitle1]').val()
@@ -1113,6 +1290,7 @@
 							,replyTitle1 : $('#planUpdateForm input[name=replyTitle1]').val()
 							,replyTitle2 : $('#planUpdateForm input[name=replyTitle2]').val()
 							,pollSq : $('#planUpdateForm input[name=pollSq]').val()
+							,newCustYn : $('#planUpdateForm select[name=newCustYn]').val()
 						}	
 					
 					
@@ -1333,6 +1511,31 @@
 		}
 		return true;
 	} 
+	
+	// 신규회원여부 변경시
+	function newCustYnChange(pThis){
+		var selectVal = $(pThis).val();
+
+		if(typeof selectVal == "undefined") {
+			if(mode == "U") {
+				selectVal = cpnDetail.newCustYn;
+			} else {
+				selectVal = "N";
+			}
+		}
+
+		if(selectVal == "Y" ) {
+			$('.custJoinDateTr').css('display' , '');
+			$('#custJoinStdt').attr('required' , true);
+			$('#custJoinEddt').attr('required' , true);
+		} else {
+			$('.custJoinDateTr').css('display' , 'none');
+			$('#custJoinStdt').attr('required' , false);
+			$('#custJoinEddt').attr('required' , false);
+		}
+	}
+
+
 
 	$(document).ready(function() {
 		
@@ -1348,6 +1551,8 @@
 		gagaAgGrid.createGrid("gridAfPlanList", gridOptionsAfList);
 		
 		 if (mode =='U') {
+			 $("#planUpdateForm input[name=custJoinStDay]").val(planInfo.custJoinStdt.split(' ')[0]);
+			 $("#planUpdateForm input[name=custJoinEdDay]").val(planInfo.custJoinEddt.split(' ')[0]);
 			gridOptionsFGBrandList.api.setRowData(planBrandList);
 			gridOptionsFGCateList.api.setRowData(planCateList);
 			gridOptionsAfList.api.setRowData(afChannelList);