requirements.md 4.8 KB

Requirements Document

Introduction

本功能对现有系统进行多项UI增强和优化,包括:

  1. 全局隐藏表格中的ID列
  2. 工作记录增加结算状态筛选
  3. 仪表盘年度汇总结算状态显示优化
  4. 导出报表未结算状态的视觉标注

Glossary

  • Table_Component: 系统中的各类数据表格组件,包括人员列表、物品列表、供应商列表、工作记录列表等
  • Work_Record_List: 工作记录列表组件,显示工作记录数据
  • Dashboard: 仪表盘组件,显示日统计、月度报告和年度汇总
  • Yearly_Summary: 年度汇总,显示全年按月的人员收入统计
  • Export_Service: 导出服务,生成Excel格式的月度和年度报表
  • Settlement_Status: 结算状态,标识工作记录是否已结算(已结算/未结算)
  • Settlement_Filter: 结算状态筛选器,用于按结算状态过滤工作记录

Requirements

Requirement 1: 全局隐藏表格ID列

User Story: As a user, I want to hide ID columns in all tables, so that the interface is cleaner and focuses on meaningful data.

Acceptance Criteria

  1. WHEN the PersonList component is rendered, THE Table_Component SHALL NOT display the ID column
  2. WHEN the ItemList component is rendered, THE Table_Component SHALL NOT display the ID column
  3. WHEN the SupplierList component is rendered, THE Table_Component SHALL NOT display the ID column
  4. WHEN the WorkRecordList component is rendered, THE Table_Component SHALL NOT display the ID column
  5. WHEN the AdminList component is rendered, THE Table_Component SHALL NOT display the ID column

Requirement 2: 工作记录结算状态筛选

User Story: As a user, I want to filter work records by settlement status, so that I can quickly find settled or unsettled records.

Acceptance Criteria

  1. WHEN the WorkRecordList is displayed, THE Work_Record_List SHALL show a settlement status filter dropdown
  2. WHEN a user selects "已结算" filter, THE Work_Record_List SHALL display only settled work records
  3. WHEN a user selects "未结算" filter, THE Work_Record_List SHALL display only unsettled work records
  4. WHEN a user selects "全部" filter, THE Work_Record_List SHALL display all work records regardless of settlement status
  5. WHEN the settlement filter is applied, THE Work_Record_Service SHALL accept and process the is_settled query parameter

Requirement 3: 仪表盘年度汇总结算状态优化

User Story: As a user, I want the yearly summary to show a single "结算状态" column instead of separate "已结算/未结算" columns, so that the display is more concise.

Acceptance Criteria

  1. WHEN the yearly summary is displayed, THE Dashboard SHALL show a single "结算状态" column instead of separate "已结算" and "未结算" columns
  2. WHEN the yearly summary is displayed, THE Dashboard SHALL position the "结算状态" column immediately after the "人员" column
  3. WHEN the yearly summary displays settlement status, THE Dashboard SHALL show the format "已结算: ¥X / 未结算: ¥Y"

Requirement 4: 人员按供应商明细已结算状态字体颜色

User Story: As a user, I want settled status to be displayed in black font in the person-by-supplier breakdown, so that it's visually distinct from unsettled status.

Acceptance Criteria

  1. WHEN the person-by-supplier breakdown displays a row with "已结算" status, THE Dashboard SHALL render the settlement status text in black color
  2. WHEN the person-by-supplier breakdown displays a row with "未结算" status, THE Dashboard SHALL maintain the current styling (non-black color)

Requirement 5: 年度报表汇总未结算列底色标注

User Story: As a user, I want the unsettled column in yearly summary export to have a background color, so that it stands out in the report.

Acceptance Criteria

  1. WHEN a yearly report is exported, THE Export_Service SHALL apply a distinct background color to the "未结算" column header in the yearly summary sheet
  2. WHEN a yearly report is exported, THE Export_Service SHALL apply a distinct background color to all cells in the "未结算" column in the yearly summary sheet

Requirement 6: 所有报表未结算行底色标注

User Story: As a user, I want unsettled rows in all exported reports to have a background color, so that I can easily identify pending payments.

Acceptance Criteria

  1. WHEN a monthly report is exported, THE Export_Service SHALL apply a distinct background color to rows where settlement status is "未结算" in the detail sheet
  2. WHEN a yearly report is exported, THE Export_Service SHALL apply a distinct background color to rows where settlement status is "未结算" in the detail sheet
  3. WHEN applying background color to unsettled rows, THE Export_Service SHALL use a consistent color across all report types