| 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">
|
|
|
82 |
<form id="pdForm">
|
|
|
83 |
<div class="form-group row">
|
|
|
84 |
<div class="col-lg-12">
|
| 26347 |
amit.gupta |
85 |
<input placeholder="Imeis to approve/reject" type="text" class="form-control mk_imeis_text" aria-label="...">
|
|
|
86 |
<div class="input-group">
|
|
|
87 |
<input placeholder="Rejection reason" type="text" class="form-control mk_rejection_reason" aria-label="...">
|
|
|
88 |
<div class="input-group-btn">
|
|
|
89 |
<button type="button" class="btn btn-primary" onclick="updatePriceDropImeis('rejected')">Rejected</button>
|
|
|
90 |
</div><!-- /input-group -->
|
|
|
91 |
</div>
|
|
|
92 |
<button type="button" class="btn btn-primary" onclick="updatePriceDropImeis('approved')">Approved</button>
|
| 24083 |
amit.gupta |
93 |
</div>
|
|
|
94 |
<div class="form-group row">
|
|
|
95 |
<div class="col-lg-4">
|
| 24564 |
amit.gupta |
96 |
<h3>Pending (<span class="mk_pending_count"></span>)</h3>
|
| 24083 |
amit.gupta |
97 |
<select multiple class="mk_pending" style="width:90%;height:400px">
|
|
|
98 |
</select>
|
|
|
99 |
</div>
|
|
|
100 |
<div class="col-lg-4">
|
| 24564 |
amit.gupta |
101 |
<h3>Rejected (<span class="mk_rejected_count"></span>)</h3>
|
| 24083 |
amit.gupta |
102 |
<select multiple class="mk_rejected" style="width:90%;height:400px">
|
|
|
103 |
</select>
|
|
|
104 |
</div>
|
|
|
105 |
<div class="col-lg-4">
|
| 24564 |
amit.gupta |
106 |
<h3>Approved (<span class="mk_approved_count"></span>)</h3>
|
| 24083 |
amit.gupta |
107 |
<select multiple class="mk_approved" style="width:90%;height:400px">
|
|
|
108 |
</select>
|
|
|
109 |
</div>
|
|
|
110 |
</div>
|
|
|
111 |
</form>
|
|
|
112 |
</div>
|
|
|
113 |
<div class="modal-footer">
|
|
|
114 |
<button type="button" class="processPayout btn btn-primary">Process Payout</button>
|
| 26347 |
amit.gupta |
115 |
<button type="button" class="processAuto btn btn-primary">Process Auto</button>
|
| 24083 |
amit.gupta |
116 |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
|
117 |
</div>
|
|
|
118 |
</div>
|
|
|
119 |
</div>
|
|
|
120 |
</div>
|
| 23868 |
amit.gupta |
121 |
<!-- Modal -->
|
| 26318 |
tejbeer |
122 |
<div id="newPriceDropModal" class="modal" role="dialog">
|
| 23868 |
amit.gupta |
123 |
<div class="modal-dialog">
|
|
|
124 |
|
|
|
125 |
<!-- Modal content-->
|
|
|
126 |
<div class="modal-content">
|
|
|
127 |
<div class="modal-header">
|
|
|
128 |
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
|
129 |
<h4 class="modal-title">Add Price Drop</h4>
|
|
|
130 |
</div>
|
|
|
131 |
<div class="modal-body">
|
|
|
132 |
<form id="pdForm">
|
| 23876 |
amit.gupta |
133 |
<div class="form-group row">
|
| 23951 |
amit.gupta |
134 |
<div class="col-lg-6">
|
| 23876 |
amit.gupta |
135 |
<input placeholder="Search Item" type="text" class="form-control typeahead" id="typeaheaditem" name="Item" data-provide="typeahead" autocomplete="off">
|
|
|
136 |
</div>
|
| 23951 |
amit.gupta |
137 |
<div class="col-lg-3">
|
|
|
138 |
<input type="text" class="form-control" id="affectedDate" placeholder="Affected on" type="text"/>
|
|
|
139 |
</div>
|
|
|
140 |
<div class="col-lg-3">
|
|
|
141 |
<button type="button" class="btn btn-primary download-imeis">Download IMEIs</button>
|
|
|
142 |
</div>
|
|
|
143 |
<!--<div class="col-lg-4 checkbox">
|
| 23876 |
amit.gupta |
144 |
<label><input id="allColors" type="checkbox" value="">Apply to all Colors</label>
|
| 23951 |
amit.gupta |
145 |
</div>-->
|
| 23868 |
amit.gupta |
146 |
</div>
|
|
|
147 |
<div class="form-group row">
|
| 24409 |
amit.gupta |
148 |
<div class="col-lg-3">
|
|
|
149 |
<label for="dpDrop">MOP:(<span id="oldMop"></span>)</label>
|
|
|
150 |
<input type="number" class="form-control" id="newMop">
|
| 23868 |
amit.gupta |
151 |
</div>
|
| 24049 |
amit.gupta |
152 |
<div class="col-lg-3">
|
| 24409 |
amit.gupta |
153 |
<label for="dp">DP:(<span id="oldDp"></span>)</label>
|
|
|
154 |
<input type="number" class="form-control" id="newDp">
|
| 23868 |
amit.gupta |
155 |
</div>
|
| 24409 |
amit.gupta |
156 |
<div class="col-lg-3">
|
|
|
157 |
<label for="newTp">TP:(<span id="oldTp"></span>)</label>
|
|
|
158 |
<input type="number" class="form-control" id="newTp">
|
| 24047 |
amit.gupta |
159 |
</div>
|
| 23868 |
amit.gupta |
160 |
</div>
|
|
|
161 |
</form>
|
|
|
162 |
</div>
|
|
|
163 |
<div class="modal-footer">
|
| 23951 |
amit.gupta |
164 |
<button type="button" class="addPriceDrop btn btn-primary">Add Price Drop</button>
|
| 23868 |
amit.gupta |
165 |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
|
166 |
</div>
|
|
|
167 |
</div>
|
|
|
168 |
|
|
|
169 |
</div>
|
|
|
170 |
</div>
|
| 23819 |
govind |
171 |
</ol>
|
|
|
172 |
</div>
|
|
|
173 |
</div>
|
|
|
174 |
|
|
|
175 |
<div class="price-drop-table">
|
|
|
176 |
<div class="row">
|
|
|
177 |
<div class="col-lg-12" id="priceDrop" >
|
|
|
178 |
<table class="table table-striped table-condensed table-bordered">
|
|
|
179 |
<thead>
|
|
|
180 |
<tr>
|
| 25122 |
amit.gupta |
181 |
<th>Drop Id</th>
|
| 23968 |
amit.gupta |
182 |
<th>Item Name</th>
|
| 24410 |
amit.gupta |
183 |
<th>TP</th>
|
|
|
184 |
<th>DP</th>
|
|
|
185 |
<th>Mop</th>
|
| 23968 |
amit.gupta |
186 |
<th>Price Drop</th>
|
| 24410 |
amit.gupta |
187 |
<th>New DP</th>
|
| 23968 |
amit.gupta |
188 |
<th>Affected On</th>
|
| 23876 |
amit.gupta |
189 |
<th>Created On</th>
|
| 26346 |
amit.gupta |
190 |
<th>Payout</th>
|
| 23876 |
amit.gupta |
191 |
<th>Processed On</th>
|
|
|
192 |
<th>Download IMEIs</th>
|
| 23819 |
govind |
193 |
|
|
|
194 |
</tr>
|
|
|
195 |
</thead>
|
|
|
196 |
<tbody>
|
|
|
197 |
#foreach($priceDrop in $priceDrops )
|
| 23968 |
amit.gupta |
198 |
<tr data-pricedropid="$priceDrop.getId()">
|
| 25122 |
amit.gupta |
199 |
<td>$priceDrop.getId()</td>
|
| 23968 |
amit.gupta |
200 |
<td>$catalogDescription.get($priceDrop.getCatalogItemId())</td>
|
| 24992 |
tejbeer |
201 |
<td class="currency">$priceDrop.getTp()</td>
|
|
|
202 |
<td class="currency">$priceDrop.getOldDp()</td>
|
|
|
203 |
<td class="currency">$priceDrop.getMop()</td>
|
|
|
204 |
<td class="currency">$priceDrop.getAmount()</td>
|
|
|
205 |
<td class="currency">$priceDrop.getNewDp()</td>
|
| 23868 |
amit.gupta |
206 |
<td>$priceDrop.getAffectedOn().format($dateFormatter)</td>
|
| 24176 |
amit.gupta |
207 |
<td>$priceDrop.getCreatedOn().format($dateFormatter)</td>
|
| 26333 |
amit.gupta |
208 |
<td>
|
| 26345 |
amit.gupta |
209 |
<input type="number" name="partnerPayout" readonly value="$priceDrop.getAutoPartnerPayout()" class="form-control partner-payout input-sm"/>
|
| 23876 |
amit.gupta |
210 |
</td>
|
|
|
211 |
<td>
|
| 26334 |
amit.gupta |
212 |
#if($priceDrop.getProcessTimestamp())
|
|
|
213 |
$priceDrop.getProcessTimestamp().format($dateTimeFormatter)
|
| 26347 |
amit.gupta |
214 |
<input class="btn btn-info btn-sm mk_view_imeis" data-toggle="modal" data-target="#viewImeisModal" type="submit" value="Process"/>
|
|
|
215 |
#else
|
|
|
216 |
<input class="btn btn-info btn-sm mk_auto_process" type="submit" value="Process"/>
|
| 26334 |
amit.gupta |
217 |
#end
|
|
|
218 |
</td>
|
|
|
219 |
<td>
|
| 23876 |
amit.gupta |
220 |
<input class="downloadtotalIMEI btn btn-info btn-sm" value="Download" type="submit" />
|
|
|
221 |
</td>
|
|
|
222 |
</tr>
|
| 23819 |
govind |
223 |
#end
|
|
|
224 |
</tbody>
|
|
|
225 |
</table>
|
|
|
226 |
</div>
|
|
|
227 |
</div>
|
|
|
228 |
</div>
|
|
|
229 |
</section>
|
| 24406 |
amit.gupta |
230 |
<script type="text/javascript">
|
| 24410 |
amit.gupta |
231 |
$(document).ready(function() {
|
|
|
232 |
var start = moment().subtract(29, 'days');
|
|
|
233 |
var end = moment();
|
|
|
234 |
|
|
|
235 |
priceDropTable = $('#priceDrop').find('table').DataTable({
|
|
|
236 |
pageLength: 20,
|
|
|
237 |
order:[[ 5, 'desc' ]]
|
|
|
238 |
});
|
|
|
239 |
|
|
|
240 |
|
|
|
241 |
getItemAheadOptions($("#typeaheaditem"),function(selectedItem){
|
|
|
242 |
currentItem = selectedItem;
|
|
|
243 |
doGetAjaxRequestHandler(context+"/item-pricing/"+currentItem.itemId, function(response){
|
|
|
244 |
response = JSON.parse(response);
|
|
|
245 |
$('#oldDp').html(response.dp);
|
|
|
246 |
$('#oldMop').html(response.mop);
|
|
|
247 |
$('#oldTp').html(response.tp);
|
|
|
248 |
$('#oldNlc').html(response.nlc);
|
|
|
249 |
});
|
|
|
250 |
});
|
|
|
251 |
getItemAheadOptions($("#typeaheaditem1"), function(selectedItem){
|
|
|
252 |
currentItem = selectedItem;
|
|
|
253 |
doGetAjaxRequestHandler(context+"/item-pricing/"+currentItem.itemId, function(response){
|
| 24745 |
amit.gupta |
254 |
$('.mk_pause_button').data("id", currentItem.catalogId);
|
| 24746 |
amit.gupta |
255 |
$('.mk_pause_button').data("description", currentItem.itemDescription);
|
| 24410 |
amit.gupta |
256 |
response = JSON.parse(response);
|
|
|
257 |
$("#mop").val(response.mop);
|
|
|
258 |
$("#mrp").val(response.mrp);
|
|
|
259 |
$("#dp").val(response.dp);
|
| 24411 |
amit.gupta |
260 |
$("#tp").val(response.tp);
|
| 24410 |
amit.gupta |
261 |
$('#dpValue').html("DP -" + response.dp);
|
|
|
262 |
$('#mopValue').html("MOP -" + response.mop);
|
|
|
263 |
$('#mrpValue').html("MRP -"+ response.mrp);
|
| 24411 |
amit.gupta |
264 |
$('#tpValue').html("TP -"+ response.tp);
|
| 24410 |
amit.gupta |
265 |
});
|
|
|
266 |
});
|
|
|
267 |
affectedDateInput=$('#affectedDate');
|
|
|
268 |
affectedDateInput.daterangepicker(getSingleDatePicker(), dateRangeCallback);
|
|
|
269 |
$("#newPriceDropModal").on('hidden.bs.modal', function () {
|
|
|
270 |
$("#pdForm").trigger("reset");
|
|
|
271 |
});
|
|
|
272 |
$("#addPriceModal").on('hidden.bs.modal', function () {
|
|
|
273 |
$("#pdForm1").trigger("reset");
|
|
|
274 |
});
|
|
|
275 |
});
|
| 23819 |
govind |
276 |
</script>
|