398 lines
12 KiB
PHP
398 lines
12 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Print Postcheck - {{ $postcheck->spk_number ?? '-' }}</title>
|
|
<style>
|
|
@media print {
|
|
@page {
|
|
margin: 0.5in;
|
|
size: A4;
|
|
}
|
|
|
|
body {
|
|
-webkit-print-color-adjust: exact;
|
|
color-adjust: exact;
|
|
}
|
|
|
|
.no-print {
|
|
display: none !important;
|
|
}
|
|
}
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Arial', sans-serif;
|
|
font-size: 12px;
|
|
line-height: 1.4;
|
|
color: #333;
|
|
background: white;
|
|
}
|
|
|
|
.container {
|
|
width: 100%;
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
}
|
|
|
|
.header {
|
|
border-bottom: 3px solid #2c5282;
|
|
padding-bottom: 20px;
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.company-info {
|
|
text-align: center;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.company-name {
|
|
font-size: 24px;
|
|
font-weight: bold;
|
|
color: #2c5282;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.company-tagline {
|
|
font-size: 14px;
|
|
color: #666;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.document-title {
|
|
text-align: center;
|
|
font-size: 18px;
|
|
font-weight: bold;
|
|
color: #2c5282;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
.info-section {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-bottom: 30px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.info-box {
|
|
flex: 1;
|
|
min-width: 250px;
|
|
margin-right: 20px;
|
|
}
|
|
|
|
.info-box:last-child {
|
|
margin-right: 0;
|
|
}
|
|
|
|
.info-title {
|
|
font-weight: bold;
|
|
color: #2c5282;
|
|
margin-bottom: 10px;
|
|
font-size: 14px;
|
|
border-bottom: 1px solid #e2e8f0;
|
|
padding-bottom: 5px;
|
|
}
|
|
|
|
.info-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 4px 0;
|
|
border-bottom: 1px dotted #e2e8f0;
|
|
}
|
|
|
|
.info-label {
|
|
font-weight: 600;
|
|
color: #4a5568;
|
|
width: 45%;
|
|
}
|
|
|
|
.info-value {
|
|
color: #2d3748;
|
|
width: 50%;
|
|
text-align: right;
|
|
}
|
|
|
|
.section-title {
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
color: #2c5282;
|
|
margin: 20px 0 10px;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.data-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
border: 1px solid #e2e8f0;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.data-table th {
|
|
background-color: #2c5282;
|
|
color: white;
|
|
padding: 12px 8px;
|
|
text-align: left;
|
|
font-weight: bold;
|
|
font-size: 11px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.data-table td {
|
|
padding: 10px 8px;
|
|
border-bottom: 1px solid #e2e8f0;
|
|
vertical-align: top;
|
|
}
|
|
|
|
.grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
gap: 15px;
|
|
}
|
|
|
|
.card {
|
|
background: #ffffff;
|
|
border: 1px solid #e2e8f0;
|
|
border-radius: 6px;
|
|
padding: 12px;
|
|
}
|
|
|
|
.image-box {
|
|
border: 1px solid #e2e8f0;
|
|
border-radius: 6px;
|
|
padding: 10px;
|
|
text-align: center;
|
|
background: #f7fafc;
|
|
}
|
|
|
|
.image-box img {
|
|
max-width: 100%;
|
|
max-height: 240px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.notes-section {
|
|
background-color: #f7fafc;
|
|
border-left: 4px solid #2c5282;
|
|
padding: 15px;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.footer {
|
|
margin-top: 30px;
|
|
padding-top: 20px;
|
|
border-top: 1px solid #e2e8f0;
|
|
}
|
|
|
|
.signatures {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 20px;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.signature-box {
|
|
text-align: center;
|
|
}
|
|
|
|
.signature-line {
|
|
margin-top: 60px;
|
|
border-top: 1px solid #2d3748;
|
|
padding-top: 4px;
|
|
font-size: 12px;
|
|
color: #2d3748;
|
|
}
|
|
|
|
.print-button {
|
|
position: fixed;
|
|
top: 20px;
|
|
right: 20px;
|
|
background-color: #2c5282;
|
|
color: white;
|
|
border: none;
|
|
padding: 12px 24px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
font-weight: bold;
|
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
z-index: 1000;
|
|
}
|
|
|
|
.print-button:hover {
|
|
background-color: #2a4365;
|
|
}
|
|
|
|
.text-right { text-align: right; }
|
|
.text-center { text-align: center; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<button class="print-button no-print" onclick="window.print()">Print</button>
|
|
|
|
<div class="container">
|
|
<div class="header">
|
|
<div class="company-info">
|
|
<div class="company-name">PT. CIPTA KREASI BARU</div>
|
|
<div class="company-tagline">Postcheck Kendaraan</div>
|
|
</div>
|
|
<div class="document-title">Dokumen Postcheck</div>
|
|
</div>
|
|
|
|
<div class="info-section">
|
|
<div class="info-box">
|
|
<div class="info-title">Informasi Transaksi</div>
|
|
<div class="info-item">
|
|
<span class="info-label">No. Polisi</span>
|
|
<span class="info-value">{{ $postcheck->police_number ?? $postcheck->transaction->police_number ?? '-' }}</span>
|
|
</div>
|
|
<div class="info-item">
|
|
<span class="info-label">No. SPK</span>
|
|
<span class="info-value">{{ $postcheck->spk_number ?? $postcheck->transaction->spk ?? '-' }}</span>
|
|
</div>
|
|
<div class="info-item">
|
|
<span class="info-label">Tanggal Postcheck</span>
|
|
<span class="info-value">{{ optional($postcheck->postcheck_at)->format('d F Y H:i') }}</span>
|
|
</div>
|
|
<div class="info-item">
|
|
<span class="info-label">Dibuat oleh</span>
|
|
<span class="info-value">{{ $postcheck->postcheckBy->name ?? '-' }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="info-box">
|
|
<div class="info-title">Parameter Utama</div>
|
|
<div class="info-item">
|
|
<span class="info-label">Kilometer</span>
|
|
<span class="info-value">{{ number_format((float)($postcheck->kilometer ?? 0), 2) }}</span>
|
|
</div>
|
|
<div class="info-item">
|
|
<span class="info-label">Tekanan High</span>
|
|
<span class="info-value">{{ number_format((float)($postcheck->pressure_high ?? 0), 2) }}</span>
|
|
</div>
|
|
<div class="info-item">
|
|
<span class="info-label">Tekanan Low</span>
|
|
<span class="info-value">{{ number_format((float)($postcheck->pressure_low ?? 0), 2) }}</span>
|
|
</div>
|
|
<div class="info-item">
|
|
<span class="info-label">Suhu Kabin</span>
|
|
<span class="info-value">{{ isset($postcheck->cabin_temperature) ? number_format((float)$postcheck->cabin_temperature, 2) : '-' }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section-title">Kondisi Komponen</div>
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 35%;">Komponen</th>
|
|
<th style="width: 25%;">Status Pekerjaan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>AC</td>
|
|
<td>{{ $postcheck->ac_condition ?? '-' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Blower</td>
|
|
<td>{{ $postcheck->blower_condition ?? '-' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Evaporator</td>
|
|
<td>{{ $postcheck->evaporator_condition ?? '-' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Compressor</td>
|
|
<td>{{ $postcheck->compressor_condition ?? '-' }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="section-title">Dokumentasi Foto</div>
|
|
<div class="grid">
|
|
<div class="card">
|
|
<div class="info-title" style="margin-bottom:8px;">Depan</div>
|
|
<div class="image-box">
|
|
@if($postcheck->front_image_url || $postcheck->front_image)
|
|
<img src="{{ $postcheck->front_image_url ?? asset('storage/' . ltrim($postcheck->front_image, '/')) }}" alt="Foto Depan">
|
|
@else
|
|
<div>Tidak ada gambar</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="info-title" style="margin-bottom:8px;">Suhu Kabin</div>
|
|
<div class="image-box">
|
|
@if($postcheck->cabin_temperature_image_url || $postcheck->cabin_temperature_image)
|
|
<img src="{{ $postcheck->cabin_temperature_image_url ?? asset('storage/' . ltrim($postcheck->cabin_temperature_image, '/')) }}" alt="Foto Suhu Kabin">
|
|
@else
|
|
<div>Tidak ada gambar</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="info-title" style="margin-bottom:8px;">AC</div>
|
|
<div class="image-box">
|
|
@if($postcheck->ac_image_url || $postcheck->ac_image)
|
|
<img src="{{ $postcheck->ac_image_url ?? asset('storage/' . ltrim($postcheck->ac_image, '/')) }}" alt="Foto AC">
|
|
@else
|
|
<div>Tidak ada gambar</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="info-title" style="margin-bottom:8px;">Blower</div>
|
|
<div class="image-box">
|
|
@if($postcheck->blower_image_url || $postcheck->blower_image)
|
|
<img src="{{ $postcheck->blower_image_url ?? asset('storage/' . ltrim($postcheck->blower_image, '/')) }}" alt="Foto Blower">
|
|
@else
|
|
<div>Tidak ada gambar</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="info-title" style="margin-bottom:8px;">Evaporator</div>
|
|
<div class="image-box">
|
|
@if($postcheck->evaporator_image_url || $postcheck->evaporator_image)
|
|
<img src="{{ $postcheck->evaporator_image_url ?? asset('storage/' . ltrim($postcheck->evaporator_image, '/')) }}" alt="Foto Evaporator">
|
|
@else
|
|
<div>Tidak ada gambar</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@if($postcheck->postcheck_notes)
|
|
<div class="notes-section">
|
|
<div class="info-title" style="border:0; padding:0; margin:0 0 6px 0;">Catatan</div>
|
|
<div>{{ $postcheck->postcheck_notes }}</div>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="footer">
|
|
<div class="text-center" style="color:#666; font-size: 11px;">
|
|
Dicetak pada: {{ now()->format('d F Y H:i:s') }} | Sistem Postcheck PT. Cipta Kreasi Baru
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
document.addEventListener('keydown', function(e) {
|
|
if (e.ctrlKey && e.key === 'p') {
|
|
e.preventDefault();
|
|
window.print();
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|