feat(web): 差旅领导意见事件结构化与申请审批信息增强
- applicationApproval 新增按日期/时间/审批角色拆分格式化,buildLeaderApprovalEvents 补充 dateLabel/timeLabel/roleLabel 字段 - TravelRequestDetailView 领导意见事件改为日期+时间+审批人结构化展示,travel-request-detail-view.css 重构对应样式 - travelReimbursementAttachmentModel 微调附件标识,同步更新 application-approval-info、travel-request-detail-leader-approval、attachment-association-confirmation 测试 - 更新公司通信费报销规则表
This commit is contained in:
@@ -210,6 +210,47 @@ test('OCR receipt folder ids are kept for final draft attachment association', (
|
||||
assert.equal(Object.getOwnPropertyDescriptor(files[0], 'receiptId')?.enumerable, false)
|
||||
})
|
||||
|
||||
test('OCR documents keep full recognized text for backend context', () => {
|
||||
const longText = [
|
||||
'增值税电子发票',
|
||||
'购买方名称:远光软件股份有限公司',
|
||||
'销售方名称:上海高铁服务有限公司',
|
||||
'项目名称:客运服务',
|
||||
'出发地:武汉',
|
||||
'到达地:上海',
|
||||
'乘车日期:2026-02-20',
|
||||
'车次:G1234',
|
||||
'座位等级:二等座',
|
||||
'金额:354.00元',
|
||||
'税额:10.62元',
|
||||
'发票号码:12345678901234567890',
|
||||
'开票日期:2026-02-21',
|
||||
'购买方纳税人识别号:91440400618256625E',
|
||||
'销售方纳税人识别号:91310000132234123X',
|
||||
'备注:本票据用于差旅报销,请核对出发城市、到达城市、车次、座位等级、金额、税额和电子客票号。',
|
||||
'电子客票号:E1234567890'
|
||||
].join('\n')
|
||||
|
||||
assert.ok(longText.length > 240)
|
||||
|
||||
const documents = normalizeOcrDocuments({
|
||||
documents: [
|
||||
{
|
||||
filename: 'train-ticket.pdf',
|
||||
text: longText,
|
||||
summary: '铁路电子客票 武汉-上海',
|
||||
document_fields: [
|
||||
{ key: 'amount', label: '金额', value: '354.00元' },
|
||||
{ key: 'ticket_no', label: '电子客票号', value: 'E1234567890' }
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
assert.equal(documents[0].text, longText)
|
||||
assert.match(documents[0].text, /电子客票号:E1234567890/)
|
||||
})
|
||||
|
||||
test('receipt files are collected through a single OCR persistence entry before draft association', async () => {
|
||||
const files = [
|
||||
{ name: 'invoice.png' }
|
||||
|
||||
Reference in New Issue
Block a user