feat(web): add OCR service and update travel reimbursement view

- web/src/services/ocr.js: add OCR service API client
- web/src/views/scripts/TravelReimbursementCreateView.js: update travel form script with OCR integration
This commit is contained in:
caoxiaozhu
2026-05-12 03:05:51 +00:00
parent a3f3421ebc
commit 035be110b6
2 changed files with 58 additions and 3 deletions

14
web/src/services/ocr.js Normal file
View File

@@ -0,0 +1,14 @@
import { apiRequest } from './api.js'
export function recognizeOcrFiles(files) {
const formData = new FormData()
for (const file of files) {
formData.append('files', file)
}
return apiRequest('/ocr/recognize', {
method: 'POST',
body: formData,
contentType: null
})
}