From 13b7274dbd7ae1597105b0dd3c137ee473e31455 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Fri, 10 Jul 2026 20:19:03 +0800 Subject: [PATCH] =?UTF-8?q?feat(design):=20=E5=8E=9F=E5=9E=8B=E4=B8=89?= =?UTF-8?q?=E5=9F=9F=E5=9B=9E=E5=A1=AB=E5=AF=B9=E9=BD=90=E7=9C=9F=E5=AE=9E?= =?UTF-8?q?=E7=AB=AF=20+=20=E6=8E=88=E6=9D=83=E7=AE=A1=E7=90=86=E6=8F=90?= =?UTF-8?q?=E5=8D=87=E7=8B=AC=E7=AB=8B=E4=B8=80=E7=BA=A7=E5=B1=8F=EF=BC=88?= =?UTF-8?q?=E4=B8=89=20tab=EF=BC=8C=E6=A1=8C=E9=9D=A2+=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 三域回填(原型=真实 100% 一致铁律首轮集中对齐): - 库存域:多选筛选 chip(N 项摘要+×单清)/抽屉打印标签/成本按角色标注/移动三态筛选入口/共享抽屉生产日期行 - 设置授权关于域:授权信息三格横排/购买卡三阶段同构/iOS 合规双态/隐私同意弹窗/注销账号入口/客服邮箱统一/关于页按钮规格 - 日期组件域:扁平滚轮面板(输入框+滚轮同宽居中)/范围起止双窗格并排锚定下拉/移动 sheet 纵排,.wheel-* 提升 atoms 并登记 授权管理提升(design-first,评审通过): - 新增 license.html 独立一级屏(侧边栏「系统」组):授权信息/在线购买续费/订单管理三 tab - m-license.html 同构三 tab;订单管理 tab=license_purchases 流水(KPI/筛选/表格·卡流/详情) - settings 子导航摘除授权项;iOS 合规态隐藏购买 tab;index 登记更新 Co-Authored-By: Claude Fable 5 --- design/prototype/atoms.css | 20 +- design/prototype/index.html | 33 +- design/prototype/screens/about.html | 21 +- design/prototype/screens/datewheel.js | 148 +++++-- design/prototype/screens/inventory.html | 36 +- design/prototype/screens/license.html | 363 ++++++++++++++++++ design/prototype/screens/m-about.html | 7 +- design/prototype/screens/m-inventory.html | 41 +- design/prototype/screens/m-license.html | 314 ++++++++++++--- design/prototype/screens/m-login.html | 43 +++ design/prototype/screens/m-me.html | 30 ++ design/prototype/screens/m-settings.html | 2 +- design/prototype/screens/m-stock-in-list.html | 7 +- .../prototype/screens/m-stock-out-list.html | 7 +- design/prototype/screens/product-editor.js | 11 +- design/prototype/screens/settings.html | 36 +- design/prototype/screens/shell.js | 3 +- design/prototype/screens/stock-in-list.html | 18 +- design/prototype/screens/stock-out-list.html | 18 +- 19 files changed, 969 insertions(+), 189 deletions(-) create mode 100644 design/prototype/screens/license.html diff --git a/design/prototype/atoms.css b/design/prototype/atoms.css index 6683b91..d503a6f 100644 --- a/design/prototype/atoms.css +++ b/design/prototype/atoms.css @@ -54,15 +54,29 @@ svg{fill:none; stroke:currentColor;} .datefield.gci-date:hover{background:var(--bg);} .datefield.gci-date:focus{background:var(--surface); border-color:var(--primary); box-shadow:0 0 0 2px var(--brand50);} .datefield.gci-date.error{border-color:var(--danger); background:var(--danger-bg); box-shadow:none;} -.wheel-pop{position:fixed; z-index:var(--z-pop); background:var(--surface); border:1px solid var(--border); border-radius:var(--r-md); box-shadow:var(--sh-3); padding:8px; width:248px; display:none;} +/* 面板(扁平,2026-07-04 拍板;镜像 client wheel_date_picker.dart):卡壳 surface+1px 边框+r-lg 无阴影; + 窗格 .wheel-pane = 可输入框 + 三列滚轮(同宽 248 居中);范围 .wheel-range 双窗格并排 + 共用底栏; + 移动 sheet 纵排复用挂 .wheel-sheet(窗格纵排居中,底栏与窗格同宽) */ +.wheel-pop{position:fixed; z-index:var(--z-pop); background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:12px; display:none;} .wheel-pop.show{display:block;} +.wheel-pane{width:248px;} +.wheel-pane-title{font-size:var(--fs-sm); font-weight:600; color:var(--muted); padding-left:2px; margin-bottom:6px;} +.wheel-input{display:block; width:100%; box-sizing:border-box; height:34px; margin-bottom:6px; background:var(--surface); border:1px solid var(--border); border-radius:var(--r-md); outline:none; text-align:center; font-size:var(--fs-body); color:var(--text); font-family:var(--font-mono);} +.wheel-input:focus{border-color:var(--primary);} +.wheel-input::placeholder{color:var(--faint); font-family:var(--font);} +.wheel-box{border:1px solid var(--border); border-radius:var(--r-md); padding:4px;} .wheel-cols{position:relative; display:flex; height:180px; overflow:hidden;} -.wheel-center{position:absolute; left:4px; right:4px; top:72px; height:36px; border-radius:var(--r-md); background:var(--bg); border-top:1px solid var(--border); border-bottom:1px solid var(--border); pointer-events:none; z-index:0;} +.wheel-center{position:absolute; left:4px; right:4px; top:72px; height:36px; border-radius:var(--r-md); background:var(--bg); pointer-events:none; z-index:0;} .wheel-col{position:relative; z-index:1; flex:1; height:100%; overflow-y:scroll; scroll-snap-type:y mandatory; padding:72px 0; text-align:center; scrollbar-width:none; -ms-overflow-style:none;} .wheel-col::-webkit-scrollbar{display:none;} .wheel-item{height:36px; line-height:36px; scroll-snap-align:center; font-size:var(--fs-body); color:var(--muted); font-family:var(--font-mono); transition:color .12s,font-size .12s;} .wheel-item.on{color:var(--primary); font-weight:700; font-size:16px;} -.wheel-foot{display:flex; justify-content:space-between; align-items:center; padding:8px 4px 2px; margin-top:6px; border-top:1px solid var(--border-subtle);} +.wheel-range{display:flex; align-items:flex-start; gap:12px;} +.wheel-sheet{display:flex; flex-direction:column; align-items:center;} +.wheel-sheet .wheel-range{flex-direction:column; align-items:center; gap:14px;} +.wheel-sheet .wheel-foot{width:248px; box-sizing:border-box;} +.wheel-foot{display:flex; justify-content:space-between; align-items:center; margin-top:10px; padding-top:10px; border-top:1px solid var(--border-subtle);} +.wheel-foot .wheel-preview{flex:1; font-size:var(--fs-sm); color:var(--muted); font-family:var(--font-mono);} .wheel-foot .wheel-today{font-size:var(--fs-sm); color:var(--muted); cursor:pointer; padding:4px 10px; border-radius:var(--r-sm);} .wheel-foot .wheel-today:hover{background:var(--bg); color:var(--text);} .wheel-foot .wheel-ok{font-size:var(--fs-sm); color:var(--on-primary); background:var(--primary); font-weight:600; cursor:pointer; padding:5px 16px; border-radius:var(--r-sm);} diff --git a/design/prototype/index.html b/design/prototype/index.html index 987efee..b34af6e 100644 --- a/design/prototype/index.html +++ b/design/prototype/index.html @@ -156,6 +156,7 @@
购买授权时长套餐 · 版本档位
确认订单下单 · 开票 · 无支付占位
收银台订单信息 · 支付宝扫码 · 三态
+
授权管理独立一级屏 · 授权 / 购买续费 / 订单三 tab
@@ -180,6 +181,7 @@
通知详情 · 移动正文 / 关联单据 / 操作
关于 · 移动版本 / 更新日志 / 授权
登录 · 移动品牌 + 表单
+
授权管理 · 移动授权/购买/订单三 tab · 购买卡 / 订单卡流
注册新门店 · 移动开通向导
@@ -359,14 +361,35 @@
5 条结果
-

日期字段(滚轮选择)

.datefield + .wheel-pop(年月日 · 单据/生产共用)· datewheel.js
+

日期字段(扁平滚轮面板)

.datefield 触发器 + .wheel-pop 面板(窗格 .wheel-pane = .wheel-input 可输入框 + .wheel-box 三列滚轮,同宽 248 居中;范围 .wheel-range 双窗格并排 + .wheel-preview 共用底栏;移动 sheet 纵排挂 .wheel-sheet)· datewheel.js
2026-06-22
选择日期
-
-
2024
2025
2026
2027
2028
-
04
05
06
07
08
-
20
21
22
23
24
+
+ +
+
2024
2025
2026
2027
2028
+
04
05
06
07
08
+
20
21
22
23
24
+
今天确定
+
+
起始日期
+ +
+
2024
2025
2026
2027
2028
+
04
05
06
07
08
+
30
31
01
02
03
+
+
+
结束日期
+ +
+
2024
2025
2026
2027
2028
+
04
05
06
07
08
+
20
21
22
23
24
+
+
+
2026-06-01 ~ 2026-06-22确定

筛选 Chip

.chip · 内嵌列头筛选入口
全部品类
diff --git a/design/prototype/screens/about.html b/design/prototype/screens/about.html index 844ce11..c553932 100644 --- a/design/prototype/screens/about.html +++ b/design/prototype/screens/about.html @@ -61,13 +61,6 @@ .tl-morebar .btn svg{width:14px; height:14px; transition:transform .2s;} .timeline.expanded ~ .tl-morebar .btn svg{transform:rotate(180deg);} - /* ---- 授权信息(原样式) ---- */ - .lic-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:14px;} - .lic-cell{background:var(--bg); border:1px solid var(--border-subtle); border-radius:var(--r-md); padding:14px;} - .lic-cell .lk{font-size:var(--fs-xs); color:var(--muted);} - .lic-cell .lv{font-size:var(--fs-h2); font-weight:700; color:var(--heading); margin-top:6px; font-family:var(--font-mono);} - .lic-cell .lv.ok{color:var(--success);} - /* ---- 公司 / 支持(原样式) ---- */ .links{display:grid; grid-template-columns:repeat(2,1fr); gap:10px;} .link-row{display:flex; align-items:center; gap:11px; padding:11px 13px; border:1px solid var(--border); border-radius:var(--r-md); background:var(--bg); color:var(--text); font-size:var(--fs-body); cursor:pointer; transition:border-color .15s;} @@ -105,8 +98,8 @@
- -
-

授权信息

-
-
授权状态
已授权
-
到期日
2027-03-15
-
剩余天数
267 天
-
-
+
diff --git a/design/prototype/screens/datewheel.js b/design/prototype/screens/datewheel.js index 1ec91a8..1456223 100644 --- a/design/prototype/screens/datewheel.js +++ b/design/prototype/screens/datewheel.js @@ -1,47 +1,127 @@ -// 滚轮日期选择器 —— 年月日,单据日期/生产日期/明细共用(单一真源) -// 用法:在任意 .datefield 元素上点击(或聚焦后按 Enter/空格)打开滚轮; -// 元素持有 data-val="YYYY-MM-DD";选定后写回 data-val + .dval 文本,并派发 'datechange' 事件(detail.value)。 -// 三列滚轮(年/月/日)滚动吸附,年/月变化自动重算当月天数。 +// 滚轮日期选择器 —— 扁平统一日期组件(单一真源;镜像 client/lib/widgets/wheel_date_picker.dart,2026-07-04 拍板) +// 单日期:任意 .datefield 元素点击(或聚焦后按 Enter/空格)打开锚定面板 = 可输入框 + 三列滚轮 + 底栏(今天/确定); +// 元素持有 data-val="YYYY-MM-DD";确定写回 data-val + .dval 文本,并派发 'datechange' 事件(detail.value)。 +// 范围:DateWheel.openRange(anchor,{from,to,onCommit}) 起始|结束双窗格并排锚定下拉 + 共用底栏(范围预览/确定), +// 起止倒置自动交换;DateWheel.mountRange(host,{from,to,onCommit}) 把同一套窗格纵排挂进移动底部 sheet。 +// 窗格(镜像 _DatePane):输入框与滚轮同宽(248)、文字水平垂直居中(mono);键入 2024 / 2024-5-12 / 20240512 +// 回车/失焦归一 yyyy-MM-dd 并吸附滚轮(词法对齐 date_util.dart normalizeYmd),滚轮滚动实时回写输入框。 (function(){ const ITEM=36; const now=new Date(); const YEARS=[]; for(let y=now.getFullYear()-15;y<=now.getFullYear()+2;y++) YEARS.push(y); - let pop, yCol, mCol, dCol, target=null, building=false; - const pad=n=>String(n).padStart(2,'0'); const dim=(y,m)=>new Date(y,m,0).getDate(); // m: 1-12 + const fmt=(y,m,d)=>y+'-'+pad(m)+'-'+pad(d); + const today=()=>fmt(now.getFullYear(),now.getMonth()+1,now.getDate()); - function ensure(){ - if(pop) return; - pop=document.createElement('div'); pop.className='wheel-pop'; - pop.innerHTML='
' - +'
' - +'
今天确定
'; - document.body.appendChild(pop); - yCol=pop.querySelector('[data-k="y"]'); mCol=pop.querySelector('[data-k="m"]'); dCol=pop.querySelector('[data-k="d"]'); - [yCol,mCol,dCol].forEach(col=>{ - let t; col.addEventListener('scroll',()=>{ if(building) return; markOn(col); clearTimeout(t); t=setTimeout(()=>{ if(col.dataset.k!=='d') rebuildDays(); },110); }); - }); - pop.querySelector('.wheel-today').onclick=()=>setSel(now.getFullYear(),now.getMonth()+1,now.getDate()); - pop.querySelector('.wheel-ok').onclick=commit; - document.addEventListener('mousedown',e=>{ if(pop.classList.contains('show') && !pop.contains(e.target) && e.target!==target && !(target&&target.contains(e.target))) close(); }); - window.addEventListener('resize',close); + // 键入词法归一(对齐 normalizeYmd):纯数字 yyyymmdd/yyyymm/yyyy 或任意分隔串;缺月/日补 01,超界日 clamp。 + function normalize(raw){ + const s=String(raw||'').trim(); if(!s) return null; + let y,m,d; + if(/^[0-9]+$/.test(s)){ + if(s.length>=8){ y=+s.slice(0,4); m=+s.slice(4,6); d=+s.slice(6,8); } + else if(s.length===6){ y=+s.slice(0,4); m=+s.slice(4,6); } + else y=+s; + } else { + const p=s.split(/[^0-9]+/).filter(Boolean); + if(p.length)y=+p[0]; if(p.length>=2)m=+p[1]; if(p.length>=3)d=+p[2]; + } + if(!y||y<1900||y>2200) return null; + m=m||1; d=d||1; + if(m<1||m>12) return null; + const n=dim(y,m); if(d<1)d=1; if(d>n)d=n; + return fmt(y,m,d); } - const items=col=>col.querySelectorAll('.wheel-item'); - const idxOf=col=>{ const n=items(col).length; return Math.max(0,Math.min(n-1,Math.round(col.scrollTop/ITEM))); }; - function markOn(col){ const idx=idxOf(col); items(col).forEach((el,i)=>el.classList.toggle('on',i===idx)); } - function fill(col,arr,selIdx){ building=true; col.innerHTML=arr.map(t=>`
${t}
`).join(''); col.scrollTop=selIdx*ITEM; markOn(col); requestAnimationFrame(()=>{ building=false; }); } - function rebuildDays(){ const y=YEARS[idxOf(yCol)], m=idxOf(mCol)+1, n=dim(y,m); const cur=Math.min(idxOf(dCol),n-1); fill(dCol,Array.from({length:n},(_,i)=>pad(i+1)),cur); } - function setSel(y,m,d){ const yi=Math.max(0,YEARS.indexOf(y)); fill(yCol,YEARS.map(String),yi); fill(mCol,Array.from({length:12},(_,i)=>pad(i+1)),m-1); const n=dim(y,m); fill(dCol,Array.from({length:n},(_,i)=>pad(i+1)),Math.min(d-1,n-1)); } - function position(el){ const r=el.getBoundingClientRect(); const w=248; pop.style.width=w+'px'; pop.style.left=Math.max(8,Math.min(r.left,window.innerWidth-w-8))+'px'; pop.style.top=(r.bottom+4)+'px'; const ph=pop.getBoundingClientRect(); if(r.bottom+ph.height+8>window.innerHeight && r.top-ph.height-4>0) pop.style.top=(r.top-ph.height-4)+'px'; } - function open(el){ ensure(); target=el; let y,m,d; const v=el.dataset.val; if(v && /^\d{4}-\d{2}-\d{2}$/.test(v)){ [y,m,d]=v.split('-').map(Number); } else { y=now.getFullYear(); m=now.getMonth()+1; d=now.getDate(); } - pop.classList.add('show'); position(el); // 先显示获得布局,scrollTop 才能生效 - setSel(y,m,d); } - function close(){ if(pop) pop.classList.remove('show'); target=null; } - function commit(){ if(!target) return; const y=YEARS[idxOf(yCol)], m=idxOf(mCol)+1, d=idxOf(dCol)+1; const val=y+'-'+pad(m)+'-'+pad(d); target.dataset.val=val; const dv=target.querySelector('.dval'); if(dv){ dv.textContent=val; dv.classList.remove('ph'); } target.classList.remove('error'); target.dispatchEvent(new CustomEvent('datechange',{bubbles:true,detail:{value:val}})); close(); } + // ---- 窗格(可输入框 + 三列滚轮,输入 ↔ 滚轮双向联动) ---- + function makePane(title){ + const root=document.createElement('div'); root.className='wheel-pane'; + root.innerHTML=(title?`
${title}
`:'') + +'' + +'
' + +'
'; + const input=root.querySelector('.wheel-input'); + const yCol=root.querySelector('[data-k="y"]'), mCol=root.querySelector('[data-k="m"]'), dCol=root.querySelector('[data-k="d"]'); + let building=false; + const items=col=>col.querySelectorAll('.wheel-item'); + const idxOf=col=>{ const n=items(col).length; return Math.max(0,Math.min(n-1,Math.round(col.scrollTop/ITEM))); }; + const markOn=col=>{ const idx=idxOf(col); items(col).forEach((el,i)=>el.classList.toggle('on',i===idx)); }; + const fill=(col,arr,selIdx)=>{ building=true; col.innerHTML=arr.map(t=>`
${t}
`).join(''); col.scrollTop=selIdx*ITEM; markOn(col); requestAnimationFrame(()=>{ building=false; }); }; + const get=()=>fmt(YEARS[idxOf(yCol)],idxOf(mCol)+1,idxOf(dCol)+1); + function rebuildDays(){ const y=YEARS[idxOf(yCol)], m=idxOf(mCol)+1, n=dim(y,m); const cur=Math.min(idxOf(dCol),n-1); fill(dCol,Array.from({length:n},(_,i)=>pad(i+1)),cur); } + // 吸附滚轮到 val(不动输入框,供键入联动);set 额外回写输入框 + function snap(val){ let [y,m,d]=(normalize(val)||today()).split('-').map(Number); + const yi=Math.max(0,YEARS.indexOf(y)); fill(yCol,YEARS.map(String),yi); fill(mCol,Array.from({length:12},(_,i)=>pad(i+1)),m-1); + const n=dim(YEARS[yi],m); fill(dCol,Array.from({length:n},(_,i)=>pad(i+1)),Math.min(d-1,n-1)); } + function set(val){ snap(val); input.value=get(); } + [yCol,mCol,dCol].forEach(col=>{ let t; col.addEventListener('scroll',()=>{ if(building) return; markOn(col); + input.value=get(); if(api.onChange)api.onChange(get()); + clearTimeout(t); t=setTimeout(()=>{ if(col.dataset.k!=='d'){ rebuildDays(); input.value=get(); } },110); }); }); + // 键入完整日期(≥8 位)即联动滚轮;回车/失焦归一显示(2024 → 2024-01-01),无效则回显当前值 + input.addEventListener('input',()=>{ const n=normalize(input.value); if(n && input.value.trim().length>=8){ snap(n); if(api.onChange)api.onChange(n); } }); + input.addEventListener('keydown',e=>{ if(e.key==='Enter'){ e.preventDefault(); const n=normalize(input.value); if(n){ set(n); if(api.onChange)api.onChange(n); } } }); + input.addEventListener('blur',()=>{ const n=normalize(input.value); if(n){ set(n); if(api.onChange)api.onChange(n); } else input.value=get(); }); + const api={el:root,get,set,onChange:null}; + return api; + } + // ---- 锚定下拉面板(透明遮罩点外关闭,不冻结窗口) ---- + let pop=null, mode='', target=null, panes=[], onRange=null; + function build(m){ + if(pop && mode===m) return; + if(pop) pop.remove(); + mode=m; panes=[]; + pop=document.createElement('div'); pop.className='wheel-pop'; + if(m==='single'){ + const p=makePane(); panes=[p]; pop.appendChild(p.el); + pop.insertAdjacentHTML('beforeend','
今天确定
'); + pop.querySelector('.wheel-today').onclick=()=>p.set(today()); + pop.querySelector('.wheel-ok').onclick=commitSingle; + } else { + const a=makePane('起始日期'), b=makePane('结束日期'); panes=[a,b]; + const row=document.createElement('div'); row.className='wheel-range'; row.appendChild(a.el); row.appendChild(b.el); pop.appendChild(row); + pop.insertAdjacentHTML('beforeend','
确定
'); + const prev=pop.querySelector('.wheel-preview'); + a.onChange=b.onChange=()=>{ prev.textContent=a.get()+' ~ '+b.get(); }; + pop.querySelector('.wheel-ok').onclick=commitRange; + } + document.body.appendChild(pop); + } + function position(el){ const r=el.getBoundingClientRect(); const w=pop.offsetWidth; + pop.style.left=Math.max(8,Math.min(r.left,window.innerWidth-w-8))+'px'; pop.style.top=(r.bottom+6)+'px'; + const ph=pop.offsetHeight; if(r.bottom+6+ph+8>window.innerHeight && r.top-ph-6>8) pop.style.top=(r.top-ph-6)+'px'; } + + function open(el){ build('single'); target=el; + pop.classList.add('show'); // 先显示获得布局,scrollTop 才能生效 + panes[0].set(el.dataset.val||''); position(el); } + function openRange(el,opt){ opt=opt||{}; build('range'); target=el; onRange=opt.onCommit||null; + pop.classList.add('show'); + panes[0].set(opt.from||''); panes[1].set(opt.to||''); + pop.querySelector('.wheel-preview').textContent=panes[0].get()+' ~ '+panes[1].get(); + position(el); } + function close(){ if(pop) pop.classList.remove('show'); target=null; onRange=null; } + function commitSingle(){ if(!target) return; const val=panes[0].get(); target.dataset.val=val; + const dv=target.querySelector('.dval'); if(dv){ dv.textContent=val; dv.classList.remove('ph'); } + target.classList.remove('error'); + target.dispatchEvent(new CustomEvent('datechange',{bubbles:true,detail:{value:val}})); close(); } + function commitRange(){ let f=panes[0].get(), t=panes[1].get(); if(t确定
'); + const prev=host.querySelector('.wheel-preview'); + const upd=()=>{ prev.textContent=a.get()+' ~ '+b.get(); }; + a.onChange=b.onChange=upd; + a.set(opt.from||''); b.set(opt.to||''); upd(); + host.querySelector('.wheel-ok').onclick=()=>{ let f=a.get(), t=b.get(); if(t{ if(pop && pop.classList.contains('show') && !pop.contains(e.target) && e.target!==target && !(target&&target.contains&&target.contains(e.target))) close(); }); + window.addEventListener('resize',close); document.addEventListener('click',e=>{ const f=e.target.closest('.datefield'); if(f && !f.classList.contains('disabled')){ if(pop && pop.classList.contains('show') && target===f){ close(); return; } open(f); } }); document.addEventListener('keydown',e=>{ const f=e.target.closest && e.target.closest('.datefield'); if(f && (e.key==='Enter'||e.key===' ') && !f.classList.contains('disabled')){ e.preventDefault(); open(f); } }); - window.DateWheel={ open, close }; + window.DateWheel={ open, openRange, mountRange, close }; })(); diff --git a/design/prototype/screens/inventory.html b/design/prototype/screens/inventory.html index f5ddaf3..9765ba4 100644 --- a/design/prototype/screens/inventory.html +++ b/design/prototype/screens/inventory.html @@ -23,9 +23,14 @@ .head .actions{margin-left:auto; display:flex; gap:10px;} .kpis{display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:20px;} .toolbar{display:flex; align-items:center; gap:10px; background:var(--surface); border:1px solid var(--border); border-bottom:none; border-radius:var(--r-lg) var(--r-lg) 0 0; padding:12px 14px; transition:background-color .28s,border-color .28s;} - .toolbar .searchbox{width:240px;} + .toolbar .searchbox{width:260px;} .toolbar .searchbox.code{width:180px;} .toolbar .sp{margin-left:auto;} + /* chip 尾部图标切换:未筛选=下拉箭头,筛选中=× 单清(镜像 DsChip onClear,待提升至 atoms.css) */ + .chip .cx{display:none;} + .chip.on .cx{display:block; cursor:pointer; color:var(--muted);} + .chip.on .cx:hover{color:var(--text);} + .chip.on .caret{display:none;} .placeholder{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; height:60vh; color:var(--muted);} .placeholder .pi{width:54px; height:54px; border-radius:var(--r-xl); background:var(--surface); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; color:var(--primary);} .placeholder .pi svg{width:26px; height:26px; stroke-width:1.6;} .placeholder h2{margin:6px 0 0; font-size:var(--fs-h2); color:var(--heading);} @@ -52,6 +57,7 @@
SKU 总数
1,284
▲ 2.3% 较上月
+
库存货值
¥264万
▲ 1.1% 较上月
在库数量
18,920
▼ 0.6% 较上月
已售 · 点击筛选
17
需补货 6 项
@@ -59,11 +65,12 @@
- -
规格
-
系列
-
仓库
-
状态
+ +
规格
+
系列
+
仓库
+
状态
重置
@@ -117,17 +124,19 @@ const ITEMS=[ {name:'水井坊 井台',code:'SJF-JT-500',spec:'500ml×6',series:'井台',batch:'PZ231209',cat:'浓香',qty:6,unit:'件',cost:'¥680',price:'¥4,080',prodDate:'2023-12-09',inDate:'2026-05-20',supplier:'四川水井坊',value:'¥4,100',status:'已售'}, ]; const STATUS=['全部','在售','库存','已售']; +// 成本价/总价列 = 成本口径,仅管理员可见(非管理员两列隐藏、列设置菜单不出现,2026-07-06);原型=管理员形态 const COLS=[{key:'product',label:'商品',fixed:true},{key:'spec',label:'规格'},{key:'series',label:'系列'},{key:'batch',label:'批次号'},{key:'qty',label:'库存',num:true,sort:true},{key:'cost',label:'成本价',num:true,sort:true},{key:'price',label:'总价',num:true,sort:true},{key:'prodDate',label:'生产日期',sort:true},{key:'inDate',label:'入库时间',sort:true},{key:'supplier',label:'供应商'},{key:'status',label:'状态'},{key:'act',label:'操作',fixed:true}]; -const state={q:'',code:'',status:'全部',page:1,perPage:10,hidden:new Set(),sortBy:null,sortAsc:true}; +const state={q:'',code:'',status:'全部',page:1,perPage:10,hidden:new Set(),sortBy:null,sortAsc:true,spec:new Set(),series:new Set(),wh:new Set()}; function setActive(k){ document.querySelectorAll('.nav[data-k]').forEach(e=>e.classList.toggle('active',e.dataset.k===k)); } function navTo(k){ setActive(k); const inv=document.querySelector('[data-view="inventory"]'), ph=document.querySelector('[data-view="placeholder"]'); if(k==='inventory'){inv.classList.add('active');ph.classList.remove('active');return;} inv.classList.remove('active');ph.classList.add('active'); const nav=NAVS.find(n=>n.k===k); document.getElementById('phTitle').textContent=nav.label; document.getElementById('phIcon').innerHTML=navSvg(nav.d); } function visibleCols(){ return COLS.filter(c=>!state.hidden.has(c.key)); } -function filtered(){ const rows=ITEMS.filter(it=>{ if(state.status!=='全部'&&it.status!==state.status)return false; if(state.spec&&it.spec!==state.spec)return false; if(state.series&&it.series!==state.series)return false; if(state.wh&&it.supplier!==state.wh)return false; if(state.q){const q=state.q.toLowerCase(); if(!it.name.toLowerCase().includes(q)&&!it.code.toLowerCase().includes(q))return false;} return true; }); if(state.sortBy&&SORT_VAL[state.sortBy]){const v=SORT_VAL[state.sortBy];rows.sort((a,b)=>{const x=v(a),y=v(b);return (xy?1:0)*(state.sortAsc?1:-1);});} return rows; } +function filtered(){ const rows=ITEMS.filter(it=>{ if(state.status!=='全部'&&it.status!==state.status)return false; if(state.spec.size&&!state.spec.has(it.spec))return false; if(state.series.size&&!state.series.has(it.series))return false; if(state.wh.size&&!state.wh.has(it.supplier))return false; if(state.q){const q=state.q.toLowerCase(); if(!it.name.toLowerCase().includes(q)&&!it.code.toLowerCase().includes(q))return false;} return true; }); if(state.sortBy&&SORT_VAL[state.sortBy]){const v=SORT_VAL[state.sortBy];rows.sort((a,b)=>{const x=v(a),y=v(b);return (xy?1:0)*(state.sortAsc?1:-1);});} return rows; } function render(){ document.getElementById('statusVal').textContent=state.status==='全部'?'':state.status; - [['spec','chipSpec','specVal'],['series','chipSeries','seriesVal'],['wh','chipWh','whVal']].forEach(([k,cid,vid])=>{ document.getElementById(vid).textContent=state[k]||''; document.getElementById(cid).classList.toggle('on',!!state[k]); }); + // 多选摘要(镜像 DsChip value):1 项=值本身,多项=「N 项」 + [['spec','chipSpec','specVal'],['series','chipSeries','seriesVal'],['wh','chipWh','whVal']].forEach(([k,cid,vid])=>{ const s=state[k]; document.getElementById(vid).textContent=!s.size?'':(s.size===1?[...s][0]:`${s.size} 项`); document.getElementById(cid).classList.toggle('on',!!s.size); }); document.getElementById('chipStatus').classList.toggle('on',state.status!=='全部'); const cols=visibleCols(); document.getElementById('thead').innerHTML=''+cols.map(c=>{ const cls=(c.num?'num ':'')+(c.key==='act'?'act ':''); if(c.filter){const on=state.status!=='全部'; return `${c.label} `;} if(c.sort){const on=state.sortBy===c.key; const ic=!on?'i-chevron-down':(state.sortAsc?'i-ic51':'i-chevron-down'); return `${c.label} `;} return `${c.label}`; }).join('')+''; @@ -146,12 +155,15 @@ function filterStatus(s){ state.status=s; state.page=1; navTo('inventory'); rend // 列头排序:无→升→降→无 循环(真实实现为服务端全局排序) function toggleSort(k){ if(state.sortBy!==k){state.sortBy=k;state.sortAsc=true;} else if(state.sortAsc){state.sortAsc=false;} else {state.sortBy=null;state.sortAsc=true;} state.page=1; render(); } const SORT_VAL={qty:it=>it.qty,cost:it=>parseFloat(String(it.cost).replace(/[¥,]/g,''))||0,price:it=>parseFloat(String(it.price).replace(/[¥,]/g,''))||0,prodDate:it=>it.prodDate||'',inDate:it=>it.inDate||''}; -function clearFilters(){ state.q='';state.status='全部';state.spec=null;state.series=null;state.wh=null;state.page=1; document.getElementById('searchInput').value=''; render(); } +function clearFilters(){ state.q='';state.status='全部';state.spec.clear();state.series.clear();state.wh.clear();state.page=1; document.getElementById('searchInput').value=''; render(); } function openFilter(kind,t){ openMenu(t,STATUS.map(v=>({v,label:v,sel:v===state.status})),v=>{ state.status=v; state.page=1; closeMenus(); render(); }); } -// 维度筛选 chip(规格/系列/仓库,2026-07-07 从列头漏斗上移;真实实现为多选) +// 维度筛选 chip(规格/系列/仓库,2026-07-07 从列头漏斗上移):多选,点选即生效、菜单保持打开(镜像 showDsMultiMenu) const DIM_KEY={spec:'spec',series:'series',wh:'supplier'}; -function openDimFilter(dim,t){ const key=DIM_KEY[dim]; const opts=['全部',...new Set(ITEMS.map(it=>it[key]).filter(Boolean))]; openMenu(t,opts.map(v=>({v,label:v,sel:(state[dim]||'全部')===v})),v=>{ state[dim]=v==='全部'?null:v; state.page=1; closeMenus(); render(); }); } +function openDimFilter(dim,t){ const key=DIM_KEY[dim]; const opts=[...new Set(ITEMS.map(it=>it[key]).filter(Boolean))]; openMenu(t,opts.map(v=>({v,label:v,sel:state[dim].has(v)})),v=>{ state[dim].has(v)?state[dim].delete(v):state[dim].add(v); state.page=1; render(); openDimFilter(dim,t); }); } +// chip 尾部 × 单清(镜像 DsChip onClear:只清本维度,不展开菜单) +function clearDim(dim,e){ e.stopPropagation(); state[dim].clear(); state.page=1; render(); } +function clearStatus(e){ e.stopPropagation(); state.status='全部'; state.page=1; render(); } document.getElementById('chipStatus').onclick=e=>openFilter('status',e.currentTarget); const COL_KEY='jiu-inv-hidden'; function saveHidden(){ try{ localStorage.setItem(COL_KEY, JSON.stringify([...state.hidden])); }catch(e){} } diff --git a/design/prototype/screens/license.html b/design/prototype/screens/license.html new file mode 100644 index 0000000..cfd7830 --- /dev/null +++ b/design/prototype/screens/license.html @@ -0,0 +1,363 @@ + + + + + +授权管理 · 岩美酒库 + + + + + +
+
+
+
+
+
+

授权管理

授权状态 · 购买续费 · 订单流水 + +
+ +
+ + + +
+ + +
+
+

授权信息

+

当前门店的授权状态与有效期,续期时长在现有到期时间上叠加

+
+
授权状态
已授权
+
到期日
2027-03-15
+
剩余天数
267 天
+
+
+
+

兑换券

+

输入兑换券短码续期

+
+
+
兑换续期
+
+
+
+

到期后的降级规则

+

授权到期后系统各功能的可用性说明

+
+
· 过期 7 天内(宽限期):仍可正常使用,请尽快续费
+
· 过期 7–15 天(只读期):仅能查看数据,无法新增或修改
+
· 过期满 15 天:系统锁定,无法登录,需续费或激活新授权码后恢复
+
+
+ + +
+ + +
+
+

在线购买 / 续费

+

选择套餐支付宝支付,到账后授权自动续期

+
+
+
+ + +
+
+
当前授权 · 高级版
2027-06-04
剩余 329 天 · 续期自动叠加
+
累计购买金额
¥4,197
自 2026-02 开通
+
订单总数
7
已支付 5 笔
+
待支付 · 点击筛选
1
未支付订单 2 小时后自动关闭
+
+
+ +
套餐
+
状态
+
下单时间
+
+
重置
+
+
+
每页
+
+
+
+
+ +
+

订单详情

+
+ + + + +
+ + +
+ + + + + + + diff --git a/design/prototype/screens/m-about.html b/design/prototype/screens/m-about.html index 58525e0..799fdb3 100644 --- a/design/prototype/screens/m-about.html +++ b/design/prototype/screens/m-about.html @@ -14,7 +14,7 @@ .ab-ico svg{width:40px; height:40px;} .ab-nm{font-size:var(--fs-h1); font-weight:800; color:var(--heading); margin-top:14px;} .ab-ver{font-size:var(--fs-sm); color:var(--muted); margin-top:4px; font-family:var(--font-mono);} - .ab-btns{display:flex; gap:10px; margin-top:18px; width:100%;} + .ab-btns{display:flex; gap:10px; margin-top:10px; width:100%;} .tl{position:relative; padding-left:18px;} .tl-item{position:relative; padding:0 0 16px 14px; border-left:2px solid var(--border-subtle);} .tl-item:last-child{border-left-color:transparent;} @@ -38,13 +38,14 @@
岩美酒库
v1.1.3 · 酒水进销存管理系统
-
检查更新
+ +
检查更新
反馈 Bug
功能建议
diff --git a/design/prototype/screens/m-inventory.html b/design/prototype/screens/m-inventory.html index 1f8ea83..00828a2 100644 --- a/design/prototype/screens/m-inventory.html +++ b/design/prototype/screens/m-inventory.html @@ -10,6 +10,8 @@ @@ -17,13 +19,19 @@
-
SKU 总数
1,284
▲ 2.3% 较上月
+
SKU 总数
1,284
▲ 2.3% 较上月
+
库存货值
¥264万
▲ 1.5% 较上月
在库数量
18,920
件 · 实时
-
已售
17
需补货 6 项
+ +
已售
17
需补货 6 项
- + +
+ +
+
商品
@@ -47,11 +55,15 @@ const ITEMS=[ {name:'郎酒 红花郎 15',code:'LJ-HHL15',spec:'500ml×6',series:'红花郎15',batch:'PZ240325',prod:'2024-03-25',qty:54,unit:'件',cost:'¥560',supplier:'四川郎酒',status:'在售'}, {name:'西凤酒 旗舰版',code:'XF-QJ-500',spec:'500ml×6',series:'旗舰版',batch:'PZ240614',prod:'2024-06-14',qty:88,unit:'件',cost:'¥280',supplier:'陕西西凤',status:'在售'}, ]; -const state={q:''}; +const state={q:'',status:'全部',spec:new Set(),series:new Set()}; +const MST=['全部','在售','库存','已售']; -function filtered(){ return ITEMS.filter(it=>{ if(state.q){const q=state.q.toLowerCase(); if(!it.name.toLowerCase().includes(q)&&!it.code.toLowerCase().includes(q))return false;} return true; }); } +function filtered(){ return ITEMS.filter(it=>{ if(state.status!=='全部'&&it.status!==state.status)return false; if(state.spec.size&&!state.spec.has(it.spec))return false; if(state.series.size&&!state.series.has(it.series))return false; if(state.q){const q=state.q.toLowerCase(); if(!it.name.toLowerCase().includes(q)&&!it.code.toLowerCase().includes(q))return false;} return true; }); } +function filterActive(){ return state.status!=='全部'||state.spec.size>0||state.series.size>0; } function render(){ const rows=filtered(); + const ab=document.getElementById('advBtn'); ab.classList.toggle('primary',filterActive()); ab.classList.toggle('ghost',!filterActive()); + document.getElementById('kSold').classList.toggle('sel',state.status==='已售'); document.getElementById('cnt').textContent=`商品 · 共 ${rows.length}`; const L=document.getElementById('list'); if(!rows.length){ L.innerHTML=`
没有匹配的商品 · 调整筛选或搜索
`; return; } @@ -63,10 +75,27 @@ function render(){
`).join(''); } +function setSt(s){ state.status=s; render(); } +function clearAll(){ state.q='';state.status='全部';state.spec.clear();state.series.clear(); document.getElementById('q').value=''; render(); } +// ---- 详搜筛选 sheet(镜像 Flutter _openMobileFilterSheet:状态单选 + 规格/系列多选 chip 组 + 重置/完成)---- +function mfGroup(label,html){ return `
${html}
`; } +function drawFilterSheet(){ + const specOpts=[...new Set(ITEMS.map(it=>it.spec))], seriesOpts=[...new Set(ITEMS.map(it=>it.series))]; + openSheet('筛选', + mfGroup('状态',MST.map(s=>`${s}`).join('')) + +mfGroup('规格',specOpts.map(v=>`${v}`).join('')) + +mfGroup('系列',seriesOpts.map(v=>`${v}`).join('')) + +`
重置
完成
`); +} +function mfTgl(k,v){ state[k].has(v)?state[k].delete(v):state[k].add(v); drawFilterSheet(); render(); } +function openFilterSheet(){ drawFilterSheet(); } +// 详情 sheet 行序对齐真实商品抽屉(编码/系列/规格/生产日期/当前库存/成本×2/状态); +// 成本两行仅管理员可见(2026-07-06),原型=管理员形态;生产日期行 2026-07-10。 function openItem(idx){ const it=ITEMS[idx]; if(!peEdit||peEdit.idx!==idx) peEdit={idx,imgs:[PE_SAMPLE[0],'',''],introName:'',introBody:''}; const hasIntro=!!peEdit.introName; - openSheet(it.name, `
编码${it.code}
规格${it.spec}
系列${it.series}
批次号${it.batch}
生产日期${it.prod}
当前库存${it.qty} ${it.unit}
成本价${it.cost}
供应商${it.supplier}
状态${it.status}${it.status==='已售'?'':``}
+ const totalCost='¥'+Math.round(parseFloat(it.cost.replace(/[¥,]/g,''))*it.qty).toLocaleString(); + openSheet(it.name, `
编码${it.code}
系列${it.series}
规格${it.spec}
生产日期${it.prod}
当前库存${it.qty} ${it.unit}
成本价(单瓶)${it.cost}
总成本价${totalCost}
状态${it.status}${it.status==='已售'?'':``}
商品图片
建议主图为白底产品图,可再加细节图(瓶身/防伪)与场景图。
商品介绍 / 卖点
diff --git a/design/prototype/screens/m-license.html b/design/prototype/screens/m-license.html index df43fc1..2375fcd 100644 --- a/design/prototype/screens/m-license.html +++ b/design/prototype/screens/m-license.html @@ -7,87 +7,299 @@ - +
- -
授权信息
-
-
授权状态已授权
-
到期日2027-03-15
-
剩余天数267 天
+ +
+ + +
-
续期时长在现有到期时间上叠加,不会浪费剩余天数
-
在线购买 / 续费
-
- -
兑换券
-
-
-
兑换续期
+ +
+ +
+

授权信息

+

当前门店的授权状态与有效期,续期时长在现有到期时间上叠加

+
+
授权状态
已授权
+
到期日
2027-03-15
+
剩余天数
267 天
+
+
+ +
+

兑换券

+

输入兑换券短码续期

+
+
+
兑换续期
+
+
+ +
+

到期后的降级规则

+

授权到期后系统各功能的可用性说明

+
+
· 过期 7 天内(宽限期):仍可正常使用,请尽快续费
+
· 过期 7–15 天(只读期):仅能查看数据,无法新增或修改
+
· 过期满 15 天:系统锁定,无法登录,需续费或激活新授权码后恢复
+
+
+ +
-
到期后的降级规则
-
-
查看数据保留,可继续查询导出
-
入库 / 出库 / 审核停用,续期后恢复
-
新增用户 / 设备停用
-
数据安全云端保留 180 天
-
+ +
+
+

在线购买 / 续费

+

选择套餐支付宝支付,到账后授权自动续期

+
+
+
+ + +
+
+
当前授权 · 高级版
2027-06-04
剩余 329 天
+
累计购买金额
¥4,197
已支付 5 笔
+
待支付 · 点击筛选
1
2 小时后自动关闭
+
订单总数
7
自 2026-02 开通
+
+
+ +
全部
+
套餐
+
+
授权订单
+
+
+ +
+ + +
diff --git a/design/prototype/screens/m-login.html b/design/prototype/screens/m-login.html index b8fc221..d590fb7 100644 --- a/design/prototype/screens/m-login.html +++ b/design/prototype/screens/m-login.html @@ -17,6 +17,18 @@ .lg-sub{font-size:var(--fs-sm); color:var(--muted); margin-top:6px;} .lg-foot{margin-top:auto; text-align:center; font-size:var(--fs-sm); color:var(--muted); padding-top:24px;} .lg-foot a{color:var(--primary); text-decoration:none; font-weight:600;} + /* 首启隐私同意卡(镜像 privacy_consent_gate.dart:320 宽 surface 卡,遮罩用 .overlay/--scrim, + 真实端为 Colors.black54)—— 待提升至 atoms.css */ + .pc-card{width:320px; margin:0 24px; background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:22px 22px 18px; box-sizing:border-box;} + .pc-h{text-align:center; font-size:var(--fs-h2); font-weight:700; color:var(--heading);} + .pc-b{font-size:var(--fs-sm); color:var(--text); line-height:1.7; margin-top:12px;} + .pc-b a{color:var(--primary); font-weight:600; cursor:pointer;} + .pc-hint{font-size:var(--fs-xs); color:var(--warn); margin-top:10px; text-align:center;} + .pc-acts{display:flex; gap:10px; margin-top:16px;} + /* 设计期控件:常规 / 首启同意 双态(仿 pay.html 三态做法,仅评审) */ + .ds-states{position:fixed; left:14px; bottom:22px; display:flex; gap:6px; background:var(--surface); border:1px solid var(--border); border-radius:var(--r-pill); padding:5px; box-shadow:var(--sh-2); z-index:var(--z-fab);} + .ds-states button{border:none; background:none; font:inherit; font-size:var(--fs-xs); color:var(--muted); padding:5px 12px; border-radius:var(--r-pill); cursor:pointer;} + .ds-states button.on{background:var(--brand50); color:var(--primary); font-weight:600;} @@ -33,8 +45,39 @@
登录
还没有门店账号?注册新门店
+ + +
+
+
个人信息保护提示
+
感谢使用岩美酒库。为向您提供门店库存管理服务,我们仅收集必要的账号信息、设备信息与操作日志,用于多端数据同步与账号安全保障。详情请阅读《隐私政策》《用户协议》。点击「同意并继续」即表示您已阅读并同意上述条款。
+ +
+
不同意
+
同意并继续
+
+
+
+ + +
+ + +
+ diff --git a/design/prototype/screens/m-me.html b/design/prototype/screens/m-me.html index f766f1a..39cfbbe 100644 --- a/design/prototype/screens/m-me.html +++ b/design/prototype/screens/m-me.html @@ -14,6 +14,10 @@ .me-hd .nm{font-size:var(--fs-h2); font-weight:700; color:var(--heading);} .me-hd .sub{font-size:var(--fs-sm); color:var(--muted); margin-top:3px;} .me-hd .role{margin-left:auto;} + /* 设计期控件:标准 / iOS 合规 双态(仿 pay.html 三态做法,仅评审;避开底部 tabbar) */ + .ds-states{position:fixed; left:14px; bottom:74px; display:flex; gap:6px; background:var(--surface); border:1px solid var(--border); border-radius:var(--r-pill); padding:5px; box-shadow:var(--sh-2); z-index:var(--z-fab);} + .ds-states button{border:none; background:none; font:inherit; font-size:var(--fs-xs); color:var(--muted); padding:5px 12px; border-radius:var(--r-pill); cursor:pointer;} + .ds-states button.on{background:var(--brand50); color:var(--primary); font-weight:600;} @@ -41,15 +45,41 @@ 系统设置 主题外观 关于我们 + +
退出登录
+ +
+ + +
+ diff --git a/design/prototype/screens/m-settings.html b/design/prototype/screens/m-settings.html index 83655e8..3d07b9c 100644 --- a/design/prototype/screens/m-settings.html +++ b/design/prototype/screens/m-settings.html @@ -44,7 +44,7 @@ function openShopSheet(){ openSheet('门店信息', `
-
+
取消
保存
`); } diff --git a/design/prototype/screens/m-stock-in-list.html b/design/prototype/screens/m-stock-in-list.html index db3f2c8..5aee57d 100644 --- a/design/prototype/screens/m-stock-in-list.html +++ b/design/prototype/screens/m-stock-in-list.html @@ -40,6 +40,7 @@ + + (需先引 shell.js 取 openMenu/toast), -// 行点击调用 openProductEditor(item)。item 字段按需:{name,code,series,spec,cat,qty,unit,cost,value,status} +// 行点击调用 openProductEditor(item)。item 字段按需:{name,code,series,spec,cat,prodDate,qty,unit,cost,value,status} // 改这个抽屉(库存 / 基础数据共用)= 只改此文件 + atoms.css 的 .pe-* 样式。 // ============================================================ (function () { @@ -22,6 +22,8 @@

商品

预览
+ +
打印标签
@@ -61,9 +63,12 @@ if (it.series) r.push(['系列', `${it.series}`]); if (it.spec) r.push(['规格', `${it.spec}`]); if (it.cat) r.push(['分类', `${it.cat}`]); + // 生产日期行(分类后、当前库存前,mono,2026-07-10) + if (it.prodDate) r.push(['生产日期', `${it.prodDate}`]); if (it.qty != null) r.push(['当前库存', `${it.qty} ${it.unit || ''}`]); - if (it.cost) r.push(['成本价', `${it.cost}`]); - if (it.value) r.push(['库存货值', `${it.value}`]); + // 成本两行仅管理员可见(非管理员隐藏,与库存列表/出库同口径,2026-07-06);原型=管理员形态 + if (it.cost) r.push(['成本价(单瓶)', `${it.cost}`]); + if (it.value) r.push(['总成本价', `${it.value}`]); // 状态行:三态徽章 + 挂售 switch(在售⇄库存 即时生效;已售只读无 switch) if (it.status) r.push(['状态', `${it.status}${it.status === '已售' ? '' : ``}`]); return r.map((x, i) => `
${x[0]}${x[1]}
`).join(''); diff --git a/design/prototype/screens/settings.html b/design/prototype/screens/settings.html index 4bfb286..bfef6f1 100644 --- a/design/prototype/screens/settings.html +++ b/design/prototype/screens/settings.html @@ -42,17 +42,6 @@ .b-启用{background:var(--success-bg); color:var(--success);} .b-停用{background:var(--danger-bg); color:var(--danger);} - /* 授权兑换券 */ - .lic{display:flex; gap:24px; flex-wrap:wrap; align-items:center; padding:18px 20px; border:1px solid var(--border); border-radius:var(--r-md); background:var(--bg); margin-bottom:20px;} - .lic .stat{flex:none;} - .lic .stat .t{font-size:var(--fs-sm); color:var(--muted); margin-bottom:6px;} - .lic .stat .v{font-size:24px; font-weight:700; color:var(--heading); font-family:var(--font-mono); letter-spacing:.3px;} - .lic .stat .v.warn{color:var(--warn);} - .lic .ico{width:46px; height:46px; border-radius:var(--r-md); background:var(--ok-soft); color:var(--success); display:flex; align-items:center; justify-content:center; margin-left:auto; flex:none;} - .lic .ico svg{width:24px; height:24px; stroke-width:1.7;} - .redeem{display:flex; gap:10px; max-width:520px; align-items:flex-end;} - .redeem .field{flex:1;} - /* 主题卡 */ .theme-cards{display:grid; grid-template-columns:repeat(3,1fr); gap:14px; max-width:620px; margin-bottom:22px;} .tcard{border:1.5px solid var(--border); border-radius:var(--r-lg); padding:14px; cursor:pointer; transition:.15s; background:var(--surface);} @@ -87,13 +76,13 @@
-

系统设置

门店配置 · 用户与授权 · 个性化偏好
+

系统设置

门店配置 · 用户 · 个性化偏好
@@ -138,24 +127,6 @@
- -
-
-

授权兑换券

-

本系统以「时长兑换券」授权,输入兑换券短码即可续期,无需订阅

-
-
授权到期日
2026-09-16
-
剩余天数
剩余 87 天
-
-
-
-
-
兑换续期
-
-

没有兑换券?购买授权时长 →

-
-
-
@@ -203,9 +174,6 @@ /* 偏好设置主题卡 → 切换整站 */ function pickTheme(t){ setTheme(t); toast('已切换为 '+THEMES[t].name+' 主题'); } - /* 兑换券 */ - function redeem(){ const v=document.getElementById('voucher').value.trim(); if(!v){ toast('请输入兑换券短码'); return;} document.getElementById('voucher').value=''; toast('兑换成功,已续期'); } - document.addEventListener('keydown',e=>{ if(e.key==='Escape')closeMenus(); }); diff --git a/design/prototype/screens/shell.js b/design/prototype/screens/shell.js index afc97f1..0de8383 100644 --- a/design/prototype/screens/shell.js +++ b/design/prototype/screens/shell.js @@ -17,12 +17,13 @@ { k: 'products', label: '基础数据', href: 'products.html', d: 'M3 3h7v7H3z M14 3h7v7h-7z M3 14h7v7H3z M14 14h7v7h-7z' }, { g: '系统' }, { k: 'devices', label: '设备管理', href: 'devices.html', d: 'M4 4h16v12H4z M8 20h8 M12 16v4' }, + { k: 'license', label: '授权管理', href: 'license.html', d: 'M12 3l7 4v5c0 5-3 8-7 9-4-1-7-4-7-9V7l7-4z' }, { k: 'settings', label: '系统设置', href: 'settings.html', d: 'M12 9a3 3 0 100 6 3 3 0 000-6z M4 12h2 M18 12h2 M12 4v2 M12 18v2' }, { k: 'about', label: '关于我们', href: 'about.html', d: 'M12 16v-4 M12 8h.01 M12 3a9 9 0 100 18 9 9 0 000-18z' }, ]; const THEMES = { a: { name: '经典蓝' }, b: { name: '琥珀' }, c: { name: '酒窖' } }; // 侧栏导航图标(引用 icons.js sprite 的 Lucide 图标) - const NAV_ICON = { 'stock-in': 'i-download', 'stock-out': 'i-upload', inventory: 'i-box-2', finance: 'i-ic08', partners: 'i-ic56', products: 'i-ic57', devices: 'i-ic63', settings: 'i-gear', about: 'i-ic24' }; + const NAV_ICON = { 'stock-in': 'i-download', 'stock-out': 'i-upload', inventory: 'i-box-2', finance: 'i-ic08', partners: 'i-ic56', products: 'i-ic57', devices: 'i-ic63', license: 'i-shield', settings: 'i-gear', about: 'i-ic24' }; const BRAND = '
岩美酒库
'; const TOP_RIGHT = '
经典蓝
'; diff --git a/design/prototype/screens/stock-in-list.html b/design/prototype/screens/stock-in-list.html index 2293431..d659783 100644 --- a/design/prototype/screens/stock-in-list.html +++ b/design/prototype/screens/stock-in-list.html @@ -224,7 +224,9 @@ const DATE_PRESETS=[ {v:'30',label:'近 30 天'}, {v:'month',label:'本月'}, ]; -function openDateFilter(t){ openMenu(t,DATE_PRESETS.map(p=>({v:p.v,label:p.label,sel:p.v===(state.datePreset||'all')})),v=>{ applyDatePreset(v); state.page=1; closeMenus(); render(); }); } +function openDateFilter(t){ openMenu(t,[...DATE_PRESETS,{v:'custom',label:'自定义…'}].map(p=>({v:p.v,label:p.label,sel:p.v===(state.datePreset||'all')})),v=>{ closeMenus(); if(v==='custom'){ openCustomRange(t); return; } applyDatePreset(v); state.page=1; render(); }); } +// 自定义范围:起止并排双滚轮锚定 chip 下方(datewheel.js openRange,对齐真实端 showDateRangeDropdown) +function openCustomRange(t){ DateWheel.openRange(t,{from:state.dateFrom,to:state.dateTo,onCommit:(f,to)=>{ state.datePreset='custom'; state.dateFrom=f; state.dateTo=to; state.dateLabel=f+' ~ '+to; state.page=1; render(); }}); } function applyDatePreset(v){ state.datePreset=v; if(v==='all'){state.dateFrom='';state.dateTo='';state.dateLabel='';} else if(v==='month'){state.dateFrom=TODAY.slice(0,7)+'-01';state.dateTo=TODAY;state.dateLabel='本月';} else {state.dateFrom=dateMinus(Number(v)-1);state.dateTo=TODAY;state.dateLabel='近'+v+'天';} } @@ -262,15 +264,14 @@ const OP_OPTS=['全部',...Array.from(new Set(ORDERS.map(o=>o.op)))]; const REVIEWER_OPTS=['全部',...Array.from(new Set(ORDERS.map(o=>o.auditor).filter(Boolean)))]; let adv={}; function advSet(id,val){ const el=document.getElementById(id); if(el)el.value=(!val||val==='全部')?'':val; } -function dateLabelOf(v){ return v==='month'?'本月':(!v||v==='all'?'':'近'+v+'天'); } function openAdvSearch(){ - adv={party:state.party,series:state.series,spec:state.spec,category:state.category,op:state.op,reviewer:state.reviewer,status:state.status,datePreset:state.datePreset||'all'}; + adv={party:state.party,series:state.series,spec:state.spec,category:state.category,op:state.op,reviewer:state.reviewer,status:state.status,dateFrom:state.dateFrom||'',dateTo:state.dateTo||''}; advSet('advParty',adv.party); advSet('advSeries',adv.series); advSet('advSpec',adv.spec); advSet('advCategory',adv.category); advSet('advOp',adv.op); advSet('advReviewer',adv.reviewer); advSet('advStatus',adv.status); document.getElementById('advNo').value=state.orderNo||''; document.getElementById('advProduct').value=state.productInfo||''; document.getElementById('advBatch').value=state.batch||''; - document.getElementById('advDate').value=dateLabelOf(adv.datePreset); + document.getElementById('advDate').value=adv.dateFrom?adv.dateFrom+' ~ '+adv.dateTo:''; document.getElementById('ovAdv').classList.add('show'); } function advPick(el,id,opts,key,ph){ openSearchMenu(el,opts.map(v=>({v,label:v,sel:v===adv[key]})),v=>{ adv[key]=v; advSet(id,v); closeMenus(); },{placeholder:ph}); } @@ -282,18 +283,20 @@ function openAdvCategory(el){ advPick(el,'advCategory',CAT_OPTS,'category','搜 function openAdvOp(el){ advMenu(el,'advOp',OP_OPTS,'op'); } function openAdvReviewer(el){ advMenu(el,'advReviewer',REVIEWER_OPTS,'reviewer'); } function openAdvStatus(el){ advMenu(el,'advStatus',STATUS,'status'); } -function openAdvDate(el){ openMenu(el,DATE_PRESETS.map(p=>({v:p.v,label:p.label,sel:p.v===adv.datePreset})),v=>{ adv.datePreset=v; document.getElementById('advDate').value=dateLabelOf(v); closeMenus(); }); } +// 详搜「单据日期」:直接打开范围双滚轮,锚定字段下方(对齐真实端 _AdvSearchDialog._pickDate) +function openAdvDate(el){ DateWheel.openRange(el,{from:adv.dateFrom,to:adv.dateTo,onCommit:(f,t)=>{ adv.dateFrom=f; adv.dateTo=t; document.getElementById('advDate').value=f+' ~ '+t; }}); } function applyAdv(){ state.orderNo=document.getElementById('advNo').value.trim(); state.productInfo=document.getElementById('advProduct').value.trim(); state.batch=document.getElementById('advBatch').value.trim(); state.party=adv.party; state.series=adv.series; state.spec=adv.spec; state.category=adv.category; state.op=adv.op; state.reviewer=adv.reviewer; state.status=adv.status; - applyDatePreset(adv.datePreset); + state.dateFrom=adv.dateFrom; state.dateTo=adv.dateTo; + state.dateLabel=adv.dateFrom?adv.dateFrom+' ~ '+adv.dateTo:''; state.datePreset=adv.dateFrom?'custom':'all'; state.page=1; closeOverlay('ovAdv'); render(); } function resetAdv(){ - adv={party:'全部',series:'全部',spec:'全部',category:'全部',op:'全部',reviewer:'全部',status:'全部',datePreset:'all'}; + adv={party:'全部',series:'全部',spec:'全部',category:'全部',op:'全部',reviewer:'全部',status:'全部',dateFrom:'',dateTo:''}; ['advNo','advProduct','advBatch','advParty','advSeries','advSpec','advCategory','advOp','advReviewer','advStatus','advDate'].forEach(id=>{const el=document.getElementById(id); if(el)el.value='';}); state.party='全部';state.status='全部';state.orderNo='';state.productInfo='';state.batch='';state.series='全部';state.spec='全部';state.category='全部';state.op='全部';state.reviewer='全部'; applyDatePreset('all'); state.page=1; render(); @@ -341,6 +344,7 @@ document.addEventListener('keydown',e=>{ if(e.key==='Escape'){closeMenus();docum render(); + diff --git a/design/prototype/screens/stock-out-list.html b/design/prototype/screens/stock-out-list.html index b49e1a3..b93fcc2 100644 --- a/design/prototype/screens/stock-out-list.html +++ b/design/prototype/screens/stock-out-list.html @@ -218,7 +218,9 @@ function openWhFilter(t){ openMenu(t,WAREHOUSES.map(v=>({v,label:v,sel:v===state const TODAY='2026-06-22'; function dateMinus(days){ const d=new Date(TODAY); d.setDate(d.getDate()-days); return d.toISOString().slice(0,10); } const DATE_PRESETS=[{v:'all',label:'全部时间'},{v:'7',label:'近 7 天'},{v:'30',label:'近 30 天'},{v:'month',label:'本月'}]; -function openDateFilter(t){ openMenu(t,DATE_PRESETS.map(p=>({v:p.v,label:p.label,sel:p.v===(state.datePreset||'all')})),v=>{ applyDatePreset(v); state.page=1; closeMenus(); render(); }); } +function openDateFilter(t){ openMenu(t,[...DATE_PRESETS,{v:'custom',label:'自定义…'}].map(p=>({v:p.v,label:p.label,sel:p.v===(state.datePreset||'all')})),v=>{ closeMenus(); if(v==='custom'){ openCustomRange(t); return; } applyDatePreset(v); state.page=1; render(); }); } +// 自定义范围:起止并排双滚轮锚定 chip 下方(datewheel.js openRange,对齐真实端 showDateRangeDropdown) +function openCustomRange(t){ DateWheel.openRange(t,{from:state.dateFrom,to:state.dateTo,onCommit:(f,to)=>{ state.datePreset='custom'; state.dateFrom=f; state.dateTo=to; state.dateLabel=f+' ~ '+to; state.page=1; render(); }}); } function applyDatePreset(v){ state.datePreset=v; if(v==='all'){state.dateFrom='';state.dateTo='';state.dateLabel='';} else if(v==='month'){state.dateFrom=TODAY.slice(0,7)+'-01';state.dateTo=TODAY;state.dateLabel='本月';} else {state.dateFrom=dateMinus(Number(v)-1);state.dateTo=TODAY;state.dateLabel='近'+v+'天';} } @@ -257,15 +259,14 @@ const OP_OPTS=['全部',...Array.from(new Set(ORDERS.map(o=>o.op)))]; const REVIEWER_OPTS=['全部',...Array.from(new Set(ORDERS.map(o=>o.auditor).filter(Boolean)))]; let adv={}; function advSet(id,val){ const el=document.getElementById(id); if(el)el.value=(!val||val==='全部')?'':val; } -function dateLabelOf(v){ return v==='month'?'本月':(!v||v==='all'?'':'近'+v+'天'); } function openAdvSearch(){ - adv={party:state.party,series:state.series,spec:state.spec,category:state.category,op:state.op,reviewer:state.reviewer,status:state.status,datePreset:state.datePreset||'all'}; + adv={party:state.party,series:state.series,spec:state.spec,category:state.category,op:state.op,reviewer:state.reviewer,status:state.status,dateFrom:state.dateFrom||'',dateTo:state.dateTo||''}; advSet('advParty',adv.party); advSet('advSeries',adv.series); advSet('advSpec',adv.spec); advSet('advCategory',adv.category); advSet('advOp',adv.op); advSet('advReviewer',adv.reviewer); advSet('advStatus',adv.status); document.getElementById('advNo').value=state.orderNo||''; document.getElementById('advProduct').value=state.productInfo||''; document.getElementById('advBatch').value=state.batch||''; - document.getElementById('advDate').value=dateLabelOf(adv.datePreset); + document.getElementById('advDate').value=adv.dateFrom?adv.dateFrom+' ~ '+adv.dateTo:''; document.getElementById('ovAdv').classList.add('show'); } function advPick(el,id,opts,key,ph){ openSearchMenu(el,opts.map(v=>({v,label:v,sel:v===adv[key]})),v=>{ adv[key]=v; advSet(id,v); closeMenus(); },{placeholder:ph}); } @@ -277,18 +278,20 @@ function openAdvCategory(el){ advPick(el,'advCategory',CAT_OPTS,'category','搜 function openAdvOp(el){ advMenu(el,'advOp',OP_OPTS,'op'); } function openAdvReviewer(el){ advMenu(el,'advReviewer',REVIEWER_OPTS,'reviewer'); } function openAdvStatus(el){ advMenu(el,'advStatus',STATUS,'status'); } -function openAdvDate(el){ openMenu(el,DATE_PRESETS.map(p=>({v:p.v,label:p.label,sel:p.v===adv.datePreset})),v=>{ adv.datePreset=v; document.getElementById('advDate').value=dateLabelOf(v); closeMenus(); }); } +// 详搜「单据日期」:直接打开范围双滚轮,锚定字段下方(对齐真实端 _AdvSearchDialog._pickDate) +function openAdvDate(el){ DateWheel.openRange(el,{from:adv.dateFrom,to:adv.dateTo,onCommit:(f,t)=>{ adv.dateFrom=f; adv.dateTo=t; document.getElementById('advDate').value=f+' ~ '+t; }}); } function applyAdv(){ state.orderNo=document.getElementById('advNo').value.trim(); state.productInfo=document.getElementById('advProduct').value.trim(); state.batch=document.getElementById('advBatch').value.trim(); state.party=adv.party; state.series=adv.series; state.spec=adv.spec; state.category=adv.category; state.op=adv.op; state.reviewer=adv.reviewer; state.status=adv.status; - applyDatePreset(adv.datePreset); + state.dateFrom=adv.dateFrom; state.dateTo=adv.dateTo; + state.dateLabel=adv.dateFrom?adv.dateFrom+' ~ '+adv.dateTo:''; state.datePreset=adv.dateFrom?'custom':'all'; state.page=1; closeOverlay('ovAdv'); render(); } function resetAdv(){ - adv={party:'全部',series:'全部',spec:'全部',category:'全部',op:'全部',reviewer:'全部',status:'全部',datePreset:'all'}; + adv={party:'全部',series:'全部',spec:'全部',category:'全部',op:'全部',reviewer:'全部',status:'全部',dateFrom:'',dateTo:''}; ['advNo','advProduct','advBatch','advParty','advSeries','advSpec','advCategory','advOp','advReviewer','advStatus','advDate'].forEach(id=>{const el=document.getElementById(id); if(el)el.value='';}); state.party='全部';state.status='全部';state.orderNo='';state.productInfo='';state.batch='';state.series='全部';state.spec='全部';state.category='全部';state.op='全部';state.reviewer='全部'; applyDatePreset('all'); state.page=1; render(); @@ -336,6 +339,7 @@ document.addEventListener('keydown',e=>{ if(e.key==='Escape'){closeMenus();docum render(); +