VerifVATInvoice/webapp/vite-project/src/components/check/report.vue
liuxiaoqing 31404cf225 refactor(webapp): 优化发票验证流程和界面
- 修改验证流程初始步骤为第3步- 更新验证结果展示方式,使用 Ant Design Result 组件
-优化上传页面样式,增加顶部间距
- 调整验证接口返回格式,统一错误处理
2025-08-19 22:42:38 +08:00

50 lines
1.1 KiB
Vue

<template>
<a-layout-content>
<a-result
:status="formState.status"
:title="formState.cyjgxx"
>
<template #subTitle >
<p v-if="formState.status === 'success'">查验次数: {{formState.inspectionAmount}}</p>
<p v-if="formState.status === 'success'">已存入发票库</p>
</template>
</a-result>
</a-layout-content>
</template>
<script lang="ts" setup>
import {ref,onMounted } from 'vue';
import request from "../../utils/request.ts";
const props = defineProps({ filePath: String });
import {baseURL} from "../../utils/baseurl.ts";
const fileType = ref<string>('img')
onMounted(() => {
alert(props.filePath)
if(props.filePath){
fileType.value = props.filePath.split('.').pop() ==='pdf'?'pdf':'img'
request.get('/verify?filePath='+encodeURIComponent(props.filePath)).then((res) => {
console.log(res)
formState.value = res.data
})
fileUrl.value = baseURL+"/"+props.filePath
}
})
//
const fileUrl = ref('')
let formState = ref({
status:"",
inspectionAmount: "",
cyjgxx: "",
verify_time: "",
});
</script>
<style scoped>
.pdf{
width: 100%;
height: 100%;
}
</style>