feat: 优化差旅报销预审流程与个人工作台 UI 体系
- 完善 user_agent_application 申请差旅报销预审槽位与消息组装 - 增强预算助理报告与风险建议卡片交互 - 重构登录页视觉样式与移动端响应式适配 - 优化个人工作台、文档中心、政策中心、员工管理等页面布局 - 拆分 travelRequestDetailPreReviewModel 为 advice/submit 模型 - 补充报销草稿、风险复核、Item Sync 与模板执行器测试覆盖
This commit is contained in:
@@ -43,6 +43,20 @@ def resolve_application_days_count(days_text: str) -> int:
|
||||
return _parse_chinese_number(chinese_match.group(0))
|
||||
|
||||
|
||||
def resolve_application_days_from_time_range(time_text: str) -> int:
|
||||
matches = re.findall(
|
||||
r"20\d{2}[-/.年]\d{1,2}[-/.月]\d{1,2}日?",
|
||||
str(time_text or ""),
|
||||
)
|
||||
if len(matches) < 2:
|
||||
return 0
|
||||
start_date = _parse_application_date(matches[0])
|
||||
end_date = _parse_application_date(matches[-1])
|
||||
if start_date is None or end_date is None or end_date < start_date:
|
||||
return 0
|
||||
return (end_date - start_date).days + 1
|
||||
|
||||
|
||||
def _resolve_start_date(time_text: str, context_json: dict[str, Any]) -> date | None:
|
||||
if time_text:
|
||||
match = re.search(
|
||||
|
||||
Reference in New Issue
Block a user