whakdo963 2 роки тому
батько
коміт
0357ec74cd

+ 2 - 2
src/main/webapp/app/ordmng/ORDMNG03010.html

@@ -34,8 +34,8 @@
34 34
 											<input type="hidden" id="ITP_FORM_ORDMNG03010_SEARCH_SWHS_ID" class="form-control itp_input" name="swhsId" />
35 35
 										</div>
36 36
 										<div class="col-xs-1 itp_in" style="padding: 0px; width:8%;">
37
-											<button type="button" id="ITP_FORM_ORDMNG03010_SSEARCH_SWHS_NM" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
38
-											<button type="button" id="ITP_FORM_ORDMNG03010_SDELETE_SWHS_NM" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
37
+											<button type="button" id="ITP_FORM_ORDMNG03010_SSEARCH_SWHS_NM" class="btn btn-success btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
38
+											<button type="button" id="ITP_FORM_ORDMNG03010_SDELETE_SWHS_NM" class="btn btn-primary btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
39 39
 						                </div>
40 40
 										<div class="col-xs-4 itp_ip itp_noMar">
41 41
 											<input type="text" id="ITP_FORM_ORDMNG03010_SEARCH_ITEM_NM" class="form-control itp_input" name="sitemNm" placeholder="발주번호/품목번호 /품목명" />

+ 3 - 4
src/main/webapp/app/popup/biz/BIZPOP_DLV_STTMT_PRN.html

@@ -13,7 +13,7 @@
13 13
 						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
14 14
 						<h5 class="modal-title">가맹점 검색</h5>
15 15
 					</div>
16
-					<div class="modal-body">
16
+					<div id="ITP_BIZPOP_DLV_STTMT_PRN_PRINT_AREA" class="modal-body">
17 17
 						<div class="itp_form fix">
18 18
 							<div class="col-xs-12 itp_form_inline">
19 19
 								<div class="form-horizontal fix">
@@ -21,8 +21,7 @@
21 21
 										<img src="/oqpo-view/images/naver.png" alt="로고 샘플" id="ITP_BIZPOP_DLV_STTMT_PRN_BRAND_LOGO "style="border:none; border-radius: 0; height:85px; width:85px; position:absolute; padding:0;" class="form-control itp_input" name="" >
22 22
 									</div>
23 23
 									<div class="pull-right itp_cicon">
24
-										<button type="button" class="btn btn-success btn-sm" id="ITP_BIZPOP_DLV_STTMT_PRN_BTN_SEARCH" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;출력&nbsp;&nbsp;</button>
25
-										<button type="button" class="btn btn-primary btn-sm" id="ITP_BIZPOP_DLV_STTMT_PRN_BTN_SELECT"><i class="glyphicon"></i>&nbsp;&nbsp;다운로드&nbsp;&nbsp;</button>
24
+										<button type="button" class="btn btn-success btn-sm" id="ITP_BIZPOP_DLV_STTMT_PRN_BTN_PRINT" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;출력&nbsp;&nbsp;</button>
26 25
 									</div>
27 26
 								</div>
28 27
 							</div>
@@ -141,7 +140,7 @@
141 140
 									<div class="col-xs-11" style="padding:0; width:90%;">
142 141
 										<label class="col-xs-2">주소</label>
143 142
 										<div class="col-xs-8 itp_form_it">
144
-											<div class="col-xs-12 itp_in fnDlvQty"></div>
143
+											<div class="col-xs-12 itp_in fnPoAddr"></div>
145 144
 										</div>
146 145
 									</div>
147 146
 								</div>	

+ 4 - 0
src/main/webapp/css/style.css

@@ -1,4 +1,8 @@
1 1
 @charset "UTF-8";
2
+@media print {
3
+	*{visibility: hidden; margin:0; paddig:0;}
4
+}
5
+
2 6
 
3 7
 /* COMMON */
4 8
 html, body {width:100%; height:100%; background:#eee; overflow-y:hidden;}

+ 73 - 494
src/main/webapp/js/app/ordmng/ITP_ORDMNG03010.js

@@ -13,9 +13,6 @@ require(['config'], function() {
13 13
 * const gridColModel = {}	: 화면 Grid Object			*
14 14
 * let pageObj = {}			: 화면공통 Object			*
15 15
 * let listObj = {}			: 목록화면 Object			*
16
-* let viewObj = {}			: 상세화면 Object			*
17
-* let modifyObj = {}		: 수정화면 Object			*
18
-* let createObj = {}		: 신규화면 Object			*
19 16
 *******************************************************/
20 17
 
21 18
 /*화면 변수*/
@@ -24,19 +21,13 @@ const ORDMNG03010_GRID_LIST = '#ITP_ORDMNG03010_jqGrid_list';
24 21
 const ORDMNG03010_GRID_PAGER = '#ITP_ORDMNG03010_jqGridPager';
25 22
 const ORDMNG03010_GRID_EMPTY = '#ITP_ORDMNG03010_jqGridEmpty';
26 23
 
27
-let ITP_FORM_ORDMNG03010_DETAIL_IS_DUPLICATE = false;
28
-let ITP_FORM_ORDMNG03010_DETAIL_IS_WRITING = false;
29
-
30 24
 /*API URL*/
31 25
 let API_DELI_GRID_LIST 	= '/api/pomng/inoutmng/spply-deli-grid-list';// 목록
32 26
 let API_INFO_INV 		= '/api/pomng/inoutmng/init-spply-inv';	// 상세
33
-let API_SAVE_SPPLY_INV 	= '/api/pomng/inoutmng/save-spply-inv';// 저장
34
-let API_ITEM_CLASS_LEVEL= '/api/item/class-level-list';		//품목분류 level 검색
35 27
 
36 28
 /*화면 Grid ColModel*/
37 29
 const gridColModel = {
38 30
 	list: [
39
-	
40 31
 			{
41 32
 				index: 'Brand_ID', name: 'brandId',
42 33
 				label: ITP_MSG_LOCALE.label.brandId, //브랜드
@@ -138,79 +129,26 @@ const gridColModel = {
138 129
 				label: ITP_MSG_LOCALE.label.dlvMgrTelNo, //납품담당연락처
139 130
 				width: '10', fixed: false, align: 'center',
140 131
 				sortable: false, hidden: false
141
-			},
142
-	],
143
-	detail: [
144
-			{
145
-					index: 'VIEW_CD', name: 'viewCd',
146
-					label: ITP_MSG_LOCALE.label.viewCd,
147
-					width: '10', fixed: false, align: 'center',
148
-					sortable: false, hidden: true
149
-			},
150
-			{
151
-					index: 'AUTH_NO', name: 'authNo',
152
-					label: ITP_MSG_LOCALE.label.permitCd,
153
-					width: '20', fixed: false, align: 'center',
154
-					sortable: false, editable: false, edittype: 'text',
155
-					editrules: {required: true}
156
-			},
157
-			{
158
-					index: 'AUTH_NM', name: 'authNm',
159
-					label: ITP_MSG_LOCALE.label.permitName,
160
-					width: '30', fixed: false, align: 'center',
161
-					sortable: true, editable: false, edittype: 'text',
162
-					editrules: {required: true}
163
-			},
164
-			{
165
-					index: 'USE_YN_NM', name: 'useYnNm',
166
-					label: ITP_MSG_LOCALE.label.status,
167
-					width: '10', fixed: false, align: 'center',
168
-					sortable: false, editable: false, edittype: 'text'
169
-			},
170
-			{
171
-					index: 'ADD_DT', name: 'addDt',
172
-					label: ITP_MSG_LOCALE.label.regDt,
173
-					width: '10', fixed: false, align: 'center',
174
-					sortable: false, editable: false, edittype: 'text'
175 132
 			}
176
-	]
133
+	],
177 134
 };
178
-
179 135
 /*화면공통 Object*/
180 136
 let pageObj = {
181 137
 	init: function () {
182 138
 			this.ui.init();
183 139
 			this.event.init();
184
-			this.fileUpload();
185 140
 			this.action();
186 141
 	},
187 142
 	ui: {
188
-			init: function () {
189
-					this.view();
190
-					this.grid();
191
-					this.ready();
192
-			},
193
-			view: function() {
194
-					// 버튼 권한설정
195
-					fn_proc_btn_auth('ORDMNG03010');
196
-
197
-					// 공통코드 표시
198
-					$('select').each(function() {
199
-							if($(this).data('select-code')) {
200
-									fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
201
-							}
202
-					});
143
+		init: function () {
144
+			this.view();
145
+			listObj.init();
146
+		},
147
+		view: function() {
148
+			// 버튼 권한설정
149
+			fn_proc_btn_auth('ORDMNG03010');
203 150
 
204
-					itemClassLevel.make(1, 'LIST');
205
-			},
206
-			grid: function() {
207
-					itp_fn_jqgrid_resize(ORDMNG03010_GRID_ID, ORDMNG03010_GRID_LIST, 'lg');
208
-					listObj.empty.init();
209
-					itp_fn_fire_window_resize();
210
-			},
211
-			ready: function() {
212
-					listObj.init();
213
-			}
151
+		}
214 152
 	},
215 153
 	action: function () {
216 154
 		var _this = this;
@@ -225,19 +163,11 @@ let pageObj = {
225 163
 		});
226 164
 	
227 165
 	},
228
-	popup: function (arg) {
166
+	popup: function () {
229 167
 		var popFn ;
230
-		// 팝업
231
-		if (arg == "SW") {
232 168
 			popFn = this.callback.searWhs;
233
-		} 
234
-		
235
-		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'), whsDvsn:""};
236
-		if (arg == "SW" ) {
169
+	  const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'), whsDvsn:""};
237 170
 			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
238
-		} 
239
-		
240
-		
241 171
 	},
242 172
 	callback: {
243 173
 		searWhs: function(rowDataPop) {
@@ -245,112 +175,29 @@ let pageObj = {
245 175
 				$('#ITP_FORM_ORDMNG03010_SEARCH_SWHS_NM').val(rowDataPop.whsNm);
246 176
 				$('#ITP_FORM_ORDMNG03010_SEARCH_SWHS_ID').val(rowDataPop.whsId);
247 177
 			}
248
-			
249 178
 		},
250
-		poRej: function(rowDataPop) {
251
-			if(rowDataPop) {
252
-				console.log(rowDataPop);
253
-				
254
-				if (rowDataPop.retVal == "Y") {
255
-				  modifyObj.button.rejectSave(rowDataPop);
256
-				}
257
-			}
258
-		}
259
-		
260
-		
261 179
 	},
262 180
 	event: {
263
-			init: function () {
264
-					this.button();
265
-			},
266
-			button: function () {
267
-					// 버튼 클릭 이벤트
268
-					$('button').each(function() {
269
-							var id = $(this).attr('id');
270
-							$(this).on('click', function() {
271
-									switch (id) {
272
-											case 'ITP_BTN_ORDMNG03010_SRH'				: listObj.button.search();		break;	// 조회 버튼 클릭
273
-											case 'ITP_BTN_ORDMNG03010_POPUP'			: listObj.button.create(); 		break;	// 납품서출력
274
-											case 'ITP_BTN_ORDMNG03010_MODIFY'			: modifyObj.button.modify();	break;	// 수정 버튼
275
-											case 'ITP_BTN_ORDMNG03010_CANCELLIST'		: createObj.button.cancel(); 	break;	// 취소/목록 버튼
276
-											case 'ITP_BTN_ORDMNG03010_DELETE'			: 								break;	// 삭제 버튼
277
-											case 'ITP_BTN_ORDMNG03010_SAVE'				: createObj.button.save(); 		break;	// 저장 버튼
278
-											case 'ITP_FORM_ORDMNG03010_DETAIL_DUP'		: createObj.button.duplicate();	break;	// 중복체크
279
-											case 'ITP_BTN_ORDMNG03010_RESET_PW'			: createObj.button.resetPass();	break;	// 상세:비밀번호 초기화
280
-									}
281
-							});
282
-					});
283
-
284
-					$('body').on('click', function(e) {
285
-//							var gridId = ORDMNG03010_GRID_ID.replace('#', '');
286
-//							var rids = $(ORDMNG03010_GRID_ID).jqGrid('getDataIDs');
287
-//							var last_row_id = rids[rids.length - 1];
288
-//							itp_fn_grid_reset_selection(e, last_row_id, gridId, 'ORDMNG03010_DETAIL');
289
-					});
290
-
291
-			}
292
-	},
293
-	fileUpload: function() {
294
-			//파일업로드(등록/수정화면)
295
-			var id = 'ORDMNG03010';
296
-			$('#ITP_' + id + '_DETAIL_UPLOAD').empty();
297
-			const fileArgs = {
298
-					'fileNo': $('#ITP_FORM_' + id + '_DETAIL_FILE_NO').val(),
299
-					'viewCd': $('#ITP_FORM_' + id + '_DETAIL_VIEW_CD').val(),
300
-					'showYn': $('#ITP_' + id + '_DETAIL_UPLOAD').attr('data-show-yn'),
301
-					'fileId': '#ITP_FORM_' + id + '_DETAIL_FILE_NO' //파일번호를 서버에서 받아서 넣을 파일번호 인풋박스 아이디
302
-			};
303
-			itp_fn_set_file_upload('ITP_' + id + '_DETAIL_UPLOAD', 'notice', true, false, id, fileArgs);
304
-	},
305
-	switchScreen: function(mode) {
306
-			$('.itp_det_head').find('button[id^="ITP_BTN_ORDMNG03010_"]').each(function(i) {
307
-					$(this).hide();
308
-			});
309
-			$('#ITP_TAB_ORDMNG03010').find('div[id$="_CONTAINER"]').each(function(i) {
310
-					$(this).hide();
181
+		init: function () {
182
+				this.button();
183
+		},
184
+		button: function () {
185
+				// 버튼 클릭 이벤트
186
+			$('button').each(function() {
187
+				var id = $(this).attr('id');
188
+				$(this).on('click', function() {
189
+					switch (id) {
190
+						case 'ITP_BTN_ORDMNG03010_SRH'		: listObj.button.search();		break;	// 조회 버튼 클릭
191
+						case 'ITP_BTN_ORDMNG03010_POPUP'	: listObj.button.create(); 		break;	// 납품서출력 팝업
192
+					}
193
+				});
311 194
 			});
312
-			if(mode == 'LIST') { // 목록
313
-				$('#ITP_FORM_ORDMNG03010_SEARCH_SPPLY_ID').val(fn_make_user_info.get('userId'));
314
-				$('#ITP_FORM_ORDMNG03010_SEARCH_BRAND_ID').val(fn_make_user_info.get('brandId'));					$('#ITP_AJAX_ORDMNG03010_LIST_CONTAINER').show();
315
-					$('#ITP_FORM_ORDMNG03010_SDELETE_SWHS_NM').show();
316
-					fn_show_btn_auth_array(['#ITP_BTN_ORDMNG03010_SRH', '#ITP_BTN_ORDMNG03010_POPUP']);
317
-			} else if(mode == 'ADD') { // 등록
318
-					$('#ITP_AJAX_ORDMNG03010_DETAIL_CONTAINER').show();
319
-					fn_show_btn_auth_array(['#ITP_BTN_ORDMNG03010_CANCELLIST', '#ITP_BTN_ORDMNG03010_SAVE']);
320
-
321
-					$('#ITP_FORM_ORDMNG03010_DETAIL').find('input, textarea, select, checkbox').each(function(i, elem) {
322
-							$(this).attr('id') === 'ITP_FORM_ORDMNG03010_DETAIL_VIEW_CD' ? $(this).val('C') : $(this).val('');
323
-							if(elem.type === 'select') {
324
-									$(this).val('').prop('selected', true);
325
-							}
326
-					});
327
-
328
-					$('#ITP_FORM_ORDMNG03010_DETAIL_STORE_ID').removeAttr('readonly');
329
-					$('#ITP_FORM_ORDMNG03010_DETAIL_DUP').removeAttr('disabled');
330
-
331
-					// 가맹점 정보 설정
332
-					$('#ITP_FORM_ORDMNG03010_DETAIL_AFFL_SHOP_ID').val(fn_make_user_info.get('afflShopId'));
333
-					$('#ITP_FORM_ORDMNG03010_DETAIL_BRAND_ID').val(fn_make_user_info.get('brandId'));
334
-					$('#ITP_FORM_ORDMNG03010_DETAIL .fnBrandNm').text(fn_make_user_info.get('brandNm'));
335
-					$('#ITP_FORM_ORDMNG03010_DETAIL .fnItemClassMgntNo').text('(자동부여)');
336
-			} else if(mode == 'MODIFY') { // 수정
337
-					$('#ITP_AJAX_ORDMNG03010_DETAIL_CONTAINER').show();
338
-					fn_show_btn_auth_array(['#ITP_BTN_ORDMNG03010_CANCELLIST', '#ITP_BTN_ORDMNG03010_SAVE', '#ITP_BTN_ORDMNG03010_RESET_PW']);
339
-
340
-					$('#ITP_FORM_ORDMNG03010_DETAIL_AFFL_SHOP_ID').val(fn_make_user_info.get('afflShopId'));
341
-					$('#ITP_FORM_ORDMNG03010_DETAIL_BRAND_ID').val(fn_make_user_info.get('brandId'));
342
-					$('#ITP_FORM_ORDMNG03010_DETAIL .fnBrandNm').text(fn_make_user_info.get('brandNm'));
343
-					$('#ITP_FORM_ORDMNG03010_DETAIL_STORE_ID').attr('readonly', true);
344
-					$('#ITP_FORM_ORDMNG03010_DETAIL_DUP').attr('disabled', true);
345
-					$('#ITP_FORM_ORDMNG03010_DETAIL_SEARCH_AFFL_SHOP_NM').attr('readonly', true);
346
-
347
-					$('#ITP_FORM_ORDMNG03010_DETAIL_SEARCH_AFFL_SHOP').hide();
348
-					$('#ITP_FORM_ORDMNG03010_DETAIL_DELETE_AFFL_SHOP').hide();
349
-			} else if(mode == 'VIEW') { // 보기
350
-					$('#ITP_AJAX_ORDMNG03010_VIEW_CONTAINER').show();
351
-					$('#ITP_FORM_ORDMNG03010_VIEW .fnBrandNm').text(fn_make_user_info.get('brandNm'));
352
-					fn_show_btn_auth_array(['#ITP_BTN_ORDMNG03010_MODIFY', '#ITP_BTN_ORDMNG03010_CANCELLIST']);
353
-			}
195
+		}
196
+	},
197
+	screen: function() {
198
+			$('#ITP_FORM_ORDMNG03010_SEARCH_SPPLY_ID').val(fn_make_user_info.get('userId'));
199
+			$('#ITP_FORM_ORDMNG03010_SEARCH_BRAND_ID').val(fn_make_user_info.get('brandId'));					
200
+			$('#ITP_FORM_ORDMNG03010_SDELETE_SWHS_NM').show();
354 201
 	}
355 202
 };
356 203
 
@@ -364,352 +211,84 @@ let listObj = {
364 211
 	button: {
365 212
 			search: function() {
366 213
 					listObj.itp_ORDMNG03010_search = true;
367
-					console.log(1);
368 214
 					let param = $('#ITP_FORM_ORDMNG03010_SEARCH').serializeObject();
369 215
 					param.gridSize = $.jgrid.defaults.rowNum;
370 216
 					param.gridPage = $.jgrid.defaults.pageITP_FORM_ORDMNG03010_SSEARCH_SWHS_NM;
371 217
 					$(ORDMNG03010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
372 218
 			},
373
-			
374 219
 			create: function() {
375 220
 					if(!fn_make_user_info.isEmpty()) {
376
-						// 팝업
377
-//						var popFn = this.callback.deliPrt;
378
-
379 221
 						const rowKey = $(ORDMNG03010_GRID_ID).getGridParam('selrow');
380
-						if (!rowKey) {
222
+						if (!rowKey) {//선택 안했을시
381 223
 							alert("납품서를 선택해주세요 (대표 납품서번호)") ;
382 224
 							return;
383 225
 						}
384
-						
385 226
 						var selectedIds = $(ORDMNG03010_GRID_ID).getGridParam('selarrrow');
386
-						
387
-						if(selectedIds.length > 1) { // 1개만 선택
227
+						if(selectedIds.length > 1) { // 1이상 선택
388 228
 						   alert("납품서 하나만 선택해주세요 (대표 납품서번호)") ;
389 229
 							return;
390 230
 						} 
391
-						
392 231
 						var selRowData ;
393 232
 						
394
-						for (var i=selectedIds.length-1; i>=0; i--) {
233
+						for (var i=selectedIds.length-1; i>=0; i--) {//1개만 선택시
395 234
 							selRowData = $(ORDMNG03010_GRID_ID).jqGrid('getRowData', selectedIds[i]);
396 235
 						}
397
-						console.log(selRowData);
398 236
 						const key = {brandId :fn_make_user_info.get('brandId'), dlvSttmtUnqNo : selRowData.dlvSttmtUnqNo};
399
-						console.log(key);
400 237
 						fn_call_popup('biz', 'BIZPOP_DLV_STTMT_PRN', '#ITP_ASIDE',null, key, 'S');
401
-						console.log(fn_call_popup);
402
-						// fn_call_popup(type, popnm, container,  popFn, args, returnType)
403 238
 					}
404 239
 			}
405 240
 			
406 241
 	},
407
-//	callback: {
408
-//		deliPrt: function(rowDataPop) {
409
-//			console.log(rowDataPop);
410
-//		}
411
-//	},
412 242
 	empty: {
413 243
 			init: function() {
414
-					var _this = this;
415
-					this.push();
416
-					$(ORDMNG03010_GRID_EMPTY).on('click', function() {
417
-							_this.back();
418
-							_this.itp_ORDMNG03010_param.gridSize = $.jgrid.defaults.rowNum;
419
-							$(ORDMNG03010_GRID_ID).setGridParam({'postData': JSON.stringify(_this.itp_ORDMNG03010_param)}).trigger('reloadGrid');
420
-					});
244
+				var _this = this;
245
+				this.push();
246
+				$(ORDMNG03010_GRID_EMPTY).on('click', function() {
247
+						_this.itp_ORDMNG03010_param.gridSize = $.jgrid.defaults.rowNum;
248
+						$(ORDMNG03010_GRID_ID).setGridParam({'postData': JSON.stringify(_this.itp_ORDMNG03010_param)}).trigger('reloadGrid');
249
+				});
421 250
 			},
422 251
 			itp_ORDMNG03010_param: {},
423 252
 			push: function() {
424
-					let param = $('#ITP_FORM_ORDMNG03010_SEARCH').serializeObject();
425
-					listObj.itp_ORDMNG03010_param = param;
253
+				let param = $('#ITP_FORM_ORDMNG03010_SEARCH').serializeObject();
254
+				listObj.itp_ORDMNG03010_param = param;
426 255
 			},
427
-			back: function() {
428
-					$('#ITP_FORM_ORDMNG03010_SERVICE_ST_CD').val(this.itp_ORDMNG03010_param.sitemStCd);
429
-					$('#ITP_FORM_ORDMNG03010_SEARCH_PODR_PSSBL_DVSN').val(this.itp_ORDMNG03010_param.spodrPssblDvsn);
430
-					$('#ITP_FORM_ORDMNG03010_SEARCH_ITEM_KIND').val(this.itp_ORDMNG03010_param.sitemKind);
431
-					$('#ITP_FORM_ORDMNG03010_SEARCH_ITEM_TYPE').val(this.itp_ORDMNG03010_param.sitemType);
432
-					$('#ITP_FORM_ORDMNG03010_SEARCH_ITEM_CLASS1').val(this.itp_ORDMNG03010_param.sitemClass1);
433
-					$('#ITP_FORM_ORDMNG03010_SEARCH_ITEM_CLASS2').val(this.itp_ORDMNG03010_param.sitemClass2);
434
-					$('#ITP_FORM_ORDMNG03010_SEARCH_ITEM_CLASS3').val(this.itp_ORDMNG03010_param.sitemClass3);
435
-					$('#ITP_FORM_ORDMNG03010_SEARCH_ITEM_CLASS4').val(this.itp_ORDMNG03010_param.sitemClass4);
436
-					$('#ITP_FORM_ORDMNG03010_SEARCH_ITEM_NM').val(this.itp_ORDMNG03010_param.sitemNm);
437
-			}
438 256
 	},
439 257
 	grid: {
440
-			init: function () {
441
-					// 데이터 없을때
442
-					listObj.empty.push();
443
-					this.search();
444
-			},
445
-			colModel: gridColModel.list,
446
-			search: function() {
447
-					pageObj.switchScreen('LIST');
448
-					this.unload();
449
-					this.load();
450
-			},
451
-			load: function() {
452
-					let param = $('#ITP_FORM_ORDMNG03010_SEARCH').serializeObject();
453
-					param.gridSize = $.jgrid.defaults.rowNum;
454
-					param.sbrandId = fn_make_user_info.get('brandId');
455
-					// param.sbrandId = sessionStorage.getItem('itp_brand_id') !== null ? sessionStorage.getItem('itp_brand_id') : 'BRD221000001';
456
-
457
-					console.log(JSON.stringify(param));
458
-					var option = {
459
-							gridId: ORDMNG03010_GRID_ID,
460
-							colModel: gridColModel.list,
461
-							param: param,
462
-							url: DOMAIN + API_DELI_GRID_LIST,
463
-							pager: ORDMNG03010_GRID_PAGER,
464
-							multiselect: true,
465
-							onCellSelect: function(rowId, cellIdx, cellValue) {
466
-//									var cm = $(this).jqGrid('getGridParam', 'colModel');
467
-//									var colNm = cm[cellIdx].name;
468
-//									if (colNm == '') {
469
-//											const selectVal = $(this).jqGrid('getCell', rowId, '');
470
-//											const key = {brandId:fn_make_user_info.get('brandId'), itemId: selectVal, viewCd: 'R'};
471
-//											var param = $.param(key);
472
-//											viewObj.init(param);
473
-//									}
474
-							},
475
-							loadComplete: function(data) {
476
-									console.log(data);
477
-									itp_fn_grid_load_complete(data, ORDMNG03010_GRID_ID, true, 'number', 'ORDMNG03010', listObj.itp_ORDMNG03010_search, listObj.empty, true, data.gridRecords, true);
478
-									var ids = $(ORDMNG03010_GRID_ID).getDataIDs();
479
-									$.each(ids, function(idx, rowId) {
480
-											$(ORDMNG03010_GRID_ID).jqGrid('setCell', rowId, '', '', ITP_GRID_COL_STYLE.link);
481
-									});
482
-							},
483
-							onPaging: function(action) {
484
-									itp_fn_grid_paging(ORDMNG03010_GRID_ID, action, param);
485
-							}
486
-					};
487
-					itp_fn_grid_make_remote(option);
488
-			},
489
-			clearData : function() {
490
-					$(ORDMNG03010_GRID_ID).jqGrid('clearGridData', true);
491
-					$(ORDMNG03010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
492
-					$(ORDMNG03010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
493
-					$(ORDMNG03010_GRID_EMPTY).show();
494
-			},
495
-			unload : function() {
496
-					$.jgrid.gridUnload(ORDMNG03010_GRID_ID);
497
-			}
498
-	}
499
-};
500
-
501
-/*상세화면 Object*/
502
-let viewObj = {
503
-	init: function (param) {
504
-			this.load(param);
505
-	},
506
-	load: function(param) {
507
-			fn_ajax_call(API_INFO_INV, param, this.callback, 'GET');
508
-	},
509
-	callback: function (result) {
510
-			console.log(result);
511
-			pageObj.switchScreen('VIEW');
512
-			$('#ITP_FORM_ORDMNG03010_VIEW #ITP_FORM_ORDMNG03010_VIEW_ITEM_ID').val(result.itemId);
513
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnStCd').text(result.itemStCd);
514
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnItemClass1').text(result.itemClass1);
515
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnItemClass2').text(result.itemClass2);
516
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnItemClass3').text(result.itemClass3);
517
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnItemClass4').text(result.itemClass4);
518
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnItemClassMgntNo').text(result.itemClassMgntNo);
519
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnItemId').text(result.itemId);
520
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnItemTypeNm').text(result.itemTypeNm);
521
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnItemNm').text(result.itemClassNm);
522
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnImpDvsnNm').text(result.impDvsnNm);
523
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnPodrPssblDvsn').text(result.podrPssblDvsnNm);
524
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnUnit').text(result.unit);
525
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnWeightUnit').text(result.weightUnit);
526
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnVolumeUnit').text(result.volumeUnit);
527
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnWidthUnit').text(result.widthUnit);
528
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnHeightUnit').text(result.heightUnit);
529
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnHighUnit').text(result.highUnit);
530
-			
531
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnPchItemYn').text(result.pchItemYn);
532
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnViewPchUnit').text(result.pchUnit);
533
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnSaleItemYn').text(result.saleItemYn);
534
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnSaleUnit').text(result.saleUnit);
535
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnAssetInfo').text(result.assetInfo);
536
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnStckUnit').text(result.stckUnit);
537
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnWeight').text(result.weight);
538
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnVolume').text(result.volume);
539
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnWidth').text(result.width);
540
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnHeight').text(result.height);
541
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnHigh').text(result.high);
542
-			
543
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnOneBoxQty').text(result.oneBoxQty);
544
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnExpryYn').text(result.expryYn);
545
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnExpryPeriod').text(result.expryPeriod);
546
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnRtnPssblYn').text(result.rtnPssblYn);
547
-			$('#ITP_FORM_ORDMNG03010_VIEW .fnRtnDvsn').text(result.rtnDvsnNm);
548
-			// $('#ITP_FORM_ORDMNG03010_VIEW .fnItemImage').text(result.imageFileNoList);
549
-			$.each(result.imageFileNoList, function(index, item) {
550
-					$('#ITP_FORM_ORDMNG03010_VIEW .fnItemImage').append('<img src=" + item.filePath +" />');
551
-			});
552
-	}
553
-};
554
-
555
-/*수정화면 Object*/
556
-let modifyObj = {
557
-	init: function () {
558
-	},
559
-	button: {
560
-			modify: function (param) {
561
-					itp_fn_form_clear_validate(null, '#ITP_FORM_ORDMNG03010_DETAIL');
562
-					const selectVal = $('#ITP_FORM_ORDMNG03010_VIEW_ITEM_ID').val();
563
-					const key = {brandId:fn_make_user_info.get('brandId'), itemId: selectVal, viewCd: 'R'};
564
-					var param = $.param(key);
565
-					modifyObj.load(param);
566
-			}
567
-	},
568
-	load: function(param) {
569
-			fn_ajax_call(API_INFO_INV, param, this.callback, 'GET');
570
-	},
571
-	callback: function (result) {
572
-			console.log(result);
573
-			pageObj.switchScreen('MODIFY');
574
-
575
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_VIEW_CD').val('U');
576
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_ITEM_ID').val(result.itemId);
577
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_STORE_ST_CD').val(result.itemStCd);
578
-			$('#ITP_FORM_ORDMNG03010_DETAIL .fnItemClassMgntNo').text(result.itemId);
579
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_ITEM_TYPE').val(result.itemType);
580
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_ITEM_NM').val(result.itemClassNm);
581
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_IMP_DVSN').val(result.impDvsn);
582
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_PODR_PSSBL_DVSN').val(result.podrPssblDvsn);
583
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_UNIT').val(result.unit);
584
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_PCH_ITEM_YN').val(result.pchItemYn);
585
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_PCH_UNIT').val(result.pchUnit);
586
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_SALE_ITEM_YN').val(result.saleItemYn);
587
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_SALE_UNIT').val(result.saleUnit);
588
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_ASSET_INFO').val(result.assetInfo);
589
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_STCK_UNIT').val(result.stckUnit);
590
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_WEIGHT').val(result.weight);
591
-			$('#ITP_FORM_ORDMNG03010_DETAIL .item_unit').text(result.unit);
592
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_VOLUME').val(result.volume);
593
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_WIDTH').val(result.width);
594
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_HEIGHT').val(result.height);
595
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_HIGH').val(result.high);
596
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_ONE_BOX_QTY').val(result.oneBoxQty);
597
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_EXPRY_YN').val(result.expryYn);
598
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_EXPRY_PERIOD').val(result.expryPeriod);
599
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_RTN_PSSBL_YN').val(result.rtnPssblYn);
600
-			$('#ITP_FORM_ORDMNG03010_DETAIL #ITP_FORM_ORDMNG03010_DETAIL_RTN_DVSN').val(result.rtnDvsn);
601
-			$.each(result.imageFileNoList, function(index, item) {
602
-					$('#ITP_FORM_ORDMNG03010_VIEW .ITEM_IMAGE').append('<img src=" + item.filePath +" />');
603
-			});
604
-
605
-			itemClassLevel.data.push(result.itemClass1);
606
-			itemClassLevel.data.push(result.itemClass2);
607
-			itemClassLevel.data.push(result.itemClass3);
608
-			itemClassLevel.data.push(result.itemClass4);
609
-			itemClassLevel.make(1, 'MODIFY');
610
-	}
611
-};
258
+		init: function () {
259
+				// 데이터 없을때
260
+			listObj.empty.push();
261
+			this.search();
262
+		},
263
+		colModel: gridColModel.list,
264
+		search: function() {
265
+			pageObj.screen();
266
+			this.load();
267
+		},
268
+		load: function() {
269
+			let param = $('#ITP_FORM_ORDMNG03010_SEARCH').serializeObject();
270
+			param.gridSize = $.jgrid.defaults.rowNum;
271
+			param.sbrandId = fn_make_user_info.get('brandId');
272
+			var option = {
273
+				gridId: ORDMNG03010_GRID_ID,
274
+				colModel: gridColModel.list,
275
+				param: param,
276
+				url: DOMAIN + API_DELI_GRID_LIST,
277
+				pager: ORDMNG03010_GRID_PAGER,
278
+				multiselect: true,
279
+				loadComplete: function(data) {
280
+					itp_fn_grid_load_complete(data, ORDMNG03010_GRID_ID, true, 'number', 'ORDMNG03010', listObj.itp_ORDMNG03010_search, listObj.empty, true, data.gridRecords, true);
612 281
 
613
-/*신규화면 Object*/
614
-let createObj = {
615
-	init: function () {
616
-			pageObj.switchScreen('ADD');
617
-			itp_fn_form_clear_validate(null, '#ITP_FORM_ORDMNG03010_DETAIL');
618
-			this.button.init();
619
-			itemClassLevel.make(1, 'ADD');
620
-	},
621
-	button: {
622
-			init: function() {
623
-					$('#ITP_FORM_ORDMNG03010_DETAIL_ITEM_CLASS1').off('change').on('change', function() {
624
-							($(this).val() === '') ? itemClassLevel.clear(2): itemClassLevel.change(2);
625
-					});
626
-					$('#ITP_FORM_ORDMNG03010_DETAIL_ITEM_CLASS2').off('change').on('change', function() {
627
-							($(this).val() === '') ? itemClassLevel.clear(3): itemClassLevel.change(3);
282
+					var ids = $(ORDMNG03010_GRID_ID).getDataIDs();
283
+					$.each(ids, function(idx, rowId) {
284
+						$(ORDMNG03010_GRID_ID).jqGrid('setCell', rowId, '', '', ITP_GRID_COL_STYLE.link);
628 285
 					});
629
-					$('#ITP_FORM_ORDMNG03010_DETAIL_ITEM_CLASS3').off('change').on('change', function() {
630
-							($(this).val() === '') ? itemClassLevel.clear(4): itemClassLevel.change(4);
631
-					});
632
-			},
633
-			cancel: function() {
634
-					listObj.grid.search();
635
-			},
636
-			save: function() {
637
-					const formId = '#ITP_FORM_ORDMNG03010_DETAIL';
638
-					itp_fn_form_clear_validate(null, formId);
639
-					if (createObj.isValid(formId)) {
640
-							let param = $(formId).serializeObject();
641
-							console.log(JSON.stringify(param));
642
-							var searhFn = function() {
643
-									ITP_FORM_ORDMNG03010_DETAIL_IS_WRITING = false;
644
-									listObj.grid.search();
645
-							};
646
-							fn_ajax_call(API_SAVE_SPPLY_INV, JSON.stringify(param), searhFn, 'POST');
647
-					}
648
-			}
649
-	},
650
-	isValid: function(formId) {
651
-			var isValid = false;
652
-			$(formId).find('input, select, checkbox, textarea').each(function(k) {
653
-					if($(this).data('check-required')) {
654
-							var arry = $(this).data('check-required').split(',');
655
-							isValid = itp_fn_form_validate(formId, '#' + $(this).attr('id'), arry, undefined);
656
-					if(!isValid) return false;
657
-					}
658
-			});
659
-			return isValid;
660
-	}
661
-};
662
-
663
-var itemClassLevel = {
664
-	level: 1,
665
-	levelID: '',
666
-	data: [],
667
-	keys: function() {
668
-			var keys = {sBrandId:fn_make_user_info.get('brandId'), sItemLevel: this.level};
669
-			for(var i=1; i<=this.level; i++) {
670
-					var key = 'sItemClass' + i;
671
-					var id = '#' + this.levelID + i;
672
-					keys[key] = $(id + ' option:selected').val();
673
-			}
674
-			return keys;
675
-	},
676
-	make: function(level, mode) {
677
-			this.level = level;
678
-			this.levelID = (mode === 'LIST' ? 'ITP_FORM_ORDMNG03010_SEARCH_ITEM_CLASS' : 'ITP_FORM_ORDMNG03010_DETAIL_ITEM_CLASS');
679
-			if(mode !== 'MODIFY') {
680
-					this.data.length = 0;
681
-					this.clear(1);
682
-			}
683
-			this.call($.param(this.keys()), mode === 'MODIFY');
684
-	},
685
-	change: function(level) {
686
-			this.level = level;
687
-			this.clear(level);
688
-			this.call($.param(this.keys()), false);
689
-	},
690
-	call: function(param, isModify) {
691
-			var _this = this;
692
-			var callbackFn = function(result) {
693
-					var id = _this.levelID + _this.level;
694
-					fn_make_select_item_class(result.searchList, id, true, _this.emptyText());
695
-					if(isModify) {
696
-							$('#' + id).val(_this.data[ _this.level - 1]);
697
-							if(_this.level < _this.data.length) {
698
-									if(_this.data[_this.level] !== '') {
699
-											_this.level++;
700
-											_this.call( $.param(_this.keys()), isModify);
701
-									}
702
-							}
703
-					}
286
+				},
287
+				onPaging: function(action) {
288
+					itp_fn_grid_paging(ORDMNG03010_GRID_ID, action, param);
289
+				}
704 290
 			};
705
-			fn_ajax_call(API_ITEM_CLASS_LEVEL, param, callbackFn, 'GET');
706
-	},
707
-	emptyText: function() {
708
-			return '품목분류Level' + this.level;
709
-	},
710
-	clear: function(level) {
711
-			for(var i=level; i<5; i++) {
712
-					$('#' + (this.levelID + i)).find('option:not(:first)').remove();
713
-			}
291
+			itp_fn_grid_make_remote(option);
292
+		},
714 293
 	}
715 294
 };

+ 22 - 4
src/main/webapp/js/app/popup/biz/ITP_BIZPOP_DLV_STTMT_PRN.js

@@ -24,7 +24,6 @@ function itp_fn_BIZPOP_DLV_STTMT_PRN(parentPopFn, args, returnType) {
24 24
 	$('#ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_BRAND_ID').val(args.brandId);
25 25
 	$('#ITP_FORM_ITP_BIZPOP_DLV_STTMT_PRN_DLV_STTMT_UNQ_NO').val(args.dlvSttmtUnqNo);
26 26
 	
27
-	
28 27
 
29 28
 	$('#ITP_BIZPOP_DLV_STTMT_PRN').one('shown.bs.modal', function(e) {
30 29
 		itp_fn_jqgrid_resize(THIS_GIRD_ID, '#ITP_BIZPOP_DLV_STTMT_PRN_jqGrid_list', '');
@@ -106,15 +105,35 @@ function itp_fn_BIZPOP_DLV_STTMT_PRN(parentPopFn, args, returnType) {
106 105
 	};
107 106
 	
108 107
 	pageObj.call(param);
109
-	
108
+	pageObj.button();
110 109
 };
111 110
 
112 111
 
113 112
 let pageObj = {
113
+	init: function() {
114
+		this.button();
115
+	},
114 116
 	call: function( param) {
115
-		
116 117
 		fn_ajax_call(API_POP_INV_INFO, JSON.stringify(param), this.callback, 'POST');
117 118
 	},
119
+	button: function() {
120
+		$('#ITP_BIZPOP_DLV_STTMT_PRN_BTN_PRINT').on('click', function (printDiv){
121
+			  var divToPrint=document.getElementById('ITP_BIZPOP_DLV_STTMT_PRN_PRINT_AREA');
122
+
123
+			  var newWin=window.open('','Print-Window');
124
+
125
+			  newWin.document.open();
126
+
127
+			  newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');
128
+
129
+			  newWin.document.close();
130
+
131
+			  setTimeout(function(){newWin.close();},10);
132
+		});
133
+
134
+		
135
+	}, 
136
+	
118 137
 	callback: function (result) {
119 138
 		console.log(result);
120 139
 		$('#ITP_BIZPOP_DLV_STTMT_PRN .fnDlvSttmtUnqNo').text(result.dlvSttmtUnqNo);
@@ -144,7 +163,6 @@ let pageObj = {
144 163
 			this.gridRows = gridRows;
145 164
 			this.unload();
146 165
 			this.load(gridRows);
147
-		
148 166
 		},
149 167
 		gridId: '#ITP_BIZPOP_DLV_STTMT_PRN_jqGrid',
150 168
 		gridList: '#ITP_BIZPOP_DLV_STTMT_PRN_jqGrid',