| 34505 |
ranu |
1 |
// franchisee sale reports ---------------------------
|
|
|
2 |
// franchisee sale reports ---------------------------
|
|
|
3 |
// franchisee sale reports ---------------------------
|
|
|
4 |
|
|
|
5 |
$(document).on('click', '.analysis-franchise-sales', function () {
|
|
|
6 |
|
|
|
7 |
var fofoId = $(this).data("fofoid");
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
let endPoint = `${context}/analysis-franchiseeSalesReport?fofoId=${fofoId}`;
|
|
|
11 |
|
|
|
12 |
doGetAjaxRequestHandler(endPoint,
|
|
|
13 |
function (response) {
|
|
|
14 |
$('#' + 'main-content').html(response);
|
|
|
15 |
});
|
|
|
16 |
});
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
$(document).on('click', '.analysis-franchisee-sales-fetch-report', function () {
|
|
|
20 |
var startDate = $("#analysis-startDate-franchisee-sales").val();
|
|
|
21 |
|
|
|
22 |
var fofoId = $(this).data("fofoid");
|
|
|
23 |
|
|
|
24 |
var endDate = $("#analysis-endDate-franchisee-sales").val();
|
|
|
25 |
|
|
|
26 |
let endPoint = `${context}/analysis-franchiseeSalesReport?fofoId=${fofoId}&startDate=${startDate}&endDate=${endDate}`;
|
|
|
27 |
|
|
|
28 |
doGetAjaxRequestHandler(endPoint,
|
|
|
29 |
function (response) {
|
|
|
30 |
$('#' + 'main-content').html(response);
|
|
|
31 |
});
|
|
|
32 |
});
|
|
|
33 |
|
|
|
34 |
$(document).on('click', '.analysis-download-franchisee-sales', function () {
|
|
|
35 |
var fofoId = $(this).data("fofoid");
|
|
|
36 |
var startDate = $("#analysis-startDate-franchisee-sales").val();
|
|
|
37 |
|
|
|
38 |
var endDate = $("#analysis-endDate-franchisee-sales").val();
|
|
|
39 |
|
|
|
40 |
if (startDate == "" || startDate == undefined) {
|
|
|
41 |
|
|
|
42 |
alert("start date is not be empty!!");
|
|
|
43 |
return;
|
|
|
44 |
}
|
|
|
45 |
if (endDate == "" || endDate == undefined) {
|
|
|
46 |
|
|
|
47 |
alert("end date is not be empty!!");
|
|
|
48 |
return;
|
|
|
49 |
}
|
|
|
50 |
let endPoint = `${context}/analysis-downloadFranchiseeSales?startDate=${startDate}&endDate=${endDate}&fofoId=${fofoId}`;
|
|
|
51 |
window.location.href = endPoint;
|
|
|
52 |
});
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
// wallet summuary reports-----------------
|
|
|
56 |
// wallet summuary reports-----------------
|
|
|
57 |
// wallet summuary reports-----------------
|
|
|
58 |
|
|
|
59 |
$(document).on('click', ".analysis-wallet_statement", function () {
|
|
|
60 |
var fofoId = $(this).data("fofoid");
|
|
|
61 |
doGetAjaxRequestHandler(context + "/analysis-walletSummaryFetchReportByDate?fofoId=" + fofoId,
|
|
|
62 |
function (response) {
|
|
|
63 |
$('#' + 'main-content').html(response);
|
|
|
64 |
});
|
|
|
65 |
});
|
|
|
66 |
|
|
|
67 |
$(document).on('click', '.analysis-wallet-summary-fetch-report', function () {
|
|
|
68 |
var startDate = $("#analysis-startDate-wallet-summary-report").val();
|
|
|
69 |
|
|
|
70 |
var fofoId = $(this).data("fofoid");
|
|
|
71 |
|
|
|
72 |
var endDate = $("#analysis-endDate-wallet-summary-report").val();
|
|
|
73 |
|
|
|
74 |
let endPoint = `${context}/analysis-walletSummaryFetchReportByDate?fofoId=${fofoId}&startDate=${startDate}&endDate=${endDate}`;
|
|
|
75 |
|
|
|
76 |
doGetAjaxRequestHandler(endPoint,
|
|
|
77 |
function (response) {
|
|
|
78 |
$('#' + 'main-content').html(response);
|
|
|
79 |
});
|
|
|
80 |
});
|
|
|
81 |
|
|
|
82 |
$(document).on('click', '.analysis-download-wallet-summary-report', function () {
|
|
|
83 |
var fofoId = $(this).data("fofoid");
|
|
|
84 |
var startDate = $("#analysis-startDate-wallet-summary-report").val();
|
|
|
85 |
|
|
|
86 |
var endDate = $("#analysis-endDate-wallet-summary-report").val();
|
|
|
87 |
|
|
|
88 |
if (startDate == "" || startDate == undefined) {
|
|
|
89 |
|
|
|
90 |
alert("start date is not be empty!!");
|
|
|
91 |
return;
|
|
|
92 |
}
|
|
|
93 |
if (endDate == "" || endDate == undefined) {
|
|
|
94 |
|
|
|
95 |
alert("end date is not be empty!!");
|
|
|
96 |
return;
|
|
|
97 |
}
|
|
|
98 |
let endPoint = `${context}/analysis-downloadWalletSummaryReport?startDate=${startDate}&endDate=${endDate}&fofoId=${fofoId}`;
|
|
|
99 |
window.location.href = endPoint;
|
|
|
100 |
});
|
|
|
101 |
|
|
|
102 |
|
|
|
103 |
// account statement reports -----------------
|
|
|
104 |
// account statement reports -----------------
|
|
|
105 |
// account statement reports -----------------
|
|
|
106 |
// account statement reports -----------------
|
|
|
107 |
|
|
|
108 |
$(document).on('click', ".analysis-account-statement", function () {
|
|
|
109 |
var fofoId = $(this).data("fofoid");
|
|
|
110 |
doGetAjaxRequestHandler(context + "/analysis-account-statement?fofoId=" + fofoId,
|
|
|
111 |
function (response) {
|
|
|
112 |
$('#' + 'main-content').html(response);
|
|
|
113 |
});
|
|
|
114 |
});
|
|
|
115 |
|
|
|
116 |
$(document).on('click', '.analysis-download-partner-account-statement-report', function () {
|
|
|
117 |
var startDate = getDatesFromPicker('input[name="analysis-accountStatementPeriod"]').startDate;
|
|
|
118 |
var endDate = getDatesFromPicker('input[name="analysis-accountStatementPeriod"]').endDate;
|
|
|
119 |
var fofoId = $(this).data("fofoid");
|
|
|
120 |
if (startDate == "" || startDate == undefined) {
|
|
|
121 |
alert("start date is not be empty!!");
|
|
|
122 |
return;
|
|
|
123 |
}
|
|
|
124 |
if (endDate == "" || endDate == undefined) {
|
|
|
125 |
|
|
|
126 |
alert("end date is not be empty!!");
|
|
|
127 |
return;
|
|
|
128 |
}
|
|
|
129 |
let endPoint = `${context}/analysis/account/statement?startDate=${startDate}&endDate=${endDate}&fofoId=${fofoId}`;
|
|
|
130 |
|
|
|
131 |
window.location.href = endPoint;
|
|
|
132 |
});
|
|
|
133 |
$(document).on('click', '.analysis-fetch-partner-account-statement-report', function () {
|
|
|
134 |
var fofoId = $(this).data("fofoid");
|
|
|
135 |
var startDate = getDatesFromPicker('input[name="analysis-accountStatementPeriod"]').startDate;
|
|
|
136 |
var endDate = getDatesFromPicker('input[name="analysis-accountStatementPeriod"]').endDate;
|
|
|
137 |
|
|
|
138 |
if (startDate == "" || startDate == undefined) {
|
|
|
139 |
alert("start date is not be empty!!");
|
|
|
140 |
return;
|
|
|
141 |
}
|
|
|
142 |
if (endDate == "" || endDate == undefined) {
|
|
|
143 |
|
|
|
144 |
alert("end date is not be empty!!");
|
|
|
145 |
return;
|
|
|
146 |
}
|
|
|
147 |
|
|
|
148 |
doGetAjaxRequestHandler(context + "/analysis-account-statement-report?startDate=" + startDate + "&endDate=" + endDate + "&fofoId=" + fofoId,
|
|
|
149 |
function (response) {
|
|
|
150 |
$('.account-statement-conatiner').html(response);
|
|
|
151 |
});
|
|
|
152 |
|
|
|
153 |
});
|
|
|
154 |
|
|
|
155 |
|
|
|
156 |
// loan statement here ..................///
|
|
|
157 |
// loan statement here ..................///
|
|
|
158 |
// loan statement here ..................///
|
|
|
159 |
// loan statement here ..................///
|
|
|
160 |
|
|
|
161 |
|
|
|
162 |
$(document).on('click', ".analysis-loan-statement", function () {
|
|
|
163 |
var fofoId = $(this).data("fofoid");
|
|
|
164 |
doGetAjaxRequestHandler(context + "/analysis-loan/loan-statement?fofoId=" + fofoId,
|
|
|
165 |
function (response) {
|
|
|
166 |
$('#' + 'main-content').html(response);
|
|
|
167 |
});
|
|
|
168 |
});
|
|
|
169 |
|
|
|
170 |
$(document).on('click', '.analysis-partner-loan-statement-report', function () {
|
|
|
171 |
var fofoId = $(this).data("fofoid");
|
|
|
172 |
var startDate = getDatesFromPicker('input[name="analysis-loanStatementPeriod"]').startDate;
|
|
|
173 |
var endDate = getDatesFromPicker('input[name="analysis-loanStatementPeriod"]').endDate;
|
|
|
174 |
|
|
|
175 |
if (startDate == "" || startDate == undefined) {
|
|
|
176 |
alert("start date is not be empty!!");
|
|
|
177 |
return;
|
|
|
178 |
}
|
|
|
179 |
if (endDate == "" || endDate == undefined) {
|
|
|
180 |
|
|
|
181 |
alert("end date is not be empty!!");
|
|
|
182 |
return;
|
|
|
183 |
}
|
|
|
184 |
doGetAjaxRequestHandler(context + "/analysis-loan/partner-loan-statement-report?startDate=" + startDate + "&endDate=" + endDate + "&fofoId=" + fofoId,
|
|
|
185 |
function (response) {
|
|
|
186 |
$('.loan-statement-conatiner').html(response);
|
|
|
187 |
$('#loanStatementSummaryReport').DataTable({
|
|
|
188 |
"scrollX": true,
|
|
|
189 |
"bPaginate": true,
|
|
|
190 |
"bLengthChange": true,
|
|
|
191 |
"bFilter": true,
|
|
|
192 |
"bInfo": false,
|
|
|
193 |
"bAutoWidth": false
|
|
|
194 |
});
|
|
|
195 |
});
|
|
|
196 |
|
|
|
197 |
|
|
|
198 |
});
|
|
|
199 |
|
|
|
200 |
$(document).on('click', '.analysis-download-partner-loan-statement', function () {
|
|
|
201 |
var fofoId = $(this).data("fofoid");
|
|
|
202 |
var startDate = getDatesFromPicker('input[name="analysis-loanStatementPeriod"]').startDate;
|
|
|
203 |
var endDate = getDatesFromPicker('input[name="analysis-loanStatementPeriod"]').endDate;
|
|
|
204 |
|
|
|
205 |
if (startDate == "" || startDate == undefined) {
|
|
|
206 |
|
|
|
207 |
alert("start date is not be empty!!");
|
|
|
208 |
return;
|
|
|
209 |
}
|
|
|
210 |
if (endDate == "" || endDate == undefined) {
|
|
|
211 |
|
|
|
212 |
alert("end date is not be empty!!");
|
|
|
213 |
return;
|
|
|
214 |
}
|
|
|
215 |
let endPoint = `${context}/analysis-loan/download-partner-loan-statement-report?startDate=${startDate}&endDate=${endDate}&fofoId=${fofoId}`;
|
|
|
216 |
|
|
|
217 |
window.location.href = endPoint;
|
|
|
218 |
});
|
| 34507 |
ranu |
219 |
|
|
|
220 |
|
|
|
221 |
// scheme payout report--------------
|
|
|
222 |
// scheme payout report--------------
|
|
|
223 |
// scheme payout report--------------
|
|
|
224 |
// scheme payout report--------------
|
|
|
225 |
|
|
|
226 |
$(document).on('click', ".analysis-download-scheme-payout-report", function () {
|
|
|
227 |
var fofoId = $(this).data("fofoid");
|
|
|
228 |
var startDate = $("#analysis-startDate-scheme-payout").val();
|
|
|
229 |
|
|
|
230 |
var endDate = $("#analysis-endDate-scheme-payout").val();
|
|
|
231 |
|
|
|
232 |
if (startDate == "" || startDate == undefined) {
|
|
|
233 |
alert("start date is not be empty!!");
|
|
|
234 |
return;
|
|
|
235 |
}
|
|
|
236 |
if (endDate == "" || endDate == undefined) {
|
|
|
237 |
|
|
|
238 |
alert("end date is not be empty!!");
|
|
|
239 |
return;
|
|
|
240 |
}
|
|
|
241 |
let endPoint = `${context}/analysis-schemePayoutReportDownload?startDate=${startDate}&endDate=${endDate}&fofoId=${fofoId}`;
|
|
|
242 |
|
|
|
243 |
window.location.href = endPoint;
|
|
|
244 |
});
|
|
|
245 |
|
|
|
246 |
$(document).on('click', ".analysis-scheme-payout-fetch-report", function () {
|
|
|
247 |
var fofoId = $(this).data("fofoid");
|
|
|
248 |
var startDate = $("#analysis-startDate-scheme-payout").val();
|
|
|
249 |
|
|
|
250 |
var endDate = $("#analysis-endDate-scheme-payout").val();
|
|
|
251 |
|
|
|
252 |
if (startDate == "" || startDate == undefined) {
|
|
|
253 |
alert("start date is not be empty!!");
|
|
|
254 |
return;
|
|
|
255 |
}
|
|
|
256 |
if (endDate == "" || endDate == undefined) {
|
|
|
257 |
|
|
|
258 |
alert("end date is not be empty!!");
|
|
|
259 |
return;
|
|
|
260 |
}
|
|
|
261 |
|
|
|
262 |
let endPoint = `${context}/analysis-schemePayoutReport?startDate=${startDate}&endDate=${endDate}&fofoId=${fofoId}`;
|
|
|
263 |
|
|
|
264 |
doGetAjaxRequestHandler(endPoint,
|
|
|
265 |
function (response) {
|
|
|
266 |
$('#' + 'main-content').html(response);
|
|
|
267 |
});
|
|
|
268 |
});
|
|
|
269 |
|
|
|
270 |
$(document).on('click', ".analysis-scheme-payout-report", function () {
|
|
|
271 |
var fofoId = $(this).data("fofoid");
|
|
|
272 |
|
|
|
273 |
let endPoint = `${context}/analysis-schemePayoutReport?fofoId=${fofoId}`;
|
|
|
274 |
|
|
|
275 |
doGetAjaxRequestHandler(endPoint,
|
|
|
276 |
function (response) {
|
|
|
277 |
$('#' + 'main-content').html(response);
|
|
|
278 |
});
|
|
|
279 |
});
|
| 34508 |
ranu |
280 |
|
|
|
281 |
// price drop ....................price drop ....................
|
|
|
282 |
// price drop ....................price drop ....................
|
|
|
283 |
// price drop ....................price drop ....................
|
|
|
284 |
|
|
|
285 |
$(document).on('click', ".analysis-price-drop-report", function () {
|
|
|
286 |
var fofoId = $(this).data("fofoid");
|
|
|
287 |
doGetAjaxRequestHandler(context + "/analysis-priceDropFetchReportByDate?fofoId=" + fofoId,
|
|
|
288 |
function (response) {
|
|
|
289 |
$('#' + 'main-content').html(response);
|
|
|
290 |
});
|
|
|
291 |
});
|
|
|
292 |
|
|
|
293 |
|
|
|
294 |
$(document).on('click', '.analysis-price-drop-fetch-report', function () {
|
|
|
295 |
var fofoId = $(this).data("fofoid");
|
|
|
296 |
var startDate = $("#analysis-startDate-price-drop-report").val();
|
|
|
297 |
|
|
|
298 |
var endDate = $("#analysis-endDate-price-drop-report").val();
|
|
|
299 |
|
|
|
300 |
if (startDate == "" || startDate == undefined) {
|
|
|
301 |
|
|
|
302 |
alert("start date is not be empty!!");
|
|
|
303 |
return;
|
|
|
304 |
}
|
|
|
305 |
if (endDate == "" || endDate == undefined) {
|
|
|
306 |
|
|
|
307 |
alert("end date is not be empty!!");
|
|
|
308 |
return;
|
|
|
309 |
}
|
|
|
310 |
let endPoint = `${context}/analysis-priceDropFetchReportByDate?startDate=${startDate}&endDate=${endDate}&fofoId=${fofoId}`;
|
|
|
311 |
|
|
|
312 |
|
|
|
313 |
doGetAjaxRequestHandler(endPoint,
|
|
|
314 |
function (response) {
|
|
|
315 |
$('#' + 'main-content').html(response);
|
|
|
316 |
});
|
|
|
317 |
|
|
|
318 |
});
|
|
|
319 |
|
|
|
320 |
$(document).on('click', '.analysis-download-price-drop-report', function () {
|
|
|
321 |
var fofoId = $(this).data("fofoid");
|
|
|
322 |
|
|
|
323 |
var startDate = $("#analysis-startDate-price-drop-report").val();
|
|
|
324 |
|
|
|
325 |
var endDate = $("#analysis-endDate-price-drop-report").val();
|
|
|
326 |
|
|
|
327 |
if (startDate == "" || startDate == undefined) {
|
|
|
328 |
|
|
|
329 |
alert("start date is not be empty!!");
|
|
|
330 |
return;
|
|
|
331 |
}
|
|
|
332 |
if (endDate == "" || endDate == undefined) {
|
|
|
333 |
|
|
|
334 |
alert("end date is not be empty!!");
|
|
|
335 |
return;
|
|
|
336 |
}
|
|
|
337 |
let endPoint = `${context}/analysis-downloadPriceDropReport?startDate=${startDate}&endDate=${endDate}&fofoId=${fofoId}`;
|
|
|
338 |
|
|
|
339 |
|
|
|
340 |
window.location.href = endPoint;
|
|
|
341 |
|
|
|
342 |
|
|
|
343 |
});
|
| 34509 |
ranu |
344 |
|
|
|
345 |
|
|
|
346 |
// collection summary report ------------------
|
|
|
347 |
// collection summary report ------------------
|
|
|
348 |
// collection summary report ------------------
|
|
|
349 |
// collection summary report ------------------
|
|
|
350 |
|
|
|
351 |
|
|
|
352 |
$(document).on('click', ".analysis-partner-collection-summary", function () {
|
|
|
353 |
var fofoId = $(this).data("fofoid");
|
|
|
354 |
doGetAjaxRequestHandler(context + "/analysis-collectionSummaryFetchReport?fofoId=" + fofoId,
|
|
|
355 |
function (response) {
|
|
|
356 |
$('#' + 'main-content').html(response);
|
|
|
357 |
});
|
|
|
358 |
});
|
|
|
359 |
|
|
|
360 |
|
|
|
361 |
$(document).on('click', '.analysis-download-collection-summary', function () {
|
|
|
362 |
var fofoId = $(this).data("fofoid");
|
|
|
363 |
var startDate = $("#analysis-startDate-collection-summary").val();
|
|
|
364 |
|
|
|
365 |
var endDate = $("#analysis-endDate-collection-summary").val();
|
|
|
366 |
|
|
|
367 |
if (startDate == "" || startDate == undefined) {
|
|
|
368 |
|
|
|
369 |
alert("start date is not be empty!!");
|
|
|
370 |
return;
|
|
|
371 |
}
|
|
|
372 |
if (endDate == "" || endDate == undefined) {
|
|
|
373 |
|
|
|
374 |
alert("end date is not be empty!!");
|
|
|
375 |
return;
|
|
|
376 |
}
|
|
|
377 |
let endPoint = `${context}/analysis-downloadCollectionSummary?startDate=${startDate}&endDate=${endDate}&fofoId=${fofoId}`;
|
|
|
378 |
|
|
|
379 |
window.location.href = endPoint;
|
|
|
380 |
|
|
|
381 |
});
|
|
|
382 |
$(document).on('click', ".analysis-collection-summary-fetch-report", function () {
|
|
|
383 |
var fofoId = $(this).data("fofoid");
|
|
|
384 |
var startDate = $("#analysis-startDate-collection-summary").val();
|
|
|
385 |
|
|
|
386 |
var endDate = $("#analysis-endDate-collection-summary").val();
|
|
|
387 |
|
|
|
388 |
if (startDate == "" || startDate == undefined) {
|
|
|
389 |
alert("start date is not be empty!!");
|
|
|
390 |
return;
|
|
|
391 |
}
|
|
|
392 |
if (endDate == "" || endDate == undefined) {
|
|
|
393 |
|
|
|
394 |
alert("end date is not be empty!!");
|
|
|
395 |
return;
|
|
|
396 |
}
|
|
|
397 |
let endPoint = `${context}/analysis-collectionSummaryFetchReport?startDate=${startDate}&endDate=${endDate}&fofoId=${fofoId}`;
|
|
|
398 |
|
|
|
399 |
|
|
|
400 |
doGetAjaxRequestHandler(endPoint,
|
|
|
401 |
function (response) {
|
|
|
402 |
$('#' + 'main-content').html(response);
|
|
|
403 |
});
|
|
|
404 |
|
|
|
405 |
|
|
|
406 |
});
|
|
|
407 |
|
|
|
408 |
|
|
|
409 |
// credit note report .............
|
|
|
410 |
// credit note report .............
|
|
|
411 |
// credit note report .............
|
|
|
412 |
|
|
|
413 |
$(document).on('click', ".analysis-credit-note", function () {
|
|
|
414 |
var fofoId = $(this).data("fofoid");
|
|
|
415 |
doGetAjaxRequestHandler(context + "/analysis-report/credit-note?fofoId=" + fofoId,
|
|
|
416 |
function (response) {
|
|
|
417 |
$('#' + 'main-content').html(response);
|
|
|
418 |
});
|
|
|
419 |
});
|
|
|
420 |
|
|
|
421 |
$(document).on('click', '.analysis-credit-not-list', function () {
|
|
|
422 |
var selectedDate = $('input[name="analysis-creditNotePeriod"]').val(); // Get the selected year-month
|
|
|
423 |
var fofoId = $(this).data("fofoid");
|
|
|
424 |
if (!selectedDate) {
|
|
|
425 |
alert("Month-Year selection cannot be empty!");
|
|
|
426 |
return;
|
|
|
427 |
}
|
|
|
428 |
doGetAjaxRequestHandler(context + "analysis-credit/credit-note-report?yearMonth=" + selectedDate + "&fofoId=" + fofoId,
|
|
|
429 |
function (response) {
|
|
|
430 |
$('.credit-note-conatiner').html(response);
|
|
|
431 |
$('#creditNoteList').DataTable({
|
|
|
432 |
"scrollX": true,
|
|
|
433 |
"bPaginate": true,
|
|
|
434 |
"bLengthChange": true,
|
|
|
435 |
"bFilter": true,
|
|
|
436 |
"bInfo": false,
|
|
|
437 |
"bAutoWidth": false
|
|
|
438 |
});
|
|
|
439 |
});
|
|
|
440 |
|
|
|
441 |
});
|
|
|
442 |
|
|
|
443 |
$(document).on('click', '.analysis-download-credit-note', function () {
|
|
|
444 |
var cnNumber = $(this).data("creditnumber");
|
|
|
445 |
|
|
|
446 |
if (!cnNumber) {
|
|
|
447 |
alert("CN-Number cannot be empty!");
|
|
|
448 |
return;
|
|
|
449 |
}
|
|
|
450 |
|
|
|
451 |
let endPoint = `${context}/analysis-credit-note/download?cnNumber=${cnNumber}`;
|
|
|
452 |
|
|
|
453 |
window.location.href = endPoint; // Redirect to the download URL
|
|
|
454 |
});
|
|
|
455 |
|
|
|
456 |
$(document).on('click', '.analysis-download-credit-note-attachement', function () {
|
|
|
457 |
var cnNumber = $(this).data("creditnumber");
|
|
|
458 |
|
|
|
459 |
if (!cnNumber) {
|
|
|
460 |
alert("CN-Number cannot be empty!");
|
|
|
461 |
return;
|
|
|
462 |
}
|
|
|
463 |
|
|
|
464 |
let endPoint = `${context}/analysis-credit-note/attachements?cnNumber=${cnNumber}`;
|
|
|
465 |
|
|
|
466 |
window.location.href = endPoint; // Redirect to the download URL
|
|
|
467 |
});
|
| 34524 |
ranu |
468 |
|
|
|
469 |
|
|
|
470 |
// schemes ...........//
|
|
|
471 |
// schemes ...........//
|
|
|
472 |
// schemes ...........//
|
|
|
473 |
|
|
|
474 |
|
|
|
475 |
$(document).on('click', ".analysis-schemes", function () {
|
|
|
476 |
var fofoId = $(this).data('fofoid');
|
|
|
477 |
schemesNew("main-content", fofoId);
|
|
|
478 |
console.log("Active Schemes Button Clicked...")
|
|
|
479 |
});
|
|
|
480 |
|
|
|
481 |
|
|
|
482 |
function schemesNew(domId, fofoId) {
|
|
|
483 |
doGetAjaxRequestHandler(context + "/getAnalysisSchemes?fofoId=" + fofoId, function (response) {
|
|
|
484 |
$('#' + domId).html(response);
|
|
|
485 |
});
|
|
|
486 |
}
|
|
|
487 |
|
|
|
488 |
$(document).on("keyup", "#analysis-scheme-item-search-text", function (e) {
|
|
|
489 |
var keyCode = e.keyCode || e.which;
|
|
|
490 |
if (keyCode == 13) {
|
|
|
491 |
$("#analysis-scheme-item-search-button").click();
|
|
|
492 |
}
|
|
|
493 |
});
|
|
|
494 |
|
|
|
495 |
$(document).on("keyup", "#analysis-scheme-search-text", function (e) {
|
|
|
496 |
var keyCode = e.keyCode || e.which;
|
|
|
497 |
if (keyCode == 13) {
|
|
|
498 |
$("#analysis-scheme-search-button").click();
|
|
|
499 |
}
|
|
|
500 |
});
|
|
|
501 |
|
|
|
502 |
$(document).on('click', "#analysis-scheme-imei-search-button", function () {
|
|
|
503 |
var fofoId = $(this).data('fofoid');
|
|
|
504 |
var searchText = $("#analysis-scheme-imei-search-text").val();
|
|
|
505 |
var date = $(".analysis-schemes-date").val();
|
|
|
506 |
if (typeof (searchText) == "undefined" || !searchText) {
|
|
|
507 |
searchText = "";
|
|
|
508 |
alert("please select imei");
|
|
|
509 |
return;
|
|
|
510 |
}
|
|
|
511 |
if (typeof imei != "undefined") {
|
|
|
512 |
console.log(imei);
|
|
|
513 |
loadSchemeImeiSearchInfoNew(imei, date, fofoId);
|
|
|
514 |
} else {
|
|
|
515 |
console.log("reeffff")
|
|
|
516 |
alert("Data No Found")
|
|
|
517 |
}
|
|
|
518 |
});
|
|
|
519 |
|
|
|
520 |
function loadSchemeImeiSearchInfoNew(selectedImei, date, fofoId) {
|
|
|
521 |
|
|
|
522 |
loadSearchImeiSchemeNew("main-content", selectedImei, date, fofoId);
|
|
|
523 |
}
|
|
|
524 |
|
|
|
525 |
function loadSearchImeiSchemeNew(domId, selected_imei, date, fofoId) {
|
|
|
526 |
var category = $('#partner-category').val();
|
|
|
527 |
var searchText = $("#analysis-scheme-imei-search-text").val();
|
|
|
528 |
|
|
|
529 |
var category = $('#partner-category').val();
|
|
|
530 |
|
|
|
531 |
console.log(category)
|
|
|
532 |
|
|
|
533 |
if (typeof (searchText) == "undefined" || !searchText) {
|
|
|
534 |
searchText = "";
|
|
|
535 |
}
|
|
|
536 |
if (typeof (category) == "undefined" || !category) {
|
|
|
537 |
category = "";
|
|
|
538 |
}
|
|
|
539 |
if ((searchText) && (category)) {
|
|
|
540 |
doGetAjaxRequestHandler(context + "/getAnalysisSchemes?fofoId=" + fofoId + "&searchImei="
|
|
|
541 |
+ selected_imei + "&partnerType=" + category, function (
|
|
|
542 |
response) {
|
|
|
543 |
$('#' + domId).html(response);
|
|
|
544 |
|
|
|
545 |
$('#partner-category').val(category);
|
|
|
546 |
$('#scheme-imei-search-text').val(selected_imei);
|
|
|
547 |
});
|
|
|
548 |
} else if ((searchText)) {
|
|
|
549 |
doGetAjaxRequestHandler(`${context}/getAnalysisSchemes?fofoId=${fofoId}&searchImei=${selected_imei}&date=${date}`, function (response) {
|
|
|
550 |
$('#' + domId).html(response);
|
|
|
551 |
$('#scheme-imei-search-text').val(selected_imei);
|
|
|
552 |
|
|
|
553 |
});
|
|
|
554 |
}
|
|
|
555 |
}
|
|
|
556 |
|
|
|
557 |
$(document).on('click', "#analysis-scheme-search-button",
|
|
|
558 |
function () {
|
|
|
559 |
var searchText = $("#analysis-scheme-search-text").val();
|
|
|
560 |
var fofoId = $(this).data('fofoid');
|
|
|
561 |
if (typeof (searchText) == "undefined" || !searchText) {
|
|
|
562 |
searchText = "";
|
|
|
563 |
}
|
|
|
564 |
doGetAjaxRequestHandler(context + "/getAnalysisSchemes?fofoId=" + fofoId + "&searchScheme="
|
|
|
565 |
+ searchText, function (response) {
|
|
|
566 |
$('#' + "main-content").html(response);
|
|
|
567 |
});
|
|
|
568 |
});
|
|
|
569 |
|
|
|
570 |
$(document).on('click', "#analysis-scheme-item-search-button", function () {
|
|
|
571 |
var searchText = $("#analysis-scheme-item-search-text").val();
|
|
|
572 |
var fofoId = $(this).data('fofoid');
|
|
|
573 |
var date = $(".analysis-schemes-date").val();
|
|
|
574 |
if (typeof (searchText) == "undefined" || !searchText) {
|
|
|
575 |
searchText = "";
|
|
|
576 |
alert("please select item");
|
|
|
577 |
return;
|
|
|
578 |
}
|
|
|
579 |
if (typeof currentItem != "undefined") {
|
|
|
580 |
console.log(currentItem);
|
|
|
581 |
loadSchemeItemSearchInfoNew(currentItem, date, fofoId);
|
|
|
582 |
} else {
|
|
|
583 |
console.log("reeffff")
|
|
|
584 |
alert("Data No Found")
|
|
|
585 |
}
|
|
|
586 |
});
|
|
|
587 |
|
|
|
588 |
|
|
|
589 |
function loadSchemeItemSearchInfoNew(selectedModel, date, fofoId) {
|
|
|
590 |
loadSearchItemSchemeNew("main-content", selectedModel, date, fofoId);
|
|
|
591 |
}
|
|
|
592 |
|
|
|
593 |
function loadSearchItemSchemeNew(domId, selectedModel, date, fofoId) {
|
|
|
594 |
var searchText = $("#analysis-scheme-item-search-text").val();
|
|
|
595 |
var category = $('#partner-category').val();
|
|
|
596 |
|
|
|
597 |
if (typeof (searchText) == "undefined" || !searchText) {
|
|
|
598 |
searchText = "";
|
|
|
599 |
}
|
|
|
600 |
if (typeof (category) == "undefined" || !category) {
|
|
|
601 |
category = "";
|
|
|
602 |
}
|
|
|
603 |
if (searchText && category) {
|
|
|
604 |
doGetAjaxRequestHandler(`${context}/getAnalysisSchemes?fofoId=${fofoId}&searchModel=${selectedModel}&partnerType=${category}&date=${date}`, function (response) {
|
|
|
605 |
$('#' + domId).html(response);
|
|
|
606 |
$('#partner-category').val(category);
|
|
|
607 |
});
|
|
|
608 |
} else if (searchText) {
|
|
|
609 |
doGetAjaxRequestHandler(`${context}/getAnalysisSchemes?fofoId=${fofoId}&searchModel=${selectedModel}&date=${date}`, function (response) {
|
|
|
610 |
$('#' + domId).html(response);
|
|
|
611 |
$('#partner-category').val(category);
|
|
|
612 |
});
|
|
|
613 |
|
|
|
614 |
}
|
|
|
615 |
|
|
|
616 |
}
|
|
|
617 |
|
|
|
618 |
|
|
|
619 |
// price circular table start ............
|
|
|
620 |
// price circular table start ............
|
|
|
621 |
// price circular table start ............
|
|
|
622 |
|
|
|
623 |
$(document).on('click', ".analysis-submit-circular-request", function () {
|
|
|
624 |
let brand = $("#brands").val();
|
|
|
625 |
var fofoId = $(this).data('fofoid');
|
|
|
626 |
let priceCircularUrl = `${context}/analysisPriceCircularByBrand?brand=${brand}&fofoId=${fofoId}`;
|
|
|
627 |
if (typeof partnerId == "number") {
|
|
|
628 |
priceCircularUrl = `${priceCircularUrl}&fofoId=${partnerId}`;
|
|
|
629 |
}
|
|
|
630 |
doGetAjaxRequestHandler(priceCircularUrl,
|
|
|
631 |
function (response) {
|
|
|
632 |
console.log(response)
|
|
|
633 |
$('.price-circular-container').html(response);
|
|
|
634 |
});
|
|
|
635 |
});
|
|
|
636 |
|
|
|
637 |
|
|
|
638 |
$(document).on('click', ".analysis-partner-price-circular", function () {
|
|
|
639 |
var fofoId = $(this).data('fofoid');
|
|
|
640 |
bootbox.confirm({
|
|
|
641 |
message: "<div class = 'disclosurehindata'> <img src='resources/images/disclosure.png' style='width:100%'> </div>"
|
|
|
642 |
,
|
|
|
643 |
buttons: {
|
|
|
644 |
confirm: {
|
|
|
645 |
label: 'I agree',
|
|
|
646 |
className: 'btn-success'
|
|
|
647 |
},
|
|
|
648 |
cancel: {
|
|
|
649 |
label: 'I disagree',
|
|
|
650 |
className: 'btn-danger'
|
|
|
651 |
}
|
|
|
652 |
},
|
|
|
653 |
callback: function (result) {
|
|
|
654 |
if (result == true) {
|
|
|
655 |
analysisloadPartnerPriceCircular("main-content", fofoId);
|
|
|
656 |
}
|
|
|
657 |
}
|
|
|
658 |
});
|
|
|
659 |
|
|
|
660 |
});
|
|
|
661 |
|
|
|
662 |
|
|
|
663 |
function analysisloadPartnerPriceCircular(domId, fofoId) {
|
|
|
664 |
|
|
|
665 |
doGetAjaxRequestHandler(context + "/analysisPartnerPriceCircular?fofoId=" + fofoId,
|
|
|
666 |
function (response) {
|
|
|
667 |
$('#' + domId).html(response);
|
|
|
668 |
});
|
|
|
669 |
}
|
|
|
670 |
|