Subversion Repositories SmartDukaan

Rev

Rev 23868 | Rev 23886 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23868 Rev 23876
Line 28... Line 28...
28
				        <button type="button" class="close" data-dismiss="modal">&times;</button>
28
				        <button type="button" class="close" data-dismiss="modal">&times;</button>
29
				        <h4 class="modal-title">Add Price Drop</h4>
29
				        <h4 class="modal-title">Add Price Drop</h4>
30
				      </div>
30
				      </div>
31
				      <div class="modal-body">
31
				      <div class="modal-body">
32
			      		<form id="pdForm">
32
			      		<form id="pdForm">
33
						  <div class="form-group">
33
						  <div class="form-group row">
-
 
34
					  			<div class="col-lg-8">
34
							    <input placeholder="Search Item" type="text" class="form-control typeahead" id="typeaheaditem" name="Item" data-provide="typeahead" autocomplete="off">
35
							    	<input placeholder="Search Item" type="text" class="form-control typeahead" id="typeaheaditem" name="Item" data-provide="typeahead" autocomplete="off">
-
 
36
							    </div>
-
 
37
							    <div class="col-lg-4 checkbox">
-
 
38
								  <label><input id="allColors" type="checkbox" value="">Apply to all Colors</label>
-
 
39
								</div>
35
						  </div>
40
						  </div>
36
						  <div class="form-group row">
41
						  <div class="form-group row">
37
						  	<div class="col-lg-4">
42
						  	<div class="col-lg-4">
38
						  		<label for="priceDrop">Price Drop Announced:</label>
43
						  		<label for="priceDrop">Price Drop Announced:</label>
39
							    <input type="number" class="form-control" id="pd">
44
							    <input type="number" class="form-control" id="pd">
40
							</div>
45
							</div>
41
							<div class="col-lg-4">
46
							<div class="col-lg-4">
42
							    <label for="dpDrop">Affected On:</label>
47
							    <label for="dpDrop">Affected On:</label>
43
							    <input type="text" class="form-control" id="affectedDate" placeholder="DD/MM/YYYY" type="text"/>
48
							    <input type="text" class="form-control" id="affectedDate" placeholder="DD/MM/YYYY" type="text"/>
44
							</div>
49
							</div>
45
							<div class="col-lg-4">
-
 
46
							    <div class="checkbox">
-
 
47
								  <label><input type="checkbox" value="">Apply on all Colors</label>
-
 
48
								</div>
-
 
49
							</div>
-
 
50
						  </div>
50
						  </div>
51
						  <div class="form-group row">
51
						  <div class="form-group row">
52
							<div class="col-lg-4">
52
							<div class="col-lg-4">
53
							    <label for="dpDrop">New MOP:</label>
53
							    <label for="dpDrop">New MOP:</label>
54
							    <input type="number" class="form-control" id="newMop">
54
							    <input type="number" class="form-control" id="newMop">
Line 80... Line 80...
80
	  <div class="row">
80
	  <div class="row">
81
			<div class="col-lg-12" id="priceDrop" >
81
			<div class="col-lg-12" id="priceDrop" >
82
				<table class="table table-striped table-condensed table-bordered">
82
				<table class="table table-striped table-condensed table-bordered">
83
	    			<thead>
83
	    			<thead>
84
			            <tr>
84
			            <tr>
85
			            	<th>ItemId</th>
85
			            	<th>Item Id</th>
86
							<th>ItemDescription</th>
86
							<th>Item Description</th>
87
							<th>PriceDrop<br/>Amount</th>
87
							<th>Price Drop<br/>Amount</th>
88
							<th>AffetcedOn</th>
88
							<th>Affetced On</th>
-
 
89
							<th>Created On</th>
89
							<th>Cashback<br/>Amount</th>
90
							<th>Partner Payout</th>
90
							<th>Process</th>
91
							<th>Price Drop In</th>
91
							<th>Download<br/>IMEI<br/>For<br/>Partners</th>
92
							<th>Processed On</th>
92
							<th>Download<br/>All<br/>IMEI</th>
93
							<th>Download IMEIs</th>
93
							
94
							
94
			            </tr>
95
			            </tr>
95
			        </thead>
96
			        </thead>
96
					<tbody>
97
					<tbody>
97
						#foreach($priceDrop in $priceDrops )
98
						#foreach($priceDrop in $priceDrops )
98
						<tr>
99
						<tr data-priceDropId="$priceDrop.getId()">
99
							<td>$priceDrop.getItemId()</td>
100
							<td>$priceDrop.getItemId()</td>
100
							<td>$tagListingMap.get($priceDrop.getItemId()).getItemDescription()</td>
101
							<td>$tagListingMap.get($priceDrop.getItemId()).getItemDescription()</td>
101
							<td>$priceDrop.getAmount()</td>
102
							<td>$priceDrop.getAmount()</td>
102
							<td>$priceDrop.getAffectedOn().format($dateFormatter)</td>
103
							<td>$priceDrop.getAffectedOn().format($dateFormatter)</td>
-
 
104
							<td>$priceDrop.getCreatedOn().format($dateTimeFormatter)</td>
103
							#if($priceDrop.getProcessTimestamp())
105
							#if($priceDrop.getProcessTimestamp())
-
 
106
							<td>$priceDrop.getPriceDropIn()</td>
104
							<td>$priceDrop.getCashbackAmount()</td>
107
							<td>$priceDrop.getPartnerPayout()</td>
105
							<td>$priceDrop.getProcessTimestamp().format($dateTimeFormatter)</td>	
108
							<td>$priceDrop.getProcessTimestamp().format($dateTimeFormatter)</td>	
106
							#else
109
							#else
-
 
110
							<td>
107
							<td><div><input type="number"  id="$priceDrop.getId()" name="processedamount" placeholder = "$priceDrop.getAmount()"   class="form-control phone input-sm"/>
111
									<input type="number" name="priceDropIn" placeholder = "Price Drop In"   class="form-control phone input-sm"/>
-
 
112
							</td>
-
 
113
							<td>
108
							<input class="btn btn-info btn-sm" data-cashback="$priceDrop.getId()" style="width:35%;border-radius:0px;" type="submit" value="Cashback" id="cashTopartner"/>
114
									<input type="number" name="partnerPayout" placeholder = "Partner Payout"   class="form-control phone input-sm"/>
109
							</div></td>
115
							</td>
110
							<td>Not Processed</td>
116
							<td>
-
 
117
								<input class="btn btn-info btn-sm" data-cashback="$priceDrop.getId()" type="submit" value="Process" id="cashTopartner"/>
111
								
118
							</td>
112
							#end
119
							#end
-
 
120
							<td>
113
						<td><input class="btn btn-info btn-sm" data-download="$priceDrop.getId()" style="width:100%;border-radius:0px;" type="submit" value="Download" id="download"/></td>
121
								<input class="downloadtotalIMEI btn btn-info btn-sm" value="Download" type="submit" />
114
							<td><input class="btn btn-info btn-sm" data-pricedropidfortotalimei="$priceDrop.getId()" style="width:100%;border-radius:0px;"  value="Download" type="submit" id="downloadtotalIMEI"/></td>
-
 
115
							</tr>
122
							</td>
-
 
123
						</tr>
116
						#end
124
						#end
117
					</tbody>
125
					</tbody>
118
				</table>
126
				</table>
119
				</div>
127
				</div>
120
				</div>
128
				</div>
Line 133... Line 141...
133
  customItems = $customItems;
141
  customItems = $customItems;
134
  itemAhead = $("#typeaheaditem").typeahead({
142
  itemAhead = $("#typeaheaditem").typeahead({
135
	  source: customItems,
143
	  source: customItems,
136
	  autoSelect: false,
144
	  autoSelect: false,
137
	  displayText:function(item){return item.itemDescription;},
145
	  displayText:function(item){return item.itemDescription;},
138
	  afterSelect:	function(currentItem){
146
	  afterSelect:	function(selectedItem){
139
	  					console.log(currentItem);
147
	  					console.log(selectedItem);
140
	  					currentItemId = currentItem.id;
148
	  					currentItem = selectedItem;
141
	  				}
149
	  				}
142
	});
150
	});
143
  });
151
  });
144
  affectedDateInput=$('#affectedDate');
152
  affectedDateInput=$('#affectedDate');
145
  affectedDateInput.daterangepicker({
153
  affectedDateInput.daterangepicker({
Line 150... Line 158...
150
    autoUpdateInput: true,
158
    autoUpdateInput: true,
151
    singleDatePicker: true,
159
    singleDatePicker: true,
152
    locale: {
160
    locale: {
153
			format: 'DD/MM/YYYY'
161
			format: 'DD/MM/YYYY'
154
		}
162
		}
155
  });
163
  }, dateRangeCallback);
156
  $("#newPriceDropModal").on('hidden.bs.modal', function () {
164
  $("#newPriceDropModal").on('hidden.bs.modal', function () {
157
            $("#pdForm").trigger("reset");
165
            $("#pdForm").trigger("reset");
158
  });
166
  });
159
</script>
167
</script>
160
168