Browse Source

핫딜오류수정

jmh 4 years ago
parent
commit
e1f129d68d
1 changed files with 30 additions and 0 deletions
  1. 30 0
      src/main/webapp/WEB-INF/views/marketing/SocialShoppingListForm.html

+ 30 - 0
src/main/webapp/WEB-INF/views/marketing/SocialShoppingListForm.html

@@ -470,6 +470,9 @@
 		$(formId + ' select[name=planSq]').removeAttr("disabled");
 		$(formId + ' select[name=socialType]').removeAttr("disabled");
 		$(formId + ' button[id=btnSearchPlan]').removeAttr("style");
+		
+		// 대기상태로 세팅
+		$("input[name=applyGb]").val("P");
 
 	};
 	// 소셜 기본정보 저장
@@ -531,13 +534,40 @@
 	
 	// 소셜 저장
 	var fnSocialSave = function(msg) {
+		
 		mcxDialog.confirm(msg +' 하시겠습니까?', {
 			cancelBtnText: "취소",
 			sureBtnText: "확인",
 			sureBtnClick: function() {
+				
+				var formId = '#detailForm';
+				// 서버전송시 임시해제
+				if("P" == $("input[name=applyGb]").val()){
+					if( "" == $("#detailForm input[name=socialSq]").val()){	// 신규등록
+						$(formId + ' select[name=useYn]').attr('disabled', false);
+					}
+				}else if("A" == $("input[name=applyGb]").val()){
+					$(formId+ " input").prop("disabled", false);
+					$(formId+ " select").prop("disabled", false);
+				}
+				
 				var actionUrl = '/marketing/social/save';
 				gagajf.ajaxFormSubmit(actionUrl, '#detailForm', function() {
 					fnSearch();
+					
+					// 전송완료 후 원래 상태값으로 변경 
+					if("P" == $("input[name=applyGb]").val()){
+						if( "" == $("#detailForm input[name=socialSq]").val()){	// 신규등록
+							$(formId + ' select[name=useYn]').attr('disabled', true);
+						}
+					}else if("A" == $("input[name=applyGb]").val()){
+						$(formId+ " input").prop("disabled", true);
+						$(formId+ " select").prop("disabled", true);
+						$(formId + ' input[name=edDate]').attr('readonly', false);
+						$(formId + ' input[name=edDate]').prop('disabled', false);
+						$(formId + ' #edTimeHour').prop('disabled', false);
+						$(formId + ' #edTimeHour').attr('readonly', false);
+					}
 				});
 			}
 		});