ソースを参照

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

juney 2 年 前
コミット
8b98f1ae9e

+ 1 - 0
src/main/webapp/app/ordmng/ORDMNG01010.html

@@ -19,6 +19,7 @@
19 19
 							<div class="col-xs-12">
20 20
 								<form id="ITP_FORM_ORDMNG01010_SEARCH" class="form-horizontal">
21 21
 								<input type="hidden" id="ITP_FORM_ORDMNG01010_SEARCH_BRAND_ID" name="sbrandId" value="">
22
+								<input type="hidden" id="ITP_FORM_ORDMNG01010_SEARCH_SPPLY_ID" name="sspplyId" value="">
22 23
 									<div class="form-group">
23 24
 										<div class="col-xs-2 itp_ip itp_noMar">
24 25
 											<label>수주일지</label>

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

@@ -24,9 +24,9 @@
24 24
 										</div>										
25 25
 										<div class="col-xs-3 itp_ip itp_noMar">
26 26
 											<div class="input-daterange input-group date">
27
-												<input type="text" id="ITP_FORM_ORDMNG03010_SEARCH_DLV_REQ_DT" class="form-control itp_input" name="fromDt" value="2022.01.01">
27
+												<input type="text" id="ITP_FORM_ORDMNG03010_SEARCH_DLV_REQ_DT" class="form-control itp_input" name="fromDt" value="2022.01.01" readonly>
28 28
 												<span class="input-group-addon itp_date_to">~</span>
29
-												<input type="text" id="ITP_FORM_ORDMNG03010_SEARCH_DLV_CMPLT_DT" class="form-control itp_input" name="toDt" value="2022.12.31">
29
+												<input type="text" id="ITP_FORM_ORDMNG03010_SEARCH_DLV_CMPLT_DT" class="form-control itp_input" name="toDt" value="2022.12.31" readonly>
30 30
 											</div>
31 31
 										</div>
32 32
 										<div class="col-xs-2 itp_in itp_noMar">

+ 17 - 14
src/main/webapp/app/pomng/POMNG05010.html

@@ -4,7 +4,7 @@
4 4
 			<div class="itp_det_head fix">
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
-					<button type="button" id="ITP_BTN_POMNG05010_MODIFY" class="btn btn-primary btn-sm IVP" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;납품서출력&nbsp;</button>
7
+					<button type="button" id="ITP_BTN_POMNG05010_PRT" class="btn btn-primary btn-sm IVP" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;납품서출력&nbsp;</button>
8 8
 					<button type="button" id="ITP_BTN_POMNG05010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;조회&nbsp;&nbsp;</button>
9 9
 				</div>
10 10
 			</div>
@@ -25,32 +25,35 @@
25 25
 										</div>
26 26
 										<div class="col-xs-3 itp_ip itp_noMar">
27 27
 											<div class="input-daterange input-group date">
28
-												<input type="text" id="ITP_FORM_POMNG05010_SEARCH_FROM_DT" class="form-control itp_input" name="fromDt" value="2022.01.01">
28
+												<input type="text" id="ITP_FORM_POMNG05010_SEARCH_FROM_DT" class="form-control itp_input" name="fromDt" value="" readonly>
29 29
 												<span class="input-group-addon itp_date_to">~</span>
30
-												<input type="text" id="ITP_FORM_POMNG05010_SEARCH_TO_DT" class="form-control itp_input" name="toDt" value="2022.12.31">
30
+												<input type="text" id="ITP_FORM_POMNG05010_SEARCH_TO_DT" class="form-control itp_input" name="toDt" value="" readonly>
31 31
 											</div>
32 32
 										</div>
33 33
 									</div>
34 34
 									<div class="form-group" style="padding-top: 10px; border-top: 1px dotted #ccc;">
35 35
 										<div class="col-xs-2 itp_ip itp_noMar">
36
-											<select id="ITP_FORM_POMNG05010_SEARCH_DLV_DTL_ST_CD" class="form-control itp_input" name="sdlvDtlStCd">
37
-												<option value="A">납품상태</option>											
36
+											<select id="ITP_FORM_POMNG05010_SEARCH_DLV_DTL_ST_CD" data-select-code="DLV_DTL_ST_CD" class="form-control itp_input" name="sdlvDtlStCd">
37
+												<option value="A"></option>											
38 38
 											</select>
39 39
 										</div>
40 40
 										<div class="col-xs-2 itp_ip itp_noMar">
41 41
 											<input type="text" id="ITP_FORM_POMNG05010_SEARCH_SPPLY_NM" class="form-control itp_input" name="sspplyNm" placeholder="공급업체" />
42
+											<input type="hidden" id="ITP_FORM_POMNG05010_SEARCH_SPPLY_ID" class="form-control itp_input" name="sspplyId" />
43
+										</div>
44
+										<div class="col-xs-1 itp_in" style="padding:0px; width:8%;">
45
+											<button type="button" id="ITP_BTN_POMNG05010_SEARCH_SPPLY_NM" class="btn btn-success btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
46
+											<button type="button" id="ITP_BTN_POMNG05010_DELETE_SPPLY_NM" class="btn btn-primary btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
42 47
 										</div>
43
-										<div class="col-xs-1 itp_in" style="width:8%; padding:0px;">
44
-											<button type="button" id="ITP_BTN_POMNG05010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
45
-											<button type="button" id="ITP_BTN_POMNG05010_SEARCH_MODIFY" class="btn btn-primary btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
46
-						                </div>
47 48
 										<div class="col-xs-2 itp_ip itp_noMar">
48
-											<input type="text" id="ITP_FORM_POMNG05010_SEARCH_DLV_PLACE" class="form-control itp_input" name="sdlvPlace" placeholder="매장/창고" />
49
+											<input type="text" id="ITP_FORM_POMNG05010_SEARCH_WHS_NM" class="form-control itp_input" name="swhsNm" placeholder="매장/창고" />
50
+											<input type="hidden" id="ITP_FORM_POMNG05010_SEARCH_WHS_ID" class="form-control itp_input" name="swhsId"  />
51
+										</div>
52
+										<div class="col-xs-1 itp_in" style="padding:0px; width:10%;">
53
+											<button type="button" id="ITP_BTN_POMNG05010_SEARCH_SWHS_NM" class="btn btn-success btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
54
+											<button type="button" id="ITP_BTN_POMNG05010_DELETE_SWHS_NM" class="btn btn-primary btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
49 55
 										</div>
50
-										<div class="col-xs-1 itp_in" style="width:11%; padding:0px;">
51
-											<button type="button" id="ITP_BTN_POMNG05010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
52
-											<button type="button" id="ITP_BTN_POMNG05010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
53
-						                </div>
56
+										
54 57
 										<div class="col-xs-3 itp_ip itp_noMar">
55 58
 											<input type="text" id="ITP_FORM_POMNG05010_SEARCH_ITEM_NM" class="form-control itp_input" name="sitemNm" placeholder="품목번호 or 품목명" />
56 59
 										</div>

+ 2 - 0
src/main/webapp/app/vendinfo/VENDINFO03010.html

@@ -17,6 +17,8 @@
17 17
 						<div class="itp_srh_border fix">
18 18
 							<div class="col-xs-12">
19 19
 								<form id="ITP_FORM_VENDINFO03010_SEARCH" class="form-horizontal">
20
+								<input type="hidden" id="ITP_FORM_VENDINFO03010_SEARCH_BRAND_ID" name="sbrandId" value="">
21
+								<input type="hidden" id="ITP_FORM_VENDINFO03010_SEARCH_SPPLY_ID" name="sspplyId" value="">
20 22
 									<div class="form-group">
21 23
 										<div class="col-xs-1 itp_ip itp_noMar" style="width:9%; top:3px;" >
22 24
 											<label>계약기간</label>

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

@@ -112,46 +112,15 @@ const gridColModel = {
112 112
 			label: ITP_MSG_LOCALE.label.whsDt,					// 입고일
113 113
 			width: '10', fixed: false, align: 'center',
114 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 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 124
 	detail: []
156 125
 }
157 126
 
@@ -161,6 +130,7 @@ let pageObj = {
161 130
 	init: function() {
162 131
 		this.ui.init();
163 132
 		this.event.init();
133
+		this.action();
164 134
 	},
165 135
 	ui: {
166 136
 		init: function() {
@@ -180,10 +150,10 @@ let pageObj = {
180 150
 			// 조회일자 지정	
181 151
 			var now = new Date();
182 152
 			var defaultToDate = new Date(now);
183
-			defaultToDate.setDate(now.getDate() + 10);
153
+			defaultToDate.setDate(now.getDate() + 7);
184 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 158
 		grid: function() {
189 159
 			itp_fn_jqgrid_resize(INOUTMNG02010_GRID_ID, INOUTMNG02010_GRID_LIST, 'lg');
@@ -205,10 +175,10 @@ let pageObj = {
205 175
 				$(this).on('click', function() {
206 176
 					switch (id) {
207 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 251
             $('#ITP_AJAX_INOUTMNG02010_VIEW_CONTAINER').show();
282 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 345
                     var cm = $(this).jqGrid('getGridParam', 'colModel');
356 346
                     var colNm = cm[cellIdx].name;
357 347
                     if (colNm === 'pchPodrUnqNo') {
358
-                        const pchPodrUnqNoVal = $(this).jqGrid('getCell', rowId, 'pchPodrUnqNo');
348
+                        const dlvSttmtUnqNoVal = $(this).jqGrid('getCell', rowId, 'dlvSttmtUnqNo');
359 349
                         const brandIdVal = $(this).jqGrid('getCell', rowId, 'brandId');
360
-                        const key = {pchPodrUnqNo: pchPodrUnqNoVal, brandId: brandIdVal};
350
+                        const key = {dlvSttmtUnqNo: dlvSttmtUnqNoVal, brandId: brandIdVal};
361 351
                         var param = $.param(key);
362
-                        modifyObj.init(param);
352
+                        //modifyObj.init(param);
363 353
                     }
364 354
 				},*/
365 355
 				loadComplete: function(data) {
@@ -419,7 +409,6 @@ let listObj = {
419 409
 			whsDvsn = "W02";
420 410
 		}
421 411
 		
422
-		
423 412
 		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'),whsDvsn: whsDvsn};
424 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);

+ 17 - 12
src/main/webapp/js/app/ordmng/ITP_ORDMNG01010.js

@@ -19,13 +19,6 @@ const ORDMNG01010_VIEW_GRID_EMPTY = '#ITP_ORDMNG01010_VIEW_jqGridEmpty';
19 19
 
20 20
 let ITP_COMMON_PCH_ODR_ST_CD = fn_make_common_cd_list(CODE_LIST, 'PCH_ODR_ST_CD', true, '발주상태코드');
21 21
 
22
-// 그리드 전화번호 '-' 함수
23
-function convertTel(value){
24
-	answer = (value.startsWith('0')) ? value.replace(/[^0-9]/g, "")
25
-			.replace(/(^02|^0505|^1[0-9]{3}|^0[0-9]{2})([0-9]+)?([0-9]{4})$/,"$1-$2-$3")
26
-			.replace("--", "-") : '';
27
-	return answer;
28
-}
29 22
 
30 23
 //API URL
31 24
 let API_POMNG_PO_SPPLY_PO_GRID_LIST = '/api/pomng/po/spply-po-grid-list';
@@ -234,6 +227,7 @@ let pageObj = {
234 227
             fn_show_btn_auth_array(['#ITP_BTN_ORDMNG01010_SRH', '#ITP_BTN_ORDMNG01010_NEWREG']);
235 228
             $('#ITP_AJAX_ORDMNG01010_LIST_CONTAINER').show();
236 229
             $('#ITP_FORM_ORDMNG01010_SEARCH #ITP_FORM_ORDMNG01010_SEARCH_BRAND_ID').val(fn_make_user_info.get('brandId'));
230
+            $('#ITP_FORM_ORDMNG01010_SEARCH #ITP_FORM_ORDMNG01010_SEARCH_SPPLY_ID').val(fn_make_user_info.get('spplyId'));
237 231
             $('#ITP_BTN_ORDMNG01010_SEARCH_WHS_NM').show();
238 232
             $('#ITP_BTN_ORDMNG01010_DELETE_WHS_NM').show();
239 233
         } else if(mode == 'ADD') { // 등록
@@ -300,7 +294,7 @@ let listObj = {
300 294
 			let param = $('#ITP_FORM_ORDMNG01010_SEARCH').serializeObject();
301 295
 			param.gridSize = $.jgrid.defaults.rowNum;
302 296
             param.gridPage = $.jgrid.defaults.page;
303
-            param.sspplyId = LOGIN_USER_INFO.spplyId;
297
+            //param.sspplyId = LOGIN_USER_INFO.spplyId;
304 298
             param.sidx = '0';
305 299
             console.log(JSON.stringify(param));
306 300
             $(ORDMNG01010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
@@ -319,8 +313,8 @@ let listObj = {
319 313
         push: function() {
320 314
             let param = $('#ITP_FORM_ORDMNG01010_SEARCH').serializeObject();
321 315
             listObj.itp_ORDMNG01010_param = param;
322
-            listObj.itp_ORDMNG01010_param.sbrandId = LOGIN_USER_INFO.brandId;
323
-            listObj.itp_ORDMNG01010_param.sspplyId = LOGIN_USER_INFO.spplyId;
316
+            //listObj.itp_ORDMNG01010_param.sbrandId = LOGIN_USER_INFO.brandId;
317
+            //listObj.itp_ORDMNG01010_param.sspplyId = LOGIN_USER_INFO.spplyId;
324 318
             listObj.itp_ORDMNG01010_param.sidx = '0';
325 319
         },
326 320
         back: function() {
@@ -346,8 +340,10 @@ let listObj = {
346 340
 		load: function() {
347 341
             let param = $('#ITP_FORM_ORDMNG01010_SEARCH').serializeObject();
348 342
             param.gridSize = $.jgrid.defaults.rowNum;
349
-            param.sspplyId = LOGIN_USER_INFO.spplyId;
343
+            //param.sspplyId = LOGIN_USER_INFO.spplyId;
350 344
             param.sidx = '0';
345
+            console.log(LOGIN_USER_INFO.spplyId);
346
+            console.log(fn_make_user_info.get('spplyId'));
351 347
             console.log(JSON.stringify(param));
352 348
             var option = {
353 349
             	gridId: ORDMNG01010_GRID_ID,
@@ -361,7 +357,7 @@ let listObj = {
361 357
                     if (colNm === 'pchPodrUnqNo') {
362 358
                         const pchPodrUnqNoVal = $(this).jqGrid('getCell', rowId, 'pchPodrUnqNo');
363 359
                         const brandIdVal = $(this).jqGrid('getCell', rowId, 'brandId');
364
-                        const spplyIdVal = LOGIN_USER_INFO.spplyId;
360
+                        const spplyIdVal = fn_make_user_info.get('spplyId'); 
365 361
                         const key = {pchPodrUnqNo: pchPodrUnqNoVal, brandId: brandIdVal, spplyId: spplyIdVal};
366 362
                         var param = $.param(key);
367 363
                         viewObj.init(param);
@@ -456,9 +452,18 @@ let viewObj = {
456 452
 	},
457 453
 	callback: function(result) {
458 454
 		console.log(result);
455
+
456
+		// 그리드 전화번호 '-' 함수
457
+		function convertTel(value){
458
+			answer = (value.startsWith('0')) ? value.replace(/[^0-9]/g, "")
459
+					.replace(/(^02|^0505|^1[0-9]{3}|^0[0-9]{2})([0-9]+)?([0-9]{4})$/,"$1-$2-$3")
460
+					.replace("--", "-") : '';
461
+			return answer;
462
+		}
459 463
 		
460 464
 		let telNo = convertTel(result.podrMgrTelNo);
461 465
 		
466
+		
462 467
 		pageObj.switchScreen('VIEW');
463 468
 		$('#ITP_FORM_ORDMNG01010_VIEW #ITP_FORM_ORDMNG01010_VIEW_AFFL_SHOP_ID').val(result.afflShopId);
464 469
 		$('#ITP_FORM_ORDMNG01010_VIEW .fnBrandNm').text(result.brandNm);				// 브랜드명

+ 7 - 2
src/main/webapp/js/app/ordmng/ITP_ORDMNG03010.js

@@ -146,6 +146,11 @@ let pageObj = {
146 146
 		view: function() {
147 147
 			// 버튼 권한설정
148 148
 			fn_proc_btn_auth('ORDMNG03010');
149
+			// 조회일자 달력 팝업 불러오기
150
+			var now = new Date();
151
+			$('#ITP_TAB_ORDMNG03010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
152
+			$('#ITP_FORM_ORDMNG03010_SEARCH_DLV_REQ_DT').datepicker('setDate', new Date(now.setMonth(now.getMonth() - 1)));
153
+			$('#ITP_FORM_ORDMNG03010_SEARCH_DLV_CMPLT_DT').datepicker('setDate', new Date());
149 154
 		}
150 155
 	},
151 156
 	action: function () {
@@ -185,7 +190,7 @@ let pageObj = {
185 190
 				$(this).on('click', function() {
186 191
 					switch (id) {
187 192
 						case 'ITP_BTN_ORDMNG03010_SRH'		: listObj.button.search();	break;	// 조회 버튼 클릭
188
-						case 'ITP_BTN_ORDMNG03010_POPUP'	: listObj.button.create(); 			// 납품서출력 팝업
193
+						case 'ITP_BTN_ORDMNG03010_POPUP'	: listObj.button.print(); 			// 납품서출력 팝업
189 194
 					}
190 195
 				});
191 196
 			});
@@ -213,7 +218,7 @@ let listObj = {
213 218
 			/*물어봐야할것들*/
214 219
 			$(ORDMNG03010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
215 220
 		},
216
-		create: function() {
221
+		print: function() {
217 222
 			if(!fn_make_user_info.isEmpty()) { //fn_make_user_info 가 있다면
218 223
 				const rowKey = $(ORDMNG03010_GRID_ID).getGridParam('selrow'); // 그리드 셀 선택
219 224
 				if (!rowKey) {//선택 안했을시

+ 133 - 67
src/main/webapp/js/app/pomng/ITP_POMNG05010.js

@@ -140,6 +140,7 @@ let pageObj = {
140 140
 	init: function () {
141 141
 		this.ui.init();
142 142
 		this.event.init();
143
+		this.action();
143 144
 	},
144 145
 	ui: {
145 146
 		init: function () {
@@ -150,14 +151,72 @@ let pageObj = {
150 151
 			// 버튼 권한설정
151 152
 			fn_proc_btn_auth('POMNG05010');
152 153
 
153
-			// 공통코드 표시
154
+			// 공통코드 표시        sfasfdasfafas
154 155
 			$('select').each(function() {
155 156
 				if($(this).data('select-code')) {
156 157
 					fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
157 158
 				}
158 159
 			});
160
+			// 조회일자 지정
161
+			var now = new Date();
162
+			$('#ITP_TAB_POMNG05010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
163
+			$('#ITP_FORM_POMNG05010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setMonth(now.getMonth() - 1)));
164
+			$('#ITP_FORM_POMNG05010_SEARCH_TO_DT').datepicker('setDate', new Date());
159 165
 		},
160 166
 	},
167
+	action: function () {
168
+		var _this = this;
169
+		// 검색 공급사 
170
+		$('#ITP_BTN_POMNG05010_SEARCH_SPPLY_NM').on('click', function() {
171
+			_this.popup('SS');
172
+		});
173
+		// 검색 텍스트 삭제 버튼 클릭
174
+		$('#ITP_BTN_POMNG05010_DELETE_SPPLY_NM').on('click', function() {
175
+			$('#ITP_FORM_POMNG05010_SEARCH_SPPLY_NM').val('');
176
+			$('#ITP_FORM_POMNG05010_SEARCH_SPPLY_ID').val('');
177
+		});
178
+		// 검색 납품장소
179
+		$('#ITP_BTN_POMNG05010_SEARCH_SWHS_NM').on('click', function() {
180
+			_this.popup('SW');
181
+		});
182
+		// 검색 납품장소 텍스트 삭제 버튼 클릭
183
+		$('#ITP_BTN_POMNG05010_DELETE_SWHS_NM').on('click', function() {
184
+			$('#ITP_FORM_POMNG05010_SEARCH_WHS_NM').val('');
185
+			$('#ITP_FORM_POMNG05010_SEARCH_WHS_ID').val('');
186
+   		});
187
+	},
188
+	popup: function (arg) {
189
+		var popFn ;
190
+		// 팝업
191
+		if (arg == "SW") {
192
+			popFn = this.callback.searWhs;
193
+		} else if (arg == "SS") {
194
+			popFn = this.callback.searSpply;
195
+		} 
196
+		
197
+		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
198
+		
199
+		if (arg == "SW" ) {
200
+			const keya = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'), whsDvsn:""};
201
+			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, keya, 'S');
202
+		} else if (arg == "SS") {
203
+			fn_call_popup('biz', 'BIZPOP_STORE_SPPLY', '#ITP_ASIDE', popFn, key, 'S');
204
+		}
205
+	},
206
+	callback: {
207
+		searSpply: function(rowDataPop) {
208
+			if(rowDataPop) {
209
+				$('#ITP_FORM_POMNG05010_SEARCH_SPPLY_NM').val(rowDataPop.spplyNm);
210
+				$('#ITP_FORM_POMNG05010_SEARCH_SPPLY_ID').val(rowDataPop.spplyId);
211
+			}
212
+		},
213
+		searWhs: function(rowDataPop) {
214
+			if(rowDataPop) {
215
+				$('#ITP_FORM_POMNG05010_SEARCH_WHS_NM').val(rowDataPop.whsNm);
216
+				$('#ITP_FORM_POMNG05010_SEARCH_WHS_ID').val(rowDataPop.whsId);
217
+			}
218
+		}
219
+	},
161 220
 	event: {
162 221
 		init: function () {
163 222
 				this.button();
@@ -168,8 +227,8 @@ let pageObj = {
168 227
 				var id = $(this).attr('id');
169 228
 				$(this).on('click', function() {
170 229
 					switch (id) {
171
-						case 'ITP_BTN_POMNG05010_SRH'				: listObj.button.search();		break;	// 조회 버튼 클릭
172
-						case 'ITP_BTN_POMNG05010_NEWREG'			: listObj.button.create(); 		break;	// 신규등록 버튼
230
+						case 'ITP_BTN_POMNG05010_SRH'	: listObj.button.search();	break;	// 조회 버튼 클릭
231
+						case 'ITP_BTN_POMNG05010_PRT'	: listObj.button.print(); 		// 납품서출력 버튼
173 232
 					}
174 233
 				});
175 234
 			});
@@ -184,78 +243,85 @@ let pageObj = {
184 243
 /*목록화면 Object*/
185 244
 let listObj = {
186 245
 	init: function () {
187
-			this.grid.init();
246
+		this.grid.init();
188 247
 	},
189 248
 	itp_POMNG05010_search: false,
190 249
 	button: {
191
-			search: function() {
192
-					listObj.itp_POMNG05010_search = true;
193
-					let param = $('#ITP_FORM_POMNG05010_SEARCH').serializeObject();
194
-					param.gridSize = $.jgrid.defaults.rowNum;
195
-					param.gridPage = $.jgrid.defaults.page;
196
-					$(POMNG05010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
197
-			},
198
-			create: function() {
199
-					if(!fn_make_user_info.isEmpty()) {
200
-					}
250
+		search: function() {
251
+			listObj.itp_POMNG05010_search = true;
252
+			let param = $('#ITP_FORM_POMNG05010_SEARCH').serializeObject();
253
+			param.gridSize = $.jgrid.defaults.rowNum;
254
+			param.gridPage = $.jgrid.defaults.page;
255
+			$(POMNG05010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
256
+		},
257
+		print: function() {
258
+			if(!fn_make_user_info.isEmpty()) {
259
+				const rowKey = $(POMNG05010_GRID_ID).getGridParam('selrow'); // 그리드 셀 선택
260
+				if (!rowKey) {//선택 안했을시
261
+					alert("납품서를 선택해주세요 (대표 납품서번호)") ; //출력
262
+					return; //리턴
263
+				}
264
+				var selectedIds = $(POMNG05010_GRID_ID).getGridParam('selarrrow');
265
+				if(selectedIds.length > 1) { // 1이상 선택시
266
+				   alert("납품서 하나만 선택해주세요 (대표 납품서번호)") ;//출력
267
+					return; //리턴
268
+				} 
269
+				var selRowData ; //변수선언
270
+				
271
+				for (var i=selectedIds.length-1; i>=0; i--) {//1개만 선택시
272
+					selRowData = $(POMNG05010_GRID_ID).jqGrid('getRowData', selectedIds[i]);//cell 선택
273
+				}
274
+				const key = {brandId :fn_make_user_info.get('brandId'), dlvSttmtUnqNo : selRowData.dlvSttmtUnqNo}; //popup key 값 설정
275
+				fn_call_popup('biz', 'BIZPOP_DLV_STTMT_PRN', '#ITP_ASIDE',null, key, 'S'); //config 참고 421줄  팝업 이름,키
201 276
 			}
277
+		}
202 278
 	},
203 279
 	empty: {
204
-			init: function() {
205
-					var _this = this;
206
-					this.push();
207
-					$(POMNG05010_GRID_EMPTY).on('click', function() {
208
-							_this.back();
209
-							_this.itp_POMNG05010_param.gridSize = $.jgrid.defaults.rowNum;
210
-							$(POMNG05010_GRID_ID).setGridParam({'postData': JSON.stringify(_this.itp_POMNG05010_param)}).trigger('reloadGrid');
211
-					});
212
-			},
213
-			itp_POMNG05010_param: {},
214
-			push: function() {
215
-					let param = $('#ITP_FORM_POMNG05010_SEARCH').serializeObject();
216
-					listObj.itp_POMNG05010_param = param;
217
-			},
218
-			back: function() {
219
-					$('#ITP_FORM_POMNG05010_SERVICE_ST_CD').val(this.itp_POMNG05010_param.sitemStCd);
220
-					$('#ITP_FORM_POMNG05010_SEARCH_PODR_PSSBL_DVSN').val(this.itp_POMNG05010_param.spodrPssblDvsn);
221
-					$('#ITP_FORM_POMNG05010_SEARCH_SPPLY_NM').val(this.itp_POMNG05010_param.sspplyNm);
222
-					$('#ITP_FORM_POMNG05010_SEARCH_DLV_PLACE').val(this.itp_POMNG05010_param.sdlvPlace);
223
-					$('#ITP_FORM_POMNG05010_SEARCH_ITEM_NM').val(this.itp_POMNG05010_param.sitemNm);
224
-					
225
-			}
280
+		init: function() {
281
+			var _this = this;
282
+			this.push();
283
+			$(POMNG05010_GRID_EMPTY).on('click', function() {
284
+				_this.back();
285
+				_this.itp_POMNG05010_param.gridSize = $.jgrid.defaults.rowNum;
286
+				$(POMNG05010_GRID_ID).setGridParam({'postData': JSON.stringify(_this.itp_POMNG05010_param)}).trigger('reloadGrid');
287
+			});
288
+		},
289
+		itp_POMNG05010_param: {},
290
+		push: function() {
291
+			let param = $('#ITP_FORM_POMNG05010_SEARCH').serializeObject();
292
+			listObj.itp_POMNG05010_param = param;
293
+		},
226 294
 	},
227 295
 	grid: {
228
-			init: function () {
229
-					// 데이터 없을때
230
-					listObj.empty.push();
231
-					this.search();
232
-			},
233
-			colModel: gridColModel.list,
234
-			search: function() {
235
-				pageObj.screen();
236
-				this.load();
237
-			},
238
-			load: function() {
239
-					let param = $('#ITP_FORM_POMNG05010_SEARCH').serializeObject();
240
-					param.gridSize = $.jgrid.defaults.rowNum;
241
-					param.sbrandId = fn_make_user_info.get('brandId');
242
-
243
-					var option = {
244
-							gridId: POMNG05010_GRID_ID,
245
-							colModel: gridColModel.list,
246
-							param: param,
247
-							url: DOMAIN + API_DETAIL_GRID_LIST,
248
-							pager: POMNG05010_GRID_PAGER,
249
-							multiselect: true, 
250
-							loadComplete: function(data) {
251
-									itp_fn_grid_load_complete(data, POMNG05010_GRID_ID, true, 'number', 'POMNG05010', listObj.itp_POMNG05010_search, listObj.empty, true, data.gridRecords, true);
252
-							},
253
-							onPaging: function(action) {
254
-									itp_fn_grid_paging(POMNG05010_GRID_ID, action, param);
255
-							}
256
-					};
257
-					itp_fn_grid_make_remote(option);
258
-			}
296
+		init: function () {
297
+			listObj.empty.push();
298
+			this.search();
299
+		},
300
+		colModel: gridColModel.list,
301
+		search: function() {
302
+			pageObj.screen();
303
+			this.load();
304
+		},
305
+		load: function() {
306
+			let param = $('#ITP_FORM_POMNG05010_SEARCH').serializeObject();
307
+			param.gridSize = $.jgrid.defaults.rowNum;
308
+			param.sbrandId = fn_make_user_info.get('brandId');
309
+			var option = {
310
+				gridId: POMNG05010_GRID_ID,
311
+				colModel: gridColModel.list,
312
+				param: param,
313
+				url: DOMAIN + API_DETAIL_GRID_LIST,
314
+				pager: POMNG05010_GRID_PAGER,
315
+				multiselect: true, 
316
+				loadComplete: function(data) {
317
+					itp_fn_grid_load_complete(data, POMNG05010_GRID_ID, true, 'number', 'POMNG05010', listObj.itp_POMNG05010_search, listObj.empty, true, data.gridRecords, true);
318
+				},
319
+				onPaging: function(action) {
320
+					itp_fn_grid_paging(POMNG05010_GRID_ID, action, param);
321
+				}
322
+			};
323
+			itp_fn_grid_make_remote(option);
324
+		}
259 325
 	}
260 326
 };
261 327
 

+ 2 - 6
src/main/webapp/js/app/vendinfo/ITP_VENDINFO03010.js

@@ -154,6 +154,8 @@ let pageObj = {
154 154
 		if(mode === 'LIST') { // 목록
155 155
 			$('#ITP_AJAX_VENDINFO03010_LIST_CONTAINER').show();
156 156
 			fn_show_btn_auth_array(['#ITP_BTN_VENDINFO03010_SRH', '#ITP_BTN_VENDINFO03010_NEWREG']);
157
+			$('#ITP_FORM_VENDINFO03010_SEARCH #ITP_FORM_VENDINFO03010_SEARCH_BRAND_ID').val(fn_make_user_info.get('brandId'));
158
+            $('#ITP_FORM_VENDINFO03010_SEARCH #ITP_FORM_VENDINFO03010_SEARCH_SPPLY_ID').val(fn_make_user_info.get('spplyId'));
157 159
 		}/* else if(mode == 'ADD') { // 등록
158 160
 			$('#ITP_AJAX_VENDINFO03010_DETAIL_CONTAINER').show();
159 161
 			fn_show_btn_auth_array(['#ITP_BTN_VENDINFO03010_CANCELLIST', '#ITP_BTN_VENDINFO03010_SAVE']);
@@ -201,8 +203,6 @@ let listObj = {
201 203
             let param = $('#ITP_FORM_VENDINFO03010_SEARCH').serializeObject();
202 204
             param.gridSize = $.jgrid.defaults.rowNum;
203 205
             param.gridPage = $.jgrid.defaults.page;
204
-            param.sbrandId = LOGIN_USER_INFO.brandId;
205
-            param.sspplyId = LOGIN_USER_INFO.spplyId;
206 206
             $(VENDINFO03010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
207 207
         }/*,
208 208
         create: function() {
@@ -224,8 +224,6 @@ let listObj = {
224 224
         },
225 225
         push: function() {
226 226
             let param = $('#ITP_FORM_VENDINFO03010_SEARCH').serializeObject();
227
-            param.sbrandId = LOGIN_USER_INFO.brandId;
228
-            param.sspplyId = LOGIN_USER_INFO.spplyId;
229 227
             listObj.itp_VENDINFO03010_param = param;
230 228
 
231 229
         },
@@ -253,8 +251,6 @@ let listObj = {
253 251
         load: function() {
254 252
             let param = $('#ITP_FORM_VENDINFO03010_SEARCH').serializeObject();
255 253
             param.gridSize = $.jgrid.defaults.rowNum;            
256
-            param.sbrandId = LOGIN_USER_INFO.brandId;
257
-            param.sspplyId = LOGIN_USER_INFO.spplyId;
258 254
             var option = {
259 255
                 gridId: VENDINFO03010_GRID_ID,
260 256
                 colModel: gridColModel.list,