|
@@ -27,16 +27,106 @@ const SYSTEM07010_GRID_EMPTY = '#ITP_SYSTEM07010_jqGridEmpty';
|
27
|
27
|
|
28
|
28
|
|
29
|
29
|
/*API URL*/
|
30
|
|
-
|
31
|
30
|
let API_VERINFO_DETAIL_GRID_LIST = '/api/verinfo/detail-grid-list';
|
32
|
31
|
let API_VERINFO_INFO_LASTVER = '/api/verinfo/info-lastver';
|
33
|
32
|
let API_VERINFO_INFO_VERINFO = '/api/verinfo/info-verinfo';
|
34
|
|
-let API_VERINFO_SAVE_LASTVER = '/api/verinfo/save-verinfo';
|
35
|
|
-let API_VERINFO_DEL_LASTVER = '/api/verinfo/del-verinfo';
|
|
33
|
+let API_VERINFO_SAVE_VERINFO = '/api/verinfo/save-verinfo';
|
|
34
|
+let API_VERINFO_DEL_VERINFO = '/api/verinfo/del-verinfo';
|
|
35
|
+
|
|
36
|
+/*변수*/
|
|
37
|
+let gridId = 0;
|
|
38
|
+let spanId;
|
|
39
|
+
|
|
40
|
+/*앱버전 상세보기 그리드 함수*/
|
|
41
|
+function viewAppInfo(cellvalue, options, rowObject) {
|
|
42
|
+ gridId ++;
|
|
43
|
+ spanId = cellvalue;
|
|
44
|
+ return '<span id="'+cellvalue+'" style="cursor:pointer;" onclick="clickVer(' + gridId + ')" value="'+cellvalue+'">' + cellvalue + '</span>';
|
|
45
|
+}
|
|
46
|
+
|
|
47
|
+/*앱버전 클릭 발생 이벤트 함수*/
|
|
48
|
+function clickVer(num) {
|
|
49
|
+ let ids = $(SYSTEM07010_GRID_ID).jqGrid('getDataIDs');
|
|
50
|
+ for (var i = 0; i < ids.length; i++) {
|
|
51
|
+ if ((num - 1) == i) {
|
|
52
|
+ let rowData = $(SYSTEM07010_GRID_ID).jqGrid('getRowData', ids[i]);
|
|
53
|
+ rowData.appVer = spanId;
|
|
54
|
+ fn_call_popup('biz', 'BIZPOP_VERSION', '#ITP_ASIDE', null, rowData, 'S');
|
|
55
|
+ }
|
|
56
|
+ }
|
|
57
|
+ gridId = 0;
|
|
58
|
+}
|
|
59
|
+
|
|
60
|
+/*앱버전 삭제 그리드 함수*/
|
|
61
|
+function delAppInfo(cellvalue, options, rowObject) {
|
|
62
|
+ return '<span id="delete" style="cursor:pointer;" onclick="deleteApp(' + gridId + ')">삭제</span>';
|
|
63
|
+}
|
|
64
|
+
|
|
65
|
+/*앱버전 삭제 함수*/
|
|
66
|
+function deleteApp(num) {
|
|
67
|
+ let ids = $(SYSTEM07010_GRID_ID).jqGrid('getDataIDs');
|
|
68
|
+ for (var i = 0; i < ids.length; i++) {
|
|
69
|
+ if ((num - 1) == i) {
|
|
70
|
+ let rowData = $(SYSTEM07010_GRID_ID).jqGrid('getRowData', ids[i]);
|
|
71
|
+ rowData.appVer = spanId;
|
|
72
|
+ ;
|
|
73
|
+ var confirmFn = {
|
|
74
|
+ callBack: function() {
|
|
75
|
+ let param = {};
|
|
76
|
+ param.appNo = rowData.appNo
|
|
77
|
+ var searchFn = function() {
|
|
78
|
+ listObj.grid.search();
|
|
79
|
+ };
|
|
80
|
+ fn_ajax_call(API_VERINFO_DEL_VERINFO, param, searchFn, 'GET');
|
|
81
|
+ }
|
|
82
|
+ };
|
|
83
|
+ itp_fn_modal_confirm(ITP_MSG_LOCALE.message.form.deleteData, confirmFn, null);
|
|
84
|
+ }
|
|
85
|
+ }
|
|
86
|
+ gridId = 0;
|
|
87
|
+}
|
|
88
|
+
|
36
|
89
|
|
37
|
90
|
/*화면 Grid Object*/
|
38
|
91
|
const gridColModel = {
|
39
|
|
- list: [],
|
|
92
|
+ list: [
|
|
93
|
+ {
|
|
94
|
+ index: 'VIEW_CD', name: 'viewCd',
|
|
95
|
+ label: ITP_MSG_LOCALE.label.viewCd,
|
|
96
|
+ width: '10', fixed: false, align: 'center',
|
|
97
|
+ sortable: false, hidden: true
|
|
98
|
+ },
|
|
99
|
+ {
|
|
100
|
+ index: 'APP_NO', name: 'appNo',
|
|
101
|
+ label: '앱번호',
|
|
102
|
+ width: '10', fixed: false, align: 'center',
|
|
103
|
+ sortable: false, hidden: true
|
|
104
|
+ },
|
|
105
|
+ {
|
|
106
|
+ index: 'APP_VER', name: 'appVer',
|
|
107
|
+ label: '앱버전',
|
|
108
|
+ width: '10', fixed: false, align: 'center',
|
|
109
|
+ sortable: false, hidden: false, formatter: viewAppInfo
|
|
110
|
+ },
|
|
111
|
+ {
|
|
112
|
+ index: 'DES_VER', name: 'desVer',
|
|
113
|
+ label: '버전설명',
|
|
114
|
+ width: '10', fixed: false, align: 'center',
|
|
115
|
+ sortable: false, hidden: false
|
|
116
|
+ },
|
|
117
|
+ {
|
|
118
|
+ index: 'APP_VER_DT', name: 'appVerDt',
|
|
119
|
+ label: '등록일시',
|
|
120
|
+ width: '10', fixed: false, align: 'center',
|
|
121
|
+ sortable: false, hidden: false
|
|
122
|
+ },
|
|
123
|
+ {
|
|
124
|
+ index: 'APP_VER_DEL', name: 'appVerDel',
|
|
125
|
+ label: '삭제',
|
|
126
|
+ width: '10', fixed: false, align: 'center',
|
|
127
|
+ sortable: false, hidden: false, formatter: delAppInfo
|
|
128
|
+ }
|
|
129
|
+ ],
|
40
|
130
|
view: [],
|
41
|
131
|
detail: []
|
42
|
132
|
};
|
|
@@ -50,7 +140,34 @@ let pageObj = {
|
50
|
140
|
},
|
51
|
141
|
ui: {
|
52
|
142
|
init: function () {
|
53
|
|
- }
|
|
143
|
+ this.view();
|
|
144
|
+ this.grid();
|
|
145
|
+ this.ready();
|
|
146
|
+ },
|
|
147
|
+ view: function() {
|
|
148
|
+ // 버튼 권한설정
|
|
149
|
+ fn_proc_btn_auth('SYSTEM07010');
|
|
150
|
+
|
|
151
|
+ // 공통코드 표시
|
|
152
|
+ $('select').each(function() {
|
|
153
|
+ if($(this).data('select-code')) {
|
|
154
|
+ fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
|
|
155
|
+ }
|
|
156
|
+ });
|
|
157
|
+
|
|
158
|
+ // form alert message 주입
|
|
159
|
+ $('input[data-alert-required="ONLYCHK"]').each(function() {
|
|
160
|
+ if($(this).data('alert-msg') === 'address') {
|
|
161
|
+ $(this).data('alert-msg', ITP_MSG_LOCALE.message.form.emptyAddr);
|
|
162
|
+ }
|
|
163
|
+ });
|
|
164
|
+ },
|
|
165
|
+ grid: function() {
|
|
166
|
+
|
|
167
|
+ },
|
|
168
|
+ ready: function() {
|
|
169
|
+ listObj.init();
|
|
170
|
+ }
|
54
|
171
|
},
|
55
|
172
|
event: {
|
56
|
173
|
init: function () {
|
|
@@ -58,10 +175,28 @@ let pageObj = {
|
58
|
175
|
},
|
59
|
176
|
button: function () {
|
60
|
177
|
// 버튼 클릭 이벤트
|
|
178
|
+ $('button').each(function() {
|
|
179
|
+ var id = $(this).attr('id');
|
|
180
|
+ $(this).on('click', function() {
|
|
181
|
+ switch (id) {
|
|
182
|
+ case 'ITP_BTN_SYSTEM07010_ADD' : listObj.button.create.action(); break; // 조회 버튼 클릭
|
|
183
|
+ }
|
|
184
|
+ });
|
|
185
|
+ });
|
61
|
186
|
}
|
62
|
187
|
},
|
63
|
188
|
switchScreen: function(mode) {
|
|
189
|
+ $('.itp_det_head').find('button[id^="ITP_BTN_SYSTEM07010_"]').each(function(i) {
|
|
190
|
+ $(this).hide();
|
|
191
|
+ });
|
|
192
|
+ $('#ITP_TAB_SYSTEM07010').find('div[id$="_CONTAINER"]').each(function(i) {
|
|
193
|
+ $(this).hide();
|
|
194
|
+ });
|
64
|
195
|
if (mode == 'LIST') { // 목록
|
|
196
|
+ itp_fn_fire_window_resize();
|
|
197
|
+ $('#ITP_AJAX_SYSTEM07010_LIST_CONTAINER').show();
|
|
198
|
+ $('#ITP_FORM_SYSTEM07010_SEARCH').show();
|
|
199
|
+ $('#ITP_BTN_SYSTEM07010_ADD').show();
|
65
|
200
|
} else if(mode == 'ADD') { // 등록
|
66
|
201
|
} else if(mode == 'MODIFY') { // 수정
|
67
|
202
|
} else if(mode == 'VIEW') { // 보기
|
|
@@ -74,21 +209,65 @@ let listObj = {
|
74
|
209
|
init: function () {
|
75
|
210
|
this.grid.init();
|
76
|
211
|
},
|
|
212
|
+ button: {
|
|
213
|
+ create: {
|
|
214
|
+ action: function() {
|
|
215
|
+ $('#ITP_BTN_SYSTEM07010_ADD').on('click', function() {
|
|
216
|
+ listObj.button.create.popup();
|
|
217
|
+ });
|
|
218
|
+ },
|
|
219
|
+ popup: function() {
|
|
220
|
+ const key = {};
|
|
221
|
+ var popFn = function(result) {
|
|
222
|
+ listObj.init();
|
|
223
|
+ }
|
|
224
|
+ fn_call_popup('biz', 'BIZPOP_VERSION', '#ITP_ASIDE', popFn, null, 'S');
|
|
225
|
+ }
|
|
226
|
+ }
|
|
227
|
+ },
|
77
|
228
|
empty: {
|
78
|
229
|
},
|
79
|
230
|
grid: {
|
80
|
231
|
init: function () {
|
|
232
|
+ this.search();
|
81
|
233
|
},
|
|
234
|
+ itp_SYSTEM07010_param: {},
|
|
235
|
+ itp_SYSTEM07010_search: false,
|
82
|
236
|
colModel: gridColModel.list,
|
83
|
237
|
search: function() {
|
|
238
|
+ pageObj.switchScreen('LIST');
|
|
239
|
+ this.unload();
|
|
240
|
+ this.load();
|
84
|
241
|
},
|
85
|
242
|
load: function() {
|
|
243
|
+ let param = {};
|
|
244
|
+ var option = {
|
|
245
|
+ gridId: SYSTEM07010_GRID_ID,
|
|
246
|
+ colModel: gridColModel.list,
|
|
247
|
+ url: DOMAIN + API_VERINFO_DETAIL_GRID_LIST,
|
|
248
|
+ param: param,
|
|
249
|
+ pager: SYSTEM07010_GRID_PAGER,
|
|
250
|
+ rownumbers: true,
|
|
251
|
+ loadComplete: function(data) {
|
|
252
|
+ // console.log(data);
|
|
253
|
+ itp_fn_grid_load_complete(data, SYSTEM07010_GRID_ID, true, 'number', 'SYSTEM07010', listObj.itp_SYSTEM07010_search, listObj.empty, true, data.gridRecords, true);
|
|
254
|
+ },
|
|
255
|
+ onPaging: function(action) {
|
|
256
|
+ itp_fn_grid_paging(SYSTEM07010_GRID_PAGER, action, param);
|
|
257
|
+ }
|
|
258
|
+ };
|
|
259
|
+ itp_fn_grid_make_remote(option);
|
86
|
260
|
},
|
87
|
261
|
reload : function() {
|
88
|
262
|
},
|
89
|
263
|
clearData : function() {
|
|
264
|
+ $(SYSTEM07010_GRID_ID).jqGrid('clearGridData', true);
|
|
265
|
+ $(SYSTEM07010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
|
|
266
|
+ $(SYSTEM07010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
|
|
267
|
+ $(SYSTEM07010_GRID_EMPTY).show();
|
90
|
268
|
},
|
91
|
269
|
unload : function() {
|
|
270
|
+ $.jgrid.gridUnload(SYSTEM07010_GRID_ID);
|
92
|
271
|
}
|
93
|
272
|
}
|
94
|
273
|
};
|
|
@@ -104,24 +283,3 @@ let viewObj = {
|
104
|
283
|
// console.log(result);
|
105
|
284
|
}
|
106
|
285
|
};
|
107
|
|
-
|
108
|
|
-/*수정화면 Object*/
|
109
|
|
-let modifyObj = {
|
110
|
|
- init: function (param) {
|
111
|
|
- this.load(param);
|
112
|
|
- },
|
113
|
|
- load: function() {
|
114
|
|
- },
|
115
|
|
- callback: function (result) {
|
116
|
|
- // console.log(result);
|
117
|
|
- }
|
118
|
|
-};
|
119
|
|
-
|
120
|
|
-/*신규화면 Object*/
|
121
|
|
-let createObj = {
|
122
|
|
- init: function () {
|
123
|
|
- this.load();
|
124
|
|
- },
|
125
|
|
- load: function () {
|
126
|
|
- }
|
127
|
|
-};
|