-
Notifications
You must be signed in to change notification settings - Fork 0
/
report.html
131 lines (119 loc) · 4.64 KB
/
report.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Content-Type" content="application/xhtml+xml" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<link rel="stylesheet" href="css/jquery.mobile-1.2.0.min.css" />
<link rel="stylesheet" href="css/jqm-datebox.css" />
<script src="js/jquery.min.js"></script>
<script src="js/config.js">
</script>
<script src="js/jquery.mobile-1.2.0.min.js"></script>
<script src="js/jqm-datebox.core.js"></script>
<script src="js/jqm-datebox.mode.datebox.js"></script>
<script type="text/javascript">
$(document).ready(function(){
/*$( document ).bind( "mobileinit", function(){
$.mobile.page.prototype.options.degradeInputs.date = true;
});*/
$( "#report" ).on( "click", function(event, ui) {
$.ajax({
beforeSend: function() { $.mobile.loading('show'); }, //Show spinner
complete: function() { $.mobile.loading('hide'); },
type: "POST",
url: web_service_path+"reportList",
data: { phase: $('#phase').val(), date: $("#date").val()},
success: function (response) {
if(response.length==0)
{
//$("#cost-table").empty();
$("#content-nav").find('h1').remove();
$("#cost-table").find('tbody').empty();
$("#content-nav").append('<center><h1>No data found</h1></center>');
}
else
{
$("#content-nav").find('h1').remove();
$("#cost-table").find('tbody').empty().append(response);
}
}
});
});
});
//attach a jQuery live event to the button
$(function() {
$.ajax({
beforeSend: function() { $.mobile.loading('show'); }, //Show spinner
complete: function() { $.mobile.loading('hide'); },
type: "POST",
url: web_service_path+"project",
}).done(function( msg ) {
$('#phase').empty().append(msg);
});
});
</script>
</head>
<body onLoad="setTimeout(function() { window.scrollTo(0, 1) }, 100);" class="credit">
<div id="header"></div>
<div data-role="page" id="page1">
<div data-role="content">
<center><h1>Reports</h1></center>
<div data-role="fieldcontain">
<label for="phase">
Select Project :
</label>
<select id="phase" name="phase" data-theme="b">
<option value="0">Select project</option>
</select>
</div>
<div data-role="fieldcontain">
<label for="date">Date:</label>
<!--<input type="date" name="date" id="date" value="">-->
<input type="date" data-role="datebox" name="date" id="date" data-theme="b"
data-options='{"mode": "datebox","themeButton":"b","themeInput":"b"}' />
</div>
<div data-role="content">
<a id="report" data-role="button" data-theme="b" href="#page2" data-inline="true">
submit
</a>
<a id="home" data-role="button" data-theme="b" href="index.html" data-inline="true">
Home
</a>
</div>
</div>
</div>
<div data-role="page" id="page2" data-theme="b">
<div id="content">
<div id="content-nav">
<a id="barchartback2" data-role="button" data-theme="b" href="#page1">
back
</a>
<table data-role="table" id="cost-table" data-mode="reflow" class="ui-responsive table-stroke">
<thead>
<tr>
<th data-priority="1">Railway</th>
<th data-priority="1">Project Name</th>
<th data-priority="persist">Sanction Cost</th>
<th data-priority="2">Last Year Expenditure</th>
<th data-priority="3">Current Year Expenditure Till Date</th>
<th data-priority="4">Cum.Expenditure upto Date</th>
<th data-priority="4">Budget</th>
<th data-priority="4">Physical Progress</th>
<th data-priority="4">Financial Progress</th>
<th data-priority="4">Target for Completion</th>
<th data-priority="4">Critical Area</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<a id="barchartback" data-role="button" data-theme="b" href="#page1">
back
</a>
</div>
</div>
</body>
</html>