| 29707 |
tejbeer |
1 |
<style>
|
|
|
2 |
.upgradeTable tr th{
|
|
|
3 |
|
|
|
4 |
padding-bottom:6px;
|
|
|
5 |
}
|
|
|
6 |
|
|
|
7 |
.upgradeTable 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 upgradeTable" >
|
|
|
20 |
<thead>
|
|
|
21 |
<tr class="upgrade-header">
|
|
|
22 |
<th>Brand</th>
|
|
|
23 |
<th>Before $yms.get(0).format($dateYearMonthFormatter)</th>
|
|
|
24 |
|
|
|
25 |
#foreach($ym in $yms )
|
|
|
26 |
<th> <input type="hidden" value="$ym.format($dateMonthYearFormatter)"/> $ym.format($dateYearMonthFormatter)</th>
|
|
|
27 |
#end
|
|
|
28 |
<th>Total</th>
|
|
|
29 |
</tr>
|
|
|
30 |
</thead>
|
|
|
31 |
|
|
|
32 |
<tbody>
|
|
|
33 |
|
|
|
34 |
<tr>
|
|
|
35 |
<td class="brand_name"><b>$brand</b></td>
|
|
|
36 |
#set($total = 0.0)
|
|
|
37 |
|
|
|
38 |
|
|
|
39 |
#if($pendingUpgradeOfferBeforeSixMonthMap.get($brand))
|
|
|
40 |
<td><button type="button" class="btn btn-primary offer-before-six-month" data-id="$fofoId" data-toggle="modal" data-target="#upgradeDetailsContainer">$pendingUpgradeOfferBeforeSixMonthMap.get($brand)</button></td>
|
|
|
41 |
#set($total = $total + $pendingUpgradeOfferBeforeSixMonthMap.get($brand))
|
|
|
42 |
#else
|
|
|
43 |
<td>-</td>
|
|
|
44 |
#end
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
#if($sortedBrandValue.get($brand))
|
|
|
48 |
#foreach($sortedBrandValue in $sortedBrandValue.get($brand))
|
|
|
49 |
#set($total = $total + $sortedBrandValue)
|
|
|
50 |
#if($sortedBrandValue != 0.0)
|
|
|
51 |
<td><button type="button" class="btn btn-primary upgrade-offer-yearmonth" data-id="$fofoId"Ract data-toggle="modal" data-target="#upgradeDetailsContainer">$sortedBrandValue</button></td>
|
|
|
52 |
#else
|
|
|
53 |
<td><b>-</b></td>
|
|
|
54 |
#end
|
|
|
55 |
#end
|
|
|
56 |
|
|
|
57 |
#end
|
|
|
58 |
#if($total != 0.0)
|
|
|
59 |
<td><b>$total</b></td>
|
|
|
60 |
#else
|
|
|
61 |
<td><b>0</b></td>
|
|
|
62 |
#end
|
|
|
63 |
</tr>
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
</tbody>
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
<div class="upgrade-details-container">
|
|
|
70 |
<div id="upgradeDetailsContainer" class="modal" role="dialog">
|
|
|
71 |
<div class="modal-dialog modal-md">
|
|
|
72 |
<!-- Modal content-->
|
|
|
73 |
<div class="modal-content" style="width: 500px;"></div>
|
|
|
74 |
|
|
|
75 |
</div>
|
|
|
76 |
</div>
|
|
|
77 |
</div>
|
|
|
78 |
</table>
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
<script>
|
|
|
82 |
$(document).ready(function() {
|
|
|
83 |
|
|
|
84 |
$(document).on('click', ".upgrade-offer-yearmonth", function() {
|
|
|
85 |
var fofoId= $(this).data('id');
|
|
|
86 |
var brand = $(this).closest("tr").children('td:first').text();
|
|
|
87 |
|
|
|
88 |
var yearMonth = $(this).closest('table').find('.upgrade-header input[type=hidden]').eq( $(this).closest("td").index()-2).val();
|
|
|
89 |
console.log("id"+yearMonth+brand+fofoId);
|
|
|
90 |
doGetAjaxRequestHandler(context + "/getMonthlyUpgradeOfferItemDetail?fofoId=" + fofoId + "&brand=" + brand + "&yearMonth=" + yearMonth, function (response) {
|
|
|
91 |
$('.upgrade-details-container .modal-content').html(response);
|
|
|
92 |
});
|
|
|
93 |
|
|
|
94 |
|
|
|
95 |
});
|
|
|
96 |
|
|
|
97 |
$(document).on('click', ".offer-before-six-month", function() {
|
|
|
98 |
var fofoId= $(this).data('id');
|
|
|
99 |
var brand = $(this).closest("tr").children('td:first').text();
|
|
|
100 |
|
|
|
101 |
console.log("id"+brand);
|
|
|
102 |
console.log("fofoId"+fofoId);
|
|
|
103 |
|
|
|
104 |
|
|
|
105 |
doGetAjaxRequestHandler(context + "/getUpgradeOfferBeforeSixMonthItemDetail?fofoId=" + fofoId + "&brand=" + brand, function (response) {
|
|
|
106 |
$('.upgrade-details-container .modal-content').html(response);
|
|
|
107 |
});
|
|
|
108 |
|
|
|
109 |
|
|
|
110 |
|
|
|
111 |
});
|
|
|
112 |
|
|
|
113 |
});
|
|
|
114 |
</script>
|
|
|
115 |
|
|
|
116 |
</section>
|
|
|
117 |
|
|
|
118 |
|
|
|
119 |
|