| 28272 |
tejbeer |
1 |
|
|
|
2 |
$(function() {
|
|
|
3 |
|
|
|
4 |
$(document).on('click', '.brands-limit-submit', function() {
|
|
|
5 |
|
|
|
6 |
var brand = $('#show-brands').val();
|
|
|
7 |
|
|
|
8 |
|
|
|
9 |
doGetAjaxRequestHandler(context + "/getRetailerBrandslimitMapping?brand=" + brand,
|
|
|
10 |
function(response) {
|
|
|
11 |
$('.partnerByBrandsLimit').html(response);
|
|
|
12 |
});
|
|
|
13 |
});
|
|
|
14 |
|
|
|
15 |
$(document).on('click', '.brands-update', function() {
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
var brands = $(this).data('brand');
|
|
|
19 |
console.log(brands);
|
|
|
20 |
var limit= $("form#brand-limit-container input[name=inputLimit]").val();
|
|
|
21 |
|
|
|
22 |
doPostAjaxRequestHandler(context + "/setBrandWiseLimit?brands=" + brands + "&limit=" + limit,
|
|
|
23 |
function(response) {
|
|
|
24 |
$('.partnerByBrandsLimit').html(response);
|
|
|
25 |
});
|
|
|
26 |
|
|
|
27 |
});
|
|
|
28 |
|
| 30027 |
manish |
29 |
|
|
|
30 |
$(document).on('click', '.set-stock-limit', function() {
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
var brands = $(this).data('brand');
|
|
|
34 |
var stockLimit= $("form#brand-limit-container input[name=stockLimit]").val();
|
|
|
35 |
console.log(stockLimit);
|
|
|
36 |
doPostAjaxRequestHandler(context + "/setBrandWiseStockLimit?brands=" + brands + "&stockLimit=" + stockLimit,
|
|
|
37 |
function(response) {
|
|
|
38 |
$('.partnerByBrandsLimit').html(response);
|
|
|
39 |
});
|
|
|
40 |
|
|
|
41 |
});
|
|
|
42 |
|
| 28272 |
tejbeer |
43 |
$(document).on('click', '.limit_update_submit', function() {
|
|
|
44 |
var row = $(this).closest("tr");
|
|
|
45 |
|
|
|
46 |
var fofoId = $(this).data('id');
|
| 30027 |
manish |
47 |
|
|
|
48 |
var limit = $(row).find("td:eq(3) input[type='text']").val();
|
|
|
49 |
var minStockLimit = $(row).find("td:eq(5) input[type='text']").val();
|
|
|
50 |
var preLimit = $(row).find("td:eq(2)").text();
|
|
|
51 |
var preStockLimit = $(row).find("td:eq(4)").text();
|
| 28272 |
tejbeer |
52 |
|
|
|
53 |
var brand = $(this).data('brand');
|
| 30027 |
manish |
54 |
|
|
|
55 |
console.log(minStockLimit);
|
|
|
56 |
console.log(limit);
|
| 28272 |
tejbeer |
57 |
|
| 30027 |
manish |
58 |
doPostAjaxRequestHandler(context + "/setUpdateLimit?brand=" + brand + "&limit=" + limit + "&fofoId=" + fofoId + "&minStockLimit=" + minStockLimit + "&preLimit=" + preLimit + "&preStockLimit=" + preStockLimit,
|
| 28272 |
tejbeer |
59 |
function(response) {
|
|
|
60 |
row.html(response);
|
|
|
61 |
});
|
|
|
62 |
|
|
|
63 |
});
|
|
|
64 |
|
|
|
65 |
});
|