Files
kaunter/resources/views/print/maklumat_pelanggan.blade.php
T

261 lines
7.1 KiB
PHP

<!DOCTYPE html>
<html lang="ms">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Maklumat Pelanggan {{ $nopelanggan }}</title>
<style>
* { box-sizing: border-box; }
body {
margin: 0;
background: #e8eaed;
font-family: Arial, Helvetica, sans-serif;
color: #111;
}
.toolbar {
position: sticky;
top: 0;
z-index: 10;
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 10px 16px;
background: #1f3a5f;
color: #fff;
font-size: 13px;
}
.toolbar b { letter-spacing: 0.04em; }
.toolbar .hint { opacity: 0.85; }
.toolbar button {
border: 0;
background: #fff;
color: #1f3a5f;
font-weight: bold;
padding: 8px 16px;
cursor: pointer;
border-radius: 3px;
}
.sheet-wrap {
padding: 24px 0 48px;
}
.sheet {
width: 210mm;
min-height: 297mm;
margin: 0 auto;
background: #fff;
padding: 14mm 14mm 16mm;
box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.title {
text-align: center;
margin: 14px 0 4px;
}
.title h1 {
margin: 0;
font-size: 14px;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.title p {
margin: 4px 0 0;
font-size: 10px;
color: #333;
}
.identity {
display: grid;
grid-template-columns: minmax(0, 1fr) 32mm;
gap: 12px;
align-items: start;
margin-top: 12px;
}
.photo-box {
width: 32mm;
text-align: center;
}
.photo-box img {
display: block;
width: 32mm;
height: 42mm;
object-fit: cover;
border: 1px solid #111;
background: #eef1f4;
}
.photo-box .caption {
margin-top: 4px;
font-size: 8.5px;
color: #444;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.section {
margin-top: 12px;
}
.section-title {
font-size: 11px;
font-weight: bold;
background: #eef1f4;
border: 1px solid #111;
border-bottom: 0;
padding: 5px 8px;
text-transform: uppercase;
}
table.fields {
width: 100%;
border-collapse: collapse;
font-size: 11px;
}
table.fields th,
table.fields td {
border: 1px solid #111;
padding: 6px 8px;
vertical-align: top;
text-align: left;
}
table.fields th {
width: 28%;
font-weight: normal;
background: #fafbfc;
color: #222;
}
@page {
size: A4;
margin: 10mm;
}
@media print {
body { background: #fff; }
.toolbar { display: none !important; }
.sheet-wrap { padding: 0; }
.sheet {
width: auto;
min-height: 0;
margin: 0;
padding: 0;
box-shadow: none;
}
}
</style>
</head>
<body>
<div class="toolbar">
<div>
<b>Maklumat Pelanggan</b>
<span class="hint"> {{ $nama }}</span>
</div>
<button type="button" onclick="window.print()">Cetak / Pratinjau</button>
</div>
<div class="sheet-wrap">
<div class="sheet">
<x-print.header
:cawangan="$cawangan"
:kodcaw="$kodcaw"
:alamat1="$alamat1"
:alamat2="$alamat2"
:notel="$notel"
:tarikh="$tarikh"
:norujukan="$nopelanggan"
rujukan-label="No. Pelanggan"
/>
<div class="title">
<h1>Maklumat Pelanggan</h1>
<p>Salinan maklumat pengenalan diri pelanggan untuk rujukan cawangan.</p>
</div>
<div class="identity">
<div>
<div class="section-title">A. Pengenalan Diri</div>
<table class="fields">
<tr>
<th>Nama</th>
<td>{{ $nama }}</td>
</tr>
<tr>
<th>No. Kad Pengenalan</th>
<td>{{ $nokp }}</td>
</tr>
<tr>
<th>No. Pelanggan</th>
<td>{{ $nopelanggan }}</td>
</tr>
<tr>
<th>Status</th>
<td>{{ $status }}</td>
</tr>
</table>
</div>
<div class="photo-box">
<img src="{{ $photo_src }}" alt="Gambar MyKad">
<div class="caption">Gambar MyKad</div>
</div>
</div>
<div class="section">
<div class="section-title">B. Maklumat Hubungan &amp; Alamat</div>
<table class="fields">
<tr>
<th>No. Telefon 1</th>
<td>{{ $telefon }}</td>
<th style="width:22%">No. Telefon 2</th>
<td>{{ $telefon2 }}</td>
</tr>
<tr>
<th>Alamat</th>
<td colspan="3">{{ $alamat }}</td>
</tr>
<tr>
<th>Poskod</th>
<td>{{ $poskod }}</td>
<th>Daerah</th>
<td>{{ $daerah }}</td>
</tr>
<tr>
<th>Negeri</th>
<td colspan="3">{{ $negeri }}</td>
</tr>
</table>
</div>
<div class="section">
<div class="section-title">C. Bank &amp; Pekerjaan</div>
<table class="fields">
<tr>
<th>Bank</th>
<td colspan="3">{{ $bank }}</td>
</tr>
<tr>
<th>No. Akaun</th>
<td colspan="3">{{ $noakaun }}</td>
</tr>
<tr>
<th>Pekerjaan</th>
<td colspan="3">{{ $pekerjaan }}</td>
</tr>
<tr>
<th>Nota</th>
<td colspan="3">{{ $nota }}</td>
</tr>
</table>
</div>
<x-print.footer :show-copies="false">
<b>Nota:</b>
<p>1. Borang ini dicetak dari skrin Maklumat Pelanggan untuk rujukan cawangan.</p>
<p>2. Gambar diambil daripada rekod MyKad pelanggan dalam sistem.</p>
</x-print.footer>
</div>
</div>
</body>
</html>