| 30485 |
tejbeer |
1 |
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
| 26588 |
tejbeer |
5 |
<section class="wrapper">
|
| 27873 |
amit.gupta |
6 |
<div class="row">
|
|
|
7 |
<div class="col-lg-12">
|
|
|
8 |
<h3 class="page-header"><i class="icon_document_alt"></i>OFFERS</h3>
|
|
|
9 |
<ol class="breadcrumb">
|
|
|
10 |
<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
|
|
|
11 |
<li><i class="icon_document_alt"></i>CREATE</li>
|
|
|
12 |
<li><input type="button" value="Create Offer" class="btn btn-primary create-offer"/> </li>
|
| 27895 |
amit.gupta |
13 |
</ol>
|
| 27873 |
amit.gupta |
14 |
</div>
|
|
|
15 |
</div>
|
|
|
16 |
<div class="row" style="background:white;background-color:white;padding:10px;">
|
|
|
17 |
<div id="create-scheme-form">
|
|
|
18 |
<div class="col-lg-12">
|
|
|
19 |
<div class="col-lg-3">
|
|
|
20 |
<div class="form-group col-lg-12">
|
|
|
21 |
<label for="name">Offer Name</label>
|
|
|
22 |
<input class="form-control" id="offer_name" placeholder="Offer Name" name="name" required>
|
|
|
23 |
</div>
|
|
|
24 |
<div class="form-group col-lg-6">
|
|
|
25 |
<label for="offerDuration">Duration</label>
|
|
|
26 |
<input placeholder="Set Duration" name="dateRange" id="offerDuration" name="dateRange"
|
|
|
27 |
type="text" value="" class="form-control input-sm">
|
|
|
28 |
</div>
|
| 28016 |
amit.gupta |
29 |
<div class="form-group col-lg-6">
|
| 29795 |
amit.gupta |
30 |
<label class="checkbox-inline"><input type="checkbox" name="base_criteria"/>Base Criteria</label>
|
| 27873 |
amit.gupta |
31 |
</div>
|
| 28017 |
amit.gupta |
32 |
<div class="row col-lg-12">
|
| 28016 |
amit.gupta |
33 |
<div class="form-group col-lg-6">
|
|
|
34 |
<label for="name">Sellin = Sellout%</label>
|
|
|
35 |
<input class="form-control" id="sellinPercentage" placeholder="Sellin Percentage" name="name" value="0">
|
|
|
36 |
</div>
|
|
|
37 |
<div class="form-group col-lg-6">
|
|
|
38 |
<label for="name">Brand Share%</label>
|
|
|
39 |
<input class="form-control" id="brandShare" placeholder="" name="name" value="0">
|
|
|
40 |
</div>
|
| 27873 |
amit.gupta |
41 |
</div>
|
|
|
42 |
</div>
|
| 27895 |
amit.gupta |
43 |
<div class="col-lg-6">
|
| 27873 |
amit.gupta |
44 |
<div class="form-group">
|
| 27895 |
amit.gupta |
45 |
<div class="col-lg-6">
|
|
|
46 |
<h4>Offer based on</h4>
|
| 27873 |
amit.gupta |
47 |
<div class="radio-inline"><label><input type="radio" name="schemeType" value="ACTIVATION"
|
|
|
48 |
checked>ACTIVATION</label></div>
|
|
|
49 |
<div class="radio-inline"><label><input type="radio" name="schemeType" value="SELLIN">SELL
|
|
|
50 |
IN</label></div>
|
|
|
51 |
<div class="radio-inline"><label><input type="radio" name="schemeType" value="SELLOUT">SELL
|
|
|
52 |
OUT</label></div>
|
|
|
53 |
</div>
|
| 27895 |
amit.gupta |
54 |
<div class="col-lg-6 form-group activation-brands">
|
| 27873 |
amit.gupta |
55 |
<div><label>Activation Brands</label></div>
|
|
|
56 |
<select data-placeholder="Choose brands" multiple="multiple"
|
|
|
57 |
class="criteria-brands chosen-select">
|
|
|
58 |
#foreach($brand in $brands)
|
|
|
59 |
<option value="$brand">$brand</option>
|
|
|
60 |
#end
|
|
|
61 |
</select>
|
|
|
62 |
</div>
|
|
|
63 |
</div>
|
| 27895 |
amit.gupta |
64 |
<div class="col-lg-6">
|
|
|
65 |
<div class="form-group">
|
|
|
66 |
<h4>Target Type</h4>
|
|
|
67 |
<div>
|
|
|
68 |
<div class="radio-inline"><label><input type="radio" name="targetType" value="VALUE"
|
|
|
69 |
checked/>VALUE</label></div>
|
|
|
70 |
<div class="radio-inline"><label><input type="radio" name="targetType" value="QUANTITY"/>QUANTITY</label>
|
|
|
71 |
</div>
|
|
|
72 |
</div>
|
|
|
73 |
</div>
|
| 27873 |
amit.gupta |
74 |
</div>
|
| 27895 |
amit.gupta |
75 |
<div class="col-lg-6">
|
|
|
76 |
<div class="form-group">
|
|
|
77 |
<h4>Payout Type</h4>
|
|
|
78 |
<div>
|
|
|
79 |
<div class="radio-inline"><label><input type="radio" name="payoutType" value="VALUE"
|
|
|
80 |
checked/>VALUE</label></div>
|
|
|
81 |
<div class="radio-inline"><label><input type="radio" name="payoutType" value="QUANTITY"/>QUANTITY</label>
|
|
|
82 |
</div>
|
|
|
83 |
</div>
|
|
|
84 |
</div>
|
| 27873 |
amit.gupta |
85 |
</div>
|
|
|
86 |
</div>
|
|
|
87 |
<div class="col-lg-3">
|
| 27895 |
amit.gupta |
88 |
<div class="col-lg-12">
|
|
|
89 |
<div class="form-group">
|
|
|
90 |
<label for="name">Offer Notes Semi-Colon(;) seperated</label>
|
|
|
91 |
<textarea class="form-control" id="offer_notes" placeholder="Offer Notes"
|
|
|
92 |
name="note"></textarea>
|
|
|
93 |
</div>
|
|
|
94 |
</div>
|
|
|
95 |
<div class="col-lg-12">
|
|
|
96 |
<div class="form-group">
|
|
|
97 |
<label for="name">Terms Semi-Colon(;) seperated</label>
|
| 30485 |
tejbeer |
98 |
<div id="toolbar-container"></div>
|
|
|
99 |
<div style = "height:40%"class="form-control" id="offer_terms" placeholder="Offer Notes"
|
|
|
100 |
name="terms"></div>
|
| 27895 |
amit.gupta |
101 |
</div>
|
|
|
102 |
</div>
|
| 27873 |
amit.gupta |
103 |
</div>
|
|
|
104 |
<div class="col-lg-12">
|
|
|
105 |
<!--Partner Criteria Start -->
|
|
|
106 |
<div class="row">
|
|
|
107 |
<div class="col-lg-3">
|
|
|
108 |
<div class="form-group">
|
|
|
109 |
<label>Partner Types</label>
|
|
|
110 |
<select data-placeholder="Partner Type" multiple
|
|
|
111 |
class="criteria-partner-type chosen-select">
|
|
|
112 |
<option value="BRONZE">BRONZE</option>
|
|
|
113 |
<option value="SILVER">SILVER</option>
|
|
|
114 |
<option value="GOLD">GOLD</option>
|
|
|
115 |
<option value="DIAMOND">DIAMOND</option>
|
|
|
116 |
<option value="PLATINUM">PLATINUM</option>
|
|
|
117 |
<option value="NEW">RISING STAR</option>
|
|
|
118 |
</select>
|
|
|
119 |
</div>
|
| 27447 |
amit.gupta |
120 |
</div>
|
| 27873 |
amit.gupta |
121 |
<div class="col-lg-3">
|
|
|
122 |
<div class="form-group">
|
|
|
123 |
<label>Warehouse Regions</label>
|
|
|
124 |
<select multiple class="criteria-warehouseregion chosen-select">
|
|
|
125 |
#foreach ($whRegionEntry in $warehouseRegion.entrySet())
|
|
|
126 |
<option value="$whRegionEntry.getKey()">$whRegionEntry.getValue()</option>
|
|
|
127 |
#end
|
|
|
128 |
</select>
|
|
|
129 |
</div>
|
|
|
130 |
</div>
|
|
|
131 |
<div class="col-lg-6 partner">
|
|
|
132 |
<label>Choose Partners</label>
|
|
|
133 |
<select multiple="multiple" name="partner" id="partners"
|
|
|
134 |
data-placeholder="Choose Franchisee" class="chosen-select">
|
|
|
135 |
#foreach ($customRetailer in $customRetailersMap.entrySet())
|
|
|
136 |
<option value="$customRetailer.getKey()">$customRetailer.getValue().getDisplayName()</option>
|
|
|
137 |
#end
|
|
|
138 |
</select>
|
|
|
139 |
</div>
|
|
|
140 |
</div>
|
|
|
141 |
<!--Item Criteria Start -->
|
|
|
142 |
<div class="row itemCriteria item-criteria">
|
|
|
143 |
<div class="col-lg-3 itemCategory">
|
|
|
144 |
<div><label>Category</label></div>
|
|
|
145 |
<label class="checkbox-inline"><input type="checkbox" name="smartphone"/>Smart Phones</label>
|
|
|
146 |
<label class="checkbox-inline"><input type="checkbox" name="featuredphone"/>Featured Phones</label>
|
|
|
147 |
</div>
|
|
|
148 |
<div class="col-lg-2 row">
|
|
|
149 |
<div><label>Price Range</label></div>
|
|
|
150 |
<div class="col-xs-6 row">
|
|
|
151 |
<input placeholder="Start" type="text" class="form-control startValue" value="0"/>
|
|
|
152 |
</div>
|
|
|
153 |
<div class="col-xs-6">
|
|
|
154 |
<input placeholder="End" type="text" class="form-control endValue" value="0">
|
|
|
155 |
</div>
|
|
|
156 |
</div>
|
|
|
157 |
<div class="col-lg-2">
|
|
|
158 |
<div class="row col-lg-12 form-group">
|
|
|
159 |
<div><label>Brand</label></div>
|
|
|
160 |
<select data-placeholder="Choose brands" multiple="multiple"
|
|
|
161 |
class="criteria-brands chosen-select">
|
|
|
162 |
#foreach($brand in $brands)
|
|
|
163 |
<option value="$brand">$brand</option>
|
|
|
164 |
#end
|
|
|
165 |
</select>
|
|
|
166 |
</div>
|
|
|
167 |
</div>
|
|
|
168 |
<div class="col-lg-4">
|
|
|
169 |
<div><label>Model</label></div>
|
|
|
170 |
<div class="row col-lg-12 form-group">
|
|
|
171 |
<label class="checkbox-inline">
|
|
|
172 |
<input type="checkbox" class="exclude" value=""><b>Exclude</b>
|
|
|
173 |
</label>
|
|
|
174 |
<select class="criteria-catalogids form-control" multiple="multiple"></select>
|
|
|
175 |
</div>
|
|
|
176 |
</div>
|
|
|
177 |
</div>
|
|
|
178 |
<!--Item Criteria End -->
|
|
|
179 |
<!-- Slabs Start -->
|
|
|
180 |
<div class="slab-payout">
|
|
|
181 |
<div class="row">
|
|
|
182 |
<p>
|
|
|
183 |
<div class="col-lg-1"><label>Slabs</label></div>
|
|
|
184 |
<button type="button" class="btn btn-primary slab-copy">Copy</button>
|
|
|
185 |
<button type="button" class="btn btn-primary slab-remove">Remove</button>
|
|
|
186 |
</p>
|
|
|
187 |
</div>
|
|
|
188 |
<div class="row targetslabscontainer" >
|
|
|
189 |
<div class="col-lg-3 targetslabs">
|
| 27895 |
amit.gupta |
190 |
<div class="form-group input-group targetContainer">
|
| 27873 |
amit.gupta |
191 |
<span class="input-group-addon">Rs.</span>
|
|
|
192 |
<input type="text" style="width:100px" class="form-control payoutTarget" value="0"/>
|
|
|
193 |
<span class="input-group-addon">Onward</span>
|
|
|
194 |
<input type="text" class="form-control targetDescription" placeholder="Description"/>
|
|
|
195 |
</div>
|
| 28945 |
amit.gupta |
196 |
#foreach($counter1 in [1..9])
|
| 27873 |
amit.gupta |
197 |
<div class="col-lg-12 itemcriteriapayout item-criteria" style="border:1px solid #cecece;border-radius:3px;padding-top:6px;padding-bottom:6px;margin-bottom:12px">
|
|
|
198 |
<!--Item Criteria filter Start-->
|
|
|
199 |
<div class="row">
|
|
|
200 |
<div class="col-lg-12 itemCategory">
|
|
|
201 |
<label>Category</label>
|
|
|
202 |
<label class="checkbox-inline"><input type="checkbox" name="smartphone"/>Smart Phones</label>
|
|
|
203 |
<label class="checkbox-inline"><input type="checkbox" name="featuredphone"/>Featured Phones</label>
|
|
|
204 |
</div>
|
|
|
205 |
</div>
|
|
|
206 |
<div class="row">
|
|
|
207 |
<div class="col-lg-12"><label>Price Range</label></div>
|
|
|
208 |
<div class="col-lg-6 form-group">
|
|
|
209 |
<input placeholder="Start" type="text" class="form-control startValue" value="0"/>
|
|
|
210 |
</div>
|
|
|
211 |
<div class="col-lg-6 form-group">
|
|
|
212 |
<input placeholder="End" type="text" class="form-control endValue"
|
|
|
213 |
value="0">
|
|
|
214 |
</div>
|
|
|
215 |
</div>
|
|
|
216 |
<div class="row">
|
|
|
217 |
<div class="col-lg-12 form-group">
|
|
|
218 |
<div><label>Brand</label></div>
|
|
|
219 |
<select data-placeholder="Choose brands" multiple="multiple"
|
|
|
220 |
class="criteria-brands chosen-select">
|
|
|
221 |
#foreach($brand in $brands)
|
|
|
222 |
<option value="$brand">$brand</option>
|
|
|
223 |
#end
|
|
|
224 |
</select>
|
|
|
225 |
</div>
|
|
|
226 |
<div class="col-lg-12 form-group">
|
|
|
227 |
<div class="row col-lg-12 form-group">
|
|
|
228 |
<label class="checkbox-inline">
|
|
|
229 |
<input type="checkbox" class="exclude" value=""><b>Exclude</b>
|
|
|
230 |
</label>
|
|
|
231 |
<select class="criteria-catalogids form-control" multiple="multiple">
|
|
|
232 |
</select>
|
|
|
233 |
</div>
|
|
|
234 |
</div>
|
|
|
235 |
<!--Item Criteria filter End -->
|
|
|
236 |
<div class="col-lg-12">
|
|
|
237 |
<form>
|
|
|
238 |
<h4>Amount Type
|
|
|
239 |
<label class="radio-inline"><input type="radio" name="amountType$counter1" value="PERCENTAGE" checked>Percent</label>
|
| 29171 |
amit.gupta |
240 |
<label class="radio-inline"><input type="radio" name="amountType$counter1" value="FIXED">Fixed Per Pc</label>
|
|
|
241 |
<label class="radio-inline"><input type="radio" name="amountType$counter1" value="SLAB_FIXED">Fixed</label>
|
| 27873 |
amit.gupta |
242 |
</h4>
|
|
|
243 |
</form>
|
|
|
244 |
</div>
|
|
|
245 |
<div class="col-lg-12"><label>Payout Slabs</label></div>
|
|
|
246 |
<div class="col-lg-12 slab-container"></div>
|
|
|
247 |
</div>
|
|
|
248 |
</div>
|
|
|
249 |
#end
|
|
|
250 |
</div>
|
|
|
251 |
</div>
|
|
|
252 |
</div>
|
|
|
253 |
<!-- Slabs end -->
|
|
|
254 |
</div>
|
|
|
255 |
</div>
|
|
|
256 |
</div>
|
|
|
257 |
<!--Div to form-->
|
|
|
258 |
</div>
|
|
|
259 |
</section>
|
| 27880 |
amit.gupta |
260 |
<script>
|
|
|
261 |
$(function () {
|
| 30601 |
amit.gupta |
262 |
$('input[name="dateRange"]').daterangepicker(getRangedDatePicker());
|
| 27880 |
amit.gupta |
263 |
$('#partners').chosen({
|
|
|
264 |
search_contains: true
|
|
|
265 |
});
|
|
|
266 |
$("select.criteria-brands").chosen({no_results_text: "Oops, nothing found!"});
|
|
|
267 |
$("select.criteria-partner-type").chosen({no_results_text: "Oops, nothing found!"});
|
|
|
268 |
$("select.criteria-warehouseregion").chosen({no_results_text: "Oops, nothing found!"});
|
| 27895 |
amit.gupta |
269 |
$('input[name=payoutType]').on('change', function () {
|
| 30601 |
amit.gupta |
270 |
changePayoutType.call(this);
|
|
|
271 |
$('.criteria-catalogids').multiselect({
|
|
|
272 |
includeSelectAllOption: true,
|
| 27880 |
amit.gupta |
273 |
maxHeight : 400,
|
|
|
274 |
buttonWidth : '240px',
|
|
|
275 |
numberDisplayed : 1,
|
|
|
276 |
nonSelectedText : 'Items',
|
|
|
277 |
nSelectedText : ' - Items Selected',
|
|
|
278 |
allSelectedText : 'All Items Selected',
|
|
|
279 |
enableFiltering : true,
|
|
|
280 |
enableCaseInsensitiveFiltering : true,
|
|
|
281 |
});
|
| 27895 |
amit.gupta |
282 |
payoutSlabTemplate = $('div.targetslabs').get(0).outerHTML;
|
| 27880 |
amit.gupta |
283 |
var brandTemplate = $('div.targetslabs').find("select.criteria-brands").get(0).outerHTML;
|
|
|
284 |
$('div.targetslabs').find("select.criteria-brands").chosen({no_results_text: "Oops, nothing found!"});
|
| 27895 |
amit.gupta |
285 |
$('input[name=payoutType]').off('change').on('change', changePayoutType);
|
|
|
286 |
//console.log(payoutSlabTemplate);
|
| 27880 |
amit.gupta |
287 |
});
|
| 27895 |
amit.gupta |
288 |
$('input[name=targetType]').on('change', changeTargetType);
|
|
|
289 |
$('input[name=payoutType]:checked').change();
|
| 27880 |
amit.gupta |
290 |
});
|
|
|
291 |
</script>
|