• wenwen.tang's avatar
    feat(contracts): 台账新增「合同原件」列(AL),支持上传 / 查阅 / 移除 · 09815170
    wenwen.tang authored
    需求:房租车位费数据表需要支持上传合同留档并可查阅合同,增加合同原件的列。
    
    - 新增 rentos/contracts.py:data/contracts/{id}.{ext} + index.json,
      白名单 pdf/doc/docx/xls/xlsx/png/jpg/gif/webp/bmp,单份 ≤ 20MB;
      save/find/path_of/list_all/remove/parse/dump/describe;clean_id 挡路径穿越
    - config:加 CONTRACT_DIR 并纳入 ensure_dirs
    - tables:列 AL「合同原件」type=files(排 AJ 之后、最右),一格可挂多份;
      coerce 支持 list → 紧凑 JSON;新增 files_text 供导出 xlsx 输出文件名文本
    - server:
      POST /api/contracts(上传,仅管理员)
      GET  /api/contracts(列表)
      GET  /api/contracts/{id}(内联预览;?dl=1 下载;支持 ?token=,便于 <a href> 直接引用)
      DELETE /api/contracts/{id}(仅管理员)
      合同写接口不匹配任何 CAP_ELEC 规则 → 落 _write_cap 兜底 "*" = 仅管理员;
      访客只读仍可查阅(这点由冒烟验证)
    - 列定义以代码为准,故加列不需要数据迁移
    09815170
Name
Last commit
Last update
.workbuddy/memory Loading commit data...
.租金通知系统-需求确认清单.ref Loading commit data...
assets Loading commit data...
data Loading commit data...
deploy Loading commit data...
output Loading commit data...
rentos Loading commit data...
samples Loading commit data...
templates Loading commit data...
tools Loading commit data...
web Loading commit data...
.dockerignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
build_flow_doc.py Loading commit data...
build_notices.py Loading commit data...
build_rules_doc.py Loading commit data...
build_templates.py Loading commit data...
render_samples.py Loading commit data...
start.bat Loading commit data...
stop.bat Loading commit data...
电费上传模板.xlsx Loading commit data...
电费通知单系统-流程说明.xlsx Loading commit data...
租金.xlsx Loading commit data...
租金通知系统-模板填充规则.xlsx Loading commit data...
租金通知系统-需求确认清单.xlsx Loading commit data...