Selaa lähdekoodia

오더퀸 브랜드 검색

marseyes 2 vuotta sitten
vanhempi
commit
0ae0898c27

+ 0 - 3
src/main/webapp/app/popup/biz/BIZPOP_BRAND_BACK_OFFICE.html

@@ -10,9 +10,6 @@
10 10
 					<div class="col-xs-12">
11 11
 						<div class="form-horizontal">
12 12
 							<form id="ITP_FORM_BIZPOP_BRAND_BACK_OFFICE">
13
-								<input type="hidden" id="ITP_FORM_BIZPOP_BRAND_BACK_OFFICE_VIEW_CD" name="viewCd" value="U">
14
-								<input type="hidden" id="ITP_FORM_BIZPOP_BRAND_BACK_OFFICE_COMPANY_CODE" name="companyCode" value="">
15
-								<input type="hidden" id="ITP_FORM_BIZPOP_BRAND_BACK_OFFICE_USER_ID" name="userId" value="">				
16 13
 								<div class="form-group">
17 14
 									<label class="col-xs-4 itp_lb long">브랜드코드</label>
18 15
 									<div class="col-xs-7 itp_ip">

+ 17 - 3
src/main/webapp/js/app/oper/ITP_OPER06010.js

@@ -161,6 +161,7 @@ let pageObj = {
161 161
                         case 'ITP_BTN_OPER06010_SRH'				: listObj.button.search();		break;	// 조회 버튼 클릭
162 162
                         case 'ITP_BTN_OPER06010_NEWREG'				: listObj.button.create(); 		break;	// 신규등록 버튼
163 163
                         case 'ITP_BTN_OPER06010_MODIFY'				: modifyObj.button.modify();	break;	// 수정 버튼
164
+                        case 'ITP_BTN_OPER06010_BACK_OFFICE'		: modifyObj.button.searchBackOffice();	break;	// 백오피스 검색 버튼
164 165
                         case 'ITP_BTN_OPER06010_CANCELLIST'			: createObj.button.cancel(); 	break;	// 취소/목록 버튼
165 166
                         case 'ITP_BTN_OPER06010_DELETE'				: 								break;	// 삭제 버튼
166 167
                         case 'ITP_BTN_OPER06010_SAVE'				: createObj.button.save(); 		break;	// 저장 버튼
@@ -233,7 +234,7 @@ let pageObj = {
233 234
             $('#ITP_AJAX_OPER06010_DETAIL_CONTAINER').show();
234 235
             
235 236
 			
236
-            fn_show_btn_auth_array(['#ITP_BTN_OPER06010_CANCELLIST', '#ITP_BTN_OPER06010_SAVE']);
237
+            fn_show_btn_auth_array(['#ITP_BTN_OPER06010_CANCELLIST', '#ITP_BTN_OPER06010_SAVE', '#ITP_BTN_OPER06010_BACK_OFFICE']);
237 238
 
238 239
             
239 240
             $('#ITP_FORM_OPER06010_DETAIL').find('input, textarea, select, checkbox').each(function(i, elem) {
@@ -266,7 +267,7 @@ let pageObj = {
266 267
             $('#ITP_FORM_OPER06010_DETAIL_PG_ID').trigger('change');
267 268
         } else if(mode == 'MODIFY') { // 수정
268 269
             $('#ITP_AJAX_OPER06010_DETAIL_CONTAINER').show();
269
-            fn_show_btn_auth_array(['#ITP_BTN_OPER06010_CANCELLIST', '#ITP_BTN_OPER06010_SAVE']);
270
+            fn_show_btn_auth_array(['#ITP_BTN_OPER06010_CANCELLIST', '#ITP_BTN_OPER06010_SAVE', '#ITP_BTN_OPER06010_BACK_OFFICE']);
270 271
 
271 272
             $('#ITP_FORM_OPER06010_DETAIL_BRAND_ID').attr('readonly', true);
272 273
             $('#ITP_FORM_OPER06010_DETAIL_BRAND_NM').attr('readonly', true);
@@ -500,7 +501,20 @@ let modifyObj = {
500 501
             const key = {brandId: brandIdVal, viewCd: 'R'};
501 502
             var param = $.param(key);
502 503
             modifyObj.load(param);
503
-        }
504
+        }, 
505
+		searchBackOffice: function() {
506
+			var args = { 'brandCd': $('#ITP_FORM_OPER06010_DETAIL_OQ_BRAND_ID').val(), 'brandId': $('#ITP_FORM_OPER06010_DETAIL_BRAND_ID').val() };
507
+			fn_call_popup('biz', 'BIZPOP_BRAND_BACK_OFFICE', '#ITP_ASIDE', function(data) {
508
+				// console.log(JSON.stringify(data));
509
+				if(data.code == '21000') {
510
+					$('#ITP_FORM_OPER06010_DETAIL_OQ_BRAND_ID').val(data.brandCd);
511
+					$('#ITP_FORM_OPER06010_DETAIL_BRAND_NM').val(data.brandNm);
512
+					$('#ITP_FORM_OPER06010_DETAIL_BRAND_TYPE').val(data.cateCd);	
513
+				} else {
514
+					itp_fn_modal_alert('오더퀸 브랜드코드에 해당하는 데이터가 없습니다.');	
515
+				}
516
+			}, args, 'S');
517
+		}
504 518
     },
505 519
     load: function(param) {
506 520
         fn_ajax_call(API_DETAIL_INFO, param, this.callback, 'GET');

+ 45 - 0
src/main/webapp/js/app/popup/biz/ITP_BIZPOP_BRAND_BACK_OFFICE.js

@@ -0,0 +1,45 @@
1
+require(['config'], function() {
2
+	require([
3
+		'jquery'
4
+	], function($) {
5
+		
6
+	});
7
+});
8
+
9
+let API_BRAND_OQ_INFO_BRAND = '/api/brand/oq-info-brand';
10
+
11
+function itp_fn_BIZPOP_BRAND_BACK_OFFICE(parentPopFn, args, returnType) {
12
+	
13
+	// itp_fn_BIZPOP_BRAND_BACK_OFFICE_info(args);
14
+	// console.log(JSON.stringify(args));
15
+	$('#ITP_FORM_BIZPOP_BRAND_BACK_OFFICE_BRAND_CD').val(args.brandCd);
16
+	$('#ITP_FORM_BIZPOP_BRAND_BACK_OFFICE_BRAND_ID').val(args.brandId);
17
+	
18
+	$('#ITP_BIZPOP_BRAND_BACK_OFFICE_BTN_SEARCH').on('click', function() {
19
+
20
+		const formId = '#ITP_FORM_BIZPOP_BRAND_BACK_OFFICE';
21
+		itp_fn_form_clear_validate(null, formId);
22
+		
23
+		var vali_brandCd = itp_fn_form_validate(formId, formId + '_BRAND_CD', ['empty'], undefined); // 브랜드코드
24
+		var vali_brandId = itp_fn_form_validate(formId, formId + '_BRAND_ID', ['empty'], undefined); // 브랜드ID
25
+		
26
+		if (vali_brandCd && vali_brandId) {
27
+			
28
+			let param = $(formId).serializeObject();
29
+			var searhFn = function(result) {
30
+				parentPopFn(result);
31
+				$('#ITP_BIZPOP_BRAND_BACK_OFFICE').modal('hide'); // 팝업닫기							
32
+			};
33
+			fn_ajax_call(API_BRAND_OQ_INFO_BRAND, JSON.stringify(param), searhFn, 'POST');
34
+			
35
+		}			
36
+	});
37
+	
38
+	$('#ITP_BIZPOP_BRAND_BACK_OFFICE').one('shown.bs.modal', function(e) {		
39
+		itp_fn_fire_window_resize();
40
+	}).one('hidden.bs.modal', function(e) {
41
+		$('#ITP_BIZPOP_BRAND_BACK_OFFICE').remove();
42
+	}).modal('show');
43
+	
44
+};
45
+