Browse Source

반품요청 개발중

marseyes 2 years ago
parent
commit
e5da881ddd

+ 21 - 6
src/main/webapp/app/rtnmng/RTNMNG01010.html

@@ -5,6 +5,7 @@
5
 				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i><strong>반품 요청</strong></h2>
5
 				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i><strong>반품 요청</strong></h2>
6
 				<div class="pull-right itp_cicon">
6
 				<div class="pull-right itp_cicon">
7
 					<button type="button" id="ITP_BTN_RTNMNG01010_REQ" class="btn btn-primary btn-sm REQ" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;요청&nbsp;&nbsp;</button>
7
 					<button type="button" id="ITP_BTN_RTNMNG01010_REQ" class="btn btn-primary btn-sm REQ" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;요청&nbsp;&nbsp;</button>
8
+					<button type="button" id="ITP_BTN_RTNMNG01010_TEMP_SAVE" class="btn btn-primary btn-sm REQ" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;임시저장&nbsp;&nbsp;</button>
8
 				</div>
9
 				</div>
9
 			</div>
10
 			</div>
10
 			<div class="itp_det_in">
11
 			<div class="itp_det_in">
@@ -13,6 +14,15 @@
13
 						<div class="col-xs-12">
14
 						<div class="col-xs-12">
14
 							<form id="ITP_FORM_RTNMNG01010_DETAIL" class="form-horizontal">
15
 							<form id="ITP_FORM_RTNMNG01010_DETAIL" class="form-horizontal">
15
 								<input type="hidden" id="ITP_FORM_RTNMNG01010_DETAIL_VIEW_CD" name="viewCd" value="C">
16
 								<input type="hidden" id="ITP_FORM_RTNMNG01010_DETAIL_VIEW_CD" name="viewCd" value="C">
17
+								<input type="hidden" id="ITP_FORM_RTNMNG01010_DETAIL_BRAND_ID" name="brandId" value="">
18
+								<input type="hidden" id="ITP_FORM_RTNMNG01010_DETAIL_STORE_ID" name="storeId" value="">
19
+								
20
+								<input type="hidden" id="ITP_FORM_RTNMNG01010_DETAIL_REQ_DEPT" name="reqDept" value="">
21
+								<input type="hidden" id="ITP_FORM_RTNMNG01010_DETAIL_AUTH_TP_CD" name="authTpCd" value="">
22
+								<input type="hidden" id="ITP_FORM_RTNMNG01010_DETAIL_WHS_DVSN" name="whsDvsn" value="">
23
+								<input type="hidden" id="ITP_FORM_RTNMNG01010_DETAIL_RTN_REQ_ST_CD" name="rtnReqStCd" value="">
24
+								<input type="hidden" id="ITP_FORM_RTNMNG01010_DETAIL_RTN_REQ_UNQ_NO" name="rtnReqUnqNo" value="">								
25
+								
16
 								<section class="itp_form_sec">
26
 								<section class="itp_form_sec">
17
 									<h4 class="itp_form_tit">반품요청정보</h4>
27
 									<h4 class="itp_form_tit">반품요청정보</h4>
18
 									<div class="itp_form_in">	
28
 									<div class="itp_form_in">	
@@ -20,19 +30,24 @@
20
 											<label class="col-xs-2 itp_lb">브랜드 *</label>
30
 											<label class="col-xs-2 itp_lb">브랜드 *</label>
21
 											<div class="col-xs-4 itp_ip fnBrandNm"></div>
31
 											<div class="col-xs-4 itp_ip fnBrandNm"></div>
22
 											<label class="col-xs-2 itp_lb">반품번호</label>
32
 											<label class="col-xs-2 itp_lb">반품번호</label>
23
-											<div class="col-xs-4 itp_ip fnPchReqUnqNo">(자동생성)</div>
33
+											<div class="col-xs-4 itp_ip fnRtnReqUnqNo">(자동생성)</div>
24
 										</div>
34
 										</div>
25
 									</div>
35
 									</div>
26
 									<div class="itp_form_in">	
36
 									<div class="itp_form_in">	
27
 										<div class="form-group">
37
 										<div class="form-group">
28
 											<label class="col-xs-2 itp_lb">반품장소</label>
38
 											<label class="col-xs-2 itp_lb">반품장소</label>
29
 											<div class="col-xs-4 itp_ip">
39
 											<div class="col-xs-4 itp_ip">
30
-												<div class="col-xs-5 itp_in">
31
-													<input type="text" id="ITP_FORM_RTNMNG01010_DETAIL_DLV_PLACE" class="form-control itp_input" name="dlvPlace" placeholder="매장/창고" />
40
+												<div class="col-xs-4 itp_in">
41
+													<input type="text" id="ITP_FORM_RTNMNG01010_DETAIL_RTN_WHS_NM" data-check-required="empty" class="form-control itp_input" name="rtnWhsNm" value="" />
42
+													<input type="hidden" id="ITP_FORM_RTNMNG01010_DETAIL_RTN_WHS_ID" class="form-control itp_input" name="rtnWhsId" value="" />
43
+												</div>
44
+												<div class="col-xs-4 itp_in">
45
+													<input type="text" id="ITP_FORM_RTNMNG01010_DETAIL_RTN_LOCATION_NM" data-check-required="empty" class="form-control itp_input" name="rtnLocationNm" value="" />
46
+													<input type="hidden" id="ITP_FORM_RTNMNG01010_DETAIL_RTN_LOCATION" class="form-control itp_input" name="rtnLocation" value="" />
32
 												</div>
47
 												</div>
33
-												<div class="col-xs-4 itp_in" style="padding-left:3px">
34
-													<button type="button" id="ITP_BTN_RTNMNG01010_DETAIL_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
35
-													<button type="button" id="ITP_BTN_RTNMNG01010_DETAIL_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
48
+												<div class="col-xs-1 itp_in" style="width:23%; padding:0px;">
49
+													<button type="button" id="ITP_FORM_RTNMNG01010_SEARCH_WHS_NM" class="btn btn-success btn-sm SEB SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
50
+													<button type="button" id="ITP_FORM_RTNMNG01010_DELETE_WHS_NM" class="btn btn-primary btn-sm UPB SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
36
 								                </div>
51
 								                </div>
37
 											</div>
52
 											</div>
38
 											<label class="col-xs-2 itp_lb">수거요청일</label>
53
 											<label class="col-xs-2 itp_lb">수거요청일</label>

+ 81 - 65
src/main/webapp/js/app/rtnmng/ITP_RTNMNG01010.js

@@ -25,6 +25,10 @@ const RTNMNG01010_DETAIL_GRID_EMPTY = '#ITP_RTNMNG01010_DETAIL_jqGridEmpty';  //
25
 
25
 
26
 let RTNMNG01010_DETAIL_GRID_LAST_ROW_ID;
26
 let RTNMNG01010_DETAIL_GRID_LAST_ROW_ID;
27
 
27
 
28
+/* 공통코드 리스트 */
29
+let ITP_COMMON_CD_RTN_DVSN = fn_make_common_cd_list(CODE_LIST, 'RTN_DVSN', false);
30
+let ITP_COMMON_CD_RTN_RSN_DVSN = fn_make_common_cd_list(CODE_LIST, 'RTN_RSN_DVSN', false);
31
+
28
 /*API URL*/
32
 /*API URL*/
29
 let API_DETAIL_INIT_INFO = '/api/rtnmng/init-rtnReq'
33
 let API_DETAIL_INIT_INFO = '/api/rtnmng/init-rtnReq'
30
 let API_DETAIL_SAVE = '/api/rtnmng/save-rtnReq';
34
 let API_DETAIL_SAVE = '/api/rtnmng/save-rtnReq';
@@ -38,17 +42,29 @@ const gridColModel = {
38
 			width: '10', fixed: false, align: 'center',
42
 			width: '10', fixed: false, align: 'center',
39
 			sortable: false, hidden: true
43
 			sortable: false, hidden: true
40
 		},
44
 		},
45
+		{
46
+			index: 'RTN_REQ_UNQ_NO', name: 'rtnReqUnqNo',
47
+			label: '반품요청번호',
48
+			width: '10', fixed: false, align: 'center',
49
+			sortable: false, editable: false, edittype: 'text', hidden: true
50
+		},
51
+		{
52
+			index: 'RTN_REQ_DTL_NO', name: 'rtnReqDtlNo',
53
+			label: '반품요청상세번호',
54
+			width: '10', fixed: false, align: 'center',
55
+			sortable: false, editable: false, edittype: 'text', hidden: true
56
+		},
41
 		{
57
 		{
42
 			index: 'ITEM_ID', name: 'itemId',
58
 			index: 'ITEM_ID', name: 'itemId',
43
 			label: ITP_MSG_LOCALE.label.itemId,
59
 			label: ITP_MSG_LOCALE.label.itemId,
44
-			width: '20', fixed: false, align: 'center',
60
+			width: '15', fixed: false, align: 'center',
45
 			sortable: false, editable: false, edittype: 'text',
61
 			sortable: false, editable: false, edittype: 'text',
46
 			editrules: { required: true }
62
 			editrules: { required: true }
47
 		},
63
 		},
48
 		{
64
 		{
49
 			index: 'ITEM_NM', name: 'itemNm',
65
 			index: 'ITEM_NM', name: 'itemNm',
50
 			label: ITP_MSG_LOCALE.label.itemNm,
66
 			label: ITP_MSG_LOCALE.label.itemNm,
51
-			width: '30', fixed: false, align: 'center',
67
+			width: '25', fixed: false, align: 'center',
52
 			sortable: true, editable: false, edittype: 'text',
68
 			sortable: true, editable: false, edittype: 'text',
53
 			editrules: { required: true }
69
 			editrules: { required: true }
54
 		},
70
 		},
@@ -66,21 +82,48 @@ const gridColModel = {
66
 			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
82
 			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
67
 		},
83
 		},
68
 		{
84
 		{
69
-			index: 'PCH_REQ_QTY', name: 'pchReqQty',
70
-			label: ITP_MSG_LOCALE.label.pchReqQty, //수량
85
+			index: 'RTN_QTY', name: 'rtnQty',
86
+			label: '반품수량', //수량
71
 			width: '10', fixed: false, align: 'right',
87
 			width: '10', fixed: false, align: 'right',
72
 			sortable: false, editable: true, edittype: 'text',
88
 			sortable: false, editable: true, edittype: 'text',
73
 			editrules: { number:true }, 
89
 			editrules: { number:true }, 
74
 			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
90
 			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
75
 		},
91
 		},
76
 		{
92
 		{
77
-			index: 'PCH_REQ_AMT', name: 'pchReqAmt',
78
-			label: ITP_MSG_LOCALE.label.pchReqAmt,
93
+			index: 'RTN_AMT', name: 'rtnAmt',
94
+			label: '반품예상금액',
79
 			width: '10', fixed: false, align: 'right',
95
 			width: '10', fixed: false, align: 'right',
80
 			sortable: false, editable: false, edittype: 'text', hidden: false, 
96
 			sortable: false, editable: false, edittype: 'text', hidden: false, 
81
 			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
97
 			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
98
+		},		
99
+		{
100
+			index: 'RTN_DVSN', name: 'rtnDvsn',
101
+			label: '반품구분',
102
+			width: '10', fixed: false, align: 'center',
103
+			sortable: false, editable: true, formatter: 'select', edittype: 'select',
104
+			editoptions: {value: ITP_COMMON_CD_RTN_DVSN},
105
+			editrules: {required: true}
106
+		},
107
+		{
108
+			index: 'RTN_RSN_DVSN', name: 'rtnRsnDvsn',
109
+			label: '사유구분',
110
+			width: '10', fixed: false, align: 'center',
111
+			sortable: false, editable: true, formatter: 'select', edittype: 'select',
112
+			editoptions: {value: ITP_COMMON_CD_RTN_RSN_DVSN},
113
+			editrules: {required: true}
114
+		},
115
+		{
116
+			index: 'RTN_RSN', name: 'rtnRsn',
117
+			label: '반품사유', 
118
+			width: '15', fixed: false, align: 'right',
119
+			sortable: false, editable: true, edittype: 'text'
120
+		},
121
+		{
122
+			index: 'SPPLY_ID', name: 'spplyId',
123
+			label: '공급사아이디',
124
+			width: '10', fixed: false, align: 'center',
125
+			sortable: false, editable: false, edittype: 'text', hidden: true
82
 		},
126
 		},
83
-
84
 		{
127
 		{
85
 			index: 'BRAND_UNIT_UNQ_NO', name: 'brandUnitUnqNo',
128
 			index: 'BRAND_UNIT_UNQ_NO', name: 'brandUnitUnqNo',
86
 			label: ITP_MSG_LOCALE.label.brandUnitUnqNo,
129
 			label: ITP_MSG_LOCALE.label.brandUnitUnqNo,
@@ -117,10 +160,10 @@ let pageObj = {
117
 		});
160
 		});
118
 		// 납품장소 텍스트 삭제 버튼 클릭
161
 		// 납품장소 텍스트 삭제 버튼 클릭
119
 		$('#ITP_FORM_RTNMNG01010_DELETE_WHS_NM').on('click', function() {
162
 		$('#ITP_FORM_RTNMNG01010_DELETE_WHS_NM').on('click', function() {
120
-			$('#ITP_FORM_RTNMNG01010_DETAIL_WHS_NM').val('');
121
-			$('#ITP_FORM_RTNMNG01010_DETAIL_WHS_ID').val('');
122
-			$('#ITP_FORM_RTNMNG01010_DETAIL_LOCATION_NM').val('');
123
-			$('#ITP_FORM_RTNMNG01010_DETAIL_LOCATION').val('');
163
+			$('#ITP_FORM_RTNMNG01010_DETAIL_RTN_WHS_NM').val('');
164
+			$('#ITP_FORM_RTNMNG01010_DETAIL_RTN_WHS_ID').val('');
165
+			$('#ITP_FORM_RTNMNG01010_DETAIL_RTN_LOCATION_NM').val('');
166
+			$('#ITP_FORM_RTNMNG01010_DETAIL_RTN_LOCATION').val('');
124
 			
167
 			
125
 		});
168
 		});
126
 	},
169
 	},
@@ -143,12 +186,11 @@ let pageObj = {
143
 		create: function(rowDataPop) {
186
 		create: function(rowDataPop) {
144
 			console.log(rowDataPop);
187
 			console.log(rowDataPop);
145
 			if(rowDataPop) {
188
 			if(rowDataPop) {
146
-				$('#ITP_FORM_RTNMNG01010_DETAIL_WHS_NM').val(rowDataPop.whsNm);
147
-				$('#ITP_FORM_RTNMNG01010_DETAIL_WHS_ID').val(rowDataPop.whsId);
148
-				$('#ITP_FORM_RTNMNG01010_DETAIL_LOCATION_NM').val(rowDataPop.locationNm);
149
-				$('#ITP_FORM_RTNMNG01010_DETAIL_LOCATION').val(rowDataPop.location);
150
-			}
151
-			
189
+				$('#ITP_FORM_RTNMNG01010_DETAIL_RTN_WHS_NM').val(rowDataPop.whsNm);
190
+				$('#ITP_FORM_RTNMNG01010_DETAIL_RTN_WHS_ID').val(rowDataPop.whsId);
191
+				$('#ITP_FORM_RTNMNG01010_DETAIL_RTN_LOCATION_NM').val(rowDataPop.locationNm);
192
+				$('#ITP_FORM_RTNMNG01010_DETAIL_RTN_LOCATION').val(rowDataPop.location);
193
+			}			
152
 		}
194
 		}
153
 	},
195
 	},
154
 	itp_RTNMNG01010_param: {},  // ==>dwkim 
196
 	itp_RTNMNG01010_param: {},  // ==>dwkim 
@@ -174,7 +216,7 @@ let pageObj = {
174
 			//var now = new Date(date.getDate() + 5);
216
 			//var now = new Date(date.getDate() + 5);
175
 			var now = new Date();
217
 			var now = new Date();
176
 			$('#ITP_TAB_RTNMNG01010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
218
 			$('#ITP_TAB_RTNMNG01010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
177
-			$('#ITP_FORM_RTNMNG01010_DETAIL_DLV_REQ_DT').datepicker('setDate', new Date(now.setDate(now.getDate() + 5)));
219
+			$('#ITP_FORM_RTNMNG01010_DETAIL_COL_REQ_DT').datepicker('setDate', new Date(now.setDate(now.getDate() + 5)));
178
 			
220
 			
179
 			//납품장소 필드 readonly
221
 			//납품장소 필드 readonly
180
 			$('#ITP_FORM_RTNMNG01010_DETAIL_WHS_NM').attr('readonly', true);
222
 			$('#ITP_FORM_RTNMNG01010_DETAIL_WHS_NM').attr('readonly', true);
@@ -200,8 +242,8 @@ let pageObj = {
200
 				var id = $(this).attr('id');
242
 				var id = $(this).attr('id');
201
 				$(this).on('click', function() {
243
 				$(this).on('click', function() {
202
 					switch (id) {
244
 					switch (id) {
203
-						case 'ITP_BTN_RTNMNG01010_SRH': createObj.button.save("PR20"); break;	// 구매요청
204
-						case 'ITP_BTN_RTNMNG01010_NEWREG': createObj.button.save("PR00"); break;	// 임시저장
245
+						case 'ITP_BTN_RTNMNG01010_REQ'			: createObj.button.save("RR20"); break;		// 요청
246
+						case 'ITP_BTN_RTNMNG01010_TEMP_SAVE'	: createObj.button.save("RR00"); break;	// 임시저장
205
 						case 'ITP_BTN_RTNMNG01010_DETAIL_ADDROW': pageObj.grid.button.addRow(); break;	// 품목추가
247
 						case 'ITP_BTN_RTNMNG01010_DETAIL_ADDROW': pageObj.grid.button.addRow(); break;	// 품목추가
206
 						case 'ITP_BTN_RTNMNG01010_DETAIL_DELROW': pageObj.grid.button.delRow(); break;	// 품목삭제
248
 						case 'ITP_BTN_RTNMNG01010_DETAIL_DELROW': pageObj.grid.button.delRow(); break;	// 품목삭제
207
 					}
249
 					}
@@ -242,7 +284,7 @@ let pageObj = {
242
 					});
284
 					});
243
 
285
 
244
 					$.each(rowDataPop, function(key, value) {
286
 					$.each(rowDataPop, function(key, value) {
245
-						if (exists.indexOf(value.brandUnitUnqNo) < 0 && value.podrPssblDvsn == 'PO01') {
287
+						if (exists.indexOf(value.brandUnitUnqNo) < 0) {
246
 							value['viewCd'] = "C";
288
 							value['viewCd'] = "C";
247
 							$(RTNMNG01010_DETAIL_GRID_ID).jqGrid('addRowData', value.brandUnitUnqNo, value, 'last');
289
 							$(RTNMNG01010_DETAIL_GRID_ID).jqGrid('addRowData', value.brandUnitUnqNo, value, 'last');
248
 						}
290
 						}
@@ -324,12 +366,11 @@ let createObj = {
324
 	newinit: function() {
366
 	newinit: function() {
325
 		$('#ITP_FORM_RTNMNG01010_DETAIL_BRAND_ID').val(fn_make_user_info.get('brandId'));
367
 		$('#ITP_FORM_RTNMNG01010_DETAIL_BRAND_ID').val(fn_make_user_info.get('brandId'));
326
 		$('#ITP_FORM_RTNMNG01010_DETAIL_STORE_ID').val(fn_make_user_info.get('storeId'));
368
 		$('#ITP_FORM_RTNMNG01010_DETAIL_STORE_ID').val(fn_make_user_info.get('storeId'));
327
-		$('#ITP_FORM_RTNMNG01010_DETAIL_PCH_REQ_NM').val('');
328
 		$('#ITP_FORM_RTNMNG01010_DETAIL_NOTE').val('');
369
 		$('#ITP_FORM_RTNMNG01010_DETAIL_NOTE').val('');
370
+		
329
 		var now = new Date();
371
 		var now = new Date();
330
 		$('#ITP_TAB_RTNMNG01010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
372
 		$('#ITP_TAB_RTNMNG01010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
331
-		$('#ITP_FORM_RTNMNG01010_DETAIL_DLV_REQ_DT').datepicker('setDate', new Date(now.setDate(now.getDate() + 5)));
332
-		
373
+		$('#ITP_FORM_RTNMNG01010_DETAIL_COL_REQ_DT').datepicker('setDate', new Date(now.setDate(now.getDate() + 5)));
333
 		
374
 		
334
 		this.load();  //==>dwkim 초기화 하여 다시 초기 데이타 가져와 뿌려줌
375
 		this.load();  //==>dwkim 초기화 하여 다시 초기 데이타 가져와 뿌려줌
335
 		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
376
 		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
@@ -341,32 +382,15 @@ let createObj = {
341
 			
382
 			
342
 			const formId = '#ITP_FORM_RTNMNG01010_DETAIL';
383
 			const formId = '#ITP_FORM_RTNMNG01010_DETAIL';
343
 			itp_fn_form_clear_validate(null, formId);
384
 			itp_fn_form_clear_validate(null, formId);
344
-			$('#ITP_FORM_RTNMNG01010_DETAIL_PCH_REQ_ST_CD').val(arg);
385
+			$('#ITP_FORM_RTNMNG01010_DETAIL_RTN_REQ_ST_CD').val(arg);
345
 			
386
 			
346
-			//정산 타입이 무정산이면 스킵
347
-			var loanDvsn = $('#ITP_FORM_RTNMNG01010_DETAIL_LOAN_DVSN').val();
348
-			
349
-			if (loanDvsn != null && loanDvsn != "") {
350
-				
351
-				if (loanDvsn != 'LD03' && arg == 'PR20' ) {
352
-					var pchActAtm = $('#ITP_FORM_RTNMNG01010_DETAIL .fnPchActAmt').text();
353
-					var pchReqAtm = $('#ITP_FORM_RTNMNG01010_DETAIL .fnPchReqAmt').text();
354
-					
355
-					if (parseInt(pchActAtm) < parseInt(pchReqAtm)) {
356
-						alert(ITP_MSG_LOCALE.message.ajax.lackReqAmt);
357
-						return;
358
-					}
359
-				}    
360
-			}        
361
-
362
 			if (itp_fn_form_event.isValid(formId)) {
387
 			if (itp_fn_form_event.isValid(formId)) {
363
 				// 품목대상 정보 확인 필요
388
 				// 품목대상 정보 확인 필요
364
 				var records = $(RTNMNG01010_DETAIL_GRID_ID).getGridParam('reccount');
389
 				var records = $(RTNMNG01010_DETAIL_GRID_ID).getGridParam('reccount');
365
 				if (records == 0) {
390
 				if (records == 0) {
366
-						alert( "요청할 품목내역이 없습니다.");
367
-						return ;
368
-				}
369
-				
391
+					alert( "요청할 품목내역이 없습니다.");
392
+					return ;
393
+				}				
370
 				
394
 				
371
 				var saveReq = {
395
 				var saveReq = {
372
 				callBack: function(args) {
396
 				callBack: function(args) {
@@ -387,14 +411,14 @@ let createObj = {
387
 									gridDeleteData.push(value);
411
 									gridDeleteData.push(value);
388
 								}
412
 								}
389
 							}
413
 							}
390
-						});
391
-						
414
+						});						
392
 						
415
 						
393
 						let param = $(formId).serializeObject();
416
 						let param = $(formId).serializeObject();
394
 						param.gridInsertData = gridInsertData;
417
 						param.gridInsertData = gridInsertData;
395
 						param.gridUpdateData = gridUpdateData;
418
 						param.gridUpdateData = gridUpdateData;
396
 						param.gridDeleteData = gridDeleteData;
419
 						param.gridDeleteData = gridDeleteData;
397
 						console.log(JSON.stringify(param));
420
 						console.log(JSON.stringify(param));
421
+						
398
 						var searhFn = function() {
422
 						var searhFn = function() {
399
 							createObj.newinit();
423
 							createObj.newinit();
400
 						};
424
 						};
@@ -406,35 +430,27 @@ let createObj = {
406
 				} else {
430
 				} else {
407
 					itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.tmpSave, saveReq, null);
431
 					itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.tmpSave, saveReq, null);
408
 				}
432
 				}
409
-				
410
-				
411
-				
412
 			}
433
 			}
413
 		}
434
 		}
414
 	},
435
 	},
415
 	load: function() {
436
 	load: function() {
416
-		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
437
+		const key = {brandId:fn_make_user_info.get('brandId'), storeId:fn_make_user_info.get('storeId')};
417
 		fn_ajax_call(API_DETAIL_INIT_INFO, key, this.callback, 'GET');
438
 		fn_ajax_call(API_DETAIL_INIT_INFO, key, this.callback, 'GET');
418
 	},
439
 	},
419
 	callback: function(result) {
440
 	callback: function(result) {
420
-
421
 		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_VIEW_CD').val('C');
441
 		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_VIEW_CD').val('C');
422
 
442
 
423
 		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_BRAND_ID').val(result.brandId);
443
 		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_BRAND_ID').val(result.brandId);
424
-		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_STORE_ID').val(result.storeId);
425
-		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_LOAN_DVSN').val(result.loanDvsn);
426
-		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_LOAN_MGNT_UNQ_NO').val(result.loanMgntUnqNo);
427
-		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_PCH_REQ_DVSN').val(result.pchReqDvsn);
428
-		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_WHS_ID').val(result.whsId);
429
-		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_WHS_NM').val(result.whsNm);
430
-		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_LOCATION').val(result.location);
431
-		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_LOCATION_NM').val(result.locationNm);
444
+		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_STORE_ID').val(result.storeId);		
445
+		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_REQ_DEPT').val(result.reqDept);
446
+		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_AUTH_TP_CD').val(result.authTpCd);
447
+		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_WHS_DVSN').val(result.whsDvsn);
448
+		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_RTN_WHS_ID').val(result.rtnWhsId);
449
+		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_RTN_WHS_NM').val(result.rtnWhsNm);
450
+		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_RTN_LOCATION').val(result.rtnLocation);
451
+		$('#ITP_FORM_RTNMNG01010_DETAIL #ITP_FORM_RTNMNG01010_DETAIL_RTN_LOCATION_NM').val(result.rtnLocationNm);
452
+		
432
 		$('#ITP_FORM_RTNMNG01010_DETAIL .fnBrandNm').text(result.brandNm);
453
 		$('#ITP_FORM_RTNMNG01010_DETAIL .fnBrandNm').text(result.brandNm);
433
-		$('#ITP_FORM_RTNMNG01010_DETAIL .fnPchReqDept').text(result.reqDept);
434
-		$('#ITP_FORM_RTNMNG01010_DETAIL .fnPchReqMgrNm').text(result.userNm);
435
-		$('#ITP_FORM_RTNMNG01010_DETAIL .fnPchReqAmt').text("0");
436
-		$('#ITP_FORM_RTNMNG01010_DETAIL .fnLoanDvsnNm').text(result.loanDvsnNm);
437
-		$('#ITP_FORM_RTNMNG01010_DETAIL .fnPchActAmt').text(result.ordUseAmt);		
438
 
454
 
439
 		pageObj.grid.init();
455
 		pageObj.grid.init();
440
 	}
456
 	}