Subversion Repositories SmartDukaan

Rev

Rev 24176 | Rev 24409 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<style>
        
        .btn:hover{
                color: grey;
                text-decoration: none;
        }
        .btn-info:hover{
                color: grey;
                text-decoration: none;
        }
}
</style>
<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</li>
                                <li><button type="button" data-toggle="modal" class="btn btn-sm btn-primary" data-target="#addPriceModal">Add/Update Pricing</li>
                                <li><button type="button" data-toggle="modal" class="btn btn-sm btn-primary mk_download_pricing" data-target="#addPricing">Download Pricing</li>
                                <div id="addPriceModal" class="modal fade" role="dialog">
                                  <div class="modal-dialog">
                                
                                    <!-- Modal content-->
                                    <div class="modal-content">
                                      <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal">&times;</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-6">
                                                                        <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-2">
                                                                <label id="dpValue">DP - </label>
                                                                    <input type="text" class="form-control" id="dp" placeholder="DP" type="text"/>
                                                                </div>
                                                            <div class="col-lg-2">
                                                                <label id="mopValue">MOP - </label>
                                                                    <input type="text" class="form-control" id="mop" placeholder="MOP" type="text"/>
                                                                </div>
                                                            <div class="col-lg-2">
                                                                <label id="mrpValue">MRP -</label>
                                                                    <input type="text" class="form-control" id="mrp" placeholder="MRP" type="text"/>
                                                                </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 fade" role="dialog">
                                  <div class="modal-dialog">
                                    <!-- Modal content-->
                                    <div class="modal-content">
                                      <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal">&times;</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-12">
                                                        <div class="input-group">
                                                      <input type="text" class="form-control mk_imeis_text" aria-label="...">
                                                      <div class="input-group-btn">
                                                        <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Move To<span class="caret"></span></button>
                                                        <ul class="dropdown-menu dropdown-menu-right mk_change">
                                                          <li><a href="javascript:void(0)" onclick="updatePriceDropImeis('pending')">Pending</a></li>
                                                          <li><a href="javascript:void(0)" onclick="updatePriceDropImeis('rejected')">Rejected</a></li>
                                                          <li><a href="javascript:void(0)" onclick="updatePriceDropImeis('approved')">Approved</a></li>
                                                        </ul>
                                                      </div><!-- /btn-group -->
                                                    </div><!-- /input-group -->
                                                    </div>                                                                                                              
                                                  </div>
                                                  <div class="form-group row">
                                                        <div class="col-lg-4">
                                                                <h3>Pending</h3>
                                                                <select multiple class="mk_pending" style="width:90%;height:400px">
                                                                </select>
                                                        </div>
                                                        <div class="col-lg-4">
                                                                <h3>Rejected</h3>
                                                                <select multiple class="mk_rejected" style="width:90%;height:400px">
                                                                </select>
                                                        </div>
                                                        <div class="col-lg-4">
                                                                <h3>Approved</h3>
                                                                <select multiple class="mk_approved" style="width:90%;height:400px">
                                                                </select>
                                                        </div>
                                                  </div>
                                                </form>
                                          </div>
                                      <div class="modal-footer">
                                        <button type="button" class="processPayout btn btn-primary">Process Payout</button>
                                        <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                                      </div>
                                        </div>  
                                </div>
                        </div>          
                                <!-- Modal -->
                                <div id="newPriceDropModal" class="modal fade" role="dialog">
                                  <div class="modal-dialog">
                                
                                    <!-- Modal content-->
                                    <div class="modal-content">
                                      <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal">&times;</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">Download IMEIs</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-2">
                                                            <label for="dpDrop">MOP:</label>
                                                            <input type="number" class="form-control" id="oldMop" readonly>
                                                        </div>
                                                        <div class="col-lg-3">
                                                                <label for="priceDrop">Drop Announced:</label>
                                                            <input type="number" class="form-control" id="pd">
                                                        </div>
                                                        <div class="col-lg-3">
                                                                <label for="dp">DP: </label>
                                                            <input type="number" readonly class="form-control" id="currentDp">
                                                        </div>
                                                        <div class="col-lg-2">
                                                            <label for="newTp">TP:</label>
                                                            <input type="number" class="form-control" id="oldTp" readonly>
                                                        </div>
                                                        <div class="col-lg-2">
                                                            <label for="newNlc">NLC:</label>
                                                            <input type="number" class="form-control" id="nlc" readonly>
                                                        </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>Item Name</th>
                                                        <th>Old DP</th>
                                                        <th>Price Drop</th>
                                                        <th>Mop</th>
                                                        <th>TP</th>
                                                        <th>NLC </th>
                                                        <th>Affected On</th>
                                                        <th>Created On</th>
                                                        <th>Price Drop In</th>
                                                        <th>Partner Payout</th>
                                                        <th>Processed On</th>
                                                        <th>Download IMEIs</th>
                                                        
                                    </tr>
                                </thead>
                                        <tbody>
                                                #foreach($priceDrop in $priceDrops )
                                                <tr data-pricedropid="$priceDrop.getId()">
                                                        <td>$catalogDescription.get($priceDrop.getCatalogItemId())</td>
                                                        <td>$priceDrop.getOldDp()</td>
                                                        <td>$priceDrop.getAmount()</td>
                                                        <td>$priceDrop.getMop()</td>
                                                        <td>$priceDrop.getTp()</td>
                                                        <td>$priceDrop.getNlc()</td>
                                                        <td>$priceDrop.getAffectedOn().format($dateFormatter)</td>
                                                        <td>$priceDrop.getCreatedOn().format($dateFormatter)</td>
                                                        #if($priceDrop.getPartnerPayout()>0)
                                                        <td>$priceDrop.getPriceDropIn()</td>
                                                        <td>$priceDrop.getPartnerPayout()</td>
                                                        #if($priceDrop.getProcessTimestamp())
                                                                <td>$priceDrop.getProcessTimestamp().format($dateTimeFormatter)</td>    
                                                        #else
                                                                <td>
                                                                        <input class="btn btn-info btn-sm mk_view_imeis" data-toggle="modal" data-target="#viewImeisModal" type="submit" value="Process"/>
                                                                </td>
                                                        #end
                                                        #else
                                                        <td>
                                                                        <input type="number" name="priceDropIn" placeholder = "Price Drop In"   class="form-control price-drop-in input-sm"/>
                                                        </td>
                                                        <td>
                                                                        <input type="number" name="partnerPayout" placeholder = "Partner Payout"   class="form-control partner-payout input-sm"/>
                                                        </td>
                                                        <td>
                                                                <input class="btn btn-info btn-sm mk_add_payout" type="submit" value="Add Payout"/>
                                                        </td>
                                                        #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" src="resources/js/price-drop.js?v=${version}"></script>
<script type="text/javascript">
  affectedDateInput=$('#affectedDate');
  affectedDateInput.daterangepicker(getSingleDatePicker(), dateRangeCallback);
  $("#newPriceDropModal").on('hidden.bs.modal', function () {
        $("#pdForm").trigger("reset");
  });
  $("#addPriceModal").on('hidden.bs.modal', function () {
        $("#pdForm1").trigger("reset");
  });
</script>