Rev 30601 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<section class="wrapper"><div class="row"><div class="col-lg-12"><h3 class="page-header"><i class="icon_document_alt"></i>PriceDrop</h3><ol class="breadcrumb"><li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li><li><i class="icon_document_alt"></i>PriceDrop</li><li><button type="button" data-toggle="modal" class="btn btn-sm btn-primary"data-target="#newPriceDropModal">Add new Price Drop</button></li><li><button type="button" data-toggle="modal" class="btn btn-sm btn-primary"data-target="#addPriceModal">Add/Update Pricing</button></li><li><button type="button" data-toggle="modal" class="btn btn-sm btn-primary mk_download_pricing"data-target="#addPricing">Download Pricing</button></li><div id="addPriceModal" class="modal" role="dialog"><div class="modal-dialog"><!-- Modal content--><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal">×</button><h4 class="modal-title">Add/Update Pricing</h4></div><div class="modal-body"><form id="pdForm1"><div class="form-group row"><div class="col-lg-8"><label for="typeaheaditem1">Item:</label><input placeholder="Search Item" type="text" class="form-control typeahead"id="typeaheaditem1" name="Item" data-provide="typeahead"autocomplete="off"></div><div class="col-lg-4"><div> </div><button type="button" class="btn btn-primary mk_pause_button">Active/Pause</button></div></div><div class="form-group row"><div class="col-lg-2"><label id="tpValue">TP - </label><input type="text" class="form-control" id="tp" placeholder="TP"/></div><div class="col-lg-2"><label id="dpValue">DP - </label><input type="text" class="form-control" id="dp" placeholder="DP"/></div><div class="col-lg-2"><label id="mopValue">MOP - </label><input type="text" class="form-control" id="mop" placeholder="MOP"/></div><div class="col-lg-2"><label id="mrpValue">MRP -</label><input type="text" class="form-control" id="mrp" placeholder="MRP"/></div></div></form></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button><button type="button" class="btn btn-primary add-pricing">Add Pricing</button></div></div></div></div><div id="viewImeisModal" class="modal" role="dialog"><div class="modal-dialog"><!-- Modal content--><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal">×</button><h4 class="modal-title">Process Price Drop - <b class="process-drop-id"></b></h4></div><div class="modal-body"><form id="statusForm"><div class="form-group row"><div class="col-lg-7 "><input placeholder="Imeis to approve/reject" type="text"class="form-control mk_imeis_text" aria-label="..."></div><div class="col-lg-4 form-group"><select class="form-control input-sm" id="selectPriceDropStatus"name="selectPriceDropStatus" placeholder="Status"style="border: 3px solid black; width: 94px;"><option value="status" disabled selected>Status</option><option value="pending">Pending</option><option value="rejected">Rejected</option><option value="approved">Approved</option></select></div><div class="col-lg-10"><input placeholder="Rejection reason" type="text"class="form-control mk_rejection_reason" aria-label="..."><button type="button" class="btn btn-primary" id="processPDButton">Submit</button></div></div><div class="form-group row"><div class="col-lg-3"><h4>Pending (<span class="mk_pending_count"></span>)</h4><select multiple id="pendingList" class="mk_pending"style="width:98%;height:400px"></select></div><div class="col-lg-3"><h4>Rejected (<span class="mk_rejected_count"></span>)</h4><select multiple class="mk_rejected" style="width:98%;height:400px"></select></div><div class="col-lg-3"><h4>Approved (<span class="mk_approved_count"></span>)</h4><select multiple class="mk_approved" style="width:98%;height:400px"></select></div></div></form></div><div class="modal-footer"><button type="button" class="closePriceDrop btn btn-primary">Close Price Dop</button><button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button></div></div></div></div><!-- Modal --><div id="newPriceDropModal" class="modal" role="dialog"><div class="modal-dialog"><!-- Modal content--><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal">×</button><h4 class="modal-title">Add Price Drop</h4></div><div class="modal-body"><form id="pdForm"><div class="form-group row"><div class="col-lg-6"><input placeholder="Search Item" type="text" class="form-control typeahead"id="typeaheaditem" name="Item" data-provide="typeahead"autocomplete="off"></div><div class="col-lg-3"><input type="text" class="form-control" id="affectedDate"placeholder="Affected on" type="text"/></div><div class="col-lg-3"><button type="button" class="btn btn-primary download-imeis">DownloadIMEIs</button></div><!--<div class="col-lg-4 checkbox"><label><input id="allColors" type="checkbox" value="">Apply to all Colors</label></div>--></div><div class="form-group row"><div class="col-lg-3"><label for="dpDrop">MOP:(<span id="oldMop"></span>)</label><input type="number" class="form-control" id="newMop"></div><div class="col-lg-3"><label for="dp">DP:(<span id="oldDp"></span>)</label><input type="number" class="form-control" id="newDp"></div><div class="col-lg-3"><label for="newTp">TP:(<span id="oldTp"></span>)</label><input type="number" class="form-control" id="newTp"></div></div></form></div><div class="modal-footer"><button type="button" class="addPriceDrop btn btn-primary">Add Price Drop</button><button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button></div></div></div></div></ol></div></div><div class="price-drop-table"><div class="row"><div class="col-lg-12" id="priceDrop"><table class="table table-striped table-condensed table-bordered"><thead><tr><th>Drop Id</th><th>Item Name</th><th>TP</th><th>DP</th><th>Mop</th><th>Price Drop</th><th>New DP</th><th>Affected On</th><th>Created On</th><th>Payout</th>#if(!$processOn)<th>Processed On</th>#else#end<th>Download IMEIs</th></tr></thead><tbody>#foreach($priceDrop in $priceDrops )<tr data-pricedropid="$priceDrop.getId()"><td>$priceDrop.getId()</td><td>$catalogDescription.get($priceDrop.getCatalogItemId())</td><td class="currency">$priceDrop.getTp()</td><td class="currency">$priceDrop.getOldDp()</td><td class="currency">$priceDrop.getMop()</td><td class="currency">$priceDrop.getAmount()</td><td class="currency">$priceDrop.getNewDp()</td><td>$priceDrop.getAffectedOn().format($dateFormatter)</td><td>$priceDrop.getCreatedOn().format($dateFormatter)</td><td>#if($priceDrop.getProcessTimestamp())$priceDrop.getProcessTimestamp().format($dateTimeFormatter)<br><input type="number" name="partnerPayout" readonly value="$priceDrop.getAutoPartnerPayout()" class="form-control partner-payout input-sm"/>#else<input type="number" name="partnerPayout" value="$priceDrop.getAutoPartnerPayout()" class="form-control partner-payout input-sm"/>#end</td>#if(!$priceDrop.getCompleteTimestamp())<td><input class="btn btn-info btn-sm mk_view_imeis" data-toggle="modal" data-target="#viewImeisModal" type="submit" value="Process Manually"/><input class="btn btn-info btn-sm mk_auto_process" data-activatedonly="false" type="submit" value="Process All"/><br><input class="btn btn-info btn-sm mk_auto_process" data-activatedonly="true" type="submit" value="Process Activated Only"/></td>#else#end<td><input class="downloadtotalIMEI btn btn-info btn-sm" value="Download" type="submit" /></td></tr>#end</tbody></table></div></div></div></section><script type="text/javascript">$(document).ready(function () {$(".modal").on("hidden.bs.modal", function () {$(".modal-body1").find(".mk_imeis_text").val('');});var start = moment().subtract(29, 'days');var end = moment();priceDropTable = $('#priceDrop').find('table').DataTable({pageLength: 20,order: [[5, 'desc']]});getItemAheadOptions($("#typeaheaditem"), true, function (selectedItem) {currentItem = selectedItem;doGetAjaxRequestHandler(context + "/item-pricing/" + currentItem.itemId, function (response) {response = JSON.parse(response);$('#oldDp').html(response.dp);$('#oldMop').html(response.mop);$('#oldTp').html(response.tp);$('#oldNlc').html(response.nlc);});});getItemAheadOptions($("#typeaheaditem1"), true, function (selectedItem) {currentItem = selectedItem;doGetAjaxRequestHandler(context + "/item-pricing/" + currentItem.itemId, function (response) {$('.mk_pause_button').data("id", currentItem.catalogId);$('.mk_pause_button').data("description", currentItem.itemDescription);response = JSON.parse(response);$("#mop").val(response.mop);$("#mrp").val(response.mrp);$("#dp").val(response.dp);$("#tp").val(response.tp);$('#dpValue').html("DP -" + response.dp);$('#mopValue').html("MOP -" + response.mop);$('#mrpValue').html("MRP -" + response.mrp);$('#tpValue').html("TP -" + response.tp);});});affectedDateInput = $('#affectedDate');affectedDateInput.daterangepicker(getSingleDatePicker());$("#newPriceDropModal").on('hidden.bs.modal', function () {$("#pdForm").trigger("reset");});$("#addPriceModal").on('hidden.bs.modal', function () {$("#pdForm1").trigger("reset");});});</script>