Files
Neo 6f8f12314f feat: 累积功能变更 — 聊天集成、租户管理、小程序更新、ETL 增强、迁移脚本
包含多个会话的累积代码变更:
- backend: AI 聊天服务、触发器调度、认证增强、WebSocket、调度器最小间隔
- admin-web: ETL 状态页、任务管理、调度配置、登录优化
- miniprogram: 看板页面、聊天集成、UI 组件、导航更新
- etl: DWS 新任务(finance_area_daily/board_cache)、连接器增强
- tenant-admin: 项目初始化
- db: 19 个迁移脚本(etl_feiqiu 11 + zqyy_app 8)
- packages/shared: 枚举和工具函数更新
- tools: 数据库工具、报表生成、健康检查
- docs: PRD/架构/部署/合约文档更新

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 00:03:48 +08:00

1.9 KiB
Raw Permalink Blame History

P9→NS1/RNS1 缺失项 #17消费记录的时间范围筛选

简要结论

  • 状态: 未解决
  • 风险等级:🟡
  • 仅支持按月切换(上/下月箭头),未实现自定义日期范围筛选

详细审查

审查范围

  • apps/miniprogram/miniprogram/pages/customer-service-records/customer-service-records.ts — 页面逻辑
  • apps/miniprogram/miniprogram/pages/customer-service-records/customer-service-records.wxml — 页面模板
  • apps/backend/app/services/customer_service.pyget_customer_records() API

发现

  1. 前端仅实现了 onPrevMonth()onNextMonth() 两个月份切换方法
  2. WXML 中月份切换 UI 为左右箭头 + 月份标签(如"2026年3月"),无日期选择器
  3. 后端 get_customer_records() 接收 yearmonth 参数,按月查询
  4. 无自定义日期范围的 API 参数(如 start_dateend_date
  5. 月份范围有边界控制:minYearMonth(数据起始)到 maxYearMonth(当前月)

证据

<!-- customer-service-records.wxml — 仅月份切换 -->
<view class="month-switcher">
  <view class="month-btn" bindtap="onPrevMonth">
    <t-icon name="chevron-left" />
  </view>
  <text class="month-label">{{monthLabel}}</text>
  <view class="month-btn" bindtap="onNextMonth">
    <t-icon name="chevron-right" />
  </view>
</view>
// customer-service-records.ts — 仅按月请求
async loadMonthRecords(customerId: string, year: number, month: number) { ... }

建议

  • 如需自定义日期范围,需:
    1. 前端添加日期范围选择器组件(如 TDesign t-date-time-picker
    2. 后端 get_customer_records() 增加 start_date / end_date 可选参数
    3. 月份切换和自定义范围可共存,自定义范围优先级更高
  • 当前按月切换已满足基本需求,自定义范围为增强功能,优先级可后置