|
@@ -21,11 +21,6 @@ const OPER02010_DETAIL_GRID_LIST = '#ITP_OPER02010_DETAIL_jqGrid_list';
|
21
|
21
|
const OPER02010_DETAIL_GRID_PAGER = '#ITP_OPER02010_DETAIL_jqGridPager';
|
22
|
22
|
const OPER02010_DETAIL_GRID_EMPTY = '#ITP_OPER02010_DETAIL_jqGridEmpty';
|
23
|
23
|
|
24
|
|
-const OPER02010_BRAND_GRID_ID = '#ITP_OPER02010_BRAND_jqGrid';
|
25
|
|
-const OPER02010_BRAND_GRID_LIST = '#ITP_OPER02010_BRAND_jqGrid_list';
|
26
|
|
-const OPER02010_BRAND_GRID_PAGER = '#ITP_OPER02010_BRAND_jqGridPager';
|
27
|
|
-const OPER02010_BRAND_GRID_EMPTY = '#ITP_OPER02010_BRAND_jqGridEmpty';
|
28
|
|
-
|
29
|
24
|
let ITP_FORM_OPER02010_DETAIL_IS_WRITING = false;
|
30
|
25
|
|
31
|
26
|
let NTICE_SAVE_NTICE = '/api/ntice/save-ntice';
|
|
@@ -86,33 +81,6 @@ const gridColModel = {
|
86
|
81
|
sortable: false, hidden: false
|
87
|
82
|
}
|
88
|
83
|
],
|
89
|
|
- // 상세
|
90
|
|
- view: [
|
91
|
|
- {
|
92
|
|
- index: 'VIEW_CD', name: 'viewCd',
|
93
|
|
- label: ITP_MSG_LOCALE.label.viewCd,
|
94
|
|
- width: '10', fixed: false, align: 'center',
|
95
|
|
- sortable: false, hidden: true
|
96
|
|
- },
|
97
|
|
- {
|
98
|
|
- index: 'NTICE_NO', name: 'nticeNo',
|
99
|
|
- label: ITP_MSG_LOCALE.label.notiNo,
|
100
|
|
- width: '10', fixed: false, align: 'center',
|
101
|
|
- sortable: false, hidden: true
|
102
|
|
- },
|
103
|
|
- {
|
104
|
|
- index: 'BRAND_ID', name: 'userId',
|
105
|
|
- label: ITP_MSG_LOCALE.label.userId,
|
106
|
|
- width: '20', fixed: false, align: 'center',
|
107
|
|
- sortable: false, editable: false, edittype: 'text'
|
108
|
|
- },
|
109
|
|
- {
|
110
|
|
- index: 'BRAND_NM', name: 'userNm',
|
111
|
|
- label: ITP_MSG_LOCALE.label.userName,
|
112
|
|
- width: '30', fixed: false, align: 'center',
|
113
|
|
- sortable: false, editable: false, edittype: 'text'
|
114
|
|
- }
|
115
|
|
- ],
|
116
|
84
|
detail: [
|
117
|
85
|
{
|
118
|
86
|
index: 'VIEW_CD', name: 'viewCd',
|
|
@@ -200,6 +168,8 @@ let pageObj = {
|
200
|
168
|
},
|
201
|
169
|
ready: function () {
|
202
|
170
|
listObj.init();
|
|
171
|
+ // 가맹점 조회
|
|
172
|
+ afflShopObj.init();
|
203
|
173
|
}
|
204
|
174
|
},
|
205
|
175
|
event: {
|
|
@@ -298,77 +268,65 @@ let pageObj = {
|
298
|
268
|
$('#ITP_AJAX_OPER02010_DETAIL_CONTAINER').hide();
|
299
|
269
|
$('#ITP_AJAX_OPER02010_VIEW_CONTAINER').show();
|
300
|
270
|
}
|
301
|
|
- }
|
302
|
|
-};
|
303
|
|
-
|
304
|
|
-/*가맹점 조회 Object*/
|
305
|
|
-let afflShopObj = {
|
306
|
|
- init: function() {
|
307
|
|
- (AUTH_TYPE_CD === '10' || AUTH_TYPE_CD === '20') ? this.action() : this.make();
|
308
|
271
|
},
|
309
|
|
- button: function() {
|
310
|
|
- var _this = this;
|
311
|
|
- // 가맹점 조회 버튼 클릭
|
312
|
|
- $('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP').on('click', function() {
|
313
|
|
- _this.popup('L');
|
314
|
|
- });
|
315
|
|
- // 가맹점 텍스트 삭제 버튼 클릭
|
316
|
|
- $('#ITP_FORM_OPER02010_DELETE_AFFL_SHOP').on('click', function() {
|
317
|
|
- $('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP_NM').val('');
|
318
|
|
- $('select#ITP_FORM_OPER02010_SEARCH_BRAND_ID option').remove();
|
319
|
|
- });
|
320
|
|
- // 신규등록 가맹점 조회 버튼 클릭
|
321
|
|
- // $('#ITP_FORM_OPER02010_DETAIL_SEARCH_AFFL_SHOP').on('click', function() {
|
322
|
|
- // _this.popup('C');
|
323
|
|
- // });
|
324
|
|
- // 신규등록 가맹점 텍스트 삭제 버튼 클릭
|
325
|
|
- $('#ITP_FORM_OPER02010_DETAIL_DELETE_AFFL_SHOP').on('click', function() {
|
326
|
|
- $('#ITP_FORM_OPER02010_DETAIL_SEARCH_AFFL_SHOP_NM').val('');
|
327
|
|
- $('select#ITP_FORM_OPER02010_DETAIL_SEARCH_BRAND_ID option').remove();
|
328
|
|
- $('#ITP_FORM_OPER02010_DETAIL_TARGET_CD option:eq(0)').prop('selected', true);
|
329
|
|
- $('#ITP_FORM_OPER02010_DETAIL_TARGET_CD').trigger('change');
|
330
|
|
- });
|
331
|
|
- },
|
332
|
|
- make: function() {
|
333
|
|
- $('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP').hide();
|
334
|
|
- $('#ITP_FORM_OPER02010_DELETE_AFFL_SHOP').hide();
|
335
|
|
- if(AFFL_SHOP_LIST) {
|
336
|
|
- $('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP_ID').val(AFFL_SHOP_LIST[0].afflShopId);
|
337
|
|
- $('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP_NM').val(AFFL_SHOP_LIST[0].afflShopNm);
|
338
|
|
- }
|
339
|
|
- if(AFFL_BRAND_LIST) {
|
340
|
|
- fn_make_select_brand(AFFL_BRAND_LIST, 'ITP_FORM_OPER02010_SEARCH_BRAND_ID');
|
341
|
|
- }
|
342
|
|
- },
|
343
|
|
- action: function() {
|
344
|
|
- this.button();
|
345
|
|
- },
|
346
|
|
- popup: function (view) {
|
347
|
|
- // 팝업
|
348
|
|
- var popFn = (view === 'C') ? this.callback.create : this.callback.list;
|
349
|
|
- fn_call_popup('biz', 'BIZPOP_AFFL_SHOP', '#ITP_ASIDE', popFn, null, 'S');
|
350
|
|
- },
|
351
|
|
- callback: {
|
352
|
|
- list: function(rowDataPop) {
|
353
|
|
- // console.log(rowDataPop);
|
354
|
|
- if(rowDataPop.AFFL_SHOP) {
|
355
|
|
- $('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP_ID').val(rowDataPop.AFFL_SHOP.afflShopId);
|
356
|
|
- $('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP_NM').val(rowDataPop.AFFL_SHOP.afflShopNm);
|
357
|
|
- }
|
358
|
|
- if(rowDataPop.AFFL_BRAND) {
|
359
|
|
- fn_make_select_brand(rowDataPop.AFFL_BRAND, 'ITP_FORM_OPER02010_SEARCH_BRAND_ID', true, '선택');
|
360
|
|
- // fn_make_select_brand(rowDataPop.AFFL_BRAND, 'ITP_FORM_OPER02010_SEARCH_BRAND_ID');
|
361
|
|
- }
|
|
272
|
+ grid: {
|
|
273
|
+ init: function() {
|
|
274
|
+ this.unload();
|
|
275
|
+ this.load();
|
362
|
276
|
},
|
363
|
|
- create: function(rowDataPop) {
|
364
|
|
- // console.log(rowDataPop);
|
365
|
|
- if(rowDataPop.AFFL_SHOP) {
|
366
|
|
- $('#ITP_FORM_OPER02010_DETAIL_SEARCH_AFFL_SHOP_ID').val(rowDataPop.AFFL_SHOP.afflShopId);
|
367
|
|
- $('#ITP_FORM_OPER02010_DETAIL_SEARCH_AFFL_SHOP_NM').val(rowDataPop.AFFL_SHOP.afflShopNm);
|
368
|
|
- }
|
369
|
|
- if(rowDataPop.AFFL_BRAND) {
|
370
|
|
- fn_make_select_brand(rowDataPop.AFFL_BRAND, 'ITP_FORM_OPER02010_DETAIL_SEARCH_BRAND_ID', true, '선택');
|
371
|
|
- }
|
|
277
|
+ load : function() {
|
|
278
|
+ let param = $('#ITP_FORM_OPER02010_DETAIL').serializeObject();
|
|
279
|
+ param.gridSize = $.jgrid.defaults.rowNum;
|
|
280
|
+ param.pagingYn = false; // 페이지안함
|
|
281
|
+
|
|
282
|
+ var option = {
|
|
283
|
+ gridId: OPER02010_DETAIL_GRID_ID,
|
|
284
|
+ colModel: gridColModel.detail,
|
|
285
|
+ param: JSON.stringify(param),
|
|
286
|
+ url: DOMAIN + NTICE_TARGET_GRID_LIST,
|
|
287
|
+ pager: OPER02010_DETAIL_GRID_PAGER,
|
|
288
|
+ multiselect: true,
|
|
289
|
+ rownumbers: false,
|
|
290
|
+ loadComplete: function(data) {
|
|
291
|
+ itp_fn_grid_load_complete(data, OPER02010_DETAIL_GRID_ID, true, undefined, 'OPER02010_DETAIL');
|
|
292
|
+ },
|
|
293
|
+ onPaging: function(action) {
|
|
294
|
+ var pagingFn = {
|
|
295
|
+ callBack: function(args) {
|
|
296
|
+ $(args).trigger('reloadGrid');
|
|
297
|
+ }
|
|
298
|
+ };
|
|
299
|
+ if (itp_fn_check_grid_is_writing(OPER02010_DETAIL_GRID_ID)) {
|
|
300
|
+ itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, OPER02010_DETAIL_GRID_ID);
|
|
301
|
+ return 'stop';
|
|
302
|
+ } else {
|
|
303
|
+ itp_fn_grid_paging(OPER02010_DETAIL_GRID_ID, action, param);
|
|
304
|
+ }
|
|
305
|
+ },
|
|
306
|
+ onSortCol: function(index, columnIndex, sortOrder) {
|
|
307
|
+ var sortingFn = {
|
|
308
|
+ callBack: function(args) {
|
|
309
|
+ $(args).trigger('reloadGrid');
|
|
310
|
+ }
|
|
311
|
+ };
|
|
312
|
+ if (itp_fn_check_grid_is_writing(OPER02010_DETAIL_GRID_ID)) {
|
|
313
|
+ itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, OPER02010_DETAIL_GRID_ID);
|
|
314
|
+ return 'stop';
|
|
315
|
+ } else {
|
|
316
|
+ itp_fn_grid_sorting(OPER02010_DETAIL_GRID_ID, index, sortOrder);
|
|
317
|
+ }
|
|
318
|
+ }
|
|
319
|
+ };
|
|
320
|
+ itp_fn_grid_make_remote(option);
|
|
321
|
+ },
|
|
322
|
+ clearData : function() {
|
|
323
|
+ $(OPER02010_DETAIL_GRID_ID).jqGrid('clearGridData', true);
|
|
324
|
+ $(OPER02010_DETAIL_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
|
|
325
|
+ $(OPER02010_DETAIL_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
|
|
326
|
+ $(OPER02010_DETAIL_GRID_EMPTY).show();
|
|
327
|
+ },
|
|
328
|
+ unload : function() {
|
|
329
|
+ $.jgrid.gridUnload(OPER02010_DETAIL_GRID_ID);
|
372
|
330
|
}
|
373
|
331
|
}
|
374
|
332
|
};
|
|
@@ -376,8 +334,6 @@ let afflShopObj = {
|
376
|
334
|
/*목록화면 Object*/
|
377
|
335
|
let listObj = {
|
378
|
336
|
init: function () {
|
379
|
|
- // 가맹점 조회
|
380
|
|
- afflShopObj.init();
|
381
|
337
|
// Grid
|
382
|
338
|
this.grid.init();
|
383
|
339
|
},
|
|
@@ -496,7 +452,7 @@ let viewObj = {
|
496
|
452
|
fn_ajax_call(NTICE_INFO_NTICE, param, this.callback, 'GET');
|
497
|
453
|
},
|
498
|
454
|
callback: function (result) {
|
499
|
|
- // console.log(result);
|
|
455
|
+ console.log(result);
|
500
|
456
|
pageObj.switchScreen('VIEW');
|
501
|
457
|
$('#ITP_FORM_OPER02010_VIEW #ITP_FORM_OPER02010_VIEW_USER_ID').val(result.nticeNo);
|
502
|
458
|
$('#ITP_FORM_OPER02010_VIEW .fnNticeTitl').text(result.nticeTitl);
|
|
@@ -529,7 +485,7 @@ let viewObj = {
|
529
|
485
|
|
530
|
486
|
var option = {
|
531
|
487
|
gridId: OPER02010_VIEW_GRID_ID,
|
532
|
|
- colModel: gridColModel.view,
|
|
488
|
+ colModel: gridColModel.detail,
|
533
|
489
|
param: JSON.stringify(param),
|
534
|
490
|
url: DOMAIN + NTICE_TARGET_GRID_LIST,
|
535
|
491
|
pager: OPER02010_VIEW_GRID_PAGER,
|
|
@@ -653,66 +609,7 @@ let modifyObj = {
|
653
|
609
|
|
654
|
610
|
// 리스트 조회
|
655
|
611
|
createObj.form.init();
|
656
|
|
- modifyObj.grid.init();
|
657
|
|
- },
|
658
|
|
- grid: {
|
659
|
|
- init: function() {
|
660
|
|
- this.unload();
|
661
|
|
- this.load();
|
662
|
|
- },
|
663
|
|
- load : function() {
|
664
|
|
- let param = $('#ITP_FORM_OPER02010_DETAIL').serializeObject();
|
665
|
|
- param.gridSize = $.jgrid.defaults.rowNum;
|
666
|
|
- param.pagingYn = false; // 페이지안함
|
667
|
|
-
|
668
|
|
- var option = {
|
669
|
|
- gridId: OPER02010_DETAIL_GRID_ID,
|
670
|
|
- colModel: gridColModel.detail,
|
671
|
|
- param: JSON.stringify(param),
|
672
|
|
- url: DOMAIN + NTICE_TARGET_GRID_LIST,
|
673
|
|
- pager: OPER02010_DETAIL_GRID_PAGER,
|
674
|
|
- multiselect: true,
|
675
|
|
- loadComplete: function(data) {
|
676
|
|
- itp_fn_grid_load_complete(data, OPER02010_DETAIL_GRID_ID, true, undefined, 'OPER02010_DETAIL');
|
677
|
|
- },
|
678
|
|
- onPaging: function(action) {
|
679
|
|
- var pagingFn = {
|
680
|
|
- callBack: function(args) {
|
681
|
|
- $(args).trigger('reloadGrid');
|
682
|
|
- }
|
683
|
|
- };
|
684
|
|
- if (itp_fn_check_grid_is_writing(OPER02010_DETAIL_GRID_ID)) {
|
685
|
|
- itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, OPER02010_DETAIL_GRID_ID);
|
686
|
|
- return 'stop';
|
687
|
|
- } else {
|
688
|
|
- itp_fn_grid_paging(OPER02010_DETAIL_GRID_ID, action, param);
|
689
|
|
- }
|
690
|
|
- },
|
691
|
|
- onSortCol: function(index, columnIndex, sortOrder) {
|
692
|
|
- var sortingFn = {
|
693
|
|
- callBack: function(args) {
|
694
|
|
- $(args).trigger('reloadGrid');
|
695
|
|
- }
|
696
|
|
- };
|
697
|
|
- if (itp_fn_check_grid_is_writing(OPER02010_DETAIL_GRID_ID)) {
|
698
|
|
- itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, OPER02010_DETAIL_GRID_ID);
|
699
|
|
- return 'stop';
|
700
|
|
- } else {
|
701
|
|
- itp_fn_grid_sorting(OPER02010_DETAIL_GRID_ID, index, sortOrder);
|
702
|
|
- }
|
703
|
|
- }
|
704
|
|
- };
|
705
|
|
- itp_fn_grid_make_remote(option);
|
706
|
|
- },
|
707
|
|
- clearData : function() {
|
708
|
|
- $(OPER02010_DETAIL_GRID_ID).jqGrid('clearGridData', true);
|
709
|
|
- $(OPER02010_DETAIL_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
|
710
|
|
- $(OPER02010_DETAIL_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
|
711
|
|
- $(OPER02010_DETAIL_GRID_EMPTY).show();
|
712
|
|
- },
|
713
|
|
- unload : function() {
|
714
|
|
- $.jgrid.gridUnload(OPER02010_DETAIL_GRID_ID);
|
715
|
|
- }
|
|
612
|
+ pageObj.grid.init();
|
716
|
613
|
}
|
717
|
614
|
};
|
718
|
615
|
|
|
@@ -720,14 +617,12 @@ let modifyObj = {
|
720
|
617
|
let createObj = {
|
721
|
618
|
init: function () {
|
722
|
619
|
this.form.init();
|
723
|
|
- this.button.init();
|
724
|
620
|
this.load();
|
725
|
621
|
},
|
726
|
622
|
form: {
|
727
|
623
|
init: function () {
|
728
|
624
|
this.selectbox();
|
729
|
625
|
this.checkbox();
|
730
|
|
- this.button();
|
731
|
626
|
},
|
732
|
627
|
selectbox: function () {
|
733
|
628
|
// 브랜드 selectbox 선택
|
|
@@ -757,27 +652,13 @@ let createObj = {
|
757
|
652
|
$('#ITP_FORM_OPER02010_TARGET').find('input:checkbox').off('change').on('change', function() {
|
758
|
653
|
$(this).next().val($(this).is(':checked') ? 'Y' : '');
|
759
|
654
|
});
|
760
|
|
- },
|
761
|
|
- button: function() {
|
762
|
|
- // 신규등록 가맹점 조회 버튼 클릭
|
763
|
|
- $('#ITP_FORM_OPER02010_DETAIL_SEARCH_AFFL_SHOP').off('click').on('click', function() {
|
764
|
|
- afflShopObj.popup('C');
|
765
|
|
- });
|
766
|
|
- // 신규등록 가맹점 텍스트 삭제 버튼 클릭
|
767
|
|
- $('#ITP_FORM_OPER02010_DETAIL_DELETE_AFFL_SHOP').off('click').on('click', function() {
|
768
|
|
- $('#ITP_FORM_OPER02010_DETAIL_SEARCH_AFFL_SHOP_NM').val('');
|
769
|
|
- $('select#ITP_FORM_OPER02010_DETAIL_SEARCH_BRAND_ID option').remove();
|
770
|
|
- $('#ITP_FORM_OPER02010_DETAIL_TARGET_CD option:eq(0)').prop('selected', true);
|
771
|
|
- $('#ITP_FORM_OPER02010_DETAIL_TARGET_CD').trigger('change');
|
772
|
|
- });
|
773
|
655
|
}
|
774
|
656
|
},
|
775
|
657
|
button: {
|
776
|
|
- init: function() {
|
777
|
|
- },
|
778
|
658
|
addRow: function() {
|
779
|
659
|
// 팝업
|
780
|
660
|
var popFn = function(rowDataPop) {
|
|
661
|
+ console.log(rowDataPop);
|
781
|
662
|
// 기존등록 사용자ID
|
782
|
663
|
var exists = '';
|
783
|
664
|
const rowData = $(OPER02010_DETAIL_GRID_ID).getRowData();
|
|
@@ -831,6 +712,7 @@ let createObj = {
|
831
|
712
|
}
|
832
|
713
|
}
|
833
|
714
|
});
|
|
715
|
+ $('#ITP_FORM_OPER02010_DETAIL_TARGET_CD').attr('disabled', false);
|
834
|
716
|
let param = $(formId).serializeObject();
|
835
|
717
|
param.gridInsertData = gridInsertData;
|
836
|
718
|
param.gridUpdateData = gridUpdateData;
|
|
@@ -867,64 +749,68 @@ let createObj = {
|
867
|
749
|
itp_fn_set_file_upload('ITP_OPER02010_DETAIL_UPLOAD', 'notice', true, false, 'OPER02010', fileArgs);
|
868
|
750
|
|
869
|
751
|
// 권한정보 리스트 조회
|
870
|
|
- this.grid.init();
|
871
|
|
- },
|
872
|
|
- grid: {
|
873
|
|
- init: function() {
|
874
|
|
- this.unload();
|
875
|
|
- this.load();
|
876
|
|
- },
|
877
|
|
- load: function() {
|
878
|
|
- let param = $('#ITP_FORM_OPER02010_DETAIL').serializeObject();
|
879
|
|
- param.gridSize = $.jgrid.defaults.rowNum;
|
880
|
|
- param.pagingYn = false; // 페이지안함
|
|
752
|
+ pageObj.grid.init();
|
|
753
|
+ }
|
|
754
|
+};
|
881
|
755
|
|
882
|
|
- var option = {
|
883
|
|
- gridId: OPER02010_DETAIL_GRID_ID,
|
884
|
|
- colModel: gridColModel.detail,
|
885
|
|
- param: JSON.stringify(param),
|
886
|
|
- url: DOMAIN + NTICE_TARGET_GRID_LIST,
|
887
|
|
- pager: OPER02010_DETAIL_GRID_PAGER,
|
888
|
|
- loadComplete: function(data) {
|
889
|
|
- itp_fn_grid_load_complete(data, OPER02010_DETAIL_GRID_ID, true, undefined, 'OPER02010_DETAIL');
|
890
|
|
- },
|
891
|
|
- onPaging: function(action) {
|
892
|
|
- var pagingFn = {
|
893
|
|
- callBack: function(args) {
|
894
|
|
- $(args).trigger('reloadGrid');
|
895
|
|
- }
|
896
|
|
- };
|
897
|
|
- if (itp_fn_check_grid_is_writing(OPER02010_DETAIL_GRID_ID)) {
|
898
|
|
- itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, OPER02010_DETAIL_GRID_ID);
|
899
|
|
- return 'stop';
|
900
|
|
- } else {
|
901
|
|
- itp_fn_grid_paging(OPER02010_DETAIL_GRID_ID, action, param);
|
902
|
|
- }
|
903
|
|
- },
|
904
|
|
- onSortCol: function(index, columnIndex, sortOrder) {
|
905
|
|
- var sortingFn = {
|
906
|
|
- callBack: function(args) {
|
907
|
|
- $(args).trigger('reloadGrid');
|
908
|
|
- }
|
909
|
|
- };
|
910
|
|
- if (itp_fn_check_grid_is_writing(OPER02010_DETAIL_GRID_ID)) {
|
911
|
|
- itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, OPER02010_DETAIL_GRID_ID);
|
912
|
|
- return 'stop';
|
913
|
|
- } else {
|
914
|
|
- itp_fn_grid_sorting(OPER02010_DETAIL_GRID_ID, index, sortOrder);
|
915
|
|
- }
|
916
|
|
- }
|
917
|
|
- };
|
918
|
|
- itp_fn_grid_make_remote(option);
|
919
|
|
- },
|
920
|
|
- clearData : function() {
|
921
|
|
- $(OPER02010_DETAIL_GRID_ID).jqGrid('clearGridData', true);
|
922
|
|
- $(OPER02010_DETAIL_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
|
923
|
|
- $(OPER02010_DETAIL_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
|
924
|
|
- $(OPER02010_DETAIL_GRID_EMPTY).show();
|
925
|
|
- },
|
926
|
|
- unload : function() {
|
927
|
|
- $.jgrid.gridUnload(OPER02010_DETAIL_GRID_ID);
|
|
756
|
+/*가맹점 조회 Object*/
|
|
757
|
+let afflShopObj = {
|
|
758
|
+ init: function() {
|
|
759
|
+ (AUTH_TYPE_CD === '10' || AUTH_TYPE_CD === '20') ? this.action() : this.make();
|
|
760
|
+ },
|
|
761
|
+ button: function() {
|
|
762
|
+ var _this = this;
|
|
763
|
+ // 가맹점 조회 버튼 클릭
|
|
764
|
+ $('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP_BTN').on('click', function() {
|
|
765
|
+ _this.popup('L');
|
|
766
|
+ });
|
|
767
|
+ // 가맹점 텍스트 삭제 버튼 클릭
|
|
768
|
+ $('#ITP_FORM_OPER02010_DELETE_AFFL_SHOP_BTN').on('click', function() {
|
|
769
|
+ $('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP_ID').val('');
|
|
770
|
+ $('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP_NM').val('');
|
|
771
|
+ $('select#ITP_FORM_OPER02010_SEARCH_BRAND_ID option').remove();
|
|
772
|
+ });
|
|
773
|
+ // 신규등록 가맹점 조회 버튼 클릭
|
|
774
|
+ $('#ITP_FORM_OPER02010_DETAIL_SEARCH_AFFL_SHOP').on('click', function() {
|
|
775
|
+ _this.popup('C');
|
|
776
|
+ });
|
|
777
|
+ // 신규등록 가맹점 텍스트 삭제 버튼 클릭
|
|
778
|
+ $('#ITP_FORM_OPER02010_DETAIL_DELETE_AFFL_SHOP').on('click', function() {
|
|
779
|
+ $('#ITP_FORM_OPER02010_DETAIL_AFFL_SHOP_ID').val('');
|
|
780
|
+ $('#ITP_FORM_OPER02010_DETAIL_AFFL_SHOP_NM').val('');
|
|
781
|
+ $('select#ITP_FORM_OPER02010_DETAIL_BRAND_ID option').remove();
|
|
782
|
+ $('#ITP_FORM_OPER02010_DETAIL_TARGET_CD option:eq(0)').prop('selected', true);
|
|
783
|
+ $('#ITP_FORM_OPER02010_DETAIL_TARGET_CD').trigger('change');
|
|
784
|
+ });
|
|
785
|
+ },
|
|
786
|
+ make: function() {
|
|
787
|
+ $('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP').hide();
|
|
788
|
+ $('#ITP_FORM_OPER02010_DELETE_AFFL_SHOP').hide();
|
|
789
|
+ if(AFFL_SHOP_LIST) {
|
|
790
|
+ $('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP_ID').val(AFFL_SHOP_LIST[0].afflShopId);
|
|
791
|
+ $('#ITP_FORM_OPER02010_SEARCH_AFFL_SHOP_NM').val(AFFL_SHOP_LIST[0].afflShopNm);
|
|
792
|
+ }
|
|
793
|
+ if(AFFL_BRAND_LIST) {
|
|
794
|
+ fn_make_select_brand(AFFL_BRAND_LIST, 'ITP_FORM_OPER02010_SEARCH_BRAND_ID');
|
928
|
795
|
}
|
|
796
|
+ },
|
|
797
|
+ action: function() {
|
|
798
|
+ this.button();
|
|
799
|
+ },
|
|
800
|
+ popup: function (view) {
|
|
801
|
+ // 팝업
|
|
802
|
+ var popFn = function(rowDataPop) {
|
|
803
|
+ console.log(rowDataPop);
|
|
804
|
+ var id = (view === 'C') ? 'ITP_FORM_OPER02010_DETAIL' : 'ITP_FORM_OPER02010_SEARCH';
|
|
805
|
+ console.log(id);
|
|
806
|
+ if(rowDataPop.AFFL_SHOP) {
|
|
807
|
+ $('#'+ id + '_AFFL_SHOP_ID').val(rowDataPop.AFFL_SHOP.afflShopId);
|
|
808
|
+ $('#'+ id + '_AFFL_SHOP_NM').val(rowDataPop.AFFL_SHOP.afflShopNm);
|
|
809
|
+ }
|
|
810
|
+ if(rowDataPop.AFFL_BRAND) {
|
|
811
|
+ fn_make_select_brand(rowDataPop.AFFL_BRAND, id + '_BRAND_ID', true, '선택');
|
|
812
|
+ }
|
|
813
|
+ };
|
|
814
|
+ fn_call_popup('biz', 'BIZPOP_AFFL_SHOP', '#ITP_ASIDE', popFn, null, 'S');
|
929
|
815
|
}
|
930
|
|
-};
|
|
816
|
+};
|