| 31219 |
amit.gupta |
1 |
<section class="wrapper">
|
| 23819 |
govind |
2 |
<div class="row">
|
| 34651 |
aman.kumar |
3 |
<div class="col-lg-12 h-25">
|
| 23819 |
govind |
4 |
<h3 class="page-header"><i class="icon_document_alt"></i>PriceDrop</h3>
|
|
|
5 |
<ol class="breadcrumb">
|
|
|
6 |
<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
|
|
|
7 |
<li><i class="icon_document_alt"></i>PriceDrop</li>
|
| 31219 |
amit.gupta |
8 |
<li>
|
|
|
9 |
<button type="button" data-toggle="modal" class="btn btn-sm btn-primary"
|
|
|
10 |
data-target="#newPriceDropModal">Add new Price Drop
|
|
|
11 |
</button>
|
|
|
12 |
</li>
|
|
|
13 |
<li>
|
|
|
14 |
<button type="button" data-toggle="modal" class="btn btn-sm btn-primary"
|
|
|
15 |
data-target="#addPriceModal">Add/Update Pricing
|
|
|
16 |
</button>
|
|
|
17 |
</li>
|
|
|
18 |
<li>
|
|
|
19 |
<button type="button" data-toggle="modal" class="btn btn-sm btn-primary mk_download_pricing"
|
|
|
20 |
data-target="#addPricing">Download Pricing
|
|
|
21 |
</button>
|
|
|
22 |
</li>
|
| 26318 |
tejbeer |
23 |
<div id="addPriceModal" class="modal" role="dialog">
|
| 31219 |
amit.gupta |
24 |
<div class="modal-dialog">
|
|
|
25 |
|
|
|
26 |
<!-- Modal content-->
|
|
|
27 |
<div class="modal-content">
|
|
|
28 |
<div class="modal-header">
|
|
|
29 |
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
|
30 |
<h4 class="modal-title">Add/Update Pricing</h4>
|
| 24411 |
amit.gupta |
31 |
</div>
|
| 31219 |
amit.gupta |
32 |
<div class="modal-body">
|
|
|
33 |
<form id="pdForm1">
|
|
|
34 |
<div class="form-group row">
|
|
|
35 |
<div class="col-lg-8">
|
|
|
36 |
<label for="typeaheaditem1">Item:</label>
|
|
|
37 |
<input placeholder="Search Item" type="text" class="form-control typeahead"
|
|
|
38 |
id="typeaheaditem1" name="Item" data-provide="typeahead"
|
|
|
39 |
autocomplete="off">
|
|
|
40 |
</div>
|
|
|
41 |
<div class="col-lg-4">
|
|
|
42 |
<div> </div>
|
|
|
43 |
<button type="button" class="btn btn-primary mk_pause_button">Active/Pause
|
|
|
44 |
</button>
|
|
|
45 |
</div>
|
|
|
46 |
</div>
|
|
|
47 |
<div class="form-group row">
|
|
|
48 |
<div class="col-lg-2">
|
|
|
49 |
<label id="tpValue">TP - </label>
|
|
|
50 |
<input type="text" class="form-control" id="tp" placeholder="TP"/>
|
|
|
51 |
</div>
|
|
|
52 |
<div class="col-lg-2">
|
|
|
53 |
<label id="dpValue">DP - </label>
|
|
|
54 |
<input type="text" class="form-control" id="dp" placeholder="DP"/>
|
|
|
55 |
</div>
|
|
|
56 |
<div class="col-lg-2">
|
|
|
57 |
<label id="mopValue">MOP - </label>
|
|
|
58 |
<input type="text" class="form-control" id="mop" placeholder="MOP"/>
|
|
|
59 |
</div>
|
|
|
60 |
<div class="col-lg-2">
|
|
|
61 |
<label id="mrpValue">MRP -</label>
|
|
|
62 |
<input type="text" class="form-control" id="mrp" placeholder="MRP"/>
|
|
|
63 |
</div>
|
|
|
64 |
</div>
|
|
|
65 |
</form>
|
| 24052 |
amit.gupta |
66 |
</div>
|
| 31219 |
amit.gupta |
67 |
<div class="modal-footer">
|
|
|
68 |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
|
69 |
<button type="button" class="btn btn-primary add-pricing">Add Pricing</button>
|
| 24083 |
amit.gupta |
70 |
</div>
|
| 31219 |
amit.gupta |
71 |
|
|
|
72 |
</div>
|
|
|
73 |
</div>
|
|
|
74 |
</div>
|
|
|
75 |
|
|
|
76 |
<div id="viewImeisModal" class="modal" role="dialog">
|
|
|
77 |
<div class="modal-dialog">
|
|
|
78 |
<!-- Modal content-->
|
|
|
79 |
<div class="modal-content">
|
|
|
80 |
<div class="modal-header">
|
|
|
81 |
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
|
82 |
<h4 class="modal-title">Process Price Drop - <b class="process-drop-id"></b></h4>
|
| 24083 |
amit.gupta |
83 |
</div>
|
| 31219 |
amit.gupta |
84 |
<div class="modal-body">
|
|
|
85 |
<form id="statusForm">
|
|
|
86 |
<div class="form-group row">
|
|
|
87 |
<div class="col-lg-7 ">
|
|
|
88 |
<input placeholder="Imeis to approve/reject" type="text"
|
|
|
89 |
class="form-control mk_imeis_text" aria-label="...">
|
|
|
90 |
</div>
|
|
|
91 |
<div class="col-lg-4 form-group">
|
|
|
92 |
<select class="form-control input-sm" id="selectPriceDropStatus"
|
|
|
93 |
name="selectPriceDropStatus" placeholder="Status"
|
|
|
94 |
style="border: 3px solid black; width: 94px;">
|
|
|
95 |
<option value="status" disabled selected>Status</option>
|
|
|
96 |
<option value="pending">Pending</option>
|
|
|
97 |
<option value="rejected">Rejected</option>
|
|
|
98 |
<option value="approved">Approved</option>
|
|
|
99 |
</select>
|
|
|
100 |
</div>
|
|
|
101 |
<div class="col-lg-10">
|
|
|
102 |
<input placeholder="Rejection reason" type="text"
|
|
|
103 |
class="form-control mk_rejection_reason" aria-label="...">
|
|
|
104 |
<button type="button" class="btn btn-primary" id="processPDButton">Submit
|
|
|
105 |
</button>
|
|
|
106 |
</div>
|
|
|
107 |
</div>
|
|
|
108 |
<div class="form-group row">
|
|
|
109 |
<div class="col-lg-3">
|
|
|
110 |
<h4>Pending (<span class="mk_pending_count"></span>)</h4>
|
|
|
111 |
<select multiple id="pendingList" class="mk_pending"
|
|
|
112 |
style="width:98%;height:400px">
|
|
|
113 |
</select>
|
|
|
114 |
</div>
|
|
|
115 |
<div class="col-lg-3">
|
|
|
116 |
<h4>Rejected (<span class="mk_rejected_count"></span>)</h4>
|
|
|
117 |
<select multiple class="mk_rejected" style="width:98%;height:400px">
|
|
|
118 |
</select>
|
|
|
119 |
</div>
|
|
|
120 |
<div class="col-lg-3">
|
|
|
121 |
<h4>Approved (<span class="mk_approved_count"></span>)</h4>
|
|
|
122 |
<select multiple class="mk_approved" style="width:98%;height:400px">
|
|
|
123 |
</select>
|
|
|
124 |
</div>
|
|
|
125 |
|
|
|
126 |
</div>
|
|
|
127 |
</form>
|
| 28568 |
amit.gupta |
128 |
</div>
|
| 31219 |
amit.gupta |
129 |
<div class="modal-footer">
|
|
|
130 |
<button type="button" class="closePriceDrop btn btn-primary">Close Price Dop</button>
|
|
|
131 |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
|
132 |
</div>
|
|
|
133 |
</div>
|
|
|
134 |
</div>
|
| 24083 |
amit.gupta |
135 |
</div>
|
| 23868 |
amit.gupta |
136 |
<!-- Modal -->
|
| 26318 |
tejbeer |
137 |
<div id="newPriceDropModal" class="modal" role="dialog">
|
| 31219 |
amit.gupta |
138 |
<div class="modal-dialog">
|
|
|
139 |
|
|
|
140 |
<!-- Modal content-->
|
|
|
141 |
<div class="modal-content">
|
|
|
142 |
<div class="modal-header">
|
|
|
143 |
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
|
144 |
<h4 class="modal-title">Add Price Drop</h4>
|
| 23868 |
amit.gupta |
145 |
</div>
|
| 31219 |
amit.gupta |
146 |
<div class="modal-body">
|
|
|
147 |
<form id="pdForm">
|
|
|
148 |
<div class="form-group row">
|
|
|
149 |
<div class="col-lg-6">
|
|
|
150 |
<input placeholder="Search Item" type="text" class="form-control typeahead"
|
|
|
151 |
id="typeaheaditem" name="Item" data-provide="typeahead"
|
|
|
152 |
autocomplete="off">
|
|
|
153 |
</div>
|
|
|
154 |
<div class="col-lg-3">
|
|
|
155 |
<input type="text" class="form-control" id="affectedDate"
|
|
|
156 |
placeholder="Affected on" type="text"/>
|
|
|
157 |
</div>
|
|
|
158 |
<div class="col-lg-3">
|
|
|
159 |
<button type="button" class="btn btn-primary download-imeis">Download
|
|
|
160 |
IMEIs
|
|
|
161 |
</button>
|
|
|
162 |
</div>
|
|
|
163 |
<!--<div class="col-lg-4 checkbox">
|
|
|
164 |
<label><input id="allColors" type="checkbox" value="">Apply to all Colors</label>
|
|
|
165 |
</div>-->
|
|
|
166 |
</div>
|
|
|
167 |
<div class="form-group row">
|
|
|
168 |
<div class="col-lg-3">
|
|
|
169 |
<label for="dpDrop">MOP:(<span id="oldMop"></span>)</label>
|
|
|
170 |
<input type="number" class="form-control" id="newMop">
|
|
|
171 |
</div>
|
|
|
172 |
<div class="col-lg-3">
|
|
|
173 |
<label for="dp">DP:(<span id="oldDp"></span>)</label>
|
|
|
174 |
<input type="number" class="form-control" id="newDp">
|
|
|
175 |
</div>
|
|
|
176 |
<div class="col-lg-3">
|
|
|
177 |
<label for="newTp">TP:(<span id="oldTp"></span>)</label>
|
|
|
178 |
<input type="number" class="form-control" id="newTp">
|
|
|
179 |
</div>
|
|
|
180 |
</div>
|
|
|
181 |
</form>
|
| 23868 |
amit.gupta |
182 |
</div>
|
| 31219 |
amit.gupta |
183 |
<div class="modal-footer">
|
|
|
184 |
<button type="button" class="addPriceDrop btn btn-primary">Add Price Drop</button>
|
|
|
185 |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
| 24047 |
amit.gupta |
186 |
</div>
|
| 31219 |
amit.gupta |
187 |
</div>
|
|
|
188 |
|
|
|
189 |
</div>
|
| 23868 |
amit.gupta |
190 |
</div>
|
| 23819 |
govind |
191 |
</ol>
|
| 34651 |
aman.kumar |
192 |
<div class="d-flex ms-5 ">
|
|
|
193 |
<input placeholder="Set Duration" name="priceDropStatementPeriod"
|
|
|
194 |
id="priceDropStatementPeriod"
|
|
|
195 |
type="text" value="" class="input-sm">
|
|
|
196 |
<input
|
|
|
197 |
class="btn btn-primary fetch-price-drop-statement-report" type="button"
|
|
|
198 |
value="Submit">
|
|
|
199 |
<input
|
|
|
200 |
class="btn btn-primary download-price-drop-statement-report" type="button"
|
|
|
201 |
value="Download">
|
|
|
202 |
</div>
|
| 23819 |
govind |
203 |
</div>
|
|
|
204 |
</div>
|
| 31219 |
amit.gupta |
205 |
|
| 34651 |
aman.kumar |
206 |
<!-- Table Container - This will be replaced with AJAX content -->
|
|
|
207 |
<div id="table-container">
|
|
|
208 |
#parse("price-drop-table.vm")
|
| 31219 |
amit.gupta |
209 |
</div>
|
|
|
210 |
</section>
|
| 24406 |
amit.gupta |
211 |
<script type="text/javascript">
|
| 34651 |
aman.kumar |
212 |
$('input[name="priceDropStatementPeriod"]').daterangepicker(getRangedDatePicker());
|
| 31219 |
amit.gupta |
213 |
$(document).ready(function () {
|
|
|
214 |
$(".modal").on("hidden.bs.modal", function () {
|
|
|
215 |
$(".modal-body1").find(".mk_imeis_text").val('');
|
|
|
216 |
});
|
| 28568 |
amit.gupta |
217 |
|
| 31219 |
amit.gupta |
218 |
var start = moment().subtract(29, 'days');
|
|
|
219 |
var end = moment();
|
|
|
220 |
|
|
|
221 |
priceDropTable = $('#priceDrop').find('table').DataTable({
|
|
|
222 |
pageLength: 20,
|
|
|
223 |
order: [[5, 'desc']]
|
| 24410 |
amit.gupta |
224 |
});
|
| 31219 |
amit.gupta |
225 |
|
|
|
226 |
|
|
|
227 |
getItemAheadOptions($("#typeaheaditem"), true, function (selectedItem) {
|
|
|
228 |
currentItem = selectedItem;
|
|
|
229 |
doGetAjaxRequestHandler(context + "/item-pricing/" + currentItem.itemId, function (response) {
|
|
|
230 |
response = JSON.parse(response);
|
|
|
231 |
$('#oldDp').html(response.dp);
|
|
|
232 |
$('#oldMop').html(response.mop);
|
|
|
233 |
$('#oldTp').html(response.tp);
|
|
|
234 |
$('#oldNlc').html(response.nlc);
|
|
|
235 |
});
|
| 24410 |
amit.gupta |
236 |
});
|
| 31219 |
amit.gupta |
237 |
getItemAheadOptions($("#typeaheaditem1"), true, function (selectedItem) {
|
|
|
238 |
currentItem = selectedItem;
|
|
|
239 |
doGetAjaxRequestHandler(context + "/item-pricing/" + currentItem.itemId, function (response) {
|
|
|
240 |
$('.mk_pause_button').data("id", currentItem.catalogId);
|
|
|
241 |
$('.mk_pause_button').data("description", currentItem.itemDescription);
|
|
|
242 |
response = JSON.parse(response);
|
|
|
243 |
$("#mop").val(response.mop);
|
|
|
244 |
$("#mrp").val(response.mrp);
|
|
|
245 |
$("#dp").val(response.dp);
|
|
|
246 |
$("#tp").val(response.tp);
|
|
|
247 |
$('#dpValue').html("DP -" + response.dp);
|
|
|
248 |
$('#mopValue').html("MOP -" + response.mop);
|
|
|
249 |
$('#mrpValue').html("MRP -" + response.mrp);
|
|
|
250 |
$('#tpValue').html("TP -" + response.tp);
|
|
|
251 |
});
|
|
|
252 |
});
|
|
|
253 |
affectedDateInput = $('#affectedDate');
|
|
|
254 |
affectedDateInput.daterangepicker(getSingleDatePicker());
|
|
|
255 |
$("#newPriceDropModal").on('hidden.bs.modal', function () {
|
|
|
256 |
$("#pdForm").trigger("reset");
|
|
|
257 |
});
|
|
|
258 |
$("#addPriceModal").on('hidden.bs.modal', function () {
|
|
|
259 |
$("#pdForm1").trigger("reset");
|
| 24410 |
amit.gupta |
260 |
});
|
|
|
261 |
});
|
| 23819 |
govind |
262 |
</script>
|