|
@@ -11,15 +11,15 @@ const OPER02010_GRID_LIST = '#ITP_OPER02010_jqGrid_list';
|
11
|
11
|
const OPER02010_GRID_PAGER = '#ITP_OPER02010_jqGridPager';
|
12
|
12
|
const OPER02010_GRID_EMPTY = '#ITP_OPER02010_jqGridEmpty';
|
13
|
13
|
|
14
|
|
-const OPER02010_VIEW_GRID_ID = '#ITP_OPER02010_VIEW_jqGrid';
|
15
|
|
-const OPER02010_VIEW_GRID_LIST = '#ITP_OPER02010_VIEW_jqGrid_list';
|
16
|
|
-const OPER02010_VIEW_GRID_PAGER = '#ITP_OPER02010_VIEW_jqGridPager';
|
17
|
|
-const OPER02010_VIEW_GRID_EMPTY = '#ITP_OPER02010_VIEW_jqGridEmpty';
|
18
|
|
-
|
19
|
|
-const OPER02010_DETAIL_GRID_ID = '#ITP_OPER02010_DETAIL_jqGrid';
|
20
|
|
-const OPER02010_DETAIL_GRID_LIST = '#ITP_OPER02010_DETAIL_jqGrid_list';
|
21
|
|
-const OPER02010_DETAIL_GRID_PAGER = '#ITP_OPER02010_DETAIL_jqGridPager';
|
22
|
|
-const OPER02010_DETAIL_GRID_EMPTY = '#ITP_OPER02010_DETAIL_jqGridEmpty';
|
|
14
|
+// const OPER02010_VIEW_GRID_ID = '#ITP_OPER02010_VIEW_jqGrid';
|
|
15
|
+// const OPER02010_VIEW_GRID_LIST = '#ITP_OPER02010_VIEW_jqGrid_list';
|
|
16
|
+// const OPER02010_VIEW_GRID_PAGER = '#ITP_OPER02010_VIEW_jqGridPager';
|
|
17
|
+// const OPER02010_VIEW_GRID_EMPTY = '#ITP_OPER02010_VIEW_jqGridEmpty';
|
|
18
|
+//
|
|
19
|
+// const OPER02010_DETAIL_GRID_ID = '#ITP_OPER02010_DETAIL_jqGrid';
|
|
20
|
+// const OPER02010_DETAIL_GRID_LIST = '#ITP_OPER02010_DETAIL_jqGrid_list';
|
|
21
|
+// const OPER02010_DETAIL_GRID_PAGER = '#ITP_OPER02010_DETAIL_jqGridPager';
|
|
22
|
+// const OPER02010_DETAIL_GRID_EMPTY = '#ITP_OPER02010_DETAIL_jqGridEmpty';
|
23
|
23
|
|
24
|
24
|
let ITP_FORM_OPER02010_DETAIL_IS_WRITING = false;
|
25
|
25
|
|
|
@@ -81,7 +81,7 @@ const gridColModel = {
|
81
|
81
|
width: '10', fixed: false, align: 'center',
|
82
|
82
|
sortable: false, hidden: false
|
83
|
83
|
}
|
84
|
|
- ],
|
|
84
|
+ ]/*,
|
85
|
85
|
detail: [
|
86
|
86
|
{
|
87
|
87
|
index: 'VIEW_CD', name: 'viewCd',
|
|
@@ -127,7 +127,7 @@ const gridColModel = {
|
127
|
127
|
width: '30', fixed: false, align: 'center',
|
128
|
128
|
sortable: false, editable: false, edittype: 'text'
|
129
|
129
|
}
|
130
|
|
- ]
|
|
130
|
+ ]*/
|
131
|
131
|
};
|
132
|
132
|
|
133
|
133
|
/********************************************************
|
|
@@ -146,7 +146,6 @@ let pageObj = {
|
146
|
146
|
init: function () {
|
147
|
147
|
this.ui.init();
|
148
|
148
|
this.event.init();
|
149
|
|
- this.fileUpload();
|
150
|
149
|
},
|
151
|
150
|
pageMode: '',
|
152
|
151
|
ui: {
|
|
@@ -168,8 +167,8 @@ let pageObj = {
|
168
|
167
|
// 조회일자 지정
|
169
|
168
|
var now = new Date();
|
170
|
169
|
$('#ITP_TAB_OPER02010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
|
171
|
|
- $('#ITP_FORM_OPER02010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setMonth(now.getMonth() - 1)));
|
172
|
|
- $('#ITP_FORM_OPER02010_SEARCH_TO_DT').datepicker('setDate', new Date());
|
|
170
|
+ $('#ITP_FORM_OPER02010_SEARCH_FROM_DT').datepicker('setDate', new Date(now));
|
|
171
|
+ //$('#ITP_FORM_OPER02010_SEARCH_TO_DT').datepicker('setDate', new Date());
|
173
|
172
|
},
|
174
|
173
|
afflInfo: {
|
175
|
174
|
init: function() {
|
|
@@ -239,8 +238,8 @@ let pageObj = {
|
239
|
238
|
case 'ITP_BTN_OPER02010_CANCELLIST' : createObj.button.cancel(); break; // 취소/목록 버튼
|
240
|
239
|
case 'ITP_BTN_OPER00210_DELETE' : break; // 삭제 버튼
|
241
|
240
|
case 'ITP_BTN_OPER02010_SAVE' : createObj.button.save(); break; // 저장 버튼
|
242
|
|
- case 'ITP_BTN_OPER02010_DETAIL_ADDROW' : pageObj.grid.button.addRow(); break; // 상세:추가버튼
|
243
|
|
- case 'ITP_BTN_OPER02010_DETAIL_DELROW' : pageObj.grid.button.delRow(); break; // 상세:삭제버튼
|
|
241
|
+ // case 'ITP_BTN_OPER02010_DETAIL_ADDROW' : pageObj.grid.button.addRow(); break; // 상세:추가버튼
|
|
242
|
+ // case 'ITP_BTN_OPER02010_DETAIL_DELROW' : pageObj.grid.button.delRow(); break; // 상세:삭제버튼
|
244
|
243
|
}
|
245
|
244
|
});
|
246
|
245
|
});
|
|
@@ -251,13 +250,17 @@ let pageObj = {
|
251
|
250
|
//파일업로드(등록/수정화면)
|
252
|
251
|
var id = 'OPER02010';
|
253
|
252
|
$('#ITP_' + id + '_DETAIL_UPLOAD').empty();
|
|
253
|
+ $('#ITP_' + id + '_DETAIL_LOGO_FILE').empty();
|
|
254
|
+ var removeFn = (param) => {
|
|
255
|
+ $('#ITP_' + id + '_DETAIL_LOGO_FILE').empty();
|
|
256
|
+ };
|
254
|
257
|
const fileArgs = {
|
255
|
258
|
'fileNo': $('#ITP_FORM_' + id + '_DETAIL_FILE_NO').val(),
|
256
|
259
|
'viewCd': $('#ITP_FORM_' + id + '_DETAIL_VIEW_CD').val(),
|
257
|
260
|
'showYn': $('#ITP_' + id + '_DETAIL_UPLOAD').attr('data-show-yn'),
|
258
|
261
|
'fileId': '#ITP_FORM_' + id + '_DETAIL_FILE_NO' //파일번호를 서버에서 받아서 넣을 파일번호 인풋박스 아이디
|
259
|
262
|
};
|
260
|
|
- itp_fn_set_file_upload('ITP_' + id + '_DETAIL_UPLOAD', 'notice', true, false, id, fileArgs);
|
|
263
|
+ itp_fn_set_file_upload('ITP_' + id + '_DETAIL_UPLOAD', 'notice', true, false, id, fileArgs, removeFn);
|
261
|
264
|
},
|
262
|
265
|
switchScreen: function(mode) {
|
263
|
266
|
pageObj.pageMode = mode;
|
|
@@ -299,7 +302,7 @@ let pageObj = {
|
299
|
302
|
$('#ITP_AJAX_OPER02010_VIEW_CONTAINER').show();
|
300
|
303
|
fn_show_btn_auth_array(['#ITP_BTN_OPER02010_MODIFY', '#ITP_BTN_OPER02010_CANCELLIST']);
|
301
|
304
|
}
|
302
|
|
- },
|
|
305
|
+ }/*,
|
303
|
306
|
grid: {
|
304
|
307
|
init: function(mode) {
|
305
|
308
|
this.mode = mode;
|
|
@@ -372,7 +375,7 @@ let pageObj = {
|
372
|
375
|
unload : function() {
|
373
|
376
|
$.jgrid.gridUnload(this.gridId);
|
374
|
377
|
}
|
375
|
|
- }
|
|
378
|
+ }*/
|
376
|
379
|
};
|
377
|
380
|
|
378
|
381
|
/*목록화면 Object*/
|
|
@@ -506,16 +509,11 @@ let viewObj = {
|
506
|
509
|
$('#ITP_FORM_OPER02010_VIEW .fnTargetNm').text(result.targetNm);
|
507
|
510
|
$('#ITP_FORM_OPER02010_VIEW_FILE_NO').val(result.fileNo); //파일번호 셋팅
|
508
|
511
|
|
509
|
|
- //파일업로드(뷰화면)
|
510
|
|
- $('#ITP_OPER02010_VIEW_UPLOAD').empty();
|
511
|
|
- const fileArgs = {
|
512
|
|
- 'fileNo': $('#ITP_FORM_OPER02010_VIEW_FILE_NO').val(),
|
513
|
|
- 'viewCd': $('#ITP_FORM_OPER02010_VIEW_VIEW_CD').val()
|
514
|
|
- };
|
515
|
|
- itp_fn_set_file_upload('ITP_OPER02010_VIEW_UPLOAD', 'notice', true, false, 'OPER02010', fileArgs);
|
|
512
|
+ itp_fn_attach_file.view('ITP_OPER02010_VIEW_UPLOAD', result.fileNoList
|
|
513
|
+ , 'form-control itp_input', 'border:none; top:0px; left:12px; height:100px; width:125px; position:absolute;');
|
516
|
514
|
|
517
|
515
|
// 권한정보 리스트 조회
|
518
|
|
- pageObj.grid.init('VIEW');
|
|
516
|
+ // pageObj.grid.init('VIEW');
|
519
|
517
|
}
|
520
|
518
|
};
|
521
|
519
|
|
|
@@ -572,27 +570,21 @@ let modifyObj = {
|
572
|
570
|
}
|
573
|
571
|
|
574
|
572
|
//파일업로드(수정화면)
|
575
|
|
- $('#ITP_OPER02010_DETAIL_UPLOAD').empty();
|
576
|
|
- const fileArgs = {
|
577
|
|
- 'fileNo': $('#ITP_FORM_OPER02010_DETAIL_FILE_NO').val(),
|
578
|
|
- 'viewCd': $('#ITP_FORM_OPER02010_DETAIL_VIEW_CD').val(),
|
579
|
|
- 'showYn': $('#ITP_OPER02010_DETAIL_UPLOAD').attr('data-show-yn'),
|
580
|
|
- 'fileId': '#ITP_FORM_OPER02010_DETAIL_FILE_NO' //파일번호를 서버에서 받아서 넣을 파일번호 인풋박스 아이디
|
581
|
|
- };
|
582
|
|
- itp_fn_set_file_upload('ITP_OPER02010_DETAIL_UPLOAD', 'notice', true, false, 'OPERATION02010', fileArgs);
|
|
573
|
+ pageObj.fileUpload();
|
583
|
574
|
|
584
|
575
|
// 리스트 조회
|
585
|
|
- createObj.form.init();
|
586
|
|
- pageObj.grid.init('DETAIL');
|
|
576
|
+ // createObj.form.init();
|
|
577
|
+ // pageObj.grid.init('DETAIL');
|
587
|
578
|
}
|
588
|
579
|
};
|
589
|
580
|
|
590
|
581
|
/*신규화면 Object*/
|
591
|
582
|
let createObj = {
|
592
|
583
|
init: function () {
|
593
|
|
- this.form.init();
|
|
584
|
+ pageObj.fileUpload();
|
|
585
|
+ // this.form.init();
|
594
|
586
|
},
|
595
|
|
- form: {
|
|
587
|
+ /*form: {
|
596
|
588
|
init: function () {
|
597
|
589
|
this.selectbox();
|
598
|
590
|
this.checkbox();
|
|
@@ -625,38 +617,35 @@ let createObj = {
|
625
|
617
|
$(this).next().val($(this).is(':checked') ? 'Y' : '');
|
626
|
618
|
});
|
627
|
619
|
}
|
628
|
|
- },
|
|
620
|
+ },*/
|
629
|
621
|
button: {
|
630
|
622
|
save: function() {
|
631
|
623
|
const formId = '#ITP_FORM_OPER02010_DETAIL';
|
632
|
624
|
itp_fn_form_clear_validate(null, formId);
|
633
|
|
- var vali_nticeNo = itp_fn_form_validate(formId, formId + '_NTICE_TITL', ['empty'], undefined);
|
634
|
|
- var vali_nticeDesc = itp_fn_form_validate(formId, formId + '_NTICE_DESC', ['empty'], undefined);
|
635
|
|
- var vali_targetCd = itp_fn_form_validate(formId, formId + '_TARGET_CD', ['empty'], undefined);
|
636
|
625
|
|
637
|
|
- if (vali_nticeNo && vali_nticeDesc && vali_targetCd) {
|
638
|
|
- let gridInsertData = [];
|
639
|
|
- let gridUpdateData = [];
|
640
|
|
- let gridDeleteData = [];
|
641
|
|
- const rowData = $(OPER02010_DETAIL_GRID_ID).getRowData();
|
642
|
|
- const keyValue = $(formId + '_USER_ID').val();
|
643
|
|
- $.each(rowData, function(key, value) {
|
644
|
|
- if (value.viewCd != 'R') {
|
645
|
|
- value.nticeNo = keyValue;
|
646
|
|
- if (value.viewCd == 'C') {
|
647
|
|
- gridInsertData.push(value);
|
648
|
|
- } else if (value.viewCd == 'U') {
|
649
|
|
- gridUpdateData.push(value);
|
650
|
|
- } else if (value.viewCd == 'D') {
|
651
|
|
- gridDeleteData.push(value);
|
652
|
|
- }
|
653
|
|
- }
|
654
|
|
- });
|
|
626
|
+ if (itp_fn_form_event.isValid(formId)) {
|
|
627
|
+ // let gridInsertData = [];
|
|
628
|
+ // let gridUpdateData = [];
|
|
629
|
+ // let gridDeleteData = [];
|
|
630
|
+ // const rowData = $(OPER02010_DETAIL_GRID_ID).getRowData();
|
|
631
|
+ // const keyValue = $(formId + '_USER_ID').val();
|
|
632
|
+ // $.each(rowData, function(key, value) {
|
|
633
|
+ // if (value.viewCd != 'R') {
|
|
634
|
+ // value.nticeNo = keyValue;
|
|
635
|
+ // if (value.viewCd == 'C') {
|
|
636
|
+ // gridInsertData.push(value);
|
|
637
|
+ // } else if (value.viewCd == 'U') {
|
|
638
|
+ // gridUpdateData.push(value);
|
|
639
|
+ // } else if (value.viewCd == 'D') {
|
|
640
|
+ // gridDeleteData.push(value);
|
|
641
|
+ // }
|
|
642
|
+ // }
|
|
643
|
+ // });
|
655
|
644
|
$('#ITP_FORM_OPER02010_DETAIL_TARGET_CD').attr('disabled', false);
|
656
|
645
|
let param = $(formId).serializeObject();
|
657
|
|
- param.gridInsertData = gridInsertData;
|
658
|
|
- param.gridUpdateData = gridUpdateData;
|
659
|
|
- param.gridDeleteData = gridDeleteData;
|
|
646
|
+ // param.gridInsertData = gridInsertData;
|
|
647
|
+ // param.gridUpdateData = gridUpdateData;
|
|
648
|
+ // param.gridDeleteData = gridDeleteData;
|
660
|
649
|
// console.log(JSON.stringify(param));
|
661
|
650
|
|
662
|
651
|
var searhFn = function() {
|
|
@@ -700,7 +689,7 @@ let afflShopObj = {
|
700
|
689
|
$('#ITP_FORM_OPER02010_DETAIL_AFFL_SHOP_NM').val('');
|
701
|
690
|
$('select#ITP_FORM_OPER02010_DETAIL_BRAND_ID option').remove();
|
702
|
691
|
$('#ITP_FORM_OPER02010_DETAIL_TARGET_CD option:eq(0)').prop('selected', true);
|
703
|
|
- $('#ITP_FORM_OPER02010_DETAIL_TARGET_CD').trigger('change');
|
|
692
|
+ // $('#ITP_FORM_OPER02010_DETAIL_TARGET_CD').trigger('change');
|
704
|
693
|
});
|
705
|
694
|
},
|
706
|
695
|
make: function() {
|