| 23506 |
amit.gupta |
1 |
<style>
|
| 34142 |
tejus.loha |
2 |
.pointer {
|
|
|
3 |
cursor: pointer;
|
|
|
4 |
}
|
|
|
5 |
|
|
|
6 |
.btn:hover {
|
|
|
7 |
color: grey;
|
|
|
8 |
text-decoration: none;
|
|
|
9 |
}
|
|
|
10 |
|
|
|
11 |
.btn-primary:hover {
|
|
|
12 |
color: grey;
|
|
|
13 |
text-decoration: none;
|
|
|
14 |
}
|
|
|
15 |
|
|
|
16 |
.retailer-details {
|
|
|
17 |
cursor: pointer;
|
|
|
18 |
}
|
| 23506 |
amit.gupta |
19 |
</style>
|
|
|
20 |
|
| 26320 |
tejbeer |
21 |
<script type="text/javascript">
|
| 34142 |
tejus.loha |
22 |
// $("#partnerFofoId").typeahead({
|
|
|
23 |
// source: retailers,
|
|
|
24 |
// autoSelect: true,
|
|
|
25 |
// displayText: function (item) {
|
|
|
26 |
// return item.businessName + "-" + item.address.city;
|
|
|
27 |
// },
|
|
|
28 |
// afterSelect: function (currentItem) {
|
|
|
29 |
// currentFofoId = currentItem.partnerId;
|
|
|
30 |
// fofoId = currentItem.partnerId;
|
|
|
31 |
// doAjaxRequestHandler(context + "/return/inventory/" + currentFofoId, "GET", function (response) {
|
|
|
32 |
// inventoryTable.rows().remove().rows.add($(response)).draw(false);
|
|
|
33 |
// });
|
|
|
34 |
// }
|
|
|
35 |
// });
|
|
|
36 |
|
| 26320 |
tejbeer |
37 |
</script>
|
|
|
38 |
|
| 34142 |
tejus.loha |
39 |
<section class="wrapper">
|
|
|
40 |
<div class="row">
|
|
|
41 |
<div class="col-lg-12">
|
|
|
42 |
<h3 class="page-header"><i class="icon_document_alt"></i>View/Request Return</h3>
|
|
|
43 |
<ol class="breadcrumb">
|
|
|
44 |
<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
|
|
|
45 |
<li><i class="icon_document_alt"></i>View Returnables</li>
|
|
|
46 |
</ol>
|
|
|
47 |
</div>
|
|
|
48 |
</div>
|
|
|
49 |
|
| 23506 |
amit.gupta |
50 |
<div>
|
| 34142 |
tejus.loha |
51 |
<div class="row">
|
|
|
52 |
<div class="col-lg-2 form-group">
|
|
|
53 |
<select class="form-control input-sm" id="fofo-users" name="fofo-users" placeholder="Partners">
|
|
|
54 |
<option value="" disabled selected>Partners</option>
|
|
|
55 |
#foreach($fofoId in $customRetailersMap.keySet())
|
|
|
56 |
<option value="$fofoId"
|
|
|
57 |
data-email="$customRetailersMap.get($fofoId).getEmail()">$customRetailersMap.get($fofoId).getBusinessName()</option>
|
|
|
58 |
#end
|
|
|
59 |
</select>
|
|
|
60 |
</div>
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
<div class="col-lg-4" id="inventory-container">
|
|
|
64 |
<table class="table table-striped table-condensed table-bordered">
|
|
|
65 |
<thead>
|
|
|
66 |
<tr>
|
|
|
67 |
<th>Item Id</th>
|
|
|
68 |
<th>Description</th>
|
|
|
69 |
<th>Qty</th>
|
|
|
70 |
</tr>
|
|
|
71 |
</thead>
|
|
|
72 |
<tbody id="inventory-body">
|
|
|
73 |
</tbody>
|
|
|
74 |
</table>
|
|
|
75 |
</div>
|
|
|
76 |
<div class="col-lg-6" id="returnable-container">
|
|
|
77 |
<table class="table table-striped table-condensed table-bordered">
|
|
|
78 |
<thead>
|
|
|
79 |
<tr>
|
|
|
80 |
<th>Serial Number</th>
|
|
|
81 |
<th>Unit Price</th>
|
|
|
82 |
<th>Scanned On</th>
|
|
|
83 |
<th>Status</th>
|
|
|
84 |
</tr>
|
|
|
85 |
</thead>
|
|
|
86 |
<tbody id="returnables-body">
|
|
|
87 |
</tbody>
|
|
|
88 |
</table>
|
|
|
89 |
</div>
|
|
|
90 |
</div>
|
|
|
91 |
</div>
|
| 23506 |
amit.gupta |
92 |
</section>
|
|
|
93 |
<script type="text/javascript">
|
|
|
94 |
|
| 34142 |
tejus.loha |
95 |
$(document).on('change', 'select[name="fofo-users"]', function () {
|
|
|
96 |
console.log("partner select");
|
|
|
97 |
let fofoId = $('select[name="fofo-users"]').val();
|
|
|
98 |
console.log("partner id -", fofoId);
|
|
|
99 |
doAjaxRequestHandler(context + "/return/inventory/" + fofoId, "GET", function (response) {
|
|
|
100 |
inventoryTable.rows().remove().rows.add($(response)).draw(false);
|
|
|
101 |
});
|
|
|
102 |
})
|
|
|
103 |
/* Create an array with the values of all the input boxes in a column */
|
|
|
104 |
$.fn.dataTable.ext.order['dom-text'] = function (settings, col) {
|
|
|
105 |
return this.api().column(col, {order: 'index'}).nodes().map(function (td, i) {
|
|
|
106 |
return $('input', td).val();
|
|
|
107 |
});
|
|
|
108 |
}
|
|
|
109 |
|
|
|
110 |
/* Create an array with the values of all the input boxes in a column, parsed as numbers */
|
|
|
111 |
$.fn.dataTable.ext.order['dom-text-numeric'] = function (settings, col) {
|
|
|
112 |
return this.api().column(col, {order: 'index'}).nodes().map(function (td, i) {
|
|
|
113 |
return $('input', td).val() * 1;
|
|
|
114 |
});
|
|
|
115 |
}
|
|
|
116 |
|
|
|
117 |
/* Create an array with the values of all the select options in a column */
|
|
|
118 |
$.fn.dataTable.ext.order['dom-select'] = function (settings, col) {
|
|
|
119 |
return this.api().column(col, {order: 'index'}).nodes().map(function (td, i) {
|
|
|
120 |
return $('select', td).val();
|
|
|
121 |
});
|
|
|
122 |
}
|
|
|
123 |
|
|
|
124 |
/* Create an array with the values of all the checkboxes in a column */
|
|
|
125 |
$.fn.dataTable.ext.order['dom-checkbox'] = function (settings, col) {
|
|
|
126 |
return this.api().column(col, {order: 'index'}).nodes().map(function (td, i) {
|
|
|
127 |
return $('input', td).prop('checked') ? '1' : '0';
|
|
|
128 |
});
|
|
|
129 |
}
|
|
|
130 |
|
|
|
131 |
/* Initialise the table with the required column ordering data types */
|
|
|
132 |
$(document).ready(function () {
|
|
|
133 |
/*storesTable = $('#store-container').find('table').DataTable({"pageLength": 20});*/
|
|
|
134 |
inventoryTable = $('#inventory-container').find('table').DataTable(
|
|
|
135 |
{
|
|
|
136 |
"paging": true,
|
|
|
137 |
"searching": true
|
|
|
138 |
}
|
|
|
139 |
);
|
|
|
140 |
returnsTable = $('#returnable-container').find('table').DataTable({
|
|
|
141 |
"paging": true,
|
|
|
142 |
"searching": true
|
|
|
143 |
});
|
|
|
144 |
});
|
|
|
145 |
|
|
|
146 |
|
|
|
147 |
$(document).ready(function () {
|
|
|
148 |
$('#fofo-users').multiselect({
|
|
|
149 |
includeSelectAllOption: true,
|
|
|
150 |
maxHeight: 200,
|
|
|
151 |
multiple: true,
|
|
|
152 |
buttonWidth: '180px',
|
|
|
153 |
numberDisplayed: 1,
|
|
|
154 |
nonSelectedText: 'Users',
|
|
|
155 |
nSelectedText: ' - Users Selected',
|
|
|
156 |
allSelectedText: 'All Users Selected',
|
|
|
157 |
enableFiltering: true,
|
|
|
158 |
enableCaseInsensitiveFiltering: true
|
|
|
159 |
});
|
|
|
160 |
|
|
|
161 |
|
|
|
162 |
});
|
|
|
163 |
|
|
|
164 |
|
| 23506 |
amit.gupta |
165 |
</script>
|