Ver código fonte

미납금관리 개발중

marseyes 2 anos atrás
pai
commit
8d636c7400

+ 69 - 0
src/main/webapp/app/loanmng/LOANMNG03010.html

@@ -5,6 +5,8 @@
5 5
 				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i><strong>미납금관리</strong></h2>
6 6
 				<div class="pull-right itp_cicon">
7 7
 					<button type="button" id="ITP_BTN_LOANMNG03010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;조회&nbsp;&nbsp;</button>
8
+					<button type="button" id="ITP_BTN_LOANMNG03010_PAYMENT" class="btn btn-success btn-sm SAB"><i class="glyphicon"></i>&nbsp;&nbsp;결제&nbsp;&nbsp;</button>
9
+					<button type="button" id="ITP_BTN_LOANMNG03010_CANCELLIST" class="btn btn-warning btn-sm PRB"><i class="glyphicon"></i>&nbsp;&nbsp;취소/목록&nbsp;&nbsp;</button>
8 10
 				</div>				
9 11
 			</div>
10 12
 			<div class="itp_det_in">
@@ -50,6 +52,73 @@
50 52
 						</div>
51 53
 					</div>
52 54
 				</div>
55
+				<div id="ITP_AJAX_LOANMNG03010_VIEW_CONTAINER">
56
+				    <div class="itp_form itp_type1 fix">
57
+				        <div class="col-xs-12">
58
+				            <form id="ITP_FORM_LOANMNG03010_VIEW" class="form-horizontal">
59
+				                <input type="hidden" id="ITP_FORM_LOANMNG03010_VIEW_VIEW_CD" name="viewCd" value="C">
60
+				                <input type="hidden" id="ITP_FORM_LOANMNG03010_VIEW_BRAND_ID" name="brandId" value="">
61
+				                <input type="hidden" id="ITP_FORM_LOANMNG03010_VIEW_STORE_ID" name="storeId" value="">
62
+				                <input type="hidden" id="ITP_FORM_LOANMNG03010_VIEW_STTL_MGNT_UNQ_NO" name="sttlMgntUnqNo" value="">
63
+				    
64
+				                <section class="itp_form_sec">
65
+				                    <h4 class="itp_form_tit">정산 상세정보</h4>
66
+				                    <div class="itp_form_in">
67
+				                        <div class="form-group">
68
+				                            <label class="col-xs-2 itp_lb">브랜드</label>
69
+				                                <div class="col-xs-4 itp_ip">
70
+				                                    <div class="col-xs-9 itp_in fnBrandNm"></div>												
71
+				                                </div>
72
+				                            <label class="col-xs-2 itp_lb">매장</label>
73
+				                            <div class="col-xs-4 itp_ip">
74
+				                                <div class="col-xs-8 itp_in fnStoreNm"></div>
75
+				                            </div>
76
+				                        </div>
77
+				                        <div class="form-group">
78
+				                            <label class="col-xs-2 itp_lb">정산요청일자</label>
79
+				                            <div class="col-xs-4 itp_ip">
80
+				                                <div class="col-xs-8 itp_in fnSttlReqDt"></div>
81
+				                            </div>
82
+				                            <label class="col-xs-2 itp_lb">정산상태</label>
83
+				                            <div class="col-xs-4 itp_ip">
84
+				                                <div class="col-xs-8 itp_in fnSttlStNm"></div>
85
+				                            </div>
86
+				                        </div>
87
+				                        <div class="form-group">
88
+				                            <label class="col-xs-2 itp_lb">정산요청금액</label>
89
+				                            <div class="col-xs-4 itp_ip">
90
+				                                <div class="col-xs-8 itp_in fnSttlReqAmt"></div>
91
+				                            </div>
92
+				                            <label class="col-xs-2 itp_lb">잔금</label>
93
+				                            <div class="col-xs-4 itp_ip">
94
+				                                <div class="col-xs-8 itp_in fnAcctBal"></div>
95
+				                            </div>
96
+				                        </div>
97
+				                        <div class="form-group">
98
+				                            <label class="col-xs-2 itp_lb">등록일</label>
99
+				                            <div class="col-xs-4 itp_ip">
100
+				                                <div class="col-xs-5 itp_in fnSysRegDttm"></div>
101
+				                            </div>
102
+				                            <label class="col-xs-2 itp_lb">등록자</label>
103
+				                            <div class="col-xs-4 itp_ip fnSysRegNm"></div>
104
+				                        </div>
105
+				                    </div>
106
+				                </section>								
107
+				            </form>
108
+				        </div>
109
+				    </div>
110
+				    <div class="itp_table fix">
111
+					    <div class="itp_table_head fix" style="background:#f5f5f5;">
112
+					        <h4 class="itp_table_tit">정산 대상 내역</h4>
113
+					    </div>
114
+					    <div id="ITP_LOANMNG03010_VIEW_jqGrid_list" class="itp_tb_list">
115
+					        <div id="ITP_LOANMNG03010_VIEW_jqGridView" class="itp_views fix"></div>
116
+					        <table id="ITP_LOANMNG03010_VIEW_jqGrid"></table>
117
+					        <div id="ITP_LOANMNG03010_VIEW_jqGridPager"></div>
118
+					        <div id="ITP_LOANMNG03010_VIEW_jqGridEmpty" class="itp_no_data"></div>
119
+					    </div>
120
+					</div>
121
+				</div>					
53 122
 			</div>
54 123
 		</article>
55 124
 	</div>

+ 105 - 400
src/main/webapp/js/app/loanmng/ITP_LOANMNG03010.js

@@ -8,7 +8,6 @@
8 8
  * let viewObj = {}			: 상세화면 Object			*
9 9
  * let modifyObj = {}		: 수정화면 Object			*
10 10
  * let createObj = {}		: 신규화면 Object			*
11
- * let locInfoObj = {}		: 로케이션정보 Object				*
12 11
  *******************************************************/
13 12
 
14 13
 /*화면 변수*/
@@ -119,54 +118,108 @@ const gridColModel = {
119 118
 			label: ITP_MSG_LOCALE.label.viewCd,
120 119
 			width: '10', fixed: false, align: 'center',
121 120
 			sortable: false, hidden: true
121
+		},
122
+		{
123
+			index: 'STTL_MGNT_DTL_NO', name: 'sttlMgntDtlNo',
124
+			label: '정산관리상세번호',
125
+			width: '10', fixed: false, align: 'center',
126
+			sortable: false, hidden: true
122 127
 		},		
123 128
 		{
124
-			index: 'LOCATION', name: 'location',
125
-			label: "로케이션",
129
+			index: 'BRAND_NM', name: 'brandNm',
130
+			label: "브랜드",
126 131
 			width: '10', fixed: false, align: 'center',
127
-			sortable: false, editable: false, edittype: 'text',
128
-			editrules: {required: true}
132
+			sortable: false, hidden: true
129 133
 		},
130 134
 		{
131
-			index: 'LOCATION_NM', name: 'locationNm',
132
-			label: "로케이션명",
133
-			width: '12', fixed: false, align: 'center',
134
-			sortable: true, editable: false, edittype: 'text',
135
-			editrules: {required: true}
135
+			index: 'STORE_NM', name: 'storeNm',
136
+			label: "매장명",
137
+			width: '10', fixed: false, align: 'center',
138
+			sortable: false, hidden: true
136 139
 		},
137 140
 		{
138
-			index: 'STCK_DVSN_NM', name: 'stckDvsnNm',
139
-			label: "관리등록",
141
+			index: 'ITEM_ID', name: 'itemId',
142
+			label: "품목코드",
140 143
 			width: '10', fixed: false, align: 'center',
141 144
 			sortable: false, editable: false, edittype: 'text'
142 145
 		},
143 146
 		{
144
-			index: 'LOC_ST_NM', name: 'locStNm',
145
-			label: "상태",
147
+			index: 'ITEM_NM', name: 'itemNm',
148
+			label: "품목명",
146 149
 			width: '10', fixed: false, align: 'center',
147 150
 			sortable: false, editable: false, edittype: 'text'
148
-		}
149
-	],
150
-	detail: [
151
+		},
151 152
 		{
152
-			index: 'VIEW_CD', name: 'viewCd',
153
-			label: ITP_MSG_LOCALE.label.viewCd,
154
-			width: '10', fixed: false, align: 'center',
155
-			sortable: false, hidden: true
153
+			index: 'UNIT', name: 'unit',
154
+			label: "단위",
155
+			width: '8', fixed: false, align: 'center',
156
+			sortable: false, editable: false, edittype: 'text'
156 157
 		},
157 158
 		{
158
-			index: 'LOCATION', name: 'location',
159
-			label: "로케이션",
160
-			width: '10', fixed: false, align: 'center',
161
-			sortable: false, editable: true, edittype: 'text',
162
-			editrules: {required: false}
159
+			index: 'UNIT_AMT', name: 'unitAmt',
160
+			label: "단가",
161
+			width: '8', fixed: false, align: 'center',
162
+			sortable: false, editable: false, edittype: 'text', 
163
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
164
+		},
165
+		{
166
+			index: 'PODR_QTY', name: 'podrQty',
167
+			label: "발주수량",
168
+			width: '8', fixed: false, align: 'center',
169
+			sortable: false, editable: false, edittype: 'text', 
170
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
171
+		},
172
+		{
173
+			index: 'DLV_QTY', name: 'dlvQty',
174
+			label: "납품수량",
175
+			width: '8', fixed: false, align: 'center',
176
+			sortable: false, editable: false, edittype: 'text', 
177
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
178
+		},
179
+		{
180
+			index: 'WHS_COL_QTY', name: 'whsColQty',
181
+			label: "입고/수거수량",
182
+			width: '8', fixed: false, align: 'center',
183
+			sortable: false, editable: false, edittype: 'text', 
184
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
185
+		}, 
186
+		{
187
+			index: 'WHS_COL_DT', name: 'whsColDt',
188
+			label: "입고/수거일자",
189
+			width: '8', fixed: false, align: 'center',
190
+			sortable: false, editable: false, edittype: 'text'
191
+		},
192
+		{
193
+			index: 'WHS_COL_AMT', name: 'whsColAmt',
194
+			label: "입고/수거금액",
195
+			width: '8', fixed: false, align: 'center',
196
+			sortable: false, editable: false, edittype: 'text', 
197
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
198
+		},
199
+		{
200
+			index: 'STTL_REQ_AMT', name: 'sttlReqAmt',
201
+			label: "정산금액",
202
+			width: '8', fixed: false, align: 'center',
203
+			sortable: false, editable: false, edittype: 'text', 
204
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
163 205
 		},
164 206
 		{
165
-			index: 'LOCATION_NM', name: 'locationNm',
166
-			label: "로케이션명",
167
-			width: '12', fixed: false, align: 'center',
168
-			sortable: false, editable: true, edittype: 'text',
169
-			editrules: {required: true}
207
+			index: 'STTL_DVSN_NM', name: 'sttlDvsnNm',
208
+			label: "정산구분",
209
+			width: '8', fixed: false, align: 'center',
210
+			sortable: false, editable: false, edittype: 'text'
211
+		},
212
+		{
213
+			index: 'PODR_UNQ_NO', name: 'podrUnqNo',
214
+			label: "발주번호",
215
+			width: '8', fixed: false, align: 'center',
216
+			sortable: false, editable: false, edittype: 'text'
217
+		},
218
+		{
219
+			index: 'PODR_DTL_NO', name: 'podrDtlNo',
220
+			label: "발주항번",
221
+			width: '8', fixed: false, align: 'center',
222
+			sortable: false, editable: false, edittype: 'text'
170 223
 		}
171 224
 	]
172 225
 };
@@ -184,7 +237,6 @@ let pageObj = {
184 237
 	init: function () {
185 238
 		this.ui.init();
186 239
 		this.event.init();
187
-		locInfoObj.init();
188 240
 	},
189 241
 	ui: {
190 242
 		init: function () {
@@ -230,16 +282,8 @@ let pageObj = {
230 282
 				$(this).on('click', function() {
231 283
 					switch (id) {
232 284
 						case 'ITP_BTN_LOANMNG03010_SRH'				: listObj.button.search();		break;	// 조회 버튼 클릭
233
-						case 'ITP_BTN_LOANMNG03010_NEWREG'				: listObj.button.create(); 		break;	// 신규등록 버튼
234
-						case 'ITP_BTN_LOANMNG03010_MODIFY'				: modifyObj.button.modify();	break;	// 수정 버튼
235
-						case 'ITP_BTN_LOANMNG03010_CANCELLIST'			: createObj.button.cancel(); 	break;	// 취소/목록 버튼
236
-						case 'ITP_BTN_LOANMNG03010_DELETE'				: 								break;	// 삭제 버튼
237
-						case 'ITP_BTN_LOANMNG03010_SAVE'				: createObj.button.save(); 		break;	// 저장 버튼
238
-						case 'ITP_BTN_LOANMNG03010_DETAIL_ADDROW'		: locInfoObj.button.addRow();	break;	// 상세:추가버튼
239
-						case 'ITP_BTN_LOANMNG03010_DETAIL_DELROW'		: locInfoObj.button.delRow();	break;	// 상세:삭제버튼
240
-						case 'ITP_BTN_LOANMNG03010_DETAIL_ADDRESS_SEARCH'		: createObj.button.address();	break;	// 신규등록 주소 찾기
241
-						case 'ITP_BTN_LOANMNG03010_SEARCH_SRH'			: createObj.button.popupStore();	break;	// 매장선택 팝업
242
-						case 'ITP_BTN_LOANMNG03010_SEARCH_MODIFY'		: createObj.button.eraseStore();	break;	// 매장선택 삭제
285
+						case 'ITP_BTN_LOANMNG03010_CANCELLIST'			: viewObj.button.cancel(); 	break;	// 취소/목록 버튼
286
+						case 'ITP_BTN_LOANMNG03010_PAYMENT'				: viewObj.button.payment();	break;	// 결제 버튼
243 287
 					}
244 288
 				});
245 289
 			});
@@ -258,7 +302,7 @@ let pageObj = {
258 302
 			$('#ITP_BTN_LOANMNG03010_MODIFY').hide();
259 303
 			$('#ITP_BTN_LOANMNG03010_CANCELLIST').hide();
260 304
 			$('#ITP_BTN_LOANMNG03010_DELETE').hide();
261
-			$('#ITP_BTN_LOANMNG03010_SAVE').hide();
305
+			$('#ITP_BTN_LOANMNG03010_PAYMENT').hide();
262 306
 			
263 307
 			fn_show_btn_auth('#ITP_BTN_LOANMNG03010_SRH');
264 308
 			fn_show_btn_auth('#ITP_BTN_LOANMNG03010_NEWREG');
@@ -266,62 +310,13 @@ let pageObj = {
266 310
 			$('#ITP_AJAX_LOANMNG03010_LIST_CONTAINER').show();
267 311
 			$('#ITP_AJAX_LOANMNG03010_DETAIL_CONTAINER').hide();
268 312
 			$('#ITP_AJAX_LOANMNG03010_VIEW_CONTAINER').hide();
269
-		} else if(mode == 'ADD') { // 등록
270
-			ITP_FORM_LOANMNG03010_DETAIL_IS_DUPLICATE = true;
271
-
272
-			$('#ITP_BTN_LOANMNG03010_SRH').hide();
273
-			$('#ITP_BTN_LOANMNG03010_MODIFY').hide();
274
-			$('#ITP_BTN_LOANMNG03010_NEWREG').hide();
275
-			$('#ITP_BTN_LOANMNG03010_DELETE').hide();
276 313
 			
277
-			fn_show_btn_auth('#ITP_BTN_LOANMNG03010_CANCELLIST');
278
-			fn_show_btn_auth('#ITP_BTN_LOANMNG03010_SAVE');
279
-
280
-			$('#ITP_AJAX_LOANMNG03010_LIST_CONTAINER').hide();
281
-			$('#ITP_AJAX_LOANMNG03010_DETAIL_CONTAINER').show();
282
-			$('#ITP_AJAX_LOANMNG03010_VIEW_CONTAINER').hide();
283
-
284
-			$('#ITP_FORM_LOANMNG03010_DETAIL_VIEW_CD').val('C');
285
-			$('#ITP_FORM_LOANMNG03010_DETAIL_BRAND_ID').val(fn_make_user_info.get('brandId'));
286
-			$('#ITP_FORM_LOANMNG03010_DETAIL .fnBrandNm').text(fn_make_user_info.get('brandNm'));
287
-			$('#ITP_FORM_LOANMNG03010_DETAIL .fnWhsId').text('');
288
-			$('#ITP_FORM_LOANMNG03010_DETAIL .fnRegDtm').text('');
289
-			$('#ITP_FORM_LOANMNG03010_DETAIL_STORE_ID').val('');
290
-			$('#ITP_FORM_LOANMNG03010_DETAIL_WHS_ID').val('');
291
-			$('#ITP_FORM_LOANMNG03010_DETAIL_WHS_ST_CD').val('');
292
-			$('#ITP_FORM_LOANMNG03010_DETAIL_WHS_NM').val('');
293
-			$('#ITP_FORM_LOANMNG03010_DETAIL_MGR_TEL_NO').val('');
294
-			$('#ITP_FORM_LOANMNG03010_DETAIL_MGR_NM').val('');
295
-			$('#ITP_FORM_LOANMNG03010_DETAIL_STORE_NM').val('');
296
-			$('#ITP_FORM_LOANMNG03010_DETAIL_ZIPNO').val('');
297
-			$('#ITP_FORM_LOANMNG03010_DETAIL_ADRES').val('');
298
-			$('#ITP_FORM_LOANMNG03010_DETAIL_ADRES_DTL').val('');
299
-			
300
-		} else if(mode == 'MODIFY') { // 수정
301
-			$('#ITP_BTN_LOANMNG03010_SRH').hide();
302
-			$('#ITP_BTN_LOANMNG03010_MODIFY').hide();
303
-			$('#ITP_BTN_LOANMNG03010_NEWREG').hide();
304
-			$('#ITP_BTN_LOANMNG03010_DELETE').hide();
305
-			fn_show_btn_auth('#ITP_BTN_LOANMNG03010_CANCELLIST');
306
-			fn_show_btn_auth('#ITP_BTN_LOANMNG03010_SAVE');
307
-			fn_show_btn_auth('#ITP_BTN_LOANMNG03010_RESET_PW');
308
-
309
-			$('#ITP_AJAX_LOANMNG03010_LIST_CONTAINER').hide();
310
-			$('#ITP_AJAX_LOANMNG03010_DETAIL_CONTAINER').show();
311
-			$('#ITP_AJAX_LOANMNG03010_VIEW_CONTAINER').hide();
312
-			// $('#ITP_FORM_LOANMNG03010_DETAIL_USER_ID').attr('readonly', true);
313
-			// $('#ITP_FORM_LOANMNG03010_DETAIL_DUP').attr('disabled', true);
314
-			$('#ITP_FORM_LOANMNG03010_DETAIL_SEARCH_AFFL_SHOP_NM').attr('readonly', true);
315
-
316
-			$('#ITP_FORM_LOANMNG03010_DETAIL_SEARCH_AFFL_SHOP').hide();
317
-			$('#ITP_FORM_LOANMNG03010_DETAIL_DELETE_AFFL_SHOP').hide();
318 314
 		} else if(mode == 'VIEW') { // 보기
319 315
 			$('#ITP_BTN_LOANMNG03010_SRH').hide();
320 316
 			$('#ITP_BTN_LOANMNG03010_NEWREG').hide();
321 317
 			$('#ITP_BTN_LOANMNG03010_DELETE').hide();
322
-			$('#ITP_BTN_LOANMNG03010_SAVE').hide();
323 318
 			
324
-			fn_show_btn_auth('#ITP_BTN_LOANMNG03010_MODIFY');
319
+			fn_show_btn_auth('#ITP_BTN_LOANMNG03010_PAYMENT');
325 320
 			fn_show_btn_auth('#ITP_BTN_LOANMNG03010_CANCELLIST');
326 321
 
327 322
 			$('#ITP_AJAX_LOANMNG03010_LIST_CONTAINER').hide();
@@ -440,6 +435,14 @@ let viewObj = {
440 435
 	init: function (param) {
441 436
 		this.load(param);
442 437
 	},
438
+	button: {
439
+		cancel: function() {
440
+			listObj.grid.search();
441
+		},
442
+		payment: function() {
443
+			
444
+		}
445
+	}, 
443 446
 	load: function(param) {
444 447
 		fn_ajax_call(UNPAID_MNG_INFO_UNPAID, param, this.callback, 'GET');
445 448
 	},
@@ -448,14 +451,19 @@ let viewObj = {
448 451
 		pageObj.switchScreen('VIEW');
449 452
 		$('#ITP_FORM_LOANMNG03010_VIEW #ITP_FORM_LOANMNG03010_VIEW_BRAND_ID').val(result.brandId);
450 453
 		$('#ITP_FORM_LOANMNG03010_VIEW #ITP_FORM_LOANMNG03010_VIEW_STORE_ID').val(result.storeId);
451
-		$('#ITP_FORM_LOANMNG03010_VIEW #ITP_FORM_LOANMNG03010_VIEW_WHS_ID').val(result.whsId);
454
+		$('#ITP_FORM_LOANMNG03010_VIEW #ITP_FORM_LOANMNG03010_VIEW_STTL_MGNT_UNQ_NO').val(result.sttlMgntUnqNo);
452 455
 		
453 456
 		$('#ITP_FORM_LOANMNG03010_VIEW .fnBrandNm').text(result.brandNm);
454
-		$('#ITP_FORM_LOANMNG03010_VIEW .fnStCd').text(result.whsStNm);
455
-		$('#ITP_FORM_LOANMNG03010_VIEW .fnWhsId').text(result.whsId);
457
+		$('#ITP_FORM_LOANMNG03010_VIEW .fnStoreNm').text(result.storeNm);
458
+		$('#ITP_FORM_LOANMNG03010_VIEW .fnSttlReqDt').text(result.sttlReqDt);
459
+		$('#ITP_FORM_LOANMNG03010_VIEW .fnSttlStNm').text(result.sttlStNm);
460
+		$('#ITP_FORM_LOANMNG03010_VIEW .fnSysRegDttm').text(result.sysRegDttm);
461
+		$('#ITP_FORM_LOANMNG03010_VIEW .fnSysRegNm').text(result.sysRegNm);
462
+		$('#ITP_FORM_LOANMNG03010_VIEW .fnSttlReqAmt').text(itp_fn_number_comma(result.sttlReqAmt));
463
+		$('#ITP_FORM_LOANMNG03010_VIEW .fnAcctBal').text(itp_fn_number_comma(result.acctBal));
456 464
 
457 465
 		// 리스트 조회
458
-		// viewObj.grid.init();
466
+		viewObj.grid.init();
459 467
 	},
460 468
 	grid: {
461 469
 		init: function() {
@@ -516,306 +524,3 @@ let viewObj = {
516 524
 		}
517 525
 	}
518 526
 };
519
-
520
-/*수정화면 Object*/
521
-let modifyObj = {
522
-	init: function () {
523
-	},
524
-	button: {
525
-		modify: function (param) {
526
-			itp_fn_form_clear_validate(null, '#ITP_FORM_LOANMNG03010_DETAIL');
527
-			const brandIdVal = $('#ITP_FORM_LOANMNG03010_VIEW_BRAND_ID').val();
528
-			const whsIdVal = $('#ITP_FORM_LOANMNG03010_VIEW_WHS_ID').val();
529
-			const key = {brandId: brandIdVal, whsId: whsIdVal, storeId: '', viewCd: 'R'};
530
-			var param = $.param(key);
531
-			modifyObj.load(param);
532
-		}
533
-	},
534
-	load: function(param) {
535
-		fn_ajax_call(UNPAID_MNG_INFO_UNPAID, param, this.callback, 'GET');
536
-	},
537
-	callback: function (result) {
538
-		// console.log(result);
539
-		pageObj.switchScreen('MODIFY');
540
-		$('#ITP_FORM_LOANMNG03010_DETAIL #ITP_FORM_LOANMNG03010_DETAIL_VIEW_CD').val('U');
541
-		$('#ITP_FORM_LOANMNG03010_DETAIL #ITP_FORM_LOANMNG03010_DETAIL_BRAND_ID').val(result.brandId);
542
-		$('#ITP_FORM_LOANMNG03010_DETAIL #ITP_FORM_LOANMNG03010_DETAIL_STORE_ID').val(result.storeId);
543
-		$('#ITP_FORM_LOANMNG03010_DETAIL #ITP_FORM_LOANMNG03010_DETAIL_WHS_ID').val(result.whsId);
544
-				
545
-		$('#ITP_FORM_LOANMNG03010_DETAIL .fnBrandNm').text(result.brandNm);
546
-		$('#ITP_FORM_LOANMNG03010_DETAIL .fnWhsId').text(result.whsId);
547
-		$('#ITP_FORM_LOANMNG03010_DETAIL .fnRegDtm').text(result.sysRegDttm);
548
-		
549
-		$('#ITP_FORM_LOANMNG03010_DETAIL #ITP_FORM_LOANMNG03010_DETAIL_WHS_ST_CD').val(result.whsStCd);
550
-		$('#ITP_FORM_LOANMNG03010_DETAIL #ITP_FORM_LOANMNG03010_DETAIL_WHS_NM').val(result.whsNm);
551
-		$('#ITP_FORM_LOANMNG03010_DETAIL #ITP_FORM_LOANMNG03010_DETAIL_WHS_NM').val(result.whsNm);
552
-		$('#ITP_FORM_LOANMNG03010_DETAIL #ITP_FORM_LOANMNG03010_DETAIL_MGR_TEL_NO').val(result.mgrTelNo);
553
-		$('#ITP_FORM_LOANMNG03010_DETAIL #ITP_FORM_LOANMNG03010_DETAIL_MGR_NM').val(result.mgrNm);
554
-		$('#ITP_FORM_LOANMNG03010_DETAIL #ITP_FORM_LOANMNG03010_DETAIL_STORE_NM').val(result.storeNm);
555
-		$('#ITP_FORM_LOANMNG03010_DETAIL #ITP_FORM_LOANMNG03010_DETAIL_ZIPNO').val(result.zipNo);
556
-		$('#ITP_FORM_LOANMNG03010_DETAIL #ITP_FORM_LOANMNG03010_DETAIL_ADRES').val(result.addr1);
557
-		$('#ITP_FORM_LOANMNG03010_DETAIL #ITP_FORM_LOANMNG03010_DETAIL_ADRES_DTL').val(result.addr2);
558
-		
559
-		kakaoMap.init('ITP_FORM_LOANMNG03010_DETAIL', $('#ITP_FORM_LOANMNG03010_DETAIL #ITP_FORM_LOANMNG03010_DETAIL_ADRES').val());
560
-		
561
-		// 권한정보 리스트 조회
562
-		modifyObj.grid.init();
563
-	},
564
-	grid: {
565
-		init: function() {
566
-			this.unload();
567
-			this.load();
568
-		},
569
-		load : function() {
570
-			let param = $('#ITP_FORM_LOANMNG03010_DETAIL').serializeObject();
571
-			param.gridSize = $.jgrid.defaults.rowNum;
572
-			param.pagingYn = false; // 페이지안함
573
-
574
-			var option = {
575
-				gridId: LOANMNG03010_DETAIL_GRID_ID,
576
-				colModel: gridColModel.detail,
577
-				param: JSON.stringify(param),
578
-				url: DOMAIN + UNPAID_MNG_STL_GRID_LIST,
579
-				pager: LOANMNG03010_DETAIL_GRID_PAGER,
580
-				multiselect: true,
581
-				onCellSelect: function(rowId, cellIdx, cellValue) {
582
-					LOANMNG03010_DETAIL_GRID_LAST_ROW_ID = itp_fn_set_data_editable(rowId, cellIdx, LOANMNG03010_DETAIL_GRID_LAST_ROW_ID, LOANMNG03010_DETAIL_GRID_ID, ['location']);
583
-		   		},
584
-				loadComplete: function(data) {
585
-					itp_fn_grid_load_complete(data, LOANMNG03010_DETAIL_GRID_ID, true, undefined, 'LOANMNG03010_DETAIL');
586
-				},
587
-				onPaging: function(action) {
588
-					var pagingFn = {
589
-						callBack: function(args) {
590
-							$(args).trigger('reloadGrid');
591
-						}
592
-					};
593
-					if (itp_fn_check_grid_is_writing(LOANMNG03010_DETAIL_GRID_ID)) {
594
-						itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, LOANMNG03010_DETAIL_GRID_ID);
595
-						return 'stop';
596
-					} else {
597
-						itp_fn_grid_paging(LOANMNG03010_DETAIL_GRID_ID, action, param);
598
-					}
599
-				},
600
-				onSortCol: function(index, columnIndex, sortOrder) {
601
-					var sortingFn = {
602
-						callBack: function(args) {
603
-							$(args).trigger('reloadGrid');
604
-						}
605
-					};
606
-					if (itp_fn_check_grid_is_writing(LOANMNG03010_DETAIL_GRID_ID)) {
607
-						itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, LOANMNG03010_DETAIL_GRID_ID);
608
-						return 'stop';
609
-					} else {
610
-						itp_fn_grid_sorting(LOANMNG03010_DETAIL_GRID_ID, index, sortOrder);
611
-					}
612
-				}
613
-			};
614
-			itp_fn_grid_make_remote(option);
615
-		},
616
-		clearData : function() {
617
-			$(LOANMNG03010_DETAIL_GRID_ID).jqGrid('clearGridData', true);
618
-			$(LOANMNG03010_DETAIL_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
619
-			$(LOANMNG03010_DETAIL_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
620
-			$(LOANMNG03010_DETAIL_GRID_EMPTY).show();
621
-		},
622
-		unload : function() {
623
-			$.jgrid.gridUnload(LOANMNG03010_DETAIL_GRID_ID);
624
-		}
625
-	}
626
-};
627
-
628
-/*신규화면 Object*/
629
-let createObj = {
630
-	init: function () {
631
-		kakaoMap.init('ITP_FORM_LOANMNG03010_DETAIL', '');
632
-		this.unload();
633
-		this.load();
634
-	},
635
-	button: {
636
-		cancel: function() {
637
-			listObj.grid.search();
638
-		},
639
-		save: function() {
640
-			var detailViewCd = $('#ITP_FORM_LOANMNG03010_DETAIL_VIEW_CD').val();
641
-			const formId = '#ITP_FORM_LOANMNG03010_DETAIL';
642
-			itp_fn_form_clear_validate(null, formId);
643
-			
644
-			var vali_whsStatCd = itp_fn_form_validate(formId, formId + '_WHS_ST_CD', ['empty'], undefined); // 상태
645
-			var vali_whsNm = itp_fn_form_validate(formId, formId + '_WHS_NM', ['empty'], undefined);
646
-			
647
-			if (vali_whsStatCd && vali_whsNm) {
648
-				let gridInsertData = [];
649
-				let gridUpdateData = [];
650
-				let gridDeleteData = [];
651
-				const rowData = $(LOANMNG03010_DETAIL_GRID_ID).getRowData();
652
-				// const keyValue = $(formId + '_WHS_ID').val();
653
-				$.each(rowData, function(key, value) {
654
-					if (value.viewCd != 'R') {
655
-						// value.whsId = keyValue;
656
-						if (value.viewCd == 'C') {
657
-							gridInsertData.push(value);
658
-						} else if (value.viewCd == 'U') {
659
-							gridUpdateData.push(value);
660
-						} else if (value.viewCd == 'D') {
661
-							gridDeleteData.push(value);
662
-						}
663
-					}
664
-				});
665
-				let param = $(formId).serializeObject();
666
-				param.gridInsertData = gridInsertData;
667
-				param.gridUpdateData = gridUpdateData;
668
-				param.gridDeleteData = gridDeleteData;
669
-				//console.log(JSON.stringify(param));
670
-				var searhFn = function() {
671
-					ITP_FORM_LOANMNG03010_DETAIL_IS_WRITING = false;
672
-					listObj.grid.search();
673
-				};
674
-				fn_ajax_call(detailViewCd == 'C' ? WHS_MNG_ADD_WHS : WHS_MNG_MIDIFY_WHS, JSON.stringify(param), searhFn, 'POST');
675
-			}
676
-		}, 
677
-		address: function() {
678
-			kakaoMap.address('ITP_FORM_LOANMNG03010_DETAIL');
679
-		},
680
-		popupStore: function() { // 매장선택 팝업
681
-			
682
-		}, 
683
-		eraseStore: function() { // 매장선택 삭제
684
-			$('#ITP_FORM_LOANMNG03010_DETAIL_STORE_ID').val('');
685
-			$('#ITP_FORM_LOANMNG03010_DETAIL_STORE_NM').val('');
686
-		}
687
-	},
688
-	load: function () {
689
-		let param = $('#ITP_FORM_LOANMNG03010_DETAIL').serializeObject();
690
-		param.gridSize = $.jgrid.defaults.rowNum;
691
-		param.pagingYn = false; // 페이지안함
692
-
693
-		var option = {
694
-			gridId: LOANMNG03010_DETAIL_GRID_ID,
695
-			colModel: gridColModel.detail,
696
-			param: JSON.stringify(param),
697
-			url: DOMAIN + UNPAID_MNG_STL_GRID_LIST,
698
-			pager: LOANMNG03010_DETAIL_GRID_PAGER,
699
-			multiselect: true,
700
-			loadComplete: function(data) {
701
-				itp_fn_grid_load_complete(data, LOANMNG03010_DETAIL_GRID_ID, true, undefined, 'LOANMNG03010_DETAIL');
702
-			},
703
-			onPaging: function(action) {
704
-				var pagingFn = {
705
-					callBack: function(args) {
706
-						$(args).trigger('reloadGrid');
707
-					}
708
-				};
709
-				if (itp_fn_check_grid_is_writing(LOANMNG03010_DETAIL_GRID_ID)) {
710
-					itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, LOANMNG03010_DETAIL_GRID_ID);
711
-					return 'stop';
712
-				} else {
713
-					itp_fn_grid_paging(LOANMNG03010_DETAIL_GRID_ID, action, param);
714
-				}
715
-			},
716
-			onSortCol: function(index, columnIndex, sortOrder) {
717
-				var sortingFn = {
718
-					callBack: function(args) {
719
-						$(args).trigger('reloadGrid');
720
-					}
721
-				};
722
-				if (itp_fn_check_grid_is_writing(LOANMNG03010_DETAIL_GRID_ID)) {
723
-					itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, LOANMNG03010_DETAIL_GRID_ID);
724
-					return 'stop';
725
-				} else {
726
-					itp_fn_grid_sorting(LOANMNG03010_DETAIL_GRID_ID, index, sortOrder);
727
-				}
728
-			}
729
-		};
730
-		itp_fn_grid_make_remote(option);
731
-	},
732
-	clearData : function() {
733
-		$(LOANMNG03010_DETAIL_GRID_ID).jqGrid('clearGridData', true);
734
-		$(LOANMNG03010_DETAIL_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
735
-		$(LOANMNG03010_DETAIL_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
736
-		$(LOANMNG03010_DETAIL_GRID_EMPTY).show();
737
-	},
738
-	unload : function() {
739
-		$.jgrid.gridUnload(LOANMNG03010_DETAIL_GRID_ID);
740
-	}
741
-};
742
-
743
-/*로케이션정보 Object*/
744
-let locInfoObj = {
745
-	init: function () {
746
-		// if(AUTH_TYPE_CD === '10' || AUTH_TYPE_CD === '20') {
747
-		this.action();
748
-		// } else {
749
-		// this.make();
750
-		// }
751
-	},
752
-	button: {
753
-		addRow: function() {
754
-			// $(LOANMNG03010_DETAIL_GRID_ID).jqGrid('addRow', {position: 'last'});
755
-			// $(LOANMNG03010_DETAIL_GRID_EMPTY).hide();
756
-			LOANMNG03010_DETAIL_GRID_LAST_ROW_ID = itp_fn_add_grid_row(LOANMNG03010_DETAIL_GRID_ID, undefined, ['location'],'LOANMNG03010_DETAIL');
757
-		},
758
-		delRow: function() {
759
-			itp_fn_grid_del_row(LOANMNG03010_DETAIL_GRID_ID);
760
-		}
761
-	},
762
-	make: function() {
763
-		$('#ITP_FORM_LOANMNG03010_SEARCH_AFFL_SHOP').hide();
764
-		$('#ITP_FORM_LOANMNG03010_DELETE_AFFL_SHOP').hide();
765
-		if(AFFL_SHOP_LIST) {
766
-			$('#ITP_FORM_LOANMNG03010_SEARCH_AFFL_SHOP_ID').val(AFFL_SHOP_LIST[0].afflShopId);
767
-			$('#ITP_FORM_LOANMNG03010_SEARCH_AFFL_SHOP_NM').val(AFFL_SHOP_LIST[0].afflShopNm);
768
-		}
769
-		if(AFFL_BRAND_LIST) {
770
-			fn_make_select_brand(AFFL_BRAND_LIST, 'ITP_FORM_LOANMNG03010_SEARCH_BRAND_ID');
771
-		}
772
-	},
773
-	action: function () {
774
-		var _this = this;
775
-		// 로케이션정보 조회 버튼 클릭
776
-		$('#ITP_FORM_LOANMNG03010_SEARCH_AFFL_SHOP').on('click', function() {
777
-			_this.popup('L');
778
-		});
779
-		// 로케이션정보 텍스트 삭제 버튼 클릭
780
-		$('#ITP_FORM_LOANMNG03010_DELETE_AFFL_SHOP').on('click', function() {
781
-			$('#ITP_FORM_LOANMNG03010_SEARCH_AFFL_SHOP_NM').val('');
782
-			$('select#ITP_FORM_LOANMNG03010_SEARCH_BRAND_ID option').remove();
783
-		});
784
-		// 신규등록 로케이션정보 조회 버튼 클릭
785
-		$('#ITP_FORM_LOANMNG03010_DETAIL_SEARCH_AFFL_SHOP').on('click', function() {
786
-			_this.popup('C');
787
-		});
788
-		// 신규등록 로케이션정보 텍스트 삭제 버튼 클릭
789
-		$('#ITP_FORM_LOANMNG03010_DETAIL_DELETE_AFFL_SHOP').on('click', function() {
790
-			$('#ITP_FORM_LOANMNG03010_DETAIL_SEARCH_AFFL_SHOP_NM').val('');
791
-			$('select#ITP_FORM_LOANMNG03010_DETAIL_SEARCH_BRAND_ID option').remove();
792
-		});
793
-	},
794
-	popup: function (view) {
795
-		// 팝업
796
-		var popFn = (view === 'C') ? this.callback.create : this.callback.list;
797
-		fn_call_popup('biz', 'BIZPOP_AFFL_SHOP', '#ITP_ASIDE', popFn, null, 'S');
798
-	},
799
-	callback: {
800
-		list: function(rowDataPop) {
801
-			// console.log(rowDataPop);
802
-			if(rowDataPop.AFFL_SHOP) {
803
-				$('#ITP_FORM_LOANMNG03010_SEARCH_AFFL_SHOP_ID').val(rowDataPop.AFFL_SHOP.afflShopId);
804
-				$('#ITP_FORM_LOANMNG03010_SEARCH_AFFL_SHOP_NM').val(rowDataPop.AFFL_SHOP.afflShopNm);
805
-			}
806
-			if(rowDataPop.AFFL_BRAND) {
807
-				fn_make_select_brand(rowDataPop.AFFL_BRAND, 'ITP_FORM_LOANMNG03010_SEARCH_BRAND_ID', true, '선택');
808
-			}
809
-		},
810
-		create: function(rowDataPop) {
811
-			// console.log(rowDataPop);
812
-			if(rowDataPop.AFFL_SHOP) {
813
-				// $('#ITP_FORM_LOANMNG03010_DETAIL_SEARCH_AFFL_SHOP_ID').val(rowDataPop.AFFL_SHOP.afflShopId);
814
-				// $('#ITP_FORM_LOANMNG03010_DETAIL_SEARCH_AFFL_SHOP_NM').val(rowDataPop.AFFL_SHOP.afflShopNm);
815
-			}
816
-			if(rowDataPop.AFFL_BRAND) {
817
-				fn_make_select_brand(rowDataPop.AFFL_BRAND, 'ITP_FORM_LOANMNG03010_DETAIL_SEARCH_BRAND_ID', true, '선택');
818
-			}
819
-		}
820
-	}
821
-};