| 33465 |
ranu |
1 |
<section class="wrapper">
|
|
|
2 |
<div class="row">
|
|
|
3 |
<div class="col-lg-12">
|
|
|
4 |
<h3 class="page-header"><i class="icon_document_alt"></i>Bulk Pricing</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>Create Bulk Pricing</li>
|
|
|
8 |
</ol>
|
|
|
9 |
</div>
|
|
|
10 |
</div>
|
|
|
11 |
<form class="form-horizontal">
|
|
|
12 |
<label class="control-label col-sm-2" for="excelfile">xlsx File:</label>
|
|
|
13 |
<div class="col-lg-3">
|
|
|
14 |
<div class="input-group">
|
|
|
15 |
<input class="form-control" type="file" id="pricingUpload" name="uploadfile"
|
|
|
16 |
value="Upload Excel">
|
|
|
17 |
<span class="input-group-btn">
|
|
|
18 |
<button class="btn btn-primary pricingFileUpload" type="button">
|
|
|
19 |
Upload
|
|
|
20 |
</button>
|
|
|
21 |
</span>
|
|
|
22 |
</div>
|
|
|
23 |
</div>
|
|
|
24 |
<div class="col-lg-3">
|
|
|
25 |
<button class="btn btn-primary" id="downloadReferenceFile">Download Reference File</button>
|
|
|
26 |
</div>
|
|
|
27 |
</form>
|
|
|
28 |
|
|
|
29 |
</section>
|
|
|
30 |
<script type="text/javascript">
|
|
|
31 |
$(document).ready(function () {
|
|
|
32 |
$('button.pricingFileUpload').on('click', function () {
|
|
|
33 |
var fileSelector = $('#pricingUpload')[0];
|
|
|
34 |
if (fileSelector != undefined && fileSelector.files[0] != undefined) {
|
|
|
35 |
if (confirm("Confirm Upload?")) {
|
|
|
36 |
doAjaxUploadRequestHandler("${rc.contextPath}/bulkVendorCatalogPricing/upload", "POST", fileSelector.files[0], function (response) {
|
|
|
37 |
if (response) {
|
|
|
38 |
alert("Pricing Create successfully");
|
|
|
39 |
}
|
|
|
40 |
});
|
|
|
41 |
}
|
|
|
42 |
} else {
|
|
|
43 |
alert("Please upload file!");
|
|
|
44 |
}
|
|
|
45 |
return false;
|
|
|
46 |
});
|
|
|
47 |
|
|
|
48 |
$('#downloadReferenceFile').on('click', function () {
|
|
|
49 |
window.location.href = "${rc.contextPath}/bulkVendorCatalogPricing/downloadReferenceFile";
|
|
|
50 |
});
|
|
|
51 |
});
|
|
|
52 |
</script>
|