| 23819 |
govind |
1 |
<style>
|
|
|
2 |
|
|
|
3 |
.btn:hover{
|
|
|
4 |
color: grey;
|
|
|
5 |
text-decoration: none;
|
|
|
6 |
}
|
|
|
7 |
.btn-info:hover{
|
|
|
8 |
color: grey;
|
|
|
9 |
text-decoration: none;
|
|
|
10 |
}
|
|
|
11 |
}
|
|
|
12 |
</style>
|
|
|
13 |
<section class="wrapper">
|
|
|
14 |
<div class="row">
|
|
|
15 |
<div class="col-lg-12">
|
|
|
16 |
<h3 class="page-header"><i class="icon_document_alt"></i>PriceDrop</h3>
|
|
|
17 |
<ol class="breadcrumb">
|
|
|
18 |
<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
|
|
|
19 |
<li><i class="icon_document_alt"></i>PriceDrop</li>
|
| 23868 |
amit.gupta |
20 |
<li><button type="button" data-toggle="modal" class="btn btn-sm btn-primary mk_new_price_drop" data-target="#newPriceDropModal">Add new</li>
|
|
|
21 |
<!-- Modal -->
|
|
|
22 |
<div id="newPriceDropModal" class="modal fade" role="dialog">
|
|
|
23 |
<div class="modal-dialog">
|
|
|
24 |
|
|
|
25 |
<!-- Modal content-->
|
|
|
26 |
<div class="modal-content">
|
|
|
27 |
<div class="modal-header">
|
|
|
28 |
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
|
29 |
<h4 class="modal-title">Add Price Drop</h4>
|
|
|
30 |
</div>
|
|
|
31 |
<div class="modal-body">
|
|
|
32 |
<form id="pdForm">
|
|
|
33 |
<div class="form-group">
|
|
|
34 |
<input placeholder="Search Item" type="text" class="form-control typeahead" id="typeaheaditem" name="Item" data-provide="typeahead" autocomplete="off">
|
|
|
35 |
</div>
|
|
|
36 |
<div class="form-group row">
|
|
|
37 |
<div class="col-lg-4">
|
|
|
38 |
<label for="priceDrop">Price Drop Announced:</label>
|
|
|
39 |
<input type="number" class="form-control" id="pd">
|
|
|
40 |
</div>
|
|
|
41 |
<div class="col-lg-4">
|
|
|
42 |
<label for="dpDrop">Affected On:</label>
|
|
|
43 |
<input type="text" class="form-control" id="affectedDate" placeholder="DD/MM/YYYY" type="text"/>
|
|
|
44 |
</div>
|
|
|
45 |
<div class="col-lg-4">
|
|
|
46 |
<div class="checkbox">
|
|
|
47 |
<label><input type="checkbox" value="">Apply on all Colors</label>
|
|
|
48 |
</div>
|
|
|
49 |
</div>
|
|
|
50 |
</div>
|
|
|
51 |
<div class="form-group row">
|
|
|
52 |
<div class="col-lg-4">
|
|
|
53 |
<label for="dpDrop">New MOP:</label>
|
|
|
54 |
<input type="number" class="form-control" id="newMop">
|
|
|
55 |
</div>
|
|
|
56 |
<div class="col-lg-4">
|
|
|
57 |
<label for="dpDrop">New Transfer Price:</label>
|
|
|
58 |
<input type="number" class="form-control" id="newTp">
|
|
|
59 |
</div>
|
|
|
60 |
<div class="col-lg-4">
|
|
|
61 |
<label for="dpDrop">New NLC:</label>
|
|
|
62 |
<input type="number" class="form-control" id="newNlc">
|
|
|
63 |
</div>
|
|
|
64 |
</div>
|
|
|
65 |
</form>
|
|
|
66 |
</div>
|
|
|
67 |
<div class="modal-footer">
|
|
|
68 |
<button type="button" class="addPriceDrop btn btn-primary">Submit</button>
|
|
|
69 |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
|
70 |
</div>
|
|
|
71 |
</div>
|
|
|
72 |
|
|
|
73 |
</div>
|
|
|
74 |
</div>
|
| 23819 |
govind |
75 |
</ol>
|
|
|
76 |
</div>
|
|
|
77 |
</div>
|
|
|
78 |
|
|
|
79 |
<div class="price-drop-table">
|
|
|
80 |
<div class="row">
|
|
|
81 |
<div class="col-lg-12" id="priceDrop" >
|
|
|
82 |
<table class="table table-striped table-condensed table-bordered">
|
|
|
83 |
<thead>
|
|
|
84 |
<tr>
|
|
|
85 |
<th>ItemId</th>
|
|
|
86 |
<th>ItemDescription</th>
|
|
|
87 |
<th>PriceDrop<br/>Amount</th>
|
|
|
88 |
<th>AffetcedOn</th>
|
|
|
89 |
<th>Cashback<br/>Amount</th>
|
|
|
90 |
<th>Process</th>
|
|
|
91 |
<th>Download<br/>IMEI<br/>For<br/>Partners</th>
|
|
|
92 |
<th>Download<br/>All<br/>IMEI</th>
|
|
|
93 |
|
|
|
94 |
</tr>
|
|
|
95 |
</thead>
|
|
|
96 |
<tbody>
|
|
|
97 |
#foreach($priceDrop in $priceDrops )
|
|
|
98 |
<tr>
|
|
|
99 |
<td>$priceDrop.getItemId()</td>
|
| 23868 |
amit.gupta |
100 |
<td>$tagListingMap.get($priceDrop.getItemId()).getItemDescription()</td>
|
| 23819 |
govind |
101 |
<td>$priceDrop.getAmount()</td>
|
| 23868 |
amit.gupta |
102 |
<td>$priceDrop.getAffectedOn().format($dateFormatter)</td>
|
| 23819 |
govind |
103 |
#if($priceDrop.getProcessTimestamp())
|
|
|
104 |
<td>$priceDrop.getCashbackAmount()</td>
|
| 23868 |
amit.gupta |
105 |
<td>$priceDrop.getProcessTimestamp().format($dateTimeFormatter)</td>
|
| 23819 |
govind |
106 |
#else
|
|
|
107 |
<td><div><input type="number" id="$priceDrop.getId()" name="processedamount" placeholder = "$priceDrop.getAmount()" class="form-control phone input-sm"/>
|
|
|
108 |
<input class="btn btn-info btn-sm" data-cashback="$priceDrop.getId()" style="width:35%;border-radius:0px;" type="submit" value="Cashback" id="cashTopartner"/>
|
|
|
109 |
</div></td>
|
|
|
110 |
<td>Not Processed</td>
|
|
|
111 |
|
|
|
112 |
#end
|
|
|
113 |
<td><input class="btn btn-info btn-sm" data-download="$priceDrop.getId()" style="width:100%;border-radius:0px;" type="submit" value="Download" id="download"/></td>
|
|
|
114 |
<td><input class="btn btn-info btn-sm" data-pricedropidfortotalimei="$priceDrop.getId()" style="width:100%;border-radius:0px;" value="Download" type="submit" id="downloadtotalIMEI"/></td>
|
|
|
115 |
</tr>
|
|
|
116 |
#end
|
|
|
117 |
</tbody>
|
|
|
118 |
</table>
|
|
|
119 |
</div>
|
|
|
120 |
</div>
|
|
|
121 |
</div>
|
|
|
122 |
</section>
|
|
|
123 |
|
|
|
124 |
<script type="text/javascript">
|
|
|
125 |
$(document).ready(function() {
|
| 23868 |
amit.gupta |
126 |
var start = moment().subtract(29, 'days');
|
|
|
127 |
var end = moment();
|
|
|
128 |
|
| 23819 |
govind |
129 |
priceDropTable = $('#priceDrop').find('table').DataTable({
|
|
|
130 |
"pageLength": 10,
|
|
|
131 |
order:[[ 5, 'desc' ]]
|
|
|
132 |
});
|
| 23868 |
amit.gupta |
133 |
customItems = $customItems;
|
|
|
134 |
itemAhead = $("#typeaheaditem").typeahead({
|
|
|
135 |
source: customItems,
|
|
|
136 |
autoSelect: false,
|
|
|
137 |
displayText:function(item){return item.itemDescription;},
|
|
|
138 |
afterSelect: function(currentItem){
|
|
|
139 |
console.log(currentItem);
|
|
|
140 |
currentItemId = currentItem.id;
|
|
|
141 |
}
|
|
|
142 |
});
|
| 23819 |
govind |
143 |
});
|
| 23868 |
amit.gupta |
144 |
affectedDateInput=$('#affectedDate');
|
|
|
145 |
affectedDateInput.daterangepicker({
|
|
|
146 |
todayHighlight: true,
|
|
|
147 |
startDate: moment(),
|
|
|
148 |
maxDate: moment(),
|
|
|
149 |
autoclose: true,
|
|
|
150 |
autoUpdateInput: true,
|
|
|
151 |
singleDatePicker: true,
|
|
|
152 |
locale: {
|
|
|
153 |
format: 'DD/MM/YYYY'
|
|
|
154 |
}
|
|
|
155 |
});
|
|
|
156 |
$("#newPriceDropModal").on('hidden.bs.modal', function () {
|
|
|
157 |
$("#pdForm").trigger("reset");
|
|
|
158 |
});
|
| 23819 |
govind |
159 |
</script>
|