浏览代码

js파일제거

whakdo963 2 年之前
父节点
当前提交
f9d19f9fb3

+ 37 - 0
bin/src/main/webapp/app/oper/OPER02010.html

@@ -63,6 +63,26 @@
63 63
 
64 64
 								<section class="itp_form_sec">
65 65
 									<!-- <h4 class="itp_form_tit">공지정보</h4> -->
66
+									<div class="itp_form_in">
67
+										<div class="form-group">
68
+											<label class="col-xs-2 itp_lb">가맹점</label>
69
+											<div class="col-xs-5 itp_ip">
70
+												<div class="col-xs-10 itp_in">
71
+													<select id="ITP_FORM_OPER01010_DETAIL_USER_AFFL_SHOP" class="form-control itp_input" name="afflShop">
72
+														<option value=""></option>
73
+													</select>
74
+												</div>
75
+											</div>
76
+											<label class="col-xs-2 itp_lb">브랜드</label>
77
+											<div class="col-xs-5 itp_ip">
78
+												<div class="col-xs-5 itp_in">
79
+													<select id="ITP_FORM_OPER01010_DETAIL_USER_BRAND_NM" class="form-control itp_input" name="brandNm">
80
+														<option value=""></option>
81
+													</select>
82
+												</div>
83
+											</div>
84
+										</div>
85
+									</div>
66 86
 									<div class="itp_form_in">
67 87
 										<div class="form-group colspan">
68 88
 											<label class="col-xs-2 itp_lb">공지제목</label>
@@ -142,6 +162,23 @@
142 162
 							<div id="ITP_OPER02010_DETAIL_jqGridEmpty" class="itp_no_data"></div>
143 163
 						</div>
144 164
 					</div>
165
+
166
+					<div class="itp_table fix">
167
+						<div class="itp_table_head fix">
168
+							<h4 class="itp_table_tit">* 권한 정보 (* 공지대상이 특정 대상일 일겨웅 추가 버튼 을 통해 사용자 등록 함)</h4>
169
+							<div class="pull-right itp_cicon">
170
+								<button type="button" id="ITP_BTN_OPER02010_BRAND_ADDROW" class="btn btn-primary btn-sm ADB" style="display: inline-block;"><i class="glyphicon glyphicon-plus"></i> 추가</button>
171
+								<button type="button" id="ITP_BTN_OPER02010_BRAND_DELROW" class="btn btn-danger btn-sm DEB"><i class="glyphicon glyphicon-remove"></i> 삭제</button>
172
+							</div>
173
+						</div>
174
+
175
+						<div id="ITP_OPER02010_BRAND_jqGrid_list" class="itp_tb_list">
176
+							<div id="ITP_OPER02010_BRAND_jqGridView" class="itp_views fix"></div>
177
+							<table id="ITP_OPER02010_BRAND_jqGrid"></table>
178
+							<div id="ITP_OPER02010_BRAND_jqGridPager"></div>
179
+							<div id="ITP_OPER02010_BRAND_jqGridEmpty" class="itp_no_data"></div>
180
+						</div>
181
+					</div>
145 182
 				</div>
146 183
 				<div id="ITP_AJAX_OPER02010_VIEW_CONTAINER">
147 184
 					<div class="itp_form itp_type1 fix">

文件差异内容过多而无法显示
+ 2858 - 0
bin/src/main/webapp/js/app/config.js


+ 12 - 0
bin/src/main/webapp/js/app/locales/locale-ko.js

@@ -106,6 +106,17 @@ const ITP_MSG_LOCALE = (function() {
106 106
 			"numbering": "NO",
107 107
 			"inputSelf": "직접입력",
108 108
 			"active": "활성",
109
+			"afflShop": "가맹점",
110
+			"brandNm": "브랜드",
111
+			"notiNo": "공지번호",
112
+			"titlet": "제목",
113
+			"targetNm": "대상구분",
114
+			"viewDt": "노출일",
115
+			"regDt": "등록일",
116
+		},
117
+		"table": {
118
+			"brandId": "브랜드ID",
119
+			"brandNm": "브랜드명",
109 120
 		},
110 121
 		"link": {
111 122
 			"forgotPassword": "비밀번호찾기"
@@ -284,6 +295,7 @@ const ITP_MSG_LOCALE = (function() {
284 295
 		language: data.language,
285 296
 		title: data.title,
286 297
 		label: data.label,
298
+		table: data.table,
287 299
 		link: data.link,
288 300
 		text: data.text,
289 301
 		button: data.button,

+ 1 - 57
src/main/webapp/app/oper/OPER01010.html

@@ -1,8 +1,4 @@
1
-<<<<<<< HEAD
2 1
 <section id="ITP_TAB_OPERATION01010" class="tab-pane active itp_sec">
3
-=======
4
-<section id="ITP_TAB_OPER01010" class="tab-pane active itp_sec">
5
->>>>>>> 7e068594b6570d8195b7eb270380656991bd25c9
6 2
 	<div class="itp_cont">
7 3
 		<article class="itp_detail">
8 4
 			<div class="itp_det_head fix">
@@ -47,19 +43,11 @@
47 43
 						</div>
48 44
 					</div>
49 45
 					<div class="itp_table fix">
50
-<<<<<<< HEAD
51 46
 						<div id="ITP_OPERATION01010_jqGrid_list" class="itp_tb_list itp_gType1" data-total-cnt="${totalCnt}">
52 47
 							<div id="ITP_OPERATION01010_jqGridView" class="itp_views fix"></div>
53 48
 							<table id="ITP_OPERATION01010_jqGrid"></table>
54 49
 							<div id="ITP_OPERATION01010_jqGridPager"></div>
55 50
 							<div id="ITP_OPERATION01010_jqGridEmpty" class="itp_no_data"></div>
56
-=======
57
-						<div id="ITP_OPER01010_jqGrid_list" class="itp_tb_list itp_gType1" data-total-cnt="${totalCnt}">
58
-							<div id="ITP_OPER01010_jqGridView" class="itp_views fix"></div>
59
-							<table id="ITP_OPER01010_jqGrid"></table>
60
-							<div id="ITP_OPER01010_jqGridPager"></div>
61
-							<div id="ITP_OPER01010_jqGridEmpty" class="itp_no_data"></div>
62
->>>>>>> 7e068594b6570d8195b7eb270380656991bd25c9
63 51
 						</div>
64 52
 					</div>
65 53
 				</div>
@@ -72,24 +60,6 @@
72 60
 								<section class="itp_form_sec">
73 61
 									<!-- <h4 class="itp_form_tit">사용자정보 현재 테스트중</h4> -->
74 62
 									<div class="itp_form_in">
75
-										<div class="form-group">
76
-											<label class="col-xs-2 itp_lb">가맹점</label>
77
-											<div class="col-xs-4 itp_ip">
78
-												<div class="col-xs-5 itp_in">
79
-													<select id="ITP_FORM_OPER01010_DETAIL_USER_AFFL_SHOP" class="form-control itp_input" name="afflShop">
80
-														<option value=""></option>
81
-													</select>
82
-												</div>
83
-											</div>
84
-											<label class="col-xs-2 itp_lb">브랜드</label>
85
-											<div class="col-xs-4 itp_ip">
86
-												<div class="col-xs-5 itp_in">
87
-													<select id="ITP_FORM_OPER01010_DETAIL_USER_BRAND_NM" class="form-control itp_input" name="brandNm">
88
-														<option value=""></option>
89
-													</select>
90
-												</div>
91
-											</div>
92
-										</div>
93 63
 										<div class="form-group">
94 64
 											<label class="col-xs-2 itp_lb">사용자명</label>
95 65
 											<div class="col-xs-4 itp_ip">
@@ -127,22 +97,14 @@
127 97
 											<label class="col-xs-2 itp_lb">비밀번호</label>
128 98
 											<div class="col-xs-4 itp_ip">
129 99
 												<div class="col-xs-5 itp_in">
130
-<<<<<<< HEAD
131 100
 													<input type="password" id="ITP_FORM_OPERATION01010_DETAIL_USER_PW" class="form-control itp_input" name="userPw" value="">																								
132
-=======
133
-													<input type="password" id="ITP_FORM_OPER01010_DETAIL_USER_PW" class="form-control itp_input" name="userPw" value="">
134
->>>>>>> 7e068594b6570d8195b7eb270380656991bd25c9
135 101
 												</div>
136 102
 												<button type="button" id="ITP_BTN_OPERATION01010_RESET_PW" class="btn btn-danger btn-xs PWC" style="margin: 3px 0px 0px 3px;">비밀번호 초기화</button>
137 103
 											</div>
138 104
 											<label class="col-xs-2 itp_lb">핸드폰번호</label>
139 105
 											<div class="col-xs-4 itp_ip">
140 106
 												<div class="col-xs-5 itp_in">
141
-<<<<<<< HEAD
142 107
 													<input type="text" id="ITP_FORM_OPERATION01010_DETAIL_TEL_NO" class="form-control itp_input" name="telNo" value="">
143
-=======
144
-													<input type="text" id="ITP_FORM_OPER01010_DETAIL_TEL_NO" class="form-control itp_input" name="telNo" value="">
145
->>>>>>> 7e068594b6570d8195b7eb270380656991bd25c9
146 108
 												</div>
147 109
 											</div>
148 110
 										</div>
@@ -169,21 +131,13 @@
169 131
 											<div class="col-xs-4 itp_ip">
170 132
 												<div class="col-xs-5 itp_in fnLastLoginDt"></div>
171 133
 											</div>
172
-										</div>
134
+										</div>									
173 135
 									</div>
174
-<<<<<<< HEAD
175 136
 								</section>								
176 137
 							</form>
177 138
 						</div>
178 139
 					</div>
179 140
 					
180
-=======
181
-								</section>
182
-							</form>
183
-						</div>
184
-					</div>
185
-
186
->>>>>>> 7e068594b6570d8195b7eb270380656991bd25c9
187 141
 					<div class="itp_table fix">
188 142
 						<div class="itp_table_head fix">
189 143
 							<!-- <h4 class="itp_table_tit">* 권한정보</h4> -->
@@ -211,16 +165,6 @@
211 165
 								<section class="itp_form_sec">
212 166
 									<h4 class="itp_form_tit">사용자정보</h4>
213 167
 									<div class="itp_form_in">
214
-										<div class="form-group">
215
-											<label class="col-xs-2 itp_lb">가맹점</label>
216
-											<div class="col-xs-4 itp_ip">
217
-												<div class="col-xs-5 itp_in fnAfflShop"></div>
218
-											</div>
219
-											<label class="col-xs-2 itp_lb">브랜드</label>
220
-											<div class="col-xs-4 itp_ip">
221
-												<div class="col-xs-5 itp_in fnBrandNm"></div>
222
-											</div>
223
-										</div>
224 168
 										<div class="form-group">
225 169
 											<label class="col-xs-2 itp_lb">사용자명</label>
226 170
 											<div class="col-xs-4 itp_ip">

+ 0 - 653
src/main/webapp/js/app/oper/ITP_OPER01010.js

@@ -1,653 +0,0 @@
1
-
2
-const OPER01010_GRID_ID = '#ITP_OPER01010_jqGrid';
3
-const OPER01010_GRID_LIST = '#ITP_OPER01010_jqGrid_list';
4
-const OPER01010_GRID_PAGER = '#ITP_OPER01010_jqGridPager';
5
-const OPER01010_GRID_EMPTY = '#ITP_OPER01010_jqGridEmpty';
6
-
7
-const OPER01010_VIEW_GRID_ID = '#ITP_OPER01010_VIEW_jqGrid';
8
-const OPER01010_VIEW_GRID_LIST = '#ITP_OPER01010_VIEW_jqGrid_list';
9
-const OPER01010_VIEW_GRID_PAGER = '#ITP_OPER01010_VIEW_jqGridPager';
10
-const OPER01010_VIEW_GRID_EMPTY = '#ITP_OPER01010_VIEW_jqGridEmpty';
11
-
12
-const OPER01010_DETAIL_GRID_ID = '#ITP_OPER01010_DETAIL_jqGrid';
13
-const OPER01010_DETAIL_GRID_LIST = '#ITP_OPER01010_DETAIL_jqGrid_list';
14
-const OPER01010_DETAIL_GRID_PAGER = '#ITP_OPER01010_DETAIL_jqGridPager';
15
-const OPER01010_DETAIL_GRID_EMPTY = '#ITP_OPER01010_DETAIL_jqGridEmpty';
16
-
17
-let ITP_FORM_OPER01010_DETAIL_IS_DUPLICATE = false;
18
-let ITP_FORM_OPER01010_DETAIL_IS_WRITING = false;
19
-
20
-let USER_DETAIL_GRID_LIST = '/api/user/detail-grid-list';
21
-let USER_USERAUTH_GRID_LIST = '/api/user/userauth-grid-list';
22
-let USER_INFO_USER = '/api/user/info-user';
23
-let USER_SAVE_USER = '/api/user/save-user';
24
-let USER_CHECK_DUPLICATE = '/api/user/check-duplicate';
25
-let USER_INTI_USERPW = '/api/user/inti-userpw';
26
-
27
-require(['config'], function() {
28
-	require([
29
-		'jquery'
30
-	], function($) {
31
-		// 버튼 권한설정
32
-		fn_proc_btn_auth('OPER01010');
33
-		// 공통코드 표시
34
-		fn_make_select(CODE_LIST, 'USER_STAT_CD', 'ITP_FORM_OPER01010_SEARCH_USER_STAT_CD');
35
-		fn_make_select(CODE_LIST, 'USER_STAT_CD', 'ITP_FORM_OPER01010_DETAIL_USER_STAT_CD', true, '선택');
36
-		
37
-		// 조회일자 지정
38
-		var now = new Date();
39
-		$('#ITP_TAB_OPER01010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
40
-		// $('#ITP_FORM_OPER01010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setMonth(now.getMonth() - 1)));
41
-		// $('#ITP_FORM_OPER01010_SEARCH_TO_DT').datepicker('setDate', new Date());
42
-				
43
-		// 그리드				
44
-		itp_fn_jqgrid_resize(OPER01010_GRID_ID, OPER01010_GRID_LIST, 'lg');
45
-		itp_fn_OPER01010_grid.init();
46
-    	itp_fn_fire_window_resize();
47
-
48
-		// 조회    	
49
-    	itp_fn_OPER01010_search();
50
-    	
51
-		// 조회 버튼 클릭
52
-		$('#ITP_BTN_OPER01010_SRH').on('click', function() {
53
-			itp_OPER01010_search = true;
54
-			let param = $('#ITP_FORM_OPER01010_SEARCH').serializeObject();
55
-			param.gridSize = $.jgrid.defaults.rowNum;
56
-			param.gridPage = $.jgrid.defaults.page;
57
-			$(OPER01010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
58
-		});
59
-		
60
-		// 수정 버튼
61
-		$('#ITP_BTN_OPER01010_MODIFY').on('click', function() {
62
-			itp_fn_form_clear_validate(null, '#ITP_FORM_OPER01010_DETAIL');			
63
-			const userIdVal = $('#ITP_FORM_OPER01010_VIEW_USER_ID').val();
64
-			const key = {userId: userIdVal, viewCd: 'R'};
65
-			var param = $.param(key);
66
-			itp_fn_OPER01010_detail(param);	
67
-		});
68
-		
69
-		// 신규등록 버튼
70
-		$('#ITP_BTN_OPER01010_NEWREG').on('click', function() {
71
-			itp_fn_OPER01010_switch_screen('ADD');			
72
-			itp_fn_form_clear_validate(null, '#ITP_FORM_OPER01010_DETAIL');				
73
-			// 권한정보 리스트 조회
74
-			itp_fn_OPER01010_detail_grid.unload();
75
-			itp_fn_OPER01010_detail_grid.callBack();
76
-		});
77
-		
78
-		// 취소/목록 버튼
79
-		$('#ITP_BTN_OPER01010_CANCELLIST').on('click', function() {
80
-			itp_fn_OPER01010_search();
81
-    	});
82
-		
83
-		// 삭제 버튼
84
-		$('#ITP_BTN_OPER01010_DELETE').on('click', function() {
85
-			
86
-		});
87
-		
88
-		// 저장 버튼
89
-		$('#ITP_BTN_OPER01010_SAVE').on('click', function() {			
90
-			const formId = '#ITP_FORM_OPER01010_DETAIL';
91
-			itp_fn_form_clear_validate(null, formId);			
92
-			var vali_userId = itp_fn_form_validate(formId, formId + '_USER_ID', ['empty'], undefined);
93
-			var vali_userStatCd = itp_fn_form_validate(formId, formId + '_USER_STAT_CD', ['empty'], undefined);
94
-			var vali_userNm = itp_fn_form_validate(formId, formId + '_USER_NM', ['empty'], undefined);
95
-			var vali_telNo = itp_fn_form_validate(formId, formId + '_TEL_NO', ['empty'], undefined);
96
-			var vali_email = itp_fn_form_validate(formId, formId + '_EMAIL', ['empty'], undefined);
97
-			var vali_userPw = true;
98
-			var vali_userPwConfirm = true;
99
-			if($('#ITP_FORM_OPER01010_DETAIL_VIEW_CD').val() == 'C') { // 신규
100
-				vali_userPw = itp_fn_form_validate(formId, formId + '_USER_PW', ['empty'], undefined);
101
-				vali_userPwConfirm = itp_fn_form_validate(formId, formId + '_USER_PW_CONFIRM', ['empty'], undefined);	
102
-			}
103
-			if (vali_userId && vali_userStatCd && vali_userNm && vali_userPw && vali_userPwConfirm && vali_telNo && vali_email) {
104
-				if (ITP_FORM_OPER01010_DETAIL_IS_DUPLICATE) {
105
-					itp_fn_modal_duplicate(ITP_MSG_LOCALE.label.userId, formId + '_USER_ID');
106
-				} else {
107
-					let gridInsertData = [];
108
-					let gridUpdateData = [];
109
-					let gridDeleteData = [];
110
-					const rowData = $(OPER01010_DETAIL_GRID_ID).getRowData();
111
-					const keyValue = $(formId + '_USER_ID').val();
112
-					$.each(rowData, function(key, value) {
113
-						if (value.viewCd != 'R') {
114
-							value.userId = keyValue;
115
-							if (value.viewCd == 'C') {
116
-								gridInsertData.push(value);
117
-							} else if (value.viewCd == 'U') {
118
-								gridUpdateData.push(value);
119
-							} else if (value.viewCd == 'D') {
120
-								gridDeleteData.push(value);
121
-							}
122
-						}
123
-					});
124
-					let param = $(formId).serializeObject();
125
-					param.gridInsertData = gridInsertData;
126
-					param.gridUpdateData = gridUpdateData;
127
-					param.gridDeleteData = gridDeleteData;
128
-					//console.log(JSON.stringify(param)); 						
129
-					var searhFn = function() {
130
-						ITP_FORM_OPER01010_DETAIL_IS_WRITING = false;
131
-						itp_fn_OPER01010_search();
132
-					};
133
-					fn_ajax_call(USER_SAVE_USER, JSON.stringify(param), searhFn, 'POST');	
134
-				}
135
-			}
136
-		});		
137
-		
138
-		// 중복체크
139
-		$('#ITP_FORM_OPER01010_DETAIL_DUP').on('click', function() {
140
-			const formId = '#ITP_FORM_OPER01010_DETAIL';
141
-			itp_fn_form_clear_validate(null, formId + '_DETAIL');
142
-			var vali_userId = itp_fn_form_validate(formId + '_DETAIL', formId + '_USER_ID', ['empty'], undefined);
143
-			if (vali_userId) {
144
-				var dupFn = function(result) {
145
-					if (result.code == 'N') {
146
-						ITP_FORM_OPER01010_DETAIL_IS_DUPLICATE = false;
147
-					} else {
148
-						ITP_FORM_OPER01010_DETAIL_IS_DUPLICATE = true;
149
-					}
150
-				};
151
-				const key = {'userId':  $(formId + '_USER_ID').val()};
152
-				const param = $.param(key);
153
-				fn_ajax_call(USER_CHECK_DUPLICATE, param, dupFn, 'GET');
154
-			}
155
-		});
156
-		
157
-		// 상세:비밀번호 초기화
158
-		$('#ITP_BTN_OPER01010_RESET_PW').on('click', function() {
159
-			var resetPwFn = {
160
-				callBack: function(args) {
161
-					const key = {'userId':  $('#ITP_FORM_OPER01010_DETAIL_USER_ID').val()};
162
-					const param = $.param(key);
163
-					fn_ajax_call(USER_INTI_USERPW, param, undefined, 'GET');					
164
-				}
165
-			};
166
-			itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.askResetUserPw, resetPwFn, null);		
167
-		});
168
-		// 상세:추가버튼
169
-		$('#ITP_BTN_OPER01010_DETAIL_ADDROW').on('click', function() {
170
-			// 팝업
171
-			var popFn = function(rowDataPop) {
172
-				// 기존등록 데이터 
173
-				var exists = '';				
174
-				const rowData = $(OPER01010_DETAIL_GRID_ID).getRowData();
175
-				$.each(rowData, function(key, value) {
176
-					exists = exists + value.authNo + ';';
177
-				});
178
-				
179
-				$.each(rowDataPop, function(key, value) {
180
-					if(exists.indexOf(value.authNo) < 0) {
181
-						// 행추가
182
-						$(OPER01010_DETAIL_GRID_ID).jqGrid('addRow', {position: 'last'});
183
-						var rids = $(OPER01010_DETAIL_GRID_ID).jqGrid('getDataIDs');
184
-						var last_row_id = rids[rids.length - 1];
185
-						$(OPER01010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'viewCd', 'C');
186
-						$(OPER01010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'authNo', value.authNo);
187
-						$(OPER01010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'authNm', value.authNm);	
188
-					}
189
-				});
190
-				$(OPER01010_DETAIL_GRID_EMPTY).hide();
191
-			};
192
-			fn_call_popup('comm', 'AUTH_SCH_POPUP', '#ITP_ASIDE', popFn, null, 'S');
193
-		});
194
-		// 상세:삭제버튼
195
-		$('#ITP_BTN_OPER01010_DETAIL_DELROW').on('click', function() {
196
-			itp_fn_grid_del_row(OPER01010_DETAIL_GRID_ID);
197
-		});
198
-		
199
-		$('body').on('click', function(e) {
200
-			var gridId = OPER01010_DETAIL_GRID_ID.replace('#', '');
201
-			var rids = $(OPER01010_DETAIL_GRID_ID).jqGrid('getDataIDs');
202
-			var last_row_id = rids[rids.length - 1];			
203
-			itp_fn_grid_reset_selection(e, last_row_id, gridId, 'OPER01010_DETAIL');
204
-		});
205
-	});
206
-});
207
-
208
-var itp_fn_OPER01010_switch_screen = function(mode) {
209
-	if(mode == 'LIST') { // 목록
210
-		$('#ITP_BTN_OPER01010_MODIFY').hide();
211
-		$('#ITP_BTN_OPER01010_CANCELLIST').hide();
212
-		$('#ITP_BTN_OPER01010_DELETE').hide();
213
-		$('#ITP_BTN_OPER01010_SAVE').hide();
214
-		fn_show_btn_auth('#ITP_BTN_OPER01010_SRH');
215
-		fn_show_btn_auth('#ITP_BTN_OPER01010_NEWREG');
216
-		
217
-		$('#ITP_AJAX_OPER01010_LIST_CONTAINER').show();
218
-		$('#ITP_AJAX_OPER01010_DETAIL_CONTAINER').hide();		
219
-		$('#ITP_AJAX_OPER01010_VIEW_CONTAINER').hide();
220
-	} else if(mode == 'ADD') { // 등록
221
-		ITP_FORM_OPER01010_DETAIL_IS_DUPLICATE = true;
222
-	
223
-		$('#ITP_BTN_OPER01010_SRH').hide();
224
-		$('#ITP_BTN_OPER01010_MODIFY').hide();
225
-		$('#ITP_BTN_OPER01010_NEWREG').hide();
226
-		$('#ITP_BTN_OPER01010_DELETE').hide();
227
-		$('#ITP_BTN_OPER01010_RESET_PW').hide();
228
-		fn_show_btn_auth('#ITP_BTN_OPER01010_CANCELLIST');
229
-		fn_show_btn_auth('#ITP_BTN_OPER01010_SAVE');
230
-		
231
-		$('#ITP_AJAX_OPER01010_LIST_CONTAINER').hide();
232
-		$('#ITP_AJAX_OPER01010_DETAIL_CONTAINER').show();
233
-		$('#ITP_AJAX_OPER01010_VIEW_CONTAINER').hide();		
234
-		$('#ITP_FORM_OPER01010_DETAIL_USER_ID').removeAttr('readonly');
235
-		$('#ITP_FORM_OPER01010_DETAIL_DUP').removeAttr('disabled');
236
-		
237
-		$('#ITP_FORM_OPER01010_DETAIL_VIEW_CD').val('C');
238
-		$('#ITP_FORM_OPER01010_DETAIL_USER_NM').val('');
239
-		$('#ITP_FORM_OPER01010_DETAIL_USER_STAT_CD').val('');
240
-		$('#ITP_FORM_OPER01010_DETAIL_USER_ID').val('');
241
-		$('#ITP_FORM_OPER01010_DETAIL_USER_PW').val('');
242
-		$('#ITP_FORM_OPER01010_DETAIL_TEL_NO').val('');
243
-		$('#ITP_FORM_OPER01010_DETAIL_USER_PW_CONFIRM').val('');
244
-		$('#ITP_FORM_OPER01010_DETAIL_EMAIL').val('');
245
-	} else if(mode == 'MODIFY') { // 수정
246
-		$('#ITP_BTN_OPER01010_SRH').hide();
247
-		$('#ITP_BTN_OPER01010_MODIFY').hide();
248
-		$('#ITP_BTN_OPER01010_NEWREG').hide();		
249
-		$('#ITP_BTN_OPER01010_DELETE').hide();
250
-		fn_show_btn_auth('#ITP_BTN_OPER01010_CANCELLIST');
251
-		fn_show_btn_auth('#ITP_BTN_OPER01010_SAVE');
252
-		fn_show_btn_auth('#ITP_BTN_OPER01010_RESET_PW');	
253
-		
254
-		$('#ITP_AJAX_OPER01010_LIST_CONTAINER').hide();
255
-		$('#ITP_AJAX_OPER01010_DETAIL_CONTAINER').show();
256
-		$('#ITP_AJAX_OPER01010_VIEW_CONTAINER').hide();
257
-		$('#ITP_FORM_OPER01010_DETAIL_USER_ID').attr('readonly', true);
258
-		$('#ITP_FORM_OPER01010_DETAIL_DUP').attr('disabled', true);
259
-	} else if(mode == 'VIEW') { // 보기
260
-		$('#ITP_BTN_OPER01010_SRH').hide();
261
-		$('#ITP_BTN_OPER01010_NEWREG').hide();		
262
-		$('#ITP_BTN_OPER01010_DELETE').hide();
263
-		$('#ITP_BTN_OPER01010_SAVE').hide();
264
-		fn_show_btn_auth('#ITP_BTN_OPER01010_MODIFY');
265
-		fn_show_btn_auth('#ITP_BTN_OPER01010_CANCELLIST');
266
-		
267
-		$('#ITP_AJAX_OPER01010_LIST_CONTAINER').hide();
268
-		$('#ITP_AJAX_OPER01010_DETAIL_CONTAINER').hide();
269
-		$('#ITP_AJAX_OPER01010_VIEW_CONTAINER').show();
270
-	}	
271
-};
272
-
273
-var itp_fn_OPER01010_grid = {
274
-	init: function() {
275
-		// 데이터 없을때
276
-		itp_fn_OPER01010_empty.push();
277
-		$(OPER01010_GRID_EMPTY).on('click', function() {
278
-			itp_fn_OPER01010_empty.back();
279
-			itp_OPER01010_param.gridSize = $.jgrid.defaults.rowNum;
280
-			$(OPER01010_GRID_ID).setGridParam({'postData': JSON.stringify(itp_OPER01010_param)}).trigger('reloadGrid');
281
-		});	
282
-	},
283
-	colModel: [
284
-		{
285
-			index: 'AGENCY_NM', name: 'afflShop',
286
-			label: ITP_MSG_LOCALE.label.afflShop, //가맹점
287
-			width: '10', fixed: false, align: 'center',
288
-			sortable: false, hidden: false
289
-		},
290
-		{
291
-			index: 'BRAND_NM', name: 'brandNm',
292
-			label: ITP_MSG_LOCALE.label.brandNm, //브랜드
293
-			width: '13', fixed: false, align: 'center',
294
-			sortable: false, hidden: false
295
-		},
296
-		{
297
-			index: 'USER_ID', name: 'userId',
298
-			label: ITP_MSG_LOCALE.label.userId, //사용자ID
299
-			width: '10', fixed: false, align: 'center',
300
-			sortable: false, hidden: false
301
-		},
302
-		{
303
-			index: 'USER_NM', name: 'userNm',
304
-			label: ITP_MSG_LOCALE.label.userName, //닉네임
305
-			width: '13', fixed: false, align: 'center',
306
-			sortable: false, hidden: false
307
-		},
308
-		{
309
-			index: 'EMAIL', name: 'email',
310
-			label: ITP_MSG_LOCALE.label.idEmail, //아이디(이메일)
311
-			width: '15', fixed: false, align: 'center',
312
-			sortable: false, hidden: false
313
-		},
314
-		{
315
-			index: 'TEL_NO', name: 'telNo',
316
-			label: ITP_MSG_LOCALE.label.telNo, //휴대폰 번호
317
-			width: '10', fixed: false, align: 'center',
318
-			sortable: false, hidden: false
319
-		},
320
-		{
321
-			index: 'USER_STAT_NM', name: 'userStatNm',
322
-			label: ITP_MSG_LOCALE.label.status, //상태
323
-			width: '6', fixed: false, align: 'center',
324
-			sortable: false, hidden: false
325
-		},
326
-		{
327
-			index: 'USER_STAT_DT', name: 'userStatDt',
328
-			label: ITP_MSG_LOCALE.label.statusDt, //상태일시
329
-			width: '10', fixed: false, align: 'center',
330
-			sortable: false, hidden: false
331
-		},
332
-		{
333
-			index: 'ADD_DT', name: 'addDt',
334
-			label: ITP_MSG_LOCALE.label.regDt, //등록일
335
-			width: '10', fixed: false, align: 'center',
336
-			sortable: false, hidden: false
337
-		},
338
-		{
339
-			index: 'LAST_LOGIN_DT', name: 'lastLoginDt',
340
-			label: ITP_MSG_LOCALE.label.lastLogin, //마지막 로그인
341
-			width: '10', fixed: false, align: 'center',
342
-			sortable: false, hidden: false
343
-		}
344
-	],
345
-	callBack: function() {
346
-		let param = $('#ITP_FORM_OPER01010_SEARCH').serializeObject();
347
-		param.gridSize = $.jgrid.defaults.rowNum;	
348
-		$(OPER01010_GRID_ID).jqGrid({
349
-			colModel: this.colModel,
350
-			loadBeforeSend: function(jqXHR) {
351
-			    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
352
-			},
353
-			postData: JSON.stringify(param),
354
-			url: DOMAIN + USER_DETAIL_GRID_LIST,
355
-			pager: OPER01010_GRID_PAGER,
356
-			multiselect: false,
357
-			rownumbers: true, 
358
-			onCellSelect: function(rowId, cellIdx, cellValue) {
359
-				var cm = $(this).jqGrid('getGridParam', 'colModel');
360
-				var colNm = cm[cellIdx].name;
361
-				if (colNm == 'userNm') {
362
-					const userIdVal = $(this).jqGrid('getCell', rowId, 'userId');
363
-					const key = {userId: userIdVal, viewCd: 'R'};
364
-					var param = $.param(key);
365
-					itp_fn_OPER01010_view(param);
366
-				}
367
-		   	},
368
-			loadComplete: function(data) {
369
-				//console.log(JSON.stringify(data));
370
-				itp_fn_grid_load_complete(data, OPER01010_GRID_ID, true, 'number', 'OPER01010', itp_OPER01010_search, itp_fn_OPER01010_empty, true, data.gridRecords, true);
371
-				var ids = $(OPER01010_GRID_ID).getDataIDs();
372
-				$.each(ids, function(idx, rowId) {
373
-					$(OPER01010_GRID_ID).jqGrid('setCell', rowId, 'userNm', '', ITP_GRID_COL_STYLE.link);
374
-				});	
375
-		    },
376
-		    loadError: function(jqXHR, textStatus, errorThrown) {
377
-		    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
378
-		    },
379
-		    onPaging: function(action) {
380
-		    	itp_fn_grid_paging(OPER01010_GRID_ID, action, param);
381
-		    }
382
-		}).navGrid(OPER01010_GRID_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
383
-	},
384
-	clearData : function() {
385
-		$(OPER01010_GRID_ID).jqGrid('clearGridData', true);
386
-		$(OPER01010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
387
-		$(OPER01010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
388
-		$(OPER01010_GRID_EMPTY).show();
389
-	}, 
390
-	unload : function() {
391
-		$.jgrid.gridUnload(OPER01010_GRID_ID); 
392
-	}
393
-};
394
-
395
-var itp_fn_OPER01010_search = function() {
396
-	itp_fn_OPER01010_switch_screen('LIST');	
397
-	itp_fn_OPER01010_grid.unload();
398
-	itp_fn_OPER01010_grid.callBack();
399
-};
400
-
401
-let itp_OPER01010_param = {};
402
-let itp_OPER01010_search = false;
403
-var itp_fn_OPER01010_empty = {
404
-	push: function() {
405
-		let param = $('#ITP_FORM_OPER01010_SEARCH').serializeObject();
406
-		itp_OPER01010_param = param;
407
-	},
408
-	back: function() {
409
-		$('#ITP_FORM_OPER01010_DEVI_TP_CD').val(itp_OPER01010_param.deviTpCd);
410
-		$('#ITP_FORM_OPER01010_ORDER_YN').val(itp_OPER01010_param.orderYn);
411
-		$('#ITP_FORM_OPER01010_ADT_AUTH_CD').val(itp_OPER01010_param.adtAuthCd);
412
-		$('#ITP_FORM_OPER01010_EMAIL_RCV_YN').val(itp_OPER01010_param.emailRcvYn);
413
-		$('#ITP_FORM_OPER01010_MEMB_EXIT_DT').val(itp_OPER01010_param.membExitDt);
414
-		$('#ITP_FORM_OPER01010_FROM_DT').val(itp_OPER01010_param.fromDt);
415
-		$('#ITP_FORM_OPER01010_TO_DT').val(itp_OPER01010_param.toDt);
416
-		$('#ITP_FORM_OPER01010_KEYWORD').val(itp_OPER01010_param.keyword);
417
-	}
418
-};
419
-
420
-var itp_fn_OPER01010_view = function(param) {
421
-	fn_ajax_call(USER_INFO_USER, param, itp_fn_OPER01010_view_callback, 'GET');
422
-};
423
-
424
-var itp_fn_OPER01010_view_callback = function(result) {
425
-	// console.log(result);
426
-	itp_fn_OPER01010_switch_screen('VIEW');
427
-	$('#ITP_FORM_OPER01010_VIEW #ITP_FORM_OPER01010_VIEW_USER_ID').val(result.userId);
428
-	$('#ITP_FORM_OPER01010_VIEW .fnUserNm').text(result.userNm);
429
-	$('#ITP_FORM_OPER01010_VIEW .fnUserStatDt').text(result.userStatDt);
430
-	$('#ITP_FORM_OPER01010_VIEW .fnUserStatNm').text(result.userStatNm);
431
-	$('#ITP_FORM_OPER01010_VIEW .fnUserId').text(result.userId);
432
-	$('#ITP_FORM_OPER01010_VIEW .fnEmail').text(result.email);
433
-	$('#ITP_FORM_OPER01010_VIEW .fnTelNo').text(result.telNo);
434
-	$('#ITP_FORM_OPER01010_VIEW .fnAddDt').text(result.addDt);
435
-	$('#ITP_FORM_OPER01010_VIEW .fnLastLoginDt').text(result.lastLoginDt);
436
-	
437
-	// 권한정보 리스트 조회
438
-	itp_fn_OPER01010_view_grid.unload();
439
-	itp_fn_OPER01010_view_grid.callBack();
440
-};
441
-
442
-var itp_fn_OPER01010_view_grid = {
443
-	init: function() {
444
-	},
445
-	callBack: function() {
446
-		let param = $('#ITP_FORM_OPER01010_VIEW').serializeObject();
447
-		param.gridSize = $.jgrid.defaults.rowNum; 
448
-		param.pagingYn = false; // 페이징안함
449
-		
450
-		$(OPER01010_VIEW_GRID_ID).jqGrid({
451
-			colModel: [
452
-				{
453
-					index: 'VIEW_CD', name: 'viewCd',
454
-					label: ITP_MSG_LOCALE.label.viewCd,
455
-					width: '10', fixed: false, align: 'center',
456
-					sortable: false, hidden: true
457
-				},
458
-				{
459
-					index: 'AUTH_NO', name: 'authNo',
460
-					label: ITP_MSG_LOCALE.label.permitCd,
461
-					width: '20', fixed: false, align: 'center',
462
-					sortable: false, editable: false, edittype: 'text',
463
-					editrules: {required: true}
464
-				},
465
-				{
466
-					index: 'AUTH_NM', name: 'authNm',
467
-					label: ITP_MSG_LOCALE.label.permitName,
468
-					width: '30', fixed: false, align: 'center',
469
-					sortable: true, editable: false, edittype: 'text',
470
-					editrules: {required: true}
471
-				},
472
-				{
473
-					index: 'USE_YN_NM', name: 'useYnNm',
474
-					label: ITP_MSG_LOCALE.label.status,
475
-					width: '10', fixed: false, align: 'center',
476
-					sortable: false, editable: false, edittype: 'text'
477
-				},
478
-				{
479
-					index: 'ADD_DT', name: 'addDt',
480
-					label: ITP_MSG_LOCALE.label.regDt,
481
-					width: '10', fixed: false, align: 'center',
482
-					sortable: false, editable: false, edittype: 'text'
483
-				}
484
-			],
485
-			loadBeforeSend: function(jqXHR) {
486
-			    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
487
-			},
488
-			postData: JSON.stringify(param),
489
-			url: DOMAIN + USER_USERAUTH_GRID_LIST,
490
-			pager: OPER01010_VIEW_GRID_PAGER,
491
-			multiselect: false,
492
-			loadComplete: function(data) {				
493
-				itp_fn_grid_load_complete(data, OPER01010_VIEW_GRID_ID, true, undefined, 'OPER01010_VIEW');
494
-		    },
495
-		    loadError: function(jqXHR, textStatus, errorThrown) {
496
-		    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
497
-		    },
498
-		    onPaging: function(action) {
499
-		    	var pagingFn = {
500
-	    			callBack: function(args) {
501
-	    				$(args).trigger('reloadGrid');
502
-	    			}
503
-	    		};
504
-		    	if (itp_fn_check_grid_is_writing(OPER01010_VIEW_GRID_ID)) {
505
-		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, OPER01010_VIEW_GRID_ID);
506
-		    		return 'stop';
507
-		    	} else {
508
-		    		itp_fn_grid_paging(OPER01010_VIEW_GRID_ID, action, param);
509
-		    	}
510
-		    },
511
-		    onSortCol: function(index, columnIndex, sortOrder) {
512
-		    	var sortingFn = {
513
-	    			callBack: function(args) {
514
-	    				$(args).trigger('reloadGrid');
515
-	    			}
516
-	    		};
517
-		    	if (itp_fn_check_grid_is_writing(OPER01010_VIEW_GRID_ID)) {
518
-		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, OPER01010_VIEW_GRID_ID);
519
-		    		return 'stop';
520
-		    	} else {
521
-		    		itp_fn_grid_sorting(OPER01010_VIEW_GRID_ID, index, sortOrder);
522
-		    	}
523
-		    }
524
-		}).navGrid(OPER01010_VIEW_GRID_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
525
-	},
526
-	clearData : function() {
527
-		$(OPER01010_VIEW_GRID_ID).jqGrid('clearGridData', true);
528
-		$(OPER01010_VIEW_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
529
-		$(OPER01010_VIEW_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
530
-		$(OPER01010_VIEW_GRID_EMPTY).show();
531
-	}, 
532
-	unload : function() {
533
-		$.jgrid.gridUnload(OPER01010_VIEW_GRID_ID); 
534
-	}
535
-};
536
-
537
-var itp_fn_OPER01010_detail = function(param) {
538
-	fn_ajax_call(USER_INFO_USER, param, itp_fn_OPER01010_detail_callback, 'GET');
539
-};
540
-
541
-var itp_fn_OPER01010_detail_callback = function(result) {
542
-	// console.log(result);
543
-	itp_fn_OPER01010_switch_screen('MODIFY');
544
-	$('#ITP_FORM_OPER01010_DETAIL #ITP_FORM_OPER01010_DETAIL_VIEW_CD').val('U');
545
-	$('#ITP_FORM_OPER01010_DETAIL #ITP_FORM_OPER01010_DETAIL_USER_NM').val(result.userNm);
546
-	$('#ITP_FORM_OPER01010_DETAIL #ITP_FORM_OPER01010_DETAIL_USER_STAT_CD').val(result.userStatCd);
547
-	$('#ITP_FORM_OPER01010_DETAIL #ITP_FORM_OPER01010_DETAIL_USER_ID').val(result.userId);
548
-	$('#ITP_FORM_OPER01010_DETAIL .fnUserStatDt').text(result.userStatDt);
549
-	$('#ITP_FORM_OPER01010_DETAIL #ITP_FORM_OPER01010_DETAIL_USER_PW').val(result.userPw);
550
-	$('#ITP_FORM_OPER01010_DETAIL #ITP_FORM_OPER01010_DETAIL_USER_PW_CONFIRM').val(result.userPw);
551
-	$('#ITP_FORM_OPER01010_DETAIL #ITP_FORM_OPER01010_DETAIL_TEL_NO').val(result.telNo);
552
-	$('#ITP_FORM_OPER01010_DETAIL #ITP_FORM_OPER01010_DETAIL_EMAIL').val(result.email);
553
-	$('#ITP_FORM_OPER01010_DETAIL .fnAddDt').text(result.addDt);
554
-	$('#ITP_FORM_OPER01010_DETAIL .fnLastLoginDt').text(result.lastLoginDt);
555
-	
556
-	// 권한정보 리스트 조회
557
-	itp_fn_OPER01010_detail_grid.unload();
558
-	itp_fn_OPER01010_detail_grid.callBack();
559
-};
560
-
561
-var itp_fn_OPER01010_detail_grid = {
562
-	init: function() {
563
-	},
564
-	callBack: function() {
565
-		let param = $('#ITP_FORM_OPER01010_DETAIL').serializeObject();
566
-		param.gridSize = $.jgrid.defaults.rowNum; 
567
-		param.pagingYn = false; // 페이지안함 
568
-		
569
-		$(OPER01010_DETAIL_GRID_ID).jqGrid({
570
-			colModel: [
571
-				{
572
-					index: 'VIEW_CD', name: 'viewCd',
573
-					label: ITP_MSG_LOCALE.label.viewCd,
574
-					width: '10', fixed: false, align: 'center',
575
-					sortable: false, hidden: true
576
-				},
577
-				{
578
-					index: 'AUTH_NO', name: 'authNo',
579
-					label: ITP_MSG_LOCALE.label.permitCd,
580
-					width: '20', fixed: false, align: 'center',
581
-					sortable: false, editable: false, edittype: 'text',
582
-					editrules: {required: true}
583
-				},
584
-				{
585
-					index: 'AUTH_NM', name: 'authNm',
586
-					label: ITP_MSG_LOCALE.label.permitName,
587
-					width: '30', fixed: false, align: 'center',
588
-					sortable: true, editable: false, edittype: 'text',
589
-					editrules: {required: true}
590
-				},
591
-				{
592
-					index: 'USE_YN_NM', name: 'useYnNm',
593
-					label: ITP_MSG_LOCALE.label.status,
594
-					width: '10', fixed: false, align: 'center',
595
-					sortable: false, editable: false, edittype: 'text'
596
-				},
597
-				{
598
-					index: 'ADD_DT', name: 'addDt',
599
-					label: ITP_MSG_LOCALE.label.regDt,
600
-					width: '10', fixed: false, align: 'center',
601
-					sortable: false, editable: false, edittype: 'text'
602
-				}
603
-			],
604
-			loadBeforeSend: function(jqXHR) {
605
-			    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
606
-			},
607
-			postData: JSON.stringify(param),
608
-			url: DOMAIN + USER_USERAUTH_GRID_LIST,
609
-			pager: OPER01010_DETAIL_GRID_PAGER,
610
-			loadComplete: function(data) {				
611
-				itp_fn_grid_load_complete(data, OPER01010_DETAIL_GRID_ID, true, undefined, 'OPER01010_DETAIL');
612
-		    },
613
-		    loadError: function(jqXHR, textStatus, errorThrown) {
614
-		    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
615
-		    },
616
-		    onPaging: function(action) {
617
-		    	var pagingFn = {
618
-	    			callBack: function(args) {
619
-	    				$(args).trigger('reloadGrid');
620
-	    			}
621
-	    		};
622
-		    	if (itp_fn_check_grid_is_writing(OPER01010_DETAIL_GRID_ID)) {
623
-		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, OPER01010_DETAIL_GRID_ID);
624
-		    		return 'stop';
625
-		    	} else {
626
-		    		itp_fn_grid_paging(OPER01010_DETAIL_GRID_ID, action, param);
627
-		    	}
628
-		    },
629
-		    onSortCol: function(index, columnIndex, sortOrder) {
630
-		    	var sortingFn = {
631
-	    			callBack: function(args) {
632
-	    				$(args).trigger('reloadGrid');
633
-	    			}
634
-	    		};
635
-		    	if (itp_fn_check_grid_is_writing(OPER01010_DETAIL_GRID_ID)) {
636
-		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, OPER01010_DETAIL_GRID_ID);
637
-		    		return 'stop';
638
-		    	} else {
639
-		    		itp_fn_grid_sorting(OPER01010_DETAIL_GRID_ID, index, sortOrder);
640
-		    	}
641
-		    }
642
-		}).navGrid(OPER01010_DETAIL_GRID_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
643
-	},
644
-	clearData : function() {
645
-		$(OPER01010_DETAIL_GRID_ID).jqGrid('clearGridData', true);
646
-		$(OPER01010_DETAIL_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
647
-		$(OPER01010_DETAIL_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
648
-		$(OPER01010_DETAIL_GRID_EMPTY).show();
649
-	}, 
650
-	unload : function() {
651
-		$.jgrid.gridUnload(OPER01010_DETAIL_GRID_ID); 
652
-	}
653
-};

+ 0 - 633
src/main/webapp/js/app/oper/ITP_OPER02010.js

@@ -1,633 +0,0 @@
1
-
2
-const OPER02010_GRID_ID = '#ITP_OPER02010_jqGrid';
3
-const OPER02010_GRID_LIST = '#ITP_OPER02010_jqGrid_list';
4
-const OPER02010_GRID_PAGER = '#ITP_OPER02010_jqGridPager';
5
-const OPER02010_GRID_EMPTY = '#ITP_OPER02010_jqGridEmpty';
6
-
7
-const OPER02010_VIEW_GRID_ID = '#ITP_OPER02010_VIEW_jqGrid';
8
-const OPER02010_VIEW_GRID_LIST = '#ITP_OPER02010_VIEW_jqGrid_list';
9
-const OPER02010_VIEW_GRID_PAGER = '#ITP_OPER02010_VIEW_jqGridPager';
10
-const OPER02010_VIEW_GRID_EMPTY = '#ITP_OPER02010_VIEW_jqGridEmpty';
11
-
12
-const OPER02010_DETAIL_GRID_ID = '#ITP_OPER02010_DETAIL_jqGrid';
13
-const OPER02010_DETAIL_GRID_LIST = '#ITP_OPER02010_DETAIL_jqGrid_list';
14
-const OPER02010_DETAIL_GRID_PAGER = '#ITP_OPER02010_DETAIL_jqGridPager';
15
-const OPER02010_DETAIL_GRID_EMPTY = '#ITP_OPER02010_DETAIL_jqGridEmpty';
16
-
17
-const OPER02010_BRAND_GRID_ID = '#ITP_OPER02010_BRAND_jqGrid';
18
-const OPER02010_BRAND_GRID_LIST = '#ITP_OPER02010_BRAND_jqGrid_list';
19
-const OPER02010_BRAND_GRID_PAGER = '#ITP_OPER02010_BRAND_jqGridPager';
20
-const OPER02010_BRAND_GRID_EMPTY = '#ITP_OPER02010_BRAND_jqGridEmpty';
21
-
22
-let ITP_FORM_OPER02010_DETAIL_IS_WRITING = false;
23
-
24
-let NTICE_SAVE_NTICE = '/api/ntice/save-ntice';
25
-let NTICE_DETAIL_GRID_LIST = '/api/ntice/detail-grid-list';
26
-let NTICE_INFO_NTICE = '/api/ntice/info-ntice';
27
-let NTICE_TARGET_GRID_LIST = '/api/ntice/target-grid-list';
28
-
29
-require(['config'], function() {
30
-	require([
31
-		'jquery',
32
-		'jquery.bootstrap.fileUpload' //파일 업로드가 있는 페이지에서 로딩
33
-	], function($) {
34
-		// 버튼 권한설정
35
-		fn_proc_btn_auth('OPER02010');
36
-		// 공통코드 표시
37
-		fn_make_select(CODE_LIST, 'TARGET_CD', 'ITP_FORM_OPER02010_DETAIL_TARGET_CD', true, '선택');
38
-
39
-		// 조회일자 지정
40
-		var now = new Date();
41
-		$('#ITP_TAB_OPER02010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
42
-		$('#ITP_FORM_OPER02010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setMonth(now.getMonth() - 1)));
43
-		$('#ITP_FORM_OPER02010_SEARCH_TO_DT').datepicker('setDate', new Date());
44
-
45
-		// 그리드
46
-		itp_fn_jqgrid_resize(OPER02010_GRID_ID, OPER02010_GRID_LIST, 'lg');
47
-		itp_fn_OPER02010_grid.init();
48
-    	itp_fn_fire_window_resize();
49
-
50
-		// 조회
51
-    	itp_fn_OPER02010_search();
52
-
53
-		// 조회 버튼 클릭
54
-		$('#ITP_BTN_OPER02010_SRH').on('click', function() {
55
-			itp_OPER02010_search = true;
56
-			let param = $('#ITP_FORM_OPER02010_SEARCH').serializeObject();
57
-			param.gridSize = $.jgrid.defaults.rowNum;
58
-			param.gridPage = $.jgrid.defaults.page;
59
-			$(OPER02010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
60
-		});
61
-
62
-		// 수정 버튼
63
-		$('#ITP_BTN_OPER02010_MODIFY').on('click', function() {
64
-			itp_fn_form_clear_validate(null, '#ITP_FORM_OPER02010_DETAIL');
65
-			const nticeNoVal = $('#ITP_FORM_OPER02010_VIEW_USER_ID').val();
66
-			const key = {nticeNo: nticeNoVal, viewCd: 'R'};
67
-			var param = $.param(key);
68
-			itp_fn_OPER02010_detail(param);
69
-		});
70
-
71
-		// 신규등록 버튼
72
-		$('#ITP_BTN_OPER02010_NEWREG').on('click', function() {
73
-			itp_fn_OPER02010_switch_screen('ADD');
74
-			itp_fn_form_clear_validate(null, '#ITP_FORM_OPER02010_DETAIL');
75
-
76
-			//파일업로드(등록화면)
77
-			$('#ITP_FORM_OPER02010_DETAIL_FILE_NO').val('');
78
-			$('#ITP_OPER02010_DETAIL_UPLOAD').empty();
79
-			const fileArgs = {
80
-				'fileNo': $('#ITP_FORM_OPER02010_DETAIL_FILE_NO').val(),
81
-				'viewCd': $('#ITP_FORM_OPER02010_DETAIL_VIEW_CD').val(),
82
-				'showYn': $('#ITP_OPER02010_DETAIL_UPLOAD').attr('data-show-yn'),
83
-				'fileId': '#ITP_FORM_OPER02010_DETAIL_FILE_NO' //파일번호를 서버에서 받아서 넣을 파일번호 인풋박스 아이디
84
-			};
85
-			itp_fn_set_file_upload('ITP_OPER02010_DETAIL_UPLOAD', 'notice', true, false, 'OPER02010', fileArgs);
86
-
87
-			// 권한정보 리스트 조회
88
-			itp_fn_OPER02010_detail_grid.unload();
89
-			itp_fn_OPER02010_detail_grid.callBack();
90
-		});
91
-
92
-		// 취소/목록 버튼
93
-		$('#ITP_BTN_OPER02010_CANCELLIST').on('click', function() {
94
-			itp_fn_OPER02010_search();
95
-    	});
96
-
97
-		// 삭제 버튼
98
-		$('#ITP_BTN_OPER02010_DELETE').on('click', function() {
99
-
100
-		});
101
-
102
-		// 저장 버튼
103
-		$('#ITP_BTN_OPER02010_SAVE').on('click', function() {
104
-			const formId = '#ITP_FORM_OPER02010_DETAIL';
105
-			itp_fn_form_clear_validate(null, formId);
106
-			var vali_nticeNo = itp_fn_form_validate(formId, formId + '_NTICE_TITL', ['empty'], undefined);
107
-			var vali_nticeDesc = itp_fn_form_validate(formId, formId + '_NTICE_DESC', ['empty'], undefined);
108
-			var vali_targetCd = itp_fn_form_validate(formId, formId + '_TARGET_CD', ['empty'], undefined);
109
-
110
-			if (vali_nticeNo && vali_nticeDesc && vali_targetCd) {
111
-				let gridInsertData = [];
112
-				let gridUpdateData = [];
113
-				let gridDeleteData = [];
114
-				const rowData = $(OPER02010_DETAIL_GRID_ID).getRowData();
115
-				const keyValue = $(formId + '_USER_ID').val();
116
-				$.each(rowData, function(key, value) {
117
-					if (value.viewCd != 'R') {
118
-						value.nticeNo = keyValue;
119
-						if (value.viewCd == 'C') {
120
-							gridInsertData.push(value);
121
-						} else if (value.viewCd == 'U') {
122
-							gridUpdateData.push(value);
123
-						} else if (value.viewCd == 'D') {
124
-							gridDeleteData.push(value);
125
-						}
126
-					}
127
-				});
128
-				let param = $(formId).serializeObject();
129
-				param.gridInsertData = gridInsertData;
130
-				param.gridUpdateData = gridUpdateData;
131
-				param.gridDeleteData = gridDeleteData;
132
-				// console.log(JSON.stringify(param));
133
-
134
-				var searhFn = function() {
135
-					ITP_FORM_OPER02010_DETAIL_IS_WRITING = false;
136
-					itp_fn_OPER02010_search();
137
-				};
138
-				fn_ajax_call(NTICE_SAVE_NTICE, JSON.stringify(param), searhFn, 'POST');
139
-			}
140
-		});
141
-
142
-		// 상세:추가버튼
143
-		$('#ITP_BTN_OPER02010_DETAIL_ADDROW').on('click', function() {
144
-			// 팝업
145
-			var popFn = function(rowDataPop) {
146
-				// 기존등록 사용자ID
147
-				var exists = '';
148
-				const rowData = $(OPER02010_DETAIL_GRID_ID).getRowData();
149
-				$.each(rowData, function(key, value) {
150
-					exists = exists + value.userId + ';';
151
-				});
152
-
153
-				$.each(rowDataPop, function(key, value) {
154
-					// console.log(JSON.stringify(value));
155
-					// console.log(exists.indexOf(value.userId));
156
-					if(exists.indexOf(value.userId) < 0) {
157
-						// 행추가
158
-						$(OPER02010_DETAIL_GRID_ID).jqGrid('addRow', {position: 'last'});
159
-						var rids = $(OPER02010_DETAIL_GRID_ID).jqGrid('getDataIDs');
160
-						var last_row_id = rids[rids.length - 1];
161
-						$(OPER02010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'viewCd', 'C');
162
-						$(OPER02010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'userId', value.userId);
163
-						$(OPER02010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'userNm', value.userNm);
164
-					}
165
-				});
166
-				$(OPER02010_DETAIL_GRID_EMPTY).hide();
167
-			};
168
-			fn_call_popup('comm', 'USER_SCH_POPUP', '#ITP_ASIDE', popFn, null, 'S');
169
-		});
170
-		// 상세:삭제버튼
171
-		$('#ITP_BTN_OPER02010_DETAIL_DELROW').on('click', function() {
172
-			itp_fn_grid_del_row(OPER02010_DETAIL_GRID_ID);
173
-		});
174
-
175
-		$('body').on('click', function(e) {
176
-			var gridId = OPER02010_DETAIL_GRID_ID.replace('#', '');
177
-			var rids = $(OPER02010_DETAIL_GRID_ID).jqGrid('getDataIDs');
178
-			var last_row_id = rids[rids.length - 1];
179
-			itp_fn_grid_reset_selection(e, last_row_id, gridId, 'OPER02010_DETAIL');
180
-		});
181
-	});
182
-});
183
-
184
-var itp_fn_OPER02010_switch_screen = function(mode) {
185
-	if(mode == 'LIST') { // 목록
186
-		$('#ITP_BTN_OPER02010_MODIFY').hide();
187
-		$('#ITP_BTN_OPER02010_CANCELLIST').hide();
188
-		$('#ITP_BTN_OPER02010_DELETE').hide();
189
-		$('#ITP_BTN_OPER02010_SAVE').hide();
190
-		fn_show_btn_auth('#ITP_BTN_OPER02010_SRH');
191
-		fn_show_btn_auth('#ITP_BTN_OPER02010_NEWREG');
192
-		
193
-		$('#ITP_AJAX_OPER02010_LIST_CONTAINER').show();
194
-		$('#ITP_AJAX_OPER02010_DETAIL_CONTAINER').hide();
195
-		$('#ITP_AJAX_OPER02010_VIEW_CONTAINER').hide();
196
-	} else if(mode == 'ADD') { // 등록
197
-		$('#ITP_BTN_OPER02010_SRH').hide();
198
-		$('#ITP_BTN_OPER02010_MODIFY').hide();
199
-		$('#ITP_BTN_OPER02010_NEWREG').hide();
200
-		$('#ITP_BTN_OPER02010_DELETE').hide();
201
-		fn_show_btn_auth('#ITP_BTN_OPER02010_CANCELLIST');
202
-		fn_show_btn_auth('#ITP_BTN_OPER02010_SAVE');
203
-		
204
-		$('#ITP_AJAX_OPER02010_LIST_CONTAINER').hide();
205
-		$('#ITP_AJAX_OPER02010_DETAIL_CONTAINER').show();
206
-		$('#ITP_AJAX_OPER02010_VIEW_CONTAINER').hide();
207
-
208
-		$('#ITP_FORM_OPER02010_DETAIL_VIEW_CD').val('C');
209
-		$('#ITP_FORM_OPER02010_DETAIL_NTICE_NO').val('');
210
-		$('#ITP_FORM_OPER02010_DETAIL_NTICE_TITL').val('');
211
-		$('#ITP_FORM_OPER02010_DEL_YN').val('N');
212
-		$('#ITP_FORM_OPER02010_DETAIL_NTICE_DESC').val('');
213
-		$('#ITP_FORM_OPER02010_DETAIL_TARGET_CD').val('');
214
-		$('#ITP_FORM_OPER02010_FROM_DT').datepicker('setDate', new Date());
215
-		$('#ITP_FORM_OPER02010_TO_DT').datepicker('setDate', new Date());
216
-	} else if(mode == 'MODIFY') { // 수정
217
-		$('#ITP_BTN_OPER02010_SRH').hide();
218
-		$('#ITP_BTN_OPER02010_MODIFY').hide();
219
-		$('#ITP_BTN_OPER02010_NEWREG').hide();
220
-		$('#ITP_BTN_OPER02010_DELETE').hide();
221
-		fn_show_btn_auth('#ITP_BTN_OPER02010_CANCELLIST');
222
-		fn_show_btn_auth('#ITP_BTN_OPER02010_SAVE');
223
-		
224
-		$('#ITP_AJAX_OPER02010_LIST_CONTAINER').hide();
225
-		$('#ITP_AJAX_OPER02010_DETAIL_CONTAINER').show();
226
-		$('#ITP_AJAX_OPER02010_VIEW_CONTAINER').hide();
227
-	} else if(mode == 'VIEW') { // 보기
228
-		$('#ITP_BTN_OPER02010_SRH').hide();
229
-		$('#ITP_BTN_OPER02010_NEWREG').hide();
230
-		$('#ITP_BTN_OPER02010_DELETE').hide();
231
-		$('#ITP_BTN_OPER02010_SAVE').hide();
232
-		fn_show_btn_auth('#ITP_BTN_OPER02010_MODIFY');
233
-		fn_show_btn_auth('#ITP_BTN_OPER02010_CANCELLIST');
234
-		
235
-		$('#ITP_AJAX_OPER02010_LIST_CONTAINER').hide();
236
-		$('#ITP_AJAX_OPER02010_DETAIL_CONTAINER').hide();
237
-		$('#ITP_AJAX_OPER02010_VIEW_CONTAINER').show();
238
-	}
239
-};
240
-
241
-var itp_fn_OPER02010_grid = {
242
-	init: function() {
243
-		// 데이터 없을때
244
-		itp_fn_OPER02010_empty.push();
245
-		$(OPER02010_GRID_EMPTY).on('click', function() {
246
-			itp_fn_OPER02010_empty.back();
247
-			itp_OPER02010_param.gridSize = $.jgrid.defaults.rowNum;
248
-			$(OPER02010_GRID_ID).setGridParam({'postData': JSON.stringify(itp_OPER02010_param)}).trigger('reloadGrid');
249
-		});
250
-	},
251
-	callBack: function() {
252
-		let param = $('#ITP_FORM_OPER02010_SEARCH').serializeObject();
253
-		param.gridSize = $.jgrid.defaults.rowNum;
254
-		$(OPER02010_GRID_ID).jqGrid({
255
-			colModel: [
256
-				{
257
-					index: 'NTICE_NO', name: 'nticeNo',
258
-					label: ITP_MSG_LOCALE.label.notiNo, //공지번호
259
-					width: '10', fixed: false, align: 'center',
260
-					sortable: false, hidden: false
261
-				},
262
-				{
263
-					index: 'NTICE_TITL', name: 'nticeTitl',
264
-					label: ITP_MSG_LOCALE.label.titlet, //공지제목
265
-					width: '15', fixed: false, align: 'center',
266
-					sortable: false, hidden: false
267
-				},
268
-				{
269
-					index: 'TARGET_NM', name: 'targetNm',
270
-					label: ITP_MSG_LOCALE.label.targetNm, //공지대상
271
-					width: '10', fixed: false, align: 'center',
272
-					sortable: false, hidden: false
273
-				},
274
-				{
275
-					index: 'NTICE_STAT_NM', name: 'nticeStatNm',
276
-					label: ITP_MSG_LOCALE.label.status, //상태
277
-					width: '6', fixed: false, align: 'center',
278
-					sortable: false, hidden: false
279
-				},
280
-				{
281
-					index: 'NOTI_ST_DAY', name: 'notiStDay',
282
-					label: ITP_MSG_LOCALE.label.viewDt, //노출일
283
-					width: '10', fixed: false, align: 'center',
284
-					sortable: false, hidden: false
285
-				},
286
-				{
287
-					index: 'ADD_DT', name: 'addDt',
288
-					label: ITP_MSG_LOCALE.label.regDt, //등록일
289
-					width: '10', fixed: false, align: 'center',
290
-					sortable: false, hidden: false
291
-				}
292
-			],
293
-			loadBeforeSend: function(jqXHR) {
294
-			    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
295
-			},
296
-			postData: JSON.stringify(param),
297
-			url: DOMAIN + NTICE_DETAIL_GRID_LIST,
298
-			pager: OPER02010_GRID_PAGER,
299
-			multiselect: false,
300
-			rownumbers: true,
301
-			onCellSelect: function(rowId, cellIdx, cellValue) {
302
-				var cm = $(this).jqGrid('getGridParam', 'colModel');
303
-				var colNm = cm[cellIdx].name;
304
-				if (colNm == 'nticeTitl') {
305
-					const nticeNoVal = $(this).jqGrid('getCell', rowId, 'nticeNo');
306
-					const key = {nticeNo: nticeNoVal, viewCd: 'R'};
307
-					var param = $.param(key);
308
-					itp_fn_OPER02010_view(param);
309
-				}
310
-		   	},
311
-			loadComplete: function(data) {
312
-				//console.log(JSON.stringify(data));
313
-				itp_fn_grid_load_complete(data, OPER02010_GRID_ID, true, 'number', 'OPER02010', itp_OPER02010_search, itp_fn_OPER02010_empty, true, data.gridRecords, true);
314
-				var ids = $(OPER02010_GRID_ID).getDataIDs();
315
-				$.each(ids, function(idx, rowId) {
316
-					$(OPER02010_GRID_ID).jqGrid('setCell', rowId, 'nticeTitl', '', ITP_GRID_COL_STYLE.link);
317
-				});
318
-
319
-				if ($('#ITP_CONTAINER').data('openYn') == 'Y') {
320
-					$('#ITP_CONTAINER').data('openYn', 'N');
321
-					const keyNew = {nticeNo: $('#ITP_CONTAINER').data('nticeNo'), viewCd: 'R'};
322
-					var paramNew = $.param(keyNew);
323
-					itp_fn_OPER02010_view(paramNew);
324
-				}
325
-		    },
326
-		    loadError: function(jqXHR, textStatus, errorThrown) {
327
-		    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
328
-		    },
329
-		    onPaging: function(action) {
330
-		    	itp_fn_grid_paging(OPER02010_GRID_ID, action, param);
331
-		    }
332
-		}).navGrid(OPER02010_GRID_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
333
-	},
334
-	clearData : function() {
335
-		$(OPER02010_GRID_ID).jqGrid('clearGridData', true);
336
-		$(OPER02010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
337
-		$(OPER02010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
338
-		$(OPER02010_GRID_EMPTY).show();
339
-	},
340
-	unload : function() {
341
-		$.jgrid.gridUnload(OPER02010_GRID_ID);
342
-	}
343
-};
344
-
345
-var itp_fn_OPER02010_search = function() {
346
-	itp_fn_OPER02010_switch_screen('LIST');
347
-	itp_fn_OPER02010_grid.unload();
348
-	itp_fn_OPER02010_grid.callBack();
349
-};
350
-
351
-let itp_OPER02010_param = {};
352
-let itp_OPER02010_search = false;
353
-var itp_fn_OPER02010_empty = {
354
-	push: function() {
355
-		let param = $('#ITP_FORM_OPER02010_SEARCH').serializeObject();
356
-		itp_OPER02010_param = param;
357
-	},
358
-	back: function() {
359
-		$('#ITP_FORM_OPER02010_DEVI_TP_CD').val(itp_OPER02010_param.deviTpCd);
360
-		$('#ITP_FORM_OPER02010_ORDER_YN').val(itp_OPER02010_param.orderYn);
361
-		$('#ITP_FORM_OPER02010_ADT_AUTH_CD').val(itp_OPER02010_param.adtAuthCd);
362
-		$('#ITP_FORM_OPER02010_EMAIL_RCV_YN').val(itp_OPER02010_param.emailRcvYn);
363
-		$('#ITP_FORM_OPER02010_SMS_RCV_YN').val(itp_OPER02010_param.smsRcvYn);
364
-		$('#ITP_FORM_OPER02010_MEMB_EXIT_DT').val(itp_OPER02010_param.membExitDt);
365
-		$('#ITP_FORM_OPER02010_FROM_DT').val(itp_OPER02010_param.fromDt);
366
-		$('#ITP_FORM_OPER02010_TO_DT').val(itp_OPER02010_param.toDt);
367
-		$('#ITP_FORM_OPER02010_KEYWORD').val(itp_OPER02010_param.keyword);
368
-	}
369
-};
370
-
371
-var itp_fn_OPER02010_view = function(param) {
372
-	fn_ajax_call(NTICE_INFO_NTICE, param, itp_fn_OPER02010_view_callback, 'GET');
373
-};
374
-
375
-var itp_fn_OPER02010_view_callback = function(result) {
376
-	// console.log(result);
377
-	itp_fn_OPER02010_switch_screen('VIEW');
378
-	$('#ITP_FORM_OPER02010_VIEW #ITP_FORM_OPER02010_VIEW_USER_ID').val(result.nticeNo);
379
-	$('#ITP_FORM_OPER02010_VIEW .fnNticeTitl').text(result.nticeTitl);
380
-	$('#ITP_FORM_OPER02010_VIEW .fnNotiDay').text(result.notiStDay+' ~ '+result.notiEdDay);
381
-	$('#ITP_FORM_OPER02010_VIEW .fnDelYn').text(result.delYn);
382
-	$('#ITP_FORM_OPER02010_VIEW .fnNticeDesc').html(result.nticeDesc.replace(/(\n|\r\n)/g, '<br>'));
383
-	$('#ITP_FORM_OPER02010_VIEW .fnTargetNm').text(result.targetNm);
384
-	$('#ITP_FORM_OPER02010_VIEW_FILE_NO').val(result.fileNo); //파일번호 셋팅
385
-
386
-	//파일업로드(뷰화면)
387
-	$('#ITP_OPER02010_VIEW_UPLOAD').empty();
388
-	const fileArgs = {
389
-		'fileNo': $('#ITP_FORM_OPER02010_VIEW_FILE_NO').val(),
390
-		'viewCd': $('#ITP_FORM_OPER02010_VIEW_VIEW_CD').val()
391
-	};
392
-	itp_fn_set_file_upload('ITP_OPER02010_VIEW_UPLOAD', 'notice', true, false, 'OPER02010', fileArgs);
393
-
394
-	// 권한정보 리스트 조회
395
-	itp_fn_OPER02010_view_grid.unload();
396
-	itp_fn_OPER02010_view_grid.callBack();
397
-};
398
-
399
-var itp_fn_OPER02010_view_grid = {
400
-	init: function() {
401
-	},
402
-	callBack: function() {
403
-		let param = $('#ITP_FORM_OPER02010_VIEW').serializeObject();
404
-		param.gridSize = $.jgrid.defaults.rowNum;
405
-		param.pagingYn = false; // 페이징안함
406
-
407
-		$(OPER02010_VIEW_GRID_ID).jqGrid({
408
-			colModel: [
409
-				{
410
-					index: 'VIEW_CD', name: 'viewCd',
411
-					label: ITP_MSG_LOCALE.label.viewCd,
412
-					width: '10', fixed: false, align: 'center',
413
-					sortable: false, hidden: true
414
-				},
415
-				{
416
-					index: 'NTICE_NO', name: 'nticeNo',
417
-					label: ITP_MSG_LOCALE.label.notiNo,
418
-					width: '10', fixed: false, align: 'center',
419
-					sortable: false, hidden: true
420
-				},
421
-				{
422
-					index: 'USER_ID', name: 'userId',
423
-					label: ITP_MSG_LOCALE.label.userId,
424
-					width: '20', fixed: false, align: 'center',
425
-					sortable: false, editable: false, edittype: 'text'
426
-				},
427
-				{
428
-					index: 'USER_NM', name: 'userNm',
429
-					label: ITP_MSG_LOCALE.label.userName,
430
-					width: '30', fixed: false, align: 'center',
431
-					sortable: false, editable: false, edittype: 'text'
432
-				}
433
-			],
434
-			loadBeforeSend: function(jqXHR) {
435
-			    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
436
-			},
437
-			postData: JSON.stringify(param),
438
-			url: DOMAIN + NTICE_TARGET_GRID_LIST,
439
-			pager: OPER02010_VIEW_GRID_PAGER,
440
-			multiselect: false,
441
-			loadComplete: function(data) {
442
-				itp_fn_grid_load_complete(data, OPER02010_VIEW_GRID_ID, true, undefined, 'OPER02010_VIEW');
443
-		    },
444
-		    loadError: function(jqXHR, textStatus, errorThrown) {
445
-		    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
446
-		    },
447
-		    onPaging: function(action) {
448
-		    	var pagingFn = {
449
-	    			callBack: function(args) {
450
-	    				$(args).trigger('reloadGrid');
451
-	    			}
452
-	    		};
453
-		    	if (itp_fn_check_grid_is_writing(OPER02010_VIEW_GRID_ID)) {
454
-		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, OPER02010_VIEW_GRID_ID);
455
-		    		return 'stop';
456
-		    	} else {
457
-		    		itp_fn_grid_paging(OPER02010_VIEW_GRID_ID, action, param);
458
-		    	}
459
-		    },
460
-		    onSortCol: function(index, columnIndex, sortOrder) {
461
-		    	var sortingFn = {
462
-	    			callBack: function(args) {
463
-	    				$(args).trigger('reloadGrid');
464
-	    			}
465
-	    		};
466
-		    	if (itp_fn_check_grid_is_writing(OPER02010_VIEW_GRID_ID)) {
467
-		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, OPER02010_VIEW_GRID_ID);
468
-		    		return 'stop';
469
-		    	} else {
470
-		    		itp_fn_grid_sorting(OPER02010_VIEW_GRID_ID, index, sortOrder);
471
-		    	}
472
-		    }
473
-		}).navGrid(OPER02010_VIEW_GRID_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
474
-	},
475
-	clearData : function() {
476
-		$(OPER02010_VIEW_GRID_ID).jqGrid('clearGridData', true);
477
-		$(OPER02010_VIEW_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
478
-		$(OPER02010_VIEW_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
479
-		$(OPER02010_VIEW_GRID_EMPTY).show();
480
-	},
481
-	unload : function() {
482
-		$.jgrid.gridUnload(OPER02010_VIEW_GRID_ID);
483
-	}
484
-};
485
-
486
-var itp_fn_OPER02010_detail = function(param) {
487
-	fn_ajax_call(NTICE_INFO_NTICE, param, itp_fn_OPER02010_detail_callback, 'GET');
488
-};
489
-
490
-var itp_fn_OPER02010_detail_callback = function(result) {
491
-	// console.log(result);
492
-	itp_fn_OPER02010_switch_screen('MODIFY');
493
-	$('#ITP_FORM_OPER02010_DETAIL #ITP_FORM_OPER02010_DETAIL_VIEW_CD').val('U');
494
-	$('#ITP_FORM_OPER02010_DETAIL #ITP_FORM_OPER02010_DETAIL_NTICE_NO').val(result.nticeNo);
495
-	$('#ITP_FORM_OPER02010_DETAIL #ITP_FORM_OPER02010_DETAIL_NTICE_TITL').val(result.nticeTitl);
496
-	$('#ITP_FORM_OPER02010_DETAIL #ITP_FORM_OPER02010_FROM_DT').val(result.notiStDay);
497
-	$('#ITP_FORM_OPER02010_DETAIL #ITP_FORM_OPER02010_TO_DT').val(result.notiEdDay);
498
-	$('#ITP_FORM_OPER02010_DETAIL #ITP_FORM_OPER02010_DEL_YN').val(result.delYn);
499
-	$('#ITP_FORM_OPER02010_DETAIL #ITP_FORM_OPER02010_DETAIL_NTICE_DESC').val(result.nticeDesc);
500
-	$('#ITP_FORM_OPER02010_DETAIL #ITP_FORM_OPER02010_DETAIL_TARGET_CD').val(result.targetCd);
501
-	$('#ITP_FORM_OPER02010_DETAIL_FILE_NO').val(result.fileNo); //파일번호 셋팅
502
-
503
-	//파일업로드(수정화면)
504
-	$('#ITP_OPER02010_DETAIL_UPLOAD').empty();
505
-	const fileArgs = {
506
-		'fileNo': $('#ITP_FORM_OPER02010_DETAIL_FILE_NO').val(),
507
-		'viewCd': $('#ITP_FORM_OPER02010_DETAIL_VIEW_CD').val(),
508
-		'showYn': $('#ITP_OPER02010_DETAIL_UPLOAD').attr('data-show-yn'),
509
-		'fileId': '#ITP_FORM_OPER02010_DETAIL_FILE_NO' //파일번호를 서버에서 받아서 넣을 파일번호 인풋박스 아이디
510
-	};
511
-	itp_fn_set_file_upload('ITP_OPER02010_DETAIL_UPLOAD', 'notice', true, false, 'OPER02010', fileArgs);
512
-
513
-	// 리스트 조회
514
-	itp_fn_OPER02010_detail_grid.unload();
515
-	itp_fn_OPER02010_detail_grid.callBack();
516
-};
517
-
518
-var itp_fn_OPER02010_detail_grid = {
519
-	init: function() {
520
-	},
521
-	callBack: function() {
522
-		let param = $('#ITP_FORM_OPER02010_DETAIL').serializeObject();
523
-		param.gridSize = $.jgrid.defaults.rowNum;
524
-		param.pagingYn = false; // 페이지안함
525
-
526
-		$(OPER02010_DETAIL_GRID_ID).jqGrid({
527
-			colModel: [
528
-				{
529
-					index: 'VIEW_CD', name: 'viewCd',
530
-					label: ITP_MSG_LOCALE.label.viewCd,
531
-					width: '10', fixed: false, align: 'center',
532
-					sortable: false, hidden: true
533
-				},
534
-				{
535
-					index: 'NTICE_NO', name: 'nticeNo',
536
-					label: ITP_MSG_LOCALE.label.notiNo,
537
-					width: '10', fixed: false, align: 'center',
538
-					sortable: false, hidden: true
539
-				},
540
-				{
541
-					index: 'USER_ID', name: 'userId',
542
-					label: ITP_MSG_LOCALE.label.userId,
543
-					width: '20', fixed: false, align: 'center',
544
-					sortable: false, editable: false, edittype: 'text'
545
-				},
546
-				{
547
-					index: 'USER_NM', name: 'userNm',
548
-					label: ITP_MSG_LOCALE.label.userName,
549
-					width: '30', fixed: false, align: 'center',
550
-					sortable: false, editable: false, edittype: 'text'
551
-				}
552
-			],
553
-			loadBeforeSend: function(jqXHR) {
554
-			    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
555
-			},
556
-			postData: JSON.stringify(param),
557
-			url: DOMAIN + NTICE_TARGET_GRID_LIST,
558
-			pager: OPER02010_DETAIL_GRID_PAGER,
559
-			loadComplete: function(data) {
560
-				itp_fn_grid_load_complete(data, OPER02010_DETAIL_GRID_ID, true, undefined, 'OPER02010_DETAIL');
561
-		    },
562
-		    loadError: function(jqXHR, textStatus, errorThrown) {
563
-		    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
564
-		    },
565
-		    onPaging: function(action) {
566
-		    	var pagingFn = {
567
-	    			callBack: function(args) {
568
-	    				$(args).trigger('reloadGrid');
569
-	    			}
570
-	    		};
571
-		    	if (itp_fn_check_grid_is_writing(OPER02010_DETAIL_GRID_ID)) {
572
-		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, OPER02010_DETAIL_GRID_ID);
573
-		    		return 'stop';
574
-		    	} else {
575
-		    		itp_fn_grid_paging(OPER02010_DETAIL_GRID_ID, action, param);
576
-		    	}
577
-		    },
578
-		    onSortCol: function(index, columnIndex, sortOrder) {
579
-		    	var sortingFn = {
580
-	    			callBack: function(args) {
581
-	    				$(args).trigger('reloadGrid');
582
-	    			}
583
-	    		};
584
-		    	if (itp_fn_check_grid_is_writing(OPER02010_DETAIL_GRID_ID)) {
585
-		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, OPER02010_DETAIL_GRID_ID);
586
-		    		return 'stop';
587
-		    	} else {
588
-		    		itp_fn_grid_sorting(OPER02010_DETAIL_GRID_ID, index, sortOrder);
589
-		    	}
590
-		    }
591
-		}).navGrid(OPER02010_DETAIL_GRID_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
592
-	},
593
-	clearData : function() {
594
-		$(OPER02010_DETAIL_GRID_ID).jqGrid('clearGridData', true);
595
-		$(OPER02010_DETAIL_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
596
-		$(OPER02010_DETAIL_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
597
-		$(OPER02010_DETAIL_GRID_EMPTY).show();
598
-	},
599
-	unload : function() {
600
-		$.jgrid.gridUnload(OPER02010_DETAIL_GRID_ID);
601
-	}
602
-};
603
-
604
-var itp_fn_OPER02010_brand_grid = {
605
-	init: function() {
606
-	},
607
-	colModel: [
608
-		{
609
-			index: 'BRAND_ID', name: 'brandId',
610
-			label: ITP_MSG_LOCALE.table.brandId,
611
-			width: '20', fixed: false, align: 'center',
612
-			sortable: false, editable: false, edittype: 'text'
613
-		},
614
-		{
615
-			index: 'BRAND_NM', name: 'brandNm',
616
-			label: ITP_MSG_LOCALE.table.brandNm,
617
-			width: '30', fixed: false, align: 'center',
618
-			sortable: false, editable: false, edittype: 'text'
619
-		}
620
-	],
621
-	callBack: function() {
622
-
623
-	},
624
-	clearData : function() {
625
-		$(OPER02010_BRAND_GRID_ID).jqGrid('clearGridData', true);
626
-		$(OPER02010_BRAND_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
627
-		$(OPER02010_BRAND_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
628
-		$(OPER02010_BRAND_GRID_EMPTY).show();
629
-	},
630
-	unload : function() {
631
-		$.jgrid.gridUnload(OPER02010_BRAND_GRID_ID);
632
-	}
633
-};

+ 0 - 861
src/main/webapp/js/app/oper/ITP_OPER03010.js

@@ -1,861 +0,0 @@
1
-
2
-const OPER03010_GRID_ID = '#ITP_OPER03010_jqGrid';
3
-const OPER03010_GRID_LIST = '#ITP_OPER03010_jqGrid_list';
4
-const OPER03010_GRID_PAGER = '#ITP_OPER03010_jqGridPager';
5
-const OPER03010_GRID_EMPTY = '#ITP_OPER03010_jqGridEmpty';
6
-
7
-const OPER03010_VIEW_GRID_ID = '#ITP_OPER03010_VIEW_jqGrid';
8
-const OPER03010_VIEW_GRID_LIST = '#ITP_OPER03010_VIEW_jqGrid_list';
9
-const OPER03010_VIEW_GRID_PAGER = '#ITP_OPER03010_VIEW_jqGridPager';
10
-const OPER03010_VIEW_GRID_EMPTY = '#ITP_OPER03010_VIEW_jqGridEmpty';
11
-
12
-const OPER03010_DETAIL_GRID_ID = '#ITP_OPER03010_DETAIL_jqGrid';
13
-const OPER03010_DETAIL_GRID_LIST = '#ITP_OPER03010_DETAIL_jqGrid_list';
14
-const OPER03010_DETAIL_GRID_PAGER = '#ITP_OPER03010_DETAIL_jqGridPager';
15
-const OPER03010_DETAIL_GRID_EMPTY = '#ITP_OPER03010_DETAIL_jqGridEmpty';
16
-
17
-
18
-let ITP_FORM_OPER03010_DETAIL_IS_DUPLICATE = false;
19
-let ITP_FORM_OPER03010_DETAIL_IS_WRITING = false;
20
-
21
-let COMPANY_GRID_LIST = '/api/frcomp/grid-list';
22
-let USER_SALESUSER_GRID_LIST = '/api/frcomp/cmpy-saleusers-list'; 
23
-let COMPANY_INFO_COMPANY = '/api/frcomp/info-frcomp';
24
-let COMPANY_SAVE_COMPANY = '/api/frcomp/save-frcomp';
25
-let COMPANY_CHECK_DUPLICATE = '/api/frcomp/check-duplicate';
26
-let USER_INTI_USERPW = '/api/user/inti-userpw';
27
-
28
-require(['config'], function() {
29
-	require([
30
-		'jquery', 
31
-		'kakao.postcode', 
32
-		'kakao.maps'
33
-	], function($) {
34
-		// 버튼 권한설정
35
-		fn_proc_btn_auth('OPER03010');
36
-		// 공통코드 표시
37
-		fn_make_select(CODE_LIST, 'CMPY_STAT_CD', 'ITP_FORM_OPER03010_SEARCH_CMPY_STAT_CD');
38
-		fn_make_select(CODE_LIST, 'CMPY_STAT_CD', 'ITP_FORM_OPER03010_DETAIL_CMPY_STAT_CD', true, '선택');
39
-		fn_make_select(CODE_LIST, 'CMPY_TYPE_CD', 'ITP_FORM_OPER03010_DETAIL_CMPY_TYPE_CD', true, '선택');
40
-		fn_make_select(CODE_LIST, 'FRCOMP_AUTH_CD', 'ITP_FORM_OPER03010_DETAIL_FRCOMP_AUTH_CD', true, '선택');
41
-		
42
-		// 조회일자 지정
43
-		// var now = new Date();
44
-		$('#ITP_TAB_OPER03010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
45
-		// $('#ITP_FORM_OPER03010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setMonth(now.getMonth() - 1)));
46
-		// $('#ITP_FORM_OPER03010_SEARCH_TO_DT').datepicker('setDate', new Date());
47
-				
48
-		// 그리드				
49
-		itp_fn_jqgrid_resize(OPER03010_GRID_ID, OPER03010_GRID_LIST, 'lg');
50
-		itp_fn_OPER03010_grid.init();
51
-    	itp_fn_fire_window_resize();
52
-
53
-		// 조회    	
54
-    	itp_fn_OPER03010_search();
55
-    	
56
-		// 조회 버튼 클릭
57
-		$('#ITP_BTN_OPER03010_SRH').on('click', function() {
58
-			itp_OPER03010_search = true;
59
-			let param = $('#ITP_FORM_OPER03010_SEARCH').serializeObject();
60
-			param.gridSize = $.jgrid.defaults.rowNum;
61
-			param.gridPage = $.jgrid.defaults.page;
62
-			$(OPER03010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
63
-		});
64
-		
65
-		// 수정 버튼
66
-		$('#ITP_BTN_OPER03010_MODIFY').on('click', function() {
67
-			itp_fn_form_clear_validate(null, '#ITP_FORM_OPER03010_DETAIL');			
68
-			const cmpyCdVal = $('#ITP_FORM_OPER03010_VIEW_CMPY_CD').val();
69
-			const key = {cmpyCd: cmpyCdVal, viewCd: 'R'};
70
-			var param = $.param(key);
71
-			itp_fn_OPER03010_detail(param);	
72
-		});
73
-		
74
-		// 신규등록 버튼
75
-		$('#ITP_BTN_OPER03010_NEWREG').on('click', function() {
76
-			itp_fn_OPER03010_switch_screen('ADD');			
77
-			itp_fn_form_clear_validate(null, '#ITP_FORM_OPER03010_DETAIL');
78
-			itp_fn_OPER03010_detail_map($('#ITP_FORM_OPER03010_DETAIL_STREET_ADDRESS').val());	
79
-			
80
-			// 영업담당자 리스트 조회		
81
-			itp_fn_OPER03010_detail_grid.unload();
82
-			itp_fn_OPER03010_detail_grid.callBack();	
83
-		});
84
-		
85
-		// 취소/목록 버튼
86
-		$('#ITP_BTN_OPER03010_CANCELLIST').on('click', function() {
87
-			itp_fn_OPER03010_search();
88
-    	});
89
-		
90
-		// 삭제 버튼
91
-		$('#ITP_BTN_OPER03010_DELETE').on('click', function() {
92
-			
93
-		});
94
-		
95
-		// 저장 버튼
96
-		$('#ITP_BTN_OPER03010_SAVE').on('click', function() {			
97
-			const formId = '#ITP_FORM_OPER03010_DETAIL';
98
-			itp_fn_form_clear_validate(null, formId);			
99
-			var vali_cmpyCd = itp_fn_form_validate(formId, formId + '_CMPY_CD', ['empty'], undefined);
100
-			var vali_cmpyStatCd = itp_fn_form_validate(formId, formId + '_CMPY_STAT_CD', ['empty'], undefined);
101
-			var vali_cmpyTypeCd = itp_fn_form_validate(formId, formId + '_CMPY_TYPE_CD', ['empty'], undefined);
102
-			var vali_cmpyNm = itp_fn_form_validate(formId, formId + '_CMPY_NM', ['empty'], undefined);			
103
-			var vali_bossNm = itp_fn_form_validate(formId, formId + '_BOSS_NM', ['empty'], undefined);
104
-			var vali_mainTel = itp_fn_form_validate(formId, formId + '_MAIN_TEL', ['empty'], undefined);
105
-			var vali_mainEmail = itp_fn_form_validate(formId, formId + 'MAIN_EMAIL', ['empty'], undefined);
106
-			
107
-			if (vali_cmpyCd && vali_cmpyStatCd && vali_cmpyTypeCd && vali_cmpyNm && vali_bossNm && vali_mainTel && vali_mainEmail) {
108
-				
109
-				if($('#ITP_FORM_OPER03010_DETAIL_CMPY_ZIPNO').val() == '' || $('#ITP_FORM_OPER03010_DETAIL_CMPY_ADRES').val() == '') {
110
-					itp_fn_modal_alert('주소 검색을 통해 회사 주소를 입력하세요.');
111
-					return;
112
-				}
113
-				
114
-				if (ITP_FORM_OPER03010_DETAIL_IS_DUPLICATE) {
115
-					itp_fn_modal_duplicate('회사코드 중복체크를 해주세요.', formId + '_CMPY_CD');
116
-				} else {
117
-					let gridInsertData = [];
118
-					let gridUpdateData = [];
119
-					let gridDeleteData = [];
120
-					const rowData = $(OPER03010_DETAIL_GRID_ID).getRowData();
121
-					const keyValue = $(formId + '_CMPY_CD').val();
122
-					$.each(rowData, function(key, value) {
123
-						if (value.viewCd != 'R') {
124
-							value.userId = keyValue;
125
-							if (value.viewCd == 'C') {
126
-								gridInsertData.push(value);
127
-							} else if (value.viewCd == 'U') {
128
-								gridUpdateData.push(value);
129
-							} else if (value.viewCd == 'D') {
130
-								gridDeleteData.push(value);
131
-							}
132
-						}
133
-					});
134
-					
135
-					let param = $(formId).serializeObject();
136
-					param.gridInsertData = gridInsertData;
137
-					param.gridUpdateData = gridUpdateData;
138
-					param.gridDeleteData = gridDeleteData;
139
-					var searhFn = function() {
140
-						ITP_FORM_OPER03010_DETAIL_IS_WRITING = false;
141
-						itp_fn_OPER03010_search();
142
-					};
143
-					console.log(JSON.stringify(param));
144
-					fn_ajax_call(COMPANY_SAVE_COMPANY, JSON.stringify(param), searhFn, 'POST');	
145
-				}
146
-			}
147
-		});		
148
-		
149
-		// 중복체크
150
-		$('#ITP_FORM_OPER03010_DETAIL_DUP').on('click', function() {
151
-			const formId = '#ITP_FORM_OPER03010_DETAIL';
152
-			itp_fn_form_clear_validate(null, formId + '_DETAIL');
153
-			var vali_cmpyCd = itp_fn_form_validate(formId + '_DETAIL', formId + '_CMPY_CD', ['empty'], undefined);
154
-			if (vali_cmpyCd) {
155
-				var dupFn = function(result) {
156
-					if (result.code == 'N') {
157
-						ITP_FORM_OPER03010_DETAIL_IS_DUPLICATE = false;
158
-					} else {
159
-						ITP_FORM_OPER03010_DETAIL_IS_DUPLICATE = true;
160
-					}
161
-				};
162
-				const key = {'cmpyCd':  $(formId + '_CMPY_CD').val()};
163
-				const param = $.param(key);
164
-				fn_ajax_call(COMPANY_CHECK_DUPLICATE, param, dupFn, 'GET');
165
-			}
166
-		});
167
-		
168
-		// 상세:비밀번호 초기화
169
-		$('#ITP_BTN_OPER03010_RESET_PW').on('click', function() {
170
-			var resetPwFn = {
171
-				callBack: function(args) {
172
-					const key = {'userId':  $('#ITP_FORM_OPER03010_DETAIL_CMPY_CD').val()};
173
-					const param = $.param(key);
174
-					fn_ajax_call(USER_INTI_USERPW, param, undefined, 'GET');					
175
-				}
176
-			};
177
-			itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.askResetUserPw, resetPwFn, null);		
178
-		});
179
-		
180
-		$('#ITP_FORM_OPER03010_DETAIL_ADRES_SCH').on('click', function() {
181
-			new daum.Postcode({
182
-		    	oncomplete: function(data) {
183
-					// 전체주소 리턴
184
-					document.getElementById('ITP_FORM_OPER03010_DETAIL_CMPY_ZIPNO').value = data.zonecode;
185
-					document.getElementById('ITP_FORM_OPER03010_DETAIL_CMPY_ADRES').value = data.roadAddress;
186
-					document.getElementById('ITP_FORM_OPER03010_DETAIL_LOTS_ADDRESS').value = !!data.autoJibunAddress ? data.autoJibunAddress : data.jibunAddress;
187
-					document.getElementById('ITP_FORM_OPER03010_DETAIL_STREET_ADDRESS').value = data.roadAddress;
188
-					document.getElementById('ITP_FORM_OPER03010_DETAIL_HJ_DONG').value = !!data.hname ? data.hname : data.bname;
189
-					document.getElementById('ITP_FORM_OPER03010_DETAIL_BJ_DONG').value = data.bname;
190
-					
191
-					itp_fn_OPER03010_detail_map(data.roadAddress);
192
-					document.getElementById('ITP_FORM_OPER03010_DETAIL_CMPY_ADRES_DTL').focus();		  
193
-		        }
194
-			}).open();
195
-		});
196
-		
197
-		
198
-		$('#ITP_BTN_OPER03010_DETAIL_ADDROW').on('click', function() {
199
-			// 팝업
200
-			var popFn = function(rowDataPop) {
201
-				// 기존등록 데이터 
202
-				var exists = '';				
203
-				const rowData = $(OPER03010_DETAIL_GRID_ID).getRowData();
204
-				$.each(rowData, function(key, value) {
205
-					exists = exists + value.salesUserId + ';';
206
-				});
207
-				
208
-				$.each(rowDataPop, function(key, value) {
209
-					if(exists.indexOf(value.salesUserId) < 0) {
210
-						// 행추가
211
-						$(OPER03010_DETAIL_GRID_ID).jqGrid('addRow', {position: 'last'});
212
-						var rids = $(OPER03010_DETAIL_GRID_ID).jqGrid('getDataIDs');
213
-						var last_row_id = rids[rids.length - 1];
214
-						$(OPER03010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'viewCd', 'C');
215
-						$(OPER03010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'salesUserId', value.salesUserId);
216
-						$(OPER03010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'salesUserNm', value.salesUserNm);
217
-						$(OPER03010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'useStatCd', value.useStatCd);
218
-						$(OPER03010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'useStatNm', value.useStatNm);
219
-						$(OPER03010_DETAIL_GRID_ID).jqGrid('setCell', last_row_id, 'cmpyCd', '');	
220
-					}
221
-				});
222
-				$(OPER03010_DETAIL_GRID_EMPTY).hide();
223
-			};
224
-			fn_call_popup('biz', 'BIZPOP_NK_SALES_USER_SCH', '#ITP_ASIDE', popFn, null, 'S');  //=====================================================================================
225
-		});
226
-		// 상세:삭제버튼
227
-		$('#ITP_BTN_OPER03010_DETAIL_DELROW').on('click', function() {
228
-			itp_fn_grid_del_row(OPER03010_DETAIL_GRID_ID);
229
-		});
230
-		
231
-		$('body').on('click', function(e) {
232
-			var gridId = OPER03010_DETAIL_GRID_ID.replace('#', '');
233
-			var rids = $(OPER03010_DETAIL_GRID_ID).jqGrid('getDataIDs');
234
-			var last_row_id = rids[rids.length - 1];			
235
-			itp_fn_grid_reset_selection(e, last_row_id, gridId, 'OPER03010_DETAIL');
236
-		});
237
-		
238
-	});
239
-});
240
-
241
-var itp_fn_OPER03010_detail_map = function(locate) {
242
-	
243
-	kakao.maps.load(function() {
244
-				
245
-		var mapContainer = document.getElementById('ITP_FORM_OPER03010_DETAIL_MAP'), // 지도를 표시할 div 
246
-		    mapOption = {
247
-		        center: new kakao.maps.LatLng(37.56684, 126.97865), // 지도의 중심좌표
248
-		        level: 3, // 지도의 확대 레벨
249
-		        mapTypeId : kakao.maps.MapTypeId.ROADMAP // 지도종류
250
-		    }; 
251
-	
252
-		// 지도를 생성한다 
253
-		var map = new kakao.maps.Map(mapContainer, mapOption); 
254
-		
255
-		// 마우스 휠과 모바일 터치를 이용한 지도 확대, 축소를 막는다
256
-		map.setZoomable(false);   
257
-	
258
-		// 지도에 확대 축소 컨트롤을 생성한다
259
-		//var zoomControl = new kakao.maps.ZoomControl();
260
-	
261
-		// 지도의 우측에 확대 축소 컨트롤을 추가한다
262
-		//map.addControl(zoomControl, kakao.maps.ControlPosition.RIGHT);
263
-	
264
-		function searchDetailAddrFromCoords(coords, callback) {
265
-		    // 좌표로 법정동 상세 주소 정보를 요청합니다
266
-		    geocoder.coord2Address(coords.getLng(), coords.getLat(), callback);
267
-		}
268
-		
269
-		// 주소-좌표 변환 객체를 생성합니다
270
-		var geocoder = new kakao.maps.services.Geocoder();	
271
-		var map;
272
-		
273
-		if( !locate || locate.length == 0 ) {
274
-			// 지도에 마커를 생성하고 표시한다
275
-		    	marker = new kakao.maps.Marker({
276
-		  	    position: new kakao.maps.LatLng(37.56684, 126.97865), // 마커의 좌표
277
-		   	    map: map // 마커를 표시할 지도 객체
278
-	    	});
279
-		} else {
280
-			// 주소로 좌표를 검색합니다
281
-			geocoder.addressSearch(locate, function(result, status) {
282
-			    // 정상적으로 검색이 완료됐으면 
283
-			     if (status === kakao.maps.services.Status.OK) {
284
-		
285
-			        var coords = new kakao.maps.LatLng(result[0].y, result[0].x);
286
-			        document.getElementById('ITP_FORM_OPER03010_DETAIL_LAT').value = result[0].y;
287
-			        document.getElementById('ITP_FORM_OPER03010_DETAIL_LNG').value = result[0].x;
288
-			        
289
-			        // 결과값으로 받은 위치를 마커로 표시합니다
290
-			        	marker = new kakao.maps.Marker({
291
-			            map: map,
292
-			            position: coords
293
-			        });
294
-		
295
-			        // 지도의 중심을 결과값으로 받은 위치로 이동시킵니다
296
-			        map.setCenter(coords);
297
-			    }
298
-			});    
299
-		}
300
-		
301
-		// 지도 드래깅 이벤트를 등록한다 (드래그 시작 : dragstart, 드래그 종료 : dragend)
302
-		kakao.maps.event.addListener(map, 'drag', function () {
303
-		    searchDetailAddrFromCoords(map.getCenter(), function(result, status) {
304
-		        if (status === kakao.maps.services.Status.OK) {
305
-	
306
-	   		        document.getElementById('ITP_FORM_OPER03010_DETAIL_LOTS_ADDRESS').value = result[0].address.address_name ;
307
-	   		        document.getElementById('ITP_FORM_OPER03010_DETAIL_CMPY_ADRES').value = !!result[0].road_address ? result[0].road_address.address_name : result[0].address.address_name ;
308
-	   		        document.getElementById('ITP_FORM_OPER03010_DETAIL_STREET_ADDRESS').value = !!result[0].road_address ? result[0].road_address.address_name : $('#ITP_FORM_OPER03010_DETAIL_STREET_ADDRESS').val();
309
-	   		        document.getElementById('ITP_FORM_OPER03010_DETAIL_CMPY_ZIPNO').value = !!result[0].road_address ? result[0].road_address.zone_no : $('#ITP_FORM_OPER03010_DETAIL_CMPY_ZIPNO').val() ;
310
-			        document.getElementById('ITP_FORM_OPER03010_DETAIL_LAT').value = map.getCenter().getLat();
311
-			        document.getElementById('ITP_FORM_OPER03010_DETAIL_LNG').value = map.getCenter().getLng();
312
-		                        
313
-		            // 마커를 클릭한 위치에 표시합니다
314
-		            marker.setPosition(map.getCenter());
315
-		            marker.setMap(map);
316
-		        }   
317
-		    });
318
-			/* 	var message = '지도를 드래그 하고 있습니다. 지도의 중심 좌표는 ' + map.getCenter().toString() +' 입니다.';
319
-			console.log(message); */
320
-		});
321
-	});
322
-};
323
-
324
-var itp_fn_OPER03010_view_map = function(locate) {
325
-	
326
-	kakao.maps.load(function() {
327
-				
328
-		var mapContainer = document.getElementById('ITP_FORM_OPER03010_VIEW_MAP'), // 지도를 표시할 div 
329
-		    mapOption = {
330
-		        center: new kakao.maps.LatLng(37.56684, 126.97865), // 지도의 중심좌표
331
-		        level: 3, // 지도의 확대 레벨
332
-		        mapTypeId : kakao.maps.MapTypeId.ROADMAP // 지도종류
333
-		    }; 
334
-	
335
-		// 지도를 생성한다 
336
-		var map = new kakao.maps.Map(mapContainer, mapOption); 
337
-		
338
-		// 마우스 휠과 모바일 터치를 이용한 지도 확대, 축소를 막는다
339
-		map.setZoomable(false);   
340
-	
341
-		// 지도에 확대 축소 컨트롤을 생성한다
342
-		//var zoomControl = new kakao.maps.ZoomControl();
343
-	
344
-		// 지도의 우측에 확대 축소 컨트롤을 추가한다
345
-		//map.addControl(zoomControl, kakao.maps.ControlPosition.RIGHT);
346
-		
347
-		// 주소-좌표 변환 객체를 생성합니다
348
-		var geocoder = new kakao.maps.services.Geocoder();	
349
-		var map;
350
-		
351
-		if( !locate || locate.length == 0 ) {
352
-			// 지도에 마커를 생성하고 표시한다
353
-		    	marker = new kakao.maps.Marker({
354
-		  	    position: new kakao.maps.LatLng(37.56684, 126.97865), // 마커의 좌표
355
-		   	    map: map // 마커를 표시할 지도 객체
356
-	    	});
357
-		} else {
358
-			// 주소로 좌표를 검색합니다
359
-			geocoder.addressSearch(locate, function(result, status) {
360
-			    // 정상적으로 검색이 완료됐으면 
361
-			     if (status === kakao.maps.services.Status.OK) {
362
-		
363
-			        var coords = new kakao.maps.LatLng(result[0].y, result[0].x);
364
-			        
365
-			        // 결과값으로 받은 위치를 마커로 표시합니다
366
-			        marker = new kakao.maps.Marker({
367
-			            map: map,
368
-			            position: coords
369
-			        });
370
-		
371
-			        // 지도의 중심을 결과값으로 받은 위치로 이동시킵니다
372
-			        map.setCenter(coords);
373
-			    }
374
-			});    
375
-		}
376
-	});
377
-};
378
-	
379
-var itp_fn_OPER03010_switch_screen = function(mode) {
380
-	if(mode == 'LIST') { // 목록
381
-		$('#ITP_BTN_OPER03010_MODIFY').hide();
382
-		$('#ITP_BTN_OPER03010_CANCELLIST').hide();
383
-		$('#ITP_BTN_OPER03010_DELETE').hide();
384
-		$('#ITP_BTN_OPER03010_SAVE').hide();
385
-		fn_show_btn_auth('#ITP_BTN_OPER03010_SRH');
386
-		fn_show_btn_auth('#ITP_BTN_OPER03010_NEWREG');
387
-		
388
-		$('#ITP_AJAX_OPER03010_LIST_CONTAINER').show();
389
-		$('#ITP_AJAX_OPER03010_DETAIL_CONTAINER').hide();		
390
-		$('#ITP_AJAX_OPER03010_VIEW_CONTAINER').hide();
391
-	} else if(mode == 'ADD') { // 등록
392
-		ITP_FORM_OPER03010_DETAIL_IS_DUPLICATE = true;
393
-	
394
-		$('#ITP_BTN_OPER03010_SRH').hide();
395
-		$('#ITP_BTN_OPER03010_MODIFY').hide();
396
-		$('#ITP_BTN_OPER03010_NEWREG').hide();
397
-		$('#ITP_BTN_OPER03010_DELETE').hide();
398
-		$('#ITP_BTN_OPER03010_RESET_PW').hide();
399
-		fn_show_btn_auth('#ITP_BTN_OPER03010_CANCELLIST');
400
-		fn_show_btn_auth('#ITP_BTN_OPER03010_SAVE');
401
-		
402
-		$('#ITP_AJAX_OPER03010_LIST_CONTAINER').hide();
403
-		$('#ITP_AJAX_OPER03010_DETAIL_CONTAINER').show();
404
-		$('#ITP_AJAX_OPER03010_VIEW_CONTAINER').hide();		
405
-		$('#ITP_FORM_OPER03010_DETAIL_CMPY_CD').removeAttr('readonly');
406
-		$('#ITP_FORM_OPER03010_DETAIL_DUP').removeAttr('disabled');
407
-		
408
-		$('#ITP_FORM_OPER03010_DETAIL_VIEW_CD').val('C');
409
-		$('#ITP_FORM_OPER03010_DETAIL_CMPY_NM').val('');
410
-		$('#ITP_FORM_OPER03010_DETAIL_CMPY_STAT_CD').val('');
411
-		$('#ITP_FORM_OPER03010_DETAIL_FRCOMP_AUTH_CD').val('');
412
-		$('#ITP_FORM_OPER03010_DETAIL_CMPY_CD').val('');
413
-		$('#ITP_FORM_OPER03010_DETAIL_CMPY_TYPE_CD').val('');
414
-		$('#ITP_FORM_OPER03010_DETAIL_CMPY_REG_NUM').val('');
415
-		$('#ITP_FORM_OPER03010_DETAIL_COPT_NUM').val('');
416
-		$('#ITP_FORM_OPER03010_DETAIL_BIZ_CATE').val('');
417
-		$('#ITP_FORM_OPER03010_DETAIL_BIZ_TYPE').val('');
418
-		$('#ITP_FORM_OPER03010_DETAIL_BOSS_NM').val('');
419
-		$('#ITP_FORM_OPER03010_DETAIL_MAIN_TEL').val('');
420
-		$('#ITP_FORM_OPER03010_DETAIL_MAIN_FAX').val('');
421
-		$('#ITP_FORM_OPER03010_DETAIL_MAIN_EMAIL').val('');
422
-		$('#ITP_FORM_OPER03010_DETAIL_CMPY_ZIPNO').val('');
423
-		$('#ITP_FORM_OPER03010_DETAIL_CMPY_ADRES').val('');
424
-		$('#ITP_FORM_OPER03010_DETAIL_CMPY_ADRES_DTL').val('');
425
-		$('#ITP_FORM_OPER03010_DETAIL_LOTS_ADDRESS').val('');
426
-		$('#ITP_FORM_OPER03010_DETAIL_STREET_ADDRESS').val('');
427
-		$('#ITP_FORM_OPER03010_DETAIL_LAT').val('');
428
-		$('#ITP_FORM_OPER03010_DETAIL_LNG').val('');
429
-		$('#ITP_FORM_OPER03010_DETAIL_HJ_DONG').val('');
430
-		$('#ITP_FORM_OPER03010_DETAIL_BJ_DONG').val('');
431
-		
432
-	} else if(mode == 'MODIFY') { // 수정
433
-		$('#ITP_BTN_OPER03010_SRH').hide();
434
-		$('#ITP_BTN_OPER03010_MODIFY').hide();
435
-		$('#ITP_BTN_OPER03010_NEWREG').hide();		
436
-		$('#ITP_BTN_OPER03010_DELETE').hide();
437
-		fn_show_btn_auth('#ITP_BTN_OPER03010_RESET_PW');
438
-		fn_show_btn_auth('#ITP_BTN_OPER03010_CANCELLIST');
439
-		fn_show_btn_auth('#ITP_BTN_OPER03010_SAVE');
440
-		
441
-		$('#ITP_AJAX_OPER03010_LIST_CONTAINER').hide();
442
-		$('#ITP_AJAX_OPER03010_DETAIL_CONTAINER').show();
443
-		$('#ITP_AJAX_OPER03010_VIEW_CONTAINER').hide();
444
-		$('#ITP_FORM_OPER03010_DETAIL_CMPY_CD').attr('readonly', true);
445
-		$('#ITP_FORM_OPER03010_DETAIL_DUP').attr('disabled', true);
446
-	} else if(mode == 'VIEW') { // 보기
447
-		$('#ITP_BTN_OPER03010_SRH').hide();
448
-		$('#ITP_BTN_OPER03010_NEWREG').hide();		
449
-		$('#ITP_BTN_OPER03010_DELETE').hide();
450
-		$('#ITP_BTN_OPER03010_SAVE').hide();
451
-		fn_show_btn_auth('#ITP_BTN_OPER03010_MODIFY');
452
-		fn_show_btn_auth('#ITP_BTN_OPER03010_CANCELLIST');
453
-		
454
-		$('#ITP_AJAX_OPER03010_LIST_CONTAINER').hide();
455
-		$('#ITP_AJAX_OPER03010_DETAIL_CONTAINER').hide();
456
-		$('#ITP_AJAX_OPER03010_VIEW_CONTAINER').show();
457
-	}	
458
-};
459
-
460
-var itp_fn_OPER03010_grid = {
461
-	init: function() {
462
-		// 데이터 없을때
463
-		itp_fn_OPER03010_empty.push();
464
-		$(OPER03010_GRID_EMPTY).on('click', function() {
465
-			itp_fn_OPER03010_empty.back();
466
-			itp_OPER03010_param.gridSize = $.jgrid.defaults.rowNum;
467
-			$(OPER03010_GRID_ID).setGridParam({'postData': JSON.stringify(itp_OPER03010_param)}).trigger('reloadGrid');
468
-		});	
469
-	},
470
-	colModel: [
471
-		{
472
-			index: 'CMPY_CD', name: 'cmpyCd',
473
-			label: '가맹점코드',
474
-			width: '6', fixed: false, align: 'center',
475
-			sortable: false, hidden: false
476
-		},
477
-		{
478
-			index: 'CMPY_NM', name: 'cmpyNm',
479
-			label: '가맹점명',
480
-			width: '10', fixed: false, align: 'center',
481
-			sortable: false, hidden: false
482
-		},
483
-		{
484
-			index: 'CMPY_TYPE_NM', name: 'cmpyTypeNm',
485
-			label: '기업형태',
486
-			width: '6', fixed: false, align: 'center',
487
-			sortable: false, hidden: false
488
-		},
489
-		{
490
-			index: 'CMPY_STAT_NM', name: 'cmpyStatNm',
491
-			label: '기업상태',
492
-			width: '6', fixed: false, align: 'center',
493
-			sortable: false, hidden: false
494
-		},
495
-		{
496
-			index: 'BOSS_NM', name: 'bossNm',
497
-			label: '대표자명',
498
-			width: '6', fixed: false, align: 'center',
499
-			sortable: false, hidden: false
500
-		},
501
-		{
502
-			index: 'MAIN_TEL', name: 'mainTel',
503
-			label: '대표연락처',
504
-			width: '6', fixed: false, align: 'center',
505
-			sortable: false, hidden: false
506
-		},
507
-		{
508
-			index: 'ADD_DT', name: 'addDt',
509
-			label: '가입일자',
510
-			width: '8', fixed: false, align: 'center',
511
-			sortable: false, hidden: false
512
-		}
513
-	],
514
-	callBack: function() {
515
-		let param = $('#ITP_FORM_OPER03010_SEARCH').serializeObject();
516
-		param.gridSize = $.jgrid.defaults.rowNum;	
517
-		$(OPER03010_GRID_ID).jqGrid({
518
-			colModel: this.colModel,
519
-			loadBeforeSend: function(jqXHR) {
520
-			    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
521
-			},
522
-			postData: JSON.stringify(param),
523
-			url: DOMAIN + COMPANY_GRID_LIST,
524
-			pager: OPER03010_GRID_PAGER,
525
-			multiselect: false,
526
-			rownumbers: true, 
527
-			onCellSelect: function(rowId, cellIdx, cellValue) {
528
-				var cm = $(this).jqGrid('getGridParam', 'colModel');
529
-				var colNm = cm[cellIdx].name;
530
-				if (colNm == 'cmpyNm') {
531
-					const cmpyCdVal = $(this).jqGrid('getCell', rowId, 'cmpyCd');
532
-					const key = {cmpyCd: cmpyCdVal, viewCd: 'R'};
533
-					var param = $.param(key);
534
-					itp_fn_OPER03010_view(param);
535
-				}
536
-		   	},
537
-			loadComplete: function(data) {
538
-				console.log(JSON.stringify(data));
539
-				itp_fn_grid_load_complete(data, OPER03010_GRID_ID, true, 'number', 'OPER03010', itp_OPER03010_search, itp_fn_OPER03010_empty, true, data.gridRecords, true);
540
-				var ids = $(OPER03010_GRID_ID).getDataIDs();
541
-				$.each(ids, function(idx, rowId) {
542
-					$(OPER03010_GRID_ID).jqGrid('setCell', rowId, 'cmpyNm', '', ITP_GRID_COL_STYLE.link);
543
-				});	
544
-		    },
545
-		    loadError: function(jqXHR, textStatus, errorThrown) {
546
-		    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
547
-		    },
548
-		    onPaging: function(action) {
549
-		    	itp_fn_grid_paging(OPER03010_GRID_ID, action, param);
550
-		    }
551
-		}).navGrid(OPER03010_GRID_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
552
-	},
553
-	clearData : function() {
554
-		$(OPER03010_GRID_ID).jqGrid('clearGridData', true);
555
-		$(OPER03010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
556
-		$(OPER03010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
557
-		$(OPER03010_GRID_EMPTY).show();
558
-	}, 
559
-	unload : function() {
560
-		$.jgrid.gridUnload(OPER03010_GRID_ID); 
561
-	}
562
-};
563
-
564
-var itp_fn_OPER03010_search = function() {
565
-	itp_fn_OPER03010_switch_screen('LIST');	
566
-	itp_fn_OPER03010_grid.unload();
567
-	itp_fn_OPER03010_grid.callBack();
568
-};
569
-
570
-let itp_OPER03010_param = {};
571
-let itp_OPER03010_search = false;
572
-var itp_fn_OPER03010_empty = {
573
-	push: function() {
574
-		let param = $('#ITP_FORM_OPER03010_SEARCH').serializeObject();
575
-		itp_OPER03010_param = param;
576
-	},
577
-	back: function() {
578
-		$('#ITP_FORM_OPER03010_DEVI_TP_CD').val(itp_OPER03010_param.deviTpCd);
579
-		$('#ITP_FORM_OPER03010_ORDER_YN').val(itp_OPER03010_param.orderYn);
580
-		$('#ITP_FORM_OPER03010_ADT_AUTH_CD').val(itp_OPER03010_param.adtAuthCd);
581
-		$('#ITP_FORM_OPER03010_EMAIL_RCV_YN').val(itp_OPER03010_param.emailRcvYn);
582
-		$('#ITP_FORM_OPER03010_SMS_RCV_YN').val(itp_OPER03010_param.smsRcvYn);
583
-		$('#ITP_FORM_OPER03010_MEMB_EXIT_DT').val(itp_OPER03010_param.membExitDt);
584
-		$('#ITP_FORM_OPER03010_FROM_DT').val(itp_OPER03010_param.fromDt);
585
-		$('#ITP_FORM_OPER03010_TO_DT').val(itp_OPER03010_param.toDt);
586
-		$('#ITP_FORM_OPER03010_KEYWORD').val(itp_OPER03010_param.keyword);
587
-	}
588
-};
589
-
590
-var itp_fn_OPER03010_view = function(param) {
591
-	fn_ajax_call(COMPANY_INFO_COMPANY, param, itp_fn_OPER03010_view_callback, 'GET');
592
-};
593
-
594
-var itp_fn_OPER03010_view_callback = function(result) {
595
-	// console.log(result);
596
-	itp_fn_OPER03010_switch_screen('VIEW');
597
-	$('#ITP_FORM_OPER03010_VIEW #ITP_FORM_OPER03010_VIEW_CMPY_CD').val(result.cmpyCd);
598
-	
599
-	$('#ITP_FORM_OPER03010_VIEW .fnCmpyNm').text(result.cmpyNm);
600
-	$('#ITP_FORM_OPER03010_VIEW .fnCmpyStatCd').text(result.cmpyStatNm);
601
-	$('#ITP_FORM_OPER03010_VIEW .fnCmpyCd').text(result.cmpyCd);
602
-	$('#ITP_FORM_OPER03010_VIEW .fnCmpyTypeCd').text(result.cmpyTypeNm);
603
-	$('#ITP_FORM_OPER03010_VIEW .fnCmpyRegNum').text(result.cmpyRegNum);
604
-	$('#ITP_FORM_OPER03010_VIEW .fnFrcompAuthCd').text(result.frcompAuthNm);
605
-	$('#ITP_FORM_OPER03010_VIEW .fnCoptNum').text(result.coptNum);
606
-	$('#ITP_FORM_OPER03010_VIEW .fnBizCate').text(result.bizCate);
607
-	$('#ITP_FORM_OPER03010_VIEW .fnBizType').text(result.bizType);
608
-	$('#ITP_FORM_OPER03010_VIEW .fnBossNm').text(result.bossNm);
609
-	$('#ITP_FORM_OPER03010_VIEW .fnMainTel').text(result.mainTel);
610
-	$('#ITP_FORM_OPER03010_VIEW .fnMainFax').text(result.mainFax);
611
-	$('#ITP_FORM_OPER03010_VIEW .fnMainEmail').text(result.mainEmail);
612
-	$('#ITP_FORM_OPER03010_VIEW .fnCmpyAddress').text('('+ result.cmpyZipno + ') ' + result.cmpyAdres + ' ' + result.cmpyAdresDtl);
613
-	
614
-	$('#ITP_FORM_OPER03010_VIEW .fnAddDt').text(result.addDt);
615
-	$('#ITP_FORM_OPER03010_VIEW .fnChgDt').text(result.chgDt);
616
-	
617
-	itp_fn_OPER03010_view_map(result.cmpyAdres);	
618
-	
619
-	// 영업담당자정보  리스트 조회
620
-	itp_fn_OPER03010_view_grid.unload();
621
-	itp_fn_OPER03010_view_grid.callBack();
622
-};
623
-
624
-var itp_fn_OPER03010_view_grid = {
625
-	init: function() {
626
-	},
627
-	callBack: function() {
628
-		let param = $('#ITP_FORM_OPER03010_VIEW').serializeObject();
629
-		param.gridSize = $.jgrid.defaults.rowNum; 
630
-		param.pagingYn = false; // 페이징안함
631
-		
632
-		$(OPER03010_VIEW_GRID_ID).jqGrid({
633
-			colModel: [
634
-				{
635
-					index: 'VIEW_CD', name: 'viewCd',
636
-					label: ITP_MSG_LOCALE.label.viewCd,
637
-					width: '10', fixed: false, align: 'center',
638
-					sortable: false, hidden: true
639
-				},
640
-				{
641
-					index: 'SALES_USER_ID', name: 'salesUserId',
642
-					label: '영업담당자ID',
643
-					width: '20', fixed: false, align: 'center',
644
-					sortable: false, editable: false, edittype: 'text',
645
-					editrules: {required: true}
646
-				},
647
-				{
648
-					index: 'SALES_USER_NM', name: 'salesUserNm',
649
-					label: '영업담당자명',
650
-					width: '30', fixed: false, align: 'center',
651
-					sortable: true, editable: false, edittype: 'text',
652
-					editrules: {required: true}
653
-				},
654
-				{
655
-					index: 'USE_STAT_CD', name: 'useStatCd',
656
-					label: ITP_MSG_LOCALE.label.status,
657
-					width: '10', fixed: false, align: 'center',
658
-					sortable: false, editable: false, edittype: 'text', hidden: true
659
-				},
660
-				{
661
-					index: 'USE_STAT_NM', name: 'useStatNm',
662
-					label: ITP_MSG_LOCALE.label.status,
663
-					width: '10', fixed: false, align: 'center',
664
-					sortable: false, editable: false, edittype: 'text'
665
-				},
666
-				{
667
-					index: 'CMPY_CD', name: 'cmpyCd',
668
-					label: '가맹점코드',
669
-					width: '10', fixed: false, align: 'center',
670
-					sortable: false, editable: false, edittype: 'text', hidden: true
671
-				}
672
-			],
673
-			loadBeforeSend: function(jqXHR) {
674
-			    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
675
-			},
676
-			postData: JSON.stringify(param),
677
-			url: DOMAIN + USER_SALESUSER_GRID_LIST,
678
-			pager: OPER03010_VIEW_GRID_PAGER,
679
-			multiselect: false,
680
-			loadComplete: function(data) {				
681
-				itp_fn_grid_load_complete(data, OPER03010_VIEW_GRID_ID, true, undefined, 'OPER03010_VIEW');
682
-		    },
683
-		    loadError: function(jqXHR, textStatus, errorThrown) {
684
-		    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
685
-		    },
686
-		    onPaging: function(action) {
687
-		    	var pagingFn = {
688
-	    			callBack: function(args) {
689
-	    				$(args).trigger('reloadGrid');
690
-	    			}
691
-	    		};
692
-		    	if (itp_fn_check_grid_is_writing(OPER03010_VIEW_GRID_ID)) {
693
-		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, OPER03010_VIEW_GRID_ID);
694
-		    		return 'stop';
695
-		    	} else {
696
-		    		itp_fn_grid_paging(OPER03010_VIEW_GRID_ID, action, param);
697
-		    	}
698
-		    },
699
-		    onSortCol: function(index, columnIndex, sortOrder) {
700
-		    	var sortingFn = {
701
-	    			callBack: function(args) {
702
-	    				$(args).trigger('reloadGrid');
703
-	    			}
704
-	    		};
705
-		    	if (itp_fn_check_grid_is_writing(OPER03010_VIEW_GRID_ID)) {
706
-		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, OPER03010_VIEW_GRID_ID);
707
-		    		return 'stop';
708
-		    	} else {
709
-		    		itp_fn_grid_sorting(OPER03010_VIEW_GRID_ID, index, sortOrder);
710
-		    	}
711
-		    }
712
-		}).navGrid(OPER03010_VIEW_GRID_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
713
-	},
714
-	clearData : function() {
715
-		$(OPER03010_VIEW_GRID_ID).jqGrid('clearGridData', true);
716
-		$(OPER03010_VIEW_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
717
-		$(OPER03010_VIEW_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
718
-		$(OPER03010_VIEW_GRID_EMPTY).show();
719
-	}, 
720
-	unload : function() {
721
-		$.jgrid.gridUnload(OPER03010_VIEW_GRID_ID); 
722
-	}
723
-};
724
-
725
-var itp_fn_OPER03010_detail = function(param) {
726
-	fn_ajax_call(COMPANY_INFO_COMPANY, param, itp_fn_OPER03010_detail_callback, 'GET');
727
-};
728
-
729
-var itp_fn_OPER03010_detail_callback = function(result) {
730
-	// console.log(result);
731
-	itp_fn_OPER03010_switch_screen('MODIFY');
732
-	$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_VIEW_CD').val('U');
733
-	
734
-	$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CMPY_NM').val(result.cmpyNm);
735
-	$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CMPY_STAT_CD').val(result.cmpyStatCd);
736
-	$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_FRCOMP_AUTH_CD').val(result.frcompAuthCd);
737
-	$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CMPY_CD').val(result.cmpyCd);	
738
-	$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CMPY_TYPE_CD').val(result.cmpyTypeCd);
739
-	$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CMPY_REG_NUM').val(result.cmpyRegNum);
740
-	$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_COPT_NUM').val(result.coptNum);
741
-	$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_BIZ_CATE').val(result.bizCate);
742
-	$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_BIZ_TYPE').val(result.bizType);
743
-	$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_BOSS_NM').val(result.bossNm);
744
-	$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_MAIN_TEL').val(result.mainTel);
745
-	$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_MAIN_FAX').val(result.mainFax);
746
-	$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_MAIN_EMAIL').val(result.mainEmail);
747
-		
748
-	$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CMPY_ZIPNO').val(result.cmpyZipno);	
749
-	$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CMPY_ADRES').val(result.cmpyAdres);	
750
-	$('#ITP_FORM_OPER03010_DETAIL #ITP_FORM_OPER03010_DETAIL_CMPY_ADRES_DTL').val(result.cmpyAdresDtl);		
751
-	
752
-	$('#ITP_FORM_OPER03010_DETAIL .fnAddDt').text(result.addDt);
753
-	$('#ITP_FORM_OPER03010_DETAIL .fnChgDt').text(result.chgDt);
754
-	
755
-	itp_fn_OPER03010_detail_map($('#ITP_FORM_OPER03010_DETAIL_CMPY_ADRES').val());
756
-	
757
-	// 영업담당자 리스트 조회
758
-	itp_fn_OPER03010_detail_grid.unload();
759
-	itp_fn_OPER03010_detail_grid.callBack();
760
-};
761
-
762
-
763
-var itp_fn_OPER03010_detail_grid = {
764
-	init: function() {
765
-	},
766
-	callBack: function() {
767
-		let param = $('#ITP_FORM_OPER03010_DETAIL').serializeObject();
768
-		param.gridSize = $.jgrid.defaults.rowNum; 
769
-		param.pagingYn = false; // 페이지안함 
770
-		
771
-		$(OPER03010_DETAIL_GRID_ID).jqGrid({
772
-			colModel: [
773
-				{
774
-					index: 'VIEW_CD', name: 'viewCd',
775
-					label: ITP_MSG_LOCALE.label.viewCd,
776
-					width: '10', fixed: false, align: 'center',
777
-					sortable: false, hidden: true
778
-				},
779
-				{
780
-					index: 'SALES_USER_ID', name: 'salesUserId',
781
-					label: '영업담당자ID',
782
-					width: '20', fixed: false, align: 'center',
783
-					sortable: false, editable: false, edittype: 'text',
784
-					editrules: {required: true}
785
-				},
786
-				{
787
-					index: 'SALES_USER_NM', name: 'salesUserNm',
788
-					label: '영업담당자명',
789
-					width: '30', fixed: false, align: 'center',
790
-					sortable: true, editable: false, edittype: 'text',
791
-					editrules: {required: true}
792
-				},
793
-				{
794
-					index: 'USE_STAT_CD', name: 'useStatCd',
795
-					label: ITP_MSG_LOCALE.label.status,
796
-					width: '10', fixed: false, align: 'center',
797
-					sortable: false, editable: false, edittype: 'text', hidden: true
798
-				},
799
-				{
800
-					index: 'USE_STAT_NM', name: 'useStatNm',
801
-					label: ITP_MSG_LOCALE.label.status,
802
-					width: '10', fixed: false, align: 'center',
803
-					sortable: false, editable: false, edittype: 'text'
804
-				},
805
-				{
806
-					index: 'CMPY_CD', name: 'cmpyCd',
807
-					label: '가맹점코드',
808
-					width: '10', fixed: false, align: 'center',
809
-					sortable: false, editable: false, edittype: 'text', hidden: true
810
-				}
811
-			],
812
-			loadBeforeSend: function(jqXHR) {
813
-			    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
814
-			},
815
-			postData: JSON.stringify(param),
816
-			url: DOMAIN + USER_SALESUSER_GRID_LIST,
817
-			pager: OPER03010_DETAIL_GRID_PAGER,
818
-			loadComplete: function(data) {				
819
-				itp_fn_grid_load_complete(data, OPER03010_DETAIL_GRID_ID, true, undefined, 'OPER03010_DETAIL');
820
-		    },
821
-		    loadError: function(jqXHR, textStatus, errorThrown) {
822
-		    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
823
-		    },
824
-		    onPaging: function(action) {
825
-		    	var pagingFn = {
826
-	    			callBack: function(args) {
827
-	    				$(args).trigger('reloadGrid');
828
-	    			}
829
-	    		};
830
-		    	if (itp_fn_check_grid_is_writing(OPER03010_DETAIL_GRID_ID)) {
831
-		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, OPER03010_DETAIL_GRID_ID);
832
-		    		return 'stop';
833
-		    	} else {
834
-		    		itp_fn_grid_paging(OPER03010_DETAIL_GRID_ID, action, param);
835
-		    	}
836
-		    },
837
-		    onSortCol: function(index, columnIndex, sortOrder) {
838
-		    	var sortingFn = {
839
-	    			callBack: function(args) {
840
-	    				$(args).trigger('reloadGrid');
841
-	    			}
842
-	    		};
843
-		    	if (itp_fn_check_grid_is_writing(OPER03010_DETAIL_GRID_ID)) {
844
-		    		itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, OPER03010_DETAIL_GRID_ID);
845
-		    		return 'stop';
846
-		    	} else {
847
-		    		itp_fn_grid_sorting(OPER03010_DETAIL_GRID_ID, index, sortOrder);
848
-		    	}
849
-		    }
850
-		}).navGrid(OPER03010_DETAIL_GRID_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
851
-	},
852
-	clearData : function() {
853
-		$(OPER03010_DETAIL_GRID_ID).jqGrid('clearGridData', true);
854
-		$(OPER03010_DETAIL_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
855
-		$(OPER03010_DETAIL_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
856
-		$(OPER03010_DETAIL_GRID_EMPTY).show();
857
-	}, 
858
-	unload : function() {
859
-		$.jgrid.gridUnload(OPER03010_DETAIL_GRID_ID); 
860
-	}
861
-};