| 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>
|
| 24055 |
amit.gupta |
20 |
<li><button type="button" data-toggle="modal" class="btn btn-sm btn-primary" data-target="#newPriceDropModal">Add new Price Drop</li>
|
| 24406 |
amit.gupta |
21 |
<li><button type="button" data-toggle="modal" class="btn btn-sm btn-primary" data-target="#addPriceModal">Add/Update Pricing</li>
|
| 24052 |
amit.gupta |
22 |
<li><button type="button" data-toggle="modal" class="btn btn-sm btn-primary mk_download_pricing" data-target="#addPricing">Download Pricing</li>
|
| 26318 |
tejbeer |
23 |
<div id="addPriceModal" class="modal" role="dialog">
|
| 24052 |
amit.gupta |
24 |
<div class="modal-dialog">
|
|
|
25 |
|
|
|
26 |
<!-- Modal content-->
|
|
|
27 |
<div class="modal-content">
|
|
|
28 |
<div class="modal-header">
|
|
|
29 |
<button type="button" class="close" data-dismiss="modal">×</button>
|
| 24406 |
amit.gupta |
30 |
<h4 class="modal-title">Add/Update Pricing</h4>
|
| 24052 |
amit.gupta |
31 |
</div>
|
|
|
32 |
<div class="modal-body">
|
|
|
33 |
<form id="pdForm1">
|
|
|
34 |
<div class="form-group row">
|
| 24411 |
amit.gupta |
35 |
<div class="col-lg-8">
|
| 24062 |
amit.gupta |
36 |
<label for="typeaheaditem1">Item:</label>
|
| 24052 |
amit.gupta |
37 |
<input placeholder="Search Item" type="text" class="form-control typeahead" id="typeaheaditem1" name="Item" data-provide="typeahead" autocomplete="off">
|
|
|
38 |
</div>
|
| 24743 |
amit.gupta |
39 |
<div class="col-lg-4">
|
| 24744 |
amit.gupta |
40 |
<div> </div>
|
| 24743 |
amit.gupta |
41 |
<button type="button" class="btn btn-primary mk_pause_button">Active/Pause</button>
|
|
|
42 |
</div>
|
| 24411 |
amit.gupta |
43 |
</div>
|
|
|
44 |
<div class="form-group row">
|
| 24058 |
amit.gupta |
45 |
<div class="col-lg-2">
|
| 24411 |
amit.gupta |
46 |
<label id="tpValue">TP - </label>
|
|
|
47 |
<input type="text" class="form-control" id="tp" placeholder="TP" type="text"/>
|
|
|
48 |
</div>
|
|
|
49 |
<div class="col-lg-2">
|
| 24062 |
amit.gupta |
50 |
<label id="dpValue">DP - </label>
|
| 24052 |
amit.gupta |
51 |
<input type="text" class="form-control" id="dp" placeholder="DP" type="text"/>
|
|
|
52 |
</div>
|
| 24055 |
amit.gupta |
53 |
<div class="col-lg-2">
|
| 24062 |
amit.gupta |
54 |
<label id="mopValue">MOP - </label>
|
| 24052 |
amit.gupta |
55 |
<input type="text" class="form-control" id="mop" placeholder="MOP" type="text"/>
|
|
|
56 |
</div>
|
| 24055 |
amit.gupta |
57 |
<div class="col-lg-2">
|
| 24062 |
amit.gupta |
58 |
<label id="mrpValue">MRP -</label>
|
| 24058 |
amit.gupta |
59 |
<input type="text" class="form-control" id="mrp" placeholder="MRP" type="text"/>
|
| 24055 |
amit.gupta |
60 |
</div>
|
| 24052 |
amit.gupta |
61 |
</div>
|
| 24056 |
amit.gupta |
62 |
</form>
|
|
|
63 |
</div>
|
|
|
64 |
<div class="modal-footer">
|
|
|
65 |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
|
66 |
<button type="button" class="btn btn-primary add-pricing">Add Pricing</button>
|
|
|
67 |
</div>
|
| 24052 |
amit.gupta |
68 |
|
|
|
69 |
</div>
|
| 24055 |
amit.gupta |
70 |
</div>
|
|
|
71 |
</div>
|
| 24052 |
amit.gupta |
72 |
|
| 26318 |
tejbeer |
73 |
<div id="viewImeisModal" class="modal" role="dialog">
|
| 24083 |
amit.gupta |
74 |
<div class="modal-dialog">
|
|
|
75 |
<!-- Modal content-->
|
|
|
76 |
<div class="modal-content">
|
|
|
77 |
<div class="modal-header">
|
|
|
78 |
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
|
79 |
<h4 class="modal-title">Add Price Drop</h4>
|
|
|
80 |
</div>
|
|
|
81 |
<div class="modal-body">
|
| 26351 |
amit.gupta |
82 |
<form id="statusForm">
|
| 24083 |
amit.gupta |
83 |
<div class="form-group row">
|
| 28568 |
amit.gupta |
84 |
<div class="col-lg-12 row">
|
| 26347 |
amit.gupta |
85 |
<input placeholder="Imeis to approve/reject" type="text" class="form-control mk_imeis_text" aria-label="...">
|
| 26354 |
amit.gupta |
86 |
</div>
|
| 26355 |
amit.gupta |
87 |
<div class="col-lg-9">
|
| 26347 |
amit.gupta |
88 |
<input placeholder="Rejection reason" type="text" class="form-control mk_rejection_reason" aria-label="...">
|
| 28568 |
amit.gupta |
89 |
</div>
|
|
|
90 |
<div class="col-lg-2 form-group">
|
|
|
91 |
<select class="form-control input-sm" id = "selectPriceDropStatus" name="selectPriceDropStatus" placeholder="Status" style="border: 3px solid black; width: 94px;" >
|
|
|
92 |
|
|
|
93 |
<option value="status"disabled selected>Status</option>
|
|
|
94 |
<option value="hold" >Hold</option>
|
|
|
95 |
<option value="pending">Pending</option>
|
|
|
96 |
<option value="rejected">Rejected</option>
|
|
|
97 |
<option value="approved">Approved</option>
|
|
|
98 |
|
|
|
99 |
</select>
|
|
|
100 |
</div>
|
|
|
101 |
</div>
|
|
|
102 |
|
| 24083 |
amit.gupta |
103 |
<div class="form-group row">
|
| 28568 |
amit.gupta |
104 |
<div class="col-lg-3">
|
|
|
105 |
<h4>Hold (<span class="mk_hold_count"></span>)</h4>
|
|
|
106 |
<select multiple id="holdList" class="mk_hold" style="width:98%;height:400px">
|
| 24083 |
amit.gupta |
107 |
</select>
|
|
|
108 |
</div>
|
| 28568 |
amit.gupta |
109 |
<div class="col-lg-3">
|
|
|
110 |
<h4>Pending (<span class="mk_pending_count"></span>)</h4>
|
|
|
111 |
<select multiple id="pendingList" class="mk_pending" style="width:98%;height:400px">
|
| 24083 |
amit.gupta |
112 |
</select>
|
|
|
113 |
</div>
|
| 28568 |
amit.gupta |
114 |
<div class="col-lg-3">
|
|
|
115 |
<h4>Rejected (<span class="mk_rejected_count"></span>)</h4>
|
|
|
116 |
<select multiple class="mk_rejected" style="width:98%;height:400px">
|
| 24083 |
amit.gupta |
117 |
</select>
|
|
|
118 |
</div>
|
| 28568 |
amit.gupta |
119 |
<div class="col-lg-3">
|
|
|
120 |
<h4>Approved (<span class="mk_approved_count"></span>)</h4>
|
|
|
121 |
<select multiple class="mk_approved" style="width:98%;height:400px">
|
|
|
122 |
</select>
|
|
|
123 |
</div>
|
|
|
124 |
|
| 24083 |
amit.gupta |
125 |
</div>
|
|
|
126 |
</form>
|
|
|
127 |
</div>
|
|
|
128 |
<div class="modal-footer">
|
| 26354 |
amit.gupta |
129 |
<button type="button" class="closePriceDrop btn btn-primary">Close Price Dop</button>
|
| 24083 |
amit.gupta |
130 |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
|
131 |
</div>
|
|
|
132 |
</div>
|
|
|
133 |
</div>
|
|
|
134 |
</div>
|
| 23868 |
amit.gupta |
135 |
<!-- Modal -->
|
| 26318 |
tejbeer |
136 |
<div id="newPriceDropModal" class="modal" role="dialog">
|
| 23868 |
amit.gupta |
137 |
<div class="modal-dialog">
|
|
|
138 |
|
|
|
139 |
<!-- Modal content-->
|
|
|
140 |
<div class="modal-content">
|
|
|
141 |
<div class="modal-header">
|
|
|
142 |
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
|
143 |
<h4 class="modal-title">Add Price Drop</h4>
|
|
|
144 |
</div>
|
|
|
145 |
<div class="modal-body">
|
|
|
146 |
<form id="pdForm">
|
| 23876 |
amit.gupta |
147 |
<div class="form-group row">
|
| 23951 |
amit.gupta |
148 |
<div class="col-lg-6">
|
| 23876 |
amit.gupta |
149 |
<input placeholder="Search Item" type="text" class="form-control typeahead" id="typeaheaditem" name="Item" data-provide="typeahead" autocomplete="off">
|
|
|
150 |
</div>
|
| 23951 |
amit.gupta |
151 |
<div class="col-lg-3">
|
|
|
152 |
<input type="text" class="form-control" id="affectedDate" placeholder="Affected on" type="text"/>
|
|
|
153 |
</div>
|
|
|
154 |
<div class="col-lg-3">
|
|
|
155 |
<button type="button" class="btn btn-primary download-imeis">Download IMEIs</button>
|
|
|
156 |
</div>
|
|
|
157 |
<!--<div class="col-lg-4 checkbox">
|
| 23876 |
amit.gupta |
158 |
<label><input id="allColors" type="checkbox" value="">Apply to all Colors</label>
|
| 23951 |
amit.gupta |
159 |
</div>-->
|
| 23868 |
amit.gupta |
160 |
</div>
|
|
|
161 |
<div class="form-group row">
|
| 24409 |
amit.gupta |
162 |
<div class="col-lg-3">
|
|
|
163 |
<label for="dpDrop">MOP:(<span id="oldMop"></span>)</label>
|
|
|
164 |
<input type="number" class="form-control" id="newMop">
|
| 23868 |
amit.gupta |
165 |
</div>
|
| 24049 |
amit.gupta |
166 |
<div class="col-lg-3">
|
| 24409 |
amit.gupta |
167 |
<label for="dp">DP:(<span id="oldDp"></span>)</label>
|
|
|
168 |
<input type="number" class="form-control" id="newDp">
|
| 23868 |
amit.gupta |
169 |
</div>
|
| 24409 |
amit.gupta |
170 |
<div class="col-lg-3">
|
|
|
171 |
<label for="newTp">TP:(<span id="oldTp"></span>)</label>
|
|
|
172 |
<input type="number" class="form-control" id="newTp">
|
| 24047 |
amit.gupta |
173 |
</div>
|
| 23868 |
amit.gupta |
174 |
</div>
|
|
|
175 |
</form>
|
|
|
176 |
</div>
|
|
|
177 |
<div class="modal-footer">
|
| 23951 |
amit.gupta |
178 |
<button type="button" class="addPriceDrop btn btn-primary">Add Price Drop</button>
|
| 23868 |
amit.gupta |
179 |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
|
180 |
</div>
|
|
|
181 |
</div>
|
|
|
182 |
|
|
|
183 |
</div>
|
|
|
184 |
</div>
|
| 23819 |
govind |
185 |
</ol>
|
|
|
186 |
</div>
|
|
|
187 |
</div>
|
|
|
188 |
|
|
|
189 |
<div class="price-drop-table">
|
|
|
190 |
<div class="row">
|
|
|
191 |
<div class="col-lg-12" id="priceDrop" >
|
|
|
192 |
<table class="table table-striped table-condensed table-bordered">
|
|
|
193 |
<thead>
|
|
|
194 |
<tr>
|
| 25122 |
amit.gupta |
195 |
<th>Drop Id</th>
|
| 23968 |
amit.gupta |
196 |
<th>Item Name</th>
|
| 24410 |
amit.gupta |
197 |
<th>TP</th>
|
|
|
198 |
<th>DP</th>
|
|
|
199 |
<th>Mop</th>
|
| 23968 |
amit.gupta |
200 |
<th>Price Drop</th>
|
| 24410 |
amit.gupta |
201 |
<th>New DP</th>
|
| 23968 |
amit.gupta |
202 |
<th>Affected On</th>
|
| 23876 |
amit.gupta |
203 |
<th>Created On</th>
|
| 26346 |
amit.gupta |
204 |
<th>Payout</th>
|
| 28643 |
amit.gupta |
205 |
#if(!$processOn)
|
| 23876 |
amit.gupta |
206 |
<th>Processed On</th>
|
| 28641 |
amit.gupta |
207 |
#else
|
|
|
208 |
#end
|
| 23876 |
amit.gupta |
209 |
<th>Download IMEIs</th>
|
| 23819 |
govind |
210 |
|
|
|
211 |
</tr>
|
|
|
212 |
</thead>
|
|
|
213 |
<tbody>
|
|
|
214 |
#foreach($priceDrop in $priceDrops )
|
| 23968 |
amit.gupta |
215 |
<tr data-pricedropid="$priceDrop.getId()">
|
| 25122 |
amit.gupta |
216 |
<td>$priceDrop.getId()</td>
|
| 23968 |
amit.gupta |
217 |
<td>$catalogDescription.get($priceDrop.getCatalogItemId())</td>
|
| 24992 |
tejbeer |
218 |
<td class="currency">$priceDrop.getTp()</td>
|
|
|
219 |
<td class="currency">$priceDrop.getOldDp()</td>
|
|
|
220 |
<td class="currency">$priceDrop.getMop()</td>
|
|
|
221 |
<td class="currency">$priceDrop.getAmount()</td>
|
|
|
222 |
<td class="currency">$priceDrop.getNewDp()</td>
|
| 23868 |
amit.gupta |
223 |
<td>$priceDrop.getAffectedOn().format($dateFormatter)</td>
|
| 24176 |
amit.gupta |
224 |
<td>$priceDrop.getCreatedOn().format($dateFormatter)</td>
|
| 26333 |
amit.gupta |
225 |
<td>
|
| 27054 |
amit.gupta |
226 |
#if($priceDrop.getProcessTimestamp())
|
| 27071 |
amit.gupta |
227 |
$priceDrop.getProcessTimestamp().format($dateTimeFormatter)<br>
|
|
|
228 |
<input type="number" name="partnerPayout" readonly value="$priceDrop.getAutoPartnerPayout()" class="form-control partner-payout input-sm"/>
|
|
|
229 |
#else
|
|
|
230 |
<input type="number" name="partnerPayout" value="$priceDrop.getAutoPartnerPayout()" class="form-control partner-payout input-sm"/>
|
| 27054 |
amit.gupta |
231 |
#end
|
| 26334 |
amit.gupta |
232 |
</td>
|
| 28641 |
amit.gupta |
233 |
#if(!$priceDrop.getCompleteTimestamp())
|
| 26334 |
amit.gupta |
234 |
<td>
|
| 27071 |
amit.gupta |
235 |
<input class="btn btn-info btn-sm mk_view_imeis" data-toggle="modal" data-target="#viewImeisModal" type="submit" value="Process Manually"/>
|
|
|
236 |
<input class="btn btn-info btn-sm mk_auto_process" data-activatedonly="false" type="submit" value="Process All"/><br>
|
|
|
237 |
<input class="btn btn-info btn-sm mk_auto_process" data-activatedonly="true" type="submit" value="Process Activated Only"/>
|
|
|
238 |
</td>
|
| 28641 |
amit.gupta |
239 |
#else
|
|
|
240 |
|
|
|
241 |
#end
|
| 27071 |
amit.gupta |
242 |
<td>
|
| 23876 |
amit.gupta |
243 |
<input class="downloadtotalIMEI btn btn-info btn-sm" value="Download" type="submit" />
|
|
|
244 |
</td>
|
|
|
245 |
</tr>
|
| 23819 |
govind |
246 |
#end
|
|
|
247 |
</tbody>
|
|
|
248 |
</table>
|
|
|
249 |
</div>
|
|
|
250 |
</div>
|
|
|
251 |
</div>
|
|
|
252 |
</section>
|
| 24406 |
amit.gupta |
253 |
<script type="text/javascript">
|
| 24410 |
amit.gupta |
254 |
$(document).ready(function() {
|
| 28568 |
amit.gupta |
255 |
$(document).on('click', "#selectPriceDropStatus", function() {
|
|
|
256 |
var status = $("#selectPriceDropStatus").val();
|
|
|
257 |
updatePriceDropImeis(status)
|
|
|
258 |
});
|
|
|
259 |
|
| 24410 |
amit.gupta |
260 |
var start = moment().subtract(29, 'days');
|
|
|
261 |
var end = moment();
|
|
|
262 |
|
|
|
263 |
priceDropTable = $('#priceDrop').find('table').DataTable({
|
|
|
264 |
pageLength: 20,
|
|
|
265 |
order:[[ 5, 'desc' ]]
|
|
|
266 |
});
|
|
|
267 |
|
|
|
268 |
|
| 27618 |
tejbeer |
269 |
getItemAheadOptions($("#typeaheaditem"),true,function(selectedItem){
|
| 24410 |
amit.gupta |
270 |
currentItem = selectedItem;
|
|
|
271 |
doGetAjaxRequestHandler(context+"/item-pricing/"+currentItem.itemId, function(response){
|
|
|
272 |
response = JSON.parse(response);
|
|
|
273 |
$('#oldDp').html(response.dp);
|
|
|
274 |
$('#oldMop').html(response.mop);
|
|
|
275 |
$('#oldTp').html(response.tp);
|
|
|
276 |
$('#oldNlc').html(response.nlc);
|
|
|
277 |
});
|
|
|
278 |
});
|
| 27618 |
tejbeer |
279 |
getItemAheadOptions($("#typeaheaditem1"),true, function(selectedItem){
|
| 24410 |
amit.gupta |
280 |
currentItem = selectedItem;
|
|
|
281 |
doGetAjaxRequestHandler(context+"/item-pricing/"+currentItem.itemId, function(response){
|
| 24745 |
amit.gupta |
282 |
$('.mk_pause_button').data("id", currentItem.catalogId);
|
| 24746 |
amit.gupta |
283 |
$('.mk_pause_button').data("description", currentItem.itemDescription);
|
| 24410 |
amit.gupta |
284 |
response = JSON.parse(response);
|
|
|
285 |
$("#mop").val(response.mop);
|
|
|
286 |
$("#mrp").val(response.mrp);
|
|
|
287 |
$("#dp").val(response.dp);
|
| 24411 |
amit.gupta |
288 |
$("#tp").val(response.tp);
|
| 24410 |
amit.gupta |
289 |
$('#dpValue').html("DP -" + response.dp);
|
|
|
290 |
$('#mopValue').html("MOP -" + response.mop);
|
|
|
291 |
$('#mrpValue').html("MRP -"+ response.mrp);
|
| 24411 |
amit.gupta |
292 |
$('#tpValue').html("TP -"+ response.tp);
|
| 24410 |
amit.gupta |
293 |
});
|
|
|
294 |
});
|
|
|
295 |
affectedDateInput=$('#affectedDate');
|
|
|
296 |
affectedDateInput.daterangepicker(getSingleDatePicker(), dateRangeCallback);
|
|
|
297 |
$("#newPriceDropModal").on('hidden.bs.modal', function () {
|
|
|
298 |
$("#pdForm").trigger("reset");
|
|
|
299 |
});
|
|
|
300 |
$("#addPriceModal").on('hidden.bs.modal', function () {
|
|
|
301 |
$("#pdForm1").trigger("reset");
|
|
|
302 |
});
|
|
|
303 |
});
|
| 23819 |
govind |
304 |
</script>
|