Browse Source

출하현황 완료

yhl88 2 years ago
parent
commit
b346b966c7
1 changed files with 36 additions and 50 deletions
  1. 36 50
      src/main/webapp/js/app/inoutmng/ITP_INOUTMNG02010.js

+ 36 - 50
src/main/webapp/js/app/inoutmng/ITP_INOUTMNG02010.js

@@ -112,46 +112,15 @@ const gridColModel = {
112
 			label: ITP_MSG_LOCALE.label.whsDt,					// 입고일
112
 			label: ITP_MSG_LOCALE.label.whsDt,					// 입고일
113
 			width: '10', fixed: false, align: 'center',
113
 			width: '10', fixed: false, align: 'center',
114
 			sortable: false, hidden: false
114
 			sortable: false, hidden: false
115
-		}
116
-	],
117
-	view: [
118
-		{
119
-			index: 'PCH_PODR_UNQ_NO', name: 'pchPodrUnqNo',
120
-			label: ITP_MSG_LOCALE.label.pchPodrUnqNo,			// 발주번호
121
-			width: '10', fixed: false, align: 'center',
122
-			sortable: false, hidden: false
123
-		},
124
-		{
125
-			index: 'ITEM_ID', name: 'itemId',
126
-			label: ITP_MSG_LOCALE.label.itemId,					// 품목번호
127
-			width: '10', fixed: false, align: 'center',
128
-			sortable: false, hidden: false
129
-		},
130
-		{
131
-			index: 'ITEM_NM', name: 'itemNm',
132
-			label: ITP_MSG_LOCALE.label.itemNm,					// 품목명
133
-			width: '10', fixed: false, align: 'center',
134
-			sortable: false, hidden: false
135
 		},
115
 		},
136
 		{
116
 		{
137
-			index: 'PODR_QTY', name: 'podrQty',
138
-			label: ITP_MSG_LOCALE.label.podrQty,				// 발주수량
117
+			index: 'DLV_STTMT_UNQ_NO', name: 'dlvSttmtUnqNo',
118
+			label: ITP_MSG_LOCALE.label.dlvSttmtUnqNo,			// 납품번호
139
 			width: '10', fixed: false, align: 'center',
119
 			width: '10', fixed: false, align: 'center',
140
-			sortable: false, hidden: false
141
-		},
142
-		{
143
-			index: 'DLV_QTY', name: 'dlvQty',
144
-			label: ITP_MSG_LOCALE.label.dlvQty,					// 납품수량
145
-			width: '10', fixed: false, align: 'center',
146
-			sortable: false, hidden: false
147
-		},
148
-		{
149
-			index: 'EXPRY_DATE', name: 'expryDate',
150
-			label: ITP_MSG_LOCALE.label.expryDate,				// 발주번호
151
-			width: '10', fixed: false, align: 'center',
152
-			sortable: false, hidden: false
120
+			sortable: false, hidden: true
153
 		}
121
 		}
154
 	],
122
 	],
123
+	view: [],
155
 	detail: []
124
 	detail: []
156
 }
125
 }
157
 
126
 
@@ -161,6 +130,7 @@ let pageObj = {
161
 	init: function() {
130
 	init: function() {
162
 		this.ui.init();
131
 		this.ui.init();
163
 		this.event.init();
132
 		this.event.init();
133
+		this.action();
164
 	},
134
 	},
165
 	ui: {
135
 	ui: {
166
 		init: function() {
136
 		init: function() {
@@ -180,10 +150,10 @@ let pageObj = {
180
 			// 조회일자 지정	
150
 			// 조회일자 지정	
181
 			var now = new Date();
151
 			var now = new Date();
182
 			var defaultToDate = new Date(now);
152
 			var defaultToDate = new Date(now);
183
-			defaultToDate.setDate(now.getDate() + 10);
153
+			defaultToDate.setDate(now.getDate() + 7);
184
 			$('#ITP_TAB_INOUTMNG02010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
154
 			$('#ITP_TAB_INOUTMNG02010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
185
-			$('#ITP_FORM_INOUTMNG02010_SEARCH_FROM_DT').datepicker('setDate', '2022.10.01');
186
-			$('#ITP_FORM_INOUTMNG02010_SEARCH_TO_DT').datepicker('setDate', '2024.10.01');
155
+			$('#ITP_FORM_INOUTMNG02010_SEARCH_FROM_DT').datepicker('setDate', now);
156
+			$('#ITP_FORM_INOUTMNG02010_SEARCH_TO_DT').datepicker('setDate', defaultToDate);
187
 		},
157
 		},
188
 		grid: function() {
158
 		grid: function() {
189
 			itp_fn_jqgrid_resize(INOUTMNG02010_GRID_ID, INOUTMNG02010_GRID_LIST, 'lg');
159
 			itp_fn_jqgrid_resize(INOUTMNG02010_GRID_ID, INOUTMNG02010_GRID_LIST, 'lg');
@@ -205,10 +175,10 @@ let pageObj = {
205
 				$(this).on('click', function() {
175
 				$(this).on('click', function() {
206
 					switch (id) {
176
 					switch (id) {
207
 						case 'ITP_BTN_INOUTMNG02010_SRH'				: listObj.button.search();		break;	// 조회 버튼 클릭
177
 						case 'ITP_BTN_INOUTMNG02010_SRH'				: listObj.button.search();		break;	// 조회 버튼 클릭
208
-						case 'ITP_BTN_INOUTMNG02010_NEWREG'			: listObj.button.create(); 		break;	// 신규등록 버튼
209
-						case 'ITP_BTN_INOUTMNG02010_MODIFY'			: modifyObj.button.modify();	break;	// 수정 버튼
210
-						case 'ITP_BTN_INOUTMNG02010_CANCELLIST'		: modifyObj.button.cancel(); 	break;	// 취소/목록 버튼
211
-						case 'ITP_BTN_INOUTMNG02010_DELETE'			: modifyObj.button.del();		break;	// 발주 취소 버튼(예정)
178
+						case 'ITP_BTN_INOUTMNG02010_NEWREG'				: listObj.button.create(); 		break;	// 신규등록 버튼
179
+						case 'ITP_BTN_INOUTMNG02010_MODIFY'				: modifyObj.button.modify();	break;	// 수정 버튼
180
+						case 'ITP_BTN_INOUTMNG02010_CANCELLIST'			: modifyObj.button.cancel(); 	break;	// 취소/목록 버튼
181
+						case 'ITP_BTN_INOUTMNG02010_DELETE'				: modifyObj.button.del();		break;	// 발주 취소 버튼(예정)
212
 					}
182
 					}
213
 				});
183
 				});
214
 			});
184
 			});
@@ -281,7 +251,27 @@ let pageObj = {
281
             $('#ITP_AJAX_INOUTMNG02010_VIEW_CONTAINER').show();
251
             $('#ITP_AJAX_INOUTMNG02010_VIEW_CONTAINER').show();
282
             fn_show_btn_auth_array(['#ITP_BTN_INOUTMNG02010_MODIFY', '#ITP_BTN_INOUTMNG02010_CANCELLIST']);
252
             fn_show_btn_auth_array(['#ITP_BTN_INOUTMNG02010_MODIFY', '#ITP_BTN_INOUTMNG02010_CANCELLIST']);
283
         }
253
         }
284
-    }
254
+    },
255
+    action: function() {
256
+    	var _this = this;
257
+    	// 출하창고 조회 버튼 클릭
258
+		$('#ITP_BTN_INOUTMNG02010_PRINT').on('click', function() {
259
+			_this.popup();
260
+		});
261
+	},
262
+	popup: function() {		
263
+		var selectedIds = $(INOUTMNG02010_GRID_ID).getGridParam('selarrrow');
264
+		if(selectedIds.length > 1) { // 1이상 선택시
265
+		   alert("납품서 하나만 선택해주세요 (대표 납품서번호)") ;//출력
266
+			return; //리턴
267
+		}
268
+		var selRowData ; //변수선언		
269
+		for (var i=selectedIds.length-1; i>=0; i--) {		//1개만 선택시
270
+			selRowData = $(INOUTMNG02010_GRID_ID).jqGrid('getRowData', selectedIds[i]);		//cell 선택
271
+		}
272
+		const key = {brandId :fn_make_user_info.get('brandId'), dlvSttmtUnqNo : selRowData.dlvSttmtUnqNo};		// popup key 값 설정
273
+		fn_call_popup('biz', 'BIZPOP_DLV_STTMT_PRN', '#ITP_ASIDE', null, key, 'S');
274
+	}
285
 };
275
 };
286
 
276
 
287
 
277
 
@@ -355,11 +345,11 @@ let listObj = {
355
                     var cm = $(this).jqGrid('getGridParam', 'colModel');
345
                     var cm = $(this).jqGrid('getGridParam', 'colModel');
356
                     var colNm = cm[cellIdx].name;
346
                     var colNm = cm[cellIdx].name;
357
                     if (colNm === 'pchPodrUnqNo') {
347
                     if (colNm === 'pchPodrUnqNo') {
358
-                        const pchPodrUnqNoVal = $(this).jqGrid('getCell', rowId, 'pchPodrUnqNo');
348
+                        const dlvSttmtUnqNoVal = $(this).jqGrid('getCell', rowId, 'dlvSttmtUnqNo');
359
                         const brandIdVal = $(this).jqGrid('getCell', rowId, 'brandId');
349
                         const brandIdVal = $(this).jqGrid('getCell', rowId, 'brandId');
360
-                        const key = {pchPodrUnqNo: pchPodrUnqNoVal, brandId: brandIdVal};
350
+                        const key = {dlvSttmtUnqNo: dlvSttmtUnqNoVal, brandId: brandIdVal};
361
                         var param = $.param(key);
351
                         var param = $.param(key);
362
-                        modifyObj.init(param);
352
+                        //modifyObj.init(param);
363
                     }
353
                     }
364
 				},*/
354
 				},*/
365
 				loadComplete: function(data) {
355
 				loadComplete: function(data) {
@@ -419,7 +409,6 @@ let listObj = {
419
 			whsDvsn = "W02";
409
 			whsDvsn = "W02";
420
 		}
410
 		}
421
 		
411
 		
422
-		
423
 		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'),whsDvsn: whsDvsn};
412
 		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'),whsDvsn: whsDvsn};
424
 		fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
413
 		fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
425
 		
414
 		
@@ -439,6 +428,3 @@ let listObj = {
439
 	}
428
 	}
440
 }
429
 }
441
 
430
 
442
-
443
-
444
-console.log(CODE_LIST);