Ver código fonte

기획전 신규회원 수정

jsshin 4 anos atrás
pai
commit
a5edc02b67

+ 16 - 2
src/main/webapp/WEB-INF/views/marketing/PlanDetailPopupForm.html

@@ -139,7 +139,7 @@
 								<input type="checkbox" name="usableCustGradeArr" th:value="${oneData.cd}" th:text="${oneData.cdNm}"/>
 							</label>
 							<label class="chkBox">
-								<input type="checkbox" name="usableCustGradeArr" value="G110_60" th:text="비회원"/>
+								<input type="checkbox" id="nonCust" name="usableCustGradeArr" value="G110_60" th:text="비회원"/>
 							</label>
 						</td>
 						<th>사용가능고객구분<em class="required" title="필수"></em></th>
@@ -545,7 +545,7 @@
 								<input type="checkbox" name="usableCustGradeArr" th:value="${oneData.cd}" th:text="${oneData.cdNm}" checked="checked"/>
 							</label>
 							<label class="chkBox">
-								<input type="checkbox" name="usableCustGradeArr" value="G110_60" th:text="비회원" checked="checked"/>
+								<input type="checkbox" name="usableCustGradeArr"  id="nonCust" value="G110_60" th:text="비회원" checked="checked"/>
 							</label>
 						</td>
 						<th>사용가능고객구분<em class="required" title="필수"></em></th>
@@ -941,10 +941,15 @@
 			$('.custJoinDateTr').css('display' , '');
 			$('#custJoinStdt').attr('required' , true);
 			$('#custJoinEddt').attr('required' , true);
+			$('#nonCust').prop('checked', false);
+			$('#nonCust').attr('disabled','disabled');
+
 		} else {
 			$('.custJoinDateTr').css('display' , 'none');
 			$('#custJoinStdt').attr('required' , false);
 			$('#custJoinEddt').attr('required' , false);
+			$('#nonCust').prop('checked', true);
+			$('#nonCust').removeAttr('disabled');
 		}
 		
 		if(planInfo.replyLoc == "D"){
@@ -1608,10 +1613,14 @@
 			$('.custJoinDateTr').css('display' , '');
 			$('#custJoinStdt').attr('required' , true);
 			$('#custJoinEddt').attr('required' , true);
+			$('#nonCust').prop('checked', false);
+			$('#nonCust').attr('disabled', 'disabled');
 		} else {
 			$('.custJoinDateTr').css('display' , 'none');
 			$('#custJoinStdt').attr('required' , false);
 			$('#custJoinEddt').attr('required' , false);
+			$('#nonCust').prop('checked', true);
+			$('#nonCust').removeAttr('disabled');
 		}
 	}
 	
@@ -1753,6 +1762,11 @@
 				 $('.custJoinDateTr').show();
 				 $("#planUpdateForm input[name=custJoinStDay]").val(planInfo.custJoinStdt.split(' ')[0]);
 				 $("#planUpdateForm input[name=custJoinEdDay]").val(planInfo.custJoinEddt.split(' ')[0]);
+				 $('#nonCust').prop('checked', false);
+				 $('#nonCust').attr('disabled','disabled');
+			 }else{
+			 	 $('#nonCust').prop('checked', true);
+				 $('#nonCust').removeAttr('disabled');
 			 }
 			 
 			 if(planCateList.length > 0){