Преглед изворни кода

모바일 공지사항 첨부파일 처리

isna пре 2 година
родитељ
комит
cda99414a4
2 измењених фајлова са 22 додато и 1 уклоњено
  1. 1 1
      src/main/webapp/mobile/app/main.html
  2. 21 0
      src/main/webapp/mobile/js/app/main.js

+ 1 - 1
src/main/webapp/mobile/app/main.html

@@ -375,7 +375,7 @@
375 375
 					<div class="itp_notify_row">
376 376
 						<label class="noti_label">첨부파일</label>
377 377
 						<span>:</span>
378
-						<table></table>
378
+						<div class="fnNoteFile noti_text"></div>
379 379
 					</div>
380 380
 				</div>
381 381
 			</div>

+ 21 - 0
src/main/webapp/mobile/js/app/main.js

@@ -300,17 +300,38 @@ let mobPopObj = {
300 300
 			mobPopObj.hide(this.popId);
301 301
 		},
302 302
 		search: function (nticeNo) { 
303
+			const me=this;
303 304
 			fn_ajax_call('/api/ntice/info-ntice', {nticeNo}, function(result) {
304 305
 				// 브랜드그룹 셋팅
305 306
 				$('#ITP_POP_NOTICE_AREA .fnNoteNm').html(result.nticeTitl);
306 307
 				$('#ITP_POP_NOTICE_AREA .fnNote').html(result.nticeDesc);
307 308
 				$('#ITP_POP_NOTICE_AREA .fnNoteFromTo').html(result.notiStDay+' ~ '+result.notiEdDay); 
309
+				me.makeFileDownloadTable($('#ITP_POP_NOTICE_AREA .fnNoteFile'),result.fileNo); 
308 310
 				/*
309 311
 				$('#ITP_FORM_NOTICE_INFO_POPUP_AFFL_SHOP_NM').html(result.afflShopNm);
310 312
 				$('#ITP_FORM_NOTICE_INFO_POPUP_BRAND_NM').html(result.brandNm);
311 313
 				*/ 
312 314
 			}, 'GET');
313 315
 		},
316
+		makeFileDownloadTable: function (el, fileNo) {
317
+			var searhFn = function(result) {
318
+				var html = '';
319
+				html += '<table class="table fileupload-download">';
320
+				html += '<tbody>';
321
+				$.each(result, function (key, value) { 
322
+					html += '<tr class="fileupload-downloadrow no-thumb row">';	
323
+					html += '<td class="col-xs-9 itp_file_info" data-file-no="' + value.fileNo + '" data-file-seq="' + value.fileSeq + '">';
324
+					html += '<a href="' + DOMAIN + '/api/file/download/' + value.fileNo + '/' + value.fileSeq + '">';
325
+					html += value.fileOrgNm + '</a></td>';
326
+					html += '<td class="col-xs-3">' + value.fileSize + '</td>'; 
327
+					html += '</tr>';
328
+				});
329
+				html += '</tbody>';
330
+				html += '</table>';
331
+				el.html(html);
332
+			}
333
+			fn_ajax_call('/api/file/list', {fileNo}, searhFn, 'GET');
334
+		}
314 335
 		
315 336
 	},
316 337
 	show: function(popId) {