| 28455 |
tejbeer |
1 |
<style>
|
|
|
2 |
.priceTable tr th{
|
|
|
3 |
|
|
|
4 |
padding-bottom:6px;
|
|
|
5 |
}
|
|
|
6 |
|
|
|
7 |
.priceTable tr td{
|
|
|
8 |
|
|
|
9 |
padding-bottom:6px;
|
|
|
10 |
}
|
|
|
11 |
|
|
|
12 |
.modal {
|
|
|
13 |
left: 1037px;
|
|
|
14 |
top: 39px;
|
|
|
15 |
|
|
|
16 |
}
|
|
|
17 |
</style>
|
|
|
18 |
<section>
|
|
|
19 |
<table class="table table-striped priceTable" >
|
|
|
20 |
<thead>
|
|
|
21 |
<tr class="price-drop-header">
|
|
|
22 |
<th>Brand</th>
|
|
|
23 |
#foreach($ym in $ym )
|
|
|
24 |
<th> <input type="hidden" value="$ym.format($dateMonthYearFormatter)"/> $ym.format($dateYearMonthFormatter)</th>
|
|
|
25 |
#end
|
|
|
26 |
<th>Total</th>
|
|
|
27 |
|
|
|
28 |
</tr>
|
|
|
29 |
</thead>
|
|
|
30 |
|
|
|
31 |
<tbody>
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
#foreach($sortedBrandValue in $sortedBrandValue.entrySet())
|
|
|
35 |
<tr>
|
|
|
36 |
|
|
|
37 |
<td class="brand_name"><b>$sortedBrandValue.getKey()</b></td>
|
|
|
38 |
#set($total = 0.0)
|
|
|
39 |
#foreach($sortedBrandValue in $sortedBrandValue.getValue() )
|
|
|
40 |
#set($total = $total + $sortedBrandValue )
|
|
|
41 |
#if($sortedBrandValue != 0.0)
|
|
|
42 |
<td><button type="button" class="btn btn-primary my-price-drop" data-id="$fofoId" data-toggle="modal" data-target="#priceDropDetailsContainer">$sortedBrandValue</button></td>
|
|
|
43 |
#else
|
|
|
44 |
<td><b>-</b></td>
|
|
|
45 |
#end
|
|
|
46 |
#end
|
|
|
47 |
#if($total != 0.0)
|
|
|
48 |
<td><b>$total</b></td>
|
|
|
49 |
#else
|
|
|
50 |
<td><b>0</b></td>
|
|
|
51 |
#end
|
|
|
52 |
</tr>
|
|
|
53 |
#end
|
|
|
54 |
|
|
|
55 |
|
|
|
56 |
|
|
|
57 |
</tbody>
|
|
|
58 |
<div class="price-drop-details-container">
|
|
|
59 |
<div id="priceDropDetailsContainer" class="modal" role="dialog">
|
|
|
60 |
<div class="modal-dialog modal-md">
|
|
|
61 |
<!-- Modal content-->
|
|
|
62 |
<div class="modal-content" style="width: 300px;"></div>
|
|
|
63 |
|
|
|
64 |
</div>
|
|
|
65 |
</div>
|
|
|
66 |
</div>
|
|
|
67 |
|
|
|
68 |
</table>
|
|
|
69 |
|
|
|
70 |
</section>
|
|
|
71 |
|
|
|
72 |
<script>
|
|
|
73 |
$(document).ready(function() {
|
|
|
74 |
|
|
|
75 |
$(document).on('click', ".my-price-drop", function() {
|
|
|
76 |
var fofoId= $(this).data('id');
|
|
|
77 |
var brand = $(this).closest("tr").children('td:first').text();
|
|
|
78 |
|
|
|
79 |
var yearMonth = $(this).closest('table').find('.price-drop-header input[type=hidden]').eq( $(this).closest("td").index()-1).val();
|
|
|
80 |
console.log("id"+yearMonth+brand+fofoId);
|
|
|
81 |
doGetAjaxRequestHandler(context + "/getPriceDropDetails?fofoId=" + fofoId + "&brand=" + brand + "&yearMonth=" + yearMonth, function (response) {
|
|
|
82 |
$('.price-drop-details-container .modal-content').html(response);
|
|
|
83 |
});
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
});
|
|
|
87 |
});
|
|
|
88 |
</script>
|
|
|
89 |
|
|
|
90 |
|