Subversion Repositories SmartDukaan

Rev

Rev 23968 | Rev 24047 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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">&times;</button>
29
				        <h4 class="modal-title">Add Price Drop</h4>
30
				      </div>
31
				      <div class="modal-body">
32
			      		<form id="pdForm">
23876 amit.gupta 33
						  <div class="form-group row">
23951 amit.gupta 34
					  			<div class="col-lg-6">
23876 amit.gupta 35
							    	<input placeholder="Search Item" type="text" class="form-control typeahead" id="typeaheaditem" name="Item" data-provide="typeahead" autocomplete="off">
36
							    </div>
23951 amit.gupta 37
							    <div class="col-lg-3">
38
								    <input type="text" class="form-control" id="affectedDate" placeholder="Affected on" type="text"/>
39
								</div>
40
							    <div class="col-lg-3">
41
									<button type="button" class="btn btn-primary download-imeis">Download IMEIs</button>
42
								</div>
43
							    <!--<div class="col-lg-4 checkbox">
23876 amit.gupta 44
								  <label><input id="allColors" type="checkbox" value="">Apply to all Colors</label>
23951 amit.gupta 45
								</div>-->
23868 amit.gupta 46
						  </div>
47
						  <div class="form-group row">
24019 amit.gupta 48
							<div class="col-lg-4">
49
							    <label for="dpDrop">New MOP:</label>
50
							    <input type="number" class="form-control" id="newMop">
23868 amit.gupta 51
							</div>
24019 amit.gupta 52
						    <div class="col-lg-3">
53
								<button type="button" class="btn btn-primary update-mop">Update MOP</button>
54
							</div>
23951 amit.gupta 55
 
23868 amit.gupta 56
						  </div>
57
						  <div class="form-group row">
24019 amit.gupta 58
						  	<div class="col-lg-4">
59
						  		<label for="priceDrop">Price Drop Announced:</label>
60
							    <input type="number" class="form-control" id="pd">
23868 amit.gupta 61
							</div>
62
							<div class="col-lg-4">
63
							    <label for="dpDrop">New Transfer Price:</label>
64
							    <input type="number" class="form-control" id="newTp">
65
							</div>
66
							<div class="col-lg-4">
67
							    <label for="dpDrop">New NLC:</label>
68
							    <input type="number" class="form-control" id="newNlc">
69
							</div>
70
						  </div>
71
						</form>
72
				      </div>
73
				      <div class="modal-footer">
23951 amit.gupta 74
						  <button type="button" class="addPriceDrop btn btn-primary">Add Price Drop</button>
23868 amit.gupta 75
				        <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
76
				      </div>
77
				    </div>
78
 
79
				  </div>
80
				</div>
23819 govind 81
			</ol>
82
		</div>
83
	</div>
84
 
85
    <div class="price-drop-table">
86
	  <div class="row">
87
			<div class="col-lg-12" id="priceDrop" >
88
				<table class="table table-striped table-condensed table-bordered">
89
	    			<thead>
90
			            <tr>
23968 amit.gupta 91
							<th>Item Name</th>
92
							<th>Old DP</th>
93
							<th>Price Drop</th>
94
							<th>New DP</th>
95
							<th>TP</th>
96
							<th>NLC </th>
97
							<th>Affected On</th>
23876 amit.gupta 98
							<th>Created On</th>
23968 amit.gupta 99
							<th>Price Drop In</th>
23876 amit.gupta 100
							<th>Partner Payout</th>
101
							<th>Processed On</th>
102
							<th>Download IMEIs</th>
23819 govind 103
 
104
			            </tr>
105
			        </thead>
106
					<tbody>
107
						#foreach($priceDrop in $priceDrops )
23968 amit.gupta 108
						<tr data-pricedropid="$priceDrop.getId()">
109
							<td>$catalogDescription.get($priceDrop.getCatalogItemId())</td>
110
							<td>$priceDrop.getOldDp()</td>
23819 govind 111
							<td>$priceDrop.getAmount()</td>
23968 amit.gupta 112
							<td>$priceDrop.getNewDp()</td>
113
							<td>$priceDrop.getTp()</td>
114
							<td>$priceDrop.getNlc()</td>
23868 amit.gupta 115
							<td>$priceDrop.getAffectedOn().format($dateFormatter)</td>
23876 amit.gupta 116
							<td>$priceDrop.getCreatedOn().format($dateTimeFormatter)</td>
23819 govind 117
							#if($priceDrop.getProcessTimestamp())
23876 amit.gupta 118
							<td>$priceDrop.getPriceDropIn()</td>
119
							<td>$priceDrop.getPartnerPayout()</td>
23868 amit.gupta 120
							<td>$priceDrop.getProcessTimestamp().format($dateTimeFormatter)</td>	
23819 govind 121
							#else
23876 amit.gupta 122
							<td>
23968 amit.gupta 123
									<input type="number" name="priceDropIn" placeholder = "Price Drop In"   class="form-control price-drop-in input-sm"/>
23876 amit.gupta 124
							</td>
125
							<td>
23968 amit.gupta 126
									<input type="number" name="partnerPayout" placeholder = "Partner Payout"   class="form-control partner-payout input-sm"/>
23876 amit.gupta 127
							</td>
128
							<td>
23968 amit.gupta 129
								<input class="btn btn-info btn-sm mk_process_price_drop" data-cashback="$priceDrop.getId()" type="submit" value="Process"/>
23876 amit.gupta 130
							</td>
23819 govind 131
							#end
23876 amit.gupta 132
							<td>
133
								<input class="downloadtotalIMEI btn btn-info btn-sm" value="Download" type="submit" />
134
							</td>
135
						</tr>
23819 govind 136
						#end
137
					</tbody>
138
				</table>
139
				</div>
140
				</div>
141
				</div>
142
				</section>
143
 
144
				<script type="text/javascript">
145
$(document).ready(function() {
23868 amit.gupta 146
	    var start = moment().subtract(29, 'days');
147
    	var end = moment();
148
 
23819 govind 149
  priceDropTable = $('#priceDrop').find('table').DataTable({
150
  "pageLength": 10,
151
  order:[[ 5, 'desc' ]]
152
  });
23868 amit.gupta 153
  customItems = $customItems;
154
  itemAhead = $("#typeaheaditem").typeahead({
155
	  source: customItems,
156
	  autoSelect: false,
157
	  displayText:function(item){return item.itemDescription;},
23876 amit.gupta 158
	  afterSelect:	function(selectedItem){
159
	  					console.log(selectedItem);
160
	  					currentItem = selectedItem;
23868 amit.gupta 161
	  				}
162
	});
23819 govind 163
  });
23868 amit.gupta 164
  affectedDateInput=$('#affectedDate');
23886 amit.gupta 165
  affectedDateInput.daterangepicker(getSingleDatePicker(), dateRangeCallback);
23868 amit.gupta 166
  $("#newPriceDropModal").on('hidden.bs.modal', function () {
167
            $("#pdForm").trigger("reset");
168
  });
23819 govind 169
</script>