Parcourir la source

모바일 입금현황 수정

juney il y a 2 ans
Parent
commit
531ec49d7e
1 fichiers modifiés avec 28 ajouts et 58 suppressions
  1. 28 58
      src/main/webapp/mobile/js/app/mloanmng/ITP_MLOANMNG02010.js

+ 28 - 58
src/main/webapp/mobile/js/app/mloanmng/ITP_MLOANMNG02010.js

@@ -41,7 +41,6 @@ let mobPageObj = {
41 41
 			$('#ITP_FORM_MLOANMNG02010_LIST_SEARCH_FROM_DT').val(itp_fn_date_add('M', -1));
42 42
 			$('#ITP_FORM_MLOANMNG02010_LIST_SEARCH_TO_DT').val(itp_fn_date_add('M', 0));
43 43
 
44
-			console.log(fn_make_user_info.get('authTpCd'));
45 44
 			if(fn_make_user_info.get('authTpCd') === '50') {
46 45
 				$('#ITP_FORM_MLOANMNG02010_LIST_SEARCH #ITP_FORM_MLOANMNG02010_LIST_SEARCH_STORE_NM').val(fn_make_user_info.get('storeNm'));
47 46
 				$('#ITP_FORM_MLOANMNG02010_LIST_SEARCH #ITP_FORM_MLOANMNG02010_LIST_SEARCH_STORE_NM').attr('readonly', true);
@@ -56,15 +55,16 @@ let mobPageObj = {
56 55
 	},
57 56
 	event: {
58 57
 		init: function() {
59
-			this.button();
58
+			this.action();
60 59
 		},
61
-		button: function() {
60
+		action: function() {
62 61
 			$('button[id^="ITP_BTN_MLOANMNG02010_LIST"]').on('click', function() {
63 62
 				var id = $(this).attr('id');
64 63
 				switch (id) {
65 64
 					case 'ITP_BTN_MLOANMNG02010_LIST_SEARCH_RTN_PLACE'	: mobPopObj.popStoreNm.init(); 		break;
66 65
 					case 'ITP_BTN_MLOANMNG02010_LIST_DELETE_RTN_PLACE'	: mobPopObj.popStoreNm.delete(); 	break;
67
-					case 'ITP_BTN_MLOANMNG02010_LIST_ADD'				: mobContentObj.list.add();		break;
66
+					case 'ITP_BTN_MLOANMNG02010_LIST_PAY'				: mobContentObj.list.payment();		break;
67
+					case 'ITP_BTN_MLOANMNG02010_LIST_ADD'				: mobContentObj.list.add();			break;
68 68
 					case 'ITP_BTN_MLOANMNG02010_LIST_SEARCH'			: mobContentObj.list.search();		break;
69 69
 				}
70 70
 				return false;
@@ -73,7 +73,7 @@ let mobPageObj = {
73 73
 			$('button[id^="ITP_BTN_MLOANMNG02010_VIEW"]').on('click', function() {
74 74
 				var id = $(this).attr('id');
75 75
 				switch (id) {
76
-					case 'ITP_BTN_MLOANMNG02010_VIEW_SEARCH'		: mobContentObj.view.history.search();	break;
76
+					case 'ITP_BTN_MLOANMNG02010_VIEW_PAY_REQ'		: mobContentObj.view.payment();		break;
77 77
 					case 'ITP_BTN_MLOANMNG02010_VIEW_CANCEL_LIST'	: mobContentObj.view.cancel();			break;
78 78
 				}
79 79
 				return false;
@@ -86,8 +86,18 @@ let mobPageObj = {
86 86
 				} else if($(e.target).hasClass('RJT')) {
87 87
 					mobContentObj.list.reject(index);
88 88
 				} else {
89
-					// var item = mobContentObj.list.rows[index];
90
-					// mobContentObj.view.init(item);
89
+				}
90
+			});
91
+
92
+			$('select[id^="ITP_FORM_MLOANMNG02010_VIEW_EMAIL_CD"]').on('change', function() {
93
+				var val = $(this).val();
94
+				var emailId = '#ITP_FORM_MLOANMNG02010_VIEW_PAY_EMAIL_NM';
95
+				if(val === '') {
96
+					$(emailId).val('');
97
+					$(emailId).attr('readonly', false);
98
+				} else {
99
+					$(emailId).val($(this).val());
100
+					$(emailId).attr('readonly', true);
91 101
 				}
92 102
 			});
93 103
 
@@ -97,6 +107,7 @@ let mobPageObj = {
97 107
 		}
98 108
 	},
99 109
 	switchScreen: function(mode) {
110
+		this.viewMode = mode;
100 111
 		$('#ITP_MOBILE_MLOANMNG02010').find('div[id$="_CONTAINER"]').each(function(i) {
101 112
 			$(this).hide();
102 113
 		});
@@ -107,7 +118,6 @@ let mobPageObj = {
107 118
 			$('#ITP_AJAX_MLOANMNG02010_VIEW_CONTAINER').show();
108 119
 			this.moreView(false);
109 120
 		}
110
-		this.viewMode = mode;
111 121
 	},
112 122
 	moreView: function(isScroll) {
113 123
 		var _this = this;
@@ -191,6 +201,9 @@ let mobContentObj = {
191 201
 			console.log(JSON.stringify(param));
192 202
 			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
193 203
 		},
204
+		payment: function() {
205
+			mobPageObj.switchScreen(PAGE_MODE_VIEW);
206
+		},
194 207
 		add: function() {
195 208
 			var storeId = $('#ITP_FORM_MLOANMNG02010_LIST_SEARCH_STORE_ID').val();
196 209
 			if(storeId.length < 1) {
@@ -257,62 +270,19 @@ let mobContentObj = {
257 270
 			$(id).find('.fnUseAmtTotal').text(CommonObj.currency.add(result.useAmtTotal));
258 271
 			_this.history.init(result.loanMgntUnqNo);
259 272
 		},
260
-		history: {
261
-			rows: [],
262
-			init: function(loanMgntUnqNo) {
263
-				// 조회일자 지정
264
-				$('#ITP_FORM_MLOANMNG02010_VIEW_SEARCH_FROM_DT').val(itp_fn_date_add('M', -1));
265
-				$('#ITP_FORM_MLOANMNG02010_VIEW_SEARCH_TO_DT').val(itp_fn_date_add('M', 0));
266
-				this.loanMgntUnqNo = loanMgntUnqNo;
267
-				this.search();
268
-			},
269
-			search: function() {
270
-				this.listPage = 0;
271
-				this.totPage = 0;
272
-				this.rows.length = 0;
273
-				$('#ITP_LIST_MLOANMNG02010_LIST_ITEM_ROWS').empty();
274
-				this.load();
275
-			},
276
-			load: function() {
277
-				var _this = this;
278
-				this.isSearch = true;
279
-				var callbackFn = function(result) {
280
-					console.log(result);
281
-					_this.isSearch = false;
282
-					_this.totPage = result.gridTotal;
283
-					$.each(result.gridRows, function (i, item) {
284
-						$('#ITP_LIST_MLOANMNG02010_VIEW_ITEM_AREA .panel-group').append($('#ITP_LIST_MLOANMNG02010_VIEW_ITEM_ROWCOPY').html());
285
-						var $li = $('#ITP_LIST_MLOANMNG02010_VIEW_ITEM_AREA .panel-group > .list-row:last');
286
-						$li.find('.fnLoanRegDt').text(item.loanRegDt);
287
-						$li.find('.fnDpstPayDvsnNm').text(item.dpstPayDvsnNm);
288
-						$li.find('.fnDstpAmt').text(item.dstpAmt);
289
-						$li.find('.fnTrscAfBal').text(item.trscAfBal);
290
-						$li.find('.fnUse').text(item.use);
291
-						_this.rows.push(item);
292
-					});
293
-				};
294
-				var errFn = function() { _this.isSearch = false;};
295
-				const param = $('#ITP_FORM_MLOANMNG02010_VIEW_SEARCH').serializeObject();
296
-				param.gridPage = ++this.listPage;
297
-				param.gridSize = this.listSize;
298
-				param.sloanMgntUnqNo = _this.loanMgntUnqNo;
299
-				param.fromDt = CommonObj.onlyNumber(param.fromDt);
300
-				param.toDt = CommonObj.onlyNumber(param.toDt);
301
-				console.log(JSON.stringify(param));
302
-				fn_ajax_call(API_MOBILE_HISTORY, JSON.stringify(param), callbackFn, 'POST', errFn);
303
-			}
273
+		payment:function() {
274
+			location.replace('app:payment');
304 275
 		},
305 276
 		cancel: function () {
306 277
 			var id = '#ITP_AJAX_MLOANMNG02010_VIEW_CONTAINER';
307 278
 			$(id).find('.fnItemid').text('');
308 279
 			$(id).find('.fnItemNm').text('');
309 280
 			$(id).find('.fnUPodrQty').text('');
310
-			$(id).find('.fnUnitAmt').text('');
311
-			$(id).find('.fnUnit').text('');
312
-			$(id).find('.fnPodrQty').text('');
313
-			$(id).find('.fnPodrAmt').text('');
314
-			$(id).find('.fnDlvReqDt').text('');
315
-			$('#ITP_LIST_MLOANMNG02010_VIEW_ITEM_AREA .panel-group').empty();
281
+			$(id).find('#ITP_FORM_MLOANMNG02010_VIEW_TRSC_AMT').val('');
282
+			$(id).find('#ITP_FORM_MLOANMNG02010_VIEW_MBL_NO').val('');
283
+			$(id).find('#ITP_FORM_MLOANMNG02010_VIEW_PAY_EMAIL_ID').val('');
284
+			$(id).find('#ITP_FORM_MLOANMNG02010_VIEW_PAY_EMAIL_NM').val('');
285
+			$(id).find('#ITP_FORM_MLOANMNG02010_VIEW_EMAIL_CD').val('');
316 286
 			mobPageObj.switchScreen(PAGE_MODE_LIST);
317 287
 		}
318 288
 	}