refactor(webapp): 重构发票验证功能

- 修改基础 URL为本地地址
- 优化发票验证和列表查询逻辑
- 更新数据库结构和查询语句
- 改进前端发票管理页面,增加验证结果展示
- 修复后端发票列表接口,支持 JSON 请求
This commit is contained in:
liuxiaoqing
2025-08-19 13:52:25 +08:00
parent c22a509633
commit 1e24287327
10 changed files with 59 additions and 71 deletions
@@ -107,7 +107,7 @@ const emit= defineEmits(['update:formState'])
const fileType = ref<string>('img')
onMounted(() => {
alert(props.filePath)
// alert(props.filePath)
if(props.filePath){
fileType.value = props.filePath.split('.').pop() ==='pdf'?'pdf':'img'
request.get('/recognize?filePath='+encodeURIComponent(props.filePath)).then((res) => {
@@ -7,7 +7,7 @@ import {
// SmileOutlined,
} from '@ant-design/icons-vue'
import type {StepProps} from "ant-design-vue"
import Check from './Check.vue'
import Check from './Check.vue'
import upload from './upload.vue'
import Report from "./report.vue"
// 步骤
@@ -35,7 +35,8 @@ const handleUpload = (options: any) => {
if (xhr.status === 200 || xhr.status === 201) {
console.log(xhr.responseText);
onSuccess(xhr.responseText, file);
emit('update:filePath', xhr.responseText)
let res = JSON.parse(xhr.responseText)
emit('update:filePath', res.file_path)
} else {
onError(new Error(`Upload failed with status ${xhr.status}`));
}