88 lines
3.9 KiB
HTML
Executable File
88 lines
3.9 KiB
HTML
Executable File
{% extends "base.html" %}
|
|
{% block content %}
|
|
<div class="history_container">
|
|
|
|
<!-- 添加搜索框 -->
|
|
<div class="history_search">
|
|
<form method="GET" action="{{ url_for('history') }}" class="history_search_form">
|
|
<input type="text" name="search" value="{{ search }}" placeholder="搜索工单号、设备、支局、处理人等..." class="history_search_input">
|
|
<button type="submit" class="history_search_button">搜索</button>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- PC端表格视图 -->
|
|
<table class="history_table">
|
|
<thead>
|
|
<tr>
|
|
<th>工单号</th>
|
|
<th>所属支局</th>
|
|
<th>故障设备</th>
|
|
<th>处理人</th>
|
|
<th>处理时间</th>
|
|
<th>故障类型</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for handling in handlings.items %}
|
|
<tr>
|
|
<td>{{ handling['order_id'] }}</td>
|
|
<td>{{ handling['branch'] }}</td>
|
|
<td>{{ handling['device_id'] }}</td>
|
|
<td>{{ handling['handler'] }}</td>
|
|
<td>{{ handling['time'].strftime('%Y-%m-%d %H:%M:%S') }}</td>
|
|
<td>{{ handling['fault_type'] }}</td>
|
|
<td>
|
|
<a href="{{ url_for('history_detail', order_id=handling['order_id']) }}" class="view_btn">查看</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<!-- 移动端卡片视图 -->
|
|
<div class="card_container">
|
|
{% for handling in handlings.items %}
|
|
<a href="{{ url_for('history_detail', order_id=handling['order_id']) }}" class="history_card {% if handling['type'] == 'manual' %}manual-card{% else %}system-card{% endif %}">
|
|
<div class="history_card_header">
|
|
<span class="history_card_title">工单号: {{ handling['order_id'] }}</span>
|
|
<span class="history_card_time">{{ handling['time'].strftime('%Y-%m-%d') }}</span>
|
|
</div>
|
|
<div class="history_card_content">
|
|
<div class="history_card_item">
|
|
<span class="history_card_label">所属支局</span>
|
|
<span class="history_card_value">{{ handling['branch'] }}</span>
|
|
</div>
|
|
<div class="history_card_item">
|
|
<span class="history_card_label">故障设备</span>
|
|
<span class="history_card_value">{{ handling['device_id'] }}</span>
|
|
</div>
|
|
<div class="history_card_item">
|
|
<span class="history_card_label">处理人</span>
|
|
<span class="history_card_value">{{ handling['handler'] }}</span>
|
|
</div>
|
|
<div class="history_card_item">
|
|
<span class="history_card_label">故障类型</span>
|
|
<span class="history_card_value">{{ handling['fault_type'] }}</span>
|
|
</div>
|
|
<div class="history_card_item">
|
|
<span class="history_card_label">工单类型</span>
|
|
<span class="history_card_value">{{ '手工申报' if handling['type'] == 'manual' else '系统派单' }}</span>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<!-- 分页导航 -->
|
|
<div class="history_pagination">
|
|
{% if handlings.has_prev %}
|
|
<a href="{{ url_for('history', page=handlings.prev_num) }}" class="history_page_link">上一页</a>
|
|
{% endif %}
|
|
<span class="history_page_info">第 {{ handlings.page }} 页,共 {{ handlings.pages }} 页</span>
|
|
{% if handlings.has_next %}
|
|
<a href="{{ url_for('history', page=handlings.next_num) }}" class="history_page_link">下一页</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %} |