Преглед на файлове

입고처리 작업완료

dwkim преди 2 години
родител
ревизия
52f41e9998
променени са 2 файла, в които са добавени 485 реда и са изтрити 17 реда
  1. 18 17
      src/main/webapp/app/pomng/POMNG06010.html
  2. 467 0
      src/main/webapp/js/app/pomng/ITP_POMNG06010.js

+ 18 - 17
src/main/webapp/app/pomng/POMNG06010.html

@@ -2,12 +2,10 @@
2 2
 	<div class="itp_cont">
3 3
 		<article class="itp_detail">
4 4
 			<div class="itp_det_head fix">
5
-				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i> <strong>입고처리-팝업있음</strong></h2>
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_POMNG06010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;조회&nbsp;&nbsp;</button>
8 8
 					<button type="button" id="ITP_BTN_POMNG06010_MODIFY" class="btn btn-success btn-sm INPS" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;입고처리&nbsp;&nbsp;</button>
9
-					<button type="button" id="ITP_BTN_POMNG06010_NEWREG" class="btn btn-primary btn-sm CLB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;취소&nbsp;&nbsp;</button>
10
-					<button type="button" id="ITP_BTN_POMNG06010_CANCELLIST" class="btn btn-warning btn-sm COK"><i class="glyphicon "></i>&nbsp;&nbsp;확인&nbsp;&nbsp;</button>
11 9
 				</div>
12 10
 			</div>
13 11
 			<div class="itp_det_in">
@@ -24,32 +22,35 @@
24 22
 										</div>										
25 23
 										<div class="col-xs-3 itp_ip itp_noMar">
26 24
 											<div class="input-daterange input-group date">
27
-												<input type="text" id="ITP_FORM_POMNG06010_SEARCH_DLV_REQ_DT" class="form-control itp_input" name="sDlvReqDt" value="">
25
+												<input type="text" id="ITP_FORM_POMNG06010_SEARCH_FROM_DT" class="form-control itp_input" name="fromDt" value="">
28 26
 												<span class="input-group-addon itp_date_to">~</span>
29
-												<input type="text" id="ITP_FORM_POMNG06010_SEARCH_DLV_CMPLT_DT" class="form-control itp_input" name="sDlvCmpltDt" value="">
27
+												<input type="text" id="ITP_FORM_POMNG06010_SEARCH_TO_DT" class="form-control itp_input" name="toDt" value="">
30 28
 											</div>
31 29
 										</div>
32
-										<div class="col-xs-4 itp_ip itp_noMar">
33
-											<input type="text" id="ITP_FORM_POMNG06010_SEARCH_DLV_STTMT_UNQ_NO" class="form-control itp_input" name="sDlvSttmtUnqNo" placeholder="납품서번호" />
30
+										<div class="col-xs-2 itp_ip itp_noMar">
31
+											<input type="hidden" id="ITP_FORM_POMNG06010_SEARCH_WHS_ID" class="form-control itp_input" name="swhsId" placeholder="입고창고" />
32
+											<input type="text" id="ITP_FORM_POMNG06010_SEARCH_WHS_NM" class="form-control itp_input" name="swhsNm" placeholder="입고창고*" />
33
+										</div>
34
+										<div class="col-xs-1 itp_in" style="padding: 0px; width:10%;">
35
+											<button type="button" id="ITP_BTN_POMNG06010_SEARCH_WHS_ID" class="btn btn-success btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
36
+											<button type="button" id="ITP_BTN_POMNG06010_DELETE_WHS_ID" class="btn btn-primary btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
34 37
 										</div>
38
+										
35 39
 									</div>
36 40
 									<div class="form-group" style="padding-top: 10px; border-top: 1px dotted #ccc;">
37 41
 										<div class="col-xs-2 itp_ip itp_noMar">
38
-											<input type="text" id="ITP_FORM_POMNG06010_SEARCH_SPPLY_NM" class="form-control itp_input" name="sSpplyNm" placeholder="공급업체" />
42
+											<input type="text" id="ITP_FORM_POMNG06010_SEARCH_SPPLY_NM" class="form-control itp_input" name="sspplyNm" placeholder="공급업체" />
43
+											<input type="hidden" id="ITP_FORM_POMNG06010_SEARCH_SPPLY_ID" class="form-control itp_input" name="sspplyId" placeholder="공급업체" />
39 44
 										</div>
40 45
 										<div class="col-xs-1 itp_in" style="padding: 0px; width:8%;">
41
-											<button type="button" id="ITP_BTN_POMNG06010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
42
-											<button type="button" id="ITP_BTN_POMNG06010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
46
+											<button type="button" id="ITP_BTN_POMNG06010_SEARCH_SPPLY_ID" class="btn btn-success btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
47
+											<button type="button" id="ITP_BTN_POMNG06010_DELETE_SPPLY_ID" class="btn btn-primary btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
43 48
 														</div>
44
-										<div class="col-xs-2 itp_ip itp_noMar">
45
-											<input type="text" id="ITP_FORM_POMNG06010_SEARCH_DLV_PLACE" class="form-control itp_input" name="sDlvPlace" placeholder="매장/창고" />
49
+										<div class="col-xs-4 itp_ip itp_noMar">
50
+											<input type="text" id="ITP_FORM_POMNG06010_SEARCH_DLV_STTMT_UNQ_NO" class="form-control itp_input" name="sdlvSttmtUnqNo" placeholder="납품서번호" />
46 51
 										</div>
47
-										<div class="col-xs-1 itp_in" style="padding: 0px; width:10%;">
48
-											<button type="button" id="ITP_BTN_POMNG06010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
49
-											<button type="button" id="ITP_BTN_POMNG06010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
50
-														</div>
51 52
 										<div class="col-xs-4 itp_ip itp_noMar">
52
-											<input type="text" id="ITP_FORM_POMNG06010_SEARCH_ITEM_NM" class="form-control itp_input" name="sItemNm" placeholder="품목번호 or 품목명" />
53
+											<input type="text" id="ITP_FORM_POMNG06010_SEARCH_ITEM_NM" class="form-control itp_input" name="sitemNm" placeholder="품목번호 or 품목명" />
53 54
 										</div>
54 55
 									</div>
55 56
 								</form>

+ 467 - 0
src/main/webapp/js/app/pomng/ITP_POMNG06010.js

@@ -0,0 +1,467 @@
1
+require(['config'], function() {
2
+	require([], function($) {
3
+		listObj.init();
4
+	});
5
+});
6
+
7
+/********************************************************
8
+ --------------------------------------------------------
9
+ - Object 목록								            -
10
+ --------------------------------------------------------
11
+ * const gridColModel = {}	: 화면 Grid Object			*
12
+ * let pageObj = {}			: 화면공통 Object			*
13
+ * let listObj = {}			: 목록화면 Object			*
14
+ * let viewObj = {}			: 상세화면 Object			*
15
+ * let modifyObj = {}		: 수정화면 Object			*
16
+ * let createObj = {}		: 신규화면 Object			*
17
+ *******************************************************/
18
+
19
+/*화면 변수*/
20
+const POMNG06010_GRID_ID = '#ITP_POMNG06010_jqGrid';
21
+const POMNG06010_GRID_LIST = '#ITP_POMNG06010_jqGrid_list';
22
+const POMNG06010_GRID_PAGER = '#ITP_POMNG06010_jqGridPager';
23
+const POMNG06010_GRID_EMPTY = '#ITP_POMNG06010_jqGridEmpty';
24
+
25
+let ITP_FORM_POMNG06010_DETAIL_IS_WRITING = false;
26
+let POMNG06010_LAST_ROW_ID;
27
+
28
+
29
+/*API URL*/
30
+let API_DETAIL_GRID_LIST = '/api/pomng/inoutmng/warehouse-target-grid-list';	// 목록
31
+let API_DETAIL_SAVE 	 = '/api/pomng/inoutmng/save-warehouse';			// 입고처리
32
+
33
+
34
+/*화면 Grid ColModel*/
35
+const gridColModel = {
36
+	list: [
37
+		{
38
+			index: 'BRAND_ID', name: 'brandId',
39
+			label: ITP_MSG_LOCALE.label.brandId, //브랜드아이디
40
+			width: '13', fixed: false, align: 'center',
41
+			sortable: false, hidden: true
42
+		},
43
+		{
44
+			index: 'BRAND_NM', name: 'brandNm',
45
+			label: ITP_MSG_LOCALE.label.brandNm, //브랜드명
46
+			width: '10', fixed: false, align: 'left',
47
+			sortable: false, hidden: false
48
+		},
49
+		{
50
+			index: 'DLV_STTMT_UNQ_NO', name: 'dlvSttmtUnqNo',
51
+			label: ITP_MSG_LOCALE.label.dlvSttmtUnqNo, //납품서번호
52
+			width: '10', fixed: false, align: 'center',
53
+			sortable: false, hidden: false
54
+		},
55
+		{
56
+			index: 'DLV_STTMT_DTL_NO', name: 'dlvSttmtDtlNo',
57
+			label: ITP_MSG_LOCALE.label.dlvSttmtDtlNo, //납품서항번
58
+			width: '10', fixed: false, align: 'center',
59
+			sortable: false, hidden: false
60
+		},
61
+		{
62
+			index: 'ITEM_ID', name: 'itemId',
63
+			label: ITP_MSG_LOCALE.label.itemId, //품목아이디
64
+			width: '10', fixed: false, align: 'center',
65
+			sortable: false, hidden: false
66
+		},
67
+		{
68
+			index: 'ITEM_NM', name: 'itemNm',
69
+			label: ITP_MSG_LOCALE.label.itemNm, //품목명
70
+			width: '10', fixed: false, align: 'left',
71
+			sortable: false, hidden: false
72
+		},
73
+		{
74
+			index: 'PODR_QTY', name: 'podrQty',
75
+			label: ITP_MSG_LOCALE.label.podrQty, //발주수량
76
+			width: '10', fixed: false, align: 'right',
77
+			sortable: false, hidden: false,
78
+			formatter: 'integer', formatoptions: { defaultValue: '', thousandsSeparator: ',' }
79
+		},
80
+		{
81
+			index: 'DLV_QTY', name: 'dlvQty',
82
+			label: ITP_MSG_LOCALE.label.dlvQty, //납품/수주 수량
83
+			width: '10', fixed: false, align: 'right',
84
+			sortable: false, hidden: false,
85
+			formatter: 'integer', formatoptions: { defaultValue: '', thousandsSeparator: ',' }
86
+		},
87
+		{
88
+			index: 'WHS_QTY', name: 'whsQty',
89
+			label: ITP_MSG_LOCALE.label.whsQty, //입고 수량
90
+			width: '10', fixed: false, align: 'right',
91
+			sortable: true, editable: true, edittype: 'text',
92
+			editrules: { required: false, number: true },
93
+			formatter: 'integer', formatoptions: { defaultValue: '', thousandsSeparator: ',' }
94
+		},
95
+		{
96
+			index: 'WHS_AMT', name: 'whsAmt',
97
+			label: ITP_MSG_LOCALE.label.whsAmt, //입고금액
98
+			width: '13', fixed: false, align: 'right',
99
+			sortable: false, hidden: true
100
+		},
101
+		{
102
+			index: 'UNIT_AMT', name: 'unitAmt',
103
+			label: ITP_MSG_LOCALE.label.unitAmt, //단가
104
+			width: '6', fixed: false, align: 'right',
105
+			sortable: false, hidden: false,
106
+			formatter: 'integer', formatoptions: { defaultValue: '', thousandsSeparator: ',' }
107
+		},
108
+		{
109
+			index: 'WHS_ID', name: 'whsId',
110
+			label: ITP_MSG_LOCALE.label.whsId, //납품창고아이디
111
+			width: '15', fixed: false, align: 'center',
112
+			sortable: false, hidden: true
113
+		},
114
+		{
115
+			index: 'LOCATION', name: 'location',
116
+			label: ITP_MSG_LOCALE.label.location, //납품납품LOCATION
117
+			width: '15', fixed: false, align: 'center',
118
+			sortable: false, hidden: true
119
+		},
120
+		{
121
+			index: 'WHS_NM', name: 'whsNm',
122
+			label: ITP_MSG_LOCALE.label.whsNm, //납품창고명
123
+			width: '15', fixed: false, align: 'left',
124
+			sortable: false, hidden: false
125
+		},
126
+		{
127
+			index: 'DLV_REQ_DT', name: 'dlvReqDt',
128
+			label: ITP_MSG_LOCALE.label.dlvReqDt, //납품요청일
129
+			width: '15', fixed: false, align: 'center',
130
+			sortable: false, hidden: false
131
+		},		
132
+		{
133
+			index: 'DLV_SCH_DT', name: 'dlvSchDt',
134
+			label: ITP_MSG_LOCALE.label.dlvSchDt, //납품예정일
135
+			width: '15', fixed: false, align: 'center',
136
+			sortable: false, hidden: false
137
+		},
138
+		{
139
+			index: 'DLV_MGR_NM', name: 'dlvMgrNm',
140
+			label: ITP_MSG_LOCALE.label.dlvMgrNm, //납품담당자명
141
+			width: '15', fixed: false, align: 'left',
142
+			sortable: false, hidden: false
143
+		},		
144
+		{
145
+			index: 'DLV_MGR_TEL_NO', name: 'dlvMgrTelNo',
146
+			label: ITP_MSG_LOCALE.label.dlvMgrTelNo, //납품담당자연락처
147
+			width: '15', fixed: false, align: 'left',
148
+			sortable: false, hidden: false
149
+		},
150
+		{
151
+			index: 'PCH_PODR_UNQ_NO', name: 'pchPodrUnqNo',
152
+			label: ITP_MSG_LOCALE.label.pchPodrUnqNo, //구매발주번호
153
+			width: '15', fixed: false, align: 'center',
154
+			sortable: false, hidden: true
155
+		},		
156
+		{
157
+			index: 'PCH_REQ_UNQ_NO', name: 'pchReqUnqNo',
158
+			label: ITP_MSG_LOCALE.label.pchReqUnqNo, //구매요청번호
159
+			width: '15', fixed: false, align: 'center',
160
+			sortable: false, hidden: true
161
+		},
162
+		{
163
+			index: 'PCH_REQ_DTL_NO', name: 'pchReqDltNo',
164
+			label: ITP_MSG_LOCALE.label.pchReqDltNo, //구매요청항번
165
+			width: '15', fixed: false, align: 'center',
166
+			sortable: false, hidden: true
167
+		},
168
+		{
169
+			index: 'UNIT', name: 'unit',
170
+			label: ITP_MSG_LOCALE.label.unit, //단위
171
+			width: '15', fixed: false, align: 'center',
172
+			sortable: false, hidden: true
173
+		},
174
+		{
175
+			index: 'SPPLY_ID', name: 'spplyId',
176
+			label: ITP_MSG_LOCALE.label.spplyId, //공급사아이디
177
+			width: '15', fixed: false, align: 'center',
178
+			sortable: false, hidden: true
179
+		},
180
+		{
181
+			index: 'SPPLY_NM', name: 'spplyNm',
182
+			label: ITP_MSG_LOCALE.label.spplyNm, //공급사명
183
+			width: '15', fixed: false, align: 'center',
184
+			sortable: false, hidden: true
185
+		}
186
+	]
187
+};
188
+
189
+
190
+/*목록화면 Object*/
191
+let listObj = {
192
+	init: function() {
193
+		this.view();
194
+		this.action();
195
+		this.event.init();
196
+		this.grid.init();
197
+	},
198
+	view: function() {
199
+		// 버튼 권한설정
200
+		fn_proc_btn_auth('POMNG06010');
201
+
202
+		// 공통코드 표시
203
+		$('select').each(function() {
204
+			if ($(this).data('select-code')) {
205
+				fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
206
+			}
207
+		});
208
+
209
+		var now = new Date();
210
+		$('#ITP_TAB_POMNG06010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
211
+		$('#ITP_FORM_POMNG06010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setDate(now.getDate())));
212
+		$('#ITP_FORM_POMNG06010_SEARCH_TO_DT').datepicker('setDate', new Date(now.setDate(now.getDate() + 30)));
213
+
214
+
215
+	},
216
+	itp_POMNG06010_search: false,
217
+	button: {
218
+		search: function() {
219
+			console.log("search event");
220
+			listObj.itp_POMNG06010_search = true;
221
+			let param = $('#ITP_FORM_POMNG06010_SEARCH').serializeObject();
222
+			param.gridSize = $.jgrid.defaults.rowNum;
223
+			param.gridPage = $.jgrid.defaults.page;
224
+			param.sbrandId = fn_make_user_info.get('brandId');
225
+			param.sstoreId = fn_make_user_info.get('storeId');
226
+			
227
+			if (param.swhsId == "") {
228
+				alert("입고창고를 지정해주세요!");
229
+				return;
230
+			}
231
+			
232
+			if (param.fromDt == '' || param.toDt == '') {
233
+				alert("납품예정일 기간을 지정해주세요!");
234
+				return;
235
+			}
236
+			
237
+			$(POMNG06010_GRID_ID).setGridParam({ 'postData': JSON.stringify(param) }).trigger('reloadGrid');
238
+		},
239
+		save: function() {
240
+			
241
+			$('body').trigger('click');
242
+			
243
+				var modalFn = {
244
+					callBack: () => {
245
+						//itp_fn_form_event.removeChar('#ITP_FORM_OPER03010_DETAIL');
246
+						var chkQtyYn = "N";
247
+						let gridInsertData = [];
248
+						const rowData = $(POMNG06010_GRID_ID).getRowData();
249
+						var cwhsId = "";
250
+						
251
+						$.each(rowData, function(key, value) {
252
+							
253
+							if (value.whsQty != '') {
254
+								if (parseInt(value.whsQty) > parseInt(value.dlvQty)) {
255
+									alert("납품수량보다 입고수량이 더 많습니다.");
256
+									chkQtyYn = "Y";
257
+									return false;
258
+								}
259
+								
260
+								if (cwhsId != "" && cwhsId != value.whsId) {
261
+									alert("서로 다른 입고창고 품목은 처리할 수 없습니다.");
262
+									chkQtyYn = "Y";
263
+									return false;
264
+								}
265
+								cwhsId = value.whsId;
266
+								gridInsertData.push(value);
267
+							}
268
+							
269
+						});
270
+						
271
+						if (chkQtyYn == "Y") return;
272
+						
273
+						if (gridInsertData.length == 0) {
274
+							alert("입고처리할 품목에 입고수량을 입력해주세요!");
275
+							return ;
276
+						}
277
+						
278
+						
279
+						
280
+						let param = {};
281
+						param.viewCd = "C";
282
+						param.whsId = cwhsId;
283
+						param.brandId = fn_make_user_info.get('brandId');
284
+						param.storeId = fn_make_user_info.get('storeId');
285
+						param.dlvCnfmDocFileNo = "";
286
+						param.gridInsertData = gridInsertData;
287
+						console.log(JSON.stringify(param));
288
+						var searhFn = function () {
289
+							//ITP_FORM_INOUTMNG01010_DETAIL_IS_WRITING = false;
290
+							listObj.button.search();
291
+						}
292
+						fn_ajax_call(API_DETAIL_SAVE, JSON.stringify(param), searhFn, 'POST');
293
+					}
294
+				};
295
+			
296
+				itp_fn_modal_confirm('입고처리 하시겠습니까?', modalFn);
297
+			
298
+		}
299
+	},
300
+	action: function() {
301
+		var _this = this;
302
+		// 공급업체 조회 버튼 클릭
303
+		$('#ITP_BTN_POMNG06010_SEARCH_SPPLY_ID').on('click', function() {
304
+			_this.popup('spply');
305
+		});
306
+		// 공급업체 텍스트 삭제 버튼 클릭
307
+		$('#ITP_BTN_POMNG06010_DELETE_SPPLY_ID').on('click', function() {
308
+			$('#ITP_FORM_POMNG06010_SEARCH_SPPLY_NM').val('');
309
+			$('#ITP_FORM_POMNG06010_SEARCH_SPPLY_ID').val('');
310
+		});
311
+		
312
+		// 매장/창고 조회 버튼 클릭
313
+		$('#ITP_BTN_POMNG06010_SEARCH_WHS_ID').on('click', function() {
314
+			_this.popup('whs');
315
+		});
316
+		// 매장/창고 텍스트 삭제 버튼 클릭
317
+		$('#ITP_BTN_POMNG06010_DELETE_WHS_ID').on('click', function() {
318
+			$('#ITP_FORM_POMNG06010_SEARCH_WHS_NM').val('');
319
+			$('#ITP_FORM_POMNG06010_SEARCH_WHS_ID').val('');
320
+		});
321
+
322
+	},
323
+	popup: function(arg) {
324
+		var popFn = this.callback.create;
325
+
326
+		var whsDvsn = "";
327
+		
328
+		if (fn_make_user_info.get('storeId') == "") {
329
+			whsDvsn = "W01";
330
+		} else { 
331
+			whsDvsn = "W02";
332
+		}
333
+		
334
+		//param.sstoreId = fn_make_user_info.get('storeId');
335
+		
336
+		if(arg === 'spply'){
337
+			const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
338
+			fn_call_popup('biz', 'BIZPOP_STORE_SPPLY', '#ITP_ASIDE', popFn, key, 'S');
339
+		} else if(arg === 'whs'){
340
+			const key1 = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'), whsDvsn:whsDvsn};
341
+			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key1, 'S');
342
+		}
343
+		
344
+	},
345
+	callback: {
346
+		create: function(rowDataPop) {
347
+			console.log(rowDataPop);
348
+			if(rowDataPop.hasOwnProperty('whsId') == false) {
349
+				$('#ITP_FORM_POMNG06010_SEARCH_SPPLY_NM').val(rowDataPop.spplyNm);
350
+				$('#ITP_FORM_POMNG06010_SEARCH_SPPLY_ID').val(rowDataPop.spplyId);
351
+			} else {
352
+				$('#ITP_FORM_POMNG06010_SEARCH_WHS_NM').val(rowDataPop.whsNm);
353
+				$('#ITP_FORM_POMNG06010_SEARCH_WHS_ID').val(rowDataPop.whsId);
354
+			}
355
+		}
356
+	},
357
+	event: {
358
+		init: function() {
359
+			this.button();
360
+		},
361
+		button: function() {
362
+			// 버튼 클릭 이벤트
363
+			$('button').each(function() {
364
+				var id = $(this).attr('id');
365
+				$(this).on('click', function() {
366
+					console.log("button");
367
+					console.log(id);
368
+					switch (id) {
369
+						case 'ITP_BTN_POMNG06010_SRH': listObj.button.search(); break;	// 조회 버튼 클릭
370
+						case 'ITP_BTN_POMNG06010_MODIFY': listObj.button.save(); break;	// 입고처리 버튼
371
+
372
+					}
373
+				});
374
+			});
375
+
376
+			$('body').on('click', function(e) {
377
+				var gridId = POMNG06010_GRID_ID.replace('#', '');
378
+				var rids = $(POMNG06010_GRID_ID).jqGrid('getDataIDs');
379
+				var last_row_id = rids[rids.length - 1];
380
+
381
+				itp_fn_grid_reset_selection(e, last_row_id, gridId, 'POMNG06010');
382
+			});
383
+
384
+
385
+		}
386
+	},
387
+	empty: {
388
+		init: function() {
389
+			var _this = this;
390
+			this.push();
391
+			$(POMNG06010_GRID_EMPTY).on('click', function() {
392
+				_this.back();
393
+				_this.itp_POMNG06010_param.gridSize = $.jgrid.defaults.rowNum;
394
+				$(POMNG06010_GRID_ID).setGridParam({ 'postData': JSON.stringify(_this.itp_POMNG06010_param) }).trigger('reloadGrid');
395
+			});
396
+		},
397
+		itp_POMNG06010_param: {},
398
+		push: function() {
399
+			let param = $('#ITP_FORM_POMNG06010_SEARCH').serializeObject();
400
+			listObj.itp_POMNG06010_param = param;
401
+		},
402
+		back: function() {
403
+			$('#ITP_FORM_POMNG06010_SEARCH_FROM_DT').val(this.itp_POMNG06010_param.fromDt);
404
+			$('#ITP_FORM_POMNG06010_SEARCH_TO_DT').val(this.itp_POMNG06010_param.toDt);
405
+			$('#ITP_FORM_POMNG06010_SEARCH_DLV_STTMT_UNQ_NO').val(this.itp_POMNG06010_param.sDlvSttmtUnqNo);
406
+			$('#ITP_FORM_POMNG06010_SEARCH_SPPLY_ID').val(this.itp_POMNG06010_param.sSpplyId);
407
+			$('#ITP_FORM_POMNG06010_SEARCH_WHS_ID').val(this.itp_POMNG06010_param.sWhsId);
408
+			$('#ITP_FORM_POMNG06010_SEARCH_ITEM_NM').val(this.itp_POMNG06010_param.sItemNm);
409
+		}
410
+	},
411
+	grid: {
412
+		init: function() {
413
+			// 데이터 없을때
414
+			listObj.empty.push();
415
+			itp_fn_jqgrid_resize(POMNG06010_GRID_ID, POMNG06010_GRID_LIST, 'lg');
416
+			itp_fn_fire_window_resize();
417
+			this.search();
418
+
419
+		},
420
+		colModel: gridColModel.list,
421
+		search: function() {
422
+			this.unload();
423
+			this.load();
424
+		},
425
+		load: function() {
426
+			let param = $('#ITP_FORM_POMNG06010_SEARCH').serializeObject();
427
+			param.gridSize = $.jgrid.defaults.rowNum;
428
+			param.sbrandId = fn_make_user_info.get('brandId');
429
+			param.sstoreId = fn_make_user_info.get('storeId');
430
+			param.sWhsId = "Order";
431
+			var option = {
432
+				//multiselect: true,
433
+				autowidth: true,
434
+				gridId: POMNG06010_GRID_ID,
435
+				colModel: gridColModel.list,
436
+				param: param,
437
+				url: DOMAIN + API_DETAIL_GRID_LIST,
438
+				pager: POMNG06010_GRID_PAGER,
439
+
440
+				onCellSelect: function(rowid, cellIdx, cellValue) {
441
+					POMNG06010_LAST_ROW_ID = itp_fn_set_data_editable(rowid, cellIdx, POMNG06010_LAST_ROW_ID, POMNG06010_GRID_ID, ['pchPodrUnqNo']);
442
+				},
443
+				loadComplete: function(data) {
444
+					itp_fn_grid_load_complete(data, POMNG06010_GRID_ID, true, 'number', 'POMNG06010', listObj.itp_POMNG06010_search, listObj.empty, true, data.gridRecords, true);
445
+				},
446
+				onPaging: function(action) {
447
+					itp_fn_grid_paging(POMNG06010_GRID_ID, action, param);
448
+				}
449
+			};
450
+			itp_fn_grid_make_remote(option);
451
+		},
452
+		button: {
453
+		},
454
+		unload: function() {
455
+			$.jgrid.gridUnload(POMNG06010_GRID_ID);
456
+		},
457
+		clearData: function() {
458
+			$(POMNG06010_GRID_ID).jqGrid('clearGridData', true);
459
+			$(POMNG06010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
460
+			$(POMNG06010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
461
+			$(POMNG06010_GRID_EMPTY).show();
462
+		}
463
+		
464
+	}
465
+};
466
+
467
+