HEL-200: 起算日、期初余额与流水断档检测

新增 0006 迁移与 calculation 模块,实现起算日设置、公司对期初 revision 链、
覆盖断档重算、无业务说明审核,以及完整/降级余额 API;管理端结账与期初页接入真实接口。

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
总工
2026-08-27 15:58:21 +00:00
co-authored by Cursor multica-agent
parent 951b353765
commit 7826458892
7 changed files with 2221 additions and 48 deletions
+25 -25
View File
@@ -608,8 +608,9 @@
<form id="systemSettings" novalidate>
<div class="field" style="margin-bottom: 14px;">
<label for="cs-start">全局起算日</label>
<input class="input num-input" type="date" name="startDate" id="cs-start" value="2026-01-01" />
<span class="hint">期初余额以此日前一日的期末数为准</span>
<input class="input num-input" type="date" name="startDate" id="cs-start" />
<span class="hint" id="cs-start-hint">期初余额以此日前一日的期末数为准</span>
<span class="pill pill-muted" id="cs-start-locked" style="display: none; margin-top: 8px;">已锁定</span>
</div>
<div class="field" style="margin-bottom: 14px;">
<label for="cs-day">每月结账日</label>
@@ -643,15 +644,30 @@
<div class="card">
<div class="card-head">
<span class="card-title">期初余额管理<span class="sub">2026-01-01 起算的公司间往来期初数</span></span>
<span class="card-title">期初余额管理<span class="sub" id="openingSubtitle">公司间往来期初数</span></span>
<button class="btn btn-sm" id="openOpeningDialog">新增</button>
</div>
<div class="notice info" id="openingSummary" style="margin: 0 0 14px; display: none;"></div>
<div class="table-wrap" style="border: 0;">
<table class="ds-table">
<thead>
<tr><th>本方公司</th><th>对方公司</th><th>方向</th><th class="num-col">金额</th><th>录入人</th><th>录入时间</th><th>状态</th><th></th></tr>
</thead>
<tbody id="openingRows"></tbody>
</table>
</div>
</div>
<div class="card">
<div class="card-head">
<span class="card-title">变更记录<span class="sub">起算日与期初余额改动留痕</span></span>
</div>
<div class="table-wrap" style="border: 0;">
<table class="ds-table">
<thead>
<tr><th>本方公司</th><th>对方公司</th><th>科目</th><th>方向</th><th class="num-col">金额(万元)</th><th>生效日</th><th>状态</th></tr>
<tr><th>时间</th><th>操作人</th><th>对象</th><th>变更</th><th>原因</th></tr>
</thead>
<tbody id="openingRows"></tbody>
<tbody id="calculationChangeRows"><tr><td colspan="5" class="empty">暂无变更记录</td></tr></tbody>
</table>
</div>
</div>
@@ -870,31 +886,15 @@
<select class="select" name="to" id="ob-to" required></select>
</div>
<div class="field">
<label for="ob-subject">科目</label>
<select class="select" name="subject" id="ob-subject" required>
<option>应收</option>
<option>应付</option>
<option>其他应收</option>
<option>其他应付</option>
</select>
</div>
<div class="field">
<label for="ob-direction">方向</label>
<select class="select" name="direction" id="ob-direction" required>
<option>借方</option>
<option>贷方</option>
</select>
</div>
<div class="field">
<label for="ob-amount">金额(万元)</label>
<label for="ob-amount">金额</label>
<input class="input num-input" name="amount" id="ob-amount" type="number" min="0" step="0.01" required />
</div>
<div class="field">
<label for="ob-effective">生效日</label>
<input class="input" name="effectiveDate" id="ob-effective" type="date" value="2026-01-01" required />
<label for="ob-reason">录入原因</label>
<input class="input" name="reason" id="ob-reason" required placeholder="必填,将写入变更记录" />
</div>
</div>
<p class="hint" style="margin-top: 10px;">提交后进入复核,不能直接修改已确认期初</p>
<p class="hint" style="margin-top: 10px;">正数表示本方对对方为应收;提交后进入待确认,确认后才计入公司端余额</p>
<div class="modal-actions">
<button type="button" class="btn" data-close-opening>取消</button>
<button type="submit" class="btn btn-primary">提交复核</button>