Files
MES/app/views/Admin/workstation.php
T
2026-08-08 18:28:49 +08:00

58 lines
2.8 KiB
PHP

<?php
$activeMenu = 'workstation';
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; ?>/Admin/workstationAdd" 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 style="width:60px">序号</th>
<th>工位名称</th>
<th>工位编码</th>
<th>工位类型</th>
<th>排序</th>
<th>状态</th>
<th style="width:150px">操作</th>
</tr>
</thead>
<tbody>
<?php if (!empty($stations)): ?>
<?php foreach ($stations as $station): ?>
<tr>
<td><?php echo $station['id']; ?></td>
<td><?php echo htmlspecialchars($station['station_name']); ?></td>
<td><code><?php echo htmlspecialchars($station['station_code']); ?></code></td>
<td><?php echo htmlspecialchars($station['station_type']); ?></td>
<td><?php echo $station['sort_order']; ?></td>
<td>
<span class="label label-<?php echo $station['status'] == 1 ? 'success' : 'danger'; ?>">
<?php echo $station['status'] == 1 ? '启用' : '禁用'; ?>
</span>
</td>
<td>
<a href="<?php echo BASE_URL; ?>/Admin/workstationEdit/<?php echo $station['id']; ?>" class="btn btn-xs btn-info"><i class="fa fa-edit"></i> 编辑</a>
<form method="post" action="<?php echo BASE_URL; ?>/Admin/workstationDelete/<?php echo $station['id']; ?>" style="display:inline;" onsubmit="return confirm('确定删除该工位?')">
<input type="hidden" name="csrf_token" value="<?php echo htmlspecialchars($csrfToken); ?>">
<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="7" class="text-center text-muted">暂无工位数据</td></tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
<?php include APP_PATH . 'app/views/layouts/admin_footer.php'; ?>