refactor: 项目模块重构 — 统一渲染 + 配置驱动 + 交互优化
核心重构: - 提取 renderView() / tdRow() 统一函数,消除三视图 16000+ 字符重复代码 - METRIC_CARDS 配置驱动,调整卡片顺序/单位只需改配置 - 筛选区统一为下拉框(视图 + 状态 + 日期),删除筛选:前缀 - 日历选择器移至顶部工具栏,卡片内不再重复 功能优化: - 项目状态简化为已签约/待签约 - 新增签约项目总数卡片(月度/季度按签约月份过滤) - 签约金额/已确收/已回款/应付/已付改为万元单位 - 项目名称固定300px + 省略号 + title悬停 - body min-width 1400px + overflow-x:auto - 首页费用金额→应付金额 代码清理: - 删除 monthOpts/quarterOpts/qLabels 等死代码 - 删除 purchase.js(采购→费用模块已另表迁移) - 财务→项目(侧边栏),采购→费用(全域重命名)
This commit is contained in:
@@ -49,13 +49,13 @@
|
||||
<i data-lucide="home" style="width:20px;height:20px"></i>
|
||||
<span class="text-[10px] mt-1">首页</span>
|
||||
</div>
|
||||
<div class="sidebar-tab" data-tab="finance" onclick="switchTab('finance')" title="经营管理">
|
||||
<i data-lucide="briefcase-business" style="width:20px;height:20px"></i>
|
||||
<span class="text-[10px] mt-1">财务</span>
|
||||
<div class="sidebar-tab" data-tab="finance" onclick="switchTab('finance')" title="项目管理">
|
||||
<i data-lucide="folder-open-dot" style="width:20px;height:20px"></i>
|
||||
<span class="text-[10px] mt-1">项目</span>
|
||||
</div>
|
||||
<div class="sidebar-tab" data-tab="purchase" onclick="switchTab('purchase')" title="采购管理">
|
||||
<i data-lucide="shopping-cart" style="width:20px;height:20px"></i>
|
||||
<span class="text-[10px] mt-1">采购</span>
|
||||
<div class="sidebar-tab" data-tab="expense" onclick="switchTab('expense')" title="费用管理">
|
||||
<i data-lucide="receipt" style="width:20px;height:20px"></i>
|
||||
<span class="text-[10px] mt-1">费用</span>
|
||||
</div>
|
||||
<div class="sidebar-tab" data-tab="projects" onclick="switchTab('projects')" title="重点工作与台账">
|
||||
<i data-lucide="file-text" style="width:20px;height:20px"></i>
|
||||
@@ -90,7 +90,7 @@
|
||||
<section id="proposals" class="panel"></section>
|
||||
<section id="products" class="panel"></section>
|
||||
<section id="finance" class="panel"></section>
|
||||
<section id="purchase" class="panel"></section>
|
||||
<section id="expense" class="panel"></section>
|
||||
</main>
|
||||
</div><!-- 关闭主内容区 -->
|
||||
</div><!-- 关闭 flex 容器 -->
|
||||
@@ -119,7 +119,7 @@
|
||||
<script src="{{ url_for('static', filename='modules/proposals.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='modules/products.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='modules/finance.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='modules/purchase.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='modules/expense.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='modules/drawer.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='modules/admin.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='app.js') }}"></script>
|
||||
|
||||
Reference in New Issue
Block a user