Subversion Repositories SmartDukaan

Rev

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

Rev 27266 Rev 27447
Line 1... Line 1...
1
<script>
1
<script>
2
	$(function() {
-
 
3
    	$('input[name="dateRange"]').daterangepicker(getRangedDatePicker(), dateRangeCallback);
-
 
4
	});
-
 
5
	
-
 
6
		$(document).ready(function() {
-
 
7
        $('#fofo-users').multiselect({
-
 
8
    		includeSelectAllOption: true,
-
 
9
        		multiple:true,
-
 
10
        		maxHeight: 200,
-
 
11
        		buttonWidth: '180px',
-
 
12
        		numberDisplayed: 1,
-
 
13
        	nonSelectedText: 'Users',
-
 
14
        	nSelectedText: ' - Users Selected',
-
 
15
        	allSelectedText: 'All Users Selected',
-
 
16
        	enableFiltering: true,
-
 
17
	        enableCaseInsensitiveFiltering : true
-
 
18
        });
-
 
19
        
-
 
20
        
-
 
21
        $('#brand').multiselect({
-
 
22
    		includeSelectAllOption: true,
-
 
23
        		multiple:true,
-
 
24
        		maxHeight: 200,
-
 
25
        		buttonWidth: '180px',
-
 
26
        		numberDisplayed: 1,
-
 
27
        	nonSelectedText: 'Brands',
-
 
28
        	nSelectedText: ' - Brands Selected',
-
 
29
        	allSelectedText: 'All Brands Selected',
-
 
30
        	enableFiltering: true,
-
 
31
	        enableCaseInsensitiveFiltering : true
-
 
32
        });
-
 
33
        
-
 
34
          $('#item_catalog_id').multiselect({
-
 
35
    		includeSelectAllOption: true,
-
 
36
        		multiple:true,
-
 
37
        		maxHeight: 200,
-
 
38
        		buttonWidth: '180px',
-
 
39
        		numberDisplayed: 1,
-
 
40
        	nonSelectedText: 'Users',
-
 
41
        	nSelectedText: ' - Users Selected',
-
 
42
        	allSelectedText: 'All Users Selected',
-
 
43
        	enableFiltering: true,
-
 
44
	        enableCaseInsensitiveFiltering : true
-
 
45
        });
-
 
46
        
-
 
47
      
-
 
48
        
-
 
49
            
-
 
50
          $('#partner-category').multiselect({
-
 
51
    		includeSelectAllOption: true,
-
 
52
        		multiple:true,
-
 
53
        		maxHeight: 200,
-
 
54
        		buttonWidth: '180px',
-
 
55
        		numberDisplayed: 1,
-
 
56
        	nonSelectedText: 'Users',
-
 
57
        	nSelectedText: ' - Users Selected',
-
 
58
        	allSelectedText: 'All Users Selected',
-
 
59
        	enableFiltering: true,
-
 
60
	        enableCaseInsensitiveFiltering : true
-
 
61
        });
-
 
62
        
-
 
63
        
-
 
64
    });
-
 
65
    
-
 
66
    $(function(){
2
    $(function(){
-
 
3
	    $('input[name="dateRange"]').daterangepicker(getRangedDatePicker(), dateRangeCallback);
67
 	getItemAheadOptions($("#typeaheaditem"),function(selectedItem){
4
	 	getItemAheadOptions($("#typeaheaditem"),function(selectedItem){
68
 	
-
 
69
 	itemCatalogId = selectedItem.catalogId;
5
		 	itemCatalogId = selectedItem.catalogId;
70
 	itemDescription = selectedItem.itemDescription
6
		 	itemDescription = selectedItem.itemDescription
-
 
7
		 	$('#item_catalog_id').append($("<option></option>").attr("value",itemCatalogId).text(itemDescription)); 
71
 
8
		});
72
 	$('#item_catalog_id')
9
		$('#partners').chosen({
73
         .append($("<option></option>")
10
			search_contains : true
-
 
11
		});
74
                    .attr("value",itemCatalogId)
12
		$("select.criteria-brands").chosen({no_results_text: "Oops, nothing found!"}); 
75
                    .text(itemDescription)); 
13
		$("select.criteria-partner-type").chosen({no_results_text: "Oops, nothing found!"}); 
76
                    
14
		$("select.criteria-warehouseregion").chosen({no_results_text: "Oops, nothing found!"});
77
	$('#item_catalog_id').multiselect('destroy').removeData().multiselect();
15
		getEntitySelect2($("select.criteria-catalogids"));
78
	});
16
	});
79
});
-
 
80
 
-
 
81
 
-
 
82
 
-
 
83
    
-
 
84
  
-
 
85
</script>
17
</script>
86
 
18
 
87
 
19
 
88
<section class="wrapper">
20
<section class="wrapper">
89
	<div class="row">
21
	<div class="row">
Line 93... Line 25...
93
				<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
25
				<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
94
				<li><i class="icon_document_alt"></i>CREATE</li>						  	
26
				<li><i class="icon_document_alt"></i>CREATE</li>						  	
95
			</ol>
27
			</ol>
96
		</div>
28
		</div>
97
	</div>
29
	</div>
-
 
30
		<div class="row" style="background:white;background-color:white;padding:10px;">
98
	<form id="create-scheme-form">
31
			<form id="create-scheme-form">
99
		<div id="customer-details" style="background:white;background-color:white;padding:10px;">
-
 
100
			<h4 class="modelHeaderCustom" style="font-size:22px;">Offer Information</h4>
32
			<h4 class="modelHeaderCustom" style="font-size:22px;">Offer Information</h4>
101
			<div>
33
			<div class="col-lg-12">
102
				<div class = "row">
34
				<div class="col-lg-3">
-
 
35
					<div class="form-group">
-
 
36
						<label for="name">Offer Name</label>
-
 
37
						<input class="form-control" id="name" placeholder="Offer Name" name="name">
-
 
38
				    </div>
103
					<div class="col-lg-2 form-group">
39
					<div class="form-group">
-
 
40
						<label for="offerDuration">Duration</label>
104
					   	<input placeholder="Name" id="offerName" name="offerName" type="text" value="" class="form-control input-sm">
41
						<input placeholder="Set Duration" name="dateRange" id="offerDuration" name="dateRange" type="text" value="" class="form-control input-sm">
105
					</div>
42
				    </div>
-
 
43
					<div class="form-group">
-
 
44
						<h4>Offer based on</h4>
106
					
45
						<div>
-
 
46
							<div class="radio-inline"><label><input type="radio" name="schemeType" checked>ACTIVATION</label></div>
-
 
47
							<div class="radio-inline"><label><input type="radio" name="schemeType">SELL IN</label></div>
-
 
48
							<div class="radio-inline"><label><input type="radio" name="schemeType">SELL OUT</label></div>
107
					
49
						</div>
108
					<div class="col-lg-3 form-inline">
50
					    <div class="checkbox">
109
							<label for="offerDuration">Offer Duration :</label> 
-
 
110
							<input id="offerDuration" name="dateRange" type="text" value="" class="form-control input-sm">
51
						  <label><b><input id="purchaseExceedsSales" type="checkbox">Sellin = Sellout?</b></label>
111
						
52
						</div>
112
					</div>
53
					</div>
113
					
-
 
114
					
-
 
115
						<div class="col-lg-2">
54
					<div class="form-group">
116
						<select class="form-control input-sm" id = "schemeType"  placeholder="schemeType">
-
 
117
							<option value="" disabled selected>Scheme Type</option>
55
						<h4>Target Type</h4>
118
								<option value="SELLIN">Sell IN</option>
56
						<div>
119
								<option value="SELLOUT">Sell Out</option>
57
							<div class="radio-inline"><label><input type="radio" name="targetType" checked>VALUE</label></div>
120
								<option value="ACTIVATION">Activation</option>
58
							<div class="radio-inline"><label><input type="radio" name="targetType">QUANTITY</label></div>
121
							
-
 
122
						</select>
-
 
123
						</div>
59
						</div>
124
					
60
					</div>
-
 
61
					<div class="form-group">
-
 
62
						<label for="name">Offer Notes Semi-Colon(;) seperated</label>
-
 
63
						<textarea class="form-control" id="note" placeholder="Offer Notes" name="note"></textarea>
-
 
64
				    </div>
-
 
65
					<div class="form-group">
-
 
66
						<label for="name">Terms Semi-Colon(;) seperated</label>
-
 
67
						<textarea class="form-control" id="terms" placeholder="Offer Notes" name="terms"></textarea>
-
 
68
				    </div>
-
 
69
				</div>
-
 
70
				<div class="col-lg-9">
-
 
71
					<!--Partner Criteria Start -->
-
 
72
					<div class="panel panel-default">
-
 
73
					  <div class="panel-heading">Partner Criteria</div>
-
 
74
						  <div class="panel-body">
-
 
75
						  	<div class="row">
125
						<div class="col-lg-2">
76
								<div class="col-lg-4">
-
 
77
									<div class="form-group">
-
 
78
								  		<label>Partner Types</label>
126
						<select class="form-control input-sm" id = "criteria"  placeholder="Criteria">
79
										<select data-placeholder="Partner Type" multiple class="criteria-partner-type chosen-select">
-
 
80
				    						<option value="BRONZE">BRONZE</option>
-
 
81
				    						<option value="SILVER">SILVER</option>
-
 
82
				    						<option value="GOLD">GOLD</option>
-
 
83
				    						<option value="DIAMOND">DIAMOND</option>
-
 
84
				    						<option value="PLATINUM">PLATINUM</option>
-
 
85
				    						<option value="NEW">RISING STAR</option>
-
 
86
				    					</select>
-
 
87
				    				</div>
-
 
88
									<div class="form-group">
-
 
89
										<label>Warehouse Regions</label>
-
 
90
										<select multiple class="criteria-warehouseregion chosen-select">
-
 
91
										#foreach ($whRegionEntry in $warehouseRegion.entrySet())
-
 
92
										  <option value="$whRegionEntry.getKey()">$whRegionEntry.getValue()</options>
-
 
93
										#end
-
 
94
										</select>
-
 
95
									</div>
-
 
96
							  	</div>
-
 
97
								<div class="col-lg-8 partner">
-
 
98
									<label>Choose Partners</label>
-
 
99
									 <select  multiple="multiple" name="partner" id="partners" data-placeholder="Choose Franchisee" class="chosen-select">
-
 
100
										#foreach ($customRetailer in $customRetailersMap.entrySet())							 
-
 
101
					                    <option value="$customRetailer.getKey()">$customRetailer.getValue().getDisplayName()</option>
-
 
102
					                    #end
-
 
103
					                </select>
-
 
104
							  	</div>
-
 
105
							</div>
-
 
106
							<!--Item Criteria Start -->
-
 
107
							<div class="row">
-
 
108
								<div class="col-lg-2 itemCategory">
-
 
109
							  		<div><label>Category</label></div>
-
 
110
									<div class="checkbox">
-
 
111
									  <label><input type="checkbox" value="smartphone"/>Smart Phones</label>
-
 
112
									</div>
-
 
113
									<div class="checkbox">
-
 
114
									  <label><input type="checkbox" value="featuredphone"/>Featured Phones</label>
-
 
115
									</div>
-
 
116
							  	</div>
-
 
117
							  	<div class="col-lg-1">
-
 
118
							  		<div class="row">
-
 
119
								  		<div><label>Price Range</label></div>
-
 
120
								  		<div>
-
 
121
									  		<div class="col-lg-12 form-group" id="startValue">
-
 
122
									             <input placeholder="Start" type="text" class="typeahead form-control" id="startValue"/>
-
 
123
								            </div>
-
 
124
									  		<div  class="col-lg-12 form-group" id="endValue">
-
 
125
									             <input placeholder="End" type="text" class="typeahead form-control" id="endValue">
-
 
126
								            </div>
-
 
127
										</div>					     
-
 
128
							  		</div>
-
 
129
								</div>
-
 
130
							  	<div class="col-lg-8">
-
 
131
								  	<div class="row col-lg-12 form-group">
-
 
132
								  		<div><label>Brand</label></div>
-
 
133
								  		<select data-placeholder="Choose brands" multiple="multiple" class="criteria-brands chosen-select">
-
 
134
												<option value="Nokia">Nokia</option>
127
							<option value="" disabled selected>Criteria Type</option>	
135
												<option value="Realme">Realme</option>
-
 
136
									  		#foreach($brand in $brands)
128
								<option value="margin">Margin</option>
137
												<option value="$brand">$brand</option>
-
 
138
											#end
-
 
139
								  		</select>
-
 
140
							  		</div>
-
 
141
							  		<div class="row col-lg-12 form-group">
-
 
142
								  		<select class="criteria-catalogids form-control" multiselect>
-
 
143
								  		</select>
-
 
144
								  	</div>
-
 
145
								</div>
-
 
146
							</div>
-
 
147
							<!--Item Criteria End -->
-
 
148
							<!-- Slabs Start -->
-
 
149
							<div class="slab-payout">
-
 
150
								<div class="row">
-
 
151
								  	<div class="col-lg-1"><label>Slabs</label></div>
-
 
152
							  	</div>
-
 
153
								<div class="row">
-
 
154
							  		<div class="col-lg-4">
-
 
155
								  		<div class="form-group input-group">
-
 
156
											<span class="input-group-addon">Rs.</span>
-
 
157
											<input id="msg" type="text" class="form-control" name="msg" value="0"/>
-
 
158
											<span class="input-group-addon">Onwards</span>
-
 
159
										</div>
-
 
160
										<div class="row col-lg-12">
-
 
161
											<!--Item Criteria filter Start-->
-
 
162
									  		<div class="row">
-
 
163
										  		<div class="col-lg-12"><label>Price Range</label></div>
-
 
164
										  		<div class="col-lg-6 form-group" id="startValue">
-
 
165
										             <input placeholder="Start" type="text" class="typeahead form-control" id="startValue"/>
-
 
166
									            </div>
-
 
167
										  		<div  class="col-lg-6 form-group" id="endValue">
-
 
168
										             <input placeholder="End" type="text" class="typeahead form-control" id="endValue">
-
 
169
									            </div>
-
 
170
									  		</div>
-
 
171
										  	<div class="row">
-
 
172
											  	<div class="col-lg-12 form-group">
-
 
173
											  		<div><label>Brand</label></div>
-
 
174
											  		<select data-placeholder="Choose brands" multiple="multiple" class="criteria-brands chosen-select">
-
 
175
															<option value="Nokia">Nokia</option>
-
 
176
															<option value="Realme">Realme</option>
-
 
177
												  		#foreach($brand in $brands)
129
								<option value="payout">Payout</option>
178
															<option value="$brand">$brand</option>
-
 
179
														#end
-
 
180
											  		</select>
-
 
181
										  		</div>
-
 
182
										  		<div class="col-lg-12 form-group">
-
 
183
											  		<select class="criteria-catalogids form-control" multiselect>
-
 
184
											  		</select>
-
 
185
											  	</div>
-
 
186
												<!--Item Criteria filter End -->
-
 
187
												<div class="col-lg-12"><label>Payout Slabs</label></div>
-
 
188
												<div class="slab-container"></div>									
-
 
189
											</div>
-
 
190
										</div>
-
 
191
										
-
 
192
									</div>
-
 
193
							  		<div class="col-lg-3">
-
 
194
								  		<div class="input-group">
-
 
195
											<span class="input-group-addon">Rs.</span>
-
 
196
											<input id="msg" type="text" class="form-control" name="msg" value="0"/>
-
 
197
											<span class="input-group-addon">Onwards</span>
-
 
198
										</div>
-
 
199
									</div>
-
 
200
							  		<div class="col-lg-3">
-
 
201
								  		<div class="input-group">
-
 
202
											<span class="input-group-addon">Rs.</span>
-
 
203
											<input id="msg" type="text" class="form-control" name="msg" value="0"/>
-
 
204
											<span class="input-group-addon">Onwards</span>
-
 
205
										</div>
-
 
206
									</div>
-
 
207
							  		<div class="col-lg-2">
-
 
208
								  		<div class="input-group">
-
 
209
											<span class="input-group-addon">Rs.</span>
-
 
210
											<input id="msg" type="text" class="form-control" name="msg" value="0"/>
-
 
211
											<span class="input-group-addon">Onwards</span>
-
 
212
										</div>
-
 
213
									</div>
-
 
214
							  	</div>
-
 
215
							</div>
-
 
216
							<!-- Slabs end -->
130
							
217
							
131
						</select>
-
 
132
						</div>
-
 
133
					
-
 
134
					
-
 
135
						<div class="col-lg-2" form-group>
-
 
136
						<select class="form-control input-sm" id = "itemCriteria" onchange="selecteditemCriteria()" placeholder="Item Criteria">
-
 
137
							<option value="" disabled selected>Item Criteria</option>	
-
 
138
								#foreach($itemCriteria in $itemCriteriaType)
-
 
139
	      						<option value="$itemCriteria">$itemCriteria</option>
-
 
140
							#end
-
 
141
						</select>
-
 
142
						</div>
218
						</div>
143
						
219
					</div>
144
					
220
					<!--Partner Criteria End -->
145
					
-
 
146
					
-
 
147
					
-
 
148
					
-
 
149
				</div>
221
				</div>
-
 
222
				<div class="col-lg-3">
150
				
223
				</div>
151
				<div class="row">	
224
				<!--End of col lg3-->
152
				
225
				<!--
153
					<div class="col-lg-2">
226
					<div class="col-lg-2">
154
						<select class="form-control input-sm" id = "targetType" onchange="selectedTargetType()" placeholder="Target Type">
227
						<select class="form-control input-sm" id = "targetType" onchange="selectedTargetType()" placeholder="Target Type">
155
							<option value="" disabled selected>Target Type</option>	
228
							<option value="" disabled selected>Target Type</option>	
156
								<option value="value">Value</option>
229
								<option value="value">Value</option>
157
								<option value="quantity">Quantity</option>
230
								<option value="quantity">Quantity</option>
158
							
231
							
159
						</select>
232
						</select>
160
						</div>
233
					</div>
161
						
234
						
162
						
235
						
163
					<div class="col-lg-2">
236
					<div class="col-lg-2">
164
						<select class="form-control input-sm" id = "amountType" onchange="selectedAmountType()" placeholder="Amount Type">
237
						<select class="form-control input-sm" id = "amountType" onchange="selectedAmountType()" placeholder="Amount Type">
165
							<option value="" disabled selected>Amount Type</option>
238
							<option value="" disabled selected>Amount Type</option>
Line 174... Line 247...
174
					   	<input placeholder="Price" id="price" name="price" type="number" value="" class="form-control input-sm">
247
					   	<input placeholder="Price" id="price" name="price" type="number" value="" class="form-control input-sm">
175
					</div>
248
					</div>
176
					
249
					
177
					<div class="col-lg-3 form-inline">
250
					<div class="col-lg-3 form-inline">
178
					<label for="offerDuration">Description :</label> 
251
					<label for="offerDuration">Description :</label> 
179
					  <textarea class='form-control' rows='2' id='description'  placeholder="type as comma seprated"></textarea>
252
					  <textarea class='form-control' rows='2' id='description'  placeholder="type as comma seprated">
-
 
253
					  </textarea>
180
					   
254
					   
181
					</div>
255
					</div>
-
 
256
					-->
182
					
257
					
183
					
-
 
184
				  <div class="col-lg-2 form-group">
258
				  <!--<div class="col-lg-2 form-group">
185
					<select  class="form-control input-sm" id = "partner-category" name = "partner-category" placeholder="Category">
259
					<select  class="form-control input-sm" id = "partner-category" name = "partner-category" placeholder="Category">
186
					<option value="" disabled selected>Category</option>
260
						<option value="" disabled selected>Category</option>
187
					<option value="BRONZE">BRONZE</option>
261
						<option value="BRONZE">BRONZE</option>
188
					<option value="SILVER">SILVER</option>
262
						<option value="SILVER">SILVER</option>
189
					<option value="GOLD">GOLD</option>
263
						<option value="GOLD">GOLD</option>
190
					<option value="DIAMOND">DIAMOND</option>
264
						<option value="DIAMOND">DIAMOND</option>
191
				    <option value="PLATINUM">PLATINUM</option>
265
					    <option value="PLATINUM">PLATINUM</option>
192
				    <option value="NEW">NEW</option>
266
					    <option value="NEW">NEW</option>
193
         		
-
 
194
	                </select>
267
	                </select>
195
	               </div>
268
	               </div>-->
196
	    
269
	    
197
			
270
			
198
	               
271
	               
199
	      	</div>
272
	      	</div>
200
				
273
				
201
				<div class="row">	
274
				<div class="row">	
202
				
275
				
203
				<div class="col-lg-2 form-group">
276
				<!--<div class="col-lg-2 form-group">
204
					<select  class="form-control input-sm" id = "fofo-users" name = "fofo-users" placeholder="Partners" multiple="multiple">
277
					<select  class="form-control input-sm" id = "fofo-users" name = "fofo-users" placeholder="Partners" multiple="multiple">
205
					<option value="" disabled selected>Partners</option>
278
					<option value="" disabled selected>Partners</option>
206
					#foreach($fofoId in $customRetailersMap.keySet())
279
					#foreach($fofoId in $customRetailersMap.keySet())
207
         				<option value="$fofoId">$customRetailersMap.get($fofoId).getBusinessName()</option>
280
         				<option value="$fofoId">$customRetailersMap.get($fofoId).getBusinessName()</option>
208
         			#end
281
         			#end
209
	                </select>
282
	                </select>
210
	             </div>
283
	             </div>-->
211
				
284
				
212
				<div class="col-lg-2 form-group" id ="oneBrandMarginOffer">
285
				<div class="col-lg-2 form-group" id ="oneBrandMarginOffer">
213
						<select class="form-control input-sm" id="brand" placeholder="Brands" multiple="multiple">
286
						<select class="form-control input-sm" id="brand" placeholder="Brands" multiple="multiple">
214
						<option value="" disabled selected>Brand</option>	
287
						<option value="" disabled selected>Brand</option>	
215
							#foreach($brand in $brands)
288
							#foreach($brand in $brands)