初始化

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
+65
View File
@@ -0,0 +1,65 @@
<?php
include APP_PATH . 'app/views/layouts/admin_header.php';
?>
<div class="box">
<div class="box-header with-border">
<h3 class="box-title"><i class="fa fa-list"></i> 采购订单列表</h3>
<div class="box-tools">
<a href="<?php echo BASE_URL; ?>/Inventory/purchaseAdd" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> 新建采购单</a>
</div>
</div>
<div class="box-body table-responsive no-padding">
<table class="table table-hover table-striped">
<thead>
<tr>
<th>序号</th>
<th>采购单号</th>
<th>供应商</th>
<th>采购日期</th>
<th>总金额</th>
<th>状态</th>
<th>操作人</th>
<th style="width:180px">操作</th>
</tr>
</thead>
<tbody>
<?php if (!empty($orders)): ?>
<?php foreach ($orders as $o): ?>
<tr>
<td><?php echo $o['id']; ?></td>
<td><code><?php echo htmlspecialchars($o['order_no']); ?></code></td>
<td><?php echo htmlspecialchars($o['supplier_name']); ?></td>
<td><?php echo htmlspecialchars($o['order_date']); ?></td>
<td>&yen;<?php echo number_format($o['total_amount'], 2); ?></td>
<td>
<?php
$statusLabels = ['pending'=>'待确认','confirmed'=>'已确认','received'=>'已收货','cancelled'=>'已取消'];
$statusColors = ['pending'=>'warning','confirmed'=>'info','received'=>'success','cancelled'=>'default'];
$st = $o['status'] ?? 'pending';
?>
<span class="label label-<?php echo $statusColors[$st] ?? 'default'; ?>">
<?php echo $statusLabels[$st] ?? $st; ?>
</span>
</td>
<td><?php echo htmlspecialchars($o['operator']); ?></td>
<td>
<a href="<?php echo BASE_URL; ?>/Inventory/purchaseDetail?id=<?php echo $o['id']; ?>" class="btn btn-xs btn-primary"><i class="fa fa-eye"></i> 详情</a>
<a href="<?php echo BASE_URL; ?>/Inventory/purchaseEdit?id=<?php echo $o['id']; ?>" class="btn btn-xs btn-info"><i class="fa fa-edit"></i> 编辑</a>
<form method="post" action="<?php echo BASE_URL; ?>/Inventory/purchaseDelete" style="display:inline" onsubmit="return confirm('确定删除该采购单吗?');">
<input type="hidden" name="csrf_token" value="<?php echo htmlspecialchars($csrfToken ?? ''); ?>">
<input type="hidden" name="id" value="<?php echo $o['id']; ?>">
<button type="submit" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i> 删除</button>
</form>
</td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr><td colspan="8" class="text-center text-muted">暂无采购订单</td></tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
<?php include APP_PATH . 'app/views/layouts/admin_footer.php'; ?>