Compare commits

..

5 Commits

Author SHA1 Message Date
d514e82e9b Merge branch 'main' of https://git.yum2.cc/luff/inventory_check 2025-03-17 16:32:41 +08:00
0c602a8ccd 更新 inventory_check/views.py 2025-03-17 16:30:43 +08:00
559af65260 更新 inventory_check/views.py 2025-02-27 08:50:46 +00:00
7e5eaa82e3 1.0.0 final 2025-02-26 17:24:55 +08:00
b1c336e43c ok 2025-02-26 17:21:03 +08:00
7 changed files with 15 additions and 5 deletions

BIN
data.db Normal file

Binary file not shown.

BIN
data.xlsx Normal file

Binary file not shown.

View File

@@ -47,5 +47,5 @@ function checknext() {
function backtoroot(msg="已完成,返回") { function backtoroot(msg="已完成,返回") {
alert(msg); alert(msg);
location.href=""; location.href="/";
} }

View File

@@ -1,6 +1,16 @@
{% extends 'base.html' %} <!DOCTYPE html>
{% block scripts %} <html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>盘库助手</title>
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" type="text/css">
</head>
<body>
<script type="text/javascript" src="{{ url_for('static', filename='js/script.js') }}"></script>
<script> <script>
backtoroot( "{{ msg }}" ); backtoroot( "{{ msg }}" );
</script> </script>
{% endblock %} </body>
</html>

View File

@@ -97,7 +97,7 @@ def import_file():
@app.route('/download-xlsx') @app.route('/download-xlsx')
def download_xlsx(): def download_xlsx():
filename = time.strftime("%Y%m%d.xlsx", time.localtime()) filename = "PD-" + time.strftime("%Y%m%d", time.localtime()) + ".xlsx"
# 创建一个 Excel 工作簿 # 创建一个 Excel 工作簿
inventorys = Inventory.query.all() # 查询所有数据, and sort data by sort inventorys = Inventory.query.all() # 查询所有数据, and sort data by sort
# 创建一个工作簿 # 创建一个工作簿

BIN
sheet.xlsx Normal file

Binary file not shown.

Binary file not shown.