2026-10-08-freight-link-existing-demo.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1" />
  6. <title>配置运费 · 关联已有 — 列表展示方案 Demo</title>
  7. <link rel="preconnect" href="https://fonts.googleapis.com" />
  8. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
  9. <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
  10. <style>
  11. :root {
  12. --primary: #10b981;
  13. --primary-dark: #059669;
  14. --primary-bg: #ecfdf5;
  15. --bg-page: #f8fafc;
  16. --panel: #ffffff;
  17. --text: #0f172a;
  18. --text-secondary: #334155;
  19. --text-muted: #64748b;
  20. --border: #e2e8f0;
  21. --radius: 10px;
  22. --radius-sm: 8px;
  23. --warning: #d97706;
  24. --warning-bg: #fffbeb;
  25. }
  26. * { box-sizing: border-box; }
  27. body {
  28. margin: 0;
  29. font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  30. font-size: 14px;
  31. line-height: 1.5;
  32. color: var(--text);
  33. background: var(--bg-page);
  34. }
  35. .page {
  36. max-width: 1100px;
  37. margin: 0 auto;
  38. padding: 28px 24px 64px;
  39. }
  40. .hero {
  41. margin-bottom: 28px;
  42. }
  43. .hero h1 {
  44. margin: 0 0 8px;
  45. font-size: 22px;
  46. font-weight: 700;
  47. letter-spacing: -0.02em;
  48. }
  49. .hero h1::before {
  50. content: "";
  51. display: inline-block;
  52. width: 4px;
  53. height: 1.1em;
  54. margin-right: 10px;
  55. vertical-align: -0.15em;
  56. border-radius: 2px;
  57. background: var(--primary);
  58. }
  59. .hero p {
  60. margin: 0;
  61. color: var(--text-muted);
  62. max-width: 720px;
  63. }
  64. .context-bar {
  65. display: flex;
  66. flex-wrap: wrap;
  67. gap: 8px;
  68. margin: 16px 0 0;
  69. }
  70. .pill {
  71. display: inline-flex;
  72. align-items: center;
  73. gap: 6px;
  74. padding: 4px 10px;
  75. border-radius: 999px;
  76. font-size: 12px;
  77. background: var(--primary-bg);
  78. color: var(--primary-dark);
  79. border: 1px solid #a7f3d0;
  80. }
  81. .pill.muted {
  82. background: #f1f5f9;
  83. color: var(--text-muted);
  84. border-color: var(--border);
  85. }
  86. .section {
  87. background: var(--panel);
  88. border: 1px solid var(--border);
  89. border-radius: var(--radius);
  90. padding: 20px 20px 16px;
  91. margin-bottom: 20px;
  92. box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  93. }
  94. .section-head {
  95. display: flex;
  96. align-items: flex-start;
  97. justify-content: space-between;
  98. gap: 12px;
  99. margin-bottom: 14px;
  100. }
  101. .section-head h2 {
  102. margin: 0;
  103. font-size: 16px;
  104. font-weight: 600;
  105. }
  106. .section-head .desc {
  107. margin: 4px 0 0;
  108. font-size: 13px;
  109. color: var(--text-muted);
  110. }
  111. .badge {
  112. flex-shrink: 0;
  113. padding: 2px 8px;
  114. border-radius: 6px;
  115. font-size: 11px;
  116. font-weight: 600;
  117. letter-spacing: 0.02em;
  118. }
  119. .badge.now {
  120. background: #f1f5f9;
  121. color: var(--text-muted);
  122. }
  123. .badge.rec {
  124. background: var(--primary-bg);
  125. color: var(--primary-dark);
  126. border: 1px solid #a7f3d0;
  127. }
  128. .badge.alt {
  129. background: var(--warning-bg);
  130. color: var(--warning);
  131. border: 1px solid #fde68a;
  132. }
  133. /* Dialog chrome */
  134. .dialog {
  135. border: 1px solid var(--border);
  136. border-radius: var(--radius);
  137. overflow: hidden;
  138. background: #fff;
  139. }
  140. .dialog-hd {
  141. display: flex;
  142. align-items: center;
  143. justify-content: space-between;
  144. padding: 14px 18px;
  145. border-bottom: 1px solid var(--border);
  146. font-weight: 600;
  147. font-size: 15px;
  148. }
  149. .dialog-hd .x {
  150. color: var(--text-muted);
  151. font-weight: 400;
  152. cursor: default;
  153. }
  154. .dialog-bd { padding: 14px 18px 8px; }
  155. .hint {
  156. margin: 0 0 12px;
  157. font-size: 13px;
  158. color: var(--text-muted);
  159. }
  160. .tabs {
  161. display: inline-flex;
  162. border: 1px solid var(--border);
  163. border-radius: var(--radius-sm);
  164. overflow: hidden;
  165. margin-bottom: 12px;
  166. }
  167. .tab {
  168. padding: 7px 16px;
  169. font-size: 13px;
  170. color: var(--text-secondary);
  171. background: #fff;
  172. border-right: 1px solid var(--border);
  173. }
  174. .tab:last-child { border-right: none; }
  175. .tab.active {
  176. background: var(--primary);
  177. color: #fff;
  178. font-weight: 600;
  179. }
  180. .dialog-ft {
  181. display: flex;
  182. justify-content: flex-end;
  183. gap: 8px;
  184. padding: 12px 18px;
  185. border-top: 1px solid var(--border);
  186. background: #fafbfc;
  187. }
  188. .btn {
  189. display: inline-flex;
  190. align-items: center;
  191. gap: 6px;
  192. height: 36px;
  193. padding: 0 14px;
  194. border-radius: var(--radius-sm);
  195. font-size: 13px;
  196. font-weight: 500;
  197. border: 1px solid var(--border);
  198. background: #fff;
  199. color: var(--text-secondary);
  200. cursor: default;
  201. }
  202. .btn.main {
  203. background: var(--primary);
  204. border-color: var(--primary);
  205. color: #fff;
  206. }
  207. /* Tables */
  208. table.list {
  209. width: 100%;
  210. border-collapse: collapse;
  211. font-size: 13px;
  212. }
  213. table.list th,
  214. table.list td {
  215. padding: 10px 12px;
  216. border-bottom: 1px solid var(--border);
  217. text-align: left;
  218. vertical-align: middle;
  219. }
  220. table.list th {
  221. font-size: 12px;
  222. font-weight: 600;
  223. color: var(--text-muted);
  224. background: #f8fafc;
  225. white-space: nowrap;
  226. }
  227. table.list tr:nth-child(even) td { background: #fafbfc; }
  228. table.list tr.selected td {
  229. background: var(--primary-bg) !important;
  230. outline: none;
  231. }
  232. table.list tr.selected {
  233. box-shadow: inset 3px 0 0 var(--primary);
  234. }
  235. table.list td.right { text-align: right; }
  236. table.list td.center { text-align: center; }
  237. .muted { color: var(--text-muted); }
  238. .tag {
  239. display: inline-flex;
  240. align-items: center;
  241. padding: 1px 8px;
  242. border-radius: 4px;
  243. font-size: 12px;
  244. font-weight: 500;
  245. line-height: 1.6;
  246. border: 1px solid transparent;
  247. }
  248. .tag.primary {
  249. background: var(--primary-bg);
  250. color: var(--primary-dark);
  251. border-color: #a7f3d0;
  252. }
  253. .tag.success {
  254. background: #ecfdf5;
  255. color: #047857;
  256. border-color: #a7f3d0;
  257. }
  258. .tag.warning {
  259. background: #fffbeb;
  260. color: #b45309;
  261. border-color: #fde68a;
  262. }
  263. .tag.muted {
  264. background: #f1f5f9;
  265. color: var(--text-muted);
  266. border-color: var(--border);
  267. }
  268. .chips {
  269. display: flex;
  270. flex-wrap: wrap;
  271. gap: 4px;
  272. max-width: 280px;
  273. }
  274. .chip {
  275. display: inline-block;
  276. max-width: 100%;
  277. padding: 1px 7px;
  278. border-radius: 4px;
  279. font-size: 11px;
  280. background: #f1f5f9;
  281. color: var(--text-secondary);
  282. border: 1px solid var(--border);
  283. white-space: nowrap;
  284. overflow: hidden;
  285. text-overflow: ellipsis;
  286. }
  287. .chip.more {
  288. background: #fff;
  289. color: var(--text-muted);
  290. }
  291. .summary-line {
  292. font-size: 12px;
  293. color: var(--text-secondary);
  294. line-height: 1.45;
  295. }
  296. .summary-line .k {
  297. color: var(--text-muted);
  298. }
  299. .expand-btn {
  300. display: inline-flex;
  301. align-items: center;
  302. gap: 4px;
  303. padding: 2px 8px;
  304. border-radius: 4px;
  305. border: 1px solid var(--border);
  306. background: #fff;
  307. font-size: 12px;
  308. color: var(--primary-dark);
  309. cursor: default;
  310. }
  311. .detail-row td {
  312. background: #f8fafc !important;
  313. padding: 0 12px 12px 36px !important;
  314. border-bottom: 1px solid var(--border);
  315. }
  316. .detail-box {
  317. margin-top: 0;
  318. padding: 10px 12px;
  319. border: 1px dashed #a7f3d0;
  320. border-radius: var(--radius-sm);
  321. background: #fff;
  322. }
  323. .detail-box table {
  324. width: 100%;
  325. border-collapse: collapse;
  326. font-size: 12px;
  327. }
  328. .detail-box th,
  329. .detail-box td {
  330. padding: 6px 8px;
  331. border-bottom: 1px solid #f1f5f9;
  332. text-align: left;
  333. }
  334. .detail-box th {
  335. color: var(--text-muted);
  336. font-weight: 600;
  337. background: transparent;
  338. }
  339. .detail-box tr:last-child td { border-bottom: none; }
  340. .pros-cons {
  341. display: grid;
  342. grid-template-columns: 1fr 1fr;
  343. gap: 12px;
  344. margin-top: 14px;
  345. }
  346. @media (max-width: 720px) {
  347. .pros-cons { grid-template-columns: 1fr; }
  348. }
  349. .pros, .cons {
  350. padding: 10px 12px;
  351. border-radius: var(--radius-sm);
  352. font-size: 13px;
  353. }
  354. .pros {
  355. background: var(--primary-bg);
  356. border: 1px solid #a7f3d0;
  357. }
  358. .cons {
  359. background: #fef2f2;
  360. border: 1px solid #fecaca;
  361. }
  362. .pros h4, .cons h4 {
  363. margin: 0 0 6px;
  364. font-size: 12px;
  365. font-weight: 600;
  366. }
  367. .pros ul, .cons ul {
  368. margin: 0;
  369. padding-left: 18px;
  370. color: var(--text-secondary);
  371. }
  372. .vote {
  373. display: flex;
  374. flex-wrap: wrap;
  375. gap: 10px;
  376. margin-top: 8px;
  377. }
  378. .vote label {
  379. display: flex;
  380. align-items: center;
  381. gap: 8px;
  382. padding: 10px 14px;
  383. border: 1px solid var(--border);
  384. border-radius: var(--radius-sm);
  385. background: #fff;
  386. cursor: pointer;
  387. min-width: 200px;
  388. transition: border-color 0.15s, box-shadow 0.15s;
  389. }
  390. .vote label:hover {
  391. border-color: #a7f3d0;
  392. }
  393. .vote input { accent-color: var(--primary); }
  394. .vote label.picked {
  395. border-color: var(--primary);
  396. background: var(--primary-bg);
  397. box-shadow: 0 0 0 1px var(--primary);
  398. }
  399. .footer-note {
  400. margin-top: 8px;
  401. font-size: 12px;
  402. color: var(--text-muted);
  403. }
  404. .choose-panel {
  405. border: 2px solid var(--primary);
  406. background: linear-gradient(180deg, #ecfdf5 0%, #fff 48%);
  407. }
  408. </style>
  409. </head>
  410. <body>
  411. <div class="page">
  412. <header class="hero">
  413. <h1>配置运费 → 关联已有:列表展示方案</h1>
  414. <p>
  415. 采集协议单(细胞存储 / 科研捐赠)与「运费信息」页共用「配置运费」弹窗。
  416. 当前「关联已有」仅展示运输方式、金额、关联数、创建时间,难以判断该挂哪一笔批次。
  417. 下方对比三种展示方式(示例数据为假数据)。
  418. </p>
  419. <div class="context-bar">
  420. <span class="pill">入口:协议单 · 样本及运输信息</span>
  421. <span class="pill">入口:运费信息 · 配置运费</span>
  422. <span class="pill muted">API 已有 includeItems(协议单号 / 样本编码 / 来源)</span>
  423. </div>
  424. </header>
  425. <!-- A: Status quo -->
  426. <section class="section">
  427. <div class="section-head">
  428. <div>
  429. <h2>方案 A · 现状(过简)</h2>
  430. <p class="desc">仅批次摘要四列,多笔「顺丰快递 / 同金额」时无法区分。</p>
  431. </div>
  432. <span class="badge now">现状</span>
  433. </div>
  434. <div class="dialog">
  435. <div class="dialog-hd">配置运费 <span class="x">✕</span></div>
  436. <div class="dialog-bd">
  437. <p class="hint">将运费应用到已选中的 2 个样本(可跨协议共用一笔)。</p>
  438. <div class="tabs">
  439. <span class="tab">新建运费</span>
  440. <span class="tab active">关联已有</span>
  441. </div>
  442. <table class="list">
  443. <thead>
  444. <tr>
  445. <th>运输方式</th>
  446. <th style="text-align:right">运费(元)</th>
  447. <th style="text-align:center">关联样本数</th>
  448. <th>创建时间</th>
  449. </tr>
  450. </thead>
  451. <tbody>
  452. <tr class="selected">
  453. <td>顺丰快递</td>
  454. <td class="right">¥280.00</td>
  455. <td class="center">3</td>
  456. <td>2026-10-07 14:22</td>
  457. </tr>
  458. <tr>
  459. <td>顺丰快递</td>
  460. <td class="right">¥280.00</td>
  461. <td class="center">2</td>
  462. <td>2026-10-06 09:10</td>
  463. </tr>
  464. <tr>
  465. <td>专线车</td>
  466. <td class="right">¥1,200.00</td>
  467. <td class="center">5</td>
  468. <td>2026-10-05 16:48</td>
  469. </tr>
  470. </tbody>
  471. </table>
  472. </div>
  473. <div class="dialog-ft">
  474. <button class="btn" type="button">取消</button>
  475. <button class="btn main" type="button">确定应用</button>
  476. </div>
  477. </div>
  478. <div class="pros-cons">
  479. <div class="pros"><h4>优点</h4><ul><li>实现简单、弹窗窄</li></ul></div>
  480. <div class="cons"><h4>问题</h4><ul><li>同方式同金额无法辨认</li><li>看不到已挂了哪些协议/样本</li></ul></div>
  481. </div>
  482. </section>
  483. <!-- B: Summary columns -->
  484. <section class="section">
  485. <div class="section-head">
  486. <div>
  487. <h2>方案 B · 批次行内摘要(推荐)</h2>
  488. <p class="desc">
  489. 列表请求带 <code>includeItems=true</code>,增加「已关联样本」摘要列:来源 Tag + 协议单号/样本编码 chips(超出折叠为 +N)。
  490. 弹窗略加宽,仍保持一行一批次、点选即关联。
  491. </p>
  492. </div>
  493. <span class="badge rec">推荐</span>
  494. </div>
  495. <div class="dialog">
  496. <div class="dialog-hd">配置运费 <span class="x">✕</span></div>
  497. <div class="dialog-bd">
  498. <p class="hint">将运费应用到已选中的 2 个样本(可跨协议共用一笔)。点击一行选择要关联的批次。</p>
  499. <div class="tabs">
  500. <span class="tab">新建运费</span>
  501. <span class="tab active">关联已有</span>
  502. </div>
  503. <table class="list">
  504. <thead>
  505. <tr>
  506. <th>运输方式</th>
  507. <th style="text-align:right">运费(元)</th>
  508. <th style="text-align:center">关联数</th>
  509. <th>已关联样本</th>
  510. <th>创建时间</th>
  511. </tr>
  512. </thead>
  513. <tbody>
  514. <tr class="selected">
  515. <td><span class="tag primary">顺丰快递</span></td>
  516. <td class="right">¥280.00</td>
  517. <td class="center">3</td>
  518. <td>
  519. <div class="chips">
  520. <span class="tag success">细胞存储</span>
  521. <span class="chip">XY-2026-1001</span>
  522. <span class="chip">S-A001</span>
  523. <span class="chip">S-A002</span>
  524. <span class="chip more">+1</span>
  525. </div>
  526. <div class="summary-line"><span class="k">协议</span> XY-2026-1001 · XY-2026-1008</div>
  527. </td>
  528. <td>2026-10-07 14:22</td>
  529. </tr>
  530. <tr>
  531. <td><span class="tag primary">顺丰快递</span></td>
  532. <td class="right">¥280.00</td>
  533. <td class="center">2</td>
  534. <td>
  535. <div class="chips">
  536. <span class="tag warning">科研捐赠</span>
  537. <span class="chip">JZ-2026-0033</span>
  538. <span class="chip">D-B011</span>
  539. <span class="chip">D-B012</span>
  540. </div>
  541. </td>
  542. <td>2026-10-06 09:10</td>
  543. </tr>
  544. <tr>
  545. <td><span class="tag primary">专线车</span></td>
  546. <td class="right">¥1,200.00</td>
  547. <td class="center">5</td>
  548. <td>
  549. <div class="chips">
  550. <span class="tag success">细胞存储</span>
  551. <span class="tag warning">科研捐赠</span>
  552. <span class="chip">XY-2026-0888</span>
  553. <span class="chip">JZ-2026-0012</span>
  554. <span class="chip more">+3 样本</span>
  555. </div>
  556. </td>
  557. <td>2026-10-05 16:48</td>
  558. </tr>
  559. </tbody>
  560. </table>
  561. </div>
  562. <div class="dialog-ft">
  563. <button class="btn" type="button">取消</button>
  564. <button class="btn main" type="button">确定应用</button>
  565. </div>
  566. </div>
  567. <div class="pros-cons">
  568. <div class="pros">
  569. <h4>优点</h4>
  570. <ul>
  571. <li>一眼区分同金额批次</li>
  572. <li>复用现有 list + includeItems,无需新接口</li>
  573. <li>协议单弹窗与运费页弹窗可共用同一表格结构</li>
  574. </ul>
  575. </div>
  576. <div class="cons">
  577. <h4>取舍</h4>
  578. <ul>
  579. <li>多样本时 chips 需截断</li>
  580. <li>弹窗建议加宽至约 900~960px</li>
  581. </ul>
  582. </div>
  583. </div>
  584. </section>
  585. <!-- C: Expand detail -->
  586. <section class="section">
  587. <div class="section-head">
  588. <div>
  589. <h2>方案 C · 行展开明细</h2>
  590. <p class="desc">
  591. 主表仍较精简;点击「明细」展开已关联样本表(来源 / 协议单号 / 样本编码 / 样本类型),对齐「运费信息」台账字段。
  592. </p>
  593. </div>
  594. <span class="badge alt">备选</span>
  595. </div>
  596. <div class="dialog">
  597. <div class="dialog-hd">配置运费 <span class="x">✕</span></div>
  598. <div class="dialog-bd">
  599. <p class="hint">将运费应用到已选中的 2 个样本。可展开查看批次下样本后再选择。</p>
  600. <div class="tabs">
  601. <span class="tab">新建运费</span>
  602. <span class="tab active">关联已有</span>
  603. </div>
  604. <table class="list">
  605. <thead>
  606. <tr>
  607. <th style="width:72px"></th>
  608. <th>运输方式</th>
  609. <th style="text-align:right">运费(元)</th>
  610. <th style="text-align:center">关联数</th>
  611. <th>创建时间</th>
  612. </tr>
  613. </thead>
  614. <tbody>
  615. <tr class="selected">
  616. <td><span class="expand-btn">▾ 明细</span></td>
  617. <td><span class="tag primary">顺丰快递</span></td>
  618. <td class="right">¥280.00</td>
  619. <td class="center">3</td>
  620. <td>2026-10-07 14:22</td>
  621. </tr>
  622. <tr class="detail-row">
  623. <td colspan="5">
  624. <div class="detail-box">
  625. <table>
  626. <thead>
  627. <tr>
  628. <th>来源</th>
  629. <th>协议单号</th>
  630. <th>样本编码</th>
  631. <th>样本类型</th>
  632. </tr>
  633. </thead>
  634. <tbody>
  635. <tr>
  636. <td><span class="tag success">细胞存储</span></td>
  637. <td>XY-2026-1001</td>
  638. <td>S-A001</td>
  639. <td>脐带血</td>
  640. </tr>
  641. <tr>
  642. <td><span class="tag success">细胞存储</span></td>
  643. <td>XY-2026-1001</td>
  644. <td>S-A002</td>
  645. <td>脐带血</td>
  646. </tr>
  647. <tr>
  648. <td><span class="tag success">细胞存储</span></td>
  649. <td>XY-2026-1008</td>
  650. <td>S-C019</td>
  651. <td>胎盘</td>
  652. </tr>
  653. </tbody>
  654. </table>
  655. </div>
  656. </td>
  657. </tr>
  658. <tr>
  659. <td><span class="expand-btn">▸ 明细</span></td>
  660. <td><span class="tag primary">顺丰快递</span></td>
  661. <td class="right">¥280.00</td>
  662. <td class="center">2</td>
  663. <td>2026-10-06 09:10</td>
  664. </tr>
  665. <tr>
  666. <td><span class="expand-btn">▸ 明细</span></td>
  667. <td><span class="tag primary">专线车</span></td>
  668. <td class="right">¥1,200.00</td>
  669. <td class="center">5</td>
  670. <td>2026-10-05 16:48</td>
  671. </tr>
  672. </tbody>
  673. </table>
  674. </div>
  675. <div class="dialog-ft">
  676. <button class="btn" type="button">取消</button>
  677. <button class="btn main" type="button">确定应用</button>
  678. </div>
  679. </div>
  680. <div class="pros-cons">
  681. <div class="pros">
  682. <h4>优点</h4>
  683. <ul>
  684. <li>明细完整,与运费台账一致</li>
  685. <li>默认视图不拥挤</li>
  686. </ul>
  687. </div>
  688. <div class="cons">
  689. <h4>取舍</h4>
  690. <ul>
  691. <li>多一次展开操作,扫一眼成本更高</li>
  692. <li>交互与表格高度略复杂</li>
  693. </ul>
  694. </div>
  695. </div>
  696. </section>
  697. <!-- Choose -->
  698. <section class="section choose-panel">
  699. <div class="section-head">
  700. <div>
  701. <h2>请选择倾向方案</h2>
  702. <p class="desc">点选后告诉我你的选择(或回复 A / B / C)。也可回复「B + 可展开看全量」等组合。</p>
  703. </div>
  704. </div>
  705. <div class="vote" id="vote">
  706. <label data-v="a">
  707. <input type="radio" name="plan" value="a" />
  708. <span><strong>A</strong> 保持现状</span>
  709. </label>
  710. <label data-v="b">
  711. <input type="radio" name="plan" value="b" checked />
  712. <span><strong>B</strong> 行内摘要(推荐)</span>
  713. </label>
  714. <label data-v="c">
  715. <input type="radio" name="plan" value="c" />
  716. <span><strong>C</strong> 行展开明细</span>
  717. </label>
  718. </div>
  719. <p class="footer-note">
  720. 文件位置:<code>docs/demos/2026-10-08-freight-link-existing-demo.html</code>
  721. · 用浏览器直接打开即可预览。
  722. </p>
  723. </section>
  724. </div>
  725. <script>
  726. const vote = document.getElementById('vote')
  727. function sync() {
  728. vote.querySelectorAll('label').forEach((lab) => {
  729. const input = lab.querySelector('input')
  730. lab.classList.toggle('picked', !!(input && input.checked))
  731. })
  732. }
  733. vote.addEventListener('change', sync)
  734. sync()
  735. </script>
  736. </body>
  737. </html>