XH_Digital_Management/excel_parser/templates/excel_preview_table.html

73 lines
2.8 KiB
HTML

<!DOCTYPE html>
{% load static %}
<html lang="en">
<head>
<title>Excel解析工具</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- Favicon icon -->
<link rel="icon" href="{% static 'images/favicon.svg' %}" type="image/x-icon">
<!-- fontawesome icon -->
<link rel="stylesheet" href="{% static 'fonts/fontawesome/css/fontawesome-all.min.css' %}">
<!-- animation css -->
<link rel="stylesheet" href="{% static 'plugins/animation/css/animate.min.css' %}">
<!-- vendor css -->
<link rel="stylesheet" href="{% static 'css/style.css' %}">
</head>
<body>
<div class="page-wrapper">
<form id="preview-form" method="post">
<input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}">
<div class="modal-header">
<h5 class="modal-title" id="excelPreviewModalTitle">上传文件预览</h5>
</div>
<div class="modal-body">
<div style="overflow-x: auto;">
<table id="form-input-table" class="table table-striped table-bordered nowrap">
<thead>
<tr>
{% for column in columns %}
<th>{{ column }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for row in table_data %}
<tr>
{% for cell in row %}
<td>
<input type="text" class="form-control" style="width: 180px;" name="cell_{{ forloop.parentloop.counter0 }}_{{ forloop.counter0 }}" value="{{ cell }}">
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<div id="pagination">
<span id="totalData" class="mx-2">数据总数: {{ table_data|length }}</span>
<span id="pageInfo" class="mx-2">第 1 页, 共 1 页</span>
<button id="prevPage" class="btn btn-secondary" type="button">上一页</button>
<button id="nextPage" class="btn btn-secondary" type="button">下一页</button>
</div>
<div id="actions">
<button id="saveButton" type="button" class="btn btn-primary">保存</button>
</div>
</div>
</form>
</div>
<script src="{% static 'js/vendor-all.min.js' %}"></script>
<script src="{% static 'plugins/bootstrap/js/bootstrap.min.js' %}"></script>
</body>
</html>