Subversion Repositories SmartDukaan

Rev

Rev 33888 | Rev 34682 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 33888 Rev 34098
Line 88... Line 88...
88
 
88
 
89
	$(document).on('click', '#catalog-button', function() {
89
	$(document).on('click', '#catalog-button', function() {
90
 
90
 
91
		loadSimilarCatalog("main-content", "");
91
		loadSimilarCatalog("main-content", "");
92
	});
92
	});
93
	
93
 
94
	$(document).on('click', '.target-slide', function() {
94
	$(document).on('click', '.target-slide', function() {
95
 
95
 
96
		loadOutletCategories("main-content");
96
		loadOutletCategories("main-content");
97
	});
97
	});
98
 
98
 
Line 296... Line 296...
296
			orderid = $(this).data('orderid');
296
			orderid = $(this).data('orderid');
297
			itemId = $(this).data('itemid');
297
			itemId = $(this).data('itemid');
298
 
298
 
299
			doGetAjaxRequestHandler(context
299
			doGetAjaxRequestHandler(context
300
				+ "/getcancelOrderItems?itemId=" + itemId, function(
300
				+ "/getcancelOrderItems?itemId=" + itemId, function(
301
					response) {
301
				response) {
302
				$('.cancel-order-container .modal-content').html(response);
302
				$('.cancel-order-container .modal-content').html(response);
303
				$("#textreason").hide();
303
				$("#textreason").hide();
304
			});
304
			});
305
		});
305
		});
306
 
306
 
Line 430... Line 430...
430
 
430
 
431
			if (confirm("Are you sure you want to notify the order") == true) {
431
			if (confirm("Are you sure you want to notify the order") == true) {
432
 
432
 
433
				doPostAjaxRequestWithJsonHandler(context
433
				doPostAjaxRequestWithJsonHandler(context
434
					+ "/notifyCancelOrder", JSON
434
					+ "/notifyCancelOrder", JSON
435
						.stringify(jsonObject), function(response) {
435
					.stringify(jsonObject), function (response) {
436
							if (response == 'true') {
436
					if (response == 'true') {
437
								alert("successfully notify");
437
						alert("successfully notify");
438
								$('#notifyCancelOrder').modal('hide');
438
						$('#notifyCancelOrder').modal('hide');
439
								$('.modal-backdrop').remove();
439
						$('.modal-backdrop').remove();
440
								loadOrder("main-content");
440
						loadOrder("main-content");
441
							}
441
					}
442
						});
442
				});
443
			}
443
			}
444
 
444
 
445
		});
445
		});
446
	$(document).on("click", ".notify-submit",
446
	$(document).on("click", ".notify-submit",
447
		function(e) {
447
		function(e) {
Line 545... Line 545...
545
 
545
 
546
			if (confirm("Are you sure you want to notify the order") == true) {
546
			if (confirm("Are you sure you want to notify the order") == true) {
547
 
547
 
548
				doPostAjaxRequestWithJsonHandler(context
548
				doPostAjaxRequestWithJsonHandler(context
549
					+ "/notifyOrder", JSON
549
					+ "/notifyOrder", JSON
550
						.stringify(jsonObject), function(response) {
550
					.stringify(jsonObject), function (response) {
551
							if (response == 'true') {
551
					if (response == 'true') {
552
								alert("successfully notify");
552
						alert("successfully notify");
553
								$('#notifyOrder').modal('hide');
553
						$('#notifyOrder').modal('hide');
554
								$('.modal-backdrop').remove();
554
						$('.modal-backdrop').remove();
555
								loadOrder("main-content");
555
						loadOrder("main-content");
556
							}
556
					}
557
						});
557
				});
558
			}
558
			}
559
 
559
 
560
		});
560
		});
561
 
561
 
562
	$(document).on("click", ".change-notify-request",
562
	$(document).on("click", ".change-notify-request",
Line 592... Line 592...
592
			console.log(jsonObject)
592
			console.log(jsonObject)
593
			if (confirm("Are you sure you want to update notify order") == true) {
593
			if (confirm("Are you sure you want to update notify order") == true) {
594
 
594
 
595
				doPostAjaxRequestWithJsonHandler(context
595
				doPostAjaxRequestWithJsonHandler(context
596
					+ "/changeNotifyCancelRequest", JSON
596
					+ "/changeNotifyCancelRequest", JSON
597
						.stringify(jsonObject), function(response) {
597
					.stringify(jsonObject), function (response) {
598
							if (response == 'true') {
598
					if (response == 'true') {
599
								alert("successfully Update");
599
						alert("successfully Update");
600
								$('#notifyCancelOrderList').modal('hide');
600
						$('#notifyCancelOrderList').modal('hide');
601
								$('.modal-backdrop').remove();
601
						$('.modal-backdrop').remove();
602
								loadNotifyCancelOrder("main-content");
602
						loadNotifyCancelOrder("main-content");
603
							}
603
					}
604
						});
604
				});
605
			}
605
			}
606
		});
606
		});
607
 
607
 
608
});
608
});
609
 
609
 
610
function getItemColor(catalogId, itemId) {
610
function getItemColor(catalogId, itemId) {
611
	console.log(catalogId);
611
	console.log(catalogId);
612
 
612
 
613
	doGetAjaxRequestHandler(context + "/getNotifyItemColor?catalogItemId="
613
	doGetAjaxRequestHandler(context + "/getNotifyItemColor?catalogItemId="
614
		+ catalogId + "&itemId=" + itemId, function(response) {
614
		+ catalogId + "&itemId=" + itemId, function(response) {
615
			$('.notify-container .modal-content').html(response);
615
		$('.notify-container .modal-content').html(response);
616
			$('#textnotifymessage').hide();
616
		$('#textnotifymessage').hide();
617
		});
617
	});
618
}
618
}
619
 
619
 
620
function getItems(catalogItemId) {
620
function getItems(catalogItemId) {
621
	doGetAjaxRequestHandler(context + "/getItems?catalogItemId="
621
	doGetAjaxRequestHandler(context + "/getItems?catalogItemId="
622
		+ catalogItemId, function(response) {
622
		+ catalogItemId, function(response) {
623
			$('.notify-cancel-order-container .modal-content').html(response);
623
		$('.notify-cancel-order-container .modal-content').html(response);
624
 
624
 
625
		});
625
	});
626
}
626
}
627
 
627
 
628
function loadGoodInventory(domId, search_text) {
628
function loadGoodInventory(domId, search_text) {
629
	doGetAjaxRequestHandler(context
629
	doGetAjaxRequestHandler(context
630
		+ "/getCurrentInventorySnapshot?searchTerm=" + search_text,
630
		+ "/getCurrentInventorySnapshot?searchTerm=" + search_text,
Line 717... Line 717...
717
function getItemAgingNextPreviousItems(offset, searchContent) {
717
function getItemAgingNextPreviousItems(offset, searchContent) {
718
	console.log("getItemAgingNextPreviousItems() called");
718
	console.log("getItemAgingNextPreviousItems() called");
719
	doPostAjaxRequestWithJsonHandler(context
719
	doPostAjaxRequestWithJsonHandler(context
720
		+ "/getInventoryItemAgingByInterval?offset=" + offset
720
		+ "/getInventoryItemAgingByInterval?offset=" + offset
721
		+ "&searchContent=" + searchContent, JSON
721
		+ "&searchContent=" + searchContent, JSON
722
			.stringify([5, 15, 30, 45]), function(response) {
722
		.stringify([5, 15, 30, 45]), function (response) {
723
				$('#main-content').html(response);
723
		$('#main-content').html(response);
724
			});
724
	});
725
 
725
 
726
}
726
}
727
 
727
 
728
function loadBadInventory(domId, search_text) {
728
function loadBadInventory(domId, search_text) {
729
	doGetAjaxRequestHandler(context + "/getBadInventorySnapshot?searchTerm="
729
	doGetAjaxRequestHandler(context + "/getBadInventorySnapshot?searchTerm="
730
		+ search_text, function(response) {
730
		+ search_text, function(response) {
731
			$('#' + domId).html(response);
731
		$('#' + domId).html(response);
732
		});
732
	});
733
}
733
}
734
 
734
 
735
function loadGoodInventorySearchInfo(search_text) {
735
function loadGoodInventorySearchInfo(search_text) {
736
	loadGoodInventory("main-content", search_text);
736
	loadGoodInventory("main-content", search_text);
737
}
737
}
Line 790... Line 790...
790
 
790
 
791
	if (confirm("Are you sure you want to cancel the order") == true) {
791
	if (confirm("Are you sure you want to cancel the order") == true) {
792
 
792
 
793
		doPostAjaxRequestWithJsonHandler(context + "/cancelOrder", JSON
793
		doPostAjaxRequestWithJsonHandler(context + "/cancelOrder", JSON
794
			.stringify(jsonObject), function(response) {
794
			.stringify(jsonObject), function(response) {
795
				if (response == 'true') {
795
			if (response == 'true') {
796
					alert("successfully cancel");
796
				alert("successfully cancel");
797
					$('#cancelOrder').modal('hide');
797
				$('#cancelOrder').modal('hide');
798
					$('.modal-backdrop').remove();
798
				$('.modal-backdrop').remove();
799
					loadOrder("main-content");
799
				loadOrder("main-content");
800
				}
800
			}
801
			});
801
		});
802
	}
802
	}
803
 
803
 
804
}
804
}
805
 
805
 
806
function loadNotifyCancelOrder(domId) {
806
function loadNotifyCancelOrder(domId) {
Line 849... Line 849...
849
 
849
 
850
$(document).on('click', '.fetch-cataogrised-catalog', function () {
850
$(document).on('click', '.fetch-cataogrised-catalog', function () {
851
	getBrnadWiseCatalogMovement();
851
	getBrnadWiseCatalogMovement();
852
});
852
});
853
 
853
 
854
$(document).on('click', '.catlalog-movement-history-mk', function () {
854
$(document).on('click', '.catalog-movement-history-mk', function () {
855
	let catalogId = $(this).data('catalogid');
855
	let catalogId = $(this).data('catalogid');
856
	doGetAjaxRequestHandler(context + "/getCatalogMovementHistory?catalogId=" + catalogId,
856
	doGetAjaxRequestHandler(context + "/getCatalogMovementHistory?catalogId=" + catalogId,
857
		function (response) {
857
		function (response) {
858
			$('#modal-movement-history').html(response);
858
			$('#modal-movement-history').html(response);
859
		});
859
		});
Line 889... Line 889...
889
 
889
 
890
function getBrnadWiseCatalogMovement() {
890
function getBrnadWiseCatalogMovement() {
891
	let brand = $("#catalog-brand").val();
891
	let brand = $("#catalog-brand").val();
892
	doGetAjaxRequestHandler(context + "/getCatalogMovementByBrand?brand=" + brand,
892
	doGetAjaxRequestHandler(context + "/getCatalogMovementByBrand?brand=" + brand,
893
		function (response) {
893
		function (response) {
894
			$('#catagorised-catalog-list-mk').html(response);
894
			$('#categoriesed-catalog-list-mk').html(response);
895
		});
895
		});
896
}
896
}
897
 
897