Browse Source

모바일 디자인 적용

juney 2 years ago
parent
commit
1037c25364

+ 5 - 5
src/main/webapp/mobile/app/mloanmng/MLOANMNG02010.html

@@ -51,8 +51,8 @@
51 51
 		  </div>
52 52
 			<div id="ITP_LIST_MLOANMNG02010_LIST_ITEM_AREA" class="scroll_area row-12">
53 53
 			  <ul id="ITP_LIST_MLOANMNG02010_LIST_ITEM_ROWS" class="mb_0 panel-group"></ul>
54
-			  <div id="ITP_LIST_MLOANMNG02010_LIST_ITEM_ROWCOPY" style="display: block;">
55
-				<li class="history_list_1">
54
+			  <div id="ITP_LIST_MLOANMNG02010_LIST_ITEM_ROWCOPY" style="display: none;">
55
+				<li class="history_list_1 item-row">
56 56
 				  <div class="button_right btn-dpst" style="display: grid;"><!-- display:gird 로 해야 정상으로 보임 -->
57 57
 					<button id="ITP_BTN_MLOANMNG02010_LIST_AGREE" class="btn-primary AGR">승인</button>
58 58
 					<button id="ITP_BTN_MLOANMNG02010_LIST_REJECT" class="btn-danger RJT">반려</button>
@@ -68,7 +68,7 @@
68 68
 					<div class="nomal btn">
69 69
 					  <label class="sub_info">정산타입</label>
70 70
 					  <span>:</span>
71
-					  <div class="fnDpstDt"></div>
71
+					  <div class="fnLoanDvsnNm"></div>
72 72
 					  <label class="col_3">입금금액</label>
73 73
 					  <span>:</span>
74 74
 					  <div class="fnDpstAmt"></div>
@@ -88,10 +88,10 @@
88 88
 					<div class="nomal btn">
89 89
 					  <label class="col_3">승인일자</label>
90 90
 					  <span>:</span>
91
-					  <div class="fnAuthDt"></div>
91
+					  <div class="fnDpstAuthDt"></div>
92 92
 					  <label class="col_3">반려일자</label>
93 93
 					  <span>:</span>
94
-					  <div class="fnRjctDt"></div>
94
+					  <div class="fnDpstRjctDt"></div>
95 95
 					</div>
96 96
 				  </div>
97 97
 				  <div class="left btn_list">

+ 2 - 2
src/main/webapp/mobile/app/mloanmng/MLOANMNG03010.html

@@ -41,7 +41,7 @@
41 41
 			<div id="ITP_LIST_MLOANMNG03010_LIST_ITEM_AREA" class="scroll_area row-13">
42 42
 			  <ul id="ITP_LIST_MLOANMNG03010_LIST_ITEM_ROWS" class="mb_0 panel-group"></ul>
43 43
 			  <div id="ITP_LIST_MLOANMNG03010_LIST_ITEM_ROWCOPY" style="display: none;">
44
-				<li class="history_list7">
44
+				<li class="history_list7 item-row">
45 45
 				  <!-- <div class="left">hidden 처리
46 46
 					<div class="nomal">
47 47
 				      <label class="history_label">정산번호 </label>
@@ -80,7 +80,7 @@
80 80
 						<div class="nomal">
81 81
 							<label class="history_label">정산확정일 </label>
82 82
 							<span>:</span>
83
-							<div class="fnSttlReqDt"></div>
83
+							<div class="fnSttlDt"></div>
84 84
 							<label class="sub_info">미납금액</label>
85 85
 							<span>:</span>
86 86
 							<div class="fnUnpaidAmt"></div>

+ 4 - 1
src/main/webapp/mobile/js/app/mloanmng/ITP_MLOANMNG02010.js

@@ -174,11 +174,14 @@ let mobContentObj = {
174 174
 				_this.totPage = result.gridTotal;
175 175
 				$.each(result.gridRows, function (i, item) {
176 176
 					$('#ITP_LIST_MLOANMNG02010_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MLOANMNG02010_LIST_ITEM_ROWCOPY').html());
177
-					var $li = $('#ITP_LIST_MLOANMNG02010_LIST_ITEM_AREA .panel-group > .history_list1:last');
177
+					var $li = $('#ITP_LIST_MLOANMNG02010_LIST_ITEM_AREA .panel-group > .item-row:last');
178 178
 					$li.find('.fnStoreNm').text(item.storeNm);
179
+					$li.find('.fnLoanDvsnNm').text(item.loanDvsnNm);
179 180
 					$li.find('.fnDpstDt').text(item.dpstDt);
180 181
 					$li.find('.fnDpstAmt').text(CommonObj.currency.add(item.dpstAmt));
181 182
 					$li.find('.fnDpstNm').text(item.dpstNm);
183
+					$li.find('.fnDpstAuthDt').text(CommonObj.nullToString(item.dpstAuthDt));
184
+					$li.find('.fnDpstRjctDt').text(CommonObj.nullToString(item.dsptRjctDt));
182 185
 					$li.find('.fnRcvAcctNo').text(item.rcvAcctNo);
183 186
 					$li.find('.fnDpstBnkNm').text(item.dpstBnkNm);
184 187
 					$li.find('.fnDpstStNm').text(item.dpstStNm);

+ 3 - 3
src/main/webapp/mobile/js/app/mloanmng/ITP_MLOANMNG03010.js

@@ -174,14 +174,14 @@ let mobContentObj = {
174 174
 				_this.totPage = result.gridTotal;
175 175
 				$.each(result.gridRows, function (i, item) {
176 176
 					$('#ITP_LIST_MLOANMNG03010_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MLOANMNG03010_LIST_ITEM_ROWCOPY').html());
177
-					var $li = $('#ITP_LIST_MLOANMNG03010_LIST_ITEM_AREA .panel-group > .history_list4:last');
177
+					var $li = $('#ITP_LIST_MLOANMNG03010_LIST_ITEM_AREA .panel-group > .item-row:last');
178 178
 					$li.find('.fnStoreNm').text(item.storeNm);
179 179
 					$li.find('.fnLoanDvsnNm').text(item.loanDvsnNm);
180 180
 					$li.find('.fnSttlMgntUnqNo').text(item.sttlMgntUnqNo);
181 181
 					$li.find('.fnSttlStNm').text(item.sttlStNm);
182 182
 					$li.find('.fnSttlReqDt').text(item.sttlReqDt);
183 183
 					$li.find('.fnSttlReqAmt').text(CommonObj.currency.add(item.sttlReqAmt));
184
-					$li.find('.fnSttlReqDt').text(CommonObj.nullToString(item.sttlReqDt));
184
+					$li.find('.fnSttlDt').text(CommonObj.nullToString(item.sttlDt));
185 185
 					$li.find('.fnUnpaidAmt').text(CommonObj.currency.add(item.unpaidAmt));
186 186
 					$li.find('.fnUseAmtTotal').text(CommonObj.currency.add(item.useAmtTotal));
187 187
 					_this.rows.push(item);
@@ -255,7 +255,7 @@ let mobContentObj = {
255 255
 					_this.totPage = result.gridTotal;
256 256
 					$.each(result.gridRows, function (i, item) {
257 257
 						$('#ITP_LIST_MLOANMNG03010_VIEW_ITEM_AREA .panel-group').append($('#ITP_LIST_MLOANMNG03010_VIEW_ITEM_ROWCOPY').html());
258
-						var $li = $('#ITP_LIST_MLOANMNG03010_VIEW_ITEM_AREA .panel-group > .list-row:last');
258
+						var $li = $('#ITP_LIST_MLOANMNG03010_VIEW_ITEM_AREA .panel-group > .item-row:last');
259 259
 						$li.find('.fnItemId').text(item.itemId);
260 260
 						$li.find('.fnItemNm').text(item.itemNm);
261 261
 						$li.find('.fnUnitAmt').text(item.unitAmt);

+ 18 - 22
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG02010.js

@@ -110,29 +110,31 @@ let mobPageObj = {
110 110
 				$('#ITP_FORM_MPOMNG02010_LIST_SEARCH #ITP_FORM_MPOMNG02010_LIST_SEARCH_WHS_NM').attr('readonly', true);
111 111
 				$('#ITP_FORM_MPOMNG02010_LIST_SEARCH #ITP_FORM_MPOMNG02010_LIST_SEARCH_WHS_ID').attr('disabled', true);
112 112
 			}
113
-			this.moreView(true);
113
+			// this.moreView(true);
114 114
 		} else if(mode === VIEW_MODE_DETAIL) {
115 115
 			$('#ITP_AJAX_MPOMNG02010_VIEW_CONTAINER').show();
116
-			this.moreView(false);
116
+			// this.moreView(false);
117 117
 		} else if(mode === VIEW_MODE_MODIFY) {
118 118
 			$('#ITP_AJAX_MPOMNG02010_MODIFY_CONTAINER').show();
119
-			this.moreView(false);
119
+			// this.moreView(false);
120 120
 		}
121
+		CommonObj.moreView('#ITP_LIST_MPOMNG02010_ITEM_AREA', mode === VIEW_MODE_LIST, mobContentObj.list.load);
121 122
 		this.viewMode = mode;
122 123
 	},
123 124
 	moreView: function(isScroll) {
124 125
 		if(isScroll) {
125
-			$('#ITP_LIST_MPOMNG02010_ITEM_AREA').on('scroll', function () {
126
+			$('#ITP_LIST_MPOMNG02010_ITEM_AREA').off('scroll').on('scroll', function () {
126 127
 				if($(this).scrollTop() + $(this).innerHeight() + 1 >= $(this)[0].scrollHeight) {
127
-					if(mobContentObj.list.totPage > mobContentObj.list.listPage) {
128
-						if(!mobContentObj.list.isSearch) {
129
-							mobContentObj.list.load();
130
-						}
131
-					}
128
+					mobContentObj.list.load();
129
+					// if(mobContentObj.list.totPage > mobContentObj.list.listPage) {
130
+					// 	if(!mobContentObj.list.isSearch) {
131
+					// 		mobContentObj.list.load();
132
+					// 	}
133
+					// }
132 134
 				}
133 135
 			});
134 136
 		} else {
135
-			$('#ITP_LIST_MPOMNG02010__ITEM_AREA').off('scroll');
137
+			$('#ITP_LIST_MPOMNG02010_ITEM_AREA').off('scroll');
136 138
 		}
137 139
 	},
138 140
 	ready: function() {
@@ -142,10 +144,7 @@ let mobPageObj = {
142 144
 
143 145
 let mobContentObj = {
144 146
 	list: {
145
-		listSize: 10,
146 147
 		listPage: 0,
147
-		totPage: 0,
148
-		isSearch: false,
149 148
 		rows: [],
150 149
 		init: function() {
151 150
 			mobPageObj.switchScreen(VIEW_MODE_LIST);
@@ -153,18 +152,16 @@ let mobContentObj = {
153 152
 		},
154 153
 		search: function() {
155 154
 			this.listPage = 0;
156
-			this.totPage = 0;
157 155
 			this.rows.length = 0;
158 156
 			$('#ITP_LIST_MPOMNG02010_ITEM_ROWS').children().remove();
159 157
 			this.load();
160 158
 		},
161 159
 		load: function() {
162
-			var _this = this;
163
-			this.isSearch = true;
164 160
 			var callbackFn = function(result) {
165 161
 				console.log(result);
166
-				_this.isSearch = false;
167
-				_this.totPage = result.gridTotal;
162
+				if(result.gridPage >= result.gridTotal) {
163
+					CommonObj.moreView('#ITP_LIST_MPOMNG02010_ITEM_AREA', false);
164
+				}
168 165
 				$.each(result.gridRows, function (i, item) {
169 166
 					$('#ITP_LIST_MPOMNG02010_ITEM_AREA .panel-group').append($('#ITP_LIST_MPOMNG02010_ITEM_ROWCOPY').html());
170 167
 					var $li = $('#ITP_LIST_MPOMNG02010_ITEM_AREA .panel-group > .item-row:last');
@@ -178,15 +175,14 @@ let mobContentObj = {
178 175
 					$li.find('.fnPchReqTotalAmt').text(CommonObj.comma.set(item.pchReqTotalAmt));
179 176
 					$li.find('.fnPchReqRjctDt').text(item.pchReqRjctDt);
180 177
 					$li.find('.fnPchReqRjctNm').text(item.pchReqRjctNm);
181
-					_this.rows.push(item);
178
+					mobContentObj.list.rows.push(item);
182 179
 				});
183
-				_this.action();
180
+				mobContentObj.list.action();
184 181
 			};
185
-			var errFn = function() { _this.isSearch = false;};
186 182
 			const param = $('#ITP_FORM_MPOMNG02010_LIST_SEARCH').serializeObject();
187 183
 			param.gridPage = ++this.listPage;
188 184
 			param.gridSize = mobile_list_size;
189
-			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
185
+			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST');
190 186
 		},
191 187
 		action: function () {
192 188
 			var _this = this;

+ 11 - 0
src/main/webapp/mobile/js/config.js

@@ -786,6 +786,17 @@ let CommonObj = {
786 786
 		});
787 787
 
788 788
 	},
789
+	moreView: function(id, isScroll, fn) {
790
+		if(isScroll) {
791
+			$(id).off('scroll').on('scroll', function () {
792
+				if($(this).scrollTop() + $(this).innerHeight() + 1 >= $(this)[0].scrollHeight) {
793
+					fn();
794
+				}
795
+			});
796
+		} else {
797
+			$(id).off('scroll');
798
+		}
799
+	},
789 800
 	getParameter: function(name) {
790 801
 		var rtnval = '';
791 802
 		var nowAddress = unescape(location.href);