Explorar el Código

Merge branch 'master' of http://106.246.249.162:13000/orderqueen/oqpo-view

yhl88 hace 2 años
padre
commit
43c7b650c1

+ 7 - 8
src/main/webapp/app/oper/OPER03010.html

@@ -140,7 +140,7 @@
140 140
 												<!-- <button type="button" id="ITP_BTN_STINFO01010_RESET_PW" class="btn btn-danger btn-xs PWC" style="margin: 3px 0px 0px 3px;">비밀번호 초기화</button> -->
141 141
 											</div>
142 142
 											<label class="col-xs-2 itp_lb"></label>
143
-											<div class="col-xs-4 itp_in"></div>
143
+											<div id="ITP_OPER03010_DETAIL_LOGO_FILE" class="col-xs-4 itp_in"></div>
144 144
 										</div>
145 145
 										<div class="form-group">
146 146
 											<label class="col-xs-2 itp_lb">전화번호 *</label>
@@ -150,9 +150,10 @@
150 150
 												</div>
151 151
 											</div>
152 152
 											<label class="col-xs-2 itp_lb" style="border-top:none;">가맹점 로고</label>
153
-											<div class="col-xs-4 itp_ip"style="border-top:none;">
154
-												<div class="col-xs-5 itp_in">
155
-												</div>
153
+											<div class="col-xs-4 itp_in" style="border-top:none;">
154
+												<!--<div class="col-xs-5 itp_in">
155
+													<img src="/oqpo-view/images/naver.png" alt="로고 샘플" id="ITP_FORM_OPER03010_DETAIL_ "style="border:none; top:12px; left:12px; height:70px; width:85px; position:absolute;" class="form-control itp_input" name="" >
156
+												</div>-->
156 157
 											</div>
157 158
 										</div>
158 159
 										<div class="form-group">
@@ -313,7 +314,7 @@
313 314
 												<div class="col-xs-7 itp_in fnCorpTypeNm"></div>
314 315
 											</div>
315 316
 											<label class="col-xs-2 itp_lb"></label>
316
-											<div class="col-xs-4 itp_in"></div>
317
+											<div id="ITP_OPER03010_VIEW_LOGO_FILE" class="col-xs-4 itp_in"></div>
317 318
 										</div>
318 319
 										<div class="form-group">
319 320
 											<label class="col-xs-2 itp_lb">전화번호 *</label>
@@ -321,9 +322,7 @@
321 322
 												<div class="col-xs-7 itp_in fnTelNo"></div>
322 323
 											</div>
323 324
 											<label class="col-xs-2 itp_lb" style="border-top:none;">가맹점 로고</label>
324
-											<div class="col-xs-4 itp_ip"style="border-top:none;">
325
-												<div class="col-xs-5 itp_in">
326
-												</div>
325
+											<div class="col-xs-4 itp_in" style="border-top:none;">
327 326
 											</div>
328 327
 										</div>
329 328
 										<div class="form-group">

+ 3 - 5
src/main/webapp/app/oper/OPER03011.html

@@ -135,8 +135,7 @@
135 135
 												<!-- <button type="button" id="ITP_BTN_STINFO01010_RESET_PW" class="btn btn-danger btn-xs PWC" style="margin: 3px 0px 0px 3px;">비밀번호 초기화</button> -->
136 136
 											</div>
137 137
 											<label class="col-xs-2 itp_lb"></label>
138
-											<div class="col-xs-4 itp_in">
139
-												<img src="/oqpo-view/images/naver.png" alt="로고 샘플" id="ITP_FORM_OPER03011_DETAIL_ "style="border:none; top:12px; left:12px; height:70px; width:85px; position:absolute;" class="form-control itp_input" name="" >
138
+											<div id="ITP_FORM_OPER03011_DETAIL_LOGO_FILE" class="col-xs-4 itp_in">
140 139
 											</div>
141 140
 										</div>
142 141
 										<div class="form-group">
@@ -148,7 +147,7 @@
148 147
 											</div>
149 148
 											<label class="col-xs-2 itp_lb" style="border-top:none;">가맹점 로고</label>
150 149
 											<div class="col-xs-4 itp_ip" style="border-top:none;">
151
-												<div id="ITP_FORM_OPER03011_DETAIL_LOGO_FILE" class="col-xs-5 itp_in">
150
+												<div class="col-xs-5 itp_in">
152 151
 												</div>
153 152
 											</div>
154 153
 										</div>
@@ -310,8 +309,7 @@
310 309
 												<div class="col-xs-7 itp_in fnCorpTypeNm"></div>
311 310
 											</div>
312 311
 											<label class="col-xs-2 itp_lb"></label>
313
-											<div class="col-xs-4 itp_in">
314
-												<img src="/oqpo-view/images/naver.png" alt="로고 샘플" id="ITP_FORM_STINFO01010_DETAIL_LOGO "style="border:none; top:12px; left:12px; height:100px; width:125px; position:absolute;" class="form-control itp_input" name="" >
312
+											<div id="ITP_OPER03011_VIEW_LOGO_FILE" class="col-xs-4 itp_in">
315 313
 											</div>
316 314
 										</div>
317 315
 										<div class="form-group">

+ 18 - 4
src/main/webapp/js/app/config.js

@@ -1297,7 +1297,7 @@ function itp_fn_open_tab_self(param, fn) {
1297 1297
 };
1298 1298
 
1299 1299
 
1300
-function itp_fn_set_file_upload(wrap, folder, multi, thumb, screen, arg) {
1300
+function itp_fn_set_file_upload(wrap, folder, multi, thumb, screen, arg, fn) {
1301 1301
 	if (thumb) {
1302 1302
 		multi = false;
1303 1303
 		ITP_UPLOAD_DEFAULTS = {
@@ -1351,6 +1351,9 @@ function itp_fn_set_file_upload(wrap, folder, multi, thumb, screen, arg) {
1351 1351
 			        success: function(result) {
1352 1352
 			        	trRow.hide();
1353 1353
 		        		trRow.remove();
1354
+		        		if(fn && $.isFunction(fn)) {
1355
+							fn(param);
1356
+						}
1354 1357
 			        },
1355 1358
 			        error: function(xhr, status, error) {
1356 1359
 						if (xhr.responseJSON !== undefined) { //실패시 서버에서 내려주는 메세지 얼럿
@@ -2968,9 +2971,6 @@ var itp_fn_set_timeout = {
2968 2971
 	}
2969 2972
 };
2970 2973
 
2971
-var itp_fn_is_valid = (formId) => {
2972
-};
2973
-
2974 2974
 // 2022-11-02 수발주 추가
2975 2975
 let itp_fn_form_event = {
2976 2976
 	onKeyup: function(formId) {
@@ -3024,4 +3024,18 @@ let itp_fn_form_event = {
3024 3024
 		});
3025 3025
 		return isValid;
3026 3026
 	}
3027
+};
3028
+
3029
+let itp_fn_attach_file = {
3030
+	view: (id, fileList, clazz, style) => {
3031
+		$.each(fileList, function(i, item) {
3032
+			var text = 	'<img ' +
3033
+						'src="' + item.filePath + '" ' +
3034
+						'alt="' + item.fileNm + '" ' +
3035
+						'id="' + (item.fileNo + '_' + i) + '" ' +
3036
+						'class="' + clazz + '" ' +
3037
+						'style="' + style + '" />';
3038
+			$('#' + id).append(text);
3039
+		});
3040
+	}
3027 3041
 };

+ 14 - 2
src/main/webapp/js/app/oper/ITP_OPER03010.js

@@ -152,7 +152,6 @@ let pageObj = {
152 152
 	init: function () {
153 153
 		this.ui.init();
154 154
 		this.event.init();
155
-		this.fileUpload();
156 155
 	},
157 156
 	itp_OPER03010_param: {},
158 157
 	itp_OPER03010_search: false,
@@ -234,13 +233,17 @@ let pageObj = {
234 233
 		//파일업로드(수정화면)
235 234
 		var id = 'OPER03010';
236 235
 		$('#ITP_' + id + '_DETAIL_UPLOAD').empty();
236
+		$('#ITP_' + id + '_DETAIL_LOGO_FILE').empty();
237
+		var removeFn = (param) => {
238
+			$('#ITP_' + id + '_DETAIL_LOGO_FILE').empty();
239
+		};
237 240
 		const fileArgs = {
238 241
 			'fileNo': $('#ITP_FORM_' + id + '_DETAIL_FILE_NO').val(),
239 242
 			'viewCd': $('#ITP_FORM_' + id + '_DETAIL_VIEW_CD').val(),
240 243
 			'showYn': $('#ITP_' + id + '_DETAIL_UPLOAD').attr('data-show-yn'),
241 244
 			'fileId': '#ITP_FORM_' + id + '_DETAIL_FILE_NO' //파일번호를 서버에서 받아서 넣을 파일번호 인풋박스 아이디
242 245
 		};
243
-		itp_fn_set_file_upload('ITP_' + id + '_DETAIL_UPLOAD', 'notice', true, false, id, fileArgs);
246
+		itp_fn_set_file_upload('ITP_' + id + '_DETAIL_UPLOAD', 'affl', true, false, id, fileArgs, removeFn);
244 247
 	},
245 248
 	switchScreen: function(mode) {
246 249
 		$('.itp_det_head').find('button[id^="ITP_BTN_OPER03010_"]').each(function(i) {
@@ -485,6 +488,9 @@ let viewObj = {
485 488
 		$('#ITP_FORM_OPER03010_VIEW .fnLoadAddr').text(result.addr1);
486 489
 		$('#ITP_FORM_OPER03010_VIEW .fnDtlAddr').text(result.addr2);
487 490
 
491
+		itp_fn_attach_file.view('ITP_OPER03010_VIEW_LOGO_FILE', result.fileLogNoList
492
+			, 'form-control itp_input', 'border:none; top:12px; left:12px; height:100px; width:125px; position:absolute;');
493
+
488 494
 		let locate = result.addr1 + ' ' + result.addr2;
489 495
 		kakaoMap.init('ITP_FORM_OPER03010_VIEW', locate);
490 496
 
@@ -537,6 +543,11 @@ let modifyObj = {
537 543
 		$('#ITP_FORM_OPER03010_DETAIL .fnAddDt').text(result.regDt);
538 544
 		$('#ITP_FORM_OPER03010_DETAIL .fnChgDt').text(result.chgDt);
539 545
 
546
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_FILE_NO').val(result.cmpnyLogoFileNo);
547
+		pageObj.fileUpload();
548
+		itp_fn_attach_file.view('ITP_OPER03010_DETAIL_LOGO_FILE', result.fileLogNoList
549
+			, 'form-control itp_input', 'border:none; top:12px; left:12px; height:70px; width:85px; position:absolute;');
550
+
540 551
 		kakaoMap.init('ITP_FORM_OPER03010_DETAIL', $('#ITP_FORM_OPER03010_DETAIL_ADRES').val());
541 552
 
542 553
 		// 권한정보 리스트 조회
@@ -547,6 +558,7 @@ let modifyObj = {
547 558
 /*신규화면 Object*/
548 559
 let createObj = {
549 560
 	init: function () {
561
+		pageObj.fileUpload();
550 562
 		kakaoMap.init('ITP_FORM_OPER03010_DETAIL', '');
551 563
 		pageObj.grid.init('DETAIL', []);
552 564
 	},

+ 13 - 2
src/main/webapp/js/app/oper/ITP_OPER03011.js

@@ -107,7 +107,6 @@ let pageObj = {
107 107
 	init: function () {
108 108
 		this.ui.init();
109 109
 		this.event.init();
110
-		this.fileUpload();
111 110
 	},
112 111
 	itp_OPER03011_param: {},
113 112
 	itp_OPER03011_search: false,
@@ -179,13 +178,17 @@ let pageObj = {
179 178
 		//파일업로드(수정화면)
180 179
 		var id = 'OPER03011';
181 180
 		$('#ITP_' + id + '_DETAIL_UPLOAD').empty();
181
+		$('#ITP_' + id + '_DETAIL_LOGO_FILE').empty();
182
+		var removeFn = (param) => {
183
+			$('#ITP_' + id + '_DETAIL_LOGO_FILE').empty();
184
+		};
182 185
 		const fileArgs = {
183 186
 			'fileNo': $('#ITP_FORM_' + id + '_DETAIL_FILE_NO').val(),
184 187
 			'viewCd': $('#ITP_FORM_' + id + '_DETAIL_VIEW_CD').val(),
185 188
 			'showYn': $('#ITP_' + id + '_DETAIL_UPLOAD').attr('data-show-yn'),
186 189
 			'fileId': '#ITP_FORM_' + id + '_DETAIL_FILE_NO' //파일번호를 서버에서 받아서 넣을 파일번호 인풋박스 아이디
187 190
 		};
188
-		itp_fn_set_file_upload('ITP_' + id + '_DETAIL_UPLOAD', 'notice', true, false, id, fileArgs);
191
+		itp_fn_set_file_upload('ITP_' + id + '_DETAIL_UPLOAD', 'notice', true, false, id, fileArgs, removeFn);
189 192
 	},
190 193
 	switchScreen: function(mode) {
191 194
 		$('.itp_det_head').find('button[id^="ITP_BTN_OPER03011_"]').each(function(i) {
@@ -307,6 +310,11 @@ let viewObj = {
307 310
 		$('#ITP_FORM_OPER03011_VIEW .fnLoadAddr').text(result.addr1);
308 311
 		$('#ITP_FORM_OPER03011_VIEW .fnDtlAddr').text(result.addr2);
309 312
 
313
+		$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_FILE_NO').val(result.cmpnyLogoFileNo);
314
+		pageObj.fileUpload();
315
+		itp_fn_attach_file.view('ITP_OPER03011_VIEW_LOGO_FILE', result.fileLogNoList
316
+			, 'form-control itp_input', 'border:none; top:12px; left:12px; height:100px; width:125px; position:absolute;');
317
+
310 318
 		let locate = result.addr1 + ' ' + result.addr2;
311 319
 		kakaoMap.init('ITP_FORM_OPER03011_VIEW', locate);
312 320
 
@@ -435,6 +443,9 @@ let modifyObj = {
435 443
 		$('#ITP_FORM_OPER03011_DETAIL .fnAddDt').text(result.regDt);
436 444
 		$('#ITP_FORM_OPER03011_DETAIL .fnChgDt').text(result.chgDt);
437 445
 
446
+		itp_fn_attach_file.view('ITP_FORM_OPER03011_DETAIL_LOGO_FILE', result.fileLogNoList
447
+			, 'form-control itp_input', 'border:none; top:12px; left:12px; height:70px; width:85px; position:absolute;');
448
+
438 449
 		kakaoMap.init('ITP_FORM_OPER03011_DETAIL', $('#ITP_FORM_OPER03011_DETAIL_ADRES').val());
439 450
 
440 451
 		// 권한정보 리스트 조회