ソースを参照

原型库初始化:包额(v11)/账单发往(v1)/机制示例/README收录清单

lio 3 ヶ月 前
コミット
b28ee24107

+ 43 - 0
README.md

@@ -0,0 +1,43 @@
+# 恒隆原型本地重构库
+
+> 对差劲的需求原型进行本地补充重构的存放库(技能 `reproto` 的产出物)。
+> 事实来源 = 已实现接口契约 / 代码实现;每个原型自带「ⓘ 逻辑标注」系统。
+
+## 目录约定(按系统导航业务域分层)
+
+```
+恒隆原型本地重构/
+├── 资源规划/      ├── 入住管理/
+├── 招商管理/      ├── 财务管理/      ← 包额.html
+├── 租控管理/      ├── 能源管理/
+├── 预定管理/      ├── 清洁维修管理/
+├── 合同管理/      ├── 财务中心/
+└── 系统工作台/
+```
+
+- 页面文件名 = 页面业务名(如 `包额.html`、`预收冲抵.html`),不带"原型/高保真"等后缀;
+- 布局机制类通用示例放 `_机制示例/`(如 `画布缩放并排布局.html`);
+- 新页面归属已有业务域;无对应域时先增目录再放文件。
+
+## 本地预览
+
+工作区 docs 下起静态服务后按相对路径访问,例如:
+
+```
+http://127.0.0.1:8765/恒隆原型本地重构/财务管理/包额.html
+```
+
+## 协作(git 化)
+
+本目录即 git 仓库(远程 `https://gitlab.wxapp.info/lio/hanglung.git`,默认分支 main):
+- 每次重构 = 一次完整提交(commit message 参照 `页面名: 改动摘要`);
+- 干活前先 `git pull --rebase`,完成后精确提交推送(不 `add -A`);
+- 更新感知:`git fetch` 后比对 `HEAD..origin/main`。
+
+
+## 收录清单
+
+| 业务域 | 页面 | 状态 | 关联 |
+|---|---|---|---|
+| 财务管理 | 包额 | v11 二期升级(任务11214:超额自动补收可视化——超额金额列四态/补收跳转三态/GG机制标注;归属口径=费项付款截止日方案A) | 联调文档: service-bill/docs/恒隆AMS-包额管理-PC网关接口联调文档.md |
+| 财务管理 | 账单发往 | v1(任务11214二期:生成时序插包额结算/GG补收行/状态机操作显隐/C·O分型标注;示例数据与包额原型跨页对齐) | 代码: service-bill BillSendRecordServiceImpl.generateBillSendRecord |

+ 98 - 0
_机制示例/画布缩放并排布局.html

@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+<meta charset="UTF-8">
+<title>布局机制示例 - 画布缩放+面板并排</title>
+<style>
+  * { margin:0; padding:0; box-sizing:border-box; }
+  html,body { height:100%; overflow:hidden; }              /* 关键1:视口即边界,任何溢出立刻暴露为裁切而非滚动 */
+  body { display:flex; font:13px/1.6 "Microsoft YaHei"; background:#334; }
+
+  /* ===== 左:画布容器(占剩余全部) ===== */
+  #wrap { flex:1; min-width:0; }                            /* 关键2:min-width:0 允许被面板挤压,不撑破body */
+
+  /* ===== 画布:固定设计宽1500,模拟真实原型(导航+宽表格) ===== */
+  #canvas { width:100%; background:#fff; min-height:100vh; display:flex; }
+  .nav { width:180px; background:#1f2d3d; color:#fff; padding:20px 12px; flex-shrink:0; }
+  .main { flex:1; min-width:0; padding:16px; overflow-x:auto; } /* 降级细节:JS失效时宽表卡内滚动,不伸进面板 */
+  .bar { display:flex; gap:8px; margin-bottom:12px; flex-wrap:wrap; }
+  .bar input,.bar select { height:30px; border:1px solid #ccc; border-radius:4px; padding:0 8px; }
+  table { width:100%; border-collapse:collapse; background:#fff; }
+  th,td { border:1px solid #e3e6eb; padding:8px 10px; white-space:nowrap; } /* 模拟15列nowrap宽表 */
+  th { background:#f5f7fa; }
+  .ctrl { position:fixed; left:12px; bottom:12px; z-index:99; }
+  .ctrl button { height:34px; padding:0 16px; font-size:14px; cursor:pointer; }
+  #state { position:fixed; left:12px; bottom:52px; z-index:99; background:#000a; color:#fff;
+           padding:6px 10px; border-radius:6px; font:12px/1.5 Consolas; }
+
+  /* ===== 右:标注面板(仅开启时占位) ===== */
+  #panel { display:none; width:300px; flex-shrink:0; background:#fffdf5; border-left:2px solid #f3ce84; padding:16px; }
+  body.notes #panel { display:block; }
+</style>
+</head>
+<body>
+  <div id="wrap">
+    <div id="canvas">
+      <div class="nav">画布示例<br>设计宽1500</div>
+      <div class="main">
+        <div class="bar">
+          <input style="width:220px" placeholder="信息检索">
+          <select><option>项目A</option></select><select><option>楼栋1</option></select>
+          <select><option>1层</option></select><select><option>单元101</option></select>
+          <select><option>2026-10</option></select>
+          <button style="height:30px">查询</button>
+        </div>
+        <table id="t"><thead><tr id="thr"></tr></thead><tbody id="tbr"></tbody></table>
+      </div>
+    </div>
+  </div>
+  <aside id="panel"><b>标注面板</b><p style="color:#888;margin-top:8px">宽300px,仅开启时显示;<br>与画布并排,互不覆盖。</p></aside>
+
+  <div id="state"></div>
+  <div class="ctrl"><button onclick="fit(true)">ⓘ 开/关 标注(并排缩放)</button>
+    <button onclick="crash()">模拟JS失败(降级)</button></div>
+
+<script>
+/* 造15列宽表 */
+var cols=["序号","客户名称","公司名称","合同编号","合同名称","项目","楼栋","楼层","单元","包额时间段","包含收费项","包额额度","金额","剩余金额","操作"];
+document.getElementById("thr").innerHTML=cols.map(c=>"<th>"+c+"</th>").join("");
+document.getElementById("tbr").innerHTML=[1,2,3,4,5].map(i=>cols.map((c,j)=>
+  "<td>"+(j===0?i:(j===13?Math.max(0,i*97-100):j===11?1300:j===12?i*97:j===9?"2026-10-01 ~ 10-31":j===10?"水费、电费":"示例"+j))+"</td>").join("")).map(r=>"<tr>"+r+"</tr>").join("");
+
+/* ===== 核心机制(仅此一处) =====
+   开:画布定宽1500 + zoom=可用宽/1500 (zoom是布局级缩放,占位同步,无transform的占位问题)
+   关:清除两者 → 画布回归流式100%
+   降级:若JS未执行,画布无定宽,流式收缩,表格容器内滚动(可读不裁死) */
+var CANVAS_W=1500, on=false;
+function fit(toggle){
+  if(toggle) on=!on;
+  document.body.classList.toggle("notes",on);
+  var c=document.getElementById("canvas");
+  if(!on){ c.style.zoom=""; c.style.width=""; }
+  else{
+    var wrap=document.getElementById("wrap");
+    c.style.width=CANVAS_W+"px";                        /* 先定宽 */
+    var z=Math.min(1, wrap.clientWidth/CANVAS_W);       /* 后取可用宽并zoom,原子写在同帧 */
+    c.style.zoom=z;
+  }
+  report();
+}
+function crash(){ /* 模拟JS失败:清掉zoom/width并保持面板开,验证降级=流式收缩不裁死 */
+  var c=document.getElementById("canvas"); c.style.zoom=""; c.style.width="";
+  on=false; document.body.classList.remove("notes");
+  var st=document.getElementById("state");
+  st.textContent="已降级:画布流式(可能压缩换行),无裁死无溢出"; setTimeout(report,50);
+}
+function report(){
+  var c=document.getElementById("canvas"), d=document.documentElement;
+  document.getElementById("state").textContent=
+    "zoom="+getComputedStyle(c).zoom+" 画布布局宽="+c.offsetWidth+
+    " 视觉宽="+Math.round(c.getBoundingClientRect().width)+
+    " | 页面滚动宽="+d.scrollWidth+" 视口="+d.clientWidth+
+    (d.scrollWidth<=d.clientWidth?" ✓零溢出":" ✗溢出!");
+}
+window.addEventListener("resize",function(){ if(on) fit(false); });
+report();
+</script>
+</body>
+</html>

ファイルの差分が大きいため隠しています
+ 206 - 0
财务管理/包额.html


+ 448 - 0
财务管理/账单发往.html

@@ -0,0 +1,448 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>账单发往 - 恒隆公寓AMS</title>
+<!-- ============================================================
+  账单发往(新版术语"账单") · 高保真原型(二期升级:生成时序插入包额结算)
+  事实来源:BillSendRecordServiceImpl.generateBillSendRecord 及 /v1/hl/bill-send-records/* 接口契约
+  二期变化(本原型核心):
+  1.[生成账单]动作内部插入包额结算:圈定前先算超额、生成公共事业管理费(GG)收费项
+  2.发往明细出现GG补收行(系统性费项,账期=生成日单日,强制挂包额费项所在发往组)
+  3.示例数据与包额管理原型跨页对齐(小米2026-09超额300的GG行在已发送记录可见)
+  口径红线:
+  1.圈定=付款截止日≤本月末(无下界)且未结清的历史滚动账单;C=本期,O=往期欠费
+  2.重新生成=删除本月未确认记录重建;GG同合同+同生成月幂等不重复
+  3.状态机:CG待确认→CF已确认→SD已发送;旁路ZF作废;操作按钮按状态显隐
+============================================================ -->
+<style>
+  * { margin:0; padding:0; box-sizing:border-box; }
+  html { overflow-x:hidden; }
+  body { font-family:"PingFang SC","Microsoft YaHei",sans-serif; font-size:13px; color:#333; background:#f0f2f5;
+         display:flex; counter-reset:note; }
+  #protoWrap { flex:1; min-width:0; overflow-x:auto; }
+  @media (max-width:1650px){ body:not(.show-notes) .c-mcode, body:not(.show-notes) .c-ctime,
+                             body:not(.show-notes) .c-unit { display:none; } }
+  @media (max-width:1400px){ body:not(.show-notes) .c-contractname, body:not(.show-notes) .c-pay { display:none; } }
+  .layout { display:flex; min-width:0; flex:1; }
+  .layout { display:flex; min-height:100vh; }
+  .nav { width:200px; background:#1f2d3d; color:#bfcbd9; flex-shrink:0; }
+  .nav .logo { height:56px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:15px; font-weight:600; letter-spacing:2px; background:#18222e; }
+  .nav .group { padding:12px 0; border-bottom:1px solid rgba(255,255,255,.06); }
+  .nav .group-title { padding:4px 20px; font-size:11px; color:#7f95ad; }
+  .nav .item { padding:10px 20px 10px 28px; cursor:pointer; }
+  .nav .item:hover { color:#fff; }
+  .nav .item.active { color:#fff; background:#2563eb; position:relative; }
+  .topbar { height:56px; background:#fff; border-bottom:1px solid #e4e7ed; display:flex; align-items:center; padding:0 24px; justify-content:space-between; flex:1; }
+  .breadcrumb { color:#909399; }
+  .breadcrumb b { color:#303133; font-weight:600; }
+  .user { display:flex; align-items:center; gap:10px; color:#606266; }
+  .avatar { width:30px; height:30px; border-radius:50%; background:#2563eb; color:#fff; display:flex; align-items:center; justify-content:center; font-size:12px; }
+  .main { flex:1; display:flex; flex-direction:column; }
+  .content { padding:20px 24px; flex:1; }
+  .card { background:#fff; border-radius:6px; padding:18px 20px; margin-bottom:16px; box-shadow:0 1px 3px rgba(0,0,0,.05); }
+  .query-row { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
+  .field { display:flex; align-items:center; gap:6px; }
+  .field label { color:#606266; white-space:nowrap; }
+  input[type=text], select { height:32px; border:1px solid #dcdfe6; border-radius:4px; padding:0 10px; color:#606266; outline:none; background:#fff; }
+  input[type=text] { width:220px; }
+  input[type=text]:focus, select:focus { border-color:#2563eb; }
+  .btn { height:32px; padding:0 18px; border:none; border-radius:4px; cursor:pointer; font-size:13px; }
+  .btn-primary { background:#2563eb; color:#fff; }
+  .btn-primary:hover { background:#1d4ed8; }
+  .btn-plain { background:#fff; color:#606266; border:1px solid #dcdfe6; }
+  .table-wrap { background:#fff; border-radius:6px; padding:0 0 12px; box-shadow:0 1px 3px rgba(0,0,0,.05); overflow-x:auto; }
+  .table-title { padding:16px 20px 12px; font-size:15px; font-weight:600; border-bottom:1px solid #ebeef5; display:flex; justify-content:space-between; align-items:center;}
+  .table-title .tip { font-size:12px; color:#909399; font-weight:400; }
+  table { width:100%; border-collapse:collapse; }
+  th { background:#f5f7fa; color:#606266; font-weight:600; padding:10px 8px; text-align:left; white-space:nowrap; border-bottom:1px solid #ebeef5; }
+  td { padding:11px 8px; border-bottom:1px solid #f2f4f7; white-space:nowrap; }
+  tr:hover td { background:#f8fafd; }
+  .num { text-align:right; font-variant-numeric:tabular-nums; }
+  th.num { text-align:right; }
+  .link { color:#2563eb; cursor:pointer; text-decoration:none; }
+  .link:hover { text-decoration:underline; }
+  .empty-cell { color:#c0c4cc; }
+  .tag { display:inline-block; padding:2px 8px; border-radius:3px; font-size:12px; }
+  .tag-blue { background:#eff6ff; color:#2563eb; }
+  .tag-orange { background:#fff7ed; color:#ea580c; }
+  .tag-green { background:#f0fdf4; color:#16a34a; }
+  .tag-red { background:#fef2f2; color:#dc2626; }
+  .tag-gray { background:#f4f4f5; color:#909399; }
+  .op-link { color:#2563eb; cursor:pointer; margin-right:10px; }
+  .op-link:hover { text-decoration:underline; }
+  .op-link.danger { color:#dc2626; }
+  .op-link.danger:hover { text-decoration:underline; }
+  .op-link.disabled { color:#c0c4cc; cursor:not-allowed; }
+  .op-link.disabled:hover { text-decoration:none; }
+  .op-link.disabled .hint { display:inline; }
+  .hint { display:none; font-size:11px; color:#c0c4cc; margin-left:4px; }
+  .gg-row td { background:#fffafa !important; }
+  .pager { display:flex; justify-content:flex-end; align-items:center; gap:8px; padding:12px 20px 0; color:#606266; }
+  .pager .pg { min-width:30px; height:30px; border:1px solid #dcdfe6; border-radius:4px; display:flex; align-items:center; justify-content:center; cursor:pointer; background:#fff; }
+  .pager .pg.cur { background:#2563eb; color:#fff; border-color:#2563eb; }
+  body:not(.show-notes) .note { display:none !important; }
+  body:not(.show-notes) #noteDrawer { display:none !important; }
+  .note { display:inline-flex; min-width:16px; height:16px; padding:0 3px; margin-left:4px; border-radius:8px;
+          background:#f59e0b; color:#fff; font-size:10px; font-style:normal; font-weight:700;
+          align-items:center; justify-content:center; cursor:pointer; position:relative; vertical-align:middle; flex-shrink:0;
+          counter-increment:note; transition:transform .12s; }
+  .note::before { content:counter(note); }
+  .note:hover { background:#d97706; transform:scale(1.15); }
+  .note.cur { background:#22c55e; box-shadow:0 0 0 3px rgba(34,197,94,.35); }
+  #noteLine { position:fixed; inset:0; z-index:1099; pointer-events:none; }
+  #noteDrawer { display:none; position:relative; z-index:1100; width:370px; height:100vh; flex-shrink:0;
+          background:#fffdf5; border-left:1px solid #f3ce84;
+          box-shadow:-8px 0 24px rgba(31,45,61,.14); flex-direction:column; }
+  #noteDrawer.show { display:flex; }
+  @media (max-width:1550px) { #noteDrawer { width:310px; } }
+  @media (max-width:1300px) { #noteDrawer { width:280px; } }
+  #noteDrawer .nd-head { padding:14px 18px; border-bottom:1px solid #f3ce84; display:flex;
+          align-items:center; justify-content:space-between; background:#fff7e8; }
+  #noteDrawer .nd-head b { font-size:14px; color:#1f2d3d; }
+  #noteDrawer .nd-pos { font-size:12px; color:#b45309; margin-left:8px; font-weight:400; }
+  #noteDrawer .nd-close { cursor:pointer; color:#909399; font-size:18px; padding:0 4px; }
+  #noteDrawer .nd-close:hover { color:#303133; }
+  #noteDrawer .nd-body { flex:1; overflow-y:auto; padding:16px 18px; font-size:12.5px; line-height:1.85; color:#4b5563; }
+  #noteDrawer .nd-foot { padding:12px 18px; border-top:1px solid #f3ce84; display:flex;
+          justify-content:space-between; align-items:center; background:#fff7e8; }
+  #noteDrawer .nd-foot .nav-btn { height:30px; padding:0 16px; border:1px solid #f3ce84; background:#fff;
+          color:#b45309; border-radius:4px; cursor:pointer; font-size:12.5px; }
+  #noteDrawer .nd-foot .nav-btn:hover { background:#fef3c7; }
+  #noteDrawer .nd-foot .nav-btn:disabled { color:#c0c4cc; cursor:not-allowed; background:#fafafa; }
+  #noteDrawer .np-t { font-size:13.5px; font-weight:700; color:#1f2d3d; padding-bottom:8px; margin-bottom:6px;
+          border-bottom:1px dashed #f3ce84; }
+  #noteDrawer .nd-body > div { margin-top:5px; }
+  #noteDrawer .np-k { color:#2563eb; font-weight:600; }
+  #noteDrawer .np-c { font-family:Consolas,"Courier New",monospace; color:#c2410c; background:#fdf2e9;
+          padding:1px 5px; border-radius:3px; font-size:12px; }
+  #noteDrawer .np-i { font-family:Consolas,"Courier New",monospace; color:#0e7490; font-size:12px; }
+  #noteDrawer .np-w { color:#d97706; font-weight:600; }
+  .btn-note { background:#fff7ed; color:#d97706; border:1px solid #fdba74; }
+  .btn-note.on { background:#f59e0b; color:#fff; border-color:#f59e0b; }
+  .empty { text-align:center; padding:60px 0; color:#909399; }
+  .empty .box { font-size:40px; margin-bottom:12px; }
+  .mask { display:none; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:100; align-items:flex-start; justify-content:center; overflow:auto; padding:40px 0; }
+  .mask.show { display:flex; }
+  .dialog { width:960px; max-width:100%; background:#fff; border-radius:8px; box-shadow:0 8px 30px rgba(0,0,0,.18); }
+  .dialog-head { padding:16px 24px; border-bottom:1px solid #ebeef5; display:flex; justify-content:space-between; align-items:center; }
+  .dialog-head b { font-size:15px; }
+  .close { cursor:pointer; color:#909399; font-size:18px; }
+  .summary { display:flex; padding:16px 24px; gap:0; border-bottom:1px solid #ebeef5; background:#fafbfc; flex-wrap:wrap; }
+  .summary .cell { flex:1; min-width:110px; padding:4px 12px; border-left:1px dashed #e4e7ed; }
+  .summary .cell:first-child { border-left:none; padding-left:0; }
+  .summary .k { color:#909399; font-size:12px; margin-bottom:4px; }
+  .summary .v { font-weight:600; font-size:13px; }
+  .dialog-body { padding:16px 24px 4px; overflow-x:auto; }
+  .dialog-body h4 { font-size:13px; color:#606266; margin-bottom:10px; font-weight:600; }
+  .dialog-foot { padding:14px 24px 18px; display:flex; justify-content:space-between; align-items:center; }
+  .totals { display:flex; gap:0; flex:1; }
+  .totals .t { flex:1; border-left:1px dashed #e4e7ed; padding:2px 14px; }
+  .totals .t:first-child { border-left:none; padding-left:0; }
+  .totals .k { font-size:12px; color:#909399; margin-bottom:2px; }
+  .totals .v { font-size:16px; font-weight:700; font-variant-numeric:tabular-nums; }
+  .dialog-btns { display:flex; gap:10px; }
+</style>
+</head>
+<body>
+<div id="protoWrap">
+<div class="layout">
+  <div class="nav">
+    <div class="logo">恒隆公寓AMS</div>
+    <div class="group"><div class="group-title">业务工作台</div>
+      <div class="item">招商管理</div><div class="item">租控管理</div>
+      <div class="item">预定管理</div><div class="item">合同管理</div><div class="item">入住管理</div>
+    </div>
+    <div class="group"><div class="group-title">财务管理</div>
+      <div class="item">预存管理</div><div class="item">保函管理</div><div class="item">预授权管理</div>
+      <div class="item">收费项管理</div><div class="item active">账单发往</div><div class="item">账单催缴</div>
+      <div class="item">减免管理</div><div class="item">包额管理</div>
+    </div>
+    <div class="group"><div class="group-title">财务中心</div>
+      <div class="item">收支流水</div><div class="item">收入确认</div><div class="item">账单管理</div>
+    </div>
+  </div>
+  <div class="main">
+    <div class="topbar">
+      <div class="breadcrumb">财务管理 / <b>账单发往</b><span style="margin-left:8px;font-size:12px;color:#b45309">(新版术语:账单)</span></div>
+      <div class="user"><div class="avatar">管</div>系统管理员</div>
+    </div>
+    <div class="content">
+
+      <!-- 查询区 -->
+      <div class="card">
+        <div class="query-row">
+          <div class="field"><label>信息检索<i class="note" data-tip="信息检索\n接口:keyword(模糊匹配)\n范围:客户名称/合同编号/发往单号"></i></label><input type="text" id="kw" placeholder="客户名称 / 合同编号 / 发往单号"></div>
+          <div class="field"><label>月份<i class="note" data-tip="月份条件\n接口:month_period,格式 yyyy-MM\n语义:记录的生成月(生成动作发生的自然月),非账期月"></i></label><select id="qMonth"><option value="">年月</option><option>2026-10</option><option>2026-09</option></select></div>
+          <div class="field"><label>状态<i class="note" data-tip="状态条件\n接口:state\n枚举:CG待确认 / CF已确认 / SD已发送 / ZF作废"></i></label><select id="qState"><option value="">全部</option><option value="CG">待确认</option><option value="CF">已确认</option><option value="SD">已发送</option><option value="ZF">作废</option></select></div>
+          <button class="btn btn-primary" onclick="render()">查询</button>
+          <button class="btn btn-plain" onclick="resetQuery()">重置</button>
+        </div>
+      </div>
+
+      <!-- 列表 -->
+      <div class="table-wrap">
+        <div class="table-title">账单发往记录<span class="tip">按月生成 · 按合同发往组打包 · 确认后发送</span>
+          <span style="display:flex;gap:8px;align-items:center">
+            <button class="btn btn-primary" onclick="alert('触发生成,见标注①时序')">生成账单发送记录<i class="note" data-tip="★生成动作 · 二期完整时序(自内向外)\n1.清理:删除本月(month_period)生成的未确认记录(重新生成语义,已确认/已发送的保留)\n2.【二期·包额结算】:逐合同圈定本期收费项(C型)∩包额费项清单→Σ应收−包额额度→超额>0生成一条公共事业管理费(GG)收费项账单(账期=生成日当天,三件套齐全,同合同+同生成月幂等)\n3.圈定账单:valid=Y 且 付款截止日≤本月末 且 支付状态∈{WP未付,PPE部分支付}\n【口径】截止日条件无下界=历史滚动欠费全部纳入;已结清(APE)不圈\n4.防重:排除本月已生成过发往明细的账单\n5.分组:按合同发送配置(sendConfig)的费项清单匹配入组;GG强制挂包额费项所在发往组(存量合同免配置兜底)\n6.落库:每组一条发往记录(状态CG)+明细行(C本期/O往期分型)\n触发:手动点击(租户级批处理,无单合同粒度)"></i></button>
+            <button class="btn btn-note" id="noteBtn" onclick="toggleNotes()">ⓘ 逻辑标注</button>
+          </span>
+        </div>
+        <table>
+          <thead><tr>
+            <th>序号</th><th>发往单号<i class="note" data-tip="发往单号\n字段:no\n规则:日期流水号(生成时分配,重新生成会换号)"></i></th><th>月份<i class="note" data-tip="生成月\n字段:month_period = 生成动作发生的自然月(yyyy-MM)\n【注意】是生成月,不是账期月;同月可反复生成(删未确认重建)"></i></th><th>客户名称<i class="note" data-tip="客户名称\n字段:customer_name(取该组第一条账单的合同客户)"></i></th><th class="c-mcode">合同编号<i class="note" data-tip="合同编号\n字段:contract_mcode"></i></th><th class="c-contractname">合同名称</th><th>项目</th><th class="c-unit">单元</th><th>发往组<i class="note" data-tip="发往组\n字段:send_config_name\n来源:合同发送配置(组名+费项清单+邮箱/地址),一个合同可配多组\n分组:费项按费项配置id精确匹配进组(isContainExpense)\n【GG兜底】公共事业管理费强制挂包额费项所在组,不依赖配置"></i></th>
+            <th>包含收费项<i class="note" data-tip="包含收费项\n字段:expense_names\n内容:该组明细内费项 distinct 名称\n【GG】补收的公共事业管理费会出现在此(其账期为生成日单日)"></i></th><th class="num">应收金额(元)<i class="note note-r" data-tip="应收金额\n字段:amount_receive = 组内明细应收合计\n口径:C本期+O往期欠费全量(未结清的滚动累计)"></i></th><th class="num c-pay">已收金额(元)</th><th class="num">剩余金额(元)<i class="note note-r" data-tip="剩余金额\n公式:rest_amount = 应收 − 已收"></i></th><th>状态<i class="note" data-tip="状态机\nCG待确认(生成初态,蓝)→CF已确认(绿)→SD已发送(灰蓝)\n旁路:ZF作废(灰)\n流转接口:_confirm确认 / _send发送 / _cancel作废"></i></th><th class="c-ctime">创建时间<i class="note" data-tip="创建时间\n字段:create_time(生成时)\n另有:confirm_time确认时间 / send_time发送时间(状态推进时回填)"></i></th><th style="width:190px">操作<i class="note note-r" data-tip="操作按钮按状态显隐\nCG待确认:查看明细 / 确认 / 作废\nCF已确认:查看明细 / 发送 / 作废\nSD已发送:查看明细\nZF作废:查看明细\n【说明】发送走通知渠道(邮箱/地址取发往组配置)"></i></th>
+          </tr></thead>
+          <tbody id="tbody"></tbody>
+        </table>
+        <div class="empty" id="emptyBox" style="display:none"><div class="box">📄</div>暂无发往记录<br><span style="font-size:12px">点击右上角[生成账单发送记录]按月生成</span></div>
+        <div class="pager" id="pager"></div>
+      </div>
+
+    </div>
+  </div>
+</div>
+</div><!-- /protoWrap -->
+
+<!-- 明细弹窗 -->
+<div class="mask" id="dlg">
+  <div class="dialog">
+    <div class="dialog-head"><b id="dlgTitle">发往明细</b><span style="display:flex;align-items:center;gap:10px"><i class="note" data-tip="弹窗数据来源\n接口:GET /v1/hl/bill-send-record-detail?record_id={行id}\n结构:记录头(状态/组/金额) + 明细行列表"></i><span class="close" onclick="closeDlg()">✕</span></span></div>
+    <div class="summary" id="dlgSummary"></div>
+    <div class="dialog-body">
+      <h4>收费项明细 <span style="font-weight:400;color:#909399;font-size:12px">(C=本期收费项 · O=往期欠费 · 补收=公共事业管理费超额补收)</span><i class="note" data-tip="明细行类型(C/O分型)\nC本期:费项付款截止日 ≥ 生成月1号(当月到期)\nO往期:费项付款截止日 < 生成月1号(历史到期未付,滚动催收直到付清)\n补收(GG):包额超额时系统在生成时点动态生成,账期=生成日单日,恒为C型\n【红线】只有C型参与包额超额计算,O型不重复计入"></i></h4>
+      <table>
+        <thead><tr><th>收费项名称</th><th>类型<i class="note" data-tip="类型标签\nC(绿)/O(橙)/补收(红)\n补收行=公共事业管理费,底色浅红高亮"></i></th><th>账单编号<i class="note" data-tip="账单编号\n字段:bill_no\n动作:可跳原账单(新版术语'收费项')详情"></i></th><th class="num">应收(元)</th><th class="num">已收(元)</th><th class="num">剩余(元)</th><th>账期<i class="note" data-tip="费项账期\n字段:bill_begin_date ~ bill_end_date\n【GG特征】补收行账期=生成日当天(单日),一眼可辨"></i></th></tr></thead>
+        <tbody id="dlgBody"></tbody>
+      </table>
+    </div>
+    <div class="dialog-foot">
+      <div class="totals" id="dlgTotals"></div>
+      <div class="dialog-btns">
+        <button class="btn btn-plain" onclick="alert('发送至发往组配置的邮箱/地址')">发送通知</button>
+        <button class="btn btn-primary" onclick="closeDlg()">关 闭</button>
+      </div>
+    </div>
+  </div>
+</div>
+
+<script>
+/* ===== 示例数据(自洽:应收=明细求和;剩余=应收−已收;与包额管理原型跨页对齐) =====
+   小米2026-09:包额超额300→GG 300行(对应包额页"已补收"态)
+   卓悦2026-10:包额超额180但发往未生成→本列表不出现(点生成时才会出现并补GG) */
+const DATA = [
+  { no:1, sendNo:"ZD20261020-001", month:"2026-10", customer:"德润实业发展有限公司", mcode:"HTBH00004", contractName:"德润实业租赁合同",
+    project:"恒隆一期", unit:"恒隆一期-1-301", group:"物业联系组", expenseNames:"水费、电费、公共事业管理费", amountReceive:1300, amountPayed:0, state:"CG", ctime:"2026-10-20 10:00:00",
+    items:[
+      { name:"水费",           type:"C",  billNo:"ZD20261000012", amount:600,   payed:0, period:"2026-10-01 至 2026-10-31" },
+      { name:"电费",           type:"C",  billNo:"ZD20261000013", amount:450,   payed:0, period:"2026-10-01 至 2026-10-31" },
+      { name:"公共事业管理费", type:"GG", billNo:"ZD20261020001", amount:250,   payed:0, period:"2026-10-20 至 2026-10-20" }
+    ] },
+  { no:2, sendNo:"ZD20261020-002", month:"2026-10", customer:"小米科技有限公司", mcode:"HTBH00001", contractName:"恒隆租赁合同",
+    project:"恒隆一期", unit:"恒隆一期-1-107", group:"租户联系组", expenseNames:"水费、电费、煤气费", amountReceive:250, amountPayed:0, state:"CG", ctime:"2026-10-20 10:00:00",
+    items:[
+      { name:"水费",  type:"C", billNo:"ZD20261000001", amount:120, payed:0, period:"2026-10-01 至 2026-10-31" },
+      { name:"电费",  type:"C", billNo:"ZD20261000002", amount:80,  payed:0, period:"2026-10-01 至 2026-10-31" },
+      { name:"煤气费",type:"C", billNo:"ZD20261000003", amount:50,  payed:0, period:"2026-10-01 至 2026-10-31" }
+    ] },
+  { no:3, sendNo:"ZD20261020-003", month:"2026-10", customer:"星辰贸易(上海)有限公司", mcode:"HTBH00002", contractName:"星辰贸易租赁合同",
+    project:"恒隆二期", unit:"恒隆二期-2-205", group:"物业联系组", expenseNames:"水费", amountReceive:260, amountPayed:0, state:"CF", ctime:"2026-10-20 10:00:00",
+    items:[
+      { name:"水费", type:"C", billNo:"ZD20261000021", amount:260, payed:0, period:"2026-10-01 至 2026-10-31" }
+    ] },
+  { no:4, sendNo:"ZD20260920-001", month:"2026-09", customer:"小米科技有限公司", mcode:"HTBH00001", contractName:"恒隆租赁合同",
+    project:"恒隆一期", unit:"恒隆一期-1-107", group:"租户联系组", expenseNames:"水费、电费、公共事业管理费", amountReceive:1100, amountPayed:800, state:"SD", ctime:"2026-09-20 10:00:00",
+    items:[
+      { name:"水费",           type:"C",  billNo:"ZD20260900001", amount:530, payed:530, period:"2026-09-01 至 2026-09-30" },
+      { name:"电费",           type:"C",  billNo:"ZD20260900002", amount:270, payed:270, period:"2026-08-15 至 2026-09-14" },
+      { name:"公共事业管理费", type:"GG", billNo:"ZD20260920001", amount:300, payed:0,   period:"2026-09-20 至 2026-09-20" }
+    ] },
+  { no:5, sendNo:"ZD20260920-002", month:"2026-09", customer:"星辰贸易(上海)有限公司", mcode:"HTBH00002", contractName:"星辰贸易租赁合同",
+    project:"恒隆二期", unit:"恒隆二期-2-205", group:"物业联系组", expenseNames:"水费", amountReceive:240, amountPayed:0, state:"ZF", ctime:"2026-09-20 10:00:00",
+    items:[
+      { name:"水费", type:"C", billNo:"ZD20260900021", amount:240, payed:0, period:"2026-09-01 至 2026-09-30" }
+    ] }
+];
+const STATE = { CG:["待确认","tag-blue"], CF:["已确认","tag-green"], SD:["已发送","tag-gray"], ZF:["作废","tag-gray"] };
+const TYPE  = { C:["本期","tag-green"], O:["往期欠费","tag-orange"], GG:["补收","tag-red"] };
+const fmt = n => n == null ? "-" : n.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2});
+
+function rows(){
+  const kw=(document.getElementById("kw").value||"").trim();
+  const m=document.getElementById("qMonth").value, s=document.getElementById("qState").value;
+  return DATA.filter(r=>{
+    if(m && r.month!==m) return false;
+    if(s && r.state!==s) return false;
+    if(!kw) return true;
+    return [r.customer,r.mcode,r.sendNo,r.contractName].some(x=>x&&x.includes(kw));
+  });
+}
+function render(){
+  const list=rows(), tb=document.getElementById("tbody"), empty=document.getElementById("emptyBox");
+  tb.innerHTML=""; empty.style.display=list.length?"none":"block";
+  list.forEach(r=>{
+    const st=STATE[r.state], rest=r.amountReceive-r.amountPayed;
+    let ops = `<span class="op-link" onclick='openDlg(${JSON.stringify(r.no)})'>查看明细</span>`;
+    if(r.state==="CG") ops += `<span class="op-link" onclick="alert('确认:CG→CF')">确认</span><span class="op-link danger" onclick="alert('作废')">作废</span>`;
+    if(r.state==="CF") ops += `<span class="op-link" onclick="alert('发送:→SD,通知至发往组邮箱/地址')">发送</span><span class="op-link danger" onclick="alert('作废')">作废</span>`;
+    const tr=document.createElement("tr");
+    tr.innerHTML = `
+      <td>${r.no}</td>
+      <td><a class="link" onclick='openDlg(${JSON.stringify(r.no)})'>${r.sendNo}</a></td>
+      <td>${r.month}</td>
+      <td>${r.customer}</td>
+      <td class="c-mcode">${r.mcode}</td>
+      <td class="c-contractname">${r.contractName}</td>
+      <td>${r.project}</td><td class="c-unit">${r.unit}</td>
+      <td>${r.group}</td>
+      <td title="${r.expenseNames}">${r.expenseNames.length>18?r.expenseNames.slice(0,18)+'…':r.expenseNames}</td>
+      <td class="num">${fmt(r.amountReceive)}</td>
+      <td class="num c-pay">${fmt(r.amountPayed)}</td>
+      <td class="num">${fmt(rest)}</td>
+      <td><span class="tag ${st[1]}">${st[0]}</span></td>
+      <td class="c-ctime">${r.ctime}</td>
+      <td>${ops}</td>`;
+    tb.appendChild(tr);
+  });
+  const pg=document.getElementById("pager");
+  pg.innerHTML = `<span>共 ${list.length} 条</span><div class="pg">‹</div><div class="pg cur">1</div><div class="pg">›</div>`;
+}
+function resetQuery(){ ["kw","qMonth","qState"].forEach(i=>document.getElementById(i).value=""); render(); }
+function openDlg(no){
+  const r=DATA.find(x=>x.no===no), st=STATE[r.state];
+  const receive=r.items.reduce((s,i)=>s+i.amount,0), payed=r.items.reduce((s,i)=>s+i.payed,0);
+  document.getElementById("dlgTitle").textContent=`发往明细 - ${r.sendNo}`;
+  document.getElementById("dlgSummary").innerHTML = `
+    <div class="cell"><div class="k">客户名称</div><div class="v">${r.customer}</div></div>
+    <div class="cell"><div class="k">合同编号</div><div class="v">${r.mcode}</div></div>
+    <div class="cell"><div class="k">发往组</div><div class="v">${r.group}</div></div>
+    <div class="cell"><div class="k">生成月</div><div class="v">${r.month}</div></div>
+    <div class="cell"><div class="k">状态</div><div class="v"><span class="tag ${st[1]}">${st[0]}</span></div></div>`;
+  document.getElementById("dlgBody").innerHTML = r.items.map(i=>{
+    const t=TYPE[i.type];
+    return `<tr class="${i.type==='GG'?'gg-row':''}"><td>${i.name}</td>
+      <td><span class="tag ${t[1]}">${t[0]}</span></td>
+      <td><a class="link" onclick="alert('跳转:原账单详情 ${i.billNo}')">${i.billNo}</a></td>
+      <td class="num">${fmt(i.amount)}</td><td class="num">${fmt(i.payed)}</td><td class="num">${fmt(i.amount-i.payed)}</td>
+      <td>${i.period}</td></tr>`;
+  }).join("");
+  document.getElementById("dlgTotals").innerHTML = `
+    <div class="t"><div class="k">应收合计<i class="note" data-tip="应收合计\n公式:amount_receive = Σ 明细行应收\n口径:C+O+GG 全量"></i></div><div class="v">${fmt(receive)}</div></div>
+    <div class="t"><div class="k">已收合计</div><div class="v">${fmt(payed)}</div></div>
+    <div class="t"><div class="k">剩余合计<i class="note" data-tip="剩余合计\n公式:rest_amount = 应收 − 已收"></i></div><div class="v">${fmt(receive-payed)}</div></div>
+    <div class="t"><div class="k">其中补收(GG)<i class="note" data-tip="GG补收小计\n公式:Σ type=GG 明细行应收\n来源:包额超额自动生成,金额=超额值\n【幂等】同合同+同生成月只生成一次\n【例】本单300元=包额管理页2026-09超额金额(跨页对齐)"></i></div><div class="v" style="color:#dc2626">${fmt(r.items.filter(i=>i.type==='GG').reduce((s,i)=>s+i.amount,0))}</div></div>`;
+  document.getElementById("dlg").classList.add("show");
+}
+function closeDlg(){ document.getElementById("dlg").classList.remove("show"); }
+function toggleNotes(){
+  document.body.classList.toggle("show-notes");
+  document.getElementById("noteBtn").classList.toggle("on");
+  if(!document.body.classList.contains("show-notes") && window.closeNotes) window.closeNotes();
+  if(document.body.classList.contains("show-notes") && window.openNotes) window.openNotes();
+  fitLayout();
+}
+function fitLayout(){
+  var layout=document.querySelector(".layout");
+  if(!document.body.classList.contains("show-notes")){ layout.style.zoom=""; layout.style.width=""; return; }
+  var wrap=document.getElementById("protoWrap");
+  var scale=Math.max(0.62, Math.min(1,(wrap.clientWidth-2)/1500));
+  layout.style.width="1500px";
+  layout.style.zoom=scale;
+}
+(function(){
+  const drawer = document.createElement("div"); drawer.id="noteDrawer";
+  drawer.innerHTML = `
+    <div class="nd-head"><span><b>逻辑标注</b><span class="nd-pos" id="ndPos"></span></span>
+      <span class="nd-close" onclick="closeNotes()">✕</span></div>
+    <div class="nd-body" id="ndBody"></div>
+    <div class="nd-foot"><button class="nav-btn" id="ndPrev">‹ 上一条</button>
+      <span style="font-size:12px;color:#b45309" id="ndStep"></span>
+      <button class="nav-btn" id="ndNext">下一条 ›</button></div>`;
+  document.body.appendChild(drawer);
+  const svg = document.createElementNS("http://www.w3.org/2000/svg","svg");
+  svg.id="noteLine"; document.body.appendChild(svg);
+  function drawLine(n){
+    svg.innerHTML="";
+    if(!n) return;
+    const r = n.getBoundingClientRect(), d = drawer.getBoundingClientRect();
+    const x1 = r.right + 3, y1 = r.top + r.height/2;
+    const x2 = d.left - 3, y2 = Math.max(d.top + 50, Math.min(y1, d.bottom - 50));
+    svg.innerHTML = `<path d="M ${x1} ${y1} C ${x1+50} ${y1}, ${x2-50} ${y2}, ${x2} ${y2}" fill="none"
+        stroke="#f59e0b" stroke-width="1.5" stroke-dasharray="5 3"/>
+      <circle cx="${x1}" cy="${y1}" r="3" fill="#16a34a"/>
+      <circle cx="${x2}" cy="${y2}" r="3.5" fill="#f59e0b"/>`;
+  }
+  window.closeNotes = function(){
+    drawer.classList.remove("show");
+    curNote().classList.remove("cur");
+    drawLine(null);
+    document.body.classList.remove("show-notes");
+    var btn=document.getElementById("noteBtn"); if(btn) btn.classList.remove("on");
+    if(window.fitLayout) fitLayout();
+  };
+  window.openNotes = function(){ collect(); if(notes.length) show(0); };
+  window.addEventListener("resize", ()=>{ if(drawer.classList.contains("show")) drawLine(notes[idx]); });
+  function fmt(text){
+    const lines = (text||"").replace(/\\n/g,"\n").split("\n");
+    const esc = t => t.replace(/&/g,"&amp;").replace(/</g,"&lt;");
+    const rich = t => t.split(/([A-Za-z][A-Za-z0-9_.\/={}\-]*)/g)
+                       .map((p,i)=> i%2===1 ? `<span class="np-i">${p}</span>` : esc(p)).join("");
+    let html = "";
+    lines.forEach((line,i)=>{
+      const s = line;
+      if(i===0 && s.trim()){ html += `<div class="np-t">${esc(s)}</div>`; return; }
+      if(!s.trim()){ return; }
+      let body;
+      const m = s.match(/^([^::=]{2,14})([::])([\s\S]*)$/);
+      if(m){
+        const val = m[3];
+        body = `<span class="np-k">${esc(m[1])}${m[2]}</span>` +
+               (/[=Σ]|max\(/.test(val) ? `<span class="np-c">${esc(val)}</span>` : rich(val));
+      } else if(/[=Σ]|max\(/.test(s)){
+        body = `<span class="np-c">${esc(s)}</span>`;
+      } else {
+        body = rich(s);
+      }
+      body = body.replace(/【(.+?)】/g,'<span class="np-w">【$1】</span>');
+      html += `<div>${body}</div>`;
+    });
+    return html;
+  }
+  let notes = [], idx = -1;
+  const collect = () => { notes = Array.prototype.slice.call(document.querySelectorAll(".note")); return notes; };
+  function curNote(){ return notes[idx] || document.createElement("span"); }
+  function show(i){
+    const c = curNote(); c.classList && c.classList.remove("cur");
+    idx = i;
+    const n = notes[i];
+    document.getElementById("ndBody").innerHTML = fmt(n.dataset.tip);
+    document.getElementById("ndPos").textContent = "";
+    document.getElementById("ndStep").textContent = (i+1) + " / " + notes.length;
+    document.getElementById("ndPrev").disabled = (i<=0);
+    document.getElementById("ndNext").disabled = (i>=notes.length-1);
+    n.classList.add("cur");
+    n.scrollIntoView({block:"nearest", behavior:"smooth"});
+    drawer.classList.add("show");
+    drawLine(n);
+  }
+  document.addEventListener("click",e=>{
+    if(!document.body.classList.contains("show-notes")) return;
+    const n = e.target.closest(".note");
+    if(n){ e.stopPropagation(); collect(); show(notes.indexOf(n)); return; }
+  });
+  document.getElementById("ndPrev").onclick = ()=>{ if(idx>0) show(idx-1); };
+  document.getElementById("ndNext").onclick = ()=>{ if(idx<notes.length-1) show(idx+1); };
+  document.addEventListener("keydown",e=>{
+    if(!drawer.classList.contains("show")) return;
+    if(e.key==="Escape") closeNotes();
+    if(e.key==="ArrowLeft" && idx>0) show(idx-1);
+    if(e.key==="ArrowRight" && idx<notes.length-1) show(idx+1);
+  });
+})();
+document.getElementById("kw").addEventListener("keydown",e=>{ if(e.key==="Enter") render(); });
+window.addEventListener("resize", fitLayout);
+render();
+</script>
+</body>
+</html>

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません