From 59c087865f591fe8c7e4d36afbba8f6810090d16 Mon Sep 17 00:00:00 2001 From: luff Date: Tue, 25 Feb 2025 18:52:49 +0800 Subject: [PATCH] list --- inventory_check/templates/check.html | 2 +- inventory_check/templates/index.html | 8 ++-- inventory_check/templates/list.html | 62 +++++++++++++++++++++++++++ inventory_check/templates/upload.html | 3 ++ inventory_check/views.py | 6 ++- wsgi.py | 3 ++ 6 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 wsgi.py diff --git a/inventory_check/templates/check.html b/inventory_check/templates/check.html index 7e5044b..1e7c2eb 100644 --- a/inventory_check/templates/check.html +++ b/inventory_check/templates/check.html @@ -6,7 +6,7 @@
- +

{{ inventory.tag }}

diff --git a/inventory_check/templates/index.html b/inventory_check/templates/index.html index b66a48f..337ac1f 100644 --- a/inventory_check/templates/index.html +++ b/inventory_check/templates/index.html @@ -7,15 +7,15 @@
- +
- +
- +
- +
{% endblock %} diff --git a/inventory_check/templates/list.html b/inventory_check/templates/list.html index e69de29..1509df8 100644 --- a/inventory_check/templates/list.html +++ b/inventory_check/templates/list.html @@ -0,0 +1,62 @@ +{% extends 'base.html' %} + +{% block content %} +
+ 开始盘点>>> +
+
+ +
+ +
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
标签数量已盘
一月¥3400¥3400
一月¥3400¥3400
一月¥3400¥3400
一月¥3400¥3400
一月¥3400¥3400
一月¥3400¥3400
+
+ +
+ +
+
+{% endblock %} + diff --git a/inventory_check/templates/upload.html b/inventory_check/templates/upload.html index d6fe4f3..68786e6 100644 --- a/inventory_check/templates/upload.html +++ b/inventory_check/templates/upload.html @@ -3,6 +3,9 @@ {% block content %}

上传Excel XLSX文件

+
+ +
diff --git a/inventory_check/views.py b/inventory_check/views.py index ff44ccb..fe404d0 100644 --- a/inventory_check/views.py +++ b/inventory_check/views.py @@ -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 '文件导入成功! 返回' return redirect(url_for('upload_form')) diff --git a/wsgi.py b/wsgi.py new file mode 100644 index 0000000..e96b413 --- /dev/null +++ b/wsgi.py @@ -0,0 +1,3 @@ +from inventory_check import app + +app = app('production') \ No newline at end of file