refactor(webapp): 更新项目配置和功能

- 修改基础 URL为本地开发环境
- 更新数据库文件路径
- 调整发票报销流程,增加"完成"按钮
- 优化发票列表页面,添加搜索功能
- 新增发票复核页面
- 更新文件上传逻辑,使用动态 URL
This commit is contained in:
2025-08-17 22:39:59 +08:00
parent 0c4e94b5af
commit cc867c471e
12 changed files with 91 additions and 23 deletions
Binary file not shown.
+1 -1
View File
@@ -3,7 +3,7 @@ from sqlite3 import Error
class DBService:
db_file = "data/verify.db"
db_file = "verify.db"
conn = None
def __init__(self):
"""
+10 -2
View File
@@ -1,3 +1,5 @@
from flask import Flask, request, render_template, send_from_directory
from flask_cors import CORS
from alibabacloud_sample.dataservice import DataService
@@ -35,7 +37,8 @@ def recognize():
service = Service()
dataservice = DataService()
data = dataservice.get_invoice(file_path=file_path)
if data is not None:
print(data)
if data is not None and data.get('file_path') is not None:
return data
return service.recognize(file_path=file_path)
# 发票验证
@@ -48,7 +51,12 @@ def verify():
dataservice = DataService()
data = dataservice.get_invoice(file_path=file_path)
return service.verify(data=data,file_path=file_path)
@app.route('/list',methods=['POST'])
def list():
data = []
return data
if __name__ == '__main__':
# Service.verify(sys.argv[1:])
# Service.recognize(file_path="/home/jayus/图片/wechat_2025-07-31_131911_822.png")
app.run(host='0.0.0.0', port=5000, debug=True)
app.run(host='0.0.0.0', port=5555, debug=True)
+14 -14
View File
@@ -1,14 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue + TS</title>
<script type="module" crossorigin src="/assets/index-B04iHocP.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-Qtc4pW4p.css">
</head>
<body>
<div id="app"></div>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue + TS</title>
<script type="module" crossorigin src="/assets/index-BqD2iBBB.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BtAwStV2.css">
</head>
<body>
<div id="app"></div>
</body>
</html>