Browse Source

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

whakdo963 2 years ago
parent
commit
48ddc21c92

+ 25 - 16
src/main/webapp/app/pomng/POMNG03010.html

@@ -134,7 +134,7 @@
134
 											<div class="col-xs-4 itp_ip">
134
 											<div class="col-xs-4 itp_ip">
135
 												<div class="col-xs-5 itp_in itp_noMar">
135
 												<div class="col-xs-5 itp_in itp_noMar">
136
 													<div class="input-daterange input-group date">
136
 													<div class="input-daterange input-group date">
137
-														<input type="text" id="ITP_FORM_POMNG03010_DETAIL_DLV_REQ_DT" class="form-control itp_input" name="dlvReqDt" value="">
137
+														<input type="text" id="ITP_FORM_POMNG03010_DETAIL_DLV_REQ_DT" data-check-required="empty" class="form-control itp_input" name="dlvReqDt" value="">
138
 													</div>
138
 													</div>
139
 												</div>
139
 												</div>
140
 											</div>
140
 											</div>
@@ -144,8 +144,8 @@
144
 													<input type="text" id="ITP_FORM_POMNG03010_DETAIL_SHMT_WHS_NM" class="form-control itp_input" name="shmtWhsNm" />
144
 													<input type="text" id="ITP_FORM_POMNG03010_DETAIL_SHMT_WHS_NM" class="form-control itp_input" name="shmtWhsNm" />
145
 												</div>
145
 												</div>
146
 												<div class="col-xs-4 itp_in" style="padding-left: 3px;">
146
 												<div class="col-xs-4 itp_in" style="padding-left: 3px;">
147
-													<button type="button" id="ITP_BTN_POMNG03010_SEARCH_SHMT_WHS_NM" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
148
-													<button type="button" id="ITP_BTN_POMNG03010_DELETE_SHMT_WHS_NM" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
147
+													<button type="button" id="ITP_BTN_POMNG03010_SEARCH_SHMT_WHS_NM" class="btn btn-success btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
148
+													<button type="button" id="ITP_BTN_POMNG03010_DELETE_SHMT_WHS_NM" class="btn btn-primary btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
149
 								                </div>
149
 								                </div>
150
 											</div>
150
 											</div>
151
 										</div>
151
 										</div>
@@ -171,6 +171,15 @@
171
 						<div class="col-xs-12">
171
 						<div class="col-xs-12">
172
 							<form id="ITP_FORM_POMNG03010_NDETAIL" class="form-horizontal">
172
 							<form id="ITP_FORM_POMNG03010_NDETAIL" class="form-horizontal">
173
 								<input type="hidden" id="ITP_FORM_POMNG03010_NDETAIL_VIEW_CD" name="viewCd" value="C">
173
 								<input type="hidden" id="ITP_FORM_POMNG03010_NDETAIL_VIEW_CD" name="viewCd" value="C">
174
+								<input type="hidden" id="ITP_FORM_POMNG03010_NDETAIL_JOB_CD" name="jobCd" value="P">
175
+								<input type="hidden" id="ITP_FORM_POMNG03010_NDETAIL_BRAND_ID" name="brandId" value="">
176
+								<input type="hidden" id="ITP_FORM_POMNG03010_NDETAIL_SPPLY_ID" name="spplyId" value="">
177
+								<input type="hidden" id="ITP_FORM_POMNG03010_NDETAIL_WHS_ID" name="whsId" value="">
178
+								<input type="hidden" id="ITP_FORM_POMNG03010_NDETAIL_LOCATION" name="location" value="">
179
+								<input type="hidden" id="ITP_FORM_POMNG03010_NDETAIL_SHMT_WHS_ID" name="shmtWhsId" value="">
180
+								<input type="hidden" id="ITP_FORM_POMNG03010_NDETAIL_SHMT_LOCATION" name="shmtLocation" value="">
181
+								<input type="hidden" id="ITP_FORM_POMNG03010_NDETAIL_PODR_MGR_ID" name="podrMgrId" value="">
182
+								<input type="text" id="ITP_FORM_POMNG03010_NDETAIL_DLV_DVSN" name="dlvDvsn" value="">
174
 					
183
 					
175
 								<section class="itp_form_sec">
184
 								<section class="itp_form_sec">
176
 									<h4 class="itp_form_tit">구매발주상세-신규발주생성</h4>
185
 									<h4 class="itp_form_tit">구매발주상세-신규발주생성</h4>
@@ -179,35 +188,35 @@
179
 											<label class="col-xs-2 itp_lb">브랜드 *</label>
188
 											<label class="col-xs-2 itp_lb">브랜드 *</label>
180
 											<div class="col-xs-4 itp_ip fnBrandNm"></div>
189
 											<div class="col-xs-4 itp_ip fnBrandNm"></div>
181
 											<label class="col-xs-2 itp_lb">발주번호</label>
190
 											<label class="col-xs-2 itp_lb">발주번호</label>
182
-											<div class="col-xs-4 itp_ip fnPchReqUnqNo"></div>
191
+											<div class="col-xs-4 itp_ip fnPchOdrUnqNo"></div>
183
 										</div>
192
 										</div>
184
 									</div>
193
 									</div>
185
 									<div class="itp_form_in">
194
 									<div class="itp_form_in">
186
 										<div class="form-group">
195
 										<div class="form-group">
187
-											<label class="col-xs-2 itp_lb">공급업체명</label>
196
+											<label class="col-xs-2 itp_lb">공급업체명*</label>
188
 											<div class="col-xs-4 itp_ip">
197
 											<div class="col-xs-4 itp_ip">
189
 												<div class="col-xs-5 itp_in">
198
 												<div class="col-xs-5 itp_in">
190
-													<input type="text" id="ITP_FORM_POMNG03010_NDETAIL_SPPLY_NM" class="form-control itp_input" name="spplyNm" />
199
+													<input type="text" id="ITP_FORM_POMNG03010_NDETAIL_SPPLY_NM" data-check-required="empty" class="form-control itp_input" name="spplyNm" />
191
 												</div>
200
 												</div>
192
 												<div class="col-xs-4 itp_in" style="padding-left: 3px;">
201
 												<div class="col-xs-4 itp_in" style="padding-left: 3px;">
193
-													<button type="button" id="ITP_BTN_POMNG03010_SEARCH_SPPLY_NM" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
194
-													<button type="button" id="ITP_BTN_POMNG03010_DELETE_SPPLY_NM" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
202
+													<button type="button" id="ITP_BTN_POMNG03010_NDETAIL_SEARCH_SPPLY_NM" class="btn btn-success btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
203
+													<button type="button" id="ITP_BTN_POMNG03010_NDETAIL_DELETE_SPPLY_NM" class="btn btn-primary btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
195
 								                </div>
204
 								                </div>
196
 											</div>
205
 											</div>
197
 											<label class="col-xs-2 itp_lb">발주일자</label>
206
 											<label class="col-xs-2 itp_lb">발주일자</label>
198
-											<div class="col-xs-4 itp_ip fnPoorDt"></div>
207
+											<div class="col-xs-4 itp_ip fnPodrDt"></div>
199
 										</div>
208
 										</div>
200
 									</div>
209
 									</div>
201
 									<div class="itp_form_in">	
210
 									<div class="itp_form_in">	
202
 										<div class="form-group">
211
 										<div class="form-group">
203
-											<label class="col-xs-2 itp_lb">납품장소</label>
212
+											<label class="col-xs-2 itp_lb">납품장소 *</label>
204
 											<div class="col-xs-4 itp_ip">
213
 											<div class="col-xs-4 itp_ip">
205
 												<div class="col-xs-5 itp_in">
214
 												<div class="col-xs-5 itp_in">
206
-													<input type="text" id="ITP_FORM_POMNG03010_NDETAIL_WHS_NM" class="form-control itp_input" name="whsNm"  />
215
+													<input type="text" id="ITP_FORM_POMNG03010_NDETAIL_WHS_NM" data-check-required="empty" class="form-control itp_input" name="whsNm"  />
207
 												</div>
216
 												</div>
208
 												<div class="col-xs-4 itp_in" style="padding-left: 3px;">
217
 												<div class="col-xs-4 itp_in" style="padding-left: 3px;">
209
-													<button type="button" id="ITP_BTN_POMNG03010_SEARCH_WHS_NM" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
210
-													<button type="button" id="ITP_BTN_POMNG03010_DELETE_WHS_NM" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
218
+													<button type="button" id="ITP_BTN_POMNG03010_SEARCH_WHS_NM" class="btn btn-success btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
219
+													<button type="button" id="ITP_BTN_POMNG03010_DELETE_WHS_NM" class="btn btn-primary btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
211
 								                </div>
220
 								                </div>
212
 											</div>
221
 											</div>
213
 											<label class="col-xs-2 itp_lb">발주 총 금액</label>
222
 											<label class="col-xs-2 itp_lb">발주 총 금액</label>
@@ -219,18 +228,18 @@
219
 											<label class="col-xs-2 itp_lb">발주담당자</label>
228
 											<label class="col-xs-2 itp_lb">발주담당자</label>
220
 											<div class="col-xs-4 itp_ip fnPodrMgrNm"></div>
229
 											<div class="col-xs-4 itp_ip fnPodrMgrNm"></div>
221
 											<label class="col-xs-2 itp_lb">배송구분</label>
230
 											<label class="col-xs-2 itp_lb">배송구분</label>
222
-											<div class="col-xs-4 itp_ip fnDlvDvsn"></div>
231
+											<div class="col-xs-4 itp_ip fnDlvDvsnNm"></div>
223
 										</div>
232
 										</div>
224
 									</div>
233
 									</div>
225
 									<div class="itp_form_in">	
234
 									<div class="itp_form_in">	
226
 										<div class="form-group">
235
 										<div class="form-group">
227
 											<label class="col-xs-2 itp_lb">발주담당자연락처</label>
236
 											<label class="col-xs-2 itp_lb">발주담당자연락처</label>
228
 											<div class="col-xs-4 itp_ip fnPodrMgrNo"></div>
237
 											<div class="col-xs-4 itp_ip fnPodrMgrNo"></div>
229
-											<label class="col-xs-2 itp_lb">납품요청일</label>
238
+											<label class="col-xs-2 itp_lb">납품요청일*</label>
230
 											<div class="col-xs-4 itp_ip">
239
 											<div class="col-xs-4 itp_ip">
231
 												<div class="col-xs-5 itp_in itp_noMar">
240
 												<div class="col-xs-5 itp_in itp_noMar">
232
 													<div class="input-daterange input-group date">
241
 													<div class="input-daterange input-group date">
233
-														<input type="text" id="ITP_FORM_POMNG03010_DETAIL_DLV_REQ_DT" class="form-control itp_input" name="dlvReqDt" value="">
242
+														<input type="text" id="ITP_FORM_POMNG03010_NDETAIL_DLV_REQ_DT" data-check-required="empty" class="form-control itp_input" name="dlvReqDt" value="">
234
 													</div>
243
 													</div>
235
 												</div>
244
 												</div>
236
 											</div>
245
 											</div>

+ 2 - 1
src/main/webapp/js/app/locales/locale-ko.js

@@ -313,7 +313,8 @@ const ITP_MSG_LOCALE = (function() {
313
 				"reqSave": "구매요청 하시겠습니까?",
313
 				"reqSave": "구매요청 하시겠습니까?",
314
                 "lackReqAmt": "구매한도가 부족합니다.",
314
                 "lackReqAmt": "구매한도가 부족합니다.",
315
                 "diffWrite": "수정은 작성자만 가능합니다.",
315
                 "diffWrite": "수정은 작성자만 가능합니다.",
316
-                "notWrite": "수정할 수 없는 상태입니다."
316
+                "notWrite": "수정할 수 없는 상태입니다.",
317
+				"delAllItem": "공급업체 변경 또는 삭제시  품목까지 삭제 처리되어집니다. 공급업체 삭제 하시겠습니까?"
317
 			},
318
 			},
318
 			"login": {
319
 			"login": {
319
 				"help": "아이디와 비밀번호를 입력하세요.",
320
 				"help": "아이디와 비밀번호를 입력하세요.",

+ 233 - 46
src/main/webapp/js/app/pomng/ITP_POMNG03010.js

@@ -36,6 +36,7 @@ const POMNG03010_NDETAIL_GRID_EMPTY = '#ITP_POMNG03010_NDETAIL_jqGridEmpty';
36
 
36
 
37
 let ITP_FORM_POMNG03010_DETAIL_IS_WRITING = false;
37
 let ITP_FORM_POMNG03010_DETAIL_IS_WRITING = false;
38
 let POMNG03010_GRID_LAST_ROW_ID;
38
 let POMNG03010_GRID_LAST_ROW_ID;
39
+let SCREEN_MODE ;
39
 
40
 
40
 /*API URL*/
41
 /*API URL*/
41
 let API_DETAIL_GRID_LIST 		= '/api/pomng/po-target-grid-list';	// 목록
42
 let API_DETAIL_GRID_LIST 		= '/api/pomng/po-target-grid-list';	// 목록
@@ -322,12 +323,10 @@ let pageObj = {
322
 		var _this = this;
323
 		var _this = this;
323
 		// 검색 납품장소
324
 		// 검색 납품장소
324
 		$('#ITP_FORM_POMNG03010_SSEARCH_SWHS_NM').on('click', function() {
325
 		$('#ITP_FORM_POMNG03010_SSEARCH_SWHS_NM').on('click', function() {
325
-			console.log("=================================");
326
 			_this.popup('SW');
326
 			_this.popup('SW');
327
 		});
327
 		});
328
 		// 검색 납품장소 텍스트 삭제 버튼 클릭
328
 		// 검색 납품장소 텍스트 삭제 버튼 클릭
329
 		$('#ITP_FORM_POMNG03010_SDELETE_SWHS_NM').on('click', function() {
329
 		$('#ITP_FORM_POMNG03010_SDELETE_SWHS_NM').on('click', function() {
330
-			console.log("=================================");
331
 			$('#ITP_FORM_POMNG03010_SEARCH_SWHS_NM').val('');
330
 			$('#ITP_FORM_POMNG03010_SEARCH_SWHS_NM').val('');
332
 			$('#ITP_FORM_POMNG03010_SEARCH_SWHS_ID').val('');
331
 			$('#ITP_FORM_POMNG03010_SEARCH_SWHS_ID').val('');
333
 			
332
 			
@@ -335,12 +334,10 @@ let pageObj = {
335
 		
334
 		
336
 		// 검색 공급사 
335
 		// 검색 공급사 
337
 		$('#ITP_FORM_POMNG03010_SSEARCH_SSPPLY_NM').on('click', function() {
336
 		$('#ITP_FORM_POMNG03010_SSEARCH_SSPPLY_NM').on('click', function() {
338
-			console.log("=================================");
339
 			_this.popup('SS');
337
 			_this.popup('SS');
340
 		});
338
 		});
341
 		// 검색 텍스트 삭제 버튼 클릭
339
 		// 검색 텍스트 삭제 버튼 클릭
342
 		$('#ITP_FORM_POMNG03010_SDELETE_SSPPLY_NM').on('click', function() {
340
 		$('#ITP_FORM_POMNG03010_SDELETE_SSPPLY_NM').on('click', function() {
343
-			console.log("=================================");
344
 			$('#ITP_FORM_POMNG03010_SEARCH_SSPPLY_NM').val('');
341
 			$('#ITP_FORM_POMNG03010_SEARCH_SSPPLY_NM').val('');
345
 			$('#ITP_FORM_POMNG03010_SEARCH_SSPPLY_ID').val('');
342
 			$('#ITP_FORM_POMNG03010_SEARCH_SSPPLY_ID').val('');
346
 			
343
 			
@@ -349,18 +346,61 @@ let pageObj = {
349
 		
346
 		
350
 		// 상세 출하창고
347
 		// 상세 출하창고
351
 		$('#ITP_BTN_POMNG03010_SEARCH_SHMT_WHS_NM').on('click', function() {
348
 		$('#ITP_BTN_POMNG03010_SEARCH_SHMT_WHS_NM').on('click', function() {
352
-			console.log("=================================");
353
 			_this.popup('SHW');
349
 			_this.popup('SHW');
354
 		});
350
 		});
355
 		// 검색 납품장소 텍스트 삭제 버튼 클릭
351
 		// 검색 납품장소 텍스트 삭제 버튼 클릭
356
 		$('#ITP_BTN_POMNG03010_DELETE_SHMT_WHS_NM').on('click', function() {
352
 		$('#ITP_BTN_POMNG03010_DELETE_SHMT_WHS_NM').on('click', function() {
357
-			console.log("=================================");
358
 			$('#ITP_FORM_POMNG03010_DETAIL_SHMT_WHS_ID').val('');
353
 			$('#ITP_FORM_POMNG03010_DETAIL_SHMT_WHS_ID').val('');
359
 			$('#ITP_FORM_POMNG03010_DETAIL_SHMT_LOCATION').val('');
354
 			$('#ITP_FORM_POMNG03010_DETAIL_SHMT_LOCATION').val('');
360
 			$('#ITP_FORM_POMNG03010_DETAIL_SHMT_WHS_NM').val('');
355
 			$('#ITP_FORM_POMNG03010_DETAIL_SHMT_WHS_NM').val('');
361
 			
356
 			
362
 		});
357
 		});
363
 		
358
 		
359
+		
360
+		// 검색 공급사 
361
+		$('#ITP_BTN_POMNG03010_NDETAIL_SEARCH_SPPLY_NM').on('click', function() {
362
+			_this.popup('NS');
363
+		});
364
+		// 검색 텍스트 삭제 버튼 클릭
365
+		$('#ITP_BTN_POMNG03010_NDETAIL_DELETE_SPPLY_NM').on('click', function() {
366
+			
367
+			var spplyId = $('#ITP_FORM_POMNG03010_NDETAIL_SPPLY_ID').val();
368
+			
369
+			
370
+			var records = $(POMNG03010_NDETAIL_GRID_ID).getGridParam('reccount')
371
+			
372
+			if (spplyId != '' && records != 0 ) {
373
+				// 공급업체 삭제시 품목까지 삭제 처리되어집니다. 삭제 하시겠습니까?
374
+				var delSpply = {
375
+						callBack: function(args) {
376
+								$('#ITP_FORM_POMNG03010_NDETAIL_SPPLY_NM').val('');
377
+								$('#ITP_FORM_POMNG03010_NDETAIL_SPPLY_ID').val('');	
378
+								
379
+								// 품목그리드삭제 처리	
380
+								pageObj.grid.clearData('NPC');
381
+								$('#ITP_FORM_POMNG03010_NDETAIL .fnPodrAmt').text('');	
382
+							}
383
+					};
384
+					itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.delAllItem, delSpply, null);
385
+			} else {
386
+				$('#ITP_FORM_POMNG03010_NDETAIL_SPPLY_NM').val('');
387
+				$('#ITP_FORM_POMNG03010_NDETAIL_SPPLY_ID').val('')
388
+			}
389
+		});
390
+		
391
+		// 상세 출하창고
392
+		$('#ITP_BTN_POMNG03010_SEARCH_WHS_NM').on('click', function() {
393
+			_this.popup('NHW');
394
+		});
395
+		// 검색 납품장소 텍스트 삭제 버튼 클릭
396
+		$('#ITP_BTN_POMNG03010_DELETE_WHS_NM').on('click', function() {
397
+			$('#ITP_FORM_POMNG03010_NDETAIL_WHS_ID').val('');
398
+			$('#ITP_FORM_POMNG03010_NDETAIL_LOCATION').val('');
399
+			$('#ITP_FORM_POMNG03010_NDETAIL_WHS_NM').val('');
400
+			
401
+		});
402
+		
403
+		
364
 	},
404
 	},
365
 	popup: function (arg) {
405
 	popup: function (arg) {
366
 		var popFn ;
406
 		var popFn ;
@@ -371,14 +411,18 @@ let pageObj = {
371
 			popFn = this.callback.searSpply;
411
 			popFn = this.callback.searSpply;
372
 		}  else if (arg == "SHW") {
412
 		}  else if (arg == "SHW") {
373
 			popFn = this.callback.searShmtWhs;
413
 			popFn = this.callback.searShmtWhs;
374
-		}
414
+		} else if (arg == "NS") {
415
+			popFn = this.callback.searNSpply;
416
+		} else if (arg == "NHW") {
417
+			popFn = this.callback.searNWhs;
418
+		} 
375
 		
419
 		
376
 		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
420
 		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
377
-		if (arg == "SW") {
421
+		if (arg == "SW" ) {
378
 			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
422
 			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
379
-		} else if (arg == "SS") {
423
+		} else if (arg == "SS" || arg == "NS" ) {
380
 			fn_call_popup('biz', 'BIZPOP_STORE_SPPLY', '#ITP_ASIDE', popFn, key, 'S');
424
 			fn_call_popup('biz', 'BIZPOP_STORE_SPPLY', '#ITP_ASIDE', popFn, key, 'S');
381
-		} else if (arg == "SHW") {
425
+		} else if (arg == "SHW" || arg == "NHW") {
382
 			const key1 = {brandId:fn_make_user_info.get('brandId')};
426
 			const key1 = {brandId:fn_make_user_info.get('brandId')};
383
 			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key1, 'S');
427
 			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key1, 'S');
384
 		}
428
 		}
@@ -387,7 +431,6 @@ let pageObj = {
387
 	},
431
 	},
388
 	callback: {
432
 	callback: {
389
 		searWhs: function(rowDataPop) {
433
 		searWhs: function(rowDataPop) {
390
-			console.log(rowDataPop);
391
 			if(rowDataPop) {
434
 			if(rowDataPop) {
392
 				$('#ITP_FORM_POMNG03010_SEARCH_SWHS_NM').val(rowDataPop.whsNm);
435
 				$('#ITP_FORM_POMNG03010_SEARCH_SWHS_NM').val(rowDataPop.whsNm);
393
 				$('#ITP_FORM_POMNG03010_SEARCH_SWHS_ID').val(rowDataPop.whsId);
436
 				$('#ITP_FORM_POMNG03010_SEARCH_SWHS_ID').val(rowDataPop.whsId);
@@ -395,15 +438,33 @@ let pageObj = {
395
 			
438
 			
396
 		},
439
 		},
397
 		searSpply: function(rowDataPop) {
440
 		searSpply: function(rowDataPop) {
398
-			console.log(rowDataPop);
399
 			if(rowDataPop) {
441
 			if(rowDataPop) {
400
 				$('#ITP_FORM_POMNG03010_SEARCH_SSPPLY_NM').val(rowDataPop.spplyNm);
442
 				$('#ITP_FORM_POMNG03010_SEARCH_SSPPLY_NM').val(rowDataPop.spplyNm);
401
 				$('#ITP_FORM_POMNG03010_SEARCH_SSPPLY_ID').val(rowDataPop.spplyId);
443
 				$('#ITP_FORM_POMNG03010_SEARCH_SSPPLY_ID').val(rowDataPop.spplyId);
402
 			}
444
 			}
403
 			
445
 			
446
+		},
447
+		searNSpply: function(rowDataPop) {
448
+			if(rowDataPop) {
449
+				var pspplyId = $('#ITP_FORM_POMNG03010_NDETAIL_SPPLY_ID').val();
450
+				if (pspplyId == "") {
451
+					$('#ITP_FORM_POMNG03010_NDETAIL_SPPLY_NM').val(rowDataPop.spplyNm);
452
+					$('#ITP_FORM_POMNG03010_NDETAIL_SPPLY_ID').val(rowDataPop.spplyId);
453
+				} else {
454
+					//$('#Table_ID').getGridParam('reccount');
455
+					var records = $(POMNG03010_NDETAIL_GRID_ID).getGridParam('reccount')
456
+					if (records != 0) {
457
+						if (pspplyId != rowDataPop.spplyId ) {
458
+							alert( "추가한 품목의 공급사와 서로 틀립니다 !");
459
+							return ;
460
+						}
461
+					}
462
+					
463
+				}
464
+			}
465
+			
404
 		},
466
 		},
405
 		searShmtWhs: function(rowDataPop) {
467
 		searShmtWhs: function(rowDataPop) {
406
-			console.log(rowDataPop);
407
 			if(rowDataPop) {
468
 			if(rowDataPop) {
408
 				$('#ITP_FORM_POMNG03010_DETAIL_SHMT_WHS_NM').val(rowDataPop.whsNm + " - " + rowDataPop.locationNm);
469
 				$('#ITP_FORM_POMNG03010_DETAIL_SHMT_WHS_NM').val(rowDataPop.whsNm + " - " + rowDataPop.locationNm);
409
 				$('#ITP_FORM_POMNG03010_DETAIL_SHMT_WHS_ID').val(rowDataPop.whsId);
470
 				$('#ITP_FORM_POMNG03010_DETAIL_SHMT_WHS_ID').val(rowDataPop.whsId);
@@ -411,6 +472,7 @@ let pageObj = {
411
 				
472
 				
412
 				// 본사배송일경우 해당 창고의 재고를 가져와 출고가능수량에 기입한다.
473
 				// 본사배송일경우 해당 창고의 재고를 가져와 출고가능수량에 기입한다.
413
 				// 만약 본사 배송일 경우 진행 처리함
474
 				// 만약 본사 배송일 경우 진행 처리함
475
+				/*
414
 				var param = {brandId: fn_make_user_info.get('brandId'), whsId:rowDataPop.whsId , location:rowDataPop.location };
476
 				var param = {brandId: fn_make_user_info.get('brandId'), whsId:rowDataPop.whsId , location:rowDataPop.location };
415
 				let gridItemData = [];
477
 				let gridItemData = [];
416
 				const rowData = $(POMNG03010_DETAIL_GRID_ID).getRowData();
478
 				const rowData = $(POMNG03010_DETAIL_GRID_ID).getRowData();
@@ -424,12 +486,15 @@ let pageObj = {
424
 				param.gridItemData = gridItemData;
486
 				param.gridItemData = gridItemData;
425
 					
487
 					
426
 				modifyObj.whsPassQty(param);
488
 				modifyObj.whsPassQty(param);
489
+				*/
490
+			}
491
+		},
492
+		searNWhs: function(rowDataPop) {
493
+			if(rowDataPop) {
494
+				$('#ITP_FORM_POMNG03010_NDETAIL_WHS_NM').val(rowDataPop.whsNm + " - " + rowDataPop.locationNm);
495
+				$('#ITP_FORM_POMNG03010_NDETAIL_WHS_ID').val(rowDataPop.whsId);
496
+				$('#ITP_FORM_POMNG03010_NDETAIL_LOCATION').val(rowDataPop.location);
427
 			}
497
 			}
428
-			
429
-			
430
-			
431
-			
432
-			
433
 		}
498
 		}
434
 	},
499
 	},
435
 	event: {
500
 	event: {
@@ -449,8 +514,8 @@ let pageObj = {
449
 //						case 'ITP_BTN_POMNG03010_REJECT'				: listObj.button.reject(); 		break;	// 반려
514
 //						case 'ITP_BTN_POMNG03010_REJECT'				: listObj.button.reject(); 		break;	// 반려
450
 						case 'ITP_BTN_POMNG03010_PO'					: modifyObj.button.save(); 			break;	// 발주
515
 						case 'ITP_BTN_POMNG03010_PO'					: modifyObj.button.save(); 			break;	// 발주
451
 						case 'ITP_BTN_POMNG03010_CANCELLIST'			: modifyObj.button.cancel(); 		break;	// 취소/목록 버튼
516
 						case 'ITP_BTN_POMNG03010_CANCELLIST'			: modifyObj.button.cancel(); 		break;	// 취소/목록 버튼
452
-						case 'ITP_BTN_POMNG03010_DETAIL_ADDROW'			: pageObj.grid.button.addRow(); 	break;	// 품목추가
453
-						case 'ITP_BTN_POMNG03010_DETAIL_DELROW'			: pageObj.grid.button.delRow(); 	break;	// 품목삭제
517
+						case 'ITP_BTN_POMNG03010_NDETAIL_ADDROW'			: pageObj.grid.button.addRow(); 	break;	// 품목추가
518
+						case 'ITP_BTN_POMNG03010_NDETAIL_DELROW'			: pageObj.grid.button.delRow(); 	break;	// 품목삭제
454
 					}
519
 					}
455
 				});
520
 				});
456
 			});
521
 			});
@@ -469,7 +534,13 @@ let pageObj = {
469
 			fn_show_btn_auth_array(['#ITP_BTN_POMNG03010_SRH', '#ITP_BTN_POMNG03010_POCREATE','#ITP_BTN_POMNG03010_NEWPOCREATE', '#ITP_BTN_POMNG03010_REJECT']);
534
 			fn_show_btn_auth_array(['#ITP_BTN_POMNG03010_SRH', '#ITP_BTN_POMNG03010_POCREATE','#ITP_BTN_POMNG03010_NEWPOCREATE', '#ITP_BTN_POMNG03010_REJECT']);
470
 			$('#ITP_FORM_POMNG03010_DETAIL_SBRAND_ID').val(fn_make_user_info.get('brandId'));
535
 			$('#ITP_FORM_POMNG03010_DETAIL_SBRAND_ID').val(fn_make_user_info.get('brandId'));
471
 			$('#ITP_FORM_POMNG03010_DETAIL_SSTORE_ID').val(fn_make_user_info.get('storeId'));
536
 			$('#ITP_FORM_POMNG03010_DETAIL_SSTORE_ID').val(fn_make_user_info.get('storeId'));
537
+			SCREEN_MODE = 'LIST' ;
472
 		} else if(mode == 'NPC') { // 신규발주등록
538
 		} else if(mode == 'NPC') { // 신규발주등록
539
+			$('#ITP_AJAX_POMNG03010_NDETAIL_CONTAINER').show();
540
+			fn_show_btn_auth_array(['#ITP_BTN_POMNG03010_PO', '#ITP_BTN_POMNG03010_CANCELLIST', '#ITP_BTN_POMNG03010_NDETAIL_ADDROW','#ITP_BTN_POMNG03010_NDETAIL_DELROW']);
541
+			$('#ITP_FORM_POMNG03010_DETAIL_BRAND_ID').val(fn_make_user_info.get('brandId'));
542
+			SCREEN_MODE = 'NPC' ;
543
+			pageObj.grid.init('NPC');
473
 		/*
544
 		/*
474
 			$('#ITP_AJAX_POMNG03010_DETAIL_CONTAINER').show();
545
 			$('#ITP_AJAX_POMNG03010_DETAIL_CONTAINER').show();
475
 			fn_show_btn_auth_array(['#ITP_BTN_POMNG03010_PO', '#ITP_BTN_POMNG03010_CANCELLIST', '#ITP_BTN_POMNG03010_NDETAIL_ADDROW', '#ITP_BTN_POMNG03010_NDETAIL_DELROW']);
546
 			fn_show_btn_auth_array(['#ITP_BTN_POMNG03010_PO', '#ITP_BTN_POMNG03010_CANCELLIST', '#ITP_BTN_POMNG03010_NDETAIL_ADDROW', '#ITP_BTN_POMNG03010_NDETAIL_DELROW']);
@@ -492,12 +563,14 @@ let pageObj = {
492
 			fn_show_btn_auth_array(['#ITP_BTN_POMNG03010_PO', '#ITP_BTN_POMNG03010_CANCELLIST']);
563
 			fn_show_btn_auth_array(['#ITP_BTN_POMNG03010_PO', '#ITP_BTN_POMNG03010_CANCELLIST']);
493
 			$('#ITP_FORM_POMNG03010_DETAIL_BRAND_ID').val(fn_make_user_info.get('brandId'));
564
 			$('#ITP_FORM_POMNG03010_DETAIL_BRAND_ID').val(fn_make_user_info.get('brandId'));
494
 			$('#ITP_FORM_POMNG03010_DETAIL_STORE_ID').val(fn_make_user_info.get('storeId'));
565
 			$('#ITP_FORM_POMNG03010_DETAIL_STORE_ID').val(fn_make_user_info.get('storeId'));
566
+			SCREEN_MODE = 'POC' ;
567
+			
495
 			
568
 			
496
 		}
569
 		}
497
 	},
570
 	},
498
 	grid: {
571
 	grid: {
499
 		init: function(mode, gridRows) {
572
 		init: function(mode, gridRows) {
500
-			this.gridId = (mode === 'NPC') ? POMNG03010_VIEW_NDETAIL_ID : POMNG03010_DETAIL_GRID_ID;
573
+			this.gridId = (mode === 'NPC') ? POMNG03010_NDETAIL_GRID_ID : POMNG03010_DETAIL_GRID_ID;
501
 			this.gridList = (mode === 'NPC') ? POMNG03010_NDETAIL_GRID_LIST : POMNG03010_DETAIL_GRID_LIST;
574
 			this.gridList = (mode === 'NPC') ? POMNG03010_NDETAIL_GRID_LIST : POMNG03010_DETAIL_GRID_LIST;
502
 			this.gridEmpty = (mode === 'NPC') ? POMNG03010_NDETAIL_GRID_EMPTY : POMNG03010_DETAIL_GRID_EMPTY;
575
 			this.gridEmpty = (mode === 'NPC') ? POMNG03010_NDETAIL_GRID_EMPTY : POMNG03010_DETAIL_GRID_EMPTY;
503
 			this.gridRows = gridRows;
576
 			this.gridRows = gridRows;
@@ -506,28 +579,112 @@ let pageObj = {
506
 			
579
 			
507
 		},
580
 		},
508
 		gridId: '',
581
 		gridId: '',
509
-		mode: 'DETAIL',
510
-		button: {},
582
+		button: {
583
+			addRow: function() {
584
+				// 팝업
585
+				var popFn = function(rowDataPop) {
586
+					// 기존등록 데이터
587
+					var exists = '';
588
+					const rowData = $(POMNG03010_NDETAIL_GRID_ID).getRowData();
589
+					$.each(rowData, function(key, value) {
590
+						if (value.viewCd != "D") {
591
+							exists = exists + value.brandUnitUnqNo + ';';	
592
+						}
593
+					});
594
+					
595
+					var diffchk = "N";
596
+					var spplyId = $('#ITP_FORM_POMNG03010_NDETAIL_SPPLY_ID').val();
597
+					var spplyNm = $('#ITP_FORM_POMNG03010_NDETAIL_SPPLY_NM').val();
598
+					
599
+					// 넘어오는 데이타가 서로 상이한 공급업체인지 파악
600
+					var chkSpplyId = "";
601
+					var chkSpplyNm = "";
602
+					$.each(rowDataPop, function(key, value) {
603
+						
604
+						if (chkSpplyId != "" ) {
605
+							if (value.spplyId != chkSpplyId ) {
606
+								alert("서로다른 공급사 품목을 발주 진행 할 수 없습니다.");
607
+								diffchk = "Y" ;
608
+								return false ;
609
+							} 
610
+						} else {
611
+							chkSpplyId = value.spplyId;
612
+							chkSpplyNm = value.spplyNm;
613
+						}
614
+					});
615
+					
616
+					if (diffchk == "Y") return;
617
+					
618
+					if (spplyId == "" ) {
619
+						$('#ITP_FORM_POMNG03010_NDETAIL_SPPLY_ID').val(chkSpplyId);
620
+						$('#ITP_FORM_POMNG03010_NDETAIL_SPPLY_NM').val(chkSpplyNm);
621
+					} else {
622
+						if (spplyId != chkSpplyId ) {
623
+							alert("납품 공급사와 품목 공급사 정보가 서로 다릅니다.");
624
+							diffchk = "Y" ;
625
+						}
626
+					}
627
+					
628
+					if (diffchk == "Y") return;
629
+					
630
+					/*
631
+					$.each(rowDataPop, function(key, value) {
632
+						// 공급업체가 상이사면 오류 알럿 출력
633
+						$.each(rowData, function(pkey, pvalue) {
634
+							console.log(rowData);
635
+							if (value.spplyId != pvalue.spplyId ) {
636
+								alert("2 서로다른 공급사 품목을 발주 진행 할 수 없습니다.")
637
+								diffchk = "Y";
638
+								return false;
639
+							}
640
+						});
641
+						if (diffchk == "Y") {
642
+							return false;
643
+						}
644
+					});
645
+					
646
+					if (diffchk == "Y") return;
647
+					*/
648
+					
649
+					$.each(rowDataPop, function(key, value) {
650
+						// 공급업체가 상이사면 오류 알럿 출력
651
+						if (exists.indexOf(value.brandUnitUnqNo) < 0 && value.podrPssblDvsn == 'PO01') {
652
+							value['viewCd'] = "C";
653
+							
654
+							$(POMNG03010_NDETAIL_GRID_ID).jqGrid('addRowData', value.brandUnitUnqNo, value, 'last');
655
+						}
656
+					});
657
+					$(POMNG03010_NDETAIL_GRID_EMPTY).hide();
658
+					
659
+				};
660
+				const key = {brandId:fn_make_user_info.get('brandId')};
661
+				fn_call_popup('biz', 'BIZPOP_ITEM', '#ITP_ASIDE', popFn, key, 'S');  // ==>dwkim 추후 작업 진행  파라메타 설명필요
662
+			},
663
+			delRow: function() {
664
+				itp_fn_grid_del_row(POMNG03010_NDETAIL_GRID_ID);
665
+				pageObj.grid.recal();
666
+			}
667
+			
668
+		},
511
 		gridList: '',
669
 		gridList: '',
512
 		gridEmpty: '',
670
 		gridEmpty: '',
513
 		gridRows: '',
671
 		gridRows: '',
514
 		load: function(mode, gridRows) {
672
 		load: function(mode, gridRows) {
673
+			
515
 			var _this = this;
674
 			var _this = this;
516
 			var option = {
675
 			var option = {
517
 				gridId: _this.gridId,
676
 				gridId: _this.gridId,
518
 				colModel: gridColModel.detail,
677
 				colModel: gridColModel.detail,
519
 				data: gridRows,
678
 				data: gridRows,
520
 				cellEdit: true,
679
 				cellEdit: true,
521
-				multiselect: (mode !== 'NPC'),
680
+				multiselect: (mode === 'NPC'),
522
 				loadComplete: function(data) {
681
 				loadComplete: function(data) {
523
-					console.log(data);
682
+					$(mode === 'NPC' ? POMNG03010_NDETAIL_GRID_LIST : POMNG03010_DETAIL_GRID_LIST).find('.ui-jqgrid .ui-jqgrid-bdiv').css('overflow-x', 'hidden');
524
 					
683
 					
525
-					$(_this.mode === 'NPC' ? POMNG03010_NDETAIL_GRID_LIST : POMNG03010_DETAIL_GRID_LIST).find('.ui-jqgrid .ui-jqgrid-bdiv').css('overflow-x', 'hidden');
526
-					data.records === 0 ? _this.clearData(_this.mode) : $(_this.mode === 'VIEW' ? POMNG03010_NDETAIL_GRID_EMPTY : POMNG03010_DETAIL_GRID_EMPTY).hide();
684
+					data.records === 0 ? _this.clearData(mode) : $(_this.mode === 'NPC' ? _this.clearData(mode) : POMNG03010_DETAIL_GRID_EMPTY).hide();
527
 					
685
 					
528
 				},
686
 				},
529
 				onCellSelect: function(rowid, cellIdx, cellValue) {
687
 				onCellSelect: function(rowid, cellIdx, cellValue) {
530
-					console.log('mode ===> ' + mode);
531
 					//POMNG03010_GRID_LAST_ROW_ID = itp_fn_set_data_editable(rowid, cellIdx, POMNG03010_GRID_LAST_ROW_ID, _this.gridId, ['actionId']);
688
 					//POMNG03010_GRID_LAST_ROW_ID = itp_fn_set_data_editable(rowid, cellIdx, POMNG03010_GRID_LAST_ROW_ID, _this.gridId, ['actionId']);
532
 				},
689
 				},
533
 				afterSaveCell: function(rowid,name,val,iRow,iCol) {
690
 				afterSaveCell: function(rowid,name,val,iRow,iCol) {
@@ -536,19 +693,16 @@ let pageObj = {
536
 					jQuery(_this.gridId).jqGrid('setRowData',rowid,{podrAmt: parseInt(val)*parseInt(unitAmt)});	
693
 					jQuery(_this.gridId).jqGrid('setRowData',rowid,{podrAmt: parseInt(val)*parseInt(unitAmt)});	
537
 					
694
 					
538
 					// 그리드 포문으로 금액 재계산후 구매요청금액에 넣어줌
695
 					// 그리드 포문으로 금액 재계산후 구매요청금액에 넣어줌
539
-					pageObj.grid.recal(_this.mode,_this.gridId);
696
+					pageObj.grid.recal( mode,_this.gridId);
540
 				}
697
 				}
541
 			};
698
 			};
542
 			itp_fn_grid_make_local(option);
699
 			itp_fn_grid_make_local(option);
543
 		},
700
 		},
544
 		recal: function(mode, gridId) {
701
 		recal: function(mode, gridId) {
545
 			//PCH_REQ_AMT
702
 			//PCH_REQ_AMT
546
-			console.log(gridId);
547
 			const rowData = $(gridId).getRowData();
703
 			const rowData = $(gridId).getRowData();
548
 			var podrAmt = 0 ;
704
 			var podrAmt = 0 ;
549
-			console.log("####################################");
550
 			$.each(rowData, function(key, value) {
705
 			$.each(rowData, function(key, value) {
551
-				console.log(rowData);
552
 				if (value.podrAmt != null && value.podrAmt != "" && value.viewCd != "D") {
706
 				if (value.podrAmt != null && value.podrAmt != "" && value.viewCd != "D") {
553
 					podrAmt = podrAmt + parseInt(value.podrAmt) ;
707
 					podrAmt = podrAmt + parseInt(value.podrAmt) ;
554
 				}
708
 				}
@@ -595,7 +749,7 @@ let listObj = {
595
 		},
749
 		},
596
 		newpocreate: function() {
750
 		newpocreate: function() {
597
 			pageObj.switchScreen('NPC');
751
 			pageObj.switchScreen('NPC');
598
-			itp_fn_form_clear_validate(null, '#ITP_FORM_POMNG03010_DETAIL');
752
+			itp_fn_form_clear_validate(null, '#ITP_FORM_POMNG03010_NDETAIL');
599
 			createObj.init();
753
 			createObj.init();
600
 		},
754
 		},
601
 		reject: function() {
755
 		reject: function() {
@@ -620,9 +774,7 @@ let listObj = {
620
 			let param = {};
774
 			let param = {};
621
 			param.brandId=fn_make_user_info.get('brandId');
775
 			param.brandId=fn_make_user_info.get('brandId');
622
 			param.gridUpdateData = gridUpdateData;
776
 			param.gridUpdateData = gridUpdateData;
623
-			console.log(JSON.stringify(param));
624
 			var chkFn = function(result) {
777
 			var chkFn = function(result) {
625
-				console.log(result);
626
 				if (result.code == "Y") {
778
 				if (result.code == "Y") {
627
 					//발수 생성화면으로 전화 
779
 					//발수 생성화면으로 전화 
628
 					listObj.button.pocreate(param);
780
 					listObj.button.pocreate(param);
@@ -684,7 +836,6 @@ let listObj = {
684
 				url: DOMAIN + API_DETAIL_GRID_LIST,
836
 				url: DOMAIN + API_DETAIL_GRID_LIST,
685
 				pager: POMNG03010_GRID_PAGER,
837
 				pager: POMNG03010_GRID_PAGER,
686
 				loadComplete: function(data) {
838
 				loadComplete: function(data) {
687
-					console.log(data);
688
 					itp_fn_grid_load_complete(data, POMNG03010_GRID_ID, true, 'number', 'POMNG03010', listObj.itp_POMNG03010_search, listObj.empty, true, data.gridRecords, true);
839
 					itp_fn_grid_load_complete(data, POMNG03010_GRID_ID, true, 'number', 'POMNG03010', listObj.itp_POMNG03010_search, listObj.empty, true, data.gridRecords, true);
689
 					var ids = $(POMNG03010_GRID_ID).getDataIDs();
840
 					var ids = $(POMNG03010_GRID_ID).getDataIDs();
690
 					$.each(ids, function(idx, rowId) {
841
 					$.each(ids, function(idx, rowId) {
@@ -730,17 +881,25 @@ let modifyObj = {
730
 			listObj.grid.search();
881
 			listObj.grid.search();
731
 		},
882
 		},
732
 		save: function() {
883
 		save: function() {
733
-			const formId = '#ITP_FORM_POMNG03010_DETAIL';
884
+			
885
+			const formId = (SCREEN_MODE == 'NPC' ? '#ITP_FORM_POMNG03010_NDETAIL' : '#ITP_FORM_POMNG03010_DETAIL');
734
 			itp_fn_form_clear_validate(null, formId);
886
 			itp_fn_form_clear_validate(null, formId);
735
 
887
 
736
-			// console.log($(formId).serializeObject());
737
 			if (itp_fn_form_event.isValid(formId)) {
888
 			if (itp_fn_form_event.isValid(formId)) {
889
+
738
 				var modalFn = {
890
 				var modalFn = {
739
 					callBack: () => {
891
 					callBack: () => {
740
-						itp_fn_form_event.removeChar('#ITP_FORM_OPER03010_DETAIL');
892
+						
893
+						if (SCREEN_MODE == 'NPC') {
894
+							itp_fn_form_event.removeChar('#ITP_FORM_OPER03010_NDETAIL');
895
+						} else {
896
+							itp_fn_form_event.removeChar('#ITP_FORM_OPER03010_DETAIL');
897
+						}
898
+						
741
 						
899
 						
742
 						let gridInsertData = [];
900
 						let gridInsertData = [];
743
-						const rowData = $(POMNG03010_DETAIL_GRID_ID).getRowData();
901
+						const rowData = (SCREEN_MODE == 'NPC' ? $(POMNG03010_NDETAIL_GRID_ID).getRowData() : $(POMNG03010_DETAIL_GRID_ID).getRowData());
902
+						 
744
 						
903
 						
745
 						$.each(rowData, function(key, value) {
904
 						$.each(rowData, function(key, value) {
746
 							gridInsertData.push(value);
905
 							gridInsertData.push(value);
@@ -790,12 +949,13 @@ let modifyObj = {
790
 		$('#ITP_FORM_POMNG03010_DETAIL #ITP_FORM_POMNG03010_DETAIL_SHMT_LOCATION').val(result.shmtLocation);
949
 		$('#ITP_FORM_POMNG03010_DETAIL #ITP_FORM_POMNG03010_DETAIL_SHMT_LOCATION').val(result.shmtLocation);
791
 		
950
 		
792
 		// 품목  리스트 조회
951
 		// 품목  리스트 조회
793
-		pageObj.grid.init('DETAIL', result.itemList);
952
+		pageObj.grid.init('POC', result.itemList);
794
 		// modifyObj.grid.load(result.spplyMgrList);
953
 		// modifyObj.grid.load(result.spplyMgrList);
795
 	},
954
 	},
796
 	whsPassQty: function(param) {
955
 	whsPassQty: function(param) {
797
 		console.log(JSON.stringify(param));
956
 		console.log(JSON.stringify(param));
798
-		fn_ajax_call(API_DETAIL_PASSQTY, JSON.stringify(param), this.passQtyCallback, 'POST');
957
+		// 추후작업 진행
958
+		//fn_ajax_call(API_DETAIL_PASSQTY, JSON.stringify(param), this.passQtyCallback, 'POST');
799
 	},
959
 	},
800
 	passQtyCallback: function (result) {
960
 	passQtyCallback: function (result) {
801
 		
961
 		
@@ -816,8 +976,11 @@ let modifyObj = {
816
 /*신규화면 Object*/
976
 /*신규화면 Object*/
817
 let createObj = {
977
 let createObj = {
818
 	init: function () {
978
 	init: function () {
819
-		$('#ITP_FORM_POMNG03010_DETAIL_BRAND_ID').val(fn_make_user_info.get('brandId'));
820
-		$('#ITP_FORM_POMNG03010_DETAIL_STORE_ID').val(fn_make_user_info.get('storeId'));
979
+		$('#ITP_FORM_POMNG03010_NDETAIL_BRAND_ID').val(fn_make_user_info.get('brandId'));
980
+		itp_fn_form_clear_validate(null, '#ITP_FORM_POMNG03010_NDETAIL');
981
+		const key = {brandId:fn_make_user_info.get('brandId'), viewCd: 'R'};
982
+		var param = $.param(key);
983
+		createObj.load(param);
821
 		
984
 		
822
 	},
985
 	},
823
 	button: {
986
 	button: {
@@ -829,13 +992,11 @@ let createObj = {
829
 			const formId = '#ITP_FORM_POMNG03010_DETAIL';
992
 			const formId = '#ITP_FORM_POMNG03010_DETAIL';
830
 			itp_fn_form_clear_validate(null, formId);
993
 			itp_fn_form_clear_validate(null, formId);
831
 
994
 
832
-			// console.log($(formId).serializeObject());
833
 			if (itp_fn_form_event.isValid(formId)) {
995
 			if (itp_fn_form_event.isValid(formId)) {
834
 				var modalFn = {
996
 				var modalFn = {
835
 					callBack: (args) => {
997
 					callBack: (args) => {
836
 						itp_fn_form_event.removeChar('#ITP_FORM_OPER03010_DETAIL');
998
 						itp_fn_form_event.removeChar('#ITP_FORM_OPER03010_DETAIL');
837
 						let param = $(formId).serializeObject();
999
 						let param = $(formId).serializeObject();
838
-						console.log(JSON.stringify(param));
839
 						var searhFn = function () {
1000
 						var searhFn = function () {
840
 							ITP_FORM_POMNG03010_DETAIL_IS_WRITING = false;
1001
 							ITP_FORM_POMNG03010_DETAIL_IS_WRITING = false;
841
 							listObj.grid.search();
1002
 							listObj.grid.search();
@@ -846,5 +1007,31 @@ let createObj = {
846
 				itp_fn_modal_confirm('저장 하시겠습니까?', modalFn);
1007
 				itp_fn_modal_confirm('저장 하시겠습니까?', modalFn);
847
 			}
1008
 			}
848
 		}
1009
 		}
1010
+	},
1011
+	load: function(param) {
1012
+		fn_ajax_call(API_DETAIL_NEW_INIT_INFO, param, this.callback, 'GET');
1013
+	},
1014
+	callback: function (result) {
1015
+		
1016
+		//pageObj.switchScreen('NPC');
1017
+		
1018
+		$('#ITP_FORM_POMNG03010_NDETAIL #ITP_FORM_POMNG03010_DETAIL_VIEW_CD').val('C');
1019
+		$('#ITP_FORM_POMNG03010_NDETAIL .fnBrandNm').text(result.brandNm);
1020
+		$('#ITP_FORM_POMNG03010_NDETAIL #ITP_FORM_POMNG03010_NDETAIL_BRAND_ID').val(result.brandId);
1021
+		$('#ITP_FORM_POMNG03010_NDETAIL .fnDlvDvsnNm').text(result.dlvDvsnNm);
1022
+		$('#ITP_FORM_POMNG03010_NDETAIL #ITP_FORM_POMNG03010_NDETAIL_DLV_DVSN').val(result.dlvDvsn);
1023
+		$('#ITP_FORM_POMNG03010_NDETAIL .fnPodrDt').text(result.podrDt);
1024
+		$('#ITP_FORM_POMNG03010_NDETAIL .podrMgrId').text(result.podrMgrId);
1025
+		$('#ITP_FORM_POMNG03010_NDETAIL .fnPodrMgrNm').text(result.podrMgrNm);
1026
+		$('#ITP_FORM_POMNG03010_NDETAIL .fnPodrMgrNo').text(result.podrMgrTelNo);
1027
+		
1028
+		var now = new Date();
1029
+		$('#ITP_TAB_POMNG03010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
1030
+		$('#ITP_FORM_POMNG03010_NDETAIL_DLV_REQ_DT').datepicker('setDate', new Date(now.setDate(now.getDate()+5)));
1031
+		
1032
+		// 품목  리스트 조회
1033
+		//pageObj.grid.init('DETAIL', result.itemList);
1034
+		
1035
+		
849
 	}
1036
 	}
850
 };
1037
 };

+ 12 - 0
src/main/webapp/js/app/popup/biz/ITP_BIZPOP_ITEM.js

@@ -147,6 +147,18 @@ function itp_fn_BIZPOP_ITEM(parentPopFn, args, returnType) {
147
 				label: '출고가능수량', //
147
 				label: '출고가능수량', //
148
 				width: '10', fixed: false, align: 'center',
148
 				width: '10', fixed: false, align: 'center',
149
 				sortable: false, hidden: true
149
 				sortable: false, hidden: true
150
+			},   
151
+			{
152
+				index: 'SPPLY_ID', name: 'spplyId',
153
+				label: '공급업체', //
154
+				width: '10', fixed: false, align: 'center',
155
+				sortable: false, hidden: true
156
+			},   
157
+			{
158
+				index: 'SPPLY_NM', name: 'spplyNm',
159
+				label: '공급업체명', //
160
+				width: '10', fixed: false, align: 'left',
161
+				sortable: false, hidden: false
150
 			}
162
 			}
151
 		],
163
 		],
152
 		loadBeforeSend: function(jqXHR) {
164
 		loadBeforeSend: function(jqXHR) {

+ 72 - 32
src/main/webapp/mobile/app/mpomng/MPOMNG03010.html

@@ -1,18 +1,18 @@
1
 <section id="ITP_MOBILE_MPOMNG03010">  
1
 <section id="ITP_MOBILE_MPOMNG03010">  
2
-  <div id="ITP_POP_MPOMNG03010_SPPLY_AREA" class="popup2 mobile-pop-close" style="display: block;">
2
+  <div id="ITP_POP_MPOMNG03010_SPPLY_AREA" class="popup2 mobile-pop-close" style="display: none;">
3
 	<div class="pop">
3
 	<div class="pop">
4
 		<div class="header">
4
 		<div class="header">
5
 			<div class="header_left">
5
 			<div class="header_left">
6
 				<label>> 공급업체</label>
6
 				<label>> 공급업체</label>
7
 			</div>
7
 			</div>
8
 			<div class="header_right">
8
 			<div class="header_right">
9
-				<button type="button" id="ITP_BTN_MPOMNG03010_POP_SPPLY_CLOSE" class="btn-pop-close"><img src="../img/close.png"></button>
9
+				<button type="button" id="ITP_BTN_MPOMNG03010_POP_SPPLY_CLOSE"><img src="../img/close.png"></button>
10
 			</div>
10
 			</div>
11
 		</div>
11
 		</div>
12
 		<div class="search_bar">
12
 		<div class="search_bar">
13
 			<form id="ITP_FORM_MPOMNG03010_POP_SPPLY" class="form-horizontal" onsubmit="return false;">
13
 			<form id="ITP_FORM_MPOMNG03010_POP_SPPLY" class="form-horizontal" onsubmit="return false;">
14
-				<input type="hidden" id="ITP_FORM_MPOMNG03010_SPPLY_ITEM_BRAND_ID" name="sbrandId" value="">
15
-				<input type="hidden" id="ITP_FORM_MPOMNG03010_SPPLY_ITEM_STORE_ID" name="sstoreId" value="">
14
+				<input type="hidden" id="ITP_FORM_MPOMNG03010_POP_SPPLY_ITEM_BRAND_ID" name="sbrandId" value="">
15
+				<input type="hidden" id="ITP_FORM_MPOMNG03010_PO_PSPPLY_ITEM_STORE_ID" name="sstoreId" value="">
16
 				<input id="ITP_FORM_MPOMNG03010_POP_SPPLY_KEYWORD" type="text" name="sSpplyNm" placeholder="공급업체명">
16
 				<input id="ITP_FORM_MPOMNG03010_POP_SPPLY_KEYWORD" type="text" name="sSpplyNm" placeholder="공급업체명">
17
 				<button id="ITP_BTN_MPOMNG03010_POP_SPPLY_SEARCH"><img src="../img/search.png"></button>
17
 				<button id="ITP_BTN_MPOMNG03010_POP_SPPLY_SEARCH"><img src="../img/search.png"></button>
18
 			</form>
18
 			</form>
@@ -20,39 +20,76 @@
20
 		<div class="search_bar">
20
 		<div class="search_bar">
21
 			<button id="ITP_BTN_MPOMNG03010_POP_SPPLY_NM" class="btn_blue">공급업체▼</button>
21
 			<button id="ITP_BTN_MPOMNG03010_POP_SPPLY_NM" class="btn_blue">공급업체▼</button>
22
 		</div>
22
 		</div>
23
-		<div id="ITP_LIST_MPOMNG03010_POP_SPPLY_AREA" class="popup_scroll">
24
-			<ul id="ITP_LIST_MPOMNG03010_POP_SPPLY_ROWS" class="panel-group itp_nav"></ul>
25
-			<div id="ITP_LIST_MPOMNG03010_POP_SPPLY_ROWCOPY" style="display: block;">
23
+		<div id="ITP_POP_MPOMNG03010_SPPLY_LIST_AREA" class="popup_scroll">
24
+			<ul id="ITP_POP_MPOMNG03010_SPPLY_LIST_ROWS" class="panel-group itp_nav"></ul>
25
+			<div id="ITP_POP_MPOMNG03010_SPPLY_LIST_ROWCOPY" style="display: block;">
26
 				<li>
26
 				<li>
27
 					<div class="scroll_left">
27
 					<div class="scroll_left">
28
 						<div class="fnSpplyNm">공급업체 명A</div>
28
 						<div class="fnSpplyNm">공급업체 명A</div>
29
 						<div class="fnLocationNm">(상세위치내용)</div>
29
 						<div class="fnLocationNm">(상세위치내용)</div>
30
 					</div>
30
 					</div>
31
 					<div class="scroll_right">
31
 					<div class="scroll_right">
32
-						<button id="ITP_BTN_MPOMNG03010_POP_SPPLY_CHOICE" class="fnSpplyId" data-SPPLY-id="">선택</button>
32
+						<button id="ITP_BTN_MPOMNG03010_POP_SPPLY_CHOICE" class="fnSpplyId">선택</button>
33
 					</div>
33
 					</div>
34
 				</li>
34
 				</li>
35
 			</div>
35
 			</div>
36
 		</div>
36
 		</div>
37
 	</div>
37
 	</div>
38
-</div>
39
-  <div id="ITP_AJAX_MPOMNG03010_DETAIL_CONTAINER" style="display: block;">
40
-      <form id="ITP_FORM_MPOMNG01010_DETAIL" class="form-horizontal" onsubmit="return false;">
41
-      <input type="hidden" id="ITP_FORM_MPOMNG01010_DETAIL_VIEW_CD" name="viewCd" value="C">
38
+  </div>
39
+	<div id="ITP_POP_MPOMNG03010_WHS_AREA" class="popup2 mobile-pop-close" style="display: none;">
40
+		<div class="pop">
41
+			<div class="header">
42
+				<div class="header_left">
43
+					<label>> 납품장소</label>
44
+				</div>
45
+				<div class="header_right">
46
+					<button type="button" id="ITP_BTN_MPOMNG03010_POP_WHS_CLOSE" class="btn-pop-close"><img src="../img/close.png"></button>
47
+				</div>
48
+			</div>
49
+			<div class="search_bar">
50
+				<form id="ITP_FORM_MPOMNG03010_POP_WHS" class="form-horizontal" onsubmit="return false;">
51
+					<input type="hidden" id="ITP_FORM_MPOMNG03010_WHS_ITEM_BRAND_ID" name="sbrandId" value="">
52
+					<input type="hidden" id="ITP_FORM_MPOMNG03010_WHS_ITEM_STORE_ID" name="sstoreId" value="">
53
+					<input id="ITP_FORM_MPOMNG03010_POP_WHS_KEYWORD" type="text" name="swhsNm" placeholder="납품장소명">
54
+					<button id="ITP_BTN_MPOMNG03010_POP_WHS_SEARCH"><img src="../img/search.png"></button>
55
+				</form>
56
+			</div>
57
+			<div class="search_bar">
58
+				<button id="ITP_BTN_MPOMNG03010_POP_WHS_NM" class="btn_blue">납품장소▼</button>
59
+			</div>
60
+			<div id="ITP_LIST_MPOMNG03010_POP_WHS_AREA" class="popup_scroll">
61
+				<ul id="ITP_LIST_MPOMNG03010_POP_WHS_ROWS" class="panel-group itp_nav"></ul>
62
+				<div id="ITP_LIST_MPOMNG03010_POP_WHS_ROWCOPY" style="display:none;">
63
+					<li class="row_2">
64
+						<div class="scroll_left">
65
+							<div class="fnWhsNm">브랜드 창고 명A</div>
66
+							<div class="fnLocationNm">(상세위치내용)</div>
67
+						</div>
68
+						<div class="scroll_right">
69
+							<button id="ITP_BTN_MPOMNG03010_POP_WHS_CHOICE" class="fnWhsId" data-whs-id="">선택</button>
70
+						</div>
71
+					</li>
72
+				</div>
73
+			</div>
74
+		</div>
75
+	</div>
76
+  <div id="ITP_AJAX_MPOMNG03010_LIST_CONTAINER" style="display: block;">
77
+      <form id="ITP_FORM_MPOMNG03010_LIST" class="form-horizontal" onsubmit="return false;">
78
+      <input type="hidden" id="ITP_FORM_MPOMNG03010_DETAIL_VIEW_CD" name="viewCd" value="C">
42
 	    <div class="content">
79
 	    <div class="content">
43
 	      <div class="line">
80
 	      <div class="line">
44
 	        <label>발주일자</label>
81
 	        <label>발주일자</label>
45
 	        <div class="date_to">
82
 	        <div class="date_to">
46
-	          <input id="ITP_FORM_MPOMNG03010_DETAIL_PODR_DT" name="podrDt" class="year" type="date">
83
+	          <input id="ITP_FORM_MPOMNG03010_LIST_SEARCH_FROM_DT" name="fromDt" class="year" type="date">
47
 	          <div class="at">~</div>
84
 	          <div class="at">~</div>
48
-	          <input id="ITP_FORM_MPOMNG03010_DETAIL" class="year" type="date">
85
+	          <input id="ITP_FORM_MPOMNG03010_LIST_SEARCH_TO_DT" name="toDt" class="year" type="date">
49
 	        </div>
86
 	        </div>
50
 	      </div>
87
 	      </div>
51
 	      <div class="line">
88
 	      <div class="line">
52
 	        <label>발주상태</label>
89
 	        <label>발주상태</label>
53
 	        <div class="search_wrap">
90
 	        <div class="search_wrap">
54
 		        <div class="line_right">
91
 		        <div class="line_right">
55
-		          <select name="podrStCd" class="m9" id="ITP_FORM_MPOMNG03010_DETAIL_PODR_ST_CD">
92
+		          <select name="spchOdrStCd" class="m9" id="ITP_FORM_MPOMNG03010_LIST_SEARCH_PCH_ORD_ST_CD">
56
 		            <option value=""></option>
93
 		            <option value=""></option>
57
 		          </select>
94
 		          </select>
58
 		        </div>
95
 		        </div>
@@ -62,11 +99,12 @@
62
 	        <label>공급업체</label>
99
 	        <label>공급업체</label>
63
 	        <div class="search_wrap">
100
 	        <div class="search_wrap">
64
 		        <div class="float_left">
101
 		        <div class="float_left">
65
-		          <input id="ITP_FORM_MPOMNG03010_DETAIL_SPPLY_NM" type="text" placeholder="A공급업체명">
102
+		          <input type="text" id="ITP_FORM_MPOMNG03010_LIST_SEARCH_SPPLY_NM" name="sspplyNm" placeholder="A공급업체명">
103
+				  <input type="hidden" id="ITP_FORM_MPOMNG03010_LIST_SEARCH_SPPLY_ID" class="" name="sspplyId" />
66
 		        </div>
104
 		        </div>
67
 		        <div class="float_left_btn">
105
 		        <div class="float_left_btn">
68
-		          <button id="ITP_BTN_MPOMNG03010_DETAIL_SEARCH_SPPLY_NM" data-call-popup="ITP_POP_MPOMNG03010_SPPLY_AREA"><img src="../img/search.png" alt=""></button>
69
-		          <button id="ITP_BTN_MPOMNG03010_DETAIL_DELETE_SPPLY_NM"><img src="../img/delete.png" alt=""></button>
106
+		          <button id="ITP_BTN_MPOMNG03010_LIST_SEARCH_SPPLY_NM"><img src="../img/search.png" alt=""></button>
107
+		          <button id="ITP_BTN_MPOMNG03010_LIST_DELETE_SPPLY_NM"><img src="../img/delete.png" alt=""></button>
70
 		        </div>
108
 		        </div>
71
 	        </div> 
109
 	        </div> 
72
 	      </div>
110
 	      </div>
@@ -74,27 +112,28 @@
74
           	<label>납품장소</label>
112
           	<label>납품장소</label>
75
           	<div class="search_nm">
113
           	<div class="search_nm">
76
 	            <div class="float_left">
114
 	            <div class="float_left">
77
-	              <input type="text" id="ITP_FORM_MPOMNG03010_DETAIL_DLV_PLACE_NM" class="" name="dlvPlaceNm" placeholder="매장명" />
115
+	              <input type="text" id="ITP_FORM_MPOMNG03010_LIST_SEARCH_WHS_NM" class="" name="swhsNm" placeholder="매장명" />
116
+				  <input type="hidden" id="ITP_FORM_MPOMNG03010_LIST_SEARCH_WHS_ID" class="" name="swhsId" />
78
 	            </div>
117
 	            </div>
79
 	            <div class="float_left_btn">
118
 	            <div class="float_left_btn">
80
-	              <button id="ITP_BTN_MPOMNG03010_DETAIL_SEARCH_WHS_NM" data-call-popup="ITP_POP_MPOMNG03010_WHS_AREA"><img src="../img/search.png" alt=""></button>
81
-	              <button id="ITP_BTN_MPOMNG03010_DETAIL_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
119
+	              <button id="ITP_BTN_MPOMNG03010_LIST_SEARCH_WHS_NM"><img src="../img/search.png" alt=""></button>
120
+	              <button id="ITP_BTN_MPOMNG03010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
82
 	            </div>
121
 	            </div>
83
           	</div>
122
           	</div>
84
    	 	  </div>
123
    	 	  </div>
85
 	      <div class="line" style="height:50px;">
124
 	      <div class="line" style="height:50px;">
86
 	        <div class="search">
125
 	        <div class="search">
87
-	          <button id="ITP_BTN_MPOMNG03010_DETAIL_SEARCH" class="btn-primary btn-sm ADB">검색</button>
126
+	          <button id="ITP_BTN_MPOMNG03010_LIST_SEARCH" class="btn-primary btn-sm ADB">검색</button>
88
 	        </div>
127
 	        </div>
89
 	      </div>
128
 	      </div>
90
 	      <div class="table_header">
129
 	      <div class="table_header">
91
 	        <h1>> 발주 내역</h1>
130
 	        <h1>> 발주 내역</h1>
92
 	      </div>
131
 	      </div>
93
 	    </div>
132
 	    </div>
94
-      <div id="ITP_LIST_MPOMNG03010_ITEM_AREA" class="scroll_area row-3">
95
-        <ul id="ITP_LIST_MPOMNG03010_DETAIL_ROWS" class="panel-group"></ul>
96
-        	<div id="ITP_LIST_MPOMNG03010_DETAIL_ROWCOPY" style="display: block;">
97
-		      <li class="history_list">
133
+      <div id="ITP_LIST_MPOMNG03010_LIST_ITEM_AREA" class="scroll_area row-3">
134
+        <ul id="ITP_LIST_MPOMNG03010_LIST_ITEM_ROWS" class="panel-group"></ul>
135
+        	<div id="ITP_LIST_MPOMNG03010_LIST_ITEM_ROWCOPY" style="display: block;">
136
+		      <li class="list-row">
98
 		        <div class="left">
137
 		        <div class="left">
99
 		          <div class="nomal">
138
 		          <div class="nomal">
100
 		            <label>발주일자 &nbsp;:</label>
139
 		            <label>발주일자 &nbsp;:</label>
@@ -140,8 +179,8 @@
140
     </form>
179
     </form>
141
   </div>
180
   </div>
142
   <div id="ITP_AJAX_MPOMNG03010_VIEW_CONTAINER" style="display: none;">
181
   <div id="ITP_AJAX_MPOMNG03010_VIEW_CONTAINER" style="display: none;">
143
-     <form id="ITP_FORM_MPOMNG02010_VIEW" class="form-horizontal" onsubmit="return false;">
144
-      <input type="hidden" id="ITP_FORM_MPOMNG02010_VIEW_VIEW_CD" name="viewCd" value="C">
182
+     <form id="ITP_FORM_MPOMNG03010_VIEW" class="form-horizontal" onsubmit="return false;">
183
+      <input type="hidden" id="ITP_FORM_MPOMNG03010_VIEW_VIEW_CD" name="viewCd" value="C">
145
 	    <div class="content">
184
 	    <div class="content">
146
 	      <div class="line">
185
 	      <div class="line">
147
 	        <label>발주일자</label>
186
 	        <label>발주일자</label>
@@ -171,10 +210,10 @@
171
 	        <h1>> 발주 품목</h1>
210
 	        <h1>> 발주 품목</h1>
172
 	      </div>
211
 	      </div>
173
 	    </div>
212
 	    </div>
174
-      <div id="ITP_LIST_MPOMNG03010_ITEM_AREA" class="scroll_area row-2">
175
-        <ul id="ITP_LIST_MPOMNG03010_VIEW_ROWS" class="panel-group"></ul>
176
-        	<div id="ITP_LIST_MPOMNG03010_VIEW_ROWCOPY" style="display:block;">	      
177
-	        	<li>
213
+      <div id="ITP_LIST_MPOMNG03010_VIEW_ITEM_AREA" class="scroll_area row-2">
214
+        <ul id="ITP_LIST_MPOMNG03010_VIEW_ITEM_ROWS" class="panel-group"></ul>
215
+        	<div id="ITP_LIST_MPOMNG03010_VIEW_ITEM_ROWCOPY" style="display:block;">
216
+			  <li class="list-row">
178
 		        <div>
217
 		        <div>
179
 		          <div class="left_info col-4">
218
 		          <div class="left_info col-4">
180
 		            <div class="thick">
219
 		            <div class="thick">
@@ -212,4 +251,5 @@
212
 	    </div>
251
 	    </div>
213
     </form>
252
     </form>
214
   </div>
253
   </div>
254
+  <div id="ITP_MOBILE_JS"></div>
215
 </section>
255
 </section>

+ 248 - 115
src/main/webapp/mobile/app/mpomng/MPOMNG04010.html

@@ -1,128 +1,261 @@
1
-<section id="ITP_MOBILE_MPOMNG04010">  
2
-	<div id="ITP_AJAX_MPOMNG04010_LIST_CONTAINER" >
3
-	   <form id="ITP_FORM_MPOMNG04010_LIST" class="form-horizontal" onsubmit="return false;">
4
-		<input type="hidden" id="ITP_FORM_MPOMNG04010_LIST_VIEW_CD" name="viewCd" value="C">
5
-		  <div class="content">
6
-			<div class="line">
7
-			  <select class="label" name="dlvSchDt" id="ITP_FORM_MPOMNG04010_LIST_DLV_SCH_DT">
8
-				<option value="">납품예정일</option>
9
-			  </select>
10
-			  <div class="date_to">
11
-				<input id="ITP_FORM_MPOMNG04010_LIST_DLV_REQ_DT" name="dlv_req_dt" class="year" type="date">
12
-				<div class="at">~</div>
13
-				<input id="ITP_FORM_MPOMNG04010_LIST_DLV_CMPLT_DT" name="dlvCmpltDt" class="year" type="date">
14
-			  </div>
1
+<section id="ITP_MOBILE_MPOMNG04010">
2
+	<div id="ITP_POP_MPOMNG04010_SPPLY_AREA" class="popup2 mobile-pop-close" style="display: none;">
3
+		<div class="pop">
4
+			<div class="header">
5
+				<div class="header_left">
6
+					<label>> 공급업체</label>
7
+				</div>
8
+				<div class="header_right">
9
+					<button type="button" id="ITP_BTN_MPOMNG04010_POP_SPPLY_CLOSE"><img src="../img/close.png"></button>
10
+				</div>
11
+			</div>
12
+			<div class="search_bar">
13
+				<form id="ITP_FORM_MPOMNG04010_POP_SPPLY_SEARCH" class="form-horizontal" onsubmit="return false;">
14
+					<input type="hidden" id="ITP_FORM_MPOMNG04010_POP_SPPLY_ITEM_BRAND_ID" name="sbrandId" value="">
15
+					<input type="hidden" id="ITP_FORM_MPOMNG04010_PO_PSPPLY_ITEM_STORE_ID" name="sstoreId" value="">
16
+					<input id="ITP_FORM_MPOMNG04010_POP_SPPLY_KEYWORD" type="text" name="sspplyNm" placeholder="공급업체명">
17
+					<button id="ITP_BTN_MPOMNG04010_POP_SPPLY_SEARCH"><img src="../img/search.png"></button>
18
+				</form>
15
 			</div>
19
 			</div>
16
-			<div class="line">
17
-			  <label>납품상태</label>
18
-			  <div class="search_wrap">
19
-				  <div class="line_right">
20
-					<select name="dlvStCd" id="ITP_FORM_MPOMNG04010_LIST_DLV_ST_CD">
21
-					  <option value=""></option>
22
-					</select>
23
-				  </div>
24
-			  </div>
20
+			<div class="search_bar">
21
+				<button id="ITP_BTN_MPOMNG04010_POP_SPPLY_NM" class="btn_blue">공급업체▼</button>
22
+			</div>
23
+			<div id="ITP_POP_MPOMNG04010_LIST_SPPLY_AREA" class="popup_scroll">
24
+				<ul id="ITP_POP_MPOMNG04010_LIST_SPPLY_ROWS" class="panel-group itp_nav"></ul>
25
+				<div id="ITP_POP_MPOMNG04010_LIST_SPPLY_ROWCOPY" style="display: none;">
26
+					<li class="list-row">
27
+						<div class="scroll_left">
28
+							<div class="fnSpplyNm">공급업체 명A</div>
29
+							<div class="fnStNm">($)</div>
30
+						</div>
31
+						<div class="scroll_right">
32
+							<button id="ITP_BTN_MPOMNG04010_POP_SPPLY_CHOICE" class="fnSpplyId" data-item-key="">선택</button>
33
+						</div>
34
+					</li>
35
+				</div>
36
+			</div>
37
+		</div>
38
+	</div>
39
+	<div id="ITP_POP_MPOMNG04010_WHS_AREA" class="popup2 mobile-pop-close" style="display: none;">
40
+		<div class="pop">
41
+			<div class="header">
42
+				<div class="header_left">
43
+					<label>> 납품장소</label>
44
+				</div>
45
+				<div class="header_right">
46
+					<button type="button" id="ITP_BTN_MPOMNG04010_POP_WHS_CLOSE"><img src="../img/close.png"></button>
47
+				</div>
25
 			</div>
48
 			</div>
26
-			<div class="line">
27
-			  <label>공급업체</label>
28
-			  <div class="search_wrap">
29
-				  <div class="float_left">
30
-					<input id="ITP_FORM_MPOMNG04010_LIST_SPPLY_NM" name="spplyNm" type="text" placeholder="A공급업체명">
31
-				  </div>
32
-				  <div class="float_left_btn">
33
-					<button id="ITP_BTN_MPOMNG04010_LIST_SEARCH_SPPLY_NM" data-call-popup="ITP_POP_MPOMNG04010_SPPLY_AREA"><img src="../img/search.png" alt=""></button>
34
-					<button id="ITP_BTN_MPOMNG04010_LIST_DELETE_SPPLY_NM"><img src="../img/delete.png" alt=""></button>
35
-				  </div>
36
-			  </div> 
49
+			<div class="search_bar">
50
+				<form id="ITP_FORM_MPOMNG04010_POP_WHS" class="form-horizontal" onsubmit="return false;">
51
+					<input type="hidden" id="ITP_FORM_MPOMNG04010_WHS_ITEM_BRAND_ID" name="sbrandId" value="">
52
+					<input type="hidden" id="ITP_FORM_MPOMNG04010_WHS_ITEM_STORE_ID" name="sstoreId" value="">
53
+					<input id="ITP_FORM_MPOMNG04010_POP_WHS_KEYWORD" type="text" name="swhsNm" placeholder="납품장소명">
54
+					<button id="ITP_BTN_MPOMNG04010_POP_WHS_SEARCH"><img src="../img/search.png"></button>
55
+				</form>
37
 			</div>
56
 			</div>
38
-			<div class="line">
39
-				<label>납품장소</label>
40
-				<div class="search_nm">
41
-				  <div class="float_left">
42
-					<input type="text" id="ITP_FORM_MPOMNG04010_LIST_DLV_PLACE_NM" class="" name="dlvPlaceNm" placeholder="매장명" />
43
-				  </div>
44
-				  <div class="float_left_btn">
45
-					<button id="ITP_BTN_MPOMNG04010_LIST_SEARCH_WHS_NM" data-call-popup="ITP_POP_MPOMNG04010_WHS_AREA"><img src="../img/search.png" alt=""></button>
46
-					<button id="ITP_BTN_MPOMNG04010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
47
-				  </div>
48
-				</div>
49
-				</div>
50
-			<div class="line">
51
-			  <label>품목명</label>
52
-				 <div class="search_wrap">
53
-				  <div class="float_left">
54
-					<input id="ITP_FORM_MPOMNG04010_LIST_ITEM_NM" name="itemNm" style="width: 262px;" type="text" placeholder="A매장명">
55
-				  </div>
56
-			  </div>
57
+			<div class="search_bar">
58
+				<button id="ITP_BTN_MPOMNG04010_POP_WHS_NM" class="btn_blue">납품장소▼</button>
57
 			</div>
59
 			</div>
58
-			<div class="line" style="height:50px;">
59
-			  <div class="search">
60
-				<button id="ITP_BTN_MPOMNG04010_LIST_SEARCH" class="btn-primary btn-sm ADB">검색</button>
61
-			  </div>
60
+			<div id="ITP_LIST_MPOMNG04010_POP_WHS_AREA" class="popup_scroll">
61
+				<ul id="ITP_LIST_MPOMNG04010_POP_WHS_ROWS" class="panel-group itp_nav"></ul>
62
+				<div id="ITP_LIST_MPOMNG04010_POP_WHS_ROWCOPY" style="display:none;">
63
+					<li class="list-row">
64
+						<div class="scroll_left">
65
+							<div class="fnWhsNm">브랜드 창고 명A</div>
66
+							<div class="fnLocationNm">(상세위치내용)</div>
67
+						</div>
68
+						<div class="scroll_right">
69
+							<button id="ITP_BTN_MPOMNG04010_POP_WHS_CHOICE" class="fnWhsId" data-whs-id="">선택</button>
70
+						</div>
71
+					</li>
72
+				</div>
73
+			</div>
74
+		</div>
75
+	</div>
76
+	<div id="ITP_AJAX_MPOMNG04010_LIST_CONTAINER" style="display: block;">
77
+		<form id="ITP_FORM_MPOMNG04010_LIST_SEARCH" class="form-horizontal" onsubmit="return false;">
78
+			<input type="hidden" id="ITP_FORM_MPOMNG02010_LIST_SEARCH_BRAND_ID" name="sbrandId" value="">
79
+			<input type="hidden" id="ITP_FORM_MPOMNG02010_LIST_SEARCH_STORE_ID" name="sstoreId" value="">
80
+			<input type="hidden" id="ITP_FORM_MPOMNG02010_LIST_SEARCH_IDX" name="sidx" value="0">
81
+			<div class="content">
82
+				<div class="line">
83
+					<label>발주일자</label>
84
+					<div class="date_to">
85
+						<input id="ITP_FORM_MPOMNG04010_LIST_SEARCH_FROM_DT" name="fromDt" class="year" type="date">
86
+						<div class="at">~</div>
87
+						<input id="ITP_FORM_MPOMNG04010_LIST_SEARCH_TO_DT" name="toDt" class="year" type="date">
88
+					</div>
89
+				</div>
90
+				<div class="line">
91
+					<label>발주상태</label>
92
+					<div class="search_wrap">
93
+						<div class="line_right">
94
+							<select id="ITP_FORM_MPOMNG04010_LIST_SEARCH_PCH_ODR_ST_CD" data-select-code="PCH_ODR_ST_CD" class="stcd" name="spchOdrStCd">
95
+								<option value=""></option>
96
+							</select>
97
+						</div>
98
+					</div>
99
+				</div>
100
+				<div class="line">
101
+					<label>공급업체</label>
102
+					<div class="search_wrap">
103
+						<div class="float_left">
104
+							<input type="text" id="ITP_FORM_MPOMNG04010_LIST_SEARCH_SPPLY_NM" name="sspplyNm" placeholder="A공급업체명" readonly>
105
+							<input type="hidden" id="ITP_FORM_MPOMNG04010_LIST_SEARCH_SPPLY_ID" class="" name="sspplyId" />
106
+						</div>
107
+						<div class="float_left_btn">
108
+							<button id="ITP_BTN_MPOMNG04010_LIST_SEARCH_SPPLY_NM"><img src="../img/search.png" alt=""></button>
109
+							<button id="ITP_BTN_MPOMNG04010_LIST_DELETE_SPPLY_NM"><img src="../img/delete.png" alt=""></button>
110
+						</div>
111
+					</div>
112
+				</div>
113
+				<div class="line">
114
+					<label>납품장소</label>
115
+					<div class="search_nm">
116
+						<div class="float_left">
117
+							<input type="text" id="ITP_FORM_MPOMNG04010_LIST_SEARCH_WHS_NM" class="" name="swhsNm" placeholder="매장명" readonly />
118
+							<input type="hidden" id="ITP_FORM_MPOMNG04010_LIST_SEARCH_WHS_ID" class="" name="swhsId" />
119
+						</div>
120
+						<div class="float_left_btn">
121
+							<button id="ITP_BTN_MPOMNG04010_LIST_SEARCH_WHS_NM"><img src="../img/search.png" alt=""></button>
122
+							<button id="ITP_BTN_MPOMNG04010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
123
+						</div>
124
+					</div>
125
+				</div>
126
+				<div class="line" style="height:50px;">
127
+					<div class="search">
128
+						<button id="ITP_BTN_MPOMNG04010_LIST_SEARCH" class="btn-primary btn-sm ADB">검색</button>
129
+					</div>
130
+				</div>
131
+				<div class="table_header">
132
+					<h1>> 발주 내역</h1>
133
+				</div>
62
 			</div>
134
 			</div>
63
-			<div class="table_header">
64
-			  <h1>> 납품서 내역</h1>
135
+			<div id="ITP_LIST_MPOMNG04010_LIST_ITEM_AREA" class="scroll_area row-3">
136
+				<ul id="ITP_LIST_MPOMNG04010_LIST_ITEM_ROWS" class="panel-group"></ul>
137
+				<div id="ITP_LIST_MPOMNG04010_LIST_ITEM_ROWCOPY" style="display: none;">
138
+					<li class="history_list list-row">
139
+						<div class="left">
140
+							<div class="nomal">
141
+								<label>발주일자 &nbsp;:</label>
142
+								<div class="history">
143
+									<div class="fnPodrDt">2022.10.01</div>
144
+									(<div class="fnPodrMgrNm">홍길동 점주</div>)
145
+								</div>
146
+							</div>
147
+						</div>
148
+						<div class="left">
149
+							<div class="nomal">
150
+								<label>발주상태 &nbsp;:</label>
151
+								<div class="history">
152
+									<div class="fnPchodrStCd">대기</div>
153
+								</div>
154
+								<label>납품장소명&nbsp;:</label>
155
+								<div class="history">
156
+									<div class="fnLocationNm">A매장내</div>
157
+								</div>
158
+							</div>
159
+						</div>
160
+						<div class="left">
161
+							<div class="nomal">
162
+								<label>발주정보 &nbsp;:</label>
163
+								<div class="history">
164
+									<div class="fnItemQty">품목수($)</div>
165
+									<i>-</i>
166
+									<div class="fnPodrTotalAmt">1,200,000</div>원
167
+								</div>
168
+							</div>
169
+						</div>
170
+						<div class="left">
171
+							<div class="nomal">
172
+								<label>공급업체 &nbsp;:</label>
173
+								<div class="history">
174
+									<div class="fnSpplyNm">A공급업체</div>
175
+								</div>
176
+							</div>
177
+						</div>
178
+					</li>
179
+				</div>
65
 			</div>
180
 			</div>
66
-		  </div>
67
-		<div id="ITP_LIST_MPOMNG04010_ITEM_AREA" class="scroll_area row-4">
68
-		  <ul id="ITP_LIST_MPOMNG04010_LIST_ROWS" class="panel-group"></ul>
69
-			  <div id="ITP_LIST_MPOMNG04010_LIST_ROWCOPY" style="display: block;">
70
-				<li class="history_list2">
71
-				  <div class="left">
72
-					<div class="nomal">
73
-					  <label class="">납품번호 </label>
74
-					  <div class="history">
75
-						<div class="fnDlvNo">202210010000001-0100</div> 
76
-					  </div>
181
+		</form>
182
+	</div>
183
+	<div id="ITP_AJAX_MPOMNG04010_VIEW_CONTAINER" style="display: none;">
184
+		<form id="ITP_FORM_MPOMNG04010_VIEW" class="form-horizontal" onsubmit="return false;">
185
+			<input type="hidden" id="ITP_FORM_MPOMNG04010_VIEW_VIEW_CD" name="viewCd" value="C">
186
+			<div class="content">
187
+				<div class="line">
188
+					<label>발주일자</label>
189
+					<div class="line_right">
190
+						<div class="fnPodrDt">2022.10.10</div>
77
 					</div>
191
 					</div>
78
-				  </div>
79
-				  <div class="left">
80
-					<div class="nomal">
81
-					  <label>납품예정일</label>
82
-					  <div class="history">
83
-						<div class="fnDlvSchDt history_info">2022.10.03</div>
84
-					  </div>
85
-					  <label class="fn sub_info">납품일자</label>
86
-					  <div class="history">
87
-						<div class="fnDlvDt">2022.10.03</div>
88
-					  </div>
192
+				</div>
193
+				<div class="line">
194
+					<label>발주금액</label>
195
+					<div class="line_right">
196
+						<div class="fnPodrTotalAmt">424,000원</div>
89
 					</div>
197
 					</div>
90
-				  </div>
91
-				  <div class="left">
92
-					<div class="nomal">
93
-					  <label>공급업체</label>
94
-					  <div class="history">
95
-						<div class="fnSpplyNm history_info">A공급업체명</div>
96
-					  </div>
97
-					  <label class="sub_info">납품장소</label>
98
-					  <div class="history">
99
-						<div class="fnDlvPlace">A매장내</div>
100
-					  </div>
198
+				</div>
199
+				<div class="line">
200
+					<label>납품장소</label>
201
+					<div class="line_right">
202
+						<div class="fnShmtWhsDvsnNm">A매장내</div>
101
 					</div>
203
 					</div>
102
-				  </div>
103
-				  <div class="left">
104
-					<div class="nomal">
105
-					  <label>품목 </label>
106
-					  <div class="history">
107
-						<div class="fnItemNm">품목명(EA)</div> 
108
-					  </div>
204
+				</div>
205
+				<div class="line">
206
+					<label>공급업체</label>
207
+					<div class="line_right">
208
+						<div class="fnSpplyNm">A공급업체</div>
109
 					</div>
209
 					</div>
110
-				  </div>
111
-				  <div class="left">
112
-					<div class="nomal">
113
-					  <label>발주수량</label>
114
-					  <div class="history">
115
-						<div class="fnPodrQty history_info">10</div>
116
-					  </div>
117
-					  <label class="sub_info">납품수량</label>
118
-					  <div class="history">
119
-						<div class="fnDlvQty">10</div>
120
-					  </div>
210
+				</div>
211
+				<div class="line">
212
+					<label>납기요청일</label>
213
+					<div class="line_right">
214
+						<div class="fnDlvReqDt">2022.10.10</div>
121
 					</div>
215
 					</div>
122
-				  </div>
123
-				</li>
216
+				</div>
217
+				<div class="table_header">
218
+					<h1>> 발주 품목</h1>
219
+				</div>
220
+			</div>
221
+			<div id="ITP_LIST_MPOMNG04010_VIEW_ITEM_AREA" class="scroll_area row-3">
222
+				<ul id="ITP_LIST_MPOMNG04010_VIEW_ITEM_ROWS" class="panel-group"></ul>
223
+				<div id="ITP_LIST_MPOMNG04010_VIEW_ITEM_ROWCOPY" style="display:none;">
224
+					<li class="list-row">
225
+						<div>
226
+							<div class="left_info col-4">
227
+								<div class="thick">
228
+									<div class="fnItemNm">품목명</div>
229
+									<i>-</i>
230
+									<div class="fnUnit"></div>
231
+								</div>
232
+							</div>
233
+							<div class="left_info col-6">
234
+								<div class="thick">
235
+									<label>수량&nbsp;:&nbsp;</label>
236
+									<div class="fnPodrQty"></div>
237
+								</div>
238
+							</div>
239
+							<div class="left_info col-4">
240
+								<div class="thick">
241
+									<label style="margin:0;">구매가 :</label>
242
+									<div class="fnUnitAmt"></div>
243
+								</div>
244
+							</div>
245
+							<div class="left_info col-6">
246
+								<div class="thick">
247
+									<label>금액&nbsp;:&nbsp;</label>
248
+									<div class="fnPodrAmt"></div>
249
+								</div>
250
+							</div>
251
+						</div>
252
+					</li>
253
+				</div>
254
+			</div>
255
+			<div class="button_bar">
256
+				<button id="ITP_BTN_MPOMNG04010_VIEW_CANCEL_LIST" class="col_12 btn-gray CLB">취소</button>
124
 			</div>
257
 			</div>
125
-		  </div>
126
-	  </form>
258
+		</form>
127
 	</div>
259
 	</div>
128
-  </section>
260
+	<div id="ITP_MOBILE_JS"></div>
261
+</section>

+ 195 - 107
src/main/webapp/mobile/app/mpomng/MPOMNG05010.html

@@ -1,123 +1,211 @@
1
 <section id="ITP_MOBILE_MPOMNG05010">
1
 <section id="ITP_MOBILE_MPOMNG05010">
2
-	<div id="ITP_AJAX_MPOMNG05010_LIST_CONTAINER">
3
-	   <form id="ITP_FORM_MPOMNG05010_LIST" class="form-horizontal" onsubmit="return false;">
4
-		<input type="hidden" id="ITP_FORM_MPOMNG05010_LIST_VIEW_CD" name="viewCd" value="C">
5
-		  <div class="content">
6
-			<div class="line">
7
-			  <label>납품예정일</label>
8
-			  <div class="line_right">
9
-				<input id="ITP_FORM_MPOMNG05010_LIST_DLV_SCH_DT" name="dlvSchDt" class="date2" type="date" placeholder="">
10
-			  </div>
2
+	<div id="ITP_POP_MPOMNG05010_SPPLY_AREA" class="popup2 mobile-pop-close" style="display: none;">
3
+		<div class="pop">
4
+			<div class="header">
5
+				<div class="header_left">
6
+					<label>> 공급업체</label>
7
+				</div>
8
+				<div class="header_right">
9
+					<button type="button" id="ITP_BTN_MPOMNG05010_POP_SPPLY_CLOSE"><img src="../img/close.png"></button>
10
+				</div>
11
 			</div>
11
 			</div>
12
-			<div class="line">
13
-			  <label>납품서번호</label>
14
-			  <div class="search_wrap">
15
-				  <div class="line_right">
16
-					<select name="dlvNo" id="ITP_FORM_MPOMNG05010_LIST_DLV_NO" class="m9">
17
-					</select>
18
-				  </div>
19
-			  </div>
12
+			<div class="search_bar">
13
+				<form id="ITP_FORM_MPOMNG05010_POP_SPPLY_SEARCH" class="form-horizontal" onsubmit="return false;">
14
+					<input type="hidden" id="ITP_FORM_MPOMNG05010_POP_SPPLY_ITEM_BRAND_ID" name="sbrandId" value="">
15
+					<input type="hidden" id="ITP_FORM_MPOMNG05010_PO_PSPPLY_ITEM_STORE_ID" name="sstoreId" value="">
16
+					<input id="ITP_FORM_MPOMNG05010_POP_SPPLY_KEYWORD" type="text" name="sspplyNm" placeholder="공급업체명">
17
+					<button id="ITP_BTN_MPOMNG05010_POP_SPPLY_SEARCH"><img src="../img/search.png"></button>
18
+				</form>
20
 			</div>
19
 			</div>
21
-			<div class="line">
22
-			  <label>공급업체</label>
23
-			  <div class="search_wrap">
24
-				  <div class="float_left">
25
-					<input id="ITP_FORM_MPOMNG05010_LIST_SPPLY_NM" type="text" placeholder="A공급업체명">
26
-				  </div>
27
-				  <div class="float_left_btn">
28
-					<button id="ITP_BTN_MPOMNG05010_LIST_SEARCH_SPPLY_NM" data-call-popup="ITP_POP_MPOMNG05010_SPPLY_AREA"><img src="../img/search.png" alt=""></button>
29
-					<button id="ITP_BTN_MPOMNG05010_LIST_DELETE_SPPLY_NM"><img src="../img/delete.png" alt=""></button>
30
-				  </div>
31
-			  </div> 
20
+			<div class="search_bar">
21
+				<button id="ITP_BTN_MPOMNG05010_POP_SPPLY_NM" class="btn_blue">공급업체▼</button>
22
+			</div>
23
+			<div id="ITP_POP_MPOMNG05010_LIST_SPPLY_AREA" class="popup_scroll">
24
+				<ul id="ITP_POP_MPOMNG05010_LIST_SPPLY_ROWS" class="panel-group itp_nav"></ul>
25
+				<div id="ITP_POP_MPOMNG05010_LIST_SPPLY_ROWCOPY" style="display: none;">
26
+					<li class="list-row">
27
+						<div class="scroll_left">
28
+							<div class="fnSpplyNm">공급업체 명A</div>
29
+							<div class="fnStNm">($)</div>
30
+						</div>
31
+						<div class="scroll_right">
32
+							<button id="ITP_BTN_MPOMNG05010_POP_SPPLY_CHOICE" class="fnSpplyId" data-item-key="">선택</button>
33
+						</div>
34
+					</li>
35
+				</div>
32
 			</div>
36
 			</div>
33
-			<div class="line">
34
-				<label>납품장소</label>
35
-				<div class="search_nm">
36
-				  <div class="float_left">
37
-					<input type="text" id="ITP_FORM_MPOMNG05010_LIST_DLV_PLACE_NM" class="" name="dlvPlaceNm" placeholder="매장명" />
38
-				  </div>
39
-				  <div class="float_left_btn">
40
-					<button id="ITP_BTN_MPOMNG05010_LIST_SEARCH_WHS_NM" data-call-popup="ITP_POP_MPOMNG05010_WHS_AREA"><img src="../img/search.png" alt=""></button>
41
-					<button id="ITP_BTN_MPOMNG05010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
42
-				  </div>
37
+		</div>
38
+	</div>
39
+	<div id="ITP_POP_MPOMNG05010_WHS_AREA" class="popup2 mobile-pop-close" style="display: none;">
40
+		<div class="pop">
41
+			<div class="header">
42
+				<div class="header_left">
43
+					<label>> 납품장소</label>
43
 				</div>
44
 				</div>
45
+				<div class="header_right">
46
+					<button type="button" id="ITP_BTN_MPOMNG05010_POP_WHS_CLOSE"><img src="../img/close.png"></button>
44
 				</div>
47
 				</div>
45
-			<div class="line">
46
-			  <label>품목명</label>
47
-				 <div class="search_wrap">
48
-				  <div class="float_left">
49
-					<input id="ITP_FORM_MPOMNG05010_LIST_ITEM_NM" name="itemNm" style="width: 262px;" type="text" placeholder="A매장명">
50
-				  </div>
51
-			  </div>
52
 			</div>
48
 			</div>
53
-			<div class="line" style="height:50px;">
54
-			  <div class="search">
55
-				<button id="ITP_BTN_MPOMNG05010_LIST_SEARCH" class="btn-primary btn-sm ADB">검색</button>
56
-			  </div>
49
+			<div class="search_bar">
50
+				<form id="ITP_FORM_MPOMNG05010_POP_WHS" class="form-horizontal" onsubmit="return false;">
51
+					<input type="hidden" id="ITP_FORM_MPOMNG05010_WHS_ITEM_BRAND_ID" name="sbrandId" value="">
52
+					<input type="hidden" id="ITP_FORM_MPOMNG05010_WHS_ITEM_STORE_ID" name="sstoreId" value="">
53
+					<input id="ITP_FORM_MPOMNG05010_POP_WHS_KEYWORD" type="text" name="swhsNm" placeholder="납품장소명">
54
+					<button id="ITP_BTN_MPOMNG05010_POP_WHS_SEARCH"><img src="../img/search.png"></button>
55
+				</form>
56
+			</div>
57
+			<div class="search_bar">
58
+				<button id="ITP_BTN_MPOMNG05010_POP_WHS_NM" class="btn_blue">납품장소▼</button>
57
 			</div>
59
 			</div>
58
-			<div class="table_header">
59
-			  <h1>> 납품서 내역</h1>
60
+			<div id="ITP_LIST_MPOMNG05010_POP_WHS_AREA" class="popup_scroll">
61
+				<ul id="ITP_LIST_MPOMNG05010_POP_WHS_ROWS" class="panel-group itp_nav"></ul>
62
+				<div id="ITP_LIST_MPOMNG05010_POP_WHS_ROWCOPY" style="display:none;">
63
+					<li class="list-row">
64
+						<div class="scroll_left">
65
+							<div class="fnWhsNm">브랜드 창고 명A</div>
66
+							<div class="fnLocationNm">(상세위치내용)</div>
67
+						</div>
68
+						<div class="scroll_right">
69
+							<button id="ITP_BTN_MPOMNG05010_POP_WHS_CHOICE" class="fnWhsId" data-whs-id="">선택</button>
70
+						</div>
71
+					</li>
72
+				</div>
60
 			</div>
73
 			</div>
61
-		  </div>
62
-		<div id="ITP_LIST_MPOMNG05010_ITEM_AREA" class="scroll_area row-4">
63
-		  <ul id="ITP_LIST_MPOMNG05010_LIST_ROWS" class="panel-group"></ul>
64
-			  <div id="ITP_LIST_MPOMNG05010_LIST_ROWCOPY" style="display: block;">
65
-				<li class="history_list2">
66
-				  <div class="left">
67
-					<div class="nomal">
68
-					  <label>납품번호 </label>
69
-					  <div class="history">
70
-						<div class="fnDlvNo">202210010000001-0100</div> 
71
-					  </div>
74
+		</div>
75
+	</div>
76
+	<div id="ITP_AJAX_MPOMNG05010_LIST_CONTAINER" >
77
+		<form id="ITP_FORM_MPOMNG05010_LIST_SEARCH" class="form-horizontal" onsubmit="return false;">
78
+			<input type="hidden" id="ITP_FORM_MPOMNG02010_LIST_SEARCH_BRAND_ID" name="sbrandId" value="">
79
+			<input type="hidden" id="ITP_FORM_MPOMNG02010_LIST_SEARCH_STORE_ID" name="sstoreId" value="">
80
+			<input type="hidden" id="ITP_FORM_MPOMNG02010_LIST_SEARCH_IDX" name="sidx" value="0">
81
+			<div class="content">
82
+				<div class="line">
83
+					<select class="label" name="dtlGubun" id="ITP_FORM_MPOMNG05010_LIST_DTL_GUBUN">
84
+						<option value="1">발주생성일</option>
85
+						<option value="2">납품요청일</option>
86
+						<option value="3">납품예정일</option>
87
+						<option value="4">납품완료일</option>
88
+					</select>
89
+					<div class="date_to">
90
+						<input id="ITP_FORM_MPOMNG05010_LIST_SEARCH_FROM_DT" name="fromDt" class="year" type="date">
91
+						<div class="at">~</div>
92
+						<input id="ITP_FORM_MPOMNG05010_LIST_SEARCH_TO_DT" name="toDt" class="year" type="date">
72
 					</div>
93
 					</div>
73
-				  </div>
74
-				  <div class="left">
75
-					<div class="nomal">
76
-					  <label class="history_label">납품예정일</label>
77
-					  <div class="history">
78
-						<div class="fnDlvSchDt history_info">2022.10.03</div>
79
-					  </div>
94
+				</div>
95
+				<div class="line">
96
+					<label>납품상태</label>
97
+					<div class="search_wrap">
98
+						<div class="line_right">
99
+							<select id="ITP_FORM_MPOMNG04010_LIST_SEARCH_DLV_ST_CD" data-select-code="DLV_ST_CD" class="stcd" name="sdlvStCd">
100
+							<select name="dlvStCd" id="ITP_FORM_MPOMNG05010_LIST_DLV_ST_CD">
101
+								<option value=""></option>
102
+							</select>
103
+						</div>
80
 					</div>
104
 					</div>
81
-				  </div>
82
-				  <div class="left">
83
-					<div class="nomal">
84
-					  <label>공급업체</label>
85
-					  <div class="history">
86
-						<div class="fnSpplyNm history_info">A공급업체명</div>
87
-					  </div>
88
-					  <label class="sub_info">납품장소</label>
89
-					  <div class="history">
90
-						<div class="fnDlvPlace">A매장내</div>
91
-					  </div>
105
+				</div>
106
+				<div class="line">
107
+					<label>공급업체</label>
108
+					<div class="search_wrap">
109
+						<div class="float_left">
110
+							<input type="text" id="ITP_FORM_MPOMNG05010_LIST_SEARCH_SPPLY_NM" name="sspplyNm" placeholder="A공급업체명" readonly>
111
+							<input type="hidden" id="ITP_FORM_MPOMNG05010_LIST_SEARCH_SPPLY_ID" class="" name="sspplyId" />
112
+						</div>
113
+						<div class="float_left_btn">
114
+							<button id="ITP_BTN_MPOMNG05010_LIST_SEARCH_SPPLY_NM"><img src="../img/search.png" alt=""></button>
115
+							<button id="ITP_BTN_MPOMNG05010_LIST_DELETE_SPPLY_NM"><img src="../img/delete.png" alt=""></button>
116
+						</div>
92
 					</div>
117
 					</div>
93
-				  </div>
94
-				  <div class="left">
95
-					<div class="nomal">
96
-					  <label>품목 </label>
97
-					  <div class="history">
98
-						<div class="fnItemNm">품목명(EA)</div> 
99
-					  </div>
118
+				</div>
119
+				<div class="line">
120
+					<label>납품장소</label>
121
+					<div class="search_nm">
122
+						<div class="float_left">
123
+							<input type="text" id="ITP_FORM_MPOMNG05010_LIST_SEARCH_WHS_NM" class="" name="swhsNm" placeholder="매장명" readonly />
124
+							<input type="hidden" id="ITP_FORM_MPOMNG05010_LIST_SEARCH_WHS_ID" class="" name="swhsId" />
125
+						</div>
126
+						<div class="float_left_btn">
127
+							<button id="ITP_BTN_MPOMNG05010_LIST_SEARCH_WHS_NM"><img src="../img/search.png" alt=""></button>
128
+							<button id="ITP_BTN_MPOMNG05010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
129
+						</div>
130
+					</div>
131
+				</div>
132
+				<div class="line">
133
+					<label>품목명</label>
134
+					<div class="search_wrap">
135
+						<div class="float_left">
136
+							<input id="ITP_FORM_MPOMNG05010_LIST_ITEM_NM" name="sitemNm" style="width: 262px;" type="text" placeholder="품목명">
137
+						</div>
100
 					</div>
138
 					</div>
101
-				  </div>
102
-				  <div class="left">
103
-					<div class="nomal">
104
-					  <label>납품수량</label>
105
-					  <div class="history">
106
-						<div class="fnDlvQty history_info">10</div>
107
-					  </div>
108
-					  <label class="sub_info">입고수량</label>
109
-					  <div class="history">
110
-						<input id="ITP_FORM_MPOMNG05010_LIST_WHS_QTY" name="whsQty" type="text" placeholder="10">
111
-					  </div>
139
+				</div>
140
+				<div class="line" style="height:50px;">
141
+					<div class="search">
142
+						<button id="ITP_BTN_MPOMNG05010_LIST_SEARCH" class="btn-primary btn-sm ADB">검색</button>
112
 					</div>
143
 					</div>
113
-				  </div>
114
-				</li>
144
+				</div>
145
+				<div class="table_header">
146
+					<h1>> 납품서 내역</h1>
147
+				</div>
148
+			</div>
149
+			<div id="ITP_LIST_MPOMNG05010_LIST_ITEM_AREA" class="scroll_area row-4">
150
+				<ul id="ITP_LIST_MPOMNG05010_LIST_ITEM_ROWS" class="panel-group"></ul>
151
+				<div id="ITP_LIST_MPOMNG05010_LIST_ITEM_ROWCOPY" style="display: block;">
152
+					<li class="history_list2 list-row">
153
+						<div class="left">
154
+							<div class="nomal">
155
+								<label class="">납품번호 </label>
156
+								<div class="history">
157
+									<div class="fnDlvNo">202210010000001-0100</div>
158
+								</div>
159
+							</div>
160
+						</div>
161
+						<div class="left">
162
+							<div class="nomal">
163
+								<label>납품예정일</label>
164
+								<div class="history">
165
+									<div class="fnDlvSchDt history_info">2022.10.03</div>
166
+								</div>
167
+								<label class="fn sub_info">납품일자</label>
168
+								<div class="history">
169
+									<div class="fnDlvDt">2022.10.03</div>
170
+								</div>
171
+							</div>
172
+						</div>
173
+						<div class="left">
174
+							<div class="nomal">
175
+								<label>공급업체</label>
176
+								<div class="history">
177
+									<div class="fnSpplyNm history_info">A공급업체명</div>
178
+								</div>
179
+								<label class="sub_info">납품장소</label>
180
+								<div class="history">
181
+									<div class="fnDlvPlace">A매장내</div>
182
+								</div>
183
+							</div>
184
+						</div>
185
+						<div class="left">
186
+							<div class="nomal">
187
+								<label>품목 </label>
188
+								<div class="history">
189
+									<div class="fnItemNm">품목명(EA)</div>
190
+								</div>
191
+							</div>
192
+						</div>
193
+						<div class="left">
194
+							<div class="nomal">
195
+								<label>발주수량</label>
196
+								<div class="history">
197
+									<div class="fnPodrQty history_info">10</div>
198
+								</div>
199
+								<label class="sub_info">납품수량</label>
200
+								<div class="history">
201
+									<div class="fnDlvQty">10</div>
202
+								</div>
203
+							</div>
204
+						</div>
205
+					</li>
206
+				</div>
115
 			</div>
207
 			</div>
116
-		  </div>
117
-		  <div class="button_bar">
118
-			<button id="ITP_BTN_MPOMNG05010_LIST_WHS" class="btn_col_6 btn-primary INPS">입고처리</button>
119
-			<button id="ITP_BTN_MPOMNG05010_LIST_CANCEL" class="btn_col_3 btn-gray CLB">취소</button>
120
-		  </div>
121
-	  </form>
208
+		</form>
122
 	</div>
209
 	</div>
123
-  </section>
210
+	<div id="ITP_MOBILE_JS"></div>
211
+</section>

+ 115 - 114
src/main/webapp/mobile/app/mpomng/MPOMNG06010.html

@@ -1,122 +1,123 @@
1
-<section id="ITP_MOBILE_MPOMNG06010"> 
2
-	<div id="ITP_AJAX_MPOMNG06010_LIST_CONTAINER">
3
-	<form id="ITP_FORM_MPOMNG05010_LIST" class="form-horizontal" onsubmit="return false;">
4
-		<input type="hidden" id="ITP_FORM_MPOMNG05010_LIST_VIEW_CD" name="viewCd" value="C">
5
-		  <div class="content">
6
-			<div class="line">
7
-			  <select class="label" name="whsDt" id="ITP_FORM_MPOMNG06010_LIST_WHS_DT">
8
-				<option value="">입고일자</option>
9
-			  </select>
10
-			  <div class="date_to">
11
-				<input id="ITP_FORM_MPOMNG06010_LIST_FORM_DT" class="year" type="date">
12
-				<div class="at">~</div>
13
-				<input id="ITP_FORM_MPOMNG06010_LIST_TO_DT" class="year" type="date">
14
-			  </div>
15
-			</div>
16
-			<div class="line">
17
-			  <label>발주번호</label>
18
-			  <div class="search_wrap">
19
-				  <div class="line_right">
20
-					<input id="ITP_FORM_MPOMNG06010_LIST_PODR_NO" name="podrNO" type="text">
21
-				  </div>
22
-			  </div>    
23
-			</div>
24
-			<div class="line">
25
-			  <label>공급업체</label>
26
-			  <div class="search_wrap">
27
-				  <div class="float_left">
28
-					<input id="ITP_FORM_MPOMNG06010_LIST_SPPLY_NM" name="spplyNm" type="text" placeholder="A공급업체명">
29
-				  </div>
30
-				  <div class="float_left_btn">
31
-					<button id="ITP_BTN_MPOMNG06010_LIST_SEARCH_SPPLY_NM" data-call-popup="ITP_POP_MPOMNG06010_SPPLY_AREA"><img src="../img/search.png" alt=""></button>
32
-					<button id="ITP_BTN_MPOMNG06010_LIST_DELETE_SPPLY_NM"><img src="../img/delete.png" alt=""></button>
33
-				  </div>
34
-			  </div> 
35
-			</div>
36
-			<div class="line">
37
-				<label>납품장소</label>
38
-				<div class="search_nm">
39
-				  <div class="float_left">
40
-					<input type="text" id="ITP_FORM_MPOMNG06010_LIST_DLV_PLACE_NM" class="" name="dlvPlaceNm" placeholder="매장명" />
41
-				  </div>
42
-				  <div class="float_left_btn">
43
-					<button id="ITP_BTN_MPOMNG06010_LIST_SEARCH_WHS_NM" data-call-popup="ITP_POP_MPOMNG06010_WHS_AREA"><img src="../img/search.png" alt=""></button>
44
-					<button id="ITP_BTN_MPOMNG06010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
45
-				  </div>
46
-				</div>
1
+<section id="ITP_MOBILE_MPOMNG05010">
2
+	<div id="ITP_AJAX_MPOMNG05010_DETAIL_CONTAINER">
3
+		<form id="ITP_FORM_MPOMNG05010_DETAIL" class="form-horizontal" onsubmit="return false;">
4
+			<input type="hidden" id="ITP_FORM_MPOMNG05010_DETAIL_VIEW_CD" name="viewCd" value="C">
5
+			<div class="content">
6
+				<div class="line">
7
+					<label>납품예정일</label>
8
+					<div class="line_right">
9
+						<input id="ITP_FORM_MPOMNG05010_DETAIL_DLV_SCH_DT" name="dlvSchDt" class="date2" type="date" placeholder="">
10
+					</div>
47
 				</div>
11
 				</div>
48
-			<div class="line">
49
-			  <label>품목명</label>
50
-				 <div class="search_wrap">
51
-				  <div class="float_left">
52
-					<input id="ITP_FORM_MPOMNG06010_LIST_ITEM_NM" name="itemNm" style="width: 262px;" type="text" placeholder="A매장명">
53
-				  </div>
54
-			  </div>
55
-			</div>
56
-			<div class="line" style="height:50px;">
57
-			  <div class="search">
58
-				<button id="ITP_BTN_MPOMNG06010_LIST_SEARCH" class="btn-primary btn-sm ADB">검색</button>
59
-			  </div>
60
-			</div>
61
-			<div class="table_header">
62
-			  <h1>> 입고 내역</h1>
63
-			</div>
64
-		  </div>
65
-		<div id="ITP_LIST_MPOMNG06010_ITEM_AREA" class="scroll_area row-4">
66
-		  <ul id="ITP_LIST_MPOMNG06010_LIST_ROWS" class="panel-group"></ul>
67
-			  <div id="ITP_LIST_MPOMNG06010_LIST_ROWCOPY" style="display: block;">
68
-				<li class="history_list2">
69
-				  <div class="left">
70
-					<div class="nomal">
71
-					  <label>납품번호 </label>
72
-					  <div class="history">
73
-						<div class="fnDlvNo">202210010000001-0100</div> 
74
-					  </div>
12
+				<div class="line">
13
+					<label>납품서번호</label>
14
+					<div class="search_wrap">
15
+						<div class="line_right">
16
+							<select name="dlvNo" id="ITP_FORM_MPOMNG05010_DETAIL_DLV_NO" class="m9">
17
+							</select>
18
+						</div>
75
 					</div>
19
 					</div>
76
-				  </div>
77
-				  <div class="left">
78
-					<div class="nomal">
79
-					  <label class="history_label">납품예정일</label>
80
-					  <div class="history">
81
-						<div class="fnDlvSchDt history_info">2022.10.03</div>
82
-					  </div>
20
+				</div>
21
+				<div class="line">
22
+					<label>공급업체</label>
23
+					<div class="search_wrap">
24
+						<div class="float_left">
25
+							<input id="ITP_FORM_MPOMNG05010_DETAIL_SPPLY_NM" type="text" placeholder="A공급업체명">
26
+						</div>
27
+						<div class="float_left_btn">
28
+							<button id="ITP_BTN_MPOMNG05010_DETAIL_SEARCH_SPPLY_NM" data-call-popup="ITP_POP_MPOMNG05010_SPPLY_AREA"><img src="../img/search.png" alt=""></button>
29
+							<button id="ITP_BTN_MPOMNG05010_DETAIL_DELETE_SPPLY_NM"><img src="../img/delete.png" alt=""></button>
30
+						</div>
83
 					</div>
31
 					</div>
84
-				  </div>
85
-				  <div class="left">
86
-					<div class="nomal">
87
-					  <label>공급업체</label>
88
-					  <div class="history">
89
-						<div class="fnSpplyNm history_info">A공급업체명</div>
90
-					  </div>
91
-					  <label class="sub_info">납품장소</label>
92
-					  <div class="history">
93
-						<div class="fnDlvPlace">A매장내</div>
94
-					  </div>
32
+				</div>
33
+				<div class="line">
34
+					<label>납품장소</label>
35
+					<div class="search_nm">
36
+						<div class="float_left">
37
+							<input type="text" id="ITP_FORM_MPOMNG05010_DETAIL_DLV_PLACE_NM" class="" name="dlvPlaceNm" placeholder="매장명" />
38
+						</div>
39
+						<div class="float_left_btn">
40
+							<button id="ITP_BTN_MPOMNG05010_DETAIL_SEARCH_WHS_NM" data-call-popup="ITP_POP_MPOMNG05010_WHS_AREA"><img src="../img/search.png" alt=""></button>
41
+							<button id="ITP_BTN_MPOMNG05010_DETAIL_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
42
+						</div>
95
 					</div>
43
 					</div>
96
-				  </div>
97
-				  <div class="left">
98
-					<div class="nomal">
99
-					  <label>품목 </label>
100
-					  <div class="history">
101
-						<div class="fnItemNm">품목명(EA)</div> 
102
-					  </div>
44
+				</div>
45
+				<div class="line">
46
+					<label>품목명</label>
47
+					<div class="search_wrap">
48
+						<div class="float_left">
49
+							<input id="ITP_FORM_MPOMNG05010_DETAIL_ITEM_NM" name="itemNm" style="width: 262px;" type="text" placeholder="A매장명">
50
+						</div>
103
 					</div>
51
 					</div>
104
-				  </div>
105
-				  <div class="left">
106
-					<div class="nomal">
107
-					  <label>발주수량</label>
108
-					  <div class="history">
109
-						<div class="fnPodrQty history_info">10</div>
110
-					  </div>
111
-					  <label class="sub_info">입고수량</label>
112
-					  <div class="history">
113
-						<div class="fnWhsQty">10</div>
114
-					  </div>
52
+				</div>
53
+				<div class="line" style="height:50px;">
54
+					<div class="search">
55
+						<button id="ITP_BTN_MPOMNG05010_DETAIL_SEARCH" class="btn-primary btn-sm ADB">검색</button>
115
 					</div>
56
 					</div>
116
-				  </div>
117
-				</li>
57
+				</div>
58
+				<div class="table_header">
59
+					<h1>> 납품서 내역</h1>
60
+				</div>
61
+			</div>
62
+			<div id="ITP_LIST_MPOMNG05010_ITEM_AREA" class="scroll_area row-4">
63
+				<ul id="ITP_LIST_MPOMNG05010_DETAIL_ROWS" class="panel-group"></ul>
64
+				<div id="ITP_LIST_MPOMNG05010_DETAIL_ROWCOPY" style="display: block;">
65
+					<li class="history_list2">
66
+						<div class="left">
67
+							<div class="nomal">
68
+								<label>납품번호 </label>
69
+								<div class="history">
70
+									<div class="fnDlvNo">202210010000001-0100</div>
71
+								</div>
72
+							</div>
73
+						</div>
74
+						<div class="left">
75
+							<div class="nomal">
76
+								<label class="history_label">납품예정일</label>
77
+								<div class="history">
78
+									<div class="fnDlvSchDt history_info">2022.10.03</div>
79
+								</div>
80
+							</div>
81
+						</div>
82
+						<div class="left">
83
+							<div class="nomal">
84
+								<label>공급업체</label>
85
+								<div class="history">
86
+									<div class="fnSpplyNm history_info">A공급업체명</div>
87
+								</div>
88
+								<label class="sub_info">납품장소</label>
89
+								<div class="history">
90
+									<div class="fnDlvPlace">A매장내</div>
91
+								</div>
92
+							</div>
93
+						</div>
94
+						<div class="left">
95
+							<div class="nomal">
96
+								<label>품목 </label>
97
+								<div class="history">
98
+									<div class="fnItemNm">품목명(EA)</div>
99
+								</div>
100
+							</div>
101
+						</div>
102
+						<div class="left">
103
+							<div class="nomal">
104
+								<label>납품수량</label>
105
+								<div class="history">
106
+									<div class="fnDlvQty history_info">10</div>
107
+								</div>
108
+								<label class="sub_info">입고수량</label>
109
+								<div class="history">
110
+									<input id="ITP_FORM_MPOMNG05010_DETAIL_WHS_QTY" name="whsQty" type="text" placeholder="10">
111
+								</div>
112
+							</div>
113
+						</div>
114
+					</li>
115
+				</div>
116
+			</div>
117
+			<div class="button_bar">
118
+				<button id="ITP_BTN_MPOMNG05010_DETAOL_WHS" class="btn_col_6 btn-primary INPS">입고처리</button>
119
+				<button id="ITP_BTN_MPOMNG05010_DETAIL_CANCEL" class="btn_col_3 btn-gray CLB">취소</button>
118
 			</div>
120
 			</div>
119
-		  </div>
120
-	  </form>
121
+		</form>
121
 	</div>
122
 	</div>
122
-  </section>
123
+</section>

+ 122 - 0
src/main/webapp/mobile/app/mpomng/MPOMNG07010.html

@@ -0,0 +1,122 @@
1
+<section id="ITP_MOBILE_MPOMNG06010"> 
2
+  <div id="ITP_AJAX_MPOMNG06010_DETAIL_CONTAINER">
3
+  <form id="ITP_FORM_MPOMNG05010_DETAIL" class="form-horizontal" onsubmit="return false;">
4
+      <input type="hidden" id="ITP_FORM_MPOMNG05010_DETAIL_VIEW_CD" name="viewCd" value="C">
5
+	    <div class="content">
6
+	      <div class="line">
7
+	        <select class="label" name="whsDt" id="ITP_FORM_MPOMNG06010_DETAIL_WHS_DT">
8
+	          <option value="">입고일자</option>
9
+	        </select>
10
+	        <div class="date_to">
11
+	          <input id="ITP_FORM_MPOMNG06010_DETAIL_FORM_DT" class="year" type="date">
12
+	          <div class="at">~</div>
13
+	          <input id="ITP_FORM_MPOMNG06010_DETAIL_TO_DT" class="year" type="date">
14
+	        </div>
15
+	      </div>
16
+	      <div class="line">
17
+	        <label>발주번호</label>
18
+	        <div class="search_wrap">
19
+		        <div class="line_right">
20
+		          <input id="ITP_FORM_MPOMNG06010_DETAIL_PODR_NO" name="podrNO" type="text">
21
+		        </div>
22
+		    </div>    
23
+	      </div>
24
+	      <div class="line">
25
+	        <label>공급업체</label>
26
+	        <div class="search_wrap">
27
+		        <div class="float_left">
28
+		          <input id="ITP_FORM_MPOMNG06010_DETAIL_SPPLY_NM" name="spplyNm" type="text" placeholder="A공급업체명">
29
+		        </div>
30
+		        <div class="float_left_btn">
31
+		          <button id="ITP_BTN_MPOMNG06010_DETAIL_SEARCH_SPPLY_NM" data-call-popup="ITP_POP_MPOMNG06010_SPPLY_AREA"><img src="../img/search.png" alt=""></button>
32
+		          <button id="ITP_BTN_MPOMNG06010_DETAIL_DELETE_SPPLY_NM"><img src="../img/delete.png" alt=""></button>
33
+		        </div>
34
+	        </div> 
35
+	      </div>
36
+	      <div class="line">
37
+          	<label>납품장소</label>
38
+          	<div class="search_nm">
39
+	            <div class="float_left">
40
+	              <input type="text" id="ITP_FORM_MPOMNG06010_DETAIL_DLV_PLACE_NM" class="" name="dlvPlaceNm" placeholder="매장명" />
41
+	            </div>
42
+	            <div class="float_left_btn">
43
+	              <button id="ITP_BTN_MPOMNG06010_DETAIL_SEARCH_WHS_NM" data-call-popup="ITP_POP_MPOMNG06010_WHS_AREA"><img src="../img/search.png" alt=""></button>
44
+	              <button id="ITP_BTN_MPOMNG06010_DETAIL_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
45
+	            </div>
46
+          	</div>
47
+   	 	  </div>
48
+	      <div class="line">
49
+	        <label>품목명</label>
50
+	       	<div class="search_wrap">
51
+		        <div class="float_left">
52
+		          <input id="ITP_FORM_MPOMNG06010_DETAIL_ITEM_NM" name="itemNm" style="width: 262px;" type="text" placeholder="A매장명">
53
+		        </div>
54
+	        </div>
55
+	      </div>
56
+	      <div class="line" style="height:50px;">
57
+	        <div class="search">
58
+	          <button id="ITP_BTN_MPOMNG06010_DETAIL_SEARCH" class="btn-primary btn-sm ADB">검색</button>
59
+	        </div>
60
+	      </div>
61
+	      <div class="table_header">
62
+	        <h1>> 입고 내역</h1>
63
+	      </div>
64
+	    </div>
65
+      <div id="ITP_LIST_MPOMNG06010_ITEM_AREA" class="scroll_area row-4">
66
+        <ul id="ITP_LIST_MPOMNG06010_DETAIL_ROWS" class="panel-group"></ul>
67
+        	<div id="ITP_LIST_MPOMNG06010_DETAIL_ROWCOPY" style="display: block;">
68
+		      <li class="history_list2">
69
+		        <div class="left">
70
+		          <div class="nomal">
71
+		            <label>납품번호 </label>
72
+		            <div class="history">
73
+		              <div class="fnDlvNo">202210010000001-0100</div> 
74
+		            </div>
75
+		          </div>
76
+		        </div>
77
+		        <div class="left">
78
+		          <div class="nomal">
79
+		            <label class="history_label">납품예정일</label>
80
+		            <div class="history">
81
+		              <div class="fnDlvSchDt history_info">2022.10.03</div>
82
+		            </div>
83
+		          </div>
84
+		        </div>
85
+		        <div class="left">
86
+		          <div class="nomal">
87
+		            <label>공급업체</label>
88
+		            <div class="history">
89
+		              <div class="fnSpplyNm history_info">A공급업체명</div>
90
+		            </div>
91
+		            <label class="sub_info">납품장소</label>
92
+		            <div class="history">
93
+		              <div class="fnDlvPlace">A매장내</div>
94
+		            </div>
95
+		          </div>
96
+		        </div>
97
+		        <div class="left">
98
+		          <div class="nomal">
99
+		            <label>품목 </label>
100
+		            <div class="history">
101
+		              <div class="fnItemNm">품목명(EA)</div> 
102
+		            </div>
103
+		          </div>
104
+		        </div>
105
+		        <div class="left">
106
+		          <div class="nomal">
107
+		            <label>발주수량</label>
108
+		            <div class="history">
109
+		              <div class="fnPodrQty history_info">10</div>
110
+		            </div>
111
+		            <label class="sub_info">입고수량</label>
112
+		            <div class="history">
113
+		              <div class="fnWhsQty">10</div>
114
+		            </div>
115
+		          </div>
116
+		        </div>
117
+		      </li>
118
+	      </div>
119
+	    </div>
120
+    </form>
121
+  </div>
122
+</section>

+ 16 - 30
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG03010.js

@@ -81,12 +81,7 @@ let mobPageObj = {
81
 				return false;
81
 				return false;
82
 			});
82
 			});
83
 
83
 
84
-			$(document).on('click', '#ITP_LIST_MPOMNG03010_MODIFY_ROWS li button', function() {
85
-				if($(this).hasClass('DETAIL_ITEM_PLUS')) {
86
-					mobContentObj.modify.list.actPlus($(this));
87
-				} else if($(this).hasClass('DETAIL_ITEM_MINUS')) {
88
-					mobContentObj.modify.list.actMinus($(this));
89
-				}
84
+			$(document).on('click', '#ITP_LIST_MPOMNG03010_LIST_ROWS li', function() {
90
 			});
85
 			});
91
 		}
86
 		}
92
 	},
87
 	},
@@ -95,10 +90,10 @@ let mobPageObj = {
95
 			$(this).hide();
90
 			$(this).hide();
96
 		});
91
 		});
97
 		if(mode === VIEW_MODE_LIST) {
92
 		if(mode === VIEW_MODE_LIST) {
98
-			$('#ITP_AJAX_MPOMNG03010_VIEW_CONTAINER').show();
93
+			$('#ITP_AJAX_MPOMNG03010_LIST_CONTAINER').show();
99
 			this.moreView(true);
94
 			this.moreView(true);
100
 		} else if(mode === VIEW_MODE_VIEW) {
95
 		} else if(mode === VIEW_MODE_VIEW) {
101
-			$('#ITP_AJAX_MPOMNG03010_DETAIL_CONTAINER').show();
96
+			$('#ITP_AJAX_MPOMNG03010_VIEW_CONTAINER').show();
102
 			this.moreView(false);
97
 			this.moreView(false);
103
 		}
98
 		}
104
 		this.viewMode = mode;
99
 		this.viewMode = mode;
@@ -106,7 +101,7 @@ let mobPageObj = {
106
 	moreView: function(isScroll) {
101
 	moreView: function(isScroll) {
107
 		var _this = this;
102
 		var _this = this;
108
 		if(isScroll) {
103
 		if(isScroll) {
109
-			$('#ITP_LIST_MPOMNG03010_LIST_AREA').on('scroll', function () {
104
+			$('#ITP_LIST_MPOMNG03010_LIST_ITEM_AREA').on('scroll', function () {
110
 				if($(this).scrollTop() + $(this).innerHeight() + 1 >= $(this)[0].scrollHeight) {
105
 				if($(this).scrollTop() + $(this).innerHeight() + 1 >= $(this)[0].scrollHeight) {
111
 					if(mobContentObj.list.totPage > mobContentObj.list.listPage) {
106
 					if(mobContentObj.list.totPage > mobContentObj.list.listPage) {
112
 						if(!mobContentObj.list.isSearch) {
107
 						if(!mobContentObj.list.isSearch) {
@@ -134,7 +129,6 @@ let mobContentObj = {
134
 		init: function() {
129
 		init: function() {
135
 			mobPageObj.switchScreen(VIEW_MODE_LIST);
130
 			mobPageObj.switchScreen(VIEW_MODE_LIST);
136
 			this.search();
131
 			this.search();
137
-			this.action();
138
 		},
132
 		},
139
 		search: function() {
133
 		search: function() {
140
 			this.listPage = 0;
134
 			this.listPage = 0;
@@ -150,18 +144,18 @@ let mobContentObj = {
150
 				console.log(result);
144
 				console.log(result);
151
 				_this.isSearch = false;
145
 				_this.isSearch = false;
152
 				_this.totPage = result.gridTotal;
146
 				_this.totPage = result.gridTotal;
153
-				$.each(result.gridRows, function (i, item) {
154
-					$('#ITP_LIST_MPOMNG03010_LIST_AREA .panel-group').append($('#ITP_LIST_MPOMNG03010_LIST_ROWCOPY').html());
155
-					var $li = $('#ITP_LIST_MPOMNG03010_LIST_AREA .panel-group > .list-row:last');
156
-					$li.find('.fnPchReqDt').text(item.pchReqDt);
157
-					$li.find('.fnPchReqMgrNm').text(item.pchReqMgrNm);
158
-					$li.find('.fnPchReqStNm').text(item.pchReqStNm);
159
-					$li.find('.fnWhsLocationNm').text(item.whsLocationNm);
160
-					$li.find('.fnPchReqItemQty').text(CommonObj.comma.set(item.pchReqItemQty));
161
-					$li.find('.fnPchReqTotalAmt').text(CommonObj.comma.set(item.pchReqTotalAmt));
162
-					$li.find('.fnPchReqRjctNm').text(item.pchReqRjctNm);
163
-					_this.rows.push(item);
164
-				});
147
+				// $.each(result.gridRows, function (i, item) {
148
+				// 	$('#ITP_LIST_MPOMNG03010_LIST_AREA .panel-group').append($('#ITP_LIST_MPOMNG03010_LIST_ROWCOPY').html());
149
+				// 	var $li = $('#ITP_LIST_MPOMNG03010_LIST_AREA .panel-group > .list-row:last');
150
+				// 	$li.find('.fnPchReqDt').text(item.pchReqDt);
151
+				// 	$li.find('.fnPchReqMgrNm').text(item.pchReqMgrNm);
152
+				// 	$li.find('.fnPchReqStNm').text(item.pchReqStNm);
153
+				// 	$li.find('.fnWhsLocationNm').text(item.whsLocationNm);
154
+				// 	$li.find('.fnPchReqItemQty').text(CommonObj.comma.set(item.pchReqItemQty));
155
+				// 	$li.find('.fnPchReqTotalAmt').text(CommonObj.comma.set(item.pchReqTotalAmt));
156
+				// 	$li.find('.fnPchReqRjctNm').text(item.pchReqRjctNm);
157
+				// 	_this.rows.push(item);
158
+				// });
165
 			};
159
 			};
166
 			var errFn = function() { _this.isSearch = false;};
160
 			var errFn = function() { _this.isSearch = false;};
167
 			const param = $('#ITP_FORM_MPOMNG03010_VIEW_SEARCH').serializeObject();
161
 			const param = $('#ITP_FORM_MPOMNG03010_VIEW_SEARCH').serializeObject();
@@ -170,14 +164,6 @@ let mobContentObj = {
170
 			param.fromDt = param.fromDt.replace(/-/g, ".");
164
 			param.fromDt = param.fromDt.replace(/-/g, ".");
171
 			param.toDt = param.toDt.replace(/-/g, ".");
165
 			param.toDt = param.toDt.replace(/-/g, ".");
172
 			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
166
 			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
173
-		},
174
-		action: function () {
175
-			var _this = this;
176
-			$(document).on('click', '#ITP_LIST_MPOMNG03010_LIST_ROWS li', function() {
177
-				var index = $(this).index();
178
-				var item = _this.rows[index];
179
-				(item.pchReqStCd === PCH_REQ_ST_CD_TEMP_SAVE) ? mobContentObj.modify.init(item) : mobContentObj.detail.init(item);
180
-			});
181
 		}
167
 		}
182
 	},
168
 	},
183
 	detail: {
169
 	detail: {

+ 354 - 0
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG04010.js

@@ -0,0 +1,354 @@
1
+require(['config'], function() {
2
+	require([
3
+	], function($) {
4
+		mobPageObj.init();
5
+	});
6
+});
7
+
8
+/*API URL*/
9
+const API_MOBILE_GRID_LIST 			= '/api/pomng/po/detail-grid-list';	// 목록
10
+const API_MOBILE_INFO 				= '/api/pomng/po/info-pchOdr';		// 상세
11
+const API_POP_SEARCH_LIST			= '/api/whs/mng/pop-whs-search';
12
+const API_POP_ITEM_LIST 			= '/api/item/pop-grid-list';
13
+const API_POP_SPPLY_LIST 			= '/api/spply/pop-grid-list';
14
+
15
+const PAGE_MODE_LIST				= "LIST";
16
+const PAGE_MODE_VIEW				= "VIEW";
17
+
18
+let mobPageObj = {
19
+	viewMode: PAGE_MODE_LIST,
20
+	init: function () {
21
+		this.ui.init();
22
+		this.event.init();
23
+		this.ready();
24
+	},
25
+	ui: {
26
+		init: function () {
27
+			this.view();
28
+			this.info();
29
+		},
30
+		view: function() {
31
+			// 공통코드 표시
32
+			$('select').each(function() {
33
+				if($(this).data('select-code')) {
34
+					fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
35
+				}
36
+			});
37
+
38
+			// 조회일자 지정
39
+			$('#ITP_FORM_MPOMNG04010_LIST_SEARCH_FROM_DT').val(itp_fn_date_add('M', -1));
40
+			$('#ITP_FORM_MPOMNG04010_LIST_SEARCH_TO_DT').val(itp_fn_date_add('M', 0));
41
+		},
42
+		info: function() {
43
+			$('input:hidden[id$="_BRAND_ID"]').val(fn_make_user_info.get('brandId'));
44
+			$('input:hidden[id$="_STORE_ID"]').val(fn_make_user_info.get('storeId'));
45
+		}
46
+	},
47
+	event: {
48
+		init: function() {
49
+			this.button();
50
+		},
51
+		button: function() {
52
+			$('button[id^="ITP_BTN_MPOMNG04010_LIST"]').on('click', function() {
53
+				var id = $(this).attr('id');
54
+				switch (id) {
55
+					case 'ITP_BTN_MPOMNG04010_LIST_SEARCH_WHS_NM'	: mobPopObj.popWhsNm.init(); 	break;
56
+					case 'ITP_BTN_MPOMNG04010_LIST_DELETE_WHS_NM'	: mobPopObj.popWhsNm.delete(); 	break;
57
+					case 'ITP_BTN_MPOMNG04010_LIST_SEARCH_SPPLY_NM'	: mobPopObj.popSpply.init(); 	break;
58
+					case 'ITP_BTN_MPOMNG04010_LIST_DELETE_SPPLY_NM'	: mobPopObj.popSpply.delete(); 	break;
59
+					case 'ITP_BTN_MPOMNG04010_LIST_SEARCH'			: mobContentObj.list.search();	break;
60
+				}
61
+				return false;
62
+			});
63
+
64
+			$('button[id^="ITP_BTN_MPOMNG04010_VIEW"]').on('click', function() {
65
+				var id = $(this).attr('id');
66
+				switch (id) {
67
+					case 'ITP_BTN_MPOMNG04010_VIEW_CANCEL_LIST'		: mobContentObj.view.cancel();	break;
68
+				}
69
+				return false;
70
+			});
71
+
72
+			$(document).on('click', '#ITP_LIST_MPOMNG04010_LIST_ITEM_ROWS li', function() {
73
+				var item = mobContentObj.list.rows[$(this).index()];
74
+				mobContentObj.view.init(item);
75
+			});
76
+
77
+			$(document).on('click', '#ITP_POP_MPOMNG04010_LIST_SPPLY_ROWS li button', function() {
78
+				mobPopObj.popSpply.choice($(this));
79
+			});
80
+
81
+			$(document).on('click', '#ITP_LIST_MPOMNG04010_POP_WHS_ROWS li button', function() {
82
+				mobPopObj.popWhsNm.choice($(this));
83
+			});
84
+		}
85
+	},
86
+	switchScreen: function(mode) {
87
+		$('#ITP_MOBILE_MPOMNG04010').find('div[id$="_CONTAINER"]').each(function(i) {
88
+			$(this).hide();
89
+		});
90
+		if(mode === PAGE_MODE_LIST) {
91
+			$('#ITP_AJAX_MPOMNG04010_LIST_CONTAINER').show();
92
+			this.moreView(true);
93
+		} else if(mode === PAGE_MODE_VIEW) {
94
+			$('#ITP_AJAX_MPOMNG04010_VIEW_CONTAINER').show();
95
+			this.moreView(false);
96
+		}
97
+		this.viewMode = mode;
98
+	},
99
+	moreView: function(isScroll) {
100
+		var _this = this;
101
+		if(isScroll) {
102
+			$('#ITP_LIST_MPOMNG04010_LIST_ITEM_AREA').on('scroll', function () {
103
+				if($(this).scrollTop() + $(this).innerHeight() + 1 >= $(this)[0].scrollHeight) {
104
+					if(mobContentObj.list.totPage > mobContentObj.list.listPage) {
105
+						if(!mobContentObj.list.isSearch) {
106
+							mobContentObj.list.load();
107
+						}
108
+					}
109
+				}
110
+			});
111
+		} else {
112
+			$('#ITP_LIST_MPOMNG04010_LIST_AREA').off('scroll');
113
+		}
114
+	},
115
+	ready: function() {
116
+		mobContentObj.list.init();
117
+	}
118
+};
119
+
120
+let mobContentObj = {
121
+	list: {
122
+		listSize: 10,
123
+		listPage: 0,
124
+		totPage: 0,
125
+		isSearch: false,
126
+		rows: [],
127
+		init: function() {
128
+			mobPageObj.switchScreen(PAGE_MODE_LIST);
129
+			this.search();
130
+		},
131
+		search: function() {
132
+			this.listPage = 0;
133
+			this.totPage = 0;
134
+			this.rows.length = 0;
135
+			$('#ITP_LIST_MPOMNG04010_LIST_ITEM_ROWS').empty();
136
+			this.load();
137
+		},
138
+		load: function() {
139
+			var _this = this;
140
+			this.isSearch = true;
141
+			var callbackFn = function(result) {
142
+				console.log(result);
143
+				_this.isSearch = false;
144
+				_this.totPage = result.gridTotal;
145
+				$.each(result.gridRows, function (i, item) {
146
+					$('#ITP_LIST_MPOMNG04010_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MPOMNG04010_LIST_ITEM_ROWCOPY').html());
147
+					var $li = $('#ITP_LIST_MPOMNG04010_LIST_ITEM_AREA .panel-group > .list-row:last');
148
+					$li.find('.fnPodrDt').text(item.podrDt);
149
+					$li.find('.fnPodrMgrNm').text(item.podrMgrNm);
150
+					$li.find('.fnPchodrStCd').text(item.pchOdrStNm);
151
+					$li.find('.fnLocationNm').text(item.whsNm + ' - ' + item.locationNm);
152
+					$li.find('.fnItemQty').text($li.find('.fnItemQty').text().replace('$', item.podrItemQty));
153
+					$li.find('.fnPodrTotalAmt').text(CommonObj.comma.set(item.podrTotalAmt));
154
+					$li.find('.fnSpplyNm').text(item.spplyNm);
155
+					_this.rows.push(item);
156
+				});
157
+			};
158
+			var errFn = function() { _this.isSearch = false;};
159
+			const param = $('#ITP_FORM_MPOMNG04010_LIST_SEARCH').serializeObject();
160
+			param.gridPage = ++this.listPage;
161
+			param.gridSize = this.listSize;
162
+			param.fromDt = param.fromDt.replace(/-/g, ".");
163
+			param.toDt = param.toDt.replace(/-/g, ".");
164
+			console.log(JSON.stringify(param));
165
+			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
166
+		}
167
+	},
168
+	view: {
169
+		init: function(item) {
170
+			mobPageObj.switchScreen(PAGE_MODE_VIEW);
171
+			this.search(item);
172
+		},
173
+		search: function(item) {
174
+			var _this = this;
175
+			var callbackFn = function(result) {
176
+				console.log(result);
177
+				_this.view(result);
178
+			};
179
+			const param = {'pchPodrUnqNo': item.pchPodrUnqNo};
180
+			fn_ajax_call(API_MOBILE_INFO, param, callbackFn, 'GET');
181
+		},
182
+		view: function(result) {
183
+			var _this = this;
184
+			var id = '#ITP_AJAX_MPOMNG04010_VIEW_CONTAINER';
185
+			$(id).find('.fnPodrDt').text(result.podrDt);
186
+			$(id).find('.fnPodrTotalAmt').text(CommonObj.currency.add(result.podrTotalAmt));
187
+			$(id).find('.fnShmtWhsDvsnNm').text(result.shmtWhsDvsnNm);
188
+			$(id).find('.fnSpplyNm').text(result.spplyNm);
189
+			$(id).find('.fnDlvReqDt').text(result.dlvReqDt);
190
+			$.each(result.pchOdrDtlList, function (i, item) {
191
+				$('#ITP_LIST_MPOMNG04010_VIEW_ITEM_AREA .panel-group').append($('#ITP_LIST_MPOMNG04010_VIEW_ITEM_ROWCOPY').html());
192
+				var $li = $('#ITP_LIST_MPOMNG04010_VIEW_ITEM_AREA .panel-group > .list-row:last');
193
+				console.log(item);
194
+				$li.find('.fnItemNm').text(item.itemNm);
195
+				$li.find('.fnUnit').text(item.unit);
196
+				$li.find('.fnPodrQty').text(CommonObj.currency.add(item.podrQty));
197
+				$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
198
+				$li.find('.fnPodrAmt').text(CommonObj.currency.add(item.podrAmt));
199
+			});
200
+		},
201
+		cancel: function () {
202
+			var id = '#ITP_AJAX_MPOMNG04010_VIEW_CONTAINER';
203
+			$(id).find('.fnPodrDt').text('');
204
+			$(id).find('.fnPodrTotalAmt').text('');
205
+			$(id).find('.fnShmtWhsDvsnNm').text('');
206
+			$(id).find('.fnSpplyNm').text('');
207
+			$('#ITP_LIST_MPOMNG04010_VIEW_ITEM_AREA .panel-group').empty();
208
+			mobPageObj.switchScreen(PAGE_MODE_LIST);
209
+		}
210
+	}
211
+};
212
+
213
+let mobPopObj = {
214
+	popSpply: {
215
+		popId: 'ITP_POP_MPOMNG04010_SPPLY_AREA',
216
+		rows: [],
217
+		init: function() {
218
+			this.rows.length = 0;
219
+			mobPopObj.show(this.popId);
220
+			this.search();
221
+			this.action();
222
+		},
223
+		search: function() {
224
+			var _this = this;
225
+			$('#ITP_POP_MPOMNG04010_LIST_SPPLY_AREA .panel-group').empty();
226
+			var callbackFn = function(result) {
227
+				console.log(result);
228
+				_this.view(result.gridRows);
229
+			};
230
+			let param = $('#ITP_FORM_MPOMNG04010_POP_SPPLY_SEARCH').serializeObject();
231
+			fn_ajax_call(API_POP_SPPLY_LIST, JSON.stringify(param), callbackFn, 'POST');
232
+		},
233
+		view: function(gridRows) {
234
+			this.rows = gridRows;
235
+			$.each(gridRows, function (i, item) {
236
+				$('#ITP_POP_MPOMNG04010_LIST_SPPLY_AREA .panel-group').append($('#ITP_POP_MPOMNG04010_LIST_SPPLY_ROWCOPY').html());
237
+				var $li = $('#ITP_POP_MPOMNG04010_LIST_SPPLY_AREA .panel-group > .list-row:last');
238
+				$li.find('.fnSpplyNm').text(item.spplyNm);
239
+				$li.find('.fnStNm').text($li.find('.fnStNm').text().replace('$', item.stNm));
240
+				$li.find('.fnSpplyId').data('item-key', item.spplyId);
241
+			});
242
+		},
243
+		choice: function(elem) {
244
+			var _this = this;
245
+			var spplyId = $(elem).data('item-key');
246
+			$.each(this.rows, function (i, item) {
247
+				if(spplyId === item.spplyId) {
248
+					$('#ITP_FORM_MPOMNG04010_LIST_SEARCH #ITP_FORM_MPOMNG04010_LIST_SEARCH_SPPLY_ID').val(item.spplyId);
249
+					$('#ITP_FORM_MPOMNG04010_LIST_SEARCH #ITP_FORM_MPOMNG04010_LIST_SEARCH_SPPLY_NM').val(item.spplyNm);
250
+					_this.close();
251
+					return false;
252
+				}
253
+			});
254
+		},
255
+		action: function() {
256
+			var _this = this;
257
+			$('button[id^="ITP_BTN_MPOMNG04010_POP_SPPLY"]').off('click').on('click', function() {
258
+				var id = $(this).attr('id');
259
+				switch (id) {
260
+					case 'ITP_BTN_MPOMNG04010_POP_SPPLY_SEARCH'	: _this.search();			break;
261
+					case 'ITP_BTN_MPOMNG04010_POP_SPPLY_CHOICE'	: _this.choice($(this));	break;
262
+					case 'ITP_BTN_MPOMNG04010_POP_SPPLY_CLOSE'	: _this.close(); 			break;
263
+				}
264
+				return false;
265
+			});
266
+		},
267
+		delete: function() {
268
+			$('#ITP_FORM_MPOMNG04010_LIST_SEARCH #ITP_FORM_MPOMNG04010_LIST_SEARCH_SPPLY_ID').val('');
269
+			$('#ITP_FORM_MPOMNG04010_LIST_SEARCH #ITP_FORM_MPOMNG04010_LIST_SEARCH_SPPLY_NM').val('');
270
+		},
271
+		close: function() {
272
+			this.rows.length = 0;
273
+			$('#ITP_POP_MPOMNG04010_LIST_SPPLY_AREA .panel-group').empty();
274
+			$('#ITP_FORM_MPOMNG04010_POP_SPPLY_SEARCH #ITP_FORM_MPOMNG04010_POP_SPPLY_KEYWORD').val('');
275
+			mobPopObj.hide(this.popId);
276
+		}
277
+	},
278
+	popWhsNm: {
279
+		popId: 'ITP_POP_MPOMNG04010_WHS_AREA',
280
+		rows: [],
281
+		init: function () {
282
+			this.rows.length = 0;
283
+			mobPopObj.show(this.popId);
284
+			this.search();
285
+			this.action();
286
+		},
287
+		search: function () {
288
+			var _this = this;
289
+			$('#ITP_LIST_MPOMNG04010_POP_WHS_AREA .panel-group').empty();
290
+			var callbackFn = function(result) {
291
+				console.log(result);
292
+				_this.view(result.gridRows);
293
+			};
294
+			const param = $('#ITP_FORM_MPOMNG04010_POP_WHS').serializeObject();
295
+			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
296
+		},
297
+		view: function(gridRows) {
298
+			this.rows = gridRows;
299
+			$.each(gridRows, function (i, item) {
300
+				$('#ITP_LIST_MPOMNG04010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MPOMNG04010_POP_WHS_ROWCOPY').html());
301
+				var $li = $('#ITP_LIST_MPOMNG04010_POP_WHS_AREA .panel-group > .list-row:last');
302
+				$li.find('.fnWhsNm').text(item.whsNm);
303
+				$li.find('.fnLocationNm').text(item.locationNm);
304
+				$li.find('.fnWhsId').data('whs-id', item.whsId);
305
+			});
306
+		},
307
+		choice: function(elem) {
308
+			var _this = this;
309
+			var whsId = $(elem).data('whs-id');
310
+			$.each(this.rows, function (i, item) {
311
+				if(whsId === item.whsId) {
312
+					$('#ITP_FORM_MPOMNG04010_LIST_SEARCH #ITP_FORM_MPOMNG04010_LIST_SEARCH_WHS_ID').val(item.whsId);
313
+					$('#ITP_FORM_MPOMNG04010_LIST_SEARCH #ITP_FORM_MPOMNG04010_LIST_SEARCH_WHS_NM').val(item.whsNm);
314
+					_this.close();
315
+					return false;
316
+				}
317
+			});
318
+		},
319
+		action: function() {
320
+			var _this = this;
321
+			$('button[id^="ITP_BTN_MPOMNG04010_POP_WHS"]').off('click').on('click', function() {
322
+				var id = $(this).attr('id');
323
+				switch (id) {
324
+					case 'ITP_BTN_MPOMNG04010_POP_WHS_SEARCH'	: _this.search();			break;
325
+					case 'ITP_BTN_MPOMNG04010_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
326
+					case 'ITP_BTN_MPOMNG04010_POP_WHS_CLOSE'	: _this.close(); 			break;
327
+				}
328
+				return false;
329
+			});
330
+		},
331
+		delete: function() {
332
+			$('#ITP_FORM_MPOMNG04010_LIST_SEARCH #ITP_FORM_MPOMNG04010_LIST_SEARCH_WHS_ID').val('');
333
+			$('#ITP_FORM_MPOMNG04010_LIST_SEARCH #ITP_FORM_MPOMNG04010_LIST_SEARCH_WHS_NM').val('');
334
+		},
335
+		close: function() {
336
+			this.rows.length = 0;
337
+			$('#ITP_POP_MPOMNG04010_LIST_WHS_AREA .panel-group').empty();
338
+			$('#ITP_FORM_MPOMNG04010_POP_WHS #ITP_FORM_MPOMNG04010_POP_WHS_KEYWORD').val('');
339
+			mobPopObj.hide(this.popId);
340
+		}
341
+	},
342
+	show: function(popId) {
343
+		$('button[id$="_CLOSE"]').off('click').on('click', function() {
344
+			console.log($(this).attr('id'));
345
+			if($(this).hasClass('btn-pop-close')) {
346
+				mobPopObj.hide(popId);
347
+			}
348
+		});
349
+		$('#' + popId).show();
350
+	},
351
+	hide: function(popId) {
352
+		$('#' + popId).closest('.mobile-pop-close').hide();
353
+	}
354
+};

+ 353 - 0
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG05010.js

@@ -0,0 +1,353 @@
1
+require(['config'], function() {
2
+	require([
3
+	], function($) {
4
+		mobPageObj.init();
5
+	});
6
+});
7
+
8
+/*API URL*/
9
+const API_MOBILE_GRID_LIST 			= '/api/pomng/inoutmng/deli-grid-list';	// 목록
10
+const API_MOBILE_INFO 				= '/api/pomng/po/info-pchOdr';			// 상세
11
+const API_POP_SEARCH_LIST			= '/api/whs/mng/pop-whs-search';
12
+const API_POP_SPPLY_LIST 			= '/api/spply/pop-grid-list';
13
+
14
+const PAGE_MODE_LIST				= "LIST";
15
+const PAGE_MODE_VIEW				= "VIEW";
16
+
17
+let mobPageObj = {
18
+	viewMode: PAGE_MODE_LIST,
19
+	init: function () {
20
+		this.ui.init();
21
+		this.event.init();
22
+		this.ready();
23
+	},
24
+	ui: {
25
+		init: function () {
26
+			this.view();
27
+			this.info();
28
+		},
29
+		view: function() {
30
+			// 공통코드 표시
31
+			$('select').each(function() {
32
+				if($(this).data('select-code')) {
33
+					fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
34
+				}
35
+			});
36
+
37
+			// 조회일자 지정
38
+			$('#ITP_FORM_MPOMNG05010_LIST_SEARCH_FROM_DT').val(itp_fn_date_add('M', -1));
39
+			$('#ITP_FORM_MPOMNG05010_LIST_SEARCH_TO_DT').val(itp_fn_date_add('M', 0));
40
+		},
41
+		info: function() {
42
+			$('input:hidden[id$="_BRAND_ID"]').val(fn_make_user_info.get('brandId'));
43
+			$('input:hidden[id$="_STORE_ID"]').val(fn_make_user_info.get('storeId'));
44
+		}
45
+	},
46
+	event: {
47
+		init: function() {
48
+			this.button();
49
+		},
50
+		button: function() {
51
+			$('button[id^="ITP_BTN_MPOMNG05010_LIST"]').on('click', function() {
52
+				var id = $(this).attr('id');
53
+				switch (id) {
54
+					case 'ITP_BTN_MPOMNG05010_LIST_SEARCH_WHS_NM'	: mobPopObj.popWhsNm.init(); 	break;
55
+					case 'ITP_BTN_MPOMNG05010_LIST_DELETE_WHS_NM'	: mobPopObj.popWhsNm.delete(); 	break;
56
+					case 'ITP_BTN_MPOMNG05010_LIST_SEARCH_SPPLY_NM'	: mobPopObj.popSpply.init(); 	break;
57
+					case 'ITP_BTN_MPOMNG05010_LIST_DELETE_SPPLY_NM'	: mobPopObj.popSpply.delete(); 	break;
58
+					case 'ITP_BTN_MPOMNG05010_LIST_SEARCH'			: mobContentObj.list.search();	break;
59
+				}
60
+				return false;
61
+			});
62
+
63
+			$('button[id^="ITP_BTN_MPOMNG05010_VIEW"]').on('click', function() {
64
+				var id = $(this).attr('id');
65
+				switch (id) {
66
+					case 'ITP_BTN_MPOMNG05010_VIEW_CANCEL_LIST'		: mobContentObj.view.cancel();	break;
67
+				}
68
+				return false;
69
+			});
70
+
71
+			$(document).on('click', '#ITP_LIST_MPOMNG05010_LIST_ITEM_ROWS li', function() {
72
+				var item = mobContentObj.list.rows[$(this).index()];
73
+				mobContentObj.view.init(item);
74
+			});
75
+
76
+			$(document).on('click', '#ITP_POP_MPOMNG05010_LIST_SPPLY_ROWS li button', function() {
77
+				mobPopObj.popSpply.choice($(this));
78
+			});
79
+
80
+			$(document).on('click', '#ITP_LIST_MPOMNG05010_POP_WHS_ROWS li button', function() {
81
+				mobPopObj.popWhsNm.choice($(this));
82
+			});
83
+		}
84
+	},
85
+	switchScreen: function(mode) {
86
+		$('#ITP_MOBILE_MPOMNG05010').find('div[id$="_CONTAINER"]').each(function(i) {
87
+			$(this).hide();
88
+		});
89
+		if(mode === PAGE_MODE_LIST) {
90
+			$('#ITP_AJAX_MPOMNG05010_LIST_CONTAINER').show();
91
+			this.moreView(true);
92
+		} else if(mode === PAGE_MODE_VIEW) {
93
+			$('#ITP_AJAX_MPOMNG05010_VIEW_CONTAINER').show();
94
+			this.moreView(false);
95
+		}
96
+		this.viewMode = mode;
97
+	},
98
+	moreView: function(isScroll) {
99
+		var _this = this;
100
+		if(isScroll) {
101
+			$('#ITP_LIST_MPOMNG05010_LIST_ITEM_AREA').on('scroll', function () {
102
+				if($(this).scrollTop() + $(this).innerHeight() + 1 >= $(this)[0].scrollHeight) {
103
+					if(mobContentObj.list.totPage > mobContentObj.list.listPage) {
104
+						if(!mobContentObj.list.isSearch) {
105
+							mobContentObj.list.load();
106
+						}
107
+					}
108
+				}
109
+			});
110
+		} else {
111
+			$('#ITP_LIST_MPOMNG05010_LIST_AREA').off('scroll');
112
+		}
113
+	},
114
+	ready: function() {
115
+		mobContentObj.list.init();
116
+	}
117
+};
118
+
119
+let mobContentObj = {
120
+	list: {
121
+		listSize: 10,
122
+		listPage: 0,
123
+		totPage: 0,
124
+		isSearch: false,
125
+		rows: [],
126
+		init: function() {
127
+			mobPageObj.switchScreen(PAGE_MODE_LIST);
128
+			this.search();
129
+		},
130
+		search: function() {
131
+			this.listPage = 0;
132
+			this.totPage = 0;
133
+			this.rows.length = 0;
134
+			$('#ITP_LIST_MPOMNG05010_LIST_ITEM_ROWS').empty();
135
+			this.load();
136
+		},
137
+		load: function() {
138
+			var _this = this;
139
+			this.isSearch = true;
140
+			var callbackFn = function(result) {
141
+				console.log(result);
142
+				_this.isSearch = false;
143
+				_this.totPage = result.gridTotal;
144
+				$.each(result.gridRows, function (i, item) {
145
+					$('#ITP_LIST_MPOMNG05010_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MPOMNG05010_LIST_ITEM_ROWCOPY').html());
146
+					var $li = $('#ITP_LIST_MPOMNG05010_LIST_ITEM_AREA .panel-group > .list-row:last');
147
+					$li.find('.fnPodrDt').text(item.podrDt);
148
+					$li.find('.fnPodrMgrNm').text(item.podrMgrNm);
149
+					$li.find('.fnPchodrStCd').text(item.pchOdrStNm);
150
+					$li.find('.fnLocationNm').text(item.whsNm + ' - ' + item.locationNm);
151
+					$li.find('.fnItemQty').text($li.find('.fnItemQty').text().replace('$', item.podrItemQty));
152
+					$li.find('.fnPodrTotalAmt').text(CommonObj.comma.set(item.podrTotalAmt));
153
+					$li.find('.fnSpplyNm').text(item.spplyNm);
154
+					_this.rows.push(item);
155
+				});
156
+			};
157
+			var errFn = function() { _this.isSearch = false;};
158
+			const param = $('#ITP_FORM_MPOMNG05010_LIST_SEARCH').serializeObject();
159
+			param.gridPage = ++this.listPage;
160
+			param.gridSize = this.listSize;
161
+			param.fromDt = param.fromDt.replace(/-/g, ".");
162
+			param.toDt = param.toDt.replace(/-/g, ".");
163
+			console.log(JSON.stringify(param));
164
+			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
165
+		}
166
+	},
167
+	view: {
168
+		init: function(item) {
169
+			mobPageObj.switchScreen(PAGE_MODE_VIEW);
170
+			this.search(item);
171
+		},
172
+		search: function(item) {
173
+			var _this = this;
174
+			var callbackFn = function(result) {
175
+				console.log(result);
176
+				_this.view(result);
177
+			};
178
+			const param = {'pchPodrUnqNo': item.pchPodrUnqNo};
179
+			fn_ajax_call(API_MOBILE_INFO, param, callbackFn, 'GET');
180
+		},
181
+		view: function(result) {
182
+			var _this = this;
183
+			var id = '#ITP_AJAX_MPOMNG05010_VIEW_CONTAINER';
184
+			$(id).find('.fnPodrDt').text(result.podrDt);
185
+			$(id).find('.fnPodrTotalAmt').text(CommonObj.currency.add(result.podrTotalAmt));
186
+			$(id).find('.fnShmtWhsDvsnNm').text(result.shmtWhsDvsnNm);
187
+			$(id).find('.fnSpplyNm').text(result.spplyNm);
188
+			$(id).find('.fnDlvReqDt').text(result.dlvReqDt);
189
+			$.each(result.pchOdrDtlList, function (i, item) {
190
+				$('#ITP_LIST_MPOMNG05010_VIEW_ITEM_AREA .panel-group').append($('#ITP_LIST_MPOMNG05010_VIEW_ITEM_ROWCOPY').html());
191
+				var $li = $('#ITP_LIST_MPOMNG05010_VIEW_ITEM_AREA .panel-group > .list-row:last');
192
+				console.log(item);
193
+				$li.find('.fnItemNm').text(item.itemNm);
194
+				$li.find('.fnUnit').text(item.unit);
195
+				$li.find('.fnPodrQty').text(CommonObj.currency.add(item.podrQty));
196
+				$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
197
+				$li.find('.fnPodrAmt').text(CommonObj.currency.add(item.podrAmt));
198
+			});
199
+		},
200
+		cancel: function () {
201
+			var id = '#ITP_AJAX_MPOMNG05010_VIEW_CONTAINER';
202
+			$(id).find('.fnPodrDt').text('');
203
+			$(id).find('.fnPodrTotalAmt').text('');
204
+			$(id).find('.fnShmtWhsDvsnNm').text('');
205
+			$(id).find('.fnSpplyNm').text('');
206
+			$('#ITP_LIST_MPOMNG05010_VIEW_ITEM_AREA .panel-group').empty();
207
+			mobPageObj.switchScreen(PAGE_MODE_LIST);
208
+		}
209
+	}
210
+};
211
+
212
+let mobPopObj = {
213
+	popSpply: {
214
+		popId: 'ITP_POP_MPOMNG05010_SPPLY_AREA',
215
+		rows: [],
216
+		init: function() {
217
+			this.rows.length = 0;
218
+			mobPopObj.show(this.popId);
219
+			this.search();
220
+			this.action();
221
+		},
222
+		search: function() {
223
+			var _this = this;
224
+			$('#ITP_POP_MPOMNG05010_LIST_SPPLY_AREA .panel-group').empty();
225
+			var callbackFn = function(result) {
226
+				console.log(result);
227
+				_this.view(result.gridRows);
228
+			};
229
+			let param = $('#ITP_FORM_MPOMNG05010_POP_SPPLY_SEARCH').serializeObject();
230
+			fn_ajax_call(API_POP_SPPLY_LIST, JSON.stringify(param), callbackFn, 'POST');
231
+		},
232
+		view: function(gridRows) {
233
+			this.rows = gridRows;
234
+			$.each(gridRows, function (i, item) {
235
+				$('#ITP_POP_MPOMNG05010_LIST_SPPLY_AREA .panel-group').append($('#ITP_POP_MPOMNG05010_LIST_SPPLY_ROWCOPY').html());
236
+				var $li = $('#ITP_POP_MPOMNG05010_LIST_SPPLY_AREA .panel-group > .list-row:last');
237
+				$li.find('.fnSpplyNm').text(item.spplyNm);
238
+				$li.find('.fnStNm').text($li.find('.fnStNm').text().replace('$', item.stNm));
239
+				$li.find('.fnSpplyId').data('item-key', item.spplyId);
240
+			});
241
+		},
242
+		choice: function(elem) {
243
+			var _this = this;
244
+			var spplyId = $(elem).data('item-key');
245
+			$.each(this.rows, function (i, item) {
246
+				if(spplyId === item.spplyId) {
247
+					$('#ITP_FORM_MPOMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG05010_LIST_SEARCH_SPPLY_ID').val(item.spplyId);
248
+					$('#ITP_FORM_MPOMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG05010_LIST_SEARCH_SPPLY_NM').val(item.spplyNm);
249
+					_this.close();
250
+					return false;
251
+				}
252
+			});
253
+		},
254
+		action: function() {
255
+			var _this = this;
256
+			$('button[id^="ITP_BTN_MPOMNG05010_POP_SPPLY"]').off('click').on('click', function() {
257
+				var id = $(this).attr('id');
258
+				switch (id) {
259
+					case 'ITP_BTN_MPOMNG05010_POP_SPPLY_SEARCH'	: _this.search();			break;
260
+					case 'ITP_BTN_MPOMNG05010_POP_SPPLY_CHOICE'	: _this.choice($(this));	break;
261
+					case 'ITP_BTN_MPOMNG05010_POP_SPPLY_CLOSE'	: _this.close(); 			break;
262
+				}
263
+				return false;
264
+			});
265
+		},
266
+		delete: function() {
267
+			$('#ITP_FORM_MPOMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG05010_LIST_SEARCH_SPPLY_ID').val('');
268
+			$('#ITP_FORM_MPOMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG05010_LIST_SEARCH_SPPLY_NM').val('');
269
+		},
270
+		close: function() {
271
+			this.rows.length = 0;
272
+			$('#ITP_POP_MPOMNG05010_LIST_SPPLY_AREA .panel-group').empty();
273
+			$('#ITP_FORM_MPOMNG05010_POP_SPPLY_SEARCH #ITP_FORM_MPOMNG05010_POP_SPPLY_KEYWORD').val('');
274
+			mobPopObj.hide(this.popId);
275
+		}
276
+	},
277
+	popWhsNm: {
278
+		popId: 'ITP_POP_MPOMNG05010_WHS_AREA',
279
+		rows: [],
280
+		init: function () {
281
+			this.rows.length = 0;
282
+			mobPopObj.show(this.popId);
283
+			this.search();
284
+			this.action();
285
+		},
286
+		search: function () {
287
+			var _this = this;
288
+			$('#ITP_LIST_MPOMNG05010_POP_WHS_AREA .panel-group').empty();
289
+			var callbackFn = function(result) {
290
+				console.log(result);
291
+				_this.view(result.gridRows);
292
+			};
293
+			const param = $('#ITP_FORM_MPOMNG05010_POP_WHS').serializeObject();
294
+			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
295
+		},
296
+		view: function(gridRows) {
297
+			this.rows = gridRows;
298
+			$.each(gridRows, function (i, item) {
299
+				$('#ITP_LIST_MPOMNG05010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MPOMNG05010_POP_WHS_ROWCOPY').html());
300
+				var $li = $('#ITP_LIST_MPOMNG05010_POP_WHS_AREA .panel-group > .list-row:last');
301
+				$li.find('.fnWhsNm').text(item.whsNm);
302
+				$li.find('.fnLocationNm').text(item.locationNm);
303
+				$li.find('.fnWhsId').data('whs-id', item.whsId);
304
+			});
305
+		},
306
+		choice: function(elem) {
307
+			var _this = this;
308
+			var whsId = $(elem).data('whs-id');
309
+			$.each(this.rows, function (i, item) {
310
+				if(whsId === item.whsId) {
311
+					$('#ITP_FORM_MPOMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG05010_LIST_SEARCH_WHS_ID').val(item.whsId);
312
+					$('#ITP_FORM_MPOMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG05010_LIST_SEARCH_WHS_NM').val(item.whsNm);
313
+					_this.close();
314
+					return false;
315
+				}
316
+			});
317
+		},
318
+		action: function() {
319
+			var _this = this;
320
+			$('button[id^="ITP_BTN_MPOMNG05010_POP_WHS"]').off('click').on('click', function() {
321
+				var id = $(this).attr('id');
322
+				switch (id) {
323
+					case 'ITP_BTN_MPOMNG05010_POP_WHS_SEARCH'	: _this.search();			break;
324
+					case 'ITP_BTN_MPOMNG05010_POP_WHS_CHOICE'	: _this.choice($(this)); 	break;
325
+					case 'ITP_BTN_MPOMNG05010_POP_WHS_CLOSE'	: _this.close(); 			break;
326
+				}
327
+				return false;
328
+			});
329
+		},
330
+		delete: function() {
331
+			$('#ITP_FORM_MPOMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG05010_LIST_SEARCH_WHS_ID').val('');
332
+			$('#ITP_FORM_MPOMNG05010_LIST_SEARCH #ITP_FORM_MPOMNG05010_LIST_SEARCH_WHS_NM').val('');
333
+		},
334
+		close: function() {
335
+			this.rows.length = 0;
336
+			$('#ITP_POP_MPOMNG05010_LIST_WHS_AREA .panel-group').empty();
337
+			$('#ITP_FORM_MPOMNG05010_POP_WHS #ITP_FORM_MPOMNG05010_POP_WHS_KEYWORD').val('');
338
+			mobPopObj.hide(this.popId);
339
+		}
340
+	},
341
+	show: function(popId) {
342
+		$('button[id$="_CLOSE"]').off('click').on('click', function() {
343
+			console.log($(this).attr('id'));
344
+			if($(this).hasClass('btn-pop-close')) {
345
+				mobPopObj.hide(popId);
346
+			}
347
+		});
348
+		$('#' + popId).show();
349
+	},
350
+	hide: function(popId) {
351
+		$('#' + popId).closest('.mobile-pop-close').hide();
352
+	}
353
+};