2 Commity 26e4f394a9 ... cbac4972ec

Autor SHA1 Wiadomość Data
  juney cbac4972ec Merge branch 'master' of http://106.246.249.162:13000/orderqueen/oqpo-view 2 lat temu
  juney 61a13c0968 발주요청 팝업 페이징 추가 2 lat temu

+ 0 - 1
src/main/webapp/mobile/js/app/main.js

@@ -486,7 +486,6 @@ let mobPopObj = {
486 486
 		
487 487
 	},
488 488
 	show: function(popId) {
489
-		 console.log("popup show id=="+popId)
490 489
 		$('#' + popId+' .btn-pop-close').on('click', function() {
491 490
 			mobPopObj.hide(popId);
492 491
 		});

+ 43 - 6
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG01010.js

@@ -394,6 +394,12 @@ let mobPopObj = {
394 394
 			this.action();
395 395
 			this.load();
396 396
 		},
397
+		pager: function(totPage) {
398
+			(this.listPage < totPage) ?
399
+				CommonObj.moreView('#ITP_LIST_MPOMNG01010_POP_WISH_LIST_AREA', true, mobPopObj.popWishList.search) :
400
+				CommonObj.moreView('#ITP_LIST_MPOMNG01010_POP_WISH_LIST_AREA', false);
401
+			this.listPage += 1;
402
+		},
397 403
 		action: function() {
398 404
 			var _this = this;
399 405
 			$('#ITP_FORM_MPOMNG01010_POP_WISH_LIST_KEYWORD').on('change', function() {
@@ -425,13 +431,22 @@ let mobPopObj = {
425 431
 			
426 432
 			
427 433
 		},
428
-		search: function(swishListMgntNo) {
429
-			$('#ITP_LIST_MPOMNG01010_POP_WISH_LIST_ROWS').children().remove();
434
+		search: function(wishListMgntNo) {
435
+			var swishListMgntNo = wishListMgntNo;
436
+			if(wishListMgntNo) {
437
+				$('#ITP_LIST_MPOMNG01010_POP_WISH_LIST_ROWS').children().remove();
438
+			} else {
439
+				swishListMgntNo = $('#ITP_FORM_MPOMNG01010_POP_WISH_LIST_KEYWORD option:selected').val();
440
+			}
430 441
 			var callbackFn = function(result) {
431 442
 				console.log(result);
432 443
 				mobPopObj.popWishList.list.addRows(result.gridRows);
444
+				mobPopObj.popWishList.pager(result.gridTotal);
433 445
 			};
434 446
 			let param = {
447
+				'gridPage' : this.listPage,
448
+				'gridSize'	: mobile_list_size,
449
+				'pagingYn'	: true,
435 450
 				'sbrandId' : fn_make_user_info.get('brandId'),
436 451
 				'sstoreId' : fn_make_user_info.get('storeId'),
437 452
 				'swishListMgntNo' : swishListMgntNo
@@ -508,6 +523,7 @@ let mobPopObj = {
508 523
 			}
509 524
 		},
510 525
 		clear: function() {
526
+			this.listPage = 1;
511 527
 			this.list.rows.length = 0;
512 528
 			$('#ITP_FORM_MPOMNG01010_POP_WISH_LIST_KEYWORD option').remove();
513 529
 			$('#ITP_LIST_MPOMNG01010_POP_WISH_LIST_ROWS').children().remove();
@@ -520,6 +536,12 @@ let mobPopObj = {
520 536
 			this.action();
521 537
 			this.load();
522 538
 		},
539
+		pager: function(totPage) {
540
+			(this.listPage < totPage) ?
541
+				CommonObj.moreView('#ITP_LIST_MPOMNG01010_POP_SAFE_STCK_AREA', true, mobPopObj.popStckList.search) :
542
+				CommonObj.moreView('#ITP_LIST_MPOMNG01010_POP_SAFE_STCK_AREA', false);
543
+			this.listPage += 1;
544
+		},
523 545
 		action: function() {
524 546
 			var _this = this;
525 547
 			$('#ITP_FORM_MPOMNG01010_POP_SAFE_STCK_KEYWORD').on('change', function() {
@@ -552,15 +574,24 @@ let mobPopObj = {
552 574
 			
553 575
 		},
554 576
 		search: function(whsId) {
555
-			$('#ITP_LIST_MPOMNG01010_POP_SAFE_STCK_ROWS').children().remove();
577
+			var sWshId = whsId;
578
+			if(whsId) {
579
+				$('#ITP_LIST_MPOMNG01010_POP_SAFE_STCK_ROWS').children().remove();
580
+			} else {
581
+				sWshId = $('#ITP_FORM_MPOMNG01010_POP_SAFE_STCK_KEYWORD option:selected').val();
582
+			}
556 583
 			var callbackFn = function(result) {
557 584
 				console.log(result);
558 585
 				mobPopObj.popStckList.list.addRows(result.gridRows);
586
+				mobPopObj.popStckList.pager(result.gridTotal);
559 587
 			};
560 588
 			let param = {
589
+				'gridPage' : this.listPage,
590
+				'gridSize'	: mobile_list_size,
591
+				'pagingYn'	: true,
561 592
 				'sbrandId' : fn_make_user_info.get('brandId'),
562 593
 				'sstoreId' : fn_make_user_info.get('storeId'),
563
-				'swhsId' : whsId
594
+				'swhsId' : sWshId
564 595
 			};
565 596
 			fn_ajax_call(API_POP_SEARCH_STCK_LIST, JSON.stringify(param), callbackFn, 'POST');
566 597
 		},
@@ -575,8 +606,8 @@ let mobPopObj = {
575 606
 					$li.find('.fnItemNm').text(item.itemNm + " (현 재고 : " + item.stckQty + " 개)");
576 607
 					$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
577 608
 					$li.find('.fnOrdAmt').text(CommonObj.currency.add(item.unitAmt * item.pchReqQty));
578
-					console.log("qty");
579
-					console.log(item.pchReqQty);
609
+					// console.log("qty");
610
+					// console.log(item.pchReqQty);
580 611
 					$('.row_2 #ITP_MPOMNG01010_POP_SAFE_STCK_NUM').val(item.pchReqQty)
581 612
 					$('.row_2 #ITP_BTN_MPOMNG01010_POP_SAFE_STCK_PLUS')[$li.index()].addEventListener('click', function() { _this.actPlus(this); });
582 613
 					$('.row_2 #ITP_BTN_MPOMNG01010_POP_SAFE_STCK_MINUS')[$li.index()].addEventListener('click', function() { _this.actMinus(this); });
@@ -639,6 +670,7 @@ let mobPopObj = {
639 670
 			}
640 671
 		},
641 672
 		clear: function() {
673
+			this.listPage = 1;
642 674
 			this.list.rows.length = 0;
643 675
 			$('#ITP_FORM_MPOMNG01010_POP_SAFE_STCK_KEYWORD option').remove();
644 676
 			$('#ITP_LIST_MPOMNG01010_POP_SAFE_STCK_ROWS').children().remove();
@@ -839,6 +871,11 @@ let mobPopObj = {
839 871
 		}
840 872
 	},
841 873
 	hide: function(id) {
874
+		if(id === "ITP_POP_MPOMNG01010_WISH_LIST_AREA") {
875
+			CommonObj.moreView('#ITP_LIST_MPOMNG01010_POP_WISH_LIST_AREA', false);
876
+		} else if(id === "ITP_POP_MPOMNG01010_SAFE_STCK_AREA") {
877
+			CommonObj.moreView('#ITP_LIST_MPOMNG01010_POP_SAFE_STCK_AREA', false);
878
+		}
842 879
 		$('#' + id).closest('.mobile-pop-close').hide();
843 880
 	}
844 881
 };