初始化

This commit is contained in:
2026-08-08 18:28:49 +08:00
parent 9bef4420e0
commit f082037a6e
854 changed files with 217171 additions and 11 deletions
+128
View File
@@ -0,0 +1,128 @@
<?php
$activeMenu = 'productSearch';
include APP_PATH . 'app/views/layouts/admin_header.php';
?>
<!-- 产品追溯搜索 -->
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title"><i class="fa fa-search"></i> 产品追溯查询</h3>
</div>
<div class="box-body">
<form method="GET" action="<?php echo BASE_URL; ?>/Admin/productSearch" class="form-inline">
<div class="form-group" style="width:70%;">
<div class="input-group" style="width:100%;">
<input type="text" name="keyword" class="form-control input-lg"
placeholder="输入成品序列号 / 电池序列号 / PCB序列号 / 产品型号 进行查询..."
value="<?php echo htmlspecialchars($keyword); ?>" autofocus>
<span class="input-group-btn">
<button type="submit" class="btn btn-primary btn-lg"><i class="fa fa-search"></i> 查询</button>
</span>
</div>
</div>
<small class="help-block" style="margin-left:5px; color:#999;">
<i class="fa fa-info-circle"></i> 支持模糊搜索:成品序列号、电池序列号、PCB序列号、产品型号
</small>
</form>
</div>
</div>
</div>
</div>
<?php if ($searched): ?>
<div class="row">
<div class="col-md-12">
<div class="box box-success">
<div class="box-header with-border">
<h3 class="box-title">
<i class="fa fa-list"></i> 查询结果
<small class="label label-primary">共 <?php echo count($results); ?> 条记录</small>
</h3>
</div>
<div class="box-body table-responsive no-padding">
<?php if (empty($results)): ?>
<div class="callout callout-warning" style="margin:15px;">
<h4><i class="fa fa-warning"></i> 未找到匹配记录</h4>
<p>关键词 "<?php echo htmlspecialchars($keyword); ?>" 未匹配到任何产品记录,请检查输入。</p>
</div>
<?php else: ?>
<table class="table table-bordered table-hover table-striped" style="font-size:13px;">
<thead>
<tr style="background:#3c8dbc; color:#fff;">
<th style="text-align:center;">#</th>
<th style="text-align:center;">成品序列号</th>
<th style="text-align:center;">产品型号</th>
<th style="text-align:center;">电池序列号</th>
<th style="text-align:center;">PCB序列号</th>
<th style="text-align:center;">操作员</th>
<th style="text-align:center;">组装时间</th>
<th style="text-align:center;">电池电压平台</th>
<th style="text-align:center;">PCB测试结果</th>
<th style="text-align:center;">成品测试结果</th>
<th style="text-align:center;">入库时间</th>
<th style="text-align:center;">出货客户</th>
</tr>
</thead>
<tbody>
<?php $i = 1; foreach ($results as $row): ?>
<tr>
<td style="text-align:center;"><?php echo $i++; ?></td>
<td style="text-align:center; font-weight:bold; color:#3c8dbc;">
<?php echo htmlspecialchars($row['finished_serial']); ?>
</td>
<td style="text-align:center;">
<span class="label label-info"><?php echo htmlspecialchars($row['product_model']); ?></span>
</td>
<td style="text-align:center;">
<?php echo htmlspecialchars($row['battery_serial']); ?>
</td>
<td style="text-align:center;">
<?php echo htmlspecialchars($row['pcb_serial']); ?>
</td>
<td style="text-align:center;">
<?php echo htmlspecialchars($row['operator']); ?>
</td>
<td style="text-align:center;">
<?php echo htmlspecialchars($row['assembly_time']); ?>
</td>
<td style="text-align:center;">
<?php echo htmlspecialchars($row['voltage_platform']); ?>
</td>
<td style="text-align:center;">
<?php if (!empty($row['pcb_test_status'])): ?>
<span class="label label-<?php echo stripos($row['pcb_test_status'], 'OK') !== false || stripos($row['pcb_test_status'], '合格') !== false || stripos($row['pcb_test_status'], 'pass') !== false ? 'success' : 'danger'; ?>">
<?php echo htmlspecialchars($row['pcb_test_status']); ?>
</span>
<?php else: ?>
<span class="text-muted">-</span>
<?php endif; ?>
</td>
<td style="text-align:center;">
<?php if (!empty($row['finished_test_result'])): ?>
<span class="label label-<?php echo stripos($row['finished_test_result'], 'OK') !== false || stripos($row['finished_test_result'], '合格') !== false || stripos($row['finished_test_result'], 'pass') !== false ? 'success' : 'danger'; ?>">
<?php echo htmlspecialchars($row['finished_test_result']); ?>
</span>
<?php else: ?>
<span class="text-muted">-</span>
<?php endif; ?>
</td>
<td style="text-align:center;">
<?php echo !empty($row['warehouse_time']) ? htmlspecialchars($row['warehouse_time']) : '<span class="text-muted">未入库</span>'; ?>
</td>
<td style="text-align:center;">
<?php echo !empty($row['delivery_customer']) ? htmlspecialchars($row['delivery_customer']) : '<span class="text-muted">未出货</span>'; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php endif; ?>
<?php include APP_PATH . 'app/views/layouts/admin_footer.php'; ?>