Parcourir la source

반품발주 생성

marseyes il y a 2 ans
Parent
commit
338c119208

+ 29 - 17
src/main/webapp/app/rtnmng/RTNMNG03010.html

@@ -171,11 +171,12 @@
171 171
 								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_BRAND_ID" name="brandId" value="">
172 172
 								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_STORE_ID" name="storeId" value="">
173 173
 								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_RTN_REQ_DVSN" name="rtnReqDvsn" value="">
174
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_RTN_MGR_ID" name="rtnMgrId" value="">
174 175
 								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_SPPLY_ID" name="spplyId" value="">
175 176
 								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_RTN_WHS_ID" name="rtnWhsId" value="">
176 177
 								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_RTN_LOCATION" name="rtnLocation" value="">
177 178
 																
178
-								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_JOB_CD" name="jobCd" value="R">
179
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_JOB_CD" name="jobCd" value="P">
179 180
 					
180 181
 								<section class="itp_form_sec">
181 182
 									<h4 class="itp_form_tit">반품 발주 상세</h4>
@@ -190,7 +191,15 @@
190 191
 									<div class="itp_form_in">
191 192
 										<div class="form-group">
192 193
 											<label class="col-xs-2 itp_lb">공급업체명</label>
193
-											<div class="col-xs-4 itp_ip fnSpplyNm"></div>
194
+											<div class="col-xs-4 itp_ip">
195
+												<div class="col-xs-5 itp_in">
196
+													<input type="text" id="ITP_FORM_RTNMNG03010_NDETAIL_SPPLY_NM" class="form-control itp_input" name="spplyNm" placeholder="공급업체" readonly="readonly" />													
197
+												</div>
198
+												<div class="col-xs-5 itp_in" style="padding-left:3px; ">
199
+													<button type="button" id="ITP_BTN_RTNMNG03010_NDETAIL_SPPLY_NM" class="btn btn-success btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
200
+													<button type="button" id="ITP_BTN_RTNMNG03010_SDELETE_SPPLY_NM" class="btn btn-primary btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
201
+								                </div>
202
+											</div>
194 203
 											<label class="col-xs-2 itp_lb">수거요청일</label>
195 204
 											<div class="col-xs-4 itp_ip">
196 205
 												<div class="col-xs-4 itp_in">
@@ -204,7 +213,15 @@
204 213
 									<div class="itp_form_in">	
205 214
 										<div class="form-group">
206 215
 											<label class="col-xs-2 itp_lb">수거장소</label>
207
-											<div class="col-xs-4 itp_ip fnColPlace"></div>
216
+											<div class="col-xs-4 itp_ip">
217
+												<div class="col-xs-5 itp_in">
218
+													<input type="text" id="ITP_FORM_RTNMNG03010_NDETAIL_RTN_WHS_NM" data-check-required="empty" class="form-control itp_input" name="rtnWhsNm" placeholder="창고/공급사" readonly="readonly" />
219
+												</div>
220
+												<div class="col-xs-5 itp_in" style="padding-left:3px; ">
221
+													<button type="button" id="ITP_BTN_RTNMNG03010_NDETAIL_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
222
+													<button type="button" id="ITP_BTN_RTNMNG03010_NDETAIL_MODIFY" class="btn btn-primary btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
223
+								                </div>
224
+											</div>
208 225
 											<label class="col-xs-2 itp_lb">반품 발주 총 금액</label>
209 226
 											<div class="col-xs-4 itp_ip fnRtnDodrTotalAmt"></div>
210 227
 										</div>
@@ -212,36 +229,31 @@
212 229
 									<div class="itp_form_in">	
213 230
 										<div class="form-group">
214 231
 											<label class="col-xs-2 itp_lb">발주담당자</label>
215
-											<div class="col-xs-4 itp_ip fnPodrMgrNm"></div>
232
+											<div class="col-xs-4 itp_ip fnRtnMgrNm"></div>
216 233
 											<label class="col-xs-2 itp_lb">발주담당자연락처</label>
217
-											<div class="col-xs-4 itp_ip fnPodrMgrMblNo"></div>
234
+											<div class="col-xs-4 itp_ip fnRtnMgrTelNo"></div>
218 235
 										</div>
219 236
 									</div>
220 237
 									<div class="itp_form_in">	
221 238
 										<div class="form-group">
222 239
 											<label class="col-xs-2 itp_lb">수거구분</label>
223
-											<div class="col-xs-4 itp_ip">
224
-												<div class="col-xs-7 itp_in">
240
+											<div class="col-xs-10 itp_ip">
241
+												<div class="col-xs-2 itp_in">
225 242
 													<select id="ITP_FORM_RTNMNG03010_NDETAIL_COL_DVSN" data-select-code="COL_DVSN" data-check-required="empty" class="form-control itp_input" name="colDvsn">
226 243
 														<option value="A">본사수거/공급사수거</option>											
227 244
 													</select>
228 245
 												</div>
229 246
 											</div>
230
-											<label class="col-xs-2 itp_lb">반품입고창고</label>
231
-											<div class="col-xs-4 itp_ip">
232
-												<div class="col-xs-5 itp_in">
233
-													<input type="text" id="ITP_FORM_RTNMNG03010_NDETAIL_RTN_WHS_NM" class="form-control itp_input" name="rtnWhsNm" placeholder="창고/공급사" />
234
-												</div>
235
-												<div class="col-xs-5 itp_in" style="padding-left:3px; ">
236
-													<button type="button" id="ITP_BTN_RTNMNG03010_NDETAIL_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
237
-													<button type="button" id="ITP_BTN_RTNMNG03010_NDETAIL_MODIFY" class="btn btn-primary btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
238
-								                </div>
239
-											</div>
240 247
 										</div>
241 248
 									</div>
242 249
 									<div class="itp_form_in">
243 250
 										<div class="itp_table_head fix" style="background:#f5f5f5;">
244 251
 											<h4 class="itp_table_tit">반품발주 품목</h4>
252
+											
253
+											<div class="pull-right itp_cicon">
254
+												<button type="button" id="ITP_BTN_RTNMNG03010_NDETAIL_ADDROW" class="btn btn-primary btn-sm ARB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;품목추가&nbsp;&nbsp;</button>
255
+												<button type="button" id="ITP_BTN_RTNMNG03010_NDETAIL_DELROW" class="btn btn-danger btn-sm DRB"><i class="glyphicon "></i>&nbsp;&nbsp;품목삭제&nbsp;&nbsp;</button>
256
+											</div>
245 257
 										</div>
246 258
 										<div id="ITP_RTNMNG03010_NDETAIL_jqGrid_list" class="itp_tb_list">
247 259
 										  <div id="ITP_RTNMNG03010_NDETAIL_jqGridView" class="itp_views fix"></div>

+ 160 - 65
src/main/webapp/js/app/rtnmng/ITP_RTNMNG03010.js

@@ -38,6 +38,10 @@ let ITP_FORM_RTNMNG03010_DETAIL_IS_WRITING = false;
38 38
 let RTNMNG03010_GRID_LAST_ROW_ID;
39 39
 let SCREEN_MODE ;
40 40
 
41
+/* 공통코드 리스트 */
42
+let ITP_COMMON_CD_RTN_DVSN = fn_make_common_cd_list(CODE_LIST, 'RTN_DVSN', false);
43
+let ITP_COMMON_CD_RTN_RSN_DVSN = fn_make_common_cd_list(CODE_LIST, 'RTN_RSN_DVSN', false);
44
+
41 45
 /*API URL*/
42 46
 let API_DETAIL_GRID_LIST 		= '/api/rtnmng/target-grid-list';	// 목록
43 47
 let API_DETAIL_REJECT  			= '/api/rtnmng/reject-pchReq'; 		// 구매요청 선택한건 반려 처리 
@@ -255,6 +259,117 @@ const gridColModel = {
255 259
 			sortable: false, editable: false, edittype: 'text',
256 260
 			hidden: true
257 261
 		}
262
+	], 
263
+	ndetail: [
264
+		{
265
+			index: 'VIEW_CD', name: 'viewCd',
266
+			label: ITP_MSG_LOCALE.label.viewCd,
267
+			width: '10', fixed: false, align: 'center',
268
+			sortable: false, hidden: true
269
+		},
270
+		{
271
+			index: 'RTN_REQ_UNQ_NO', name: 'rtnReqUnqNo',
272
+			label: '반품요청번호', 
273
+			width: '10', fixed: false, align: 'center',
274
+			sortable: false, hidden: true, edittype: 'text',
275
+			editable: false
276
+		},
277
+		{
278
+			index: 'RTN_REQ_DTL_NO', name: 'rtnReqDtlNo',
279
+			label: '반품요청항번', 
280
+			width: '10', fixed: false, align: 'center',
281
+			sortable: true, editable: false, edittype: 'text',
282
+			hidden: true
283
+		},
284
+		{
285
+			index: 'ITEM_ID', name: 'itemId',
286
+			label: ITP_MSG_LOCALE.label.itemId, // 품목아이디
287
+			width: '10', fixed: false, align: 'center',
288
+			sortable: false, editable: false, edittype: 'text',
289
+			hidden: false
290
+		},
291
+		{
292
+			index: 'ITEM_NM', name: 'itemNm',
293
+			label: ITP_MSG_LOCALE.label.itemNm, //품목명
294
+			width: '10', fixed: false, align: 'left',
295
+			sortable: false, editable: false, edittype: 'text',
296
+			hidden: false
297
+		},
298
+		{
299
+			index: 'UNIT_AMT', name: 'unitAmt',
300
+			label: ITP_MSG_LOCALE.label.unitAmt, //단가
301
+			width: '10', fixed: false, align: 'right',
302
+			sortable: false, editable: false, edittype: 'text',
303
+			hidden: false,
304
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
305
+		},
306
+		{
307
+			index: 'UNIT', name: 'unit',
308
+			label: ITP_MSG_LOCALE.label.unit, //단위
309
+			width: '10', fixed: false, align: 'center',
310
+			sortable: false, editable: false, edittype: 'text',
311
+			hidden: false
312
+		},
313
+		{
314
+			index: 'RTN_REQ_QTY', name: 'rtnReqQty',
315
+			label: '반품요청수량', 
316
+			width: '10', fixed: false, align: 'right',
317
+			sortable: false, editable: false, edittype: 'text',
318
+			hidden: true,
319
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
320
+		},
321
+		{
322
+			index: 'RTN_QTY', name: 'rtnQty',
323
+			label: '반품발주수량', 
324
+			width: '10', fixed: false, align: 'right',
325
+			sortable: false, editable: true, edittype: 'text',
326
+			editrules: {required: true}, hidden: false,
327
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
328
+		},
329
+		{
330
+			index: 'RTN_AMT', name: 'rtnAmt',
331
+			label: '발주금액', 
332
+			width: '10', fixed: false, align: 'right',
333
+			sortable: false, editable: false, edittype: 'text',
334
+			hidden: false,
335
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
336
+		},
337
+		{
338
+			index: 'RTN_DVSN', name: 'rtnDvsn',
339
+			label: '반품구분',
340
+			width: '10', fixed: false, align: 'center',
341
+			sortable: false, editable: true, formatter: 'select', edittype: 'select',
342
+			editoptions: {value: ITP_COMMON_CD_RTN_DVSN},
343
+			editrules: {required: true}
344
+		},
345
+		{
346
+			index: 'RTN_RSN_DVSN', name: 'rtnRsnDvsn',
347
+			label: '사유구분',
348
+			width: '10', fixed: false, align: 'center',
349
+			sortable: false, editable: true, formatter: 'select', edittype: 'select',
350
+			editoptions: {value: ITP_COMMON_CD_RTN_RSN_DVSN},
351
+			editrules: {required: true}
352
+		},
353
+		{
354
+			index: 'RTN_RSN', name: 'rtnRsn',
355
+			label: '반품사유', 
356
+			width: '15', fixed: false, align: 'left',
357
+			sortable: false, editable: true, edittype: 'text'
358
+		},
359
+		{
360
+			index: 'BRAND_UNIT_UNQ_NO', name: 'brandUnitUnqNo',
361
+			label: ITP_MSG_LOCALE.label.brandUnitUnqNo, //브랜드단가고유번호
362
+			width: '10', fixed: false, align: 'center',
363
+			sortable: false, editable: false, edittype: 'text',
364
+			hidden: true
365
+		},
366
+		{
367
+			index: 'STORE_UNIT_UNQ_NO', name: 'storeUnitUnqNo',
368
+			label: ITP_MSG_LOCALE.label.storeUnitUnqNo, //매장단가고유번호
369
+			width: '10', fixed: false, align: 'center',
370
+			sortable: false, editable: false, edittype: 'text',
371
+			hidden: true
372
+		}
258 373
 	]
259 374
 };
260 375
 
@@ -337,15 +452,13 @@ let pageObj = {
337 452
 		});
338 453
 						
339 454
 		// 검색 공급사 
340
-		$('#ITP_BTN_RTNMNG03010_NDETAIL_SEARCH_SPPLY_NM').on('click', function() {
455
+		$('#ITP_BTN_RTNMNG03010_NDETAIL_SPPLY_NM').on('click', function() {
341 456
 			_this.popup('NS');
342 457
 		});
343 458
 		// 검색 텍스트 삭제 버튼 클릭
344
-		$('#ITP_BTN_RTNMNG03010_NDETAIL_DELETE_SPPLY_NM').on('click', function() {
459
+		$('#ITP_BTN_RTNMNG03010_SDELETE_SPPLY_NM').on('click', function() {
345 460
 			
346 461
 			var spplyId = $('#ITP_FORM_RTNMNG03010_NDETAIL_SPPLY_ID').val();
347
-			
348
-			
349 462
 			var records = $(RTNMNG03010_NDETAIL_GRID_ID).getGridParam('reccount')
350 463
 			
351 464
 			if (spplyId != '' && records != 0 ) {
@@ -357,7 +470,7 @@ let pageObj = {
357 470
 								
358 471
 								// 품목그리드삭제 처리	
359 472
 								pageObj.grid.clearData('NPC');
360
-								$('#ITP_FORM_RTNMNG03010_NDETAIL .fnPodrAmt').text('');	
473
+								$('#ITP_FORM_RTNMNG03010_NDETAIL .fnRtnDodrTotalAmt').text('');	
361 474
 							}
362 475
 					};
363 476
 					itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.delAllItem, delSpply, null);
@@ -367,18 +480,16 @@ let pageObj = {
367 480
 			}
368 481
 		});
369 482
 		
370
-		// 상세 출하창고
371
-		$('#ITP_BTN_RTNMNG03010_SEARCH_WHS_NM').on('click', function() {
483
+		// 수거장소
484
+		$('#ITP_BTN_RTNMNG03010_NDETAIL_SRH').on('click', function() {
372 485
 			_this.popup('NHW');
373 486
 		});
374
-		// 검색 납품장소 텍스트 삭제 버튼 클릭
375
-		$('#ITP_BTN_RTNMNG03010_DELETE_WHS_NM').on('click', function() {
376
-			$('#ITP_FORM_RTNMNG03010_NDETAIL_WHS_ID').val('');
377
-			$('#ITP_FORM_RTNMNG03010_NDETAIL_LOCATION').val('');
378
-			$('#ITP_FORM_RTNMNG03010_NDETAIL_WHS_NM').val('');
379
-			
380
-		});
381
-		
487
+		// 수거장소 삭제 버튼 클릭
488
+		$('#ITP_BTN_RTNMNG03010_NDETAIL_MODIFY').on('click', function() {
489
+			$('#ITP_FORM_RTNMNG03010_NDETAIL_RTN_WHS_NM').val('');
490
+			$('#ITP_FORM_RTNMNG03010_NDETAIL_RTN_WHS_ID').val('');
491
+			$('#ITP_FORM_RTNMNG03010_NDETAIL_RTN_LOCATION').val('');		
492
+		});		
382 493
 		
383 494
 	},
384 495
 	popup: function (arg) {
@@ -416,7 +527,7 @@ let pageObj = {
416 527
 			
417 528
 			var selectedIds = $(RTNMNG03010_GRID_ID).getGridParam('selarrrow');
418 529
 			if(selectedIds.length > 1) { // 1개만 선택
419
-			   alert("구매요청 반려대상에 대해 하나만 선택해주세요 (대표 구매요청번호)") ;
530
+			   itp_fn_modal_alert("구매요청 반려대상에 대해 하나만 선택해주세요 (대표 구매요청번호)") ;
420 531
 				return;
421 532
 			} 
422 533
 			
@@ -429,8 +540,7 @@ let pageObj = {
429 540
 			const key1 = {pchReqUnqNo:selRowData.pchReqUnqNo, storeId:selRowData.storeId};
430 541
 			
431 542
 			fn_call_popup('biz', 'BIZPOP_PO_REJECT', '#ITP_ASIDE', popFn, key1, 'S');
432
-		} 
433
-		
543
+		} 		
434 544
 		
435 545
 	},
436 546
 	callback: {
@@ -449,23 +559,19 @@ let pageObj = {
449 559
 			
450 560
 		},
451 561
 		searNSpply: function(rowDataPop) {
452
-			if(rowDataPop) {
453
-			
454
-				var pspplyId = $('#ITP_FORM_RTNMNG03010_NDETAIL_SPPLY_ID').val();
455
-			
456
-				if (pspplyId == "") {
457
-				
562
+			if(rowDataPop) {			
563
+				var pspplyId = $('#ITP_FORM_RTNMNG03010_NDETAIL_SPPLY_ID').val();			
564
+				if (pspplyId == "") {				
458 565
 					$('#ITP_FORM_RTNMNG03010_NDETAIL_SPPLY_NM').val(rowDataPop.spplyNm);
459 566
 					$('#ITP_FORM_RTNMNG03010_NDETAIL_SPPLY_ID').val(rowDataPop.spplyId);
460 567
 				} else {
461 568
 					var records = $(RTNMNG03010_NDETAIL_GRID_ID).getGridParam('reccount')
462 569
 					if (records != 0) {
463 570
 						if (pspplyId != rowDataPop.spplyId ) {
464
-							alert( "추가한 품목의 공급사와 서로 틀립니다 !");
571
+							itp_fn_modal_alert( "추가한 품목의 공급사와 서로 틀립니다 !");
465 572
 							return ;
466 573
 						}
467
-					}
468
-					
574
+					}					
469 575
 				}
470 576
 			}
471 577
 			
@@ -479,9 +585,9 @@ let pageObj = {
479 585
 		},
480 586
 		searNWhs: function(rowDataPop) {
481 587
 			if(rowDataPop) {
482
-				$('#ITP_FORM_RTNMNG03010_NDETAIL_WHS_NM').val(rowDataPop.whsNm + " - " + rowDataPop.locationNm);
483
-				$('#ITP_FORM_RTNMNG03010_NDETAIL_WHS_ID').val(rowDataPop.whsId);
484
-				$('#ITP_FORM_RTNMNG03010_NDETAIL_LOCATION').val(rowDataPop.location);
588
+				$('#ITP_FORM_RTNMNG03010_NDETAIL_RTN_WHS_NM').val(rowDataPop.whsNm + " - " + rowDataPop.locationNm);
589
+				$('#ITP_FORM_RTNMNG03010_NDETAIL_RTN_WHS_ID').val(rowDataPop.whsId);
590
+				$('#ITP_FORM_RTNMNG03010_NDETAIL_RTN_LOCATION').val(rowDataPop.location);
485 591
 			}
486 592
 		},
487 593
 		poRej: function(rowDataPop) {
@@ -593,7 +699,7 @@ let pageObj = {
593 699
 						
594 700
 						if (chkSpplyId != "" ) {
595 701
 							if (value.spplyId != chkSpplyId ) {
596
-								alert("서로다른 공급사 품목을 발주 진행 할 수 없습니다.");
702
+								itp_fn_modal_alert("서로다른 공급사 품목을 발주 진행 할 수 없습니다.");
597 703
 								diffchk = "Y" ;
598 704
 								return false ;
599 705
 							} 
@@ -610,32 +716,13 @@ let pageObj = {
610 716
 						$('#ITP_FORM_RTNMNG03010_NDETAIL_SPPLY_NM').val(chkSpplyNm);
611 717
 					} else {
612 718
 						if (spplyId != chkSpplyId ) {
613
-							alert("납품 공급사와 품목 공급사 정보가 서로 다릅니다.");
719
+							itp_fn_modal_alert("납품 공급사와 품목 공급사 정보가 서로 다릅니다.");
614 720
 							diffchk = "Y" ;
615 721
 						}
616 722
 					}
617 723
 					
618 724
 					if (diffchk == "Y") return;
619 725
 					
620
-					/*
621
-					$.each(rowDataPop, function(key, value) {
622
-						// 공급업체가 상이사면 오류 알럿 출력
623
-						$.each(rowData, function(pkey, pvalue) {
624
-							console.log(rowData);
625
-							if (value.spplyId != pvalue.spplyId ) {
626
-								alert("2 서로다른 공급사 품목을 발주 진행 할 수 없습니다.")
627
-								diffchk = "Y";
628
-								return false;
629
-							}
630
-						});
631
-						if (diffchk == "Y") {
632
-							return false;
633
-						}
634
-					});
635
-					
636
-					if (diffchk == "Y") return;
637
-					*/
638
-					
639 726
 					$.each(rowDataPop, function(key, value) {
640 727
 						// 공급업체가 상이사면 오류 알럿 출력
641 728
 						if (exists.indexOf(value.brandUnitUnqNo) < 0 && value.podrPssblDvsn == 'PO01') {
@@ -660,13 +747,11 @@ let pageObj = {
660 747
 		gridEmpty: '',
661 748
 		gridRows: '',
662 749
 		load: function(mode, gridRows) {
663
-			
664 750
 			var _this = this;
665 751
 			var option = {
666 752
 				gridId: _this.gridId,
667
-				colModel: gridColModel.detail,
753
+				colModel: (mode === 'NPC') ? gridColModel.ndetail : gridColModel.detail,
668 754
 				data: gridRows,
669
-				//cellEdit: true,
670 755
 				multiselect: (mode === 'NPC'),
671 756
 				loadComplete: function(data) {
672 757
 					$(mode === 'NPC' ? RTNMNG03010_NDETAIL_GRID_LIST : RTNMNG03010_DETAIL_GRID_LIST).find('.ui-jqgrid .ui-jqgrid-bdiv').css('overflow-x', 'hidden');
@@ -679,9 +764,9 @@ let pageObj = {
679 764
 				}
680 765
 			};
681 766
 			itp_fn_grid_make_local(option);
682
-		},
683
-		recal: function() {
684 767
 			
768
+		},
769
+		recal: function() {			
685 770
 			if (SCREEN_MODE == 'NPC' || SCREEN_MODE === 'POC') {
686 771
 				var ids = $((SCREEN_MODE === 'NPC') ? RTNMNG03010_NDETAIL_GRID_ID : RTNMNG03010_DETAIL_GRID_ID).getDataIDs();
687 772
 				$.each(ids, function(idx, rowId) {
@@ -695,6 +780,20 @@ let pageObj = {
695 780
 					}
696 781
 				});
697 782
 				
783
+				const rowData = $((SCREEN_MODE == 'NPC') ? RTNMNG03010_NDETAIL_GRID_ID : RTNMNG03010_DETAIL_GRID_ID).getRowData();
784
+				var rtnAmt = 0 ;
785
+				$.each(rowData, function(key, value) {
786
+					if (value.rtnAmt != null && value.rtnAmt != "" && value.viewCd != "D") {
787
+						rtnAmt = rtnAmt + parseInt(value.rtnAmt) ;
788
+					}
789
+					
790
+				});
791
+			
792
+				if (SCREEN_MODE == 'NPC')  {
793
+					$('#ITP_FORM_RTNMNG03010_NDETAIL .fnRtnDodrTotalAmt').text(itp_fn_number_comma(rtnAmt));	
794
+				} else {
795
+					$('#ITP_FORM_RTNMNG03010_DETAIL .fnRtnDodrTotalAmt').text(itp_fn_number_comma(rtnAmt));
796
+				}
698 797
 			}
699 798
 		},
700 799
 		clearData : function(mode) {
@@ -1038,20 +1137,16 @@ let createObj = {
1038 1137
 		//pageObj.switchScreen('NPC');		
1039 1138
 		$('#ITP_FORM_RTNMNG03010_NDETAIL #ITP_FORM_RTNMNG03010_DETAIL_VIEW_CD').val('C');
1040 1139
 		$('#ITP_FORM_RTNMNG03010_NDETAIL #ITP_FORM_RTNMNG03010_NDETAIL_BRAND_ID').val(result.brandId);
1140
+		$('#ITP_FORM_RTNMNG03010_NDETAIL #ITP_FORM_RTNMNG03010_NDETAIL_RTN_REQ_DVSN').val(result.rtnReqDvsn);
1141
+		$('#ITP_FORM_RTNMNG03010_NDETAIL #ITP_FORM_RTNMNG03010_NDETAIL_RTN_MGR_ID').val(result.rtnMgrId);
1041 1142
 		
1042 1143
 		$('#ITP_FORM_RTNMNG03010_NDETAIL .fnBrandNm').text(result.brandNm);
1043
-				
1044
-		
1045
-		$('#ITP_FORM_RTNMNG03010_NDETAIL .fnDlvDvsnNm').text(result.dlvDvsnNm);
1046
-		$('#ITP_FORM_RTNMNG03010_NDETAIL #ITP_FORM_RTNMNG03010_NDETAIL_DLV_DVSN').val(result.dlvDvsn);
1047
-		$('#ITP_FORM_RTNMNG03010_NDETAIL .fnPodrDt').text(result.podrDt);
1048
-		$('#ITP_FORM_RTNMNG03010_NDETAIL .podrMgrId').text(result.podrMgrId);
1049
-		$('#ITP_FORM_RTNMNG03010_NDETAIL .fnPodrMgrNm').text(result.podrMgrNm);
1050
-		$('#ITP_FORM_RTNMNG03010_NDETAIL .fnPodrMgrNo').text(result.podrMgrTelNo);
1144
+		$('#ITP_FORM_RTNMNG03010_NDETAIL .fnRtnMgrNm').text(result.rtnMgrNm);
1145
+		$('#ITP_FORM_RTNMNG03010_NDETAIL .fnRtnMgrTelNo').text(result.rtnMgrTelNo);
1051 1146
 		
1052 1147
 		var now = new Date();
1053 1148
 		$('#ITP_TAB_RTNMNG03010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
1054
-		$('#ITP_FORM_RTNMNG03010_NDETAIL_DLV_REQ_DT').datepicker('setDate', new Date(now.setDate(now.getDate()+5)));
1149
+		$('#ITP_FORM_RTNMNG03010_NDETAIL_COL_REQ_DT').datepicker('setDate', new Date(now.setDate(now.getDate()+5)));
1055 1150
 		
1056 1151
 		// 품목  리스트 조회
1057 1152
 		// pageObj.grid.init('DETAIL', result.itemList);