瀏覽代碼

메인화면 카운트

marseyes 2 年之前
父節點
當前提交
8809c503cc
共有 3 個文件被更改,包括 96 次插入34 次删除
  1. 8 8
      src/main/webapp/css/style.css
  2. 34 4
      src/main/webapp/js/app/main.js
  3. 54 22
      src/main/webapp/main.html

+ 8 - 8
src/main/webapp/css/style.css

@@ -122,14 +122,14 @@ a, button {outline:none !important; text-decoration:none !important;}
122 122
 #ITP_LOGIN .itp_login_input:not(:placeholder-shown) ~ label{top:0px; font-size:12px;}
123 123
 
124 124
 /* 메인화면 */
125
-#ITP_MAIN_HEADER { width:100%; height:60px; display:inline-block;}
126
-#ITP_MAIN_HEADER .col_3 {background:#eee; width:26%; height:50px; display:inline-block; margin:5px 48px; border-radius:8px;}
127
-#ITP_MAIN_HEADER .col_3 .itp_header_label {width:160px; padding:13px 16px; font-size:17px; font-weight:700; display:inline-block;}
128
-#ITP_MAIN_HEADER .col_3 .itp_header_result {width:auto; float: right; display:inline-block; font-size:18px; font-weight:700; color:blue; text-align: right; padding:12px;}
129
-
130
-#ITP_MAIN_HEADER .col_4 {background:#eee; width:22%; height:50px; display:inline-block; margin:5px 11px; border-radius:8px;}
131
-#ITP_MAIN_HEADER .col_4 .itp_header_label {width:125px; padding:13px 16px; font-size:17px; font-weight:700; display:inline-block;}
132
-#ITP_MAIN_HEADER .col_4 .itp_header_result {width:auto; float: right; display:inline-block; font-size:18px; font-weight:700; color:blue; text-align: right; padding:12px;}
125
+.itp_main_header { width:100%; height:60px; display:inline-block;}
126
+.itp_main_header .col_3 {background:#eee; width:26%; height:50px; display:inline-block; margin:5px 48px; border-radius:8px;}
127
+.itp_main_header .col_3 .itp_header_label {width:160px; padding:13px 16px; font-size:17px; font-weight:700; display:inline-block;}
128
+.itp_main_header .col_3 .itp_header_result {width:auto; float: right; display:inline-block; font-size:18px; font-weight:700; color:blue; text-align: right; padding:12px;}
129
+
130
+.itp_main_header .col_4 {background:#eee; width:22%; height:50px; display:inline-block; margin:5px 11px; border-radius:8px;}
131
+.itp_main_header .col_4 .itp_header_label {width:130px; padding:13px 16px; font-size:17px; font-weight:700; display:inline-block;}
132
+.itp_main_header .col_4 .itp_header_result {width:auto; float: right; display:inline-block; font-size:18px; font-weight:700; color:blue; text-align: right; padding:12px;}
133 133
 
134 134
 #ITP_NOTE_BAR {background:#eee; width:100%; float:right; border-radius:15px;}
135 135
 #ITP_NOTE_BAR .itp_side_bar_header {padding-top:12px; text-align:center; font-size:17px;}

+ 34 - 4
src/main/webapp/js/app/main.js

@@ -5,6 +5,7 @@ const MAIN_NOTICE_GRID_PAGER = '#ITP_MAIN_NOTICE_jqGridPager';
5 5
 const MAIN_NOTICE_GRID_EMPTY = '#ITP_MAIN_NOTICE_jqGridEmpty';
6 6
 
7 7
 let NTICE_DETAIL_GRID_LIST = '/api/ntice/main-detail-grid-list';
8
+let MAIN_CHART_COUNT = '/api/main/chart/count';
8 9
 let MAIN_CHART_PCH_REQ_CHART = '/api/main/chart/pch-req-chart';
9 10
 let MAIN_CHART_PCH_ODR_CHART = '/api/main/chart/pch-odr-chart';
10 11
 let MAIN_CHART_PR_RANK_CHART = '/api/main/chart/pr-rank-chart';
@@ -22,13 +23,10 @@ require(['config'], function() {
22 23
 			// 시간지정
23 24
 			// $('#ITP_FORM_MAIN_NOTICE_SEARCH_SCH_DT').val(itp_fn_date_format(new Date(), 2));
24 25
 			// $('#ITP_FORM_MAIN_NOTICE_SEARCH_USER_ID').val(fn_make_user_info.get('userId'));
25
-			
26
-			// 그리드
27
-			// itp_fn_MAIN_NOTICE_grid.init();
28
-	    	// itp_fn_fire_window_resize();
29 26
 
30 27
 			// 조회
31 28
 	    	itp_fn_MAIN_NOTICE_search();
29
+			itp_fn_MAIN_COUNT();
32 30
 
33 31
 			$('#ITP_FORM_MAIN_SEARCH_PR_TYPE').on('change', function() {
34 32
 				drawChartReq();
@@ -58,6 +56,10 @@ require(['config'], function() {
58 56
 			google.charts.load('current', {'packages':['corechart']});
59 57
 			google.charts.load('current', {'packages':['bar']});
60 58
 			
59
+			$('#ITP_MAIN_HEADER_BRAND').hide();
60
+			$('#ITP_MAIN_HEADER_STORE').hide();
61
+			$('#ITP_MAIN_HEADER_SPPLY').hide();
62
+			
61 63
 			$('#ITP_MAIN_DRAW_CHART_REQ').hide();
62 64
 			$('#ITP_MAIN_DRAW_CHART_PODR').hide();
63 65
 			$('#ITP_MAIN_DRAW_CHART_REQ_UP').hide();
@@ -71,6 +73,8 @@ require(['config'], function() {
71 73
 			// console.log('>>>> authTpCd = ' + authTpCd);
72 74
 			
73 75
 			if( authTpCd == '40' ) { // 브랜드
76
+				$('#ITP_MAIN_HEADER_BRAND').show();
77
+			
74 78
 				$('#ITP_MAIN_DRAW_CHART_REQ').show();  
75 79
 				google.charts.setOnLoadCallback(drawChartReq); // 구매요청
76 80
 				
@@ -84,8 +88,11 @@ require(['config'], function() {
84 88
 				google.charts.setOnLoadCallback(drawChartcore); // 정산
85 89
 			
86 90
 				$('#ITP_MAIN_DRAW_LINE').show();	
91
+				$('#ITP_MAIN_DRAW_LINE .itp_main_draw_line').show();	
87 92
 				google.charts.setOnLoadCallback(drawLine); // 안전재고
88 93
 			} else if( authTpCd == '50' ) { // 매장
94
+				$('#ITP_MAIN_HEADER_STORE').show();
95
+			
89 96
 				$('#ITP_MAIN_DRAW_CHART_REQ').show();  
90 97
 				google.charts.setOnLoadCallback(drawChartReq); // 구매요청
91 98
 				
@@ -99,6 +106,7 @@ require(['config'], function() {
99 106
 				google.charts.setOnLoadCallback(drawChartcore); // 정산
100 107
 				
101 108
 			} else if( authTpCd == '60' ) { // 공급사
109
+				$('#ITP_MAIN_HEADER_SPPLY').show();
102 110
 			
103 111
 				$('#ITP_MAIN_DRAW_ORDERS_CHART').show();  
104 112
 				google.charts.setOnLoadCallback(drawChartOrders); // 수주내역
@@ -280,6 +288,28 @@ function drawLine() {
280 288
   
281 289
 }
282 290
 
291
+var itp_fn_MAIN_COUNT = function() {
292
+	
293
+	const key = { brandId:fn_make_user_info.get('brandId'), storeId:fn_make_user_info.get('storeId'), spplyId:fn_make_user_info.get('spplyId') };
294
+	var param = $.param(key);
295
+	fn_ajax_call(MAIN_CHART_COUNT, param, function(result) {
296
+		
297
+		$('#ITP_AJAX_SUMMARY_DETAIL_CONTAINER .fnPr20Count').text( itp_fn_number_comma( result.pr20Count ) + '건' );
298
+		$('#ITP_AJAX_SUMMARY_DETAIL_CONTAINER .fnDp02Amt').text( itp_fn_number_comma( result.dp02Amt ) + '원' );
299
+		$('#ITP_AJAX_SUMMARY_DETAIL_CONTAINER .fnUnpaidAmt').text( itp_fn_number_comma( result.unpaidAmt ) + '원' );
300
+				
301
+		$('#ITP_AJAX_SUMMARY_DETAIL_CONTAINER .fnPo30Count').text( itp_fn_number_comma( result.po30Count ) + '건' );		
302
+		$('#ITP_AJAX_SUMMARY_DETAIL_CONTAINER .fnPoEndCount').text( itp_fn_number_comma( result.poEndCount ) + '건' );		
303
+		$('#ITP_AJAX_SUMMARY_DETAIL_CONTAINER .fnPoPsblAmt').text( itp_fn_number_comma( result.poPsblAmt ) + '원' );
304
+				
305
+		$('#ITP_AJAX_SUMMARY_DETAIL_CONTAINER .fnOrdersCount').text( itp_fn_number_comma( result.ordersCount ) + '건' );		
306
+		$('#ITP_AJAX_SUMMARY_DETAIL_CONTAINER .fnOrdersAmt').text( itp_fn_number_comma( result.ordersAmt ) + '원' );		
307
+		$('#ITP_AJAX_SUMMARY_DETAIL_CONTAINER .fnSttlReqAmt').text( itp_fn_number_comma( result.sttlReqAmt ) + '원' );		
308
+		
309
+	}, 'GET');
310
+	
311
+}
312
+
283 313
 var itp_fn_MAIN_NOTICE_search = function() {
284 314
 	// itp_fn_MAIN_NOTICE_grid.unload();
285 315
 	// itp_fn_MAIN_NOTICE_grid.callBack();

+ 54 - 22
src/main/webapp/main.html

@@ -162,12 +162,40 @@
162 162
 										<label>공지사항</label>
163 163
 									</div>
164 164
 								</div>
165
-								<div id="ITP_MAIN_HEADER" style="display: inline-block;">
165
+								
166
+								<div id="ITP_MAIN_HEADER_BRAND" class="itp_main_header" style="display: none;">
167
+									<div class="col_3" style="margin-left:0">
168
+										<div class="itp_header_label">
169
+										구매요청 건수
170
+										</div>
171
+										<div class="itp_header_result fnPr20Count">
172
+										10건
173
+										</div>
174
+									</div>
175
+									<div class="col_3" style="margin:5px 6%;">
176
+										<div class="itp_header_label">
177
+										당일 입금액
178
+										</div>
179
+										<div class="itp_header_result fnDp02Amt">
180
+										10건
181
+										</div>
182
+									</div>
183
+									<div class="col_3" style="margin-right:0; float:right;">
184
+										<div class="itp_header_label">
185
+										미납금
186
+										</div>
187
+										<div class="itp_header_result fnUnpaidAmt">
188
+										10건
189
+										</div>
190
+									</div>
191
+								</div>
192
+								
193
+								<div id="ITP_MAIN_HEADER_STORE" class="itp_main_header" style="display: none;">
166 194
 									<div class="col_4" style="margin-left:0">
167 195
 										<div class="itp_header_label">
168 196
 										구매요청 
169 197
 										</div>
170
-										<div class="itp_header_result fn">
198
+										<div class="itp_header_result fnPr20Count">
171 199
 										10건
172 200
 										</div>
173 201
 									</div>
@@ -175,15 +203,15 @@
175 203
 										<div class="itp_header_label">
176 204
 										발주진행
177 205
 										</div>
178
-										<div class="itp_header_result fn">
206
+										<div class="itp_header_result fnPo30Count">
179 207
 										10건
180 208
 										</div>
181 209
 									</div>
182 210
 									<div class="col_4">
183 211
 										<div class="itp_header_label">
184
-										발주완료
212
+										당일 발주완료
185 213
 										</div>
186
-										<div class="itp_header_result fn">
214
+										<div class="itp_header_result fnPoEndCount">
187 215
 										10건
188 216
 										</div>
189 217
 									</div>
@@ -191,39 +219,41 @@
191 219
 										<div class="itp_header_label">
192 220
 										구매가능금액
193 221
 										</div>
194
-										<div class="itp_header_result fn">
222
+										<div class="itp_header_result fnPoPsblAmt">
195 223
 										1,000,000원
196 224
 										</div>
197 225
 									</div>
198 226
 								</div>
199
-								<div id="ITP_MAIN_HEADER" style="display: none;">
227
+								
228
+								<div id="ITP_MAIN_HEADER_SPPLY" class="itp_main_header" style="display: none;">
200 229
 									<div class="col_3" style="margin-left:0">
201 230
 										<div class="itp_header_label">
202
-										구매요청 건수
231
+										당일 수주건수
203 232
 										</div>
204
-										<div class="itp_header_result fn">
233
+										<div class="itp_header_result fnOrdersCount">
205 234
 										10건
206 235
 										</div>
207 236
 									</div>
208 237
 									<div class="col_3" style="margin:5px 6%;">
209 238
 										<div class="itp_header_label">
210
-										구매요청건수
239
+										당일 수주금액
211 240
 										</div>
212
-										<div class="itp_header_result fn">
241
+										<div class="itp_header_result fnOrdersAmt">
213 242
 										10건
214 243
 										</div>
215 244
 									</div>
216 245
 									<div class="col_3" style="margin-right:0; float:right;">
217 246
 										<div class="itp_header_label">
218
-										구매요청건수
247
+										정산요청금액
219 248
 										</div>
220
-										<div class="itp_header_result fn">
249
+										<div class="itp_header_result fnSttlReqAmt">
221 250
 										10건
222 251
 										</div>
223 252
 									</div>
224 253
 								</div>
254
+								
225 255
 								<div id="ITP_MAIN_GRAPH_AREA">
226
-									<div class="itp_graph_box" id="ITP_MAIN_DRAW_CHART_REQ">
256
+									<div class="itp_graph_box" id="ITP_MAIN_DRAW_CHART_REQ" style="display: none;">
227 257
 										<div class="itp_graph_side">
228 258
 											<select id="ITP_FORM_MAIN_SEARCH_PR_TYPE" name="prType">
229 259
 												<option value="A">당일</option>
@@ -238,7 +268,7 @@
238 268
 										<div id="ITP_PCH_REQ_GRAPH" class="itp_graph_area"></div>
239 269
 									</div>
240 270
 									
241
-									<div class="itp_graph_box" id="ITP_MAIN_DRAW_DELI_CHART">
271
+									<div class="itp_graph_box" id="ITP_MAIN_DRAW_DELI_CHART" style="display: none;">
242 272
 										<div class="itp_graph_side">
243 273
 											<select id="ITP_FORM_MAIN_SEARCH_DELI_TYPE" name="deliType">
244 274
 												<option value="A">당일</option>
@@ -253,7 +283,7 @@
253 283
 										<div id="ITP_DELI_GRAPH" class="itp_graph_area"></div>
254 284
 									</div>
255 285
 									
256
-									<div class="itp_graph_box" id="ITP_MAIN_DRAW_ORDERS_CHART">
286
+									<div class="itp_graph_box" id="ITP_MAIN_DRAW_ORDERS_CHART" style="display: none;">
257 287
 										<div class="itp_graph_side">
258 288
 											<select id="ITP_FORM_MAIN_SEARCH_ORDERS_TYPE">
259 289
 												<option value="A">당일</option>
@@ -268,7 +298,7 @@
268 298
 										<div id="ITP_ORDERS_GRAPH" class="itp_graph_area"></div>
269 299
 									</div>
270 300
 									
271
-									<div class="itp_graph_box" id="ITP_MAIN_DRAW_RELEASE_CHART">
301
+									<div class="itp_graph_box" id="ITP_MAIN_DRAW_RELEASE_CHART" style="display: none;">
272 302
 										<div class="itp_graph_side">
273 303
 											<select id="ITP_FORM_MAIN_SEARCH_RELEASE_TYPE">
274 304
 												<option value="A">당일</option>
@@ -283,7 +313,7 @@
283 313
 										<div id="ITP_RELEASE_GRAPH" class="itp_graph_area"></div>
284 314
 									</div>
285 315
 									
286
-									<div class="itp_graph_box" id="ITP_MAIN_DRAW_CHART_PODR">
316
+									<div class="itp_graph_box" id="ITP_MAIN_DRAW_CHART_PODR" style="display: none;">
287 317
 										<div class="itp_graph_side">
288 318
 											<select id="ITP_FORM_MAIN_SEARCH_PO_TYPE" name="poType">
289 319
 												<option value="A">당일</option>
@@ -298,7 +328,7 @@
298 328
 										<div id="ITP_PCH_PODR_GRAPH" class="itp_graph_area"></div>
299 329
 									</div>
300 330
 									
301
-									<div class="itp_graph_box" id="ITP_MAIN_DRAW_CHART_REQ_UP">
331
+									<div class="itp_graph_box" id="ITP_MAIN_DRAW_CHART_REQ_UP" style="display: none;">
302 332
 										<div class="itp_graph_side">
303 333
 											<select id="ITP_FORM_MAIN_SEARCH_ITEM_CNT_TYPE" name="itemCntType">
304 334
 												<option value="A">당일</option>
@@ -312,7 +342,8 @@
312 342
 										</div>
313 343
 										<div id="ITP_PCH_REQ_UP_ITEM_GRAPH" class="itp_graph_area"></div>
314 344
 									</div>
315
-									<div class="itp_graph_box" id="ITP_MAIN_DRAW_CHART_CORE">
345
+									
346
+									<div class="itp_graph_box" id="ITP_MAIN_DRAW_CHART_CORE" style="display: none;">
316 347
 										<div class="itp_graph_side">
317 348
 											<div class="itp_graph_info_bar">
318 349
 												<div class="itp_graph_info" style="padding-top:8px;">&nbsp;정&nbsp;&nbsp;산</div>
@@ -320,8 +351,9 @@
320 351
 										</div>
321 352
 										<div id="ITP_STTL_GRAPH" class="itp_graph_area"></div>
322 353
 									</div>
323
-									<div class="itp_graph_box" style="width:100%" id="ITP_MAIN_DRAW_LINE">
324
-										<div class="itp_graph_side" style="width:12%;">
354
+									
355
+									<div class="itp_graph_box" style="width:100%" id="ITP_MAIN_DRAW_LINE" style="display: none;">
356
+										<div class="itp_graph_side itp_main_draw_line" style="width:12%; display: none;" >
325 357
 											<div class="itp_graph_info_bar">
326 358
 												<div class="itp_graph_info">안전재고</div>
327 359
 											</div>