Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
814 lines (765 loc) · 39.9 KB
/
Copy pathindex.html
File metadata and controls
814 lines (765 loc) · 39.9 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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>EEMC | Receiving & Analytics Dashboard</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="color-scheme" content="light dark" />
<!-- Fonts -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource/source-sans-3@5.3.0/index.css" crossorigin="anonymous" />
<!-- OverlayScrollbars -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/overlayscrollbars@2.16.0/styles/overlayscrollbars.min.css" crossorigin="anonymous" />
<!-- Bootstrap Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css" crossorigin="anonymous" />
<!-- AdminLTE CSS -->
<link rel="stylesheet" href="dist/css/adminlte.css" />
<!-- QRCode JS Library for real-time QR code generation -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
<!-- Custom Active Sidebar Link Highlight Style -->
<style>
.app-sidebar .nav-link.active {
background: linear-gradient(90deg, #0d6efd 0%, #0a58ca 100%) !important;
color: #ffffff !important;
font-weight: 600;
border-left: 4px solid #0dcaf0;
box-shadow: 0 4px 10px rgba(13, 110, 253, 0.3);
border-radius: 6px;
}
.app-sidebar .nav-link.active .nav-icon {
color: #ffffff !important;
}
.app-sidebar .nav-link:hover:not(.active) {
background-color: rgba(255, 255, 255, 0.08);
border-radius: 6px;
transition: all 0.2s ease;
}
</style>
</head>
<body class="layout-fixed sidebar-expand-lg bg-body-tertiary">
<div class="app-wrapper">
<nav class="app-header navbar navbar-expand bg-body">
<div class="container-fluid">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" data-lte-toggle="sidebar" href="#" role="button"><i class="bi bi-list"></i></a>
</li>
<li class="nav-item d-none d-md-block">
<a href="#" class="nav-link fw-semibold text-dark"><i class="bi bi-geo-alt-fill text-danger me-1"></i> EEMC Warehouse & Logistics • Receiving Operations</a>
</li>
</ul>
<ul class="navbar-nav ms-auto">
<li class="nav-item d-flex align-items-center me-3">
<span class="badge bg-success px-2 py-1 text-uppercase text-xs">Live Terminal</span>
</li>
<li class="nav-item">
<a class="nav-link" href="#" data-lte-toggle="fullscreen"><i class="bi bi-arrows-fullscreen"></i></a>
</li>
</ul>
</div>
</nav>
<!-- Sidebar -->
<aside class="app-sidebar bg-body-secondary shadow" data-bs-theme="dark">
<!-- Brand Logo -->
<div class="sidebar-brand">
<a href="index.html" class="brand-link py-3">
<i class="bi bi-gear-wide-connected text-info fs-4 me-2"></i>
<span class="brand-text fw-bold">EEMC RECEIVING</span>
</a>
</div>
<!-- Sidebar Wrapper -->
<div class="sidebar-wrapper">
<nav class="mt-2">
<ul class="nav sidebar-menu flex-column" data-lte-toggle="treeview" role="menu" accordion="false">
<!-- Main Dashboard -->
<li class="nav-header text-uppercase text-xs fw-bold text-muted">Main Menu</li>
<li class="nav-item">
<a href="index.html" class="nav-link active">
<i class="nav-icon bi bi-speedometer2"></i>
<p>Dashboard</p>
</a>
</li>
<!-- Receiving Operations -->
<li class="nav-header text-uppercase text-xs fw-bold text-muted mt-2">Receiving Operations</li>
<li class="nav-item">
<a href="new_ro.html" class="nav-link">
<i class="nav-icon bi bi-file-earmark-plus text-primary"></i>
<p>New RO Entry</p>
</a>
</li>
<li class="nav-item">
<a href="new_po.html" class="nav-link">
<i class="nav-icon bi bi-file-earmark-text text-success"></i>
<p>New PO Entry</p>
</a>
</li>
<!-- Backlog & Management -->
<li class="nav-header text-uppercase text-xs fw-bold text-muted mt-2">Tracking & Management</li>
<li class="nav-item">
<a href="ro-backlog.html" class="nav-link">
<i class="nav-icon bi bi-table text-warning"></i>
<p>RO Management</p>
</a>
</li>
<li class="nav-item">
<a href="po-backlog.html" class="nav-link">
<i class="nav-icon bi bi-table text-info"></i>
<p>PO Management</p>
</a>
</li>
<!-- Administration & Access Control -->
<li class="nav-header text-uppercase text-xs fw-bold text-muted mt-2">Administration</li>
<li class="nav-item">
<a href="users.html" class="nav-link">
<i class="nav-icon bi bi-people-fill"></i>
<p>User Accounts</p>
</a>
</li>
<!-- Utilities & Tools -->
<li class="nav-header text-uppercase text-xs fw-bold text-muted mt-2">System Tools</li>
<li class="nav-item">
<a href="scanner.html" class="nav-link">
<i class="nav-icon bi bi-upc-scan"></i>
<p>QR / Barcode Scanner</p>
</a>
</li>
<li class="nav-item">
<a href="login.html" class="nav-link">
<i class="nav-icon bi bi-box-arrow-right text-danger"></i>
<p>System Logout</p>
</a>
</li>
</ul>
</nav>
</div>
</aside>
<!-- Main Content -->
<main class="app-main">
<div class="app-content-header">
<div class="container-fluid">
<div class="row align-items-center">
<div class="col-sm-6">
<h1 class="mb-0 fs-3 fw-bold">Receiving & Analytics Dashboard</h1>
<p class="text-muted text-sm mb-0">EEMC Warehouse & Logistics • Live Logistics & Backlog Insights</p>
</div>
<div class="col-sm-6">
<nav aria-label="breadcrumb">
<ol class="breadcrumb float-sm-end mb-0">
<li class="breadcrumb-item"><a href="index.html">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Dashboard</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<div class="app-content">
<div class="container-fluid">
<!-- Small Metric Boxes Row -->
<div class="row">
<div class="col-xl-3 col-md-6 col-12 mb-3">
<div class="small-box text-bg-primary shadow-sm border-0 h-100">
<div class="inner">
<h3>150</h3>
<p>Total Repair Orders (RO)</p>
</div>
<div class="small-box-icon">
<i class="bi bi-file-earmark-text"></i>
</div>
<a href="ro-backlog.html" class="small-box-footer link-light link-underline-opacity-0 link-underline-opacity-50-hover">
Manage RO <i class="bi bi-arrow-right-circle"></i>
</a>
</div>
</div>
<div class="col-xl-3 col-md-6 col-12 mb-3">
<div class="small-box text-bg-success shadow-sm border-0 h-100">
<div class="inner">
<h3>94</h3>
<p>Total Purchase Orders (PO)</p>
</div>
<div class="small-box-icon">
<i class="bi bi-bag-check"></i>
</div>
<a href="po-backlog.html" class="small-box-footer link-light link-underline-opacity-0 link-underline-opacity-50-hover">
Manage PO <i class="bi bi-arrow-right-circle"></i>
</a>
</div>
</div>
<div class="col-xl-3 col-md-6 col-12 mb-3">
<div class="small-box text-bg-warning shadow-sm border-0 h-100">
<div class="inner">
<h3>12</h3>
<p>Urgent Priorities</p>
</div>
<div class="small-box-icon">
<i class="bi bi-exclamation-triangle-fill"></i>
</div>
<a href="ro-backlog.html" class="small-box-footer link-dark link-underline-opacity-0 link-underline-opacity-50-hover">
View Urgent <i class="bi bi-arrow-right-circle"></i>
</a>
</div>
</div>
<div class="col-xl-3 col-md-6 col-12 mb-3">
<div class="small-box text-bg-danger shadow-sm border-0 h-100">
<div class="inner">
<h3>5</h3>
<p>MRB / Inspection</p>
</div>
<div class="small-box-icon">
<i class="bi bi-shield-exclamation"></i>
</div>
<a href="ro-backlog.html" class="small-box-footer link-light link-underline-opacity-0 link-underline-opacity-50-hover">
View MRB <i class="bi bi-arrow-right-circle"></i>
</a>
</div>
</div>
</div>
<!-- End Small Metric Boxes -->
<!-- Analytics Charts Section -->
<div class="row">
<!-- Line Chart: Receiving Trend -->
<div class="col-lg-8 col-12 mb-4">
<div class="card border-0 shadow-sm h-100">
<div class="card-header bg-white py-3 d-flex justify-content-between align-items-center">
<h3 class="card-title fw-bold text-dark m-0">
<i class="bi bi-graph-up-arrow me-2 text-primary"></i> Receiving Trend (RO vs PO)
</h3>
<span class="badge bg-light text-muted border">2026 Monthly Analytics</span>
</div>
<div class="card-body">
<div style="position: relative; height: 280px; width: 100%;">
<canvas id="receivingTrendChart"></canvas>
</div>
</div>
</div>
</div>
<!-- Doughnut Chart: Status Breakdown -->
<div class="col-lg-4 col-12 mb-4">
<div class="card border-0 shadow-sm h-100">
<div class="card-header bg-white py-3">
<h3 class="card-title fw-bold text-dark m-0">
<i class="bi bi-pie-chart-fill me-2 text-success"></i> Status Breakdown
</h3>
</div>
<div class="card-body d-flex flex-column justify-content-center align-items-center">
<div style="height: 250px; width: 100%; position: relative;">
<canvas id="statusBreakdownChart"></canvas>
</div>
</div>
</div>
</div>
</div>
<!-- End Analytics Charts Section -->
<!-- Second Analytics Row (Priority Distribution Chart + Recent Table) -->
<div class="row">
<!-- Left Side: Recent Tracking Table -->
<div class="col-lg-8 col-12 mb-4">
<div class="card card-primary card-outline border-0 shadow-sm h-100">
<div class="card-header bg-white py-3 d-flex flex-wrap justify-content-between align-items-center gap-2">
<h3 class="card-title fw-bold text-dark m-0">
<i class="bi bi-list-task me-1 text-primary"></i> Recent Receiving & Backlogs
</h3>
</div>
<div class="card-body table-responsive p-0">
<table class="table table-hover table-striped align-middle mb-0 text-nowrap">
<thead class="table-light text-uppercase text-xs">
<tr>
<th>Type</th>
<th>Order No</th>
<th>Part No & Description</th>
<th>Priority</th>
<th>Status</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="badge bg-primary">RO</span></td>
<td><span class="fw-bold text-primary" id="tOrd1">RO-9241</span></td>
<td>305W100-01 <br><small class="text-muted" id="tDesc1">MANIFOLD-AIR</small></td>
<td><span class="badge bg-danger" id="tPri1">Urgent</span></td>
<td><span class="badge bg-warning text-dark" id="tStat1">Planned</span></td>
<td class="text-center">
<button class="btn btn-sm btn-light text-primary shadow-sm"
data-bs-toggle="modal"
data-bs-target="#viewOrderModal"
onclick="loadViewModal('RO-9241', 'ESN-77421', '88392', 'GE-02-04', 'Urgent', 'Planned')"
title="View Details">
<i class="bi bi-eye-fill"></i>
</button>
</td>
</tr>
<tr>
<td><span class="badge bg-success">PO</span></td>
<td><span class="fw-bold text-success" id="tOrd2">PO-4022</span></td>
<td>542C300-02 <br><small class="text-muted" id="tDesc2">TURBINE BLADE</small></td>
<td><span class="badge bg-primary" id="tPri2">Standard</span></td>
<td><span class="badge bg-success" id="tStat2">Released</span></td>
<td class="text-center">
<button class="btn btn-sm btn-light text-primary shadow-sm"
data-bs-toggle="modal"
data-bs-target="#viewOrderModal"
onclick="loadViewModal('PO-4022', 'N/A (General Stock)', '44910', 'Store 1001', 'Standard', 'Released')"
title="View Details">
<i class="bi bi-eye-fill"></i>
</button>
</td>
</tr>
<tr>
<td><span class="badge bg-primary">RO</span></td>
<td><span class="fw-bold text-primary" id="tOrd3">RO-9243</span></td>
<td>781V900-05 <br><small class="text-muted" id="tDesc3">FUEL NOZZLE</small></td>
<td><span class="badge bg-danger" id="tPri3">Urgent</span></td>
<td><span class="badge bg-secondary" id="tStat3">MRB</span></td>
<td class="text-center">
<button class="btn btn-sm btn-light text-primary shadow-sm"
data-bs-toggle="modal"
data-bs-target="#viewOrderModal"
onclick="loadViewModal('RO-9243', 'ESN-88102', '99120', 'MRB Bay 03', 'Urgent', 'MRB')"
title="View Details">
<i class="bi bi-eye-fill"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- Right Side: Priority Distribution Bar Chart -->
<div class="col-lg-4 col-12 mb-4">
<div class="card border-0 shadow-sm h-100">
<div class="card-header bg-white py-3">
<h3 class="card-title fw-bold text-dark m-0">
<i class="bi bi-bar-chart-fill me-2 text-warning"></i> Priority Distribution
</h3>
</div>
<div class="card-body d-flex flex-column justify-content-center align-items-center">
<div style="height: 250px; width: 100%; position: relative;">
<canvas id="priorityBarChart"></canvas>
</div>
</div>
</div>
</div>
</div>
<!-- End Second Analytics Row -->
<!-- Third Row: Quick Scanner & Shortcuts -->
<div class="row">
<div class="col-lg-6 col-12 mb-4">
<div class="card text-white bg-dark bg-gradient border-0 h-100 shadow-sm">
<div class="card-header bg-transparent border-0 pt-3">
<h3 class="card-title fw-bold"><i class="bi bi-upc-scan me-2 text-warning"></i> Quick Scanner</h3>
</div>
<div class="card-body text-center py-4">
<p class="text-light text-sm mb-3">Scan QR/Barcode using USB scanner gun or enter number manually.</p>
<div class="input-group mb-3">
<input type="text" class="form-control form-control-sm" placeholder="Scan Barcode...">
<a href="scanner.html" class="btn btn-warning btn-sm fw-bold text-dark px-3 text-decoration-none d-flex align-items-center">Search</a>
</div>
</div>
<div class="card-footer border-0 bg-transparent text-center pb-3">
<small class="text-white-50 text-xs">EEMC Warehouse & Logistics Module v1.0</small>
</div>
</div>
</div>
<!-- Quick Navigation Shortcuts -->
<div class="col-lg-6 col-12 mb-4">
<div class="card border-0 shadow-sm h-100">
<div class="card-header bg-white py-3">
<h6 class="fw-bold text-dark m-0"><i class="bi bi-lightning-charge-fill text-warning me-1"></i> Quick Operations</h6>
</div>
<div class="card-body p-3">
<div class="d-grid gap-2">
<a href="new_ro.html" class="btn btn-outline-primary btn-sm text-start fw-semibold d-flex justify-content-between align-items-center">
<span><i class="bi bi-file-earmark-plus me-2"></i> New Repair Order Entry</span>
<i class="bi bi-chevron-right text-xs"></i>
</a>
<a href="new_po.html" class="btn btn-outline-success btn-sm text-start fw-semibold d-flex justify-content-between align-items-center">
<span><i class="bi bi-file-earmark-text me-2"></i> New Purchase Order Entry</span>
<i class="bi bi-chevron-right text-xs"></i>
</a>
<a href="scanner.html" class="btn btn-outline-dark btn-sm text-start fw-semibold d-flex justify-content-between align-items-center">
<span><i class="bi bi-upc-scan me-2"></i> Open Scanner Terminal</span>
<i class="bi bi-chevron-right text-xs"></i>
</a>
</div>
</div>
</div>
</div>
</div>
<!-- End Third Row -->
</div>
</div>
</main>
<!-- View Order Modal (Professional Enterprise Layout with Live QR) -->
<div class="modal fade" id="viewOrderModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered">
<div class="modal-content border-0 shadow-lg">
<div class="modal-header bg-info text-white">
<h5 class="modal-title fw-bold"><i class="bi bi-file-earmark-text me-2"></i> Material Receiving Record — <span id="vOrderNo">PO-55102</span></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body p-4" id="printableArea">
<div class="row g-3 bg-light p-3 rounded mb-4 border">
<div class="col-sm-3 col-6">
<span class="text-xs text-muted text-uppercase fw-bold d-block">Order Number</span>
<span class="fs-6 fw-bold text-info" id="vDisplayOrderNo">PO-55102</span>
</div>
<div class="col-sm-3 col-6">
<span class="text-xs text-muted text-uppercase fw-bold d-block">ESN Number</span>
<span class="fs-6 fw-bold text-danger" id="vEsnNo">ESN-55102</span>
</div>
<div class="col-sm-3 col-6">
<span class="text-xs text-muted text-uppercase fw-bold d-block">Delivery ID</span>
<span class="fs-6 fw-bold text-dark" id="vDeliveryId">44120</span>
</div>
<div class="col-sm-3 col-6">
<span class="text-xs text-muted text-uppercase fw-bold d-block">Current Location</span>
<span class="fs-6 fw-bold text-dark" id="vLocation">GE-01-02</span>
</div>
</div>
<div class="d-flex align-items-center justify-content-between mb-3 px-1">
<h6 class="fw-bold text-secondary mb-0"><i class="bi bi-boxes me-1"></i> Part Line Items</h6>
<div>
<span class="badge bg-primary me-1" id="vPriorityBadge">Normal</span>
<span class="badge bg-warning text-dark" id="vStatusBadge">Planned</span>
</div>
</div>
<div class="table-responsive mb-4">
<table class="table table-bordered align-middle mb-0" id="vTableBody">
<thead class="table-secondary text-uppercase text-xs">
<tr>
<th>Part Number</th>
<th>Description</th>
<th class="text-center">Qty</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td class="fw-bold text-info" id="vPartNo">305W100-01</td>
<td id="vPartDesc">MANIFOLD-AIR</td>
<td class="text-center fw-bold" id="vPartQty">4</td>
<td><span class="badge bg-warning text-dark" id="vPartStatus">Planned</span></td>
</tr>
</tbody>
</table>
</div>
<div class="p-3 bg-body-secondary rounded border-start border-3 border-info d-flex flex-wrap justify-content-between align-items-center gap-2">
<div>
<span class="text-xs fw-bold text-muted d-block mb-1"><i class="bi bi-paperclip me-1"></i> Attached Documents:</span>
<a href="#" class="btn btn-xs btn-outline-info py-1"><i class="bi bi-file-earmark-pdf me-1"></i> Waybill_Record.pdf</a>
</div>
<div class="text-end bg-white p-2 rounded shadow-sm d-inline-block">
<div id="modalQRCode"></div>
<small class="text-muted text-xs d-block mt-1">Scan to Verify</small>
</div>
</div>
</div>
<div class="modal-footer bg-light d-flex flex-wrap justify-content-between align-items-center gap-2 p-3">
<button type="button" class="btn btn-outline-dark btn-sm fw-semibold shadow-sm" onclick="printQrLabel()">
<i class="bi bi-qr-code-scan"></i><span> Print QR Label</span>
</button>
<div class="d-flex align-items-center gap-2">
<button type="button" class="btn btn-secondary btn-sm px-3" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-success btn-sm fw-bold shadow-sm px-3" onclick="printFullRecord()">
<i class="bi bi-printer-fill"></i><span> Print Full Record</span>
</button>
</div>
</div>
</div>
</div>
</div>
<footer class="app-footer">
<div class="float-end d-none d-sm-inline">EEMC Warehouse & Logistics</div>
<strong>Copyright © 2026 <a href="#" class="text-decoration-none">EEMC Operations</a>.</strong> All rights reserved.
</footer>
</div>
<!-- Scripts -->
<script src="https://cdn.jsdelivr.net/npm/overlayscrollbars@2.16.0/browser/overlayscrollbars.browser.es6.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.min.js" crossorigin="anonymous"></script>
<!-- Chart.js CDN for Analytics Graphs -->
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="dist/js/adminlte.js"></script>
<!-- Chart & Modal Dynamic Data Script -->
<script>
// Load Data into View Modal and Generate QR Code
function loadViewModal(orderNo, esn, deliveryId, location, priority, status) {
document.getElementById('vOrderNo').innerText = orderNo;
document.getElementById('vDisplayOrderNo').innerText = orderNo;
document.getElementById('vEsnNo').innerText = esn;
document.getElementById('vDeliveryId').innerText = deliveryId;
document.getElementById('vLocation').innerText = location;
// Priority Badge styling
let pBadge = document.getElementById('vPriorityBadge');
pBadge.innerText = priority;
pBadge.className = 'badge me-1 ' + (priority === 'Urgent' ? 'bg-danger' : 'bg-primary');
// Status Badge styling
let sBadge = document.getElementById('vStatusBadge');
sBadge.innerText = status;
if(status === 'Planned') sBadge.className = 'badge bg-warning text-dark';
else if(status === 'Released') sBadge.className = 'badge bg-success';
else if(status === 'MRB') sBadge.className = 'badge bg-secondary';
else sBadge.className = 'badge bg-info text-dark';
// Generate Live QR Code in Modal
let qrContainer = document.getElementById('modalQRCode');
if(qrContainer) {
qrContainer.innerHTML = '';
new QRCode(qrContainer, {
text: "EEMC-LOGISTICS-" + orderNo + "-" + esn,
width: 75,
height: 75,
colorDark: "#000000",
colorLight: "#ffffff",
correctLevel: QRCode.CorrectLevel.H
});
}
}
// Print Full Record Function (Professional A4 Enterprise Document Popup)
function printFullRecord() {
let orderNo = document.getElementById('vDisplayOrderNo') ? document.getElementById('vDisplayOrderNo').innerText : 'RO-9241';
let esn = document.getElementById('vEsnNo') ? document.getElementById('vEsnNo').innerText : 'ESN-77421';
let deliveryId = document.getElementById('vDeliveryId') ? document.getElementById('vDeliveryId').innerText : '88392';
let location = document.getElementById('vLocation') ? document.getElementById('vLocation').innerText : 'GE-02-04';
let status = document.getElementById('vStatusBadge') ? document.getElementById('vStatusBadge').innerText : 'Planned';
let priority = document.getElementById('vPriorityBadge') ? document.getElementById('vPriorityBadge').innerText : 'Urgent';
let modalTableRows = document.querySelector('#viewOrderModal tbody') ? document.querySelector('#viewOrderModal tbody').innerHTML : '';
let printWindow = window.open('', '_blank', 'width=900,height=700');
let htmlContent = `
<!doctype html>
<html lang="en">
<head>
<title>Receiving Record - ${orderNo}</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.css">
<style>
@page { size: A4; margin: 12mm; }
body { background-color: #fff; font-family: Arial, sans-serif; padding: 15px; color: #000; }
.material-note-container { background-color: #fff; border: 2px solid #000; padding: 30px; position: relative; overflow: hidden; width: 100%; max-width: 190mm; margin: 0 auto; box-sizing: border-box; }
.note-watermark { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-45deg); font-size: 65px; color: rgba(0, 0, 0, 0.035); font-weight: bold; text-transform: uppercase; letter-spacing: 6px; z-index: 0; pointer-events: none; white-space: nowrap; }
.dn-label { font-size: 0.75rem; text-transform: uppercase; font-weight: bold; color: #444; display: block; }
.dn-value { font-size: 1.1rem; font-weight: 600; color: #212529; }
.dn-esn-value { font-size: 1.2rem; font-weight: 700; color: #dc3545; }
@media print {
.no-print { display: none !important; }
body { padding: 0; }
.material-note-container { border: 2px solid #000; padding: 20px; box-shadow: none; }
}
</style>
</head>
<body>
<div class="container-fluid p-0">
<div class="material-note-container">
<div class="note-watermark">EEMC OFFICIAL RECORD</div>
<div class="row align-items-center mb-4 pb-3 border-bottom border-dark">
<div class="col-7">
<h2 class="fw-bold text-dark m-0">EEMC <span class="fw-light text-muted">Warehouse & Logistics</span></h2>
<p class="text-muted text-sm m-0">Engine Maintenance Centre , Al Maktoum Int'l Airport</p>
</div>
<div class="col-5 text-end">
<h5 class="text-uppercase text-secondary fw-bold m-0" style="letter-spacing: 1px;">RECEIVING OPERATIONS RECORD</h5>
<div class="mt-2">
<span class="badge bg-primary me-1">${priority}</span>
<span class="badge bg-warning text-dark">${status}</span>
</div>
</div>
</div>
<div class="row mb-4 bg-light p-3 rounded border border-dark">
<div class="col-3">
<span class="dn-label">Order Number</span>
<span class="dn-value text-info fw-bold">${orderNo}</span>
</div>
<div class="col-3">
<span class="dn-label">ESN Number</span>
<span class="dn-esn-value">${esn}</span>
</div>
<div class="col-3">
<span class="dn-label">Delivery ID</span>
<span class="dn-value">${deliveryId}</span>
</div>
<div class="col-3">
<span class="dn-label">Current Location</span>
<span class="dn-value text-dark fw-bold">${location}</span>
</div>
</div>
<h6 class="fw-bold text-dark mb-2 text-uppercase">Included Part Line Items</h6>
<table class="table table-bordered border-dark align-middle mb-4">
<thead class="table-dark text-uppercase text-xs">
<tr>
<th>Part Number</th>
<th>Description</th>
<th class="text-center">Qty</th>
<th>Status</th>
</tr>
</thead>
<tbody>
${modalTableRows}
</tbody>
</table>
<div class="row mt-5 pt-3 border-top border-dark align-items-center">
<div class="col-9">
<p class="text-muted text-xs mb-0">
<strong>Official System Generated Record</strong> — EEMC Warehouse & Logistics Management System. Verified & Logged in Live Terminal Database.
</p>
</div>
<div class="col-3 text-end">
<div id="printPageQR" class="d-inline-block p-1 bg-white border border-dark rounded"></div>
</div>
</div>
</div>
<div class="text-center mt-4 no-print">
<button onclick="window.print()" class="btn btn-primary btn-sm px-4"><i class="bi bi-printer me-1"></i> Print Now</button>
<button onclick="window.close()" class="btn btn-secondary btn-sm px-4 ms-2">Close</button>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"><\/script>
<script>
new QRCode(document.getElementById("printPageQR"), {
text: "EEMC-OFFICIAL-${orderNo}-${esn}",
width: 75,
height: 75,
correctLevel: QRCode.CorrectLevel.H
});
<\/script>
</body>
</html>
`;
printWindow.document.open();
printWindow.document.write(htmlContent);
printWindow.document.close();
setTimeout(function() {
printWindow.focus();
printWindow.print();
}, 500);
}
// Print Compact Landscape Thermal QR Label Function
function printQrLabel() {
let orderNo = document.getElementById('vDisplayOrderNo').innerText;
let esn = document.getElementById('vEsnNo').innerText;
let deliveryId = document.getElementById('vDeliveryId') ? document.getElementById('vDeliveryId').innerText : '44120';
let printWindow = window.open('', '', 'height=300,width=500');
printWindow.document.write('<html><head><title>EEMC Label - ' + orderNo + '</title>');
printWindow.document.write('<style>');
printWindow.document.write('@page { size: 100mm 50mm; margin: 0; }');
printWindow.document.write('body { font-family: Arial, sans-serif; margin: 0; padding: 6px; background: #fff; }');
printWindow.document.write('.label-box { width: 100%; height: 100%; border: 1.5px solid #000; padding: 6px 10px; display: flex; justify-content: space-between; align-items: center; box-sizing: border-box; }');
printWindow.document.write('.label-data { flex-grow: 1; text-align: left; }');
printWindow.document.write('.label-data h4 { margin: 0 0 4px 0; font-size: 13px; font-weight: bold; color: #000; text-transform: uppercase; border-bottom: 1px solid #000; padding-bottom: 2px; }');
printWindow.document.write('.label-data p { margin: 3px 0; font-size: 11px; color: #000; font-weight: 600; }');
printWindow.document.write('.label-barcode { text-align: center; padding-left: 8px; }');
printWindow.document.write('</style>');
printWindow.document.write('</head><body>');
printWindow.document.write('<div class="label-box">');
printWindow.document.write('<div class="label-data">');
printWindow.document.write('<h4>EEMC WAREHOUSE</h4>');
printWindow.document.write('<p>ORDER: ' + orderNo + '</p>');
printWindow.document.write('<p>ESN: ' + esn + '</p>');
printWindow.document.write('<p>Delivery ID: ' + deliveryId + '</p>');
printWindow.document.write('</div>');
printWindow.document.write('<div class="label-barcode">');
printWindow.document.write('<div id="exactQR"></div>');
printWindow.document.write('<span style="font-size:8px; font-weight:bold; display:block; margin-top:2px;">VERIFY</span>');
printWindow.document.write('</div>');
printWindow.document.write('</div>');
printWindow.document.write('<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"><\/script>');
printWindow.document.write('<script>');
printWindow.document.write('window.onload = function() {');
printWindow.document.write(' new QRCode(document.getElementById("exactQR"), { text: "EEMC-LABEL-' + orderNo + '-' + deliveryId + '", width: 75, height: 75 });');
printWindow.document.write(' setTimeout(function() { window.print(); window.close(); }, 500);');
printWindow.document.write('};');
printWindow.document.write('<\/script>');
printWindow.document.write('</body></html>');
printWindow.document.close();
printWindow.focus();
}
// 1. Receiving Trend Line Chart
const trendCtx = document.getElementById('receivingTrendChart').getContext('2d');
new Chart(trendCtx, {
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
datasets: [
{
label: 'Repair Orders (RO)',
data: [35, 65, 45, 85, 95, 120],
borderColor: '#0d6efd',
backgroundColor: 'rgba(13, 110, 253, 0.12)',
borderWidth: 3,
fill: true,
tension: 0.35
},
{
label: 'Purchase Orders (PO)',
data: [15, 30, 25, 45, 55, 75],
borderColor: '#198754',
backgroundColor: 'rgba(25, 135, 84, 0.12)',
borderWidth: 3,
fill: true,
tension: 0.35
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: { position: 'bottom' }
},
scales: {
y: { beginAtZero: true, grid: { color: 'rgba(0,0,0,0.05)' } },
x: { grid: { display: false } }
}
}
});
// 2. Status Breakdown Doughnut Chart
const statusCtx = document.getElementById('statusBreakdownChart').getContext('2d');
new Chart(statusCtx, {
type: 'doughnut',
data: {
labels: ['Planned', 'Under Inspection', 'MRB', 'Released'],
datasets: [{
data: [45, 25, 10, 50],
backgroundColor: ['#ffc107', '#0dcaf0', '#6c757d', '#198754'],
borderWidth: 2
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'bottom',
labels: { boxWidth: 12, font: { size: 11 } }
}
}
}
});
// 3. Priority Distribution Bar Chart
const priorityCtx = document.getElementById('priorityBarChart').getContext('2d');
new Chart(priorityCtx, {
type: 'bar',
data: {
labels: ['Urgent', 'Standard'],
datasets: [{
label: 'Shipments Count',
data: [12, 76],
backgroundColor: ['#dc3545', '#0d6efd'],
borderWidth: 1,
borderRadius: 4
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: { display: false }
},
scales: {
y: { beginAtZero: true, grid: { color: 'rgba(0,0,0,0.05)' } },
x: { grid: { display: false } }
}
}
});
</script>
</body>
</html>