Explorar el Código

운영관리 오류 수정

juney hace 2 años
padre
commit
00544e467a

+ 4 - 4
src/main/webapp/app/oper/OPER04010.html

@@ -114,7 +114,7 @@
114 114
 											</div>
115 115
 										</div>
116 116
 									</div>	
117
-									<div class="itp_form_info">	
117
+									<!--<div class="itp_form_info">
118 118
 										<div class="itp_form_in">
119 119
 											<div class="form-group">
120 120
 												<label class="col-xs-2 itp_lb">비밀번호</label>
@@ -128,7 +128,7 @@
128 128
 												</div>
129 129
 											</div>
130 130
 										</div>
131
-									</div>	
131
+									</div>-->
132 132
 									<div class="itp_form_change">
133 133
 										<div class="itp_form_in">
134 134
 											<div class="form-group">
@@ -165,13 +165,13 @@
165 165
 											<label class="col-xs-2 itp_lb">주소(*)</label>
166 166
 											<div class="col-xs-10 itp_ip">
167 167
 												<div class="col-xs-1 itp_in">
168
-													<input type="text" id="ITP_FORM_OPER04010_DETAIL_ZIPNO" data-check-required="empty" class="form-control itp_input" name="zipNo" value="" maxlength="6" readonly placeholder="우편번호">
168
+													<input type="text" id="ITP_FORM_OPER04010_DETAIL_ZIPNO" data-check-required="empty" data-alert-required="ONLYCHK" data-alert-msg="address" class="form-control itp_input" name="zipNo" value="" maxlength="6" readonly placeholder="우편번호">
169 169
 												</div>
170 170
 												<div class="col-xs-1 itp_in">
171 171
 													<button type="button" id="ITP_FORM_OPER04010_DETAIL_ADRES_SCH" class="btn btn-primary btn-xs SHOW" style="margin: 3px 0px 0px 3px;">&nbsp;&nbsp;주소검색&nbsp;&nbsp;</button>
172 172
 												</div>
173 173
 												<div class="col-xs-4 itp_in" style="margin-right: 5px;">
174
-													<input type="text" id="ITP_FORM_OPER04010_DETAIL_ADRES" data-check-required="empty" class="form-control itp_input" name="addr1" value="" readonly placeholder="기본주소">
174
+													<input type="text" id="ITP_FORM_OPER04010_DETAIL_ADRES" data-check-required="empty" data-alert-required="ONLYCHK" data-alert-msg="address" class="form-control itp_input" name="addr1" value="" readonly placeholder="기본주소">
175 175
 												</div>
176 176
 												<div class="col-xs-4 itp_in">
177 177
 													<input type="text" id="ITP_FORM_OPER04010_DETAIL_ADRES_DTL" data-check-required="empty" class="form-control itp_input" name="addr2" value="" placeholder="상세주소">

+ 43 - 19
src/main/webapp/app/oper/OPER06010.html

@@ -17,6 +17,19 @@
17 17
 						<div class="itp_srh_border fix">
18 18
 							<div class="col-xs-12">
19 19
 								<form id="ITP_FORM_OPER06010_SEARCH" class="form-horizontal">
20
+									<input type="hidden" id="ITP_FORM_OPER06010_SEARCH_AFFL_SHOP_ID" name="safflShopId" />
21
+									<div class="form-group">
22
+										<div class="col-xs-2 itp_ip itp_noMar">
23
+											<input type="text" id="ITP_FORM_OPER06010_SEARCH_AFFL_SHOP_NM" class="form-control itp_input" name="safflShopNm" placeholder="가맹점" />
24
+										</div>
25
+										<div class="col-xs-1 itp_in" style="width:8%; padding:0px;">
26
+											<button type="button" id="ITP_BTN_OPER06010_SEARCH_AFFL_SHOP" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
27
+											<button type="button" id="ITP_BTN_OPER06010_DELETE_AFFL_SHOP" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
28
+										</div>
29
+										<div class="col-xs-2 itp_ip itp_noMar">
30
+											<select id="ITP_FORM_OPER06010_SEARCH_BRAND_ID" class="form-control itp_input" name="sbrandId"></select>
31
+										</div>
32
+									</div>
20 33
 									<div class="form-group">
21 34
 										<div class="col-xs-2 itp_ip itp_noMar">
22 35
 											<select id="ITP_FORM_OPER06010_SERVICE_BRAND_TYPE" data-select-code="BRAND_TYPE" class="form-control itp_input" name="sbrandType">
@@ -52,7 +65,7 @@
52 65
 								<input type="hidden" id="ITP_FORM_OPER06010_DETAIL_VIEW_CD" name="viewCd" value="C">
53 66
 								<input type="hidden" id="ITP_FORM_OPER06010_DETAIL_AFFL_SHOP_ID" name="afflShopId" value="">
54 67
 								<input type="hidden" id="ITP_FORM_OPER06010_DETAIL_BRAND_ID" name="brandId" value="">
55
-								<input type="hidden" id="ITP_FORM_OPER06010_DETAIL_FILE_NO" name="fileNo" value="">
68
+								<input type="hidden" id="ITP_FORM_OPER06010_DETAIL_FILE_NO" name="brandLogoFileNo" value="">
56 69
 					
57 70
 								<section class="itp_form_sec">
58 71
 									<h4 class="itp_form_tit">브랜드 정보-신규</h4>
@@ -99,8 +112,22 @@
99 112
 												</div>
100 113
 											</div>
101 114
 										</div>
102
-									</div>	
103
-									<div class="itp_form_info">	
115
+									</div>
116
+									<div class="itp_form_info">
117
+										<div class="itp_form_in">
118
+											<div class="form-group">
119
+												<label class="col-xs-2 itp_lb">대표자명</label>
120
+												<div class="col-xs-10 itp_ip">
121
+													<div class="col-xs-2 itp_in" style="margin-left:5px;">
122
+														<input type="text" id="ITP_FORM_OPER06010_DETAIL_OWNER_NM" data-check-required="empty" class="form-control itp_input" name="ownerNm">
123
+													</div>
124
+													<div class="col-xs-5 itp_in" style="margin-top:5px;">
125
+													</div>
126
+												</div>
127
+											</div>
128
+										</div>
129
+									</div>
130
+									<!--<div class="itp_form_info">
104 131
 										<div class="itp_form_in">
105 132
 											<div class="form-group">
106 133
 												<label class="col-xs-2 itp_lb">비밀번호</label>
@@ -114,7 +141,7 @@
114 141
 												</div>
115 142
 											</div>
116 143
 										</div>
117
-									</div>
144
+									</div>-->
118 145
 									<div class="itp_form_in">
119 146
 										<div class="form-group">
120 147
 											<label class="col-xs-2 itp_lb">전화번호 *</label>
@@ -125,8 +152,7 @@
125 152
 												<!-- <button type="button" id="ITP_BTN_OPER06010_RESET_PW" class="btn btn-danger btn-xs PWC" style="margin: 3px 0px 0px 3px;">비밀번호 초기화</button> -->
126 153
 											</div>
127 154
 											<label class="col-xs-2 itp_lb"></label>
128
-											<div class="col-xs-1 itp_in">
129
-												<img src="/oqpo-view/images/naver.png" alt="로고 샘플" id="ITP_FORM_OPER06010_DETAIL_BRAND_LOGO "style="border:none; top:12px; left:12px; height:70px; width:85px; position:absolute;" class="form-control itp_input" name="brandLogo" >
155
+											<div id="ITP_OPER06010_DETAIL_LOGO_FILE" class="col-xs-1 itp_in">
130 156
 											</div>
131 157
 										</div>
132 158
 										<div class="form-group">
@@ -177,22 +203,22 @@
177 203
 											<label class="col-xs-2 itp_lb">PG사</label>
178 204
 											<div class="col-xs-4 itp_ip">
179 205
 												<div class="col-xs-8 itp_in">
180
-													<select id="ITP_FORM_OPER06010_DETAIL_DPST_BNK_CD" data-select-code="BNK_CD" data-check-required="empty" class="form-control itp_input" name="bnkCd">
206
+													<select id="ITP_FORM_OPER06010_DETAIL_PG_ID" data-select-code="PG_ID" data-check-required="empty" class="form-control itp_input" name="pgId">
181 207
 													</select>
182 208
 												</div>
183 209
 											</div>
184 210
 										</div>
185 211
 										<div class="form-group">
186
-											<label class="col-xs-2 itp_lb">가맹점 아이디 </label>
212
+											<label class="col-xs-2 itp_lb">PG 가맹점 아이디 </label>
187 213
 											<div class="col-xs-4 itp_ip">
188 214
 												<div class="col-xs-7 itp_in">
189
-													<input type="text" id="ITP_FORM_OPER06010_DETAIL_OWAC_NM" data-check-required="empty" class="form-control itp_input" name="owacNm" value="" placeholder="가맹점 id">
215
+													<input type="text" id="ITP_FORM_OPER06010_DETAIL_PG_AFFL_ID" data-check-required="empty" class="form-control itp_input" name="pgAfflId" value="" placeholder="PG 가맹점 id">
190 216
 												</div>
191 217
 											</div>
192
-											<label class="col-xs-2 itp_lb">가맹점 Key</label>
218
+											<label class="col-xs-2 itp_lb">PG 가맹점 Key</label>
193 219
 											<div class="col-xs-4 itp_ip">
194 220
 												<div class="col-xs-8 itp_in">
195
-													<input type="text" id="ITP_FORM_OPER06010_DETAIL_OWAC_NM" data-check-required="empty" class="form-control itp_input" name="owacNm" value="" placeholder="가맹점 key">
221
+													<input type="text" id="ITP_FORM_OPER06010_DETAIL_PG_KEY" class="form-control itp_input" name="pgKey" value="" placeholder="PG 가맹점 key">
196 222
 												</div>
197 223
 											</div>
198 224
 										</div>
@@ -202,13 +228,13 @@
202 228
 											<label class="col-xs-2 itp_lb">주소</label>
203 229
 											<div class="col-xs-10 itp_ip">
204 230
 												<div class="col-xs-1 itp_in">
205
-													<input type="text" id="ITP_FORM_OPER06010_DETAIL_ZIPNO" class="form-control itp_input" name="zipNo" value="" maxlength="6" readonly placeholder="우편번호">
231
+													<input type="text" id="ITP_FORM_OPER06010_DETAIL_ZIPNO" data-check-required="empty" data-alert-required="ONLYCHK" data-alert-msg="address" class="form-control itp_input" name="zipNo" value="" maxlength="6" readonly placeholder="우편번호">
206 232
 												</div>
207 233
 												<div class="col-xs-1 itp_in">
208 234
 													<button type="button" id="ITP_FORM_OPER06010_DETAIL_ADRES_SCH" class="btn btn-primary btn-sm SHOW" style="margin: -1px 0px 0px 3px;">&nbsp;&nbsp;주소검색&nbsp;&nbsp;</button>
209 235
 												</div>
210 236
 												<div class="col-xs-4 itp_in" style="margin-right: 5px; margin-left:20px;">
211
-													<input type="text" id="ITP_FORM_OPER06010_DETAIL_ADRES" class="form-control itp_input" name="addr1" value="" readonly placeholder="기본주소">
237
+													<input type="text" id="ITP_FORM_OPER06010_DETAIL_ADRES" data-check-required="empty" data-alert-required="ONLYCHK" data-alert-msg="address" class="form-control itp_input" name="addr1" value="" readonly placeholder="기본주소">
212 238
 												</div>
213 239
 												<div class="col-xs-4 itp_in">
214 240
 													<input type="text" id="ITP_FORM_OPER06010_DETAIL_ADRES_DTL" class="form-control itp_input" name="addr2" value="" placeholder="상세주소">
@@ -293,9 +319,7 @@
293 319
 												<div class="col-xs-5 itp_in fnTelNo"></div>
294 320
 											</div>
295 321
 											<label class="col-xs-2 itp_lb"></label>
296
-											<div class="col-xs-1 itp_ip">
297
-												<img src="/oqpo-view/images/naver.png" alt="로고 샘플" style="border:none; top:12px; left:12px; height:100px; width:125px; position:absolute;" class="form-control itp_input" name="fnBrandLogo" >
298
-												<img src="/oqpo-view/images/naver.png" alt="로고 샘플" style="border:none; top:12px; left:12px; height:100px; width:125px; position:absolute;" class="form-control itp_input" name="fnBrandLogo2" >
322
+											<div id="ITP_OPER06010_VIEW_LOGO_FILE" class="col-xs-1 itp_ip">
299 323
 											</div>
300 324
 										</div>
301 325
 										<div class="form-group">
@@ -327,17 +351,17 @@
327 351
 											</div>
328 352
 											<label class="col-xs-2 itp_lb">PG사</label>
329 353
 											<div class="col-xs-4 itp_ip">
330
-												<div class="col-xs-12 itp_in fn"></div>
354
+												<div class="col-xs-12 itp_in fn fnPgId"></div>
331 355
 											</div>
332 356
 										</div>	
333 357
 										<div class="form-group">
334 358
 											<label class="col-xs-2 itp_lb">가맹점 아이디 </label>
335 359
 											<div class="col-xs-4 itp_ip">
336
-												<div class="col-xs-12 itp_in fn"></div>
360
+												<div class="col-xs-12 itp_in fn fnPgAfflId"></div>
337 361
 											</div>
338 362
 											<label class="col-xs-2 itp_lb">가맹점 Key</label>
339 363
 											<div class="col-xs-4 itp_ip">
340
-												<div class="col-xs-12 itp_in fn"></div>
364
+												<div class="col-xs-12 itp_in fn fnPgKey"></div>
341 365
 											</div>
342 366
 										</div>
343 367
 									</div>

+ 1 - 5
src/main/webapp/js/app/oper/ITP_OPER03010.js

@@ -488,6 +488,7 @@ let viewObj = {
488 488
 		$('#ITP_FORM_OPER03010_VIEW .fnLoadAddr').text(result.addr1);
489 489
 		$('#ITP_FORM_OPER03010_VIEW .fnDtlAddr').text(result.addr2);
490 490
 
491
+		pageObj.fileUpload();
491 492
 		itp_fn_attach_file.view('ITP_OPER03010_VIEW_LOGO_FILE', result.fileLogNoList
492 493
 			, 'form-control itp_input', 'border:none; top:12px; left:12px; height:100px; width:125px; position:absolute;');
493 494
 
@@ -602,11 +603,6 @@ let createObj = {
602 603
 
603 604
 			if (itp_fn_form_event.isValid(formId)) {
604 605
 
605
-				if($('#ITP_FORM_OPER03010_DETAIL_CMPY_ZIPNO').val() === '' || $('#ITP_FORM_OPER03010_DETAIL_CMPY_ADRES').val() === '') {
606
-					itp_fn_modal_alert('주소 검색을 통해 회사 주소를 입력하세요.');
607
-					return;
608
-				}
609
-
610 606
 				if (ITP_FORM_OPER03010_DETAIL_IS_DUPLICATE) {
611 607
 					itp_fn_modal_duplicate('회사코드 중복체크를 해주세요.', formId + '_AFFL_SHOP_ID');
612 608
 				} else {

+ 14 - 21
src/main/webapp/js/app/oper/ITP_OPER04010.js

@@ -99,6 +99,15 @@ let pageObj = {
99 99
             $('#ITP_TAB_OPER04010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
100 100
             $('#ITP_FORM_OPER04010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setMonth(now.getMonth() - 1)));
101 101
             $('#ITP_FORM_OPER04010_SEARCH_TO_DT').datepicker('setDate', new Date());
102
+
103
+            itp_fn_form_event.onKeyup('#ITP_FORM_OPER04010_DETAIL');
104
+
105
+            // form alert message 주입
106
+            $('input[data-alert-required="ONLYCHK"]').each(function() {
107
+                if($(this).data('alert-msg') === 'address') {
108
+                    $(this).data('alert-msg', ITP_MSG_LOCALE.message.form.emptyAddr);
109
+                }
110
+            });
102 111
         },
103 112
         grid: function() {
104 113
             itp_fn_jqgrid_resize(OPER04010_GRID_ID, OPER04010_GRID_LIST, 'lg');
@@ -299,7 +308,7 @@ let viewObj = {
299 308
         $('#ITP_FORM_OPER04010_VIEW .fnSaleMgrId').text(result.saleMgrId);
300 309
         $('#ITP_FORM_OPER04010_VIEW .fnSaleMgrNm').text(result.saleMgrNm);
301 310
         $('#ITP_FORM_OPER04010_VIEW .fnSaleType').text(result.saleTypeNm);
302
-        $('#ITP_FORM_OPER04010_VIEW .fnStCd').text(result.stCd);
311
+        $('#ITP_FORM_OPER04010_VIEW .fnStCd').text(result.stNm);
303 312
         $('#ITP_FORM_OPER04010_VIEW .fnTelNo').text(result.rprstTelNo);
304 313
         $('#ITP_FORM_OPER04010_VIEW .fnFaxNo').text(result.rprstFaxNo);
305 314
         $('#ITP_FORM_OPER04010_VIEW .fnEmail').text(result.rprstEmal);
@@ -335,8 +344,9 @@ let modifyObj = {
335 344
         console.log(result);
336 345
         pageObj.switchScreen('MODIFY');
337 346
         $('#ITP_FORM_OPER04010_DETAIL #ITP_FORM_OPER04010_DETAIL_VIEW_CD').val('U');
338
-
339 347
         $('#ITP_FORM_OPER04010_DETAIL #ITP_FORM_OPER04010_DETAIL_SALE_MGR_ID').val(result.saleMgrId);
348
+
349
+        $('#ITP_FORM_OPER04010_DETAIL .fnSaleMgrId').text(result.saleMgrId);
340 350
         $('#ITP_FORM_OPER04010_DETAIL #ITP_FORM_OPER04010_DETAIL_SALE_MGR_NM').val(result.saleMgrNm);
341 351
         $('#ITP_FORM_OPER04010_DETAIL #ITP_FORM_OPER04010_DETAIL_SALES_TYPE_CD').val(result.saleType);
342 352
         $('#ITP_FORM_OPER04010_DETAIL #ITP_FORM_OPER04010_DETAIL_USE_STAT_CD').val(result.stCd);
@@ -406,27 +416,10 @@ let createObj = {
406 416
         },
407 417
         save: function() {
408 418
             const formId = '#ITP_FORM_OPER04010_DETAIL';
419
+            itp_fn_form_event.removeChar('#ITP_FORM_OPER04010_DETAIL');
409 420
             itp_fn_form_clear_validate(null, formId);
410
-            var vali_salesUserId = itp_fn_form_validate(formId, formId + '_SALE_MGR_ID', ['empty'], undefined);
411
-            var vali_salesTypeCd = itp_fn_form_validate(formId, formId + '_SALES_TYPE_CD', ['empty'], undefined);
412
-            var vali_useStatCd = itp_fn_form_validate(formId, formId + '_USE_STAT_CD', ['empty'], undefined);
413
-            var vali_salesUserNm = itp_fn_form_validate(formId, formId + '_SALE_MGR_NM', ['empty'], undefined);
414
-            var vali_telNo = itp_fn_form_validate(formId, formId + '_TEL_NO', ['empty'], undefined);
415
-            var vali_email = itp_fn_form_validate(formId, formId + 'EMAIL', ['empty'], undefined);
416
-
417
-            var vali_userPw = true;
418
-            var vali_userPwConfirm = true;
419
-            if($('#ITP_FORM_OPER04010_DETAIL_VIEW_CD').val() == 'C') { // 신규
420
-                vali_userPw = itp_fn_form_validate(formId, formId + '_USER_PW', ['empty'], undefined);
421
-                vali_userPwConfirm = itp_fn_form_validate(formId, formId + '_USER_PW_CONFIRM', ['empty'], undefined);
422
-            }
423 421
 
424
-            if (vali_salesUserId && vali_salesTypeCd && vali_useStatCd && vali_salesUserNm && vali_userPw && vali_userPwConfirm && vali_telNo && vali_email) {
425
-
426
-                if($('#ITP_FORM_OPER04010_DETAIL_ZIPNO').val() == '' || $('#ITP_FORM_OPER04010_DETAIL_ADRES').val() == '') {
427
-                    itp_fn_modal_alert('주소 검색을 통해 회사 주소를 입력하세요.');
428
-                    return;
429
-                }
422
+            if (itp_fn_form_event.isValid(formId)) {
430 423
 
431 424
                 if (ITP_FORM_OPER04010_DETAIL_IS_DUPLICATE) {
432 425
                     itp_fn_modal_duplicate('영업담당자 ID 중복체크를 해주세요.', formId + '_SALES_USER_ID');

+ 100 - 19
src/main/webapp/js/app/oper/ITP_OPER06010.js

@@ -36,9 +36,10 @@ const OPER06010_DETAIL_GRID_PAGER = '#ITP_OPER06010_DETAIL_jqGridPager';
36 36
 const OPER06010_DETAIL_GRID_EMPTY = '#ITP_OPER06010_DETAIL_jqGridEmpty';
37 37
 
38 38
 /*API URL*/
39
-let API_DETAIL_GRID_LIST = '/api/brand/detail-grid-list';
40
-let API_DETAIL_INFO = '/api/brand/info-brand';
41
-let API_DETAIL_SAVE = '/api/brand/save-brand';
39
+let API_DETAIL_GRID_LIST    = '/api/brand/detail-grid-list';
40
+let API_DETAIL_INFO         = '/api/brand/info-brand';
41
+let API_DETAIL_SAVE         = '/api/brand/save-brand';
42
+let BRAND_POP_GRID_LIST 	= '/api/brand/pop-grid-list';
42 43
 
43 44
 let ITP_FORM_OPER06010_DETAIL_IS_WRITING = false;
44 45
 
@@ -102,7 +103,6 @@ let pageObj = {
102 103
     init: function () {
103 104
         this.ui.init();
104 105
         this.event.init();
105
-        this.fileUpload();
106 106
     },
107 107
     ui: {
108 108
         init: function () {
@@ -120,6 +120,15 @@ let pageObj = {
120 120
                     fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
121 121
                 }
122 122
             });
123
+
124
+            itp_fn_form_event.onKeyup('#ITP_FORM_OPER06010_DETAIL');
125
+
126
+            // form alert message 주입
127
+            $('input[data-alert-required="ONLYCHK"]').each(function() {
128
+                if($(this).data('alert-msg') === 'address') {
129
+                    $(this).data('alert-msg', ITP_MSG_LOCALE.message.form.emptyAddr);
130
+                }
131
+            });
123 132
         },
124 133
         grid: function() {
125 134
             itp_fn_jqgrid_resize(OPER06010_GRID_ID, OPER06010_GRID_LIST, 'lg');
@@ -160,13 +169,17 @@ let pageObj = {
160 169
         //파일업로드(수정화면)
161 170
         var id = 'OPER06010';
162 171
         $('#ITP_' + id + '_DETAIL_UPLOAD').empty();
172
+        $('#ITP_' + id + '_DETAIL_LOGO_FILE').empty();
173
+        var removeFn = (param) => {
174
+            $('#ITP_' + id + '_DETAIL_LOGO_FILE').empty();
175
+        };
163 176
         const fileArgs = {
164 177
             'fileNo': $('#ITP_FORM_' + id + '_DETAIL_FILE_NO').val(),
165 178
             'viewCd': $('#ITP_FORM_' + id + '_DETAIL_VIEW_CD').val(),
166 179
             'showYn': $('#ITP_' + id + '_DETAIL_UPLOAD').attr('data-show-yn'),
167 180
             'fileId': '#ITP_FORM_' + id + '_DETAIL_FILE_NO' //파일번호를 서버에서 받아서 넣을 파일번호 인풋박스 아이디
168 181
         };
169
-        itp_fn_set_file_upload('ITP_' + id + '_DETAIL_UPLOAD', 'notice', true, false, id, fileArgs);
182
+        itp_fn_set_file_upload('ITP_' + id + '_DETAIL_UPLOAD', 'brand', true, false, id, fileArgs, removeFn);
170 183
     },
171 184
     switchScreen: function(mode) {
172 185
         $('.itp_det_head').find('button[id^="ITP_BTN_OPER06010_"]').each(function(i) {
@@ -200,6 +213,8 @@ let pageObj = {
200 213
 			$('#ITP_FORM_OPER06010_DETAIL .itp_form_info').hide();
201 214
 			$('#ITP_FORM_OPER06010_DETAIL .itp_form_change').show();
202 215
 
216
+            $('#ITP_FORM_OPER06010_DETAIL #ITP_FORM_OPER06010_DETAIL_AFFL_SHOP_ID').val(fn_make_user_info.get('afflShopId'));
217
+
203 218
             $('.fnBrandId').text('(자동부여)');
204 219
         } else if(mode == 'MODIFY') { // 수정
205 220
             $('#ITP_AJAX_OPER06010_DETAIL_CONTAINER').show();
@@ -217,8 +232,6 @@ let pageObj = {
217 232
 			$('#ITP_FORM_OPER06010_DETAIL .itp_form_change').hide();
218 233
 			
219 234
 			$('#ITP_BTN_OPER06010_RESET_PW').show();
220
-
221
-
222 235
         } else if(mode == 'VIEW') { // 보기
223 236
             $('#ITP_AJAX_OPER06010_VIEW_CONTAINER').show();
224 237
             fn_show_btn_auth_array(['#ITP_BTN_OPER06010_MODIFY', '#ITP_BTN_OPER06010_CANCELLIST']);
@@ -229,6 +242,7 @@ let pageObj = {
229 242
 /*목록화면 Object*/
230 243
 let listObj = {
231 244
     init: function () {
245
+        afflShopObj.init();
232 246
         this.grid.init();
233 247
     },
234 248
     itp_OPER06010_param: {},
@@ -239,6 +253,7 @@ let listObj = {
239 253
             let param = $('#ITP_FORM_OPER06010_SEARCH').serializeObject();
240 254
             param.gridSize = $.jgrid.defaults.rowNum;
241 255
             param.gridPage = $.jgrid.defaults.page;
256
+            console.log(JSON.stringify(param));
242 257
             $(OPER06010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
243 258
         },
244 259
         create: function() {
@@ -349,6 +364,8 @@ let viewObj = {
349 364
         $('#ITP_FORM_OPER06010_VIEW .fnEmalAddr').text(result.emalAddr);
350 365
         $('#ITP_FORM_OPER06010_VIEW .fnDpstBnkCd').text(result.bnkCdNm);
351 366
         $('#ITP_FORM_OPER06010_VIEW .fnRcvAcctNo').text(result.acctNo);
367
+        $('#ITP_FORM_OPER06010_VIEW .fnBnkCd').text(result.bnkCdNm);
368
+        $('#ITP_FORM_OPER06010_VIEW .fnAcctNo').text(result.acctNo);
352 369
         $('#ITP_FORM_OPER06010_VIEW .fnOwacNm').text(result.owacNm);
353 370
         $('#ITP_FORM_OPER06010_VIEW .fnZipNo').text(result.zipNo);
354 371
         $('#ITP_FORM_OPER06010_VIEW .fnLoadAddr').text(result.addr1);
@@ -359,6 +376,14 @@ let viewObj = {
359 376
         $('#ITP_FORM_OPER06010_VIEW .fnChgDt').text(result.sysChgDttm);
360 377
         // $('#ITP_FORM_OPER06010_VIEW .fnBrandLogo').text(result.lastLoginDt);
361 378
 
379
+        $('#ITP_FORM_OPER06010_VIEW .fnPgId').text(result.pgId);
380
+        $('#ITP_FORM_OPER06010_VIEW .fnPgAfflId').text(result.pgAfflId);
381
+        $('#ITP_FORM_OPER06010_VIEW .fnPgKey').text(result.pgKey);
382
+
383
+        pageObj.fileUpload();
384
+        itp_fn_attach_file.view('ITP_OPER06010_VIEW_LOGO_FILE', result.fileLogNoList
385
+            , 'form-control itp_input', 'border:none; top:12px; left:12px; height:100px; width:125px; position:absolute;');
386
+
362 387
         let locate = result.addr1 + ' ' + result.addr2;
363 388
         kakaoMap.init('ITP_FORM_OPER06010_VIEW', locate);
364 389
 
@@ -403,11 +428,19 @@ let modifyObj = {
403 428
         $('#ITP_FORM_OPER06010_DETAIL #ITP_FORM_OPER06010_DETAIL_OWAC_NM').val(result.owacNm);
404 429
         $('#ITP_FORM_OPER06010_DETAIL #ITP_FORM_OPER06010_DETAIL_ZIPNO').val(result.zipNo);
405 430
         $('#ITP_FORM_OPER06010_DETAIL #ITP_FORM_OPER06010_DETAIL_ADRES').val(result.addr1);
406
-        $('#ITP_FORM_OPER06010_DETAIL #ITP_FORM_OPER03010_DETAIL_ADRES_DTL').val(result.addr2);
431
+        $('#ITP_FORM_OPER06010_DETAIL #ITP_FORM_OPER06010_DETAIL_ADRES_DTL').val(result.addr2);
432
+
433
+        $('#ITP_FORM_OPER06010_DETAIL #ITP_FORM_OPER06010_DETAIL_PG_ID').val(result.pgId);
434
+        $('#ITP_FORM_OPER06010_DETAIL #ITP_FORM_OPER06010_DETAIL_PG_AFFL_ID').val(result.pgAfflId);
435
+        $('#ITP_FORM_OPER06010_DETAIL #ITP_FORM_OPER06010_DETAIL_PG_KEY').val(result.pgKey);
407 436
 
408 437
         $('#ITP_FORM_OPER06010_DETAIL .fnAddDt').text(result.sysRegDttm);
409 438
         $('#ITP_FORM_OPER06010_DETAIL .fnChgDt').text(result.sysChgDttm);
410 439
 
440
+        pageObj.fileUpload();
441
+        itp_fn_attach_file.view('ITP_OPER03010_DETAI_LOGO_FILE', result.fileLogNoList
442
+            , 'form-control itp_input', 'border:none; top:12px; left:12px; height:100px; width:125px; position:absolute;');
443
+
411 444
         let locate = result.addr1 + ' ' + result.addr2;
412 445
         kakaoMap.init('ITP_FORM_OPER06010_DETAIL', locate);
413 446
 
@@ -438,11 +471,12 @@ let createObj = {
438 471
         },
439 472
         save: function() {
440 473
             const formId = '#ITP_FORM_OPER06010_DETAIL';
474
+            itp_fn_form_event.removeChar('#ITP_FORM_OPER06010_DETAIL');
441 475
             itp_fn_form_clear_validate(null, formId);
442 476
 
443
-            if (createObj.isValid(formId)) {
477
+            if (itp_fn_form_event.isValid(formId)) {
444 478
                 let param = $(formId).serializeObject();
445
-                // console.log(JSON.stringify(param));
479
+                console.log(JSON.stringify(param));
446 480
 
447 481
                 var searhFn = function() {
448 482
                     ITP_FORM_OPER06010_DETAIL_IS_WRITING = false;
@@ -464,16 +498,63 @@ let createObj = {
464 498
             }
465 499
         };
466 500
         fn_call_popup('biz', 'BIZPOP_AFFL_SHOP', '#ITP_ASIDE', popFn, null, 'S');
501
+    }
502
+};
503
+
504
+/*가맹점 Object*/
505
+let afflShopObj = {
506
+    init: function () {
507
+        this.action();
508
+        if(fn_make_user_info.get('authTpCd') === '30') {
509
+            this.afflInfo.setAfflShop();
510
+        }
467 511
     },
468
-    isValid: function(formId) {
469
-        var isValid = false;
470
-        $(formId).find('input, select, checkbox, textarea').each(function(k) {
471
-            if($(this).data('check-required')) {
472
-                var arry = $(this).data('check-required').split(',');
473
-                isValid = itp_fn_form_validate(formId, '#' + $(this).attr('id'), arry, undefined);
474
-                if(!isValid) return false;
475
-            }
512
+    action: function () {
513
+        var _this = this;
514
+        // 가맹점 조회 버튼 클릭
515
+        $('#ITP_BTN_OPER06010_SEARCH_AFFL_SHOP').one('click', function() {
516
+            _this.popup('L');
517
+        });
518
+        // 가맹점 텍스트 삭제 버튼 클릭
519
+        $('#ITP_BTN_OPER06010_DELETE_AFFL_SHOP').one('click', function() {
520
+            $('#ITP_FORM_OPER06010_SEARCH_AFFL_SHOP_ID').val('');
521
+            $('#ITP_FORM_OPER06010_SEARCH_AFFL_SHOP_NM').val('');
522
+            $('select#ITP_FORM_OPER06010_SEARCH_BRAND_ID option').remove();
476 523
         });
477
-        return isValid;
524
+    },
525
+    afflInfo: {
526
+        setAfflShop: function() {
527
+            var _this = this;
528
+            this.afflShopId 	= fn_make_user_info.get('afflShopId');
529
+            this.afflShopNm 	= fn_make_user_info.get('afflShopNm');
530
+            $('#ITP_FORM_OPER06010_SEARCH_AFFL_SHOP_ID').val(_this.afflShopId);
531
+            $('#ITP_FORM_OPER06010_SEARCH_AFFL_SHOP_NM').val(_this.afflShopNm);
532
+            $('#ITP_BTN_OPER06010_SEARCH_AFFL_SHOP').attr('disabled', true);
533
+            $('#ITP_BTN_OPER06010_DELETE_AFFL_SHOP').attr('disabled', true);
534
+
535
+            var callbackFn = (result) => {
536
+                var brandList = [];
537
+                $.each(result.gridRows, function(i, item) {
538
+                    brandList.push({'brandId': item.brandId, 'brandNm': item.brandNm});
539
+                });
540
+                fn_make_select_brand(brandList, 'ITP_FORM_OPER06010_SEARCH_BRAND_ID', true, '선택');
541
+            };
542
+            var param = {'afflShopId': _this.afflShopId};
543
+            fn_ajax_call(BRAND_POP_GRID_LIST, JSON.stringify(param), callbackFn, 'POST');
544
+        }
545
+    },
546
+    popup: function (view) {
547
+        // 팝업
548
+        var popFn = function(rowDataPop) {
549
+            // console.log(rowDataPop);
550
+            if(rowDataPop.AFFL_SHOP) {
551
+                $('#ITP_FORM_OPER06010_SEARCH_AFFL_SHOP_ID').val(rowDataPop.AFFL_SHOP.afflShopId);
552
+                $('#ITP_FORM_OPER06010_SEARCH_AFFL_SHOP_NM').val(rowDataPop.AFFL_SHOP.afflShopNm);
553
+            }
554
+            if(rowDataPop.AFFL_BRAND) {
555
+                fn_make_select_brand(rowDataPop.AFFL_BRAND, 'ITP_FORM_OPER06010_SEARCH_BRAND_ID', true, '선택');
556
+            }
557
+        };
558
+        fn_call_popup('biz', 'BIZPOP_AFFL_SHOP', '#ITP_ASIDE', popFn, null, 'S');
478 559
     }
479 560
 };