Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
黄南光
/
auto-restock
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a4618219
authored
Nov 13, 2026
by
黄南光
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化前端
1 parent
98413923
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
8 deletions
.workbuddy/memory/2026-11-13.md
web/src/mobile/OrderPage.vue
web/src/mobile/mobile.css
.workbuddy/memory/2026-11-13.md
View file @
a461821
...
@@ -11,3 +11,12 @@
...
@@ -11,3 +11,12 @@
-
后端不动(数据已齐全:Line 带 category/so_hit/grp,page_state 传 stock_categories/so_months)
-
后端不动(数据已齐全:Line 带 category/so_hit/grp,page_state 传 stock_categories/so_months)
-
vue-tsc 类型检查通过(exit 0,零错误)
-
vue-tsc 类型检查通过(exit 0,零错误)
-
决策来源:老大拍板 ①大组+子组全选 ②空分类归未分类 ③so_months 跟配置走(补货规则页可配)
-
决策来源:老大拍板 ①大组+子组全选 ②空分类归未分类 ③so_months 跟配置走(补货规则页可配)
## 子组折叠 + 级联层次感(追加)
-
需求:①大组/子组要有级联层次感 ②每个二级分类子组能独立折叠收缩
-
改动:
-
mobile.css:.m-section 改成色块条(浅蓝背景+圆角);新增 .m-subgroup(左竖线+缩进包裹子组);新增 .m-sub-toggle(可点击折叠区+▸▾箭头)
-
OrderPage.vue:子组从 template v-for 改成 div.m-subgroup 包裹;子组标题拆成 checkbox(全选) + .m-sub-toggle(标题+项数+箭头);卡片加 v-show="!isCollapsed(...)" 控制折叠
-
script:新增 collapsed ref + toggleGroup/isCollapsed/gkey 函数
-
交互:点子组标题区折叠/展开(▸折叠 / ▾展开);checkbox 方框做子组全选;默认全部展开
-
vue-tsc 类型检查通过
web/src/mobile/OrderPage.vue
View file @
a461821
This diff is collapsed.
Click to expand it.
web/src/mobile/mobile.css
View file @
a461821
...
@@ -14,12 +14,41 @@
...
@@ -14,12 +14,41 @@
.m-sum
>
div
{
background
:
rgba
(
255
,
255
,
255
,
0.14
);
border-radius
:
10px
;
padding
:
8px
10px
;
display
:
flex
;
flex-direction
:
column
;
}
.m-sum
>
div
{
background
:
rgba
(
255
,
255
,
255
,
0.14
);
border-radius
:
10px
;
padding
:
8px
10px
;
display
:
flex
;
flex-direction
:
column
;
}
.m-sum
b
{
font-size
:
17px
;
font-variant-numeric
:
tabular-nums
;
}
.m-sum
b
{
font-size
:
17px
;
font-variant-numeric
:
tabular-nums
;
}
.m-sum
span
{
font-size
:
11.5px
;
opacity
:
0.8
;
}
.m-sum
span
{
font-size
:
11.5px
;
opacity
:
0.8
;
}
.m-section
{
padding
:
18px
16px
8px
;
font-weight
:
600
;
font-size
:
14px
;
color
:
var
(
--c-text
);
}
/* 大组:标题、说明和整组全选收进同一张卡,减少零散的标题条 */
.m-section
span
{
font-weight
:
400
;
font-size
:
12px
;
color
:
var
(
--c-text-3
);
margin-left
:
6px
;
}
.m-section
{
margin
:
16px
12px
10px
;
padding
:
13px
14px
12px
;
background
:
var
(
--c-surface
);
.m-subsection
{
display
:
flex
;
align-items
:
center
;
gap
:
6px
;
padding
:
10px
16px
4px
;
font-weight
:
600
;
font-size
:
13px
;
color
:
var
(
--c-text-2
);
}
border
:
1px
solid
var
(
--c-border
);
border-radius
:
14px
;
box-shadow
:
var
(
--shadow
);
}
.m-subsection
span
{
font-weight
:
400
;
font-size
:
11.5px
;
color
:
var
(
--c-text-3
);
margin-left
:
4px
;
}
.m-section-head
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
gap
:
10px
;
}
.m-allbar
{
margin
:
0
12px
10px
;
padding
:
0
14px
;
font-size
:
13.5px
;
}
.m-section-title
{
display
:
flex
;
align-items
:
center
;
gap
:
8px
;
min-width
:
0
;
color
:
var
(
--c-text
);
.m-allbar
span
{
margin-left
:
6px
;
font-size
:
12px
;
color
:
var
(
--c-text-3
);
}
font-size
:
15.5px
;
font-weight
:
700
;
line-height
:
1.4
;
}
.m-section-title
small
{
flex-shrink
:
0
;
padding
:
2px
6px
;
border-radius
:
5px
;
background
:
var
(
--c-primary-soft
);
color
:
var
(
--c-primary
);
font-size
:
10.5px
;
font-weight
:
600
;
}
.m-section-meta
{
display
:
flex
;
align-items
:
center
;
gap
:
10px
;
flex-shrink
:
0
;
}
.m-section-count
{
padding
:
2px
8px
;
border-radius
:
10px
;
background
:
var
(
--c-bg
);
color
:
var
(
--c-text-2
);
font-size
:
11.5px
;
font-variant-numeric
:
tabular-nums
;
white-space
:
nowrap
;
}
.m-section-desc
{
margin-top
:
5px
;
color
:
var
(
--c-text-3
);
font-size
:
12px
;
line-height
:
1.55
;
}
.m-section-arrow
,
.m-sub-arrow
{
display
:
block
;
width
:
7px
;
height
:
7px
;
border-right
:
1.5px
solid
var
(
--c-text-3
);
border-bottom
:
1.5px
solid
var
(
--c-text-3
);
transform
:
rotate
(
45deg
);
transition
:
transform
0.18s
ease
;
}
.m-section-arrow
{
margin
:
-4px
3px
0
0
;
}
.m-section-arrow.open
{
margin-top
:
4px
;
transform
:
rotate
(
225deg
);
}
.m-allbar
{
margin
:
10px
-14px
-12px
;
padding
:
9px
14px
;
border-top
:
1px
solid
var
(
--c-border
);
border-radius
:
0
0
13px
13px
;
background
:
var
(
--c-bg
);
font-size
:
13px
;
}
.m-allbar
.van-checkbox
{
width
:
100%
;
}
.m-allbar
span
{
margin-left
:
6px
;
color
:
var
(
--c-text-3
);
font-size
:
12px
;
}
/* 二级分类:一整张可折叠卡片;内部零件只用细分隔线,不再叠加卡片边框和竖线 */
.m-subgroup
{
margin
:
0
12px
10px
;
overflow
:
hidden
;
background
:
var
(
--c-surface
);
border
:
1px
solid
var
(
--c-border
);
border-radius
:
12px
;
box-shadow
:
0
1px
3px
rgba
(
17
,
24
,
39
,
0.04
);
}
.m-subsection
{
display
:
flex
;
align-items
:
center
;
gap
:
10px
;
min-height
:
46px
;
padding
:
10px
12px
;
}
.m-sub-toggle
{
flex
:
1
;
min-width
:
0
;
display
:
flex
;
align-items
:
center
;
gap
:
8px
;
padding
:
0
;
border
:
0
;
background
:
transparent
;
color
:
inherit
;
text-align
:
left
;
font
:
inherit
;
cursor
:
pointer
;
}
.m-sub-title
{
min-width
:
0
;
color
:
var
(
--c-text
);
font-size
:
14px
;
font-weight
:
650
;
}
.m-sub-count
{
margin-left
:
auto
;
padding
:
2px
7px
;
border-radius
:
9px
;
background
:
var
(
--c-primary-soft
);
color
:
var
(
--c-primary
);
font-size
:
11px
;
white-space
:
nowrap
;
}
.m-sub-arrow
{
flex-shrink
:
0
;
margin
:
3px
2px
0
3px
;
transform
:
rotate
(
225deg
);
}
.m-subgroup.collapsed
.m-sub-arrow
{
margin-top
:
-3px
;
transform
:
rotate
(
-45deg
);
}
.m-sub-body
{
border-top
:
1px
solid
var
(
--c-border
);
}
.m-subgroup
.m-card
{
margin
:
0
;
padding
:
12px
;
border
:
0
;
border-radius
:
0
;
box-shadow
:
none
;
}
.m-sub-body
.m-line
+
.m-line
{
border-top
:
1px
solid
var
(
--c-border
);
}
.m-subgroup.collapsed
.m-subsection
{
min-height
:
44px
;
}
.m-card
{
margin
:
0
12px
10px
;
background
:
var
(
--c-surface
);
border-radius
:
12px
;
padding
:
12px
14px
;
box-shadow
:
var
(
--shadow
);
border
:
1px
solid
var
(
--c-border
);
}
.m-card
{
margin
:
0
12px
10px
;
background
:
var
(
--c-surface
);
border-radius
:
12px
;
padding
:
12px
14px
;
box-shadow
:
var
(
--shadow
);
border
:
1px
solid
var
(
--c-border
);
}
.m-po
{
margin-top
:
12px
;
}
.m-po
{
margin-top
:
12px
;
}
.m-po.ok
{
border-color
:
#bfe3cd
;
background
:
#f3fbf6
;
}
.m-po.ok
{
border-color
:
#bfe3cd
;
background
:
#f3fbf6
;
}
...
@@ -74,7 +103,7 @@
...
@@ -74,7 +103,7 @@
.m-qty
small
{
font-size
:
11px
;
font-weight
:
400
;
color
:
var
(
--c-warn
);
}
.m-qty
small
{
font-size
:
11px
;
font-weight
:
400
;
color
:
var
(
--c-warn
);
}
.m-line.off
{
opacity
:
0.6
;
}
.m-line.off
{
opacity
:
0.6
;
}
.m-qty.off
,
.m-qty.off
small
{
color
:
var
(
--c-text-3
);
}
/* 没勾选:只显示勾选后会补多少,不计入合计 */
.m-qty.off
,
.m-qty.off
small
{
color
:
var
(
--c-text-3
);
}
/* 没勾选:只显示勾选后会补多少,不计入合计 */
.m-fold
{
cursor
:
pointer
;
display
:
flex
;
align-items
:
baseline
;
flex-wrap
:
wrap
;
}
.m-fold
{
cursor
:
pointer
;
}
.m-fold
i
{
margin-left
:
auto
;
font-style
:
normal
;
color
:
var
(
--c-text-3
)
;
}
.m-fold
.m-section-title
{
flex-wrap
:
wrap
;
}
.m-count
{
display
:
inline-block
;
margin-left
:
6px
;
padding
:
0
6px
;
border-radius
:
8px
;
background
:
rgba
(
255
,
255
,
255
,
0.22
);
.m-count
{
display
:
inline-block
;
margin-left
:
6px
;
padding
:
0
6px
;
border-radius
:
8px
;
background
:
rgba
(
255
,
255
,
255
,
0.22
);
font-variant-numeric
:
tabular-nums
;
font-size
:
12.5px
;
}
font-variant-numeric
:
tabular-nums
;
font-size
:
12.5px
;
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment