fresh-mint-pl-plan-stop-product-display-demo.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  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.0" />
  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. --text: #1e293b;
  16. --text-muted: #64748b;
  17. --border: #d9e8e2;
  18. --table-head: #f8fafc;
  19. --bg-page: #f1f5f9;
  20. --shadow: 0 1px 3px rgba(0,0,0,.05);
  21. --shadow-lg: 0 12px 40px rgba(15,23,42,.14);
  22. --radius: 10px;
  23. --warn: #d97706;
  24. --warn-bg: #fffbeb;
  25. --danger: #dc2626;
  26. --danger-bg: #fef2f2;
  27. --readonly-bg: #f8fafc;
  28. --edit-bg: #fff;
  29. }
  30. * { box-sizing: border-box; }
  31. body {
  32. margin: 0; min-height: 100vh;
  33. font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  34. font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg-page);
  35. }
  36. .page { max-width: 1440px; margin: 0 auto; padding: 24px 20px 80px; }
  37. .hero {
  38. background: linear-gradient(135deg, #ecfdf5 0%, #fff 50%, #f0f9ff 100%);
  39. border: 1px solid var(--border); border-radius: var(--radius);
  40. padding: 22px 24px; margin-bottom: 18px; box-shadow: var(--shadow);
  41. }
  42. .hero h1 { margin: 0 0 8px; font-size: 22px; font-weight: 700; }
  43. .hero h1 em { font-style: normal; color: var(--primary-dark); }
  44. .hero p { margin: 0; color: var(--text-muted); max-width: 980px; }
  45. .idea-box {
  46. margin-top: 14px; padding: 12px 14px; border-radius: 8px; font-size: 13px;
  47. background: var(--primary-bg); border: 1px solid #a7f3d0; color: var(--primary-dark);
  48. }
  49. .idea-box strong { display: block; margin-bottom: 4px; font-size: 14px; }
  50. .pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  51. .pill {
  52. padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
  53. background: #fff; color: var(--text-muted); border: 1px solid var(--border);
  54. }
  55. .scheme-tabs {
  56. display: flex; flex-wrap: wrap; gap: 6px;
  57. background: #fff; border: 1px solid var(--border);
  58. border-radius: var(--radius) var(--radius) 0 0; padding: 10px 12px 0;
  59. }
  60. .scheme-tab {
  61. border: none; background: transparent; cursor: pointer;
  62. padding: 10px 14px; font-size: 13px; font-weight: 600;
  63. color: var(--text-muted); border-bottom: 2px solid transparent; font-family: inherit;
  64. }
  65. .scheme-tab.active { color: var(--primary-dark); border-bottom-color: var(--primary); }
  66. .scheme-tab.recommended::after {
  67. content: "推荐"; margin-left: 6px; font-size: 10px; font-weight: 700;
  68. color: #fff; background: var(--primary-dark); padding: 1px 6px; border-radius: 999px;
  69. }
  70. .scheme-panel {
  71. display: none; background: #fff; border: 1px solid var(--border); border-top: none;
  72. border-radius: 0 0 var(--radius) var(--radius); padding: 16px 18px 22px; box-shadow: var(--shadow);
  73. }
  74. .scheme-panel.active { display: block; }
  75. .scheme-desc {
  76. margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; font-size: 12px;
  77. border: 1px solid #bae6fd; background: #f0f9ff; color: #0369a1;
  78. }
  79. .scheme-desc.ok { border-color: #a7f3d0; background: var(--primary-bg); color: var(--primary-dark); }
  80. .scheme-desc.warn { border-color: rgba(217,119,6,.3); background: var(--warn-bg); color: #92400e; }
  81. .dialog-sim {
  82. border: 1px solid var(--border); border-radius: var(--radius);
  83. background: #fff; box-shadow: var(--shadow-lg); overflow: hidden; max-width: 580px; margin: 0 auto;
  84. }
  85. .dialog-sim__hd {
  86. padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 13px;
  87. background: linear-gradient(180deg, #ecfdf5, #f8fffc);
  88. }
  89. .dialog-sim__bd { padding: 12px; }
  90. .products-head {
  91. display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
  92. }
  93. .products-head__title { font-size: 12px; font-weight: 600; color: var(--text-muted); }
  94. .btn {
  95. height: 26px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px;
  96. background: #fff; font: inherit; font-size: 12px; cursor: pointer; color: var(--text-muted);
  97. }
  98. .btn.link { border: none; background: transparent; color: var(--danger); padding: 0; height: auto; }
  99. .tag {
  100. display: inline-flex; padding: 1px 6px; border-radius: 4px;
  101. font-size: 10px; font-weight: 600; vertical-align: middle;
  102. }
  103. .tag.danger { background: var(--danger); color: #fff; }
  104. input, select {
  105. width: 100%; height: 32px; border: 1px solid var(--border); border-radius: 8px;
  106. padding: 0 8px; font: inherit; font-size: 12px;
  107. }
  108. .field label {
  109. display: block; font-size: 10px; font-weight: 600; color: var(--text-muted); margin-bottom: 3px;
  110. }
  111. /* ===== 现状:单行表格 ===== */
  112. .single-row-table { border: 1px solid var(--border); border-radius: 8px; overflow-x: auto; }
  113. .single-row-table table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 11px; }
  114. .single-row-table th, .single-row-table td { border-bottom: 1px solid var(--border); padding: 6px; white-space: nowrap; }
  115. .single-row-table th { background: var(--table-head); color: var(--text-muted); font-weight: 600; }
  116. .scroll-hint {
  117. text-align: center; font-size: 10px; color: var(--warn); padding: 4px;
  118. background: var(--warn-bg); border-top: 1px dashed rgba(217,119,6,.3);
  119. }
  120. /* ===== 双行表:通用结构 ===== */
  121. .dual-row-list { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
  122. .dual-row-list__thead {
  123. display: grid; grid-template-columns: 1fr;
  124. padding: 7px 10px; background: var(--table-head);
  125. border-bottom: 1px solid var(--border);
  126. font-size: 11px; font-weight: 600; color: var(--text-muted);
  127. }
  128. .dual-item { border-bottom: 1px solid var(--border); }
  129. .dual-item:last-child { border-bottom: none; }
  130. /* 第 1 行:只读信息带 */
  131. .dual-item__row1 {
  132. display: grid; gap: 8px; padding: 8px 10px;
  133. background: var(--readonly-bg);
  134. border-bottom: 1px dashed var(--border);
  135. }
  136. .dual-item__row1.layout-a { grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); align-items: start; }
  137. .dual-item__row1.layout-b { grid-template-columns: 1fr 100px; align-items: center; }
  138. .dual-item__row1.layout-c { grid-template-columns: 1fr; }
  139. .product-cell__name { font-size: 13px; font-weight: 700; line-height: 1.35; min-width: 0; }
  140. .product-cell__name .model { display: block; font-size: 11px; font-weight: 500; color: var(--text-muted); margin-top: 2px; }
  141. .ro-cell { min-width: 0; }
  142. .ro-cell label {
  143. display: block; font-size: 10px; font-weight: 600; color: var(--text-muted); margin-bottom: 2px;
  144. }
  145. .ro-cell span { font-size: 12px; color: var(--text); word-break: break-all; }
  146. .ro-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
  147. .ro-chip {
  148. font-size: 11px; padding: 2px 8px; border-radius: 6px;
  149. background: #fff; border: 1px solid #e2e8f0;
  150. }
  151. .ro-chip b { color: var(--text-muted); font-weight: 600; margin-right: 4px; }
  152. .qty-inline { text-align: right; }
  153. .qty-inline input { text-align: right; height: 34px; font-weight: 700; color: var(--primary-dark); }
  154. /* 第 2 行:可编辑带 */
  155. .dual-item__row2 {
  156. display: grid; gap: 8px; padding: 8px 10px;
  157. background: var(--edit-bg);
  158. }
  159. .dual-item__row2.layout-edit-4 {
  160. grid-template-columns: 100px 1fr 1fr 1fr 36px; align-items: end;
  161. }
  162. .dual-item__row2.layout-edit-3 {
  163. grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end;
  164. }
  165. .dual-item__row2.layout-edit-2 {
  166. grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end;
  167. }
  168. .dual-item__row2 .remark-full { grid-column: 1 / -1; }
  169. .dual-item__row2 .act-cell { display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; }
  170. .row-label {
  171. font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  172. color: var(--text-muted); margin-bottom: 6px;
  173. }
  174. .row-label.readonly::before { content: "① "; color: #94a3b8; }
  175. .row-label.editable::before { content: "② "; color: var(--primary); }
  176. /* 结构示意 */
  177. .structure-diagram {
  178. margin: 14px 0; padding: 12px; border-radius: 8px;
  179. background: #f8fafc; border: 1px dashed var(--border); font-size: 12px;
  180. font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.7; color: var(--text-muted);
  181. }
  182. .structure-diagram em { color: var(--primary-dark); font-style: normal; font-weight: 600; }
  183. .pros-cons {
  184. display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px;
  185. }
  186. @media (max-width: 640px) {
  187. .pros-cons { grid-template-columns: 1fr; }
  188. .dual-item__row1.layout-a { grid-template-columns: 1fr 1fr; }
  189. .dual-item__row2.layout-edit-4 { grid-template-columns: 1fr 1fr; }
  190. }
  191. .pros-cons > div {
  192. border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 12px;
  193. }
  194. .pros-cons h4 { margin: 0 0 6px; font-size: 12px; }
  195. .pros-cons ul { margin: 0; padding-left: 18px; color: var(--text-muted); }
  196. </style>
  197. </head>
  198. <body>
  199. <div class="page">
  200. <header class="hero">
  201. <h1>段内产品 · <em>双行展示</em> Demo</h1>
  202. <p>
  203. 装货 / 送货 pane 约 580px 宽,<strong>一行平铺 9 列</strong>必然挤压或横滑。
  204. 核心思路:<strong>每条产品占两行</strong>——纵向换空间,横向仍保持可读宽度。
  205. </p>
  206. <div class="idea-box">
  207. <strong>你的思路 → 双行表</strong>
  208. 仍保留「列表 / 表格」扫读习惯;不改成卡片、Tab 或折叠。
  209. 第 1 行放<strong>识别 + 只读</strong>,第 2 行放<strong>段级可编辑</strong>,两行视觉上属于同一条产品。
  210. </div>
  211. <div class="pills">
  212. <span class="pill">~580px 栏宽</span>
  213. <span class="pill">1 条产品 = 2 行</span>
  214. <span class="pill">无横向滚动</span>
  215. </div>
  216. </header>
  217. <div class="scheme-tabs">
  218. <button class="scheme-tab" data-scheme="current" type="button">现状 · 单行(问题)</button>
  219. <button class="scheme-tab recommended active" data-scheme="a" type="button">双行 A · 上行只读 / 下行编辑</button>
  220. <button class="scheme-tab" data-scheme="b" type="button">双行 B · 上行产品+数量</button>
  221. <button class="scheme-tab" data-scheme="c" type="button">双行 C · 上行名称 / 下行全字段</button>
  222. <button class="scheme-tab" data-scheme="impl" type="button">实现说明</button>
  223. </div>
  224. <!-- 现状 -->
  225. <section class="scheme-panel" id="panel-current">
  226. <p class="scheme-desc warn">
  227. <strong>现状:</strong>9 列挤在一行 → 别名/品牌/下拉被截断,或整表横向滚动。
  228. </p>
  229. <div class="dialog-sim">
  230. <div class="dialog-sim__hd">装货产品 · 单行表格</div>
  231. <div class="dialog-sim__bd">
  232. <div class="single-row-table">
  233. <table>
  234. <thead>
  235. <tr>
  236. <th>产品</th><th>别名</th><th>品牌</th><th>单位</th>
  237. <th>数量</th><th>包装</th><th>送货</th><th>备注</th><th>操作</th>
  238. </tr>
  239. </thead>
  240. <tbody>
  241. <tr>
  242. <td>97%硫酸</td><td>工业…</td><td>不限…</td><td>吨</td>
  243. <td>30</td><td>槽罐</td><td>一票…</td><td>—</td><td>删</td>
  244. </tr>
  245. </tbody>
  246. </table>
  247. <div class="scroll-hint">← 需横向滚动,字段显示不全 →</div>
  248. </div>
  249. </div>
  250. </div>
  251. </section>
  252. <!-- 双行 A:推荐 -->
  253. <section class="scheme-panel active" id="panel-a">
  254. <p class="scheme-desc ok">
  255. <strong>推荐 · 双行 A(已实现):</strong>
  256. <em>第 1 行</em> = 产品名(只读)+ <strong>别名 / 品牌 / 单位(可编辑)</strong>;
  257. <em>第 2 行</em> = 计划数量 + 包装 + 送货 + 备注 + 删除。
  258. 别名/品牌交互与上方「产品信息」表一致(下拉 + 维护入口)。
  259. </p>
  260. <div class="structure-diagram">
  261. 每条产品:<br />
  262. ┌─ <em>行1</em> ─ 产品名 │ <strong>别名▼</strong> │ <strong>品牌▼</strong> │ <strong>单位▼</strong> ─┐<br />
  263. └─ <em>行2</em> ─ 数量 │ 包装规格 │ 送货方式 │ 备注 │ 删 ─┘
  264. </div>
  265. <div class="dialog-sim">
  266. <div class="dialog-sim__hd">装货产品 · 双行 A</div>
  267. <div class="dialog-sim__bd">
  268. <div class="products-head">
  269. <span class="products-head__title">2 条产品</span>
  270. <button class="btn" type="button">从计划同步</button>
  271. </div>
  272. <div class="dual-row-list">
  273. <div class="dual-row-list__thead">装货产品(每条占两行)</div>
  274. <article class="dual-item">
  275. <div class="row-label editable">产品属性(可编辑)</div>
  276. <div class="dual-item__row1 layout-a">
  277. <div class="product-cell__name">
  278. 97% 精制硫酸 <span class="tag danger">易制毒</span>
  279. <span class="model">型号/规格:CP级</span>
  280. </div>
  281. <div class="edit-field"><label>别名</label><select><option>工业硫酸</option></select></div>
  282. <div class="edit-field"><label>品牌</label><select><option>不限品牌</option></select></div>
  283. <div class="edit-field"><label>单位</label><select><option>吨</option></select></div>
  284. </div>
  285. <div class="row-label editable">段级数量与物流</div>
  286. <div class="dual-item__row2 layout-edit-4">
  287. <div class="field"><label>计划数量</label><input value="30.000" /></div>
  288. <div class="field"><label>包装规格</label><select><option>槽罐</option></select></div>
  289. <div class="field"><label>送货方式</label><select><option>一票制送货</option></select></div>
  290. <div class="field"><label>备注</label><input placeholder="段内备注" /></div>
  291. <div class="act-cell"><button class="btn link" type="button">删</button></div>
  292. </div>
  293. </article>
  294. <article class="dual-item">
  295. <div class="dual-item__row1 layout-a">
  296. <div class="product-cell__name">
  297. 30% 液碱
  298. <span class="model">型号/规格:国标</span>
  299. </div>
  300. <div class="edit-field"><label>别名</label><input placeholder="—" /></div>
  301. <div class="edit-field"><label>品牌</label><select><option>指定 · 天原化工</option></select></div>
  302. <div class="edit-field"><label>单位</label><select><option>吨</option></select></div>
  303. </div>
  304. <div class="dual-item__row2 layout-edit-4">
  305. <div class="field"><label>计划数量</label><input value="10.000" /></div>
  306. <div class="field"><label>包装规格</label><select><option>散装</option></select></div>
  307. <div class="field"><label>送货方式</label><select><option>山峡自提</option></select></div>
  308. <div class="field"><label>备注</label><input value="含量30%" /></div>
  309. <div class="act-cell"><button class="btn link" type="button">删</button></div>
  310. </div>
  311. </article>
  312. </div>
  313. </div>
  314. </div>
  315. <div class="pros-cons">
  316. <div>
  317. <h4>优点</h4>
  318. <ul>
  319. <li>仍是「表格式列表」,多条产品纵向排列</li>
  320. <li>只读字段 5 列全宽,长文本不截断</li>
  321. <li>可编辑下拉各自 ~120px+,选项可读</li>
  322. <li>两行底色区分(灰 / 白),不用点展开</li>
  323. </ul>
  324. </div>
  325. <div>
  326. <h4>注意</h4>
  327. <ul>
  328. <li>比单行略高,段内 1–3 条可接受</li>
  329. <li>规格可在行1名称副行与独立列二选一(避免重复)</li>
  330. </ul>
  331. </div>
  332. </div>
  333. </section>
  334. <!-- 双行 B -->
  335. <section class="scheme-panel" id="panel-b">
  336. <p class="scheme-desc">
  337. <strong>双行 B:</strong><em>第 1 行</em>只保留「产品名 + 计划数量」(扫数量最快);
  338. <em>第 2 行</em>再排别名/品牌/单位 + 包装/送货/备注。适合<strong>改数频繁</strong>的场景。
  339. </p>
  340. <div class="dialog-sim">
  341. <div class="dialog-sim__hd">装货产品 · 双行 B</div>
  342. <div class="dialog-sim__bd">
  343. <div class="dual-row-list">
  344. <article class="dual-item">
  345. <div class="dual-item__row1 layout-b">
  346. <div class="product-cell__name">
  347. 97% 精制硫酸 <span class="tag danger">毒</span>
  348. <div class="ro-chips">
  349. <span class="ro-chip"><b>别名</b>工业硫酸</span>
  350. <span class="ro-chip"><b>品牌</b>不限</span>
  351. <span class="ro-chip"><b>单位</b>吨</span>
  352. </div>
  353. </div>
  354. <div class="qty-inline field">
  355. <label>计划数量</label>
  356. <input value="30.000" />
  357. </div>
  358. </div>
  359. <div class="dual-item__row2 layout-edit-3">
  360. <div class="field"><label>包装规格</label><select><option>槽罐</option></select></div>
  361. <div class="field"><label>送货方式</label><select><option>一票制</option></select></div>
  362. <div class="field"><label>备注</label><input /></div>
  363. </div>
  364. </article>
  365. <article class="dual-item">
  366. <div class="dual-item__row1 layout-b">
  367. <div class="product-cell__name">
  368. 30% 液碱
  369. <div class="ro-chips">
  370. <span class="ro-chip"><b>品牌</b>天原</span>
  371. <span class="ro-chip"><b>单位</b>吨</span>
  372. </div>
  373. </div>
  374. <div class="qty-inline field"><label>计划数量</label><input value="10.000" /></div>
  375. </div>
  376. <div class="dual-item__row2 layout-edit-3">
  377. <div class="field"><label>包装规格</label><select><option>散装</option></select></div>
  378. <div class="field"><label>送货方式</label><select><option>自提</option></select></div>
  379. <div class="field"><label>备注</label><input value="含量30%" /></div>
  380. </div>
  381. </article>
  382. </div>
  383. </div>
  384. </div>
  385. <div class="pros-cons">
  386. <div><h4>优点</h4><ul><li>数量与产品名同一视线,改数最快</li><li>第 2 行 3 列更宽</li></ul></div>
  387. <div><h4>注意</h4><ul><li>只读字段用 chip,不如 A 的列对齐整齐</li></ul></div>
  388. </div>
  389. </section>
  390. <!-- 双行 C -->
  391. <section class="scheme-panel" id="panel-c">
  392. <p class="scheme-desc">
  393. <strong>双行 C:</strong><em>第 1 行</em>仅产品名 + 危化标识 + chip 摘要;
  394. <em>第 2 行</em>用 2×3 栅格排<strong>全部 6 个字段</strong>(含只读与可编辑)。
  395. 结构最简,但第 2 行字段较多时略挤。
  396. </p>
  397. <div class="dialog-sim">
  398. <div class="dialog-sim__hd">装货产品 · 双行 C</div>
  399. <div class="dialog-sim__bd">
  400. <div class="dual-row-list">
  401. <article class="dual-item">
  402. <div class="dual-item__row1 layout-c">
  403. <div class="product-cell__name">
  404. 97% 精制硫酸 <span class="tag danger">毒</span>
  405. <div class="ro-chips" style="margin-top:6px">
  406. <span class="ro-chip"><b>别名</b>工业硫酸</span>
  407. <span class="ro-chip"><b>品牌</b>不限</span>
  408. <span class="ro-chip"><b>CP级</b></span>
  409. <span class="ro-chip"><b>吨</b></span>
  410. </div>
  411. </div>
  412. </div>
  413. <div class="dual-item__row2 layout-edit-2">
  414. <div class="field"><label>计划数量</label><input value="30" /></div>
  415. <div class="field"><label>包装规格</label><select><option>槽罐</option></select></div>
  416. <div class="field"><label>送货方式</label><select><option>一票制</option></select></div>
  417. <div class="field"><label>单位</label><input value="吨" readonly style="background:#f8fafc" /></div>
  418. <div class="field remark-full"><label>备注</label><input /></div>
  419. </div>
  420. </article>
  421. </div>
  422. </div>
  423. </div>
  424. </section>
  425. <!-- 实现说明 -->
  426. <section class="scheme-panel" id="panel-impl">
  427. <p class="scheme-desc ok">
  428. <strong>落地建议(双行 A):</strong>改造 <code>PlPlanStopProductTable</code> 的 compact 模式——
  429. 不用 <code>el-table</code> 多列,改为 <code>v-for</code> 渲染「双行块」列表;
  430. 或用 <code>el-table</code> 的 <code>span-method</code> 合并为每组 2 行(实现稍复杂)。
  431. </p>
  432. <div class="structure-diagram">
  433. Vue 结构示意:<br /><br />
  434. &lt;div class="pl-stop-product-dual-list"&gt;<br />
  435. &nbsp;&nbsp;&lt;article v-for="row in products" class="pl-stop-product-dual-item"&gt;<br />
  436. &nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="pl-stop-product-dual-item__readonly"&gt;...5 列只读&lt;/div&gt;<br />
  437. &nbsp;&nbsp;&nbsp;&nbsp;&lt;div class="pl-stop-product-dual-item__editable"&gt;...数量/包装/送货/备注/删&lt;/div&gt;<br />
  438. &nbsp;&nbsp;&lt;/article&gt;<br />
  439. &lt;/div&gt;
  440. </div>
  441. <div class="pros-cons">
  442. <div>
  443. <h4>与单行表对比</h4>
  444. <ul>
  445. <li>列数不变,只是<strong>换行承载</strong></li>
  446. <li>用户心智:「还是一张产品表,只是每条高一点」</li>
  447. <li>装货 / 送货 pane 复用同一组件</li>
  448. </ul>
  449. </div>
  450. <div>
  451. <h4>推荐 A 而非 B/C</h4>
  452. <ul>
  453. <li>A 只读/编辑<strong>物理分行</strong>,与业务语义一致</li>
  454. <li>B 数量提前适合「只改数」但只读字段弱化</li>
  455. <li>C 第 2 行仍偏挤</li>
  456. </ul>
  457. </div>
  458. </div>
  459. </section>
  460. </div>
  461. <script>
  462. document.querySelectorAll('.scheme-tab').forEach(tab => {
  463. tab.addEventListener('click', () => {
  464. document.querySelectorAll('.scheme-tab').forEach(t => t.classList.remove('active'));
  465. document.querySelectorAll('.scheme-panel').forEach(p => p.classList.remove('active'));
  466. tab.classList.add('active');
  467. document.getElementById('panel-' + tab.dataset.scheme).classList.add('active');
  468. });
  469. });
  470. </script>
  471. </body>
  472. </html>