Explorar o código

Merge branch 'master' of http://106.246.249.162:13000/orderqueen/oqpo-view

juney %!s(int64=2) %!d(string=hai) anos
pai
achega
64f27c1f72

+ 62 - 71
bin/src/main/webapp/js/app/stockmng/ITP_STOCKMNG04010.js

@@ -231,8 +231,6 @@ let pageObj = {
231 231
 						case 'ITP_BTN_STOCKMNG04010_CANCELLIST'			: createObj.button.cancel(); 	break;	// 취소/목록 버튼
232 232
 						case 'ITP_BTN_STOCKMNG04010_DELETE'				: 								break;	// 삭제 버튼
233 233
 						case 'ITP_BTN_STOCKMNG04010_SAVE'				: createObj.button.save(); 		break;	// 저장 버튼
234
-						case 'ITP_FORM_STOCKMNG04010_DETAIL_DUP'		: createObj.button.duplicate();	break;	// 중복체크
235
-						case 'ITP_BTN_STOCKMNG04010_RESET_PW'			: createObj.button.resetPass();	break;	// 상세:비밀번호 초기화
236 234
 						case 'ITP_BTN_STOCKMNG04010_DETAIL_ADDROW'		: locInfoObj.button.addRow();	break;	// 상세:추가버튼
237 235
 						case 'ITP_BTN_STOCKMNG04010_DETAIL_DELROW'		: locInfoObj.button.delRow();	break;	// 상세:삭제버튼
238 236
 					}
@@ -268,30 +266,31 @@ let pageObj = {
268 266
 			$('#ITP_BTN_STOCKMNG04010_MODIFY').hide();
269 267
 			$('#ITP_BTN_STOCKMNG04010_NEWREG').hide();
270 268
 			$('#ITP_BTN_STOCKMNG04010_DELETE').hide();
271
-			$('#ITP_BTN_STOCKMNG04010_RESET_PW').hide();
269
+			
272 270
 			fn_show_btn_auth('#ITP_BTN_STOCKMNG04010_CANCELLIST');
273 271
 			fn_show_btn_auth('#ITP_BTN_STOCKMNG04010_SAVE');
274 272
 
275 273
 			$('#ITP_AJAX_STOCKMNG04010_LIST_CONTAINER').hide();
276 274
 			$('#ITP_AJAX_STOCKMNG04010_DETAIL_CONTAINER').show();
277 275
 			$('#ITP_AJAX_STOCKMNG04010_VIEW_CONTAINER').hide();
278
-			$('#ITP_FORM_STOCKMNG04010_DETAIL_USER_ID').removeAttr('readonly');
279
-			$('#ITP_FORM_STOCKMNG04010_DETAIL_DUP').removeAttr('disabled');
280
-
276
+						
277
+			var data = JSON.parse(sessionStorage.getItem('itp_manage_brand_cd'));
281 278
 			$('#ITP_FORM_STOCKMNG04010_DETAIL_VIEW_CD').val('C');
282
-			$('#ITP_FORM_STOCKMNG04010_DETAIL_USER_NM').val('');
283
-			$('#ITP_FORM_STOCKMNG04010_DETAIL_USER_STAT_CD').val('');
284
-			$('#ITP_FORM_STOCKMNG04010_DETAIL_USER_ID').val('');
285
-			$('#ITP_FORM_STOCKMNG04010_DETAIL_USER_PW').val('');
286
-			$('#ITP_FORM_STOCKMNG04010_DETAIL_TEL_NO').val('');
287
-			$('#ITP_FORM_STOCKMNG04010_DETAIL_USER_PW_CONFIRM').val('');
288
-			$('#ITP_FORM_STOCKMNG04010_DETAIL_EMAIL').val('');
289
-
290
-			$('#ITP_FORM_STOCKMNG04010_DETAIL_SEARCH_AFFL_SHOP_ID').val('');
291
-			$('#ITP_FORM_STOCKMNG04010_DETAIL_SEARCH_AFFL_SHOP_NM').val('');
292
-			$('#ITP_FORM_STOCKMNG04010_DETAIL_SEARCH_BRAND_ID option').remove();
293
-			$('#ITP_FORM_STOCKMNG04010_DETAIL_SEARCH_AFFL_SHOP').show();
294
-			$('#ITP_FORM_STOCKMNG04010_DETAIL_DELETE_AFFL_SHOP').show();
279
+			$('#ITP_FORM_STOCKMNG04010_DETAIL_BRAND_ID').val(data.brandId);
280
+			$('#ITP_FORM_STOCKMNG04010_DETAIL .fnBrandNm').text(data.brandNm);
281
+			$('#ITP_FORM_STOCKMNG04010_DETAIL .fnWhsId').text('');
282
+			$('#ITP_FORM_STOCKMNG04010_DETAIL .fnRegDtm').text('');
283
+			$('#ITP_FORM_STOCKMNG04010_DETAIL_STORE_ID').val('');
284
+			$('#ITP_FORM_STOCKMNG04010_DETAIL_WHS_ID').val('');
285
+			$('#ITP_FORM_STOCKMNG04010_DETAIL_WHS_ST_CD').val('');
286
+			$('#ITP_FORM_STOCKMNG04010_DETAIL_WHS_NM').val('');
287
+			$('#ITP_FORM_STOCKMNG04010_DETAIL_MGR_TEL_NO').val('');
288
+			$('#ITP_FORM_STOCKMNG04010_DETAIL_MGR_NM').val('');
289
+			$('#ITP_FORM_STOCKMNG04010_DETAIL_STORE_NM').val('');
290
+			$('#ITP_FORM_STOCKMNG04010_DETAIL_ZIPNO').val('');
291
+			$('#ITP_FORM_STOCKMNG04010_DETAIL_LOAD_ADDR').val('');
292
+			$('#ITP_FORM_STOCKMNG04010_DETAIL_DTL_ADDR').val('');
293
+			
295 294
 		} else if(mode == 'MODIFY') { // 수정
296 295
 			$('#ITP_BTN_STOCKMNG04010_SRH').hide();
297 296
 			$('#ITP_BTN_STOCKMNG04010_MODIFY').hide();
@@ -304,8 +303,8 @@ let pageObj = {
304 303
 			$('#ITP_AJAX_STOCKMNG04010_LIST_CONTAINER').hide();
305 304
 			$('#ITP_AJAX_STOCKMNG04010_DETAIL_CONTAINER').show();
306 305
 			$('#ITP_AJAX_STOCKMNG04010_VIEW_CONTAINER').hide();
307
-			$('#ITP_FORM_STOCKMNG04010_DETAIL_USER_ID').attr('readonly', true);
308
-			$('#ITP_FORM_STOCKMNG04010_DETAIL_DUP').attr('disabled', true);
306
+			// $('#ITP_FORM_STOCKMNG04010_DETAIL_USER_ID').attr('readonly', true);
307
+			// $('#ITP_FORM_STOCKMNG04010_DETAIL_DUP').attr('disabled', true);
309 308
 			$('#ITP_FORM_STOCKMNG04010_DETAIL_SEARCH_AFFL_SHOP_NM').attr('readonly', true);
310 309
 
311 310
 			$('#ITP_FORM_STOCKMNG04010_DETAIL_SEARCH_AFFL_SHOP').hide();
@@ -341,9 +340,9 @@ let listObj = {
341 340
 			$(STOCKMNG04010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
342 341
 		},
343 342
 		create: function() {
344
-			pageObj.switchScreen('ADD');
345
-			itp_fn_form_clear_validate(null, '#ITP_FORM_STOCKMNG04010_DETAIL');
346
-			// 권한정보 리스트 조회
343
+			pageObj.switchScreen('ADD');			
344
+			itp_fn_form_clear_validate(null, '#ITP_FORM_STOCKMNG04010_DETAIL');						
345
+			// 로케이션 리스트 조회
347 346
 			createObj.init();
348 347
 		}
349 348
 	},
@@ -457,9 +456,11 @@ let viewObj = {
457 456
 		$('#ITP_FORM_STOCKMNG04010_VIEW .fnWhsNm').text(result.whsNm);
458 457
 		$('#ITP_FORM_STOCKMNG04010_VIEW .fnTelNo').text(result.mgrTelNo);
459 458
 		$('#ITP_FORM_STOCKMNG04010_VIEW .fnMgrNm').text(result.mgrNm);		
460
-		$('#ITP_FORM_STOCKMNG04010_VIEW .fnSpplyNm').text(result.storeNm);		
461
-		$('#ITP_FORM_STOCKMNG04010_VIEW .fnRegDtm').text(result.sysRegDttm);		
462
-		$('#ITP_FORM_STOCKMNG04010_VIEW .fnAddress').text('('+result.zipNo+') ' + result.addr1 + ' ' + result.addr2);		
459
+		$('#ITP_FORM_STOCKMNG04010_VIEW .fnSpplyNm').text(result.storeNm ? result.storeNm : '');		
460
+		$('#ITP_FORM_STOCKMNG04010_VIEW .fnRegDtm').text(result.sysRegDttm);
461
+		if(result.zipNo) {
462
+			$('#ITP_FORM_STOCKMNG04010_VIEW .fnAddress').text('('+result.zipNo+') ' + result.addr1 + ' ' + result.addr2);	
463
+		}		
463 464
 
464 465
 		// 권한정보 리스트 조회
465 466
 		viewObj.grid.init();
@@ -641,51 +642,41 @@ let createObj = {
641 642
 			listObj.grid.search();
642 643
 		},
643 644
 		save: function() {
645
+			var detailViewCd = $('#ITP_FORM_STOCKMNG04010_DETAIL_VIEW_CD').val();
644 646
 			const formId = '#ITP_FORM_STOCKMNG04010_DETAIL';
645 647
 			itp_fn_form_clear_validate(null, formId);
646
-			var vali_userId = itp_fn_form_validate(formId, formId + '_USER_ID', ['empty'], undefined);
647
-			var vali_userStatCd = itp_fn_form_validate(formId, formId + '_USER_STAT_CD', ['empty'], undefined);
648
-			var vali_userNm = itp_fn_form_validate(formId, formId + '_USER_NM', ['empty'], undefined);
649
-			var vali_telNo = itp_fn_form_validate(formId, formId + '_TEL_NO', ['empty'], undefined);
650
-			var vali_email = itp_fn_form_validate(formId, formId + '_EMAIL', ['empty'], undefined);
651
-			var vali_userPw = true;
652
-			var vali_userPwConfirm = true;
653
-			if($('#ITP_FORM_STOCKMNG04010_DETAIL_VIEW_CD').val() == 'C') { // 신규
654
-				vali_userPw = itp_fn_form_validate(formId, formId + '_USER_PW', ['empty'], undefined);
655
-				vali_userPwConfirm = itp_fn_form_validate(formId, formId + '_USER_PW_CONFIRM', ['empty'], undefined);
656
-			}
657
-			if (vali_userId && vali_userStatCd && vali_userNm && vali_userPw && vali_userPwConfirm && vali_telNo && vali_email) {
658
-				if (ITP_FORM_STOCKMNG04010_DETAIL_IS_DUPLICATE) {
659
-					itp_fn_modal_duplicate(ITP_MSG_LOCALE.label.userId, formId + '_USER_ID');
660
-				} else {
661
-					let gridInsertData = [];
662
-					let gridUpdateData = [];
663
-					let gridDeleteData = [];
664
-					const rowData = $(STOCKMNG04010_DETAIL_GRID_ID).getRowData();
665
-					const keyValue = $(formId + '_USER_ID').val();
666
-					$.each(rowData, function(key, value) {
667
-						if (value.viewCd != 'R') {
668
-							value.userId = keyValue;
669
-							if (value.viewCd == 'C') {
670
-								gridInsertData.push(value);
671
-							} else if (value.viewCd == 'U') {
672
-								gridUpdateData.push(value);
673
-							} else if (value.viewCd == 'D') {
674
-								gridDeleteData.push(value);
675
-							}
648
+			
649
+			var vali_whsStatCd = itp_fn_form_validate(formId, formId + '_WHS_ST_CD', ['empty'], undefined); // 상태
650
+			var vali_whsNm = itp_fn_form_validate(formId, formId + '_WHS_NM', ['empty'], undefined);
651
+			
652
+			if (vali_whsStatCd && vali_whsNm) {
653
+				let gridInsertData = [];
654
+				let gridUpdateData = [];
655
+				let gridDeleteData = [];
656
+				const rowData = $(STOCKMNG04010_DETAIL_GRID_ID).getRowData();
657
+				// const keyValue = $(formId + '_WHS_ID').val();
658
+				$.each(rowData, function(key, value) {
659
+					if (value.viewCd != 'R') {
660
+						// value.whsId = keyValue;
661
+						if (value.viewCd == 'C') {
662
+							gridInsertData.push(value);
663
+						} else if (value.viewCd == 'U') {
664
+							gridUpdateData.push(value);
665
+						} else if (value.viewCd == 'D') {
666
+							gridDeleteData.push(value);
676 667
 						}
677
-					});
678
-					let param = $(formId).serializeObject();
679
-					param.gridInsertData = gridInsertData;
680
-					param.gridUpdateData = gridUpdateData;
681
-					param.gridDeleteData = gridDeleteData;
682
-					//console.log(JSON.stringify(param));
683
-					var searhFn = function() {
684
-						ITP_FORM_STOCKMNG04010_DETAIL_IS_WRITING = false;
685
-						listObj.grid.search();
686
-					};
687
-					fn_ajax_call(WHS_MNG_MIDIFY_WHS, JSON.stringify(param), searhFn, 'POST');
688
-				}
668
+					}
669
+				});
670
+				let param = $(formId).serializeObject();
671
+				param.gridInsertData = gridInsertData;
672
+				param.gridUpdateData = gridUpdateData;
673
+				param.gridDeleteData = gridDeleteData;
674
+				//console.log(JSON.stringify(param));
675
+				var searhFn = function() {
676
+					ITP_FORM_STOCKMNG04010_DETAIL_IS_WRITING = false;
677
+					listObj.grid.search();
678
+				};
679
+				fn_ajax_call(detailViewCd == 'C' ? WHS_MNG_ADD_WHS : WHS_MNG_MIDIFY_WHS, JSON.stringify(param), searhFn, 'POST');
689 680
 			}
690 681
 		}
691 682
 	},
@@ -814,8 +805,8 @@ let locInfoObj = {
814 805
 		create: function(rowDataPop) {
815 806
 			// console.log(rowDataPop);
816 807
 			if(rowDataPop.AFFL_SHOP) {
817
-				$('#ITP_FORM_STOCKMNG04010_DETAIL_SEARCH_AFFL_SHOP_ID').val(rowDataPop.AFFL_SHOP.afflShopId);
818
-				$('#ITP_FORM_STOCKMNG04010_DETAIL_SEARCH_AFFL_SHOP_NM').val(rowDataPop.AFFL_SHOP.afflShopNm);
808
+				// $('#ITP_FORM_STOCKMNG04010_DETAIL_SEARCH_AFFL_SHOP_ID').val(rowDataPop.AFFL_SHOP.afflShopId);
809
+				// $('#ITP_FORM_STOCKMNG04010_DETAIL_SEARCH_AFFL_SHOP_NM').val(rowDataPop.AFFL_SHOP.afflShopNm);
819 810
 			}
820 811
 			if(rowDataPop.AFFL_BRAND) {
821 812
 				fn_make_select_brand(rowDataPop.AFFL_BRAND, 'ITP_FORM_STOCKMNG04010_DETAIL_SEARCH_BRAND_ID', true, '선택');

+ 47 - 0
src/main/webapp/app/popup/biz/BIZPOP_PO_STOCK_HIST.html

@@ -0,0 +1,47 @@
1
+<div id="ITP_BIZPOP_PO_STOCK_HIST" class="modal itp_modal">
2
+	<div class="modal-dialog">
3
+		<div class="modal-content">
4
+			<form id="ITP_FORM_BIZPOP_PO_STOCK_HIST">
5
+			<input type="hidden" id="ITP_FORM_BIZPOP_PO_STOCK_HIST_BRAND_ID" name="sbrandId" value="">
6
+			<input type="hidden" id="ITP_FORM_BIZPOP_PO_STOCK_HIST_WHS_ID" name="swhsId" value="">
7
+			<input type="hidden" id="ITP_FORM_BIZPOP_PO_STOCK_HIST_LOCATION" name="slocation" value="">
8
+			<input type="hidden" id="ITP_FORM_BIZPOP_PO_STOCK_HIST_ITEM_ID" name="sitemId" value="">
9
+			
10
+				<div class="modal-header">
11
+					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
12
+					<h5 class="modal-title">재고이력</h5>
13
+				</div>
14
+				<div class="modal-body">
15
+					<div class="itp_form fix">
16
+						<div class="col-xs-12 itp_form_inline">
17
+							<div class="form-horizontal fix">
18
+								<div class="col-xs-5 itp_ip">
19
+									<div class="input-daterange input-group date">
20
+										<input type="text" id="ITP_FORM_BIZPOP_PO_STOCK_HIST_FROM_DT" class="form-control itp_input" name="fromDt" value="" readonly>
21
+										<span class="input-group-addon itp_date_to">~</span>
22
+										<input type="text" id="ITP_FORM_BIZPOP_PO_STOCK_HIST_TO_DT" class="form-control itp_input" name="toDt" value="" readonly>
23
+									</div>
24
+								</div>
25
+							
26
+								<div class="col-xs-5 itp_ip itp_pr">
27
+									<select id="ITP_FORM_BIZPOP_PO_STOCK_HIST_INOUT_CD" class="form-control itp_input" name="sinoutCd"></select>	
28
+								</div>
29
+								<div class="pull-right itp_cicon">
30
+									<button type="button" class="btn btn-success btn-sm" id="ITP_BIZPOP_PO_STOCK_HIST_BTN_SEARCH" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i> 조회</button>
31
+								</div>
32
+							</div>
33
+						</div>
34
+					</div>
35
+					<div id="ITP_BIZPOP_PO_STOCK_HIST_jqGrid_list" class="itp_tb_list" data-total-cnt="">
36
+						<div id="ITP_BIZPOP_PO_STOCK_HIST_jqGridView" class="itp_views fix"></div>
37
+						<table id="ITP_BIZPOP_PO_STOCK_HIST_jqGrid"></table>
38
+						<div id="ITP_BIZPOP_PO_STOCK_HIST_jqGridPager"></div>
39
+						<div id="ITP_BIZPOP_PO_STOCK_HIST_jqGridEmpty" class="itp_no_data"></div>
40
+					</div>
41
+				</div>
42
+			</form>
43
+		</div>
44
+	</div>
45
+
46
+	<div id="ITP_POPUP_JS"></div>
47
+</div>

+ 66 - 28
src/main/webapp/app/stockmng/STOCKMNG02010.html

@@ -5,7 +5,7 @@
5 5
 				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i> <strong>재고실사</strong></h2>
6 6
 				<div class="pull-right itp_cicon">
7 7
 					<button type="button" id="ITP_BTN_STOCKMNG02010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;조회&nbsp;&nbsp;</button>
8
-					<button type="button" id="ITP_BTN_STOCKMNG02010_SRH" class="btn btn-success btn-sm " style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;재고실사&nbsp;&nbsp;</button>
8
+					<button type="button" id="ITP_BTN_STOCKMNG02010_STOCK_CDD" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;재고실사&nbsp;&nbsp;</button>
9 9
 					<button type="button" id="ITP_BTN_STOCKMNG02010_SAVE" class="btn btn-success btn-sm SAB"><i class="glyphicon "></i>&nbsp;&nbsp;저장&nbsp;&nbsp;</button>
10 10
 					<button type="button" id="ITP_BTN_STOCKMNG02010_CANCELLIST" class="btn btn-warning btn-sm PRB"><i class="glyphicon "></i>&nbsp;&nbsp;취소/목록&nbsp;&nbsp;</button>
11 11
 				</div>					
@@ -16,10 +16,13 @@
16 16
 						<div class="itp_srh_border fix">
17 17
 							<div class="col-xs-12">
18 18
 								<form id="ITP_FORM_STOCKMNG02010_SEARCH" class="form-horizontal">
19
+									<input type="hidden" id="ITP_FORM_STOCKMNG02010_SEARCH_BRAND_ID" name="sbrandId" value="">
20
+									<input type="hidden" id="ITP_FORM_STOCKMNG02010_SEARCH_STORE_ID" name="sstoreId" value="">
21
+								
19 22
 									<div class="form-group">
20 23
 										<div class="col-xs-10">
21 24
 											<div class="col-xs-2 itp_ip itp_noMar">
22
-												<select id="ITP_FORM_STOCKMNG02010_SERVICE_CDD_DT" class="form-control itp_input" name="serviceCddDt">
25
+												<select class="form-control itp_input">
23 26
 													<option value="">실사기준일</option>											
24 27
 												</select>
25 28
 											</div>
@@ -31,14 +34,10 @@
31 34
 												</div>
32 35
 											</div>
33 36
 											<div class="col-xs-2 itp_ip itp_noMar">
34
-												<select id="ITP_FORM_STOCKMNG02010_SEARCH_WHS_MGNT_BASE_INFO " class="form-control itp_input" name="sWhsMgntBaseInfo">
35
-													<option value="">창고</option>											
36
-												</select>	
37
+												<select id="ITP_FORM_STOCKMNG02010_SEARCH_WHS_ID" class="form-control itp_input" name="swhsId"></select>	
37 38
 											</div>
38 39
 											<div class="col-xs-3 itp_ip itp_noMar">
39
-												<select id="ITP_FORM_STOCKMNG02010_SEARCH_WHS_MGNT_BASE_LOC" class="form-control itp_input" name="sWhsMgntBaseLoc">
40
-													<option value="">판매용/B품/폐기품</option>											
41
-												</select>										
40
+												<select id="ITP_FORM_STOCKMNG02010_SEARCH_LOCATION" class="form-control itp_input" name="slocation"></select>										
42 41
 											</div>
43 42
 										</div>
44 43
 									</div>
@@ -55,30 +54,77 @@
55 54
 						</div>
56 55
 					</div>
57 56
 				</div>
58
-				<div id="ITP_AJAX_STOCKMNG02010_LIST_CONTAINER">
57
+				<div id="ITP_AJAX_STOCKMNG02010_DETAIL_CONTAINER">
59 58
 					<div class="itp_lg_form itp_type1 fix">
60 59
 						<div class="itp_srh_border fix">
61 60
 							<div class="col-xs-12">
62
-								<form id="ITP_FORM_STOCKMNG02010_SEARCH" class="form-horizontal">
61
+								<form id="ITP_FORM_STOCKMNG02010_DETAIL" class="form-horizontal">
62
+									<input type="hidden" id="ITP_FORM_STOCKMNG02010_DETAIL_BRAND_ID" name="brandId" value="">
63
+									<input type="hidden" id="ITP_FORM_STOCKMNG02010_DETAIL_STORE_ID" name="storeId" value="">
64
+								
65
+									<div class="form-group">
66
+										<div class="col-xs-10">
67
+											<div class="col-xs-2 itp_ip itp_noMar">
68
+												<div class="input-group date">
69
+												<input type="text" id="ITP_FORM_STOCKMNG02010_DETAIL_CDD_DT" class="form-control itp_input" name="cddDt" readonly>
70
+												<span class="input-group-addon itp_input itp_date_to">
71
+													<i class="glyphicon glyphicon-calendar"></i>
72
+												</span>
73
+												</div>												
74
+											</div>
75
+											<div class="col-xs-2 itp_ip itp_noMar">
76
+												<select id="ITP_FORM_STOCKMNG02010_DETAIL_WHS_ID" class="form-control itp_input" name="whsId" disabled="disabled"></select>	
77
+											</div>
78
+											<div class="col-xs-3 itp_ip itp_noMar">
79
+												<select id="ITP_FORM_STOCKMNG02010_DETAIL_LOCATION" class="form-control itp_input" name="location" disabled="disabled"></select>										
80
+											</div>
81
+											<div class="col-xs-2 itp_ip">
82
+												<button type="button" id="ITP_BTN_STOCKMNG02010_DETAIL_EXCEL_UPLOAD" class="btn btn-warning btn-sm FFB"><i class="glyphicon "></i>&nbsp;&nbsp;엑셀업로드&nbsp;&nbsp;</button>
83
+											</div>
84
+										</div>
85
+									</div>
86
+								</form>
87
+							</div>
88
+						</div>
89
+					</div>
90
+					<div class="fix" style="padding-right:15px;margin-bottom: 13px;">
91
+						<div class="pull-right itp_cicon">
92
+							<button type="button" id="ITP_BTN_STOCKMNG02010_DETAIL_ADDROW" class="btn btn-primary btn-sm ARB" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;품목추가&nbsp;&nbsp;</button>
93
+						</div>
94
+					</div>
95
+					<div class="itp_table fix">
96
+						<div id="ITP_STOCKMNG02010_DETAIL_jqGrid_list" class="itp_tb_list itp_gType1" data-total-cnt="${totalCnt}">
97
+							<div id="ITP_STOCKMNG02010_DETAIL_jqGridView" class="itp_views fix"></div>
98
+							<table id="ITP_STOCKMNG02010_DETAIL_jqGrid"></table>
99
+							<div id="ITP_STOCKMNG02010_DETAIL_jqGridPager"></div>
100
+							<div id="ITP_STOCKMNG02010_DETAIL_jqGridEmpty" class="itp_no_data"></div>
101
+						</div>
102
+					</div>
103
+				</div>
104
+				<div id="ITP_AJAX_STOCKMNG02010_VIEW_CONTAINER">
105
+					<div class="itp_lg_form itp_type1 fix">
106
+						<div class="itp_srh_border fix">
107
+							<div class="col-xs-12">
108
+								<form id="ITP_FORM_STOCKMNG02010_VIEW_SEARCH" class="form-horizontal">
63 109
 									<div class="form-group">
64 110
 										<div class="col-xs-10">
65 111
 											<div class="col-xs-2 itp_ip itp_noMar">
66
-												<select id="ITP_FORM_STOCKMNG02010_SERVICE_CDD_DT" class="form-control itp_input" name="serviceCddDt">
112
+												<select id="ITP_FORM_STOCKMNG02010_VIEW_SERVICE_CDD_DT" class="form-control itp_input" name="serviceCddDt">
67 113
 													<option value="">실사기준일</option>											
68 114
 												</select>
69 115
 											</div>
70 116
 											<div class="col-xs-2 itp_ip itp_noMar">
71
-												<select id="ITP_FORM_STOCKMNG02010_SERVICE_WHS_NM" class="form-control itp_input" name="servicewhsNm">
117
+												<select id="ITP_FORM_STOCKMNG02010_VIEW_SERVICE_WHS_NM" class="form-control itp_input" name="servicewhsNm">
72 118
 													<option value="">창고</option>											
73 119
 												</select>	
74 120
 											</div>
75 121
 											<div class="col-xs-3 itp_ip itp_noMar">
76
-												<select id="ITP_FORM_STOCKMNG02010_SEARCH_STCK_DVSN" class="form-control itp_input" name="sStckDvsn">
122
+												<select id="ITP_FORM_STOCKMNG02010_VIEW_SEARCH_STCK_DVSN" class="form-control itp_input" name="sStckDvsn">
77 123
 												<option value="">판매용/B품/폐기품</option>											
78 124
 												</select>										
79 125
 											</div>
80 126
 											<div class="col-xs-2 itp_ip">
81
-												<button type="button" id="ITP_BTN_STOCKMNG02010_CANCELLIST" class="btn btn-warning btn-sm PRB"><i class="glyphicon "></i>&nbsp;&nbsp;엑셀업로드&nbsp;&nbsp;</button>
127
+												<button type="button" id="ITP_BTN_STOCKMNG02010_VIEW_CANCELLIST" class="btn btn-warning btn-sm PRB"><i class="glyphicon "></i>&nbsp;&nbsp;엑셀업로드&nbsp;&nbsp;</button>
82 128
 											</div>
83 129
 										</div>
84 130
 									</div>
@@ -88,26 +134,18 @@
88 134
 					</div>
89 135
 					<div class="fix" style="padding-right:10px;">
90 136
 						<div class="pull-right itp_cicon">
91
-							<button type="button" id="ITP_BTN_STOCKMNG02010_ADDROW" class="btn btn-primary btn-sm ARB" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;품목추가&nbsp;&nbsp;</button>
137
+							<button type="button" id="ITP_BTN_STOCKMNG02010_VIEW_ADDROW" class="btn btn-primary btn-sm ARB" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;품목추가&nbsp;&nbsp;</button>
92 138
 						</div>
93 139
 					</div>
94 140
 					<div class="itp_table fix">
95
-						<div id="ITP_STOCKMNG02010_jqGrid_list" class="itp_tb_list itp_gType1" data-total-cnt="${totalCnt}">
96
-							<div id="ITP_STOCKMNG02010_jqGridView" class="itp_views fix"></div>
97
-							<table id="ITP_STOCKMNG02010_jqGrid"></table>
98
-							<div id="ITP_STOCKMNG02010_jqGridPager"></div>
99
-							<div id="ITP_STOCKMNG02010_jqGridEmpty" class="itp_no_data"></div>
141
+						<div id="ITP_STOCKMNG02010_VIEW_jqGrid_list" class="itp_tb_list itp_gType1" data-total-cnt="${totalCnt}">
142
+							<div id="ITP_STOCKMNG02010_VIEW_jqGridView" class="itp_views fix"></div>
143
+							<table id="ITP_STOCKMNG02010_VIEW_jqGrid"></table>
144
+							<div id="ITP_STOCKMNG02010_VIEW_jqGridPager"></div>
145
+							<div id="ITP_STOCKMNG02010_VIEW_jqGridEmpty" class="itp_no_data"></div>
100 146
 						</div>
101 147
 					</div>
102 148
 				</div>
103
-				<div class="itp_table fix">
104
-					<div id="ITP_STOCKMNG02010_jqGrid_list" class="itp_tb_list itp_gType1" data-total-cnt="${totalCnt}">
105
-						<div id="ITP_STOCKMNG02010_jqGridView" class="itp_views fix"></div>
106
-						<table id="ITP_STOCKMNG02010_jqGrid"></table>
107
-						<div id="ITP_STOCKMNG02010_jqGridPager"></div>
108
-						<div id="ITP_STOCKMNG02010_jqGridEmpty" class="itp_no_data"></div>
109
-					</div>
110
-				</div>
111 149
 			</div>
112 150
 		</article>
113 151
 	</div>

+ 122 - 0
src/main/webapp/js/app/popup/biz/ITP_BIZPOP_PO_STOCK_HIST.js

@@ -0,0 +1,122 @@
1
+require(['config'], function() {
2
+	require([
3
+		'jquery'
4
+	], function($) {
5
+
6
+	});
7
+});
8
+
9
+let STOCK_MNG_HIST_GRID_LIST = '/api/stock/mng/hist-grid-list';
10
+
11
+function itp_fn_BIZPOP_PO_STOCK_HIST(parentPopFn, args, returnType) {
12
+	
13
+	// console.log(JSON.stringify(args));
14
+	
15
+	let itp_BIZPOP_PO_STOCK_HIST_param = {};
16
+	let itp_BIZPOP_PO_STOCK_HIST_search = false;
17
+
18
+	const THIS_FORM_ID = '#ITP_FORM_BIZPOP_PO_STOCK_HIST';
19
+	const THIS_GIRD_ID = '#ITP_BIZPOP_PO_STOCK_HIST_jqGrid';
20
+	const THIS_GIRD_PAGER = '#ITP_BIZPOP_PO_STOCK_HIST_jqGridPager';
21
+	
22
+	$('#ITP_FORM_BIZPOP_PO_STOCK_HIST_BRAND_ID').val(args.brandId);
23
+	$('#ITP_FORM_BIZPOP_PO_STOCK_HIST_WHS_ID').val(args.whsId);
24
+	$('#ITP_FORM_BIZPOP_PO_STOCK_HIST_LOCATION').val(args.location);
25
+	$('#ITP_FORM_BIZPOP_PO_STOCK_HIST_ITEM_ID').val(args.itemId);
26
+	
27
+	var now = new Date();
28
+	$('#ITP_FORM_BIZPOP_PO_STOCK_HIST .input-group.date').datepicker(ITP_DATE_LANGUAGE);
29
+	$('#ITP_FORM_BIZPOP_PO_STOCK_HIST_FROM_DT').datepicker('setDate', new Date(now.setMonth(now.getMonth() - 1)));
30
+	$('#ITP_FORM_BIZPOP_PO_STOCK_HIST_TO_DT').datepicker('setDate', new Date());
31
+	
32
+	// 공통코드 표시
33
+	fn_make_select(CODE_LIST, 'INOUT_CD', 'ITP_FORM_BIZPOP_PO_STOCK_HIST_INOUT_CD');
34
+	
35
+	$('#ITP_BIZPOP_PO_STOCK_HIST').one('shown.bs.modal', function(e) {
36
+		itp_fn_jqgrid_resize(THIS_GIRD_ID, '#ITP_BIZPOP_PO_STOCK_HIST_jqGrid_list', '');
37
+		itp_fn_fire_window_resize();
38
+	}).one('hidden.bs.modal', function(e) {
39
+		$('#ITP_BIZPOP_PO_STOCK_HIST').remove();
40
+	}).modal('show');
41
+
42
+	$('#ITP_BIZPOP_PO_STOCK_HIST_BTN_SEARCH').on('click', function() {
43
+		itp_BIZPOP_PO_STOCK_HIST_search = true;
44
+		let param = $(THIS_FORM_ID).serializeObject();
45
+		param.gridSize = 10;
46
+		param.gridPage = $.jgrid.defaults.page;
47
+		$(THIS_GIRD_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
48
+	});
49
+
50
+	$('#ITP_BIZPOP_PO_STOCK_HIST_jqGridEmpty').on('click', function() {
51
+		itp_fn_BIZPOP_PO_STOCK_HIST_empty.back();
52
+		itp_BIZPOP_PO_STOCK_HIST_param.gridSize = 10;
53
+		$(THIS_GIRD_ID).setGridParam({'postData': JSON.stringify(itp_BIZPOP_PO_STOCK_HIST_param)}).trigger('reloadGrid');
54
+	});
55
+
56
+	var itp_fn_BIZPOP_PO_STOCK_HIST_empty = {
57
+		push: function() {
58
+			let param = $(THIS_FORM_ID).serializeObject();
59
+			itp_BIZPOP_PO_STOCK_HIST_param = param;
60
+		},
61
+		back: function() {
62
+			$(THIS_FORM_ID + '_CMPY_CD').val(itp_BIZPOP_PO_STOCK_HIST_param.scmpyCd);
63
+			$(THIS_FORM_ID + '_CMPY_NM').val(itp_BIZPOP_PO_STOCK_HIST_param.scmpyNm);
64
+			$(THIS_FORM_ID + '_CMPY_TYPE_CD').val(itp_BIZPOP_PO_STOCK_HIST_param.scmpyTypeCd);
65
+		}
66
+	};
67
+
68
+	itp_fn_BIZPOP_PO_STOCK_HIST_empty.push();
69
+	let param = $('#ITP_FORM_BIZPOP_PO_STOCK_HIST').serializeObject();
70
+	param.gridSize = 10;
71
+
72
+	$(THIS_GIRD_ID).jqGrid({
73
+		colModel: [
74
+			{
75
+				index: 'INOUT_NM', name: 'inoutNm',
76
+				label: '입출고구분', // 
77
+				width: '10', fixed: false, align: 'center',
78
+				sortable: false, hidden: false
79
+			},
80
+			{
81
+				index: 'SYS_REG_DTTM', name: 'sysRegDttm',
82
+				label: '발생일자', //
83
+				width: '12', fixed: false, align: 'center',
84
+				sortable: false, hidden: false
85
+			},
86
+			{
87
+				index: 'INOUT_QTY', name: 'inoutQty',
88
+				label: '입출고수량', //
89
+				width: '10', fixed: false, align: 'center',
90
+				sortable: false, hidden: false
91
+			},
92
+			{
93
+				index: 'CHG_DVSN_NM', name: 'chgDvsnNm',
94
+				label: '변경구분', //
95
+				width: '10', fixed: false, align: 'center',
96
+				sortable: false, hidden: false
97
+			},
98
+			{
99
+				index: 'RELATION_NO', name: 'relationNo',
100
+				label: '관련번호', //
101
+				width: '10', fixed: false, align: 'center',
102
+				sortable: false, hidden: false
103
+			}
104
+		],
105
+		loadBeforeSend: function(jqXHR) {
106
+		    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
107
+		},
108
+		postData: JSON.stringify(param),
109
+		url: DOMAIN + STOCK_MNG_HIST_GRID_LIST,
110
+		pager: THIS_GIRD_PAGER,
111
+		multiselect: false,
112
+		loadComplete: function(data) {
113
+			itp_fn_grid_load_complete(data, THIS_GIRD_ID, true, undefined, 'BIZPOP_PO_STOCK_HIST', itp_BIZPOP_PO_STOCK_HIST_search, itp_fn_BIZPOP_PO_STOCK_HIST_empty, true, data.gridRecords, false);
114
+	    },
115
+	    loadError: function(jqXHR, textStatus, errorThrown) {
116
+	    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
117
+	    },
118
+	    onPaging: function(action) {
119
+	    	itp_fn_grid_paging(THIS_GIRD_ID, action, param);
120
+	    }
121
+	}).navGrid(THIS_GIRD_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
122
+};

+ 17 - 1
src/main/webapp/js/app/stockmng/ITP_STOCKMNG01010.js

@@ -19,7 +19,6 @@ let STOCKMNG01010_DETAIL_GRID_LAST_ROW_ID;
19 19
 
20 20
 /*API URL*/
21 21
 let STOCK_MNG_DETAIL_GRID_LIST = '/api/stock/mng/detail-grid-list';
22
-let WHS_MNG_ADD_WHS = '/api/whs/mng/add-whs';
23 22
 let WHS_MNG_DETAIL_GRID_LIST = '/api/whs/mng/detail-grid-list';
24 23
 let WHS_MNG_LOCATION_GRID_LIST = '/api/whs/mng/location-grid-list';
25 24
 
@@ -265,7 +264,24 @@ let listObj = {
265 264
 			}, args, 'S');
266 265
 		}, 
267 266
 		clickStockHist: function() {
267
+			// 그리드에서 최소1개는 선택해야 함
268
+			const rowKey = $(STOCKMNG01010_GRID_ID).getGridParam('selrow');
269
+		    if (!rowKey) {
270
+				itp_fn_modal_alert_ajax(ITP_MSG_LOCALE.message.ajax.noData);
271
+		    	return;
272
+		    }
273
+			var selectedIds = $(STOCKMNG01010_GRID_ID).getGridParam('selarrrow');
274
+			if (selectedIds.length > 1) {
275
+				itp_fn_modal_alert_ajax(ITP_MSG_LOCALE.message.ajax.noSingleData);
276
+		    	return;
277
+			}
278
+			var brandId = $(STOCKMNG01010_GRID_ID).jqGrid('getRowData', selectedIds[0]).brandId;
279
+			var whsId = $(STOCKMNG01010_GRID_ID).jqGrid('getRowData', selectedIds[0]).whsId;
280
+			var location = $(STOCKMNG01010_GRID_ID).jqGrid('getRowData', selectedIds[0]).location;
281
+			var itemId = $(STOCKMNG01010_GRID_ID).jqGrid('getRowData', selectedIds[0]).itemId;
268 282
 			
283
+			var args = {'brandId': brandId, 'whsId': whsId, 'location': location, 'itemId': itemId};			
284
+			fn_call_popup('biz', 'BIZPOP_PO_STOCK_HIST', '#ITP_ASIDE', null, args, 'S');
269 285
 		}
270 286
 	},
271 287
 	empty: {

+ 694 - 0
src/main/webapp/js/app/stockmng/ITP_STOCKMNG02010.js

@@ -0,0 +1,694 @@
1
+/********************************************************
2
+ --------------------------------------------------------
3
+ - Object 목록								            -
4
+ --------------------------------------------------------
5
+ * const gridColModel = {}	: 화면 Grid Object			*
6
+ * let pageObj = {}			: 화면공통 Object			*
7
+ * let listObj = {}			: 목록화면 Object			*
8
+ * let viewObj = {}			: 상세화면 Object			*
9
+ * let stockCddObj = {}		: 재고실사 Object			*
10
+ *******************************************************/
11
+
12
+/*화면 변수*/
13
+const STOCKMNG02010_GRID_ID = '#ITP_STOCKMNG02010_jqGrid';
14
+const STOCKMNG02010_GRID_LIST = '#ITP_STOCKMNG02010_jqGrid_list';
15
+const STOCKMNG02010_GRID_PAGER = '#ITP_STOCKMNG02010_jqGridPager';
16
+const STOCKMNG02010_GRID_EMPTY = '#ITP_STOCKMNG02010_jqGridEmpty';
17
+
18
+const STOCKMNG02010_VIEW_GRID_ID = '#ITP_STOCKMNG02010_VIEW_jqGrid';
19
+const STOCKMNG02010_VIEW_GRID_LIST = '#ITP_STOCKMNG02010_VIEW_jqGrid_list';
20
+const STOCKMNG02010_VIEW_GRID_PAGER = '#ITP_STOCKMNG02010_VIEW_jqGridPager';
21
+const STOCKMNG02010_VIEW_GRID_EMPTY = '#ITP_STOCKMNG02010_VIEW_jqGridEmpty';
22
+
23
+const STOCKMNG02010_DETAIL_GRID_ID = '#ITP_STOCKMNG02010_DETAIL_jqGrid';
24
+const STOCKMNG02010_DETAIL_GRID_LIST = '#ITP_STOCKMNG02010_DETAIL_jqGrid_list';
25
+const STOCKMNG02010_DETAIL_GRID_PAGER = '#ITP_STOCKMNG02010_DETAIL_jqGridPager';
26
+const STOCKMNG02010_DETAIL_GRID_EMPTY = '#ITP_STOCKMNG02010_DETAIL_jqGridEmpty';
27
+
28
+let ITP_FORM_STOCKMNG02010_DETAIL_IS_DUPLICATE = false;
29
+let ITP_FORM_STOCKMNG02010_DETAIL_IS_WRITING = false;
30
+let STOCKMNG02010_DETAIL_GRID_LAST_ROW_ID;
31
+
32
+/* 공통코드 리스트 */
33
+// let ITP_COMMON_CD_STCK_DVSN = fn_make_common_cd_list(CODE_LIST, 'STCK_DVSN', true);
34
+// let ITP_COMMON_CD_LOC_ST_CD = fn_make_common_cd_list(CODE_LIST, 'LOC_ST_CD', true);
35
+
36
+/*API URL*/
37
+let WHS_MNG_INFO_WHS = '/api/whs/mng/info-whs';
38
+let WHS_MNG_ADD_WHS = '/api/whs/mng/add-whs';
39
+let WHS_MNG_MIDIFY_WHS = '/api/whs/mng/modify-whs';
40
+let WHS_MNG_REMOVE_WHS = '/api/whs/mng/remove-whs'; 
41
+
42
+let STOCK_CDD_DETAIL_GRID_LIST = '/api/stock/cdd/detail-grid-list';
43
+let WHS_MNG_DETAIL_GRID_LIST = '/api/whs/mng/detail-grid-list';
44
+let WHS_MNG_LOCATION_GRID_LIST = '/api/whs/mng/location-grid-list';
45
+
46
+/*화면 Grid ColModel*/
47
+const gridColModel = {
48
+	list: [
49
+		{
50
+			index: 'BRAND_ID', name: 'brandId',
51
+			label: "브랜드ID", 
52
+			width: '0', fixed: false, align: 'center',
53
+			sortable: false, hidden: true
54
+		},
55
+		{
56
+			index: 'STORE_ID', name: 'storeId',
57
+			label: "매장ID", 
58
+			width: '0', fixed: false, align: 'center',
59
+			sortable: false, hidden: true
60
+		},
61
+		{
62
+			index: 'BRAND_NM', name: 'brandNm',
63
+			label: ITP_MSG_LOCALE.label.brandNm, //브랜드
64
+			width: '10', fixed: false, align: 'center',
65
+			sortable: false, hidden: false
66
+		},
67
+		{
68
+			index: 'STORE_NM', name: 'storeNm',
69
+			label: "매장명", 
70
+			width: '10', fixed: false, align: 'center',
71
+			sortable: false, hidden: false
72
+		},
73
+		{
74
+			index: 'WHS_ID', name: 'whsId',
75
+			label: "창고번호", 
76
+			width: '8', fixed: false, align: 'center',
77
+			sortable: false, hidden: false
78
+		},
79
+		{
80
+			index: 'WHS_NM', name: 'whsNm',
81
+			label: "창고명", 
82
+			width: '10', fixed: false, align: 'center',
83
+			sortable: false, hidden: false
84
+		},
85
+		{
86
+			index: 'LOCATION_NM', name: 'locationNm',
87
+			label: "Location", 
88
+			width: '10', fixed: false, align: 'center',
89
+			sortable: false, hidden: false
90
+		},		
91
+		{
92
+			index: 'CDD_MGR_NM', name: 'cddMgrNm',
93
+			label: "실사담당자", 
94
+			width: '8', fixed: false, align: 'center',
95
+			sortable: false, hidden: false
96
+		},
97
+		{
98
+			index: 'CDD_DT', name: 'cddDt',
99
+			label: "실사일자", 
100
+			width: '8', fixed: false, align: 'center',
101
+			sortable: false, hidden: false
102
+		},
103
+		{
104
+			index: 'CDD_TM', name: 'cddTm',
105
+			label: "실사시각", 
106
+			width: '8', fixed: false, align: 'center',
107
+			sortable: false, hidden: false
108
+		},		
109
+		{
110
+			index: 'CDD_DVSN_NM', name: 'cddDvsnNm',
111
+			label: "실사구분", 
112
+			width: '10', fixed: false, align: 'center',
113
+			sortable: false, hidden: false
114
+		}
115
+	],
116
+	view: [
117
+		{
118
+			index: 'VIEW_CD', name: 'viewCd',
119
+			label: ITP_MSG_LOCALE.label.viewCd,
120
+			width: '10', fixed: false, align: 'center',
121
+			sortable: false, hidden: true
122
+		},		
123
+		{
124
+			index: 'LOCATION', name: 'location',
125
+			label: "로케이션",
126
+			width: '10', fixed: false, align: 'center',
127
+			sortable: false, editable: false, edittype: 'text',
128
+			editrules: {required: true}
129
+		},
130
+		{
131
+			index: 'LOCATION_NM', name: 'locationNm',
132
+			label: "로케이션명",
133
+			width: '12', fixed: false, align: 'center',
134
+			sortable: true, editable: false, edittype: 'text',
135
+			editrules: {required: true}
136
+		},
137
+		{
138
+			index: 'STCK_DVSN_NM', name: 'stckDvsnNm',
139
+			label: "관리등록",
140
+			width: '10', fixed: false, align: 'center',
141
+			sortable: false, editable: false, edittype: 'text'
142
+		},
143
+		{
144
+			index: 'LOC_ST_NM', name: 'locStNm',
145
+			label: "상태",
146
+			width: '10', fixed: false, align: 'center',
147
+			sortable: false, editable: false, edittype: 'text'
148
+		}
149
+	],
150
+	detail: [
151
+		{
152
+			index: 'VIEW_CD', name: 'viewCd',
153
+			label: ITP_MSG_LOCALE.label.viewCd,
154
+			width: '10', fixed: false, align: 'center',
155
+			sortable: false, hidden: true
156
+		},
157
+		{
158
+			index: 'BRAND_NM', name: 'brandNm',
159
+			label: "브랜드",
160
+			width: '10', fixed: false, align: 'center',
161
+			sortable: false, editable: false, edittype: 'text',
162
+			editrules: {required: false}
163
+		},
164
+		{
165
+			index: 'WHS_ID', name: 'whsId',
166
+			label: "창고번호",
167
+			width: '10', fixed: false, align: 'center',
168
+			sortable: false, editable: false, edittype: 'text',
169
+			editrules: {required: false}
170
+		},
171
+		{
172
+			index: 'WHS_NM', name: 'whsNm',
173
+			label: "창고명",
174
+			width: '10', fixed: false, align: 'center',
175
+			sortable: false, editable: false, edittype: 'text',
176
+			editrules: {required: false}
177
+		},
178
+		{
179
+			index: 'LOCATION_NM', name: 'locationNm',
180
+			label: "Location",
181
+			width: '10', fixed: false, align: 'center',
182
+			sortable: false, editable: false, edittype: 'text',
183
+			editrules: {required: false}
184
+		},
185
+		{
186
+			index: 'ITEM_ID', name: 'itemId',
187
+			label: "품목번호",
188
+			width: '12', fixed: false, align: 'center',
189
+			sortable: false, editable: false, edittype: 'text',
190
+			editrules: {required: false}
191
+		},
192
+		{
193
+			index: 'ITEM_NM', name: 'itemNm',
194
+			label: "품목명",
195
+			width: '10', fixed: false, align: 'center',
196
+			sortable: false, editable: false, edittype: 'text',
197
+			editrules: {required: false}
198
+		},
199
+		{
200
+			index: 'UNIT', name: 'unit',
201
+			label: "단위",
202
+			width: '8', fixed: false, align: 'center',
203
+			sortable: false, editable: false, edittype: 'text',
204
+			editrules: {required: false}
205
+		},
206
+		{
207
+			index: 'STCK_QTY', name: 'stckQty',
208
+			label: "현재고수량",
209
+			width: '8', fixed: false, align: 'center',
210
+			sortable: false, editable: false, edittype: 'text',
211
+			editrules: {required: false}
212
+		},
213
+		{
214
+			index: 'CDD_QTY', name: 'cddQty',
215
+			label: "실사수량",
216
+			width: '10', fixed: false, align: 'center',
217
+			sortable: false, editable: true, edittype: 'text',
218
+			editrules: {required: true}
219
+		}
220
+	]
221
+};
222
+
223
+require(['config'], function() {
224
+	require([
225
+	], function($) {
226
+		pageObj.init();
227
+	});
228
+});
229
+
230
+/*화면공통 Object*/
231
+let pageObj = {
232
+	init: function () {
233
+		this.ui.init();
234
+		this.event.init();
235
+	},
236
+	ui: {
237
+		init: function () {
238
+			this.view();
239
+			this.grid();
240
+			this.ready();
241
+		},
242
+		view: function() {
243
+			// 버튼 권한설정
244
+			fn_proc_btn_auth('STOCKMNG02010');
245
+			
246
+			// 브랜드ID 지정
247
+			var data = JSON.parse(sessionStorage.getItem('itp_manage_brand_info'));
248
+			$('#ITP_FORM_STOCKMNG02010_SEARCH_BRAND_ID').val(data.brandId);
249
+			
250
+			pageObj.fnWhsList(function() {
251
+				pageObj.fnLocationList();
252
+			}); // 창고리스트
253
+			
254
+			// 공통코드 표시
255
+			// fn_make_select(CODE_LIST, 'WHS_DVSN', 'ITP_FORM_STOCKMNG02010_WHS_DVSN');			
256
+
257
+			// 조회일자 지정
258
+			var now = new Date();
259
+			$('#ITP_TAB_STOCKMNG02010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
260
+			$('#ITP_FORM_STOCKMNG02010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setMonth(now.getMonth() - 1)));
261
+			$('#ITP_FORM_STOCKMNG02010_SEARCH_TO_DT').datepicker('setDate', new Date());
262
+			$('#ITP_FORM_STOCKMNG02010_DETAIL_CDD_DT').val(itp_fn_date_format(new Date(), 2));
263
+								
264
+		},
265
+		grid: function() {
266
+			itp_fn_jqgrid_resize(STOCKMNG02010_GRID_ID, STOCKMNG02010_GRID_LIST, 'lg');
267
+			listObj.empty.init();
268
+			itp_fn_fire_window_resize();
269
+		},
270
+		ready: function() {
271
+			listObj.init();
272
+		}
273
+	},
274
+	event: {
275
+		init: function () {
276
+			this.button();
277
+			this.change();
278
+		},
279
+		button: function () {
280
+			// 버튼 클릭 이벤트
281
+			$('button').each(function() {
282
+				var id = $(this).attr('id');
283
+				$(this).on('click', function() {
284
+					switch (id) {
285
+						case 'ITP_BTN_STOCKMNG02010_SRH'				: listObj.button.search();		break;	// 조회 버튼 클릭
286
+						case 'ITP_BTN_STOCKMNG02010_STOCK_CDD'			: listObj.button.fnStockCdd(); 	break;	// 재고실사 버튼
287
+						case 'ITP_BTN_STOCKMNG02010_CANCELLIST'			: stockCddObj.button.cancel(); 	break;	// 취소/목록 버튼
288
+						// case 'ITP_BTN_STOCKMNG02010_DELETE'				: 								break;	// 삭제 버튼
289
+						case 'ITP_BTN_STOCKMNG02010_SAVE'				: stockCddObj.button.save(); 		break;	// 저장 버튼
290
+						// case 'ITP_BTN_STOCKMNG02010_DETAIL_ADDROW'		: locInfoObj.button.addRow();	break;	// 상세:추가버튼
291
+						// case 'ITP_BTN_STOCKMNG02010_DETAIL_DELROW'		: locInfoObj.button.delRow();	break;	// 상세:삭제버튼
292
+					}
293
+				});
294
+			});
295
+
296
+			$('body').on('click', function(e) {
297
+				var gridId = STOCKMNG02010_DETAIL_GRID_ID.replace('#', '');
298
+				var rids = $(STOCKMNG02010_DETAIL_GRID_ID).jqGrid('getDataIDs');
299
+				var last_row_id = rids[rids.length - 1];
300
+				itp_fn_grid_reset_selection(e, last_row_id, gridId, 'STOCKMNG02010_DETAIL');
301
+			});
302
+
303
+		}, 
304
+		change: function () {
305
+			// 창고 변경
306
+			$('#ITP_FORM_STOCKMNG02010_SEARCH_WHS_ID').on('change', function() {
307
+				pageObj.fnLocationList(function() {
308
+					listObj.button.search(); // 조회	
309
+				}); // 로케이션 리스트
310
+			});
311
+			$('#ITP_FORM_STOCKMNG02010_SEARCH_LOCATION').on('change', function() {
312
+				listObj.button.search(); // 조회
313
+			});
314
+			
315
+		}
316
+	},
317
+	switchScreen: function(mode) {
318
+		if(mode == 'LIST') { // 목록
319
+			$('#ITP_BTN_STOCKMNG02010_MODIFY').hide();
320
+			$('#ITP_BTN_STOCKMNG02010_CANCELLIST').hide();
321
+			$('#ITP_BTN_STOCKMNG02010_DELETE').hide();
322
+			$('#ITP_BTN_STOCKMNG02010_SAVE').hide();
323
+			
324
+			fn_show_btn_auth('#ITP_BTN_STOCKMNG02010_SRH');
325
+			fn_show_btn_auth('#ITP_BTN_STOCKMNG02010_STOCK_CDD');
326
+
327
+			$('#ITP_AJAX_STOCKMNG02010_LIST_CONTAINER').show();
328
+			$('#ITP_AJAX_STOCKMNG02010_DETAIL_CONTAINER').hide();
329
+			$('#ITP_AJAX_STOCKMNG02010_VIEW_CONTAINER').hide();
330
+		} else if(mode == 'ADD') { // 재고실사
331
+			ITP_FORM_STOCKMNG02010_DETAIL_IS_DUPLICATE = true;
332
+
333
+			$('#ITP_BTN_STOCKMNG02010_SRH').hide();
334
+			$('#ITP_BTN_STOCKMNG02010_MODIFY').hide();
335
+			$('#ITP_BTN_STOCKMNG02010_STOCK_CDD').hide();
336
+			$('#ITP_BTN_STOCKMNG02010_DELETE').hide();			
337
+			
338
+			fn_show_btn_auth('#ITP_BTN_STOCKMNG02010_CANCELLIST');
339
+			fn_show_btn_auth('#ITP_BTN_STOCKMNG02010_SAVE');
340
+
341
+			$('#ITP_AJAX_STOCKMNG02010_LIST_CONTAINER').hide();
342
+			$('#ITP_AJAX_STOCKMNG02010_DETAIL_CONTAINER').show();
343
+			$('#ITP_AJAX_STOCKMNG02010_VIEW_CONTAINER').hide();
344
+						
345
+			$('#ITP_FORM_STOCKMNG02010_DETAIL_BRAND_ID').val($('#ITP_FORM_STOCKMNG02010_SEARCH_BRAND_ID').val());
346
+			$('#ITP_FORM_STOCKMNG02010_DETAIL_STORE_ID').val($('#ITP_FORM_STOCKMNG02010_SEARCH_STORE_ID').val());
347
+			$('#ITP_FORM_STOCKMNG02010_DETAIL_WHS_ID').val($('#ITP_FORM_STOCKMNG02010_SEARCH_WHS_ID').val());
348
+			$('#ITP_FORM_STOCKMNG02010_DETAIL_LOCATION').val($('#ITP_FORM_STOCKMNG02010_SEARCH_LOCATION').val());
349
+			
350
+		} else if(mode == 'VIEW') { // 보기
351
+			$('#ITP_BTN_STOCKMNG02010_SRH').hide();
352
+			$('#ITP_BTN_STOCKMNG02010_STOCK_CDD').hide();
353
+			$('#ITP_BTN_STOCKMNG02010_DELETE').hide();
354
+			$('#ITP_BTN_STOCKMNG02010_SAVE').hide();
355
+			
356
+			fn_show_btn_auth('#ITP_BTN_STOCKMNG02010_MODIFY');
357
+			fn_show_btn_auth('#ITP_BTN_STOCKMNG02010_CANCELLIST');
358
+
359
+			$('#ITP_AJAX_STOCKMNG02010_LIST_CONTAINER').hide();
360
+			$('#ITP_AJAX_STOCKMNG02010_DETAIL_CONTAINER').hide();
361
+			$('#ITP_AJAX_STOCKMNG02010_VIEW_CONTAINER').show();
362
+		}
363
+	}, 
364
+	fnWhsList: function(fnCall) {
365
+		const brandIdVal = $('#ITP_FORM_STOCKMNG02010_SEARCH_BRAND_ID').val();	
366
+		const param = {sbrandId: brandIdVal, pagingYn: false};
367
+		
368
+		fn_ajax_call(WHS_MNG_DETAIL_GRID_LIST, JSON.stringify(param), function(result) {
369
+			
370
+			fn_make_select_whs(result.gridRows, 'ITP_FORM_STOCKMNG02010_SEARCH_WHS_ID');
371
+			fn_make_select_whs(result.gridRows, 'ITP_FORM_STOCKMNG02010_DETAIL_WHS_ID');
372
+			
373
+			if (fnCall !== undefined || typeof fnCall !== 'undefined') fnCall();
374
+					
375
+		}, 'POST');
376
+	}, 
377
+	fnLocationList: function(fnCall) {
378
+		const brandIdVal = $('#ITP_FORM_STOCKMNG02010_SEARCH_BRAND_ID').val();	
379
+		const whsIdVal = $('#ITP_FORM_STOCKMNG02010_SEARCH_WHS_ID').val();	
380
+		const param = {brandId: brandIdVal, whsId: whsIdVal, pagingYn: false};
381
+		
382
+		fn_ajax_call(WHS_MNG_LOCATION_GRID_LIST, JSON.stringify(param), function(result) {
383
+			
384
+			fn_make_select_location(result.gridRows, 'ITP_FORM_STOCKMNG02010_SEARCH_LOCATION');
385
+			fn_make_select_location(result.gridRows, 'ITP_FORM_STOCKMNG02010_DETAIL_LOCATION');
386
+			
387
+			if (fnCall !== undefined || typeof fnCall !== 'undefined') fnCall();
388
+					
389
+		}, 'POST');
390
+	}
391
+};
392
+
393
+/*목록화면 Object*/
394
+let listObj = {
395
+	init: function () {
396
+		this.grid.init();
397
+	},
398
+	itp_STOCKMNG02010_search: false,
399
+	button: {
400
+		search: function() {
401
+			listObj.itp_STOCKMNG02010_search = true;
402
+			let param = $('#ITP_FORM_STOCKMNG02010_SEARCH').serializeObject();
403
+			param.gridSize = $.jgrid.defaults.rowNum;
404
+			param.gridPage = $.jgrid.defaults.page;
405
+			$(STOCKMNG02010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
406
+		},
407
+		fnStockCdd: function() {
408
+			pageObj.switchScreen('ADD');			
409
+			itp_fn_form_clear_validate(null, '#ITP_FORM_STOCKMNG02010_DETAIL');						
410
+			stockCddObj.init();
411
+		}
412
+	},
413
+	empty: {
414
+		init: function() {
415
+			var _this = this;
416
+			this.push();
417
+			$(STOCKMNG02010_GRID_EMPTY).on('click', function() {
418
+				_this.back();
419
+				_this.itp_STOCKMNG02010_param.gridSize = $.jgrid.defaults.rowNum;
420
+				$(STOCKMNG02010_GRID_ID).setGridParam({'postData': JSON.stringify(_this.itp_STOCKMNG02010_param)}).trigger('reloadGrid');
421
+			});
422
+		},
423
+		itp_STOCKMNG02010_param: {},
424
+		push: function() {
425
+			let param = $('#ITP_FORM_STOCKMNG02010_SEARCH').serializeObject();
426
+			listObj.itp_STOCKMNG02010_param = param;
427
+		},
428
+		back: function() {
429
+			$('#ITP_FORM_STOCKMNG02010_DEVI_TP_CD').val(this.itp_STOCKMNG02010_param.deviTpCd);
430
+			$('#ITP_FORM_STOCKMNG02010_ORDER_YN').val(this.itp_STOCKMNG02010_param.orderYn);
431
+			$('#ITP_FORM_STOCKMNG02010_ADT_AUTH_CD').val(this.itp_STOCKMNG02010_param.adtAuthCd);
432
+			$('#ITP_FORM_STOCKMNG02010_EMAIL_RCV_YN').val(this.itp_STOCKMNG02010_param.emailRcvYn);
433
+			$('#ITP_FORM_STOCKMNG02010_MEMB_EXIT_DT').val(this.itp_STOCKMNG02010_param.membExitDt);
434
+			$('#ITP_FORM_STOCKMNG02010_FROM_DT').val(this.itp_STOCKMNG02010_param.fromDt);
435
+			$('#ITP_FORM_STOCKMNG02010_TO_DT').val(this.itp_STOCKMNG02010_param.toDt);
436
+			$('#ITP_FORM_STOCKMNG02010_KEYWORD').val(this.itp_STOCKMNG02010_param.keyword);
437
+		}
438
+	},
439
+	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
+			var data = JSON.parse(sessionStorage.getItem('itp_manage_brand_info'));
453
+			$('#ITP_FORM_STOCKMNG02010_SEARCH_BRAND_ID').val(data.brandId);
454
+			
455
+			let param = $('#ITP_FORM_STOCKMNG02010_SEARCH').serializeObject();
456
+			param.gridSize = $.jgrid.defaults.rowNum;
457
+
458
+			var option = {
459
+				gridId: STOCKMNG02010_GRID_ID,
460
+				colModel: gridColModel.list,
461
+				param: JSON.stringify(param),
462
+				url: DOMAIN + STOCK_CDD_DETAIL_GRID_LIST,
463
+				pager: STOCKMNG02010_GRID_PAGER,
464
+				onCellSelect: function(rowId, cellIdx, cellValue) {
465
+					var cm = $(this).jqGrid('getGridParam', 'colModel');
466
+					var colNm = cm[cellIdx].name;
467
+					if (colNm == 'whsNm') {
468
+						const brandIdVal = $(this).jqGrid('getCell', rowId, 'brandId');
469
+						const whsIdVal = $(this).jqGrid('getCell', rowId, 'whsId');
470
+						
471
+						const key = {brandId: brandIdVal, whsId: whsIdVal, viewCd: 'R'};
472
+						var param = $.param(key);
473
+						viewObj.init(param);
474
+					}
475
+				},
476
+				loadComplete: function(data) {
477
+					console.log(data);
478
+					itp_fn_grid_load_complete(data, STOCKMNG02010_GRID_ID, true, 'number', 'STOCKMNG02010', listObj.itp_STOCKMNG02010_search, listObj.empty, true, data.gridRecords, true);
479
+					var ids = $(STOCKMNG02010_GRID_ID).getDataIDs();
480
+					$.each(ids, function(idx, rowId) {
481
+						$(STOCKMNG02010_GRID_ID).jqGrid('setCell', rowId, 'whsNm', '', ITP_GRID_COL_STYLE.link);
482
+					});
483
+				},
484
+				onPaging: function(action) {
485
+					itp_fn_grid_paging(STOCKMNG02010_GRID_ID, action, param);
486
+				}
487
+			};
488
+			itp_fn_grid_make_remote(option);
489
+		},
490
+		clearData : function() {
491
+			$(STOCKMNG02010_GRID_ID).jqGrid('clearGridData', true);
492
+			$(STOCKMNG02010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
493
+			$(STOCKMNG02010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
494
+			$(STOCKMNG02010_GRID_EMPTY).show();
495
+		},
496
+		unload : function() {
497
+			$.jgrid.gridUnload(STOCKMNG02010_GRID_ID);
498
+		}
499
+	}
500
+};
501
+
502
+/*상세화면 Object*/
503
+let viewObj = {
504
+	init: function (param) {
505
+		this.load(param);
506
+	},
507
+	load: function(param) {
508
+		fn_ajax_call(WHS_MNG_INFO_WHS, param, this.callback, 'GET');
509
+	},
510
+	callback: function (result) {
511
+		// console.log(result);
512
+		pageObj.switchScreen('VIEW');
513
+		$('#ITP_FORM_STOCKMNG02010_VIEW #ITP_FORM_STOCKMNG02010_VIEW_BRAND_ID').val(result.brandId);
514
+		$('#ITP_FORM_STOCKMNG02010_VIEW #ITP_FORM_STOCKMNG02010_VIEW_STORE_ID').val(result.storeId);
515
+		$('#ITP_FORM_STOCKMNG02010_VIEW #ITP_FORM_STOCKMNG02010_VIEW_WHS_ID').val(result.whsId);
516
+		
517
+		$('#ITP_FORM_STOCKMNG02010_VIEW .fnBrandNm').text(result.brandNm);
518
+		$('#ITP_FORM_STOCKMNG02010_VIEW .fnStCd').text(result.whsStNm);
519
+		$('#ITP_FORM_STOCKMNG02010_VIEW .fnWhsId').text(result.whsId);
520
+		$('#ITP_FORM_STOCKMNG02010_VIEW .fnWhsNm').text(result.whsNm);
521
+		$('#ITP_FORM_STOCKMNG02010_VIEW .fnTelNo').text(result.mgrTelNo);
522
+		$('#ITP_FORM_STOCKMNG02010_VIEW .fnMgrNm').text(result.mgrNm);		
523
+		$('#ITP_FORM_STOCKMNG02010_VIEW .fnSpplyNm').text(result.storeNm ? result.storeNm : '');		
524
+		$('#ITP_FORM_STOCKMNG02010_VIEW .fnRegDtm').text(result.sysRegDttm);
525
+		if(result.zipNo) {
526
+			$('#ITP_FORM_STOCKMNG02010_VIEW .fnAddress').text('('+result.zipNo+') ' + result.addr1 + ' ' + result.addr2);	
527
+		}		
528
+
529
+		// 권한정보 리스트 조회
530
+		viewObj.grid.init();
531
+	},
532
+	grid: {
533
+		init: function() {
534
+			this.unload();
535
+			this.load();
536
+		},
537
+		load : function() {
538
+			let param = $('#ITP_FORM_STOCKMNG02010_VIEW').serializeObject();
539
+			param.gridSize = $.jgrid.defaults.rowNum;
540
+			param.pagingYn = false; // 페이징안함
541
+
542
+			var option = {
543
+				gridId: STOCKMNG02010_VIEW_GRID_ID,
544
+				colModel: gridColModel.view,
545
+				param: JSON.stringify(param),
546
+				url: DOMAIN + WHS_MNG_LOCATION_GRID_LIST,
547
+				pager: STOCKMNG02010_VIEW_GRID_PAGER,
548
+				loadComplete: function(data) {
549
+					itp_fn_grid_load_complete(data, STOCKMNG02010_VIEW_GRID_ID, true, undefined, 'STOCKMNG02010_VIEW');
550
+				},
551
+				onPaging: function(action) {
552
+					var pagingFn = {
553
+						callBack: function(args) {
554
+							$(args).trigger('reloadGrid');
555
+						}
556
+					};
557
+					if (itp_fn_check_grid_is_writing(STOCKMNG02010_VIEW_GRID_ID)) {
558
+						itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, STOCKMNG02010_VIEW_GRID_ID);
559
+						return 'stop';
560
+					} else {
561
+						itp_fn_grid_paging(STOCKMNG02010_VIEW_GRID_ID, action, param);
562
+					}
563
+				},
564
+				onSortCol: function(index, columnIndex, sortOrder) {
565
+					var sortingFn = {
566
+						callBack: function(args) {
567
+							$(args).trigger('reloadGrid');
568
+						}
569
+					};
570
+					if (itp_fn_check_grid_is_writing(STOCKMNG02010_VIEW_GRID_ID)) {
571
+						itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, STOCKMNG02010_VIEW_GRID_ID);
572
+						return 'stop';
573
+					} else {
574
+						itp_fn_grid_sorting(STOCKMNG02010_VIEW_GRID_ID, index, sortOrder);
575
+					}
576
+				}
577
+			};
578
+			itp_fn_grid_make_remote(option);
579
+		},
580
+		clearData : function() {
581
+			$(STOCKMNG02010_VIEW_GRID_ID).jqGrid('clearGridData', true);
582
+			$(STOCKMNG02010_VIEW_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
583
+			$(STOCKMNG02010_VIEW_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
584
+			$(STOCKMNG02010_VIEW_GRID_EMPTY).show();
585
+		},
586
+		unload : function() {
587
+			$.jgrid.gridUnload(STOCKMNG02010_VIEW_GRID_ID);
588
+		}
589
+	}
590
+};
591
+
592
+/*재고실사 Object*/
593
+let stockCddObj = {
594
+	init: function () {
595
+		this.unload();
596
+		this.load();
597
+	},
598
+	button: {
599
+		cancel: function() {
600
+			listObj.grid.search();
601
+		},
602
+		save: function() {
603
+			var detailViewCd = $('#ITP_FORM_STOCKMNG02010_DETAIL_VIEW_CD').val();
604
+			const formId = '#ITP_FORM_STOCKMNG02010_DETAIL';
605
+			itp_fn_form_clear_validate(null, formId);
606
+			
607
+			var vali_whsStatCd = itp_fn_form_validate(formId, formId + '_WHS_ST_CD', ['empty'], undefined); // 상태
608
+			var vali_whsNm = itp_fn_form_validate(formId, formId + '_WHS_NM', ['empty'], undefined);
609
+			
610
+			if (vali_whsStatCd && vali_whsNm) {
611
+				let gridInsertData = [];
612
+				let gridUpdateData = [];
613
+				let gridDeleteData = [];
614
+				const rowData = $(STOCKMNG02010_DETAIL_GRID_ID).getRowData();
615
+				// const keyValue = $(formId + '_WHS_ID').val();
616
+				$.each(rowData, function(key, value) {
617
+					if (value.viewCd != 'R') {
618
+						// value.whsId = keyValue;
619
+						if (value.viewCd == 'C') {
620
+							gridInsertData.push(value);
621
+						} else if (value.viewCd == 'U') {
622
+							gridUpdateData.push(value);
623
+						} else if (value.viewCd == 'D') {
624
+							gridDeleteData.push(value);
625
+						}
626
+					}
627
+				});
628
+				let param = $(formId).serializeObject();
629
+				param.gridInsertData = gridInsertData;
630
+				param.gridUpdateData = gridUpdateData;
631
+				param.gridDeleteData = gridDeleteData;
632
+				//console.log(JSON.stringify(param));
633
+				var searhFn = function() {
634
+					ITP_FORM_STOCKMNG02010_DETAIL_IS_WRITING = false;
635
+					listObj.grid.search();
636
+				};
637
+				fn_ajax_call(detailViewCd == 'C' ? WHS_MNG_ADD_WHS : WHS_MNG_MIDIFY_WHS, JSON.stringify(param), searhFn, 'POST');
638
+			}
639
+		}
640
+	},
641
+	load: function () {
642
+		let param = $('#ITP_FORM_STOCKMNG02010_DETAIL').serializeObject();
643
+		param.gridSize = $.jgrid.defaults.rowNum;
644
+		param.pagingYn = false; // 페이지안함
645
+
646
+		var option = {
647
+			gridId: STOCKMNG02010_DETAIL_GRID_ID,
648
+			colModel: gridColModel.detail,
649
+			param: JSON.stringify(param),
650
+			url: DOMAIN + WHS_MNG_LOCATION_GRID_LIST,
651
+			pager: STOCKMNG02010_DETAIL_GRID_PAGER,
652
+			multiselect: true,
653
+			loadComplete: function(data) {
654
+				itp_fn_grid_load_complete(data, STOCKMNG02010_DETAIL_GRID_ID, true, undefined, 'STOCKMNG02010_DETAIL');
655
+			},
656
+			onPaging: function(action) {
657
+				var pagingFn = {
658
+					callBack: function(args) {
659
+						$(args).trigger('reloadGrid');
660
+					}
661
+				};
662
+				if (itp_fn_check_grid_is_writing(STOCKMNG02010_DETAIL_GRID_ID)) {
663
+					itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, STOCKMNG02010_DETAIL_GRID_ID);
664
+					return 'stop';
665
+				} else {
666
+					itp_fn_grid_paging(STOCKMNG02010_DETAIL_GRID_ID, action, param);
667
+				}
668
+			},
669
+			onSortCol: function(index, columnIndex, sortOrder) {
670
+				var sortingFn = {
671
+					callBack: function(args) {
672
+						$(args).trigger('reloadGrid');
673
+					}
674
+				};
675
+				if (itp_fn_check_grid_is_writing(STOCKMNG02010_DETAIL_GRID_ID)) {
676
+					itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, STOCKMNG02010_DETAIL_GRID_ID);
677
+					return 'stop';
678
+				} else {
679
+					itp_fn_grid_sorting(STOCKMNG02010_DETAIL_GRID_ID, index, sortOrder);
680
+				}
681
+			}
682
+		};
683
+		itp_fn_grid_make_remote(option);
684
+	},
685
+	clearData : function() {
686
+		$(STOCKMNG02010_DETAIL_GRID_ID).jqGrid('clearGridData', true);
687
+		$(STOCKMNG02010_DETAIL_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
688
+		$(STOCKMNG02010_DETAIL_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
689
+		$(STOCKMNG02010_DETAIL_GRID_EMPTY).show();
690
+	},
691
+	unload : function() {
692
+		$.jgrid.gridUnload(STOCKMNG02010_DETAIL_GRID_ID);
693
+	}
694
+};