feat(programs): Excel 模板下载 + .xlsx 解析导入

- 新增 excel 4.0.6 / path_provider 2.1.5 依赖
- ExcelTemplateService:生成 Programs + Steps 双表模板(保存到应用文档目录)
- ExcelImportService:解析 .xlsx 并写入数据库,跳过已存在 code、按 program_code 关联步骤
- programs_page 顶部新增「下载模板」按钮,导入按钮改用 Excel 解析
- 移除被取代的 program_import_service.dart
- AppLocalizations 新增 downloadTemplate 键
- 验证:flutter analyze 无新增 issue;flutter build apk --debug 通过
This commit is contained in:
Developer
2026-06-04 15:27:34 +08:00
parent d53c41c300
commit d91791edaf
7 changed files with 504 additions and 153 deletions

View File

@@ -31,6 +31,12 @@ dependencies:
# 文件选择器
file_picker: ^8.1.7
# 路径解析(保存导入/导出文件)
path_provider: ^2.1.5
# Excel 读写(生成导入模板 + 解析用户填好的 .xlsx
excel: ^4.0.2
# 国际化
intl: ^0.20.2