Kaynağa Gözat

메인 공지사항 팝업

isna 2 yıl önce
ebeveyn
işleme
86fb919225

+ 61 - 27
src/main/webapp/app/popup/comm/NOTICE_INFO_POPUP.html

@@ -5,39 +5,73 @@
5 5
 					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
6 6
 					<h5 class="modal-title">공지사항</h5>
7 7
 				</div>
8
-				<div class="modal-body">
8
+				<div class="modal-body"> 
9 9
 					<div class="itp_form itp_type1 fix">
10
-						<div class="col-xs-12">
11
-							<div class="form-horizontal">
12
-								<form id="ITP_FORM_NOTICE_INFO_POPUP">
10
+						<div class="form-horizontal">
11
+
12
+							<form id="ITP_FORM_NOTICE_INFO_POPUP" class="form-horizontal"> 
13 13
 								<input type="hidden" id="ITP_FORM_NOTICE_INFO_POPUP_VIEW_CD" name="viewCd" value="R">
14
-								<input type="hidden" id="ITP_FORM_NOTICE_INFO_POPUP_NTICE_NO" name="nticeNo" value="">
15 14
 								<input type="hidden" id="ITP_FORM_NOTICE_INFO_POPUP_FILE_NO" name="fileNo" value="">
16
-							
17
-								<div class="form-group">
18
-									<label class="col-xs-4 itp_lb">공지제목</label>
19
-									<div class="col-xs-7 itp_ip fnNticeTitl"></div>
20
-								</div>
21
-								<div class="form-group">
22
-									<label class="col-xs-4 itp_lb">공지일자</label>
23
-									<div class="col-xs-7 itp_ip fnNotiDay"></div>
24
-								</div>						
25
-								<div class="form-group">
26
-									<label class="col-xs-4 itp_lb">공지내용</label>
27
-									<div class="col-xs-7 itp_ip fnNticeDesc"></div>
28
-								</div>
29
-								<div class="form-group">
30
-									<label class="col-xs-4 itp_lb">첨부파일</label>
31
-									<div class="col-xs-7 itp_ip">
32
-										<div class="col-xs-12 itp_in">
33
-											<div class="fileupload-wrapper">
34
-												<div id="ITP_NOTICE_INFO_POPUP_VIEW_UPLOAD"></div>
15
+								<input type="hidden" id="ITP_FORM_NOTICE_INFO_POPUP_NTICE_NO" name="nticeNo" value="">
16
+								<section class="itp_form_sec">
17
+									<div class="itp_form_in border-top">
18
+										<div class="form-group">
19
+											<label class="col-xs-2 itp_lb">브랜드그룹</label>
20
+											<div class="col-xs-4 itp_ip">
21
+												<div class="itp_in">
22
+													<input type="text" name="afflShopNm" id="ITP_FORM_NOTICE_INFO_POPUP_AFFL_SHOP_NM" class="form-control itp_input">
23
+												</div> 
24
+											</div>
25
+											<label class="col-xs-2 itp_lb">브랜드</label>
26
+											<div class="col-xs-4 itp_ip">
27
+												<input type="text" name="brandNm" id="ITP_FORM_NOTICE_INFO_POPUP_BRAND_NM" class="form-control itp_input"> 
35 28
 											</div>
36 29
 										</div>
37 30
 									</div>
38
-								</div>
39
-								</form>
40
-							</div>
31
+									<div class="itp_form_in">
32
+										<div class="form-group colspan">
33
+											<label class="col-xs-2 itp_lb">공지제목 *</label>
34
+											<div class="col-xs-10 itp_ip">
35
+												<input type="text" id="ITP_FORM_NOTICE_INFO_POPUP_NTICE_TITL" data-check-required="empty" class="form-control itp_input" name="nticeTitl" value="">
36
+											
37
+											</div>
38
+										</div>
39
+									</div>
40
+									<div class="itp_form_in">
41
+										<div class="form-group">
42
+											<label class="col-xs-2 itp_lb">공지일자 *</label>
43
+											<div class="col-xs-10 itp_ip">
44
+												<div class="input-group">
45
+													<input type="text" id="ITP_FORM_NOTICE_INFO_POPUP_FROM_DT" data-check-required="empty" class="form-control itp_input" name="notiStDay" readonly>
46
+													<span class="input-group-addon itp_date_to">~</span>
47
+													<input type="text" id="ITP_FORM_NOTICE_INFO_POPUP_TO_DT" data-check-required="empty" class="form-control itp_input" name="notiEdDay" readonly>
48
+												</div> 
49
+											</div>
50
+										</div>
51
+									</div>
52
+									<div class="itp_form_in">	
53
+										<div class="form-group">
54
+											<label class="col-xs-2 itp_lb">공지내용</label>
55
+											<div class="col-xs-10 itp_ip">
56
+												<textarea id="ITP_FORM_NOTICE_INFO_POPUP_NTICE_DESC" class="form-control" rows="8" name="nticeDesc" maxlength="200"></textarea>
57
+											</div>
58
+										</div>
59
+									</div>
60
+									<div class="itp_form_in">	
61
+										<div class="form-group">
62
+											<label class="col-xs-2 itp_lb">첨부파일</label>
63
+											<div class="col-xs-10 itp_ip">
64
+												<div class="fileupload-wrapper">
65
+													<div id="ITP_FORM_NOTICE_INFO_POPUP_UPLOAD"></div>
66
+												</div>
67
+											</div>
68
+										</div> 
69
+									</div>
70
+								</section>
71
+								
72
+							</form>		
73
+
74
+
41 75
 						</div>
42 76
 					</div>
43 77
 				</div>

+ 6 - 3
src/main/webapp/js/app/main.js

@@ -351,11 +351,10 @@ var itp_fn_MAIN_NOTICE_search = function() {
351 351
 	let param = $(formId).serializeObject();
352 352
 	var searhFn = function(result) {
353 353
 		const tb=$('#ITP_NOTE_PANEL .rtable').find('tbody');
354
-		console.log("xxxxxxxxx", result, tb)
355 354
 		if(Array.isArray(result.gridRows) && result.gridRows.length ) {
356 355
 			var s='', idx=1;
357 356
 			for(var c of result.gridRows ) {
358
-				s+=`<tr><td>${idx}</td><td>${c.brandNm}</td><td>${c.nticeTitl}</td><td>${c.nticeStatNm}</td><td>${c.addDt}</td></tr>`;
357
+				s+=`<tr><td>${idx}</td><td>${c.brandNm}</td><td><a href="javascript:clickNotify('${c.nticeNo}')">${c.nticeTitl}</a></td><td>${c.nticeStatNm}</td><td>${c.addDt}</td></tr>`;
359 358
 				idx++;
360 359
 			}
361 360
 			tb.html(s);
@@ -365,4 +364,8 @@ var itp_fn_MAIN_NOTICE_search = function() {
365 364
 	};
366 365
 	fn_ajax_call(NTICE_DETAIL_GRID_LIST, JSON.stringify(param), searhFn, 'POST');
367 366
 };
368
-
367
+function clickNotify(nticeNo) {
368
+	fn_call_popup('comm', 'NOTICE_INFO_POPUP', '#ITP_ASIDE', function(rowDataPop) { 
369
+		 console.log("rowDataPop ==> ", rowDataPop)
370
+	}, {nticeNo}, 'S');
371
+}

+ 45 - 11
src/main/webapp/js/app/popup/comm/ITP_NOTICE_INFO_POPUP.js

@@ -14,19 +14,21 @@ function itp_fn_NOTICE_INFO_POPUP(parentPopFn, args, returnType) {
14 14
 	
15 15
 	fn_ajax_call(NTICE_INFO_NTICE, args, function(result) {
16 16
 		
17
-		$('#ITP_FORM_NOTICE_INFO_POPUP_NTICE_NO').val(result.nticeNo);		
18
-		$('#ITP_FORM_NOTICE_INFO_POPUP .fnNticeTitl').text(result.nticeTitl);	
19
-		$('#ITP_FORM_NOTICE_INFO_POPUP .fnNotiDay').text(result.notiStDay+' ~ '+result.notiEdDay);	
20
-		$('#ITP_FORM_NOTICE_INFO_POPUP .fnNticeDesc').html(result.nticeDesc.replace(/(\n|\r\n)/g, '<br>'));
17
+		$('#ITP_FORM_NOTICE_INFO_POPUP_NTICE_NO').val(result.nticeNo);
18
+		$('#ITP_FORM_NOTICE_INFO_POPUP_NTICE_TITL').val(result.nticeTitl);
19
+		$('#ITP_FORM_NOTICE_INFO_POPUP_FROM_DT').val(result.notiStDay);
20
+		$('#ITP_FORM_NOTICE_INFO_POPUP_TO_DT').val(result.notiEdDay);
21
+		$('#ITP_FORM_NOTICE_INFO_POPUP_NTICE_DESC').val(result.nticeDesc);
22
+		$('#ITP_FORM_NOTICE_INFO_POPUP_TARGET_CD').val(result.targetCd);
21 23
 		$('#ITP_FORM_NOTICE_INFO_POPUP_FILE_NO').val(result.fileNo); //파일번호 셋팅
22 24
 
23
-		//파일업로드(뷰화면)
24
-		$('#ITP_NOTICE_INFO_POPUP_VIEW_UPLOAD').empty();
25
-		const fileArgs = {
26
-			'fileNo': $('#ITP_FORM_NOTICE_INFO_POPUP_FILE_NO').val(),
27
-			'viewCd': $('#ITP_FORM_NOTICE_INFO_POPUP_VIEW_CD').val()
28
-		};
29
-		itp_fn_set_file_upload('ITP_NOTICE_INFO_POPUP_VIEW_UPLOAD', 'notice', true, false, 'OPERATION02010', fileArgs);
25
+		// 브랜드그룹 셋팅
26
+		$('#ITP_FORM_NOTICE_INFO_POPUP_AFFL_SHOP_NM').val(result.afflShopNm);
27
+		$('#ITP_FORM_NOTICE_INFO_POPUP_BRAND_NM').val(result.brandNm);
28
+
29
+		setFileUploadInfoPopup();
30
+		
31
+		formReadonly("#ITP_FORM_NOTICE_INFO_POPUP .form-control");
30 32
 		 	
31 33
 	}, 'GET');
32 34
 	
@@ -38,3 +40,35 @@ function itp_fn_NOTICE_INFO_POPUP(parentPopFn, args, returnType) {
38 40
 	
39 41
 };
40 42
 
43
+
44
+function setFileUploadInfoPopup() {
45
+	//파일업로드(등록/수정화면) 
46
+	const option={
47
+		url: DOMAIN + '/api/file/upload',
48
+		inputName: 'uploadFile',
49
+		folderName: 'notice',
50
+		fileNumber:  $('#ITP_FORM_NOTICE_INFO_POPUP_FILE_NO').val(),
51
+		fileInput: '#ITP_FORM_NOTICE_INFO_POPUP_FILE_NO',
52
+		fileTypes: ITP_UPLOAD_DEFAULTS.fileTypes,
53
+		viewCode: 'R',
54
+		formMethod: 'post',
55
+		multiFile: true,
56
+		multiUpload: false,
57
+		maxSize: 100,
58
+		maxFiles: 5,
59
+		showThumb: false,
60
+		thumbWidth: 0,
61
+  		thumbHeight: 0,
62
+		debug: true, 
63
+		screen_id: 'ITP_FORM_NOTICE_INFO_POPUP',
64
+		showYn: false, 
65
+	};
66
+	console.log("option ==> ",option)
67
+	$('#ITP_FORM_NOTICE_INFO_POPUP_UPLOAD').empty(); 
68
+	$('#ITP_FORM_NOTICE_INFO_POPUP_UPLOAD').bootstrapFileUpload(option);
69
+
70
+	setTimeout(function() {
71
+		$('#ITP_FORM_NOTICE_INFO_POPUP_UPLOAD_FORM').hide(); 
72
+	},20);
73
+
74
+}

+ 29 - 4
src/main/webapp/main.html

@@ -54,6 +54,34 @@
54 54
 			margin: 0 0 10px 0;
55 55
 			color: #233c44;
56 56
 		}
57
+		
58
+		#ITP_FORM_NOTICE_INFO_POPUP .itp_form_in {
59
+			margin: 0;
60
+			padding: 0;
61
+			display: table;
62
+			width: 100%;
63
+		}
64
+		#ITP_FORM_NOTICE_INFO_POPUP .form-group {
65
+			margin: 0;
66
+			padding: 0;
67
+			display: table-row;
68
+		}
69
+		#ITP_FORM_NOTICE_INFO_POPUP .itp_detail .itp_form .border-top {
70
+			border-top: 1px solid #666;
71
+		}
72
+		#ITP_FORM_NOTICE_INFO_POPUP .form-group .itp_lb, #ITP_FORM_NOTICE_INFO_POPUP .form-group .itp_ip {
73
+			display: table-cell;
74
+			padding: 2px 15px 0 15px;
75
+			border-top: 1px solid #ededed;
76
+			float: none;
77
+			vertical-align: middle;
78
+			height: 32px;
79
+		}
80
+		#ITP_FORM_NOTICE_INFO_POPUP .itp_detail .itp_form .itp_form_in {
81
+			margin-top: 25px;
82
+			padding-left: 8px;
83
+		}
84
+
57 85
 		.itp_graph_panel {
58 86
 			border: 1px solid #ccc;
59 87
 			padding: 12px;
@@ -801,12 +829,9 @@
801 829
 			</div>
802 830
 		</footer>
803 831
 		
804
-		<aside id="ITP_ASIDE"></aside>	
805
-		
806
-		
832
+		<aside id="ITP_ASIDE"></aside>	 
807 833
 	</div> 
808 834
 	<script src="./js/cpexcel.js"></script>
809 835
 	<script src="./js/xlsx.js"></script>
810
-
811 836
 </body>
812 837
 </html>