list
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<div class="handler">
|
||||
<button type="button">返回</button>
|
||||
<a href="/"><button type="button">返回</button></a>
|
||||
<div></div><div><p id="inventory-id" hidden>{{ inventory.id }}</p></div>
|
||||
</div>
|
||||
<h1 id="inventory-tag">{{ inventory.tag }}</h1>
|
||||
|
@ -7,15 +7,15 @@
|
||||
</small>
|
||||
</h5>
|
||||
<form method=get action="/upload">
|
||||
<input style="width:100px;" type=submit value=上传XLSX>
|
||||
<input style="width:150px;" type=submit value=上传XLSX>
|
||||
</form>
|
||||
<form method=get action="/list">
|
||||
<input style="width:100px;" type=submit value=显示列表>
|
||||
<input style="width:150px;" type=submit value=显示列表>
|
||||
</form>
|
||||
<form method=get action="/check">
|
||||
<input style="width:100px;" type=submit value=继续盘点>
|
||||
<input style="width:150px;" type=submit value=继续盘点>
|
||||
</form>
|
||||
<form method=get action="/download-xlsx">
|
||||
<input style="width:100px;" type=submit value=下载XLSX>
|
||||
<input style="width:150px;" type=submit value=下载XLSX>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
@ -0,0 +1,62 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div id="flash-msg">
|
||||
开始盘点>>>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<div class="handler">
|
||||
<a href="/"><button type="button">返回</button></a>
|
||||
<div></div><div><p id="inventory-id" hidden>0</p></div>
|
||||
</div>
|
||||
<div class="handler">
|
||||
<button onclick="previousPage()" type="button">上页</button>
|
||||
<div></div>
|
||||
<button onclick="nextPage()" type="button">下页</button>
|
||||
</div>
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<th>标签</th>
|
||||
<th>数量</th>
|
||||
<th>已盘</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="tag1">一月</td>
|
||||
<td id="amount1">¥3400</td>
|
||||
<td id="checked1">¥3400</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="tag2">一月</td>
|
||||
<td id="amount2">¥3400</td>
|
||||
<td id="checked2">¥3400</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="tag3">一月</td>
|
||||
<td id="amount3">¥3400</td>
|
||||
<td id="checked3">¥3400</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="tag4">一月</td>
|
||||
<td id="amount4">¥3400</td>
|
||||
<td id="checked4">¥3400</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="tag5">一月</td>
|
||||
<td id="amount5">¥3400</td>
|
||||
<td id="checked5">¥3400</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="tag6">一月</td>
|
||||
<td id="amount6">¥3400</td>
|
||||
<td id="checked6">¥3400</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="handler">
|
||||
<button onclick="previousPage()" type="button">上页</button>
|
||||
<div></div>
|
||||
<button onclick="nextPage()" type="button">下页</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
@ -3,6 +3,9 @@
|
||||
|
||||
{% block content %}
|
||||
<h1>上传Excel XLSX文件</h1>
|
||||
<form method=get action="/">
|
||||
<input style="width:150px;" type=submit value=返回>
|
||||
</form>
|
||||
<form method=post enctype=multipart/form-data action="/import">
|
||||
<div><input style="width:300px;" type=file name=选择></div>
|
||||
<div class="handler"><div></div><input style="width:100px;"type=submit value=上传></div>
|
||||
|
@ -17,6 +17,10 @@ from werkzeug.exceptions import BadRequest
|
||||
def index():
|
||||
return render_template('index.html')
|
||||
|
||||
@app.route('/list')
|
||||
def list():
|
||||
return render_template('list.html')
|
||||
|
||||
@app.route('/check', methods=['GET'])
|
||||
def check():
|
||||
inventory = Inventory.query.filter_by(checked=False).first()
|
||||
@ -90,7 +94,7 @@ def import_file():
|
||||
file_path = 'data.xlsx'
|
||||
file.save(file_path)
|
||||
import_from_xlsx(file_path)
|
||||
return '文件导入成功!'
|
||||
return '文件导入成功! <a href="/">返回</a>'
|
||||
|
||||
return redirect(url_for('upload_form'))
|
||||
|
||||
|
Reference in New Issue
Block a user