初始化

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
+59
View File
@@ -0,0 +1,59 @@
<?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/supplierAdd" 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:150px">操作</th>
</tr>
</thead>
<tbody>
<?php if (!empty($suppliers)): ?>
<?php foreach ($suppliers as $s): ?>
<tr>
<td><?php echo $s['id']; ?></td>
<td><?php echo htmlspecialchars($s['name']); ?></td>
<td><?php echo htmlspecialchars($s['contact_person']); ?></td>
<td><?php echo htmlspecialchars($s['phone']); ?></td>
<td><?php echo htmlspecialchars($s['address']); ?></td>
<td>
<span class="label label-<?php echo $s['status'] ? 'success' : 'default'; ?>">
<?php echo $s['status'] ? '正常' : '停用'; ?>
</span>
</td>
<td><?php echo htmlspecialchars($s['remark']); ?></td>
<td>
<a href="<?php echo BASE_URL; ?>/Inventory/supplierEdit?id=<?php echo $s['id']; ?>" class="btn btn-xs btn-info"><i class="fa fa-edit"></i> 编辑</a>
<form method="post" action="<?php echo BASE_URL; ?>/Inventory/supplierDelete" 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 $s['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'; ?>