-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmanager.html
More file actions
233 lines (228 loc) · 10.2 KB
/
manager.html
File metadata and controls
233 lines (228 loc) · 10.2 KB
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<!-- Optional JavaScript; choose one of the two! -->
<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css">
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script src="https://cdn.datatables.net/1.11.3/js/jquery.dataTables.min.js"></script>
<!-- Option 2: Separate Popper and Bootstrap JS -->
<!--
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js" integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js" integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13" crossorigin="anonymous"></script>
-->
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="home.html">高師宅急便</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<!-- <li class="nav-item">
<a class="nav-link active" aria-current="page" href="home.html">首頁</a>
</li> -->
<li class="nav-item">
<a class="nav-link active" href="manager.html">查看包裹清單</a>
</li>
<form action="logout.php">
<button type="submit" class="btn btn-outline-light">登出</button>
</form>
</ul>
</div>
</div>
</nav>
<nav>
<div class="nav nav-tabs" id="nav-tab" role="tablist">
<button class="nav-link active" id="nav-home-tab" data-bs-toggle="tab" data-bs-target="#nav-home"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">全部資訊</button>
<button class="nav-link" id="nav-profile-tab" data-bs-toggle="tab" data-bs-target="#nav-amount"
type="button" role="tab" aria-controls="nav-profile" aria-selected="false">過去一年客戶運送包裹數量</button>
<button class="nav-link" id="nav-contact-tab" data-bs-toggle="tab" data-bs-target="#nav-cost" type="button"
role="tab" aria-controls="nav-contact" aria-selected="false">過去一年客戶運費金額</button>
<button class="nav-link" id="nav-contact-tab" data-bs-toggle="tab" data-bs-target="#nav-notontime"
type="button" role="tab" aria-controls="nav-contact" aria-selected="false">找出未在承諾時間內送達的包裹</button>
</div>
</nav>
<section style="background-color: #eee;">
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade show active" id="nav-home" role="tabpanel" aria-labelledby="nav-home-tab">
<div class="table-responsive">
<table id="package" class="table table-striped table-bordered my-2" style="width:100%">
<thead class="table-dark">
<tr>
<th>訂單編號</th>
<th>包裹類型</th>
<th>重量(公克)</th>
<th>金額</th>
<th>目的地</th>
<th>抵達地</th>
<th>寄件人</th>
<th>寄件時間</th>
<th>預計抵達時間</th>
<th>收件時間</th>
<th>收件人</th>
<th>收件人電話</th>
<th>運輸方式</th>
<th>包裹狀態</th>
<th>備註</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<div class="tab-pane fade" id="nav-amount" role="tabpanel" aria-labelledby="nav-profile-tab">
<table id="search_many_package" class="table table-striped table-bordered table-responsive my-2"
style="width:100%">
<thead class="table-dark">
<tr>
<th>寄件人</th>
<th>寄件人電話</th>
<th>寄件人電子郵件</th>
<th>寄件數量</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div class="tab-pane fade" id="nav-cost" role="tabpanel" aria-labelledby="nav-contact-tab">
<table id="search_cost_package" class="table table-striped table-bordered table-responsive my-2"
style="width:100%">
<thead class="table-dark">
<tr>
<th>寄件人</th>
<th>寄件人電話</th>
<th>寄件人電子郵件</th>
<th>寄件總花費</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div class="tab-pane fade" id="nav-notontime" role="tabpanel" aria-labelledby="nav-contact-tab">
<table id="search_not_ontime" class="table table-striped table-bordered table-responsive my-2"
style="width:100%">
<thead class="table-dark">
<tr>
<th>訂單編號</th>
<th>訂單類型</th>
<th>寄件人</th>
<th>預計抵達時間</th>
<th>抵達時間</th>
<th>運輸方式</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</section>
</body>
</html>
<script type="text/javascript">
let language = {
"processing": "處理中...",
"loadingRecords": "載入中...",
"lengthMenu": "顯示 _MENU_ 項結果",
"zeroRecords": "沒有符合的結果",
"info": "顯示第 _START_ 至 _END_ 項結果,共 _TOTAL_ 項",
"infoEmpty": "顯示第 0 至 0 項結果,共 0 項",
"infoFiltered": "(從 _MAX_ 項結果中過濾)",
"infoPostFix": "",
"search": "搜尋:",
"paginate": {
"first": "第一頁",
"previous": "上一頁",
"next": "下一頁",
"last": "最後一頁"
},
};
$(document).ready(function () {
$('#package').dataTable({
"processing": true,
"ajax": {
"url": "package.php",
"type": "GET",
"datatype": "json",
},
"language": language,
"columns": [
{ "data": "package_id" },
{ "data": "package_type" },
{ "data": "weight" },
{ "data": "fee" },
{ "data": "start_location" },
{ "data": "destination" },
{ "data": "name" },
{ "data": "start_time" },
{ "data": "schedule_time" },
{ "data": "end_time" },
{ "data": "receiver_name" },
{ "data": "receiver_phone_number" },
{ "data": "type_name" },
{ "data": "statement" },
{ "data": "dcb" },
]
});
$('#search_many_package').dataTable({
"processing": true,
"ajax": {
"url": "search_many_package.php",
"type": "GET",
"datatype": "json",
},
"language": language,
"columns": [
{ "data": "name" },
{ "data": "phone_number" },
{ "data": "email" },
{ "data": "cnt" },
]
});
$('#search_cost_package').dataTable({
"processing": true,
"ajax": {
"url": "cost.php",
"type": "GET",
"datatype": "json",
},
"language": language,
"columns": [
{ "data": "name" },
{ "data": "phone_number" },
{ "data": "email" },
{ "data": "cost" },
]
});
$('#search_not_ontime').dataTable({
"processing": true,
"ajax": {
"url": "notontimepackage.php",
"type": "GET",
"datatype": "json",
},
"language": language,
"columns": [
{ "data": "package_id" },
{ "data": "package_type" },
{ "data": "name" },
{ "data": "schedule_time" },
{ "data": "end_time" },
{ "data": "type_name" },
]
});
})
</script>