- 后端新增 GET /ocr-health 端点,探测 Python OCR 服务 /health - 前端页面 created 时调用健康检查,服务不可用时顶部显示红色警告 "发票识别服务已停止,请联系信息化部门" - 服务不可用时禁用附件上传区域(FileUpload 新增 disabled prop) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
65 lines
1.1 KiB
JavaScript
65 lines
1.1 KiB
JavaScript
import request from '@/utils/request'
|
||
|
||
// 日常报销单
|
||
export function listReimburseReq(query) {
|
||
return request({
|
||
url: '/hrm/reimburse/list',
|
||
method: 'get',
|
||
params: query
|
||
})
|
||
}
|
||
|
||
export function getReimburseReq(bizId) {
|
||
return request({
|
||
url: `/hrm/reimburse/${bizId}`,
|
||
method: 'get'
|
||
})
|
||
}
|
||
|
||
export function addReimburseReq(data) {
|
||
return request({
|
||
url: '/hrm/reimburse',
|
||
method: 'post',
|
||
data
|
||
})
|
||
}
|
||
|
||
export function editReimburseReq(data) {
|
||
return request({
|
||
url: '/hrm/reimburse',
|
||
method: 'put',
|
||
data
|
||
})
|
||
}
|
||
|
||
export function delReimburseReq(bizIds) {
|
||
return request({
|
||
url: `/hrm/reimburse/${bizIds}`,
|
||
method: 'delete'
|
||
})
|
||
}
|
||
|
||
export function allReimburseReq(query) {
|
||
return request({
|
||
url: '/hrm/reimburse/all',
|
||
method: 'get',
|
||
params: query
|
||
})
|
||
}
|
||
|
||
export function checkReimburseOcrHealth() {
|
||
return request({ url: '/hrm/reimburse/ocr-health', method: 'get' })
|
||
}
|
||
|
||
/**
|
||
* 通过ossId触发发票OCR识别(返回识别条目,不保存)
|
||
*/
|
||
export function ocrReimburseInvoice(ossId) {
|
||
return request({
|
||
url: '/hrm/reimburse/ocr-by-oss',
|
||
method: 'post',
|
||
params: { ossId }
|
||
})
|
||
}
|
||
|