初始提交:希姆计算硬件资产管理系统
功能: - Django + MySQL + 深色主题 - 资产增删改查(含资产编号、BMC地址、设备位置、备注) - Excel导入导出(分类自动创建) - 设备分类管理 - 资产变更记录追踪 - 质保到期提醒 - 用户认证系统 - Docker部署支持
Esse commit está contido em:
@@ -0,0 +1,52 @@
|
||||
{% extends "assetapp/base.html" %}
|
||||
|
||||
{% block title %}分类管理{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h4 class="mb-0"><i class="bi bi-tags me-2"></i>分类管理</h4>
|
||||
<a href="{% url 'category_create' %}" class="btn btn-primary btn-sm">
|
||||
<i class="bi bi-plus-circle me-1"></i>新增分类
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card-body p-0">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-dark table-hover mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>分类名称</th>
|
||||
<th>描述</th>
|
||||
<th>资产数量</th>
|
||||
<th>创建时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for category in categories %}
|
||||
<tr>
|
||||
<td>{{ category.id }}</td>
|
||||
<td><strong>{{ category.name }}</strong></td>
|
||||
<td>{{ category.description|default:"-" }}</td>
|
||||
<td><span class="badge bg-primary">{{ category.asset_count }}</span></td>
|
||||
<td>{{ category.created_at|date:"Y-m-d H:i" }}</td>
|
||||
<td>
|
||||
<a href="{% url 'category_update' category.pk %}" class="btn btn-outline-warning btn-xs" title="编辑">
|
||||
<i class="bi bi-pencil"></i>
|
||||
</a>
|
||||
<a href="{% url 'category_delete' category.pk %}" class="btn btn-outline-danger btn-xs" title="删除">
|
||||
<i class="bi bi-trash"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr><td colspan="6" class="text-center text-muted py-4">暂无分类</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Referência em uma Nova Issue
Bloquear um usuário