Subversion Repositories SmartDukaan

Rev

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

Rev 32130 Rev 32195
Line 733... Line 733...
733
		afterSelect: callback
733
		afterSelect: callback
734
	});
734
	});
735
}
735
}
736
 
736
 
737
 
737
 
-
 
738
 
-
 
739
function getVendorItemAheadOptions(jqElement, vendorId, callback) {
-
 
740
	jqElement.typeahead('destroy').typeahead({
-
 
741
		source: function(q, process) {
-
 
742
			if (q.length >= 3) {
-
 
743
				return $.ajax(context + "/vendorItem?vendorId=" + vendorId, {
-
 
744
					global: false,
-
 
745
					data: {
-
 
746
						query: q
-
 
747
					},
-
 
748
					success: function(data) {
-
 
749
						queryData = JSON.parse(data);
-
 
750
						process(queryData);
-
 
751
					},
-
 
752
				});
-
 
753
			}
-
 
754
		},
-
 
755
		delay: 300,
-
 
756
		items: 20,
-
 
757
		displayText: function(item) {
-
 
758
			return item.itemDescription;
-
 
759
		},
-
 
760
		autoSelect: true,
-
 
761
		afterSelect: callback
-
 
762
	});
-
 
763
}
-
 
764
 
738
function getImeiAheadOptions(jqElement, fofoId, callback) {
765
function getImeiAheadOptions(jqElement, fofoId, callback) {
739
	jqElement.typeahead('destroy').typeahead({
766
	jqElement.typeahead('destroy').typeahead({
740
		source: function(q, process) {
767
		source: function(q, process) {
741
			if (q.length >= 3) {
768
			if (q.length >= 3) {
742
				return $.ajax(context + "/imei?fofoId=" + fofoId, {
769
				return $.ajax(context + "/imei?fofoId=" + fofoId, {
Line 993... Line 1020...
993
	let tableId = $(container).data('tableid');
1020
	let tableId = $(container).data('tableid');
994
	var elt = document.getElementById(tableId);
1021
	var elt = document.getElementById(tableId);
995
	if ($.fn.DataTable.isDataTable(`#${tableId}`)) {
1022
	if ($.fn.DataTable.isDataTable(`#${tableId}`)) {
996
		elt = $(`#${tableId}`).DataTable().table(0).container();
1023
		elt = $(`#${tableId}`).DataTable().table(0).container();
997
	}
1024
	}
998
	var wb = XLSX.utils.table_to_book(elt, {sheet: "sheet1"});
1025
	var wb = XLSX.utils.table_to_book(elt, { sheet: "sheet1" });
999
	XLSX.writeFile(wb, fn + '.xlsx');
1026
	XLSX.writeFile(wb, fn + '.xlsx');
1000
}
1027
}
1001
 
1028
 
1002
 
1029
 
1003
$(document).on('click', ".manage-pcm", function() {
1030
$(document).on('click', ".manage-pcm", function() {
Line 1012... Line 1039...
1012
 
1039
 
1013
 
1040
 
1014
 
1041
 
1015
$(document).on('click', ".digify-retailer-login", function() {
1042
$(document).on('click', ".digify-retailer-login", function() {
1016
 
1043
 
1017
	doGetAjaxRequestHandler(context + "/digify/register", function (response) {
1044
	doGetAjaxRequestHandler(context + "/digify/register", function(response) {
1018
 
1045
 
1019
 
1046
 
1020
		$('#main-content').html(response);
1047
		$('#main-content').html(response);
1021
 
1048
 
1022
	});
1049
	});
1023
	//$('#main-content').html(`<iframe class="wrapper" src="${context}/digify/register" style="width:100%;height:100vh"> </iframe>`);
1050
	//$('#main-content').html(`<iframe class="wrapper" src="${context}/digify/register" style="width:100%;height:100vh"> </iframe>`);
1024
	//$('#main-content').html(`<a class="wrapper" href="${context}/digify/register" target="_blank" style="width:100%;height:100vh"> </a>`);
1051
	//$('#main-content').html(`<a class="wrapper" href="${context}/digify/register" target="_blank" style="width:100%;height:100vh"> </a>`);
1025
 
1052
 
1026
});
1053
});
1027
 
1054
 
1028
$(document).on('click', '.warehousewise_stock', function () {
1055
$(document).on('click', '.warehousewise_stock', function() {
1029
	doGetAjaxRequestHandler(`${context}/warehouse/stock-qty`, function (response) {
1056
	doGetAjaxRequestHandler(`${context}/warehouse/stock-qty`, function(response) {
1030
		$('#main-content').html(response);
1057
		$('#main-content').html(response);
1031
	});
1058
	});
1032
});
1059
});
1033
 
1060
 
1034
 
1061