Files
useds/app/common/utils/pdf/template/usedCar.stub
T
2026-01-16 14:29:48 +08:00

157 lines
3.7 KiB
Plaintext

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<style>
body {
font-family: "sun-exta";
font-size: 12px;
color: #333;
}
h1 {
font-size: 18px;
margin-bottom: 10px;
}
h2 {
font-size: 14px;
margin: 20px 0 10px;
border-left: 4px solid #1677ff;
padding-left: 8px;
}
table {
width: 100%;
border-collapse: collapse;
}
.info-table td {
padding: 8px;
border-bottom: 1px solid #eee;
}
.info-table td.label {
width: 120px;
color: #666;
background: #fafafa;
}
.price {
font-size: 16px;
color: #d4380d;
font-weight: bold;
}
.image-list {
margin-top: 10px;
}
.image-item {
width: 48%;
margin-bottom: 10px;
display: inline-block;
}
.image-item img {
width: 100%;
border-radius: 4px;
}
.desc {
line-height: 1.8;
}
</style>
</head>
<body>
<h1><?= htmlspecialchars($car['product_name']) ?></h1>
<table class="info-table">
<tr>
<td class="label"><?= $field['price'] ?></td>
<td class="price"><?= $field['currency'].' ' ?><?= number_format($car['price'], 2) ?></td>
</tr>
<tr>
<td class="label"><?= $field['trade'] ?></td>
<td><?= $car['trade'] ?></td>
</tr>
<tr>
<td class="label"><?= $field['plate_time'] ?></td>
<td><?= $car['plate_time'] ?></td>
</tr>
<tr>
<td class="label"><?= $field['displacement'] ?></td>
<td><?= $car['displacement'] ?></td>
</tr>
<tr>
<td class="label"><?= $field['mileage'] ?></td>
<td><?= $car['mileage'].'km' ?></td>
</tr>
<tr>
<td class="label"><?= $field['power'] ?></td>
<td><?= $car['power'] ?> </td>
</tr>
<tr>
<td class="label"><?= $field['body_color'] ?></td>
<td><?= $car['body_color'] ?: '-' ?></td>
</tr>
<tr>
<td class="label"><?= $field['created_at'] ?></td>
<td><?= $car['created_at'] ?></td>
</tr>
</table>
<?php if (!empty($car['condition_desc'])): ?>
<h2><?= $field['condition_desc'] ?></h2>
<div class="desc">
<?= nl2br(htmlspecialchars($car['condition_desc'])) ?>
</div>
<?php endif; ?>
<div class="image-list">
<table width="100%" cellpadding="6" cellspacing="0">
<thead>
<tr>
<th colspan="2" style="
font-size:28px;
font-weight:bold;
text-align:left;
padding:12px 0;
border-left:4px solid #1677ff;
padding-left:10px;
background:#fff;
">
<div style="
font-size:28px;
font-weight:bold;
padding:10px 0;
">
<?= $field['images'] ?>
</div>
</th >
</tr>
</thead>
<tbody>
<?php foreach ($car['images'] as $i => $img): ?>
<?php if ($i % 2 === 0): ?>
<tr>
<?php endif; ?>
<td width="50%" align="center">
<img src="<?= $img ?>" style="width:100%; border-radius:4px;">
</td>
<?php if ($i % 2 === 1): ?>
</tr>
<?php endif; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</body>
</html>