mobile.css
11.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/* 手机页(企微里打开):卡片式、大触控区域、底部固定操作条。 */
.m { --van-primary-color: var(--c-primary); --van-success-color: var(--c-ok); --van-danger-color: var(--c-err);
--van-warning-color: var(--c-warn); min-height: 100vh; background: var(--c-bg); padding-bottom: 128px; }
.m-loading { min-height: 60vh; display: grid; place-items: center; }
.m-hero { padding: 20px 18px 18px; color: #fff; background: linear-gradient(150deg, #2f3fb8, #3e52d6 70%, #5a6ce0); }
.m-hero.ok { background: linear-gradient(150deg, #107a3d, #15924a 70%, #2fa862); }
.m-hero.warn { background: linear-gradient(150deg, #b25d04, #c96b05 70%, #de8a2a); }
.m-hero.err { background: linear-gradient(150deg, #b02b2b, #d23434 70%, #e05757); }
.m-store { font-size: 12.5px; opacity: 0.85; }
.m-doc { font-size: 18px; font-weight: 650; margin-top: 2px; letter-spacing: 0.01em; }
.m-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-stage { flex-shrink: 0; padding: 2px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.18); font-size: 12.5px; }
.m-tip { margin-top: 10px; font-size: 12.5px; opacity: 0.92; line-height: 1.7; }
.m-explain-btn { margin-left: 6px; padding: 0 8px; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 9px;
background: none; color: #fff; font: inherit; font-size: 11.5px; line-height: 1.6; cursor: pointer; }
.m-explain { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.14); font-size: 12px; line-height: 1.65; }
.m-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.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: 19px; font-variant-numeric: tabular-nums; }
.m-sum span { font-size: 11.5px; opacity: 0.8; }
/* 大组(定时补货的「历史常备件」「当天出库的其他零件」):一张卡,标题吸顶可整组折叠,全选在标题右侧,二级分类嵌在卡里 */
.m-grp { margin: 12px 10px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px; box-shadow: var(--shadow); }
.m-grp-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 12px 12px 11px 14px;
background: var(--c-surface); border-radius: 14px 14px 0 0; cursor: pointer; }
.m-grp.closed .m-grp-head { border-radius: 14px; }
.m-grp-title { flex: 1; min-width: 0; }
.m-grp-title b { color: var(--c-text); font-size: 15.5px; font-weight: 700; }
.m-grp-title small { margin-left: 6px; padding: 1px 6px; border-radius: 5px; background: var(--c-primary-soft); color: var(--c-primary);
font-size: 10.5px; font-weight: 600; vertical-align: 2px; }
.m-grp-other .m-grp-title small { background: var(--c-bg); color: var(--c-text-2); }
.m-grp-sum { margin-top: 1px; color: var(--c-text-3); font-size: 12px; }
.m-grp-sum em, .m-sub-sum em { font-style: normal; color: var(--c-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.m-grp-arrow, .m-sub-arrow { display: block; flex-shrink: 0; width: 7px; height: 7px; border-right: 1.5px solid var(--c-text-3);
border-bottom: 1.5px solid var(--c-text-3); transition: transform 0.18s ease; }
.m-grp-arrow { margin: 4px 2px 0; transform: rotate(225deg); }
.m-grp.closed .m-grp-arrow { margin-top: -4px; transform: rotate(45deg); }
.m-grp-all { flex-shrink: 0; padding: 5px 10px 5px 8px; border: 1px solid var(--c-border); border-radius: 16px; background: var(--c-bg);
font-size: 12px; white-space: nowrap; }
.m-grp-all .van-checkbox__label { margin-left: 6px; color: var(--c-text-2); font-variant-numeric: tabular-nums; }
.m-grp-body { padding: 0 0 8px; border-top: 1px solid var(--c-border); }
.m-grp-desc { padding: 7px 14px 2px; color: var(--c-text-3); font-size: 12px; line-height: 1.55; }
/* 大组展开后没有零件:留一张空卡片说明,组本身不消失 */
.m-section-empty { margin: 6px 8px 0; padding: 18px 12px; border: 1px dashed var(--c-border); border-radius: 10px;
color: var(--c-text-3); font-size: 13px; text-align: center; }
/* 二级分类:卡里的一块,浅灰标题 + 已选 / 补货摘要;零件之间只用细分隔线 */
.m-subgroup { margin: 8px 8px 0; overflow: hidden; border: 1px solid var(--c-border); border-radius: 10px; }
.m-subsection { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 10px; background: #f7f8fa; }
.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-sum { margin-left: auto; color: var(--c-text-3); font-size: 11.5px; white-space: nowrap; }
.m-sub-arrow { 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-ln { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; column-gap: 10px; padding: 11px 10px; background: var(--c-surface); }
.m-ln + .m-ln { border-top: 1px solid var(--c-border); }
.m-ln.no-cb { grid-template-columns: minmax(0, 1fr) auto; }
.m-ln-cb { align-self: start; margin-top: 1px; }
.m-ln-name { color: var(--c-text); font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.m-ln-qty { text-align: right; white-space: nowrap; font-size: 15.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.m-ln-qty small { display: block; margin-top: 1px; color: var(--c-warn); font-size: 11px; font-weight: 400; }
.m-ln-main { grid-column: 2 / 4; }
.m-ln.no-cb .m-ln-main { grid-column: 1 / 3; }
.m-ln.off .m-ln-id, .m-ln.off .m-ln-main { opacity: 0.55; }
.m-ln.off .m-ln-qty, .m-ln.off .m-ln-qty small { color: var(--c-text-3); } /* 没勾选:只显示勾选后会补多少,不计入合计 */
.m-ln.zero { background: #fffcf7; }
.m-ln.zero .m-ln-qty { color: var(--c-warn); }
.m-badge { display: inline-block !important; padding: 0 6px; border-radius: 4px; background: #fff4e5; font-weight: 600 !important; }
/* 数据固定 6 格:标签在上、数字在下,上下零件纵向对齐 */
.m-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 8px; overflow: hidden;
border: 1px solid var(--c-border); border-radius: 8px; }
.m-cells > div { padding: 4px 0 3px; text-align: center; }
.m-cells > div + div { border-left: 1px solid var(--c-border); }
.m-cells span { display: block; color: var(--c-text-3); font-size: 10.5px; white-space: nowrap; }
.m-cells b { display: block; color: var(--c-text); font-size: 13px; font-variant-numeric: tabular-nums; }
.m-cells b.hi { color: var(--c-primary); }
.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.ok { border-color: #bfe3cd; background: #f3fbf6; }
.m-po-sub { margin-top: 4px; font-size: 12.5px; color: var(--c-text-3); line-height: 1.6; }
.m-label { font-size: 12px; color: var(--c-text-3); }
.m-po-no { font-size: 17px; font-weight: 650; font-family: var(--font-mono); margin-top: 2px; }
.m-shots { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; }
.m-shots .el-image { flex-shrink: 0; height: 120px; border-radius: 8px; border: 1px solid var(--c-border); overflow: hidden; cursor: zoom-in; }
.m-shots .el-image img { height: 100%; width: auto; display: block; }
.m-line-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-line-name { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.m-seq { flex-shrink: 0; width: 20px; height: 20px; border-radius: 6px; background: var(--c-primary-soft); color: var(--c-primary);
font-size: 12px; display: grid; place-items: center; }
.m-qty { font-size: 15px; font-variant-numeric: tabular-nums; }
.m-line-pn { font-family: var(--font-mono); font-size: 12px; color: var(--c-text-3); margin-top: 2px; }
.m-facts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--c-text-2); }
.m-facts b { color: var(--c-text); font-variant-numeric: tabular-nums; }
.m-wh { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; }
.m-wh .ok { color: var(--c-ok); } .m-wh .err { color: var(--c-err); }
.m-note { margin-top: 6px; font-size: 12.5px; color: var(--c-warn); }
.m-line.row-red { border-color: #f4c7c7; background: #fff8f8; }
.m-line.row-orange { border-color: #f3dcb6; background: #fffaf2; }
.m-line.row-err { border-color: #f4c7c7; }
.m-others { padding: 4px 14px; }
.m-other { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--c-border); font-size: 13px; }
.m-other:last-child { border-bottom: 0; }
.m-other.err { color: var(--c-err); }
.m-link { display: block; text-align: center; padding: 16px; font-size: 13.5px; }
.m-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 14px calc(10px + env(safe-area-inset-bottom));
background: var(--c-surface); box-shadow: 0 -4px 16px rgba(17, 24, 39, 0.08); z-index: 10; }
.m-bar-btn { flex: 1; border-radius: 10px !important; height: 44px !important; font-weight: 600; }
.m-bar-btn.main { flex: 2; }
.m-bar-sum { flex-basis: 100%; display: flex; justify-content: space-between; margin-bottom: -3px; color: var(--c-text-2); font-size: 12.5px; }
.m-bar-sum b { color: var(--c-text); font-variant-numeric: tabular-nums; }
.m-exp { padding: 4px 14px; }
.m-exp-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--c-border); }
.m-exp-row:last-child { border-bottom: 0; }
.m-exp-name { flex: 1; min-width: 0; font-size: 14px; }
/* 定时补货单据页(一页多态):期望值来源标签、过期提示、折叠组、按钮倒计时、截图兜底说明、确认提交 */
.m-expired { border-color: #f4c7c7; background: #fff5f5; color: #9e2424; font-size: 13px; line-height: 1.7; margin-top: 12px; }
.m-warnbox { border-color: #f3dcb6; background: #fffaf2; color: var(--c-warn); font-size: 13px; }
.m-other-order { margin-top: 4px; word-break: break-all; }
.m-other-order a { color: var(--c-primary, #2f6bff); text-decoration: underline; }
.m-draft { margin-top: 6px; padding: 4px 8px; border-radius: 6px; background: #fff4e5; color: var(--c-warn); font-size: 12.5px; line-height: 1.6; word-break: break-all; }
.m-fallback { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #fff1f0; color: #a8071a; font-size: 12.5px; font-weight: 600; }
.m-progress { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; }
.m-tag.cat { background: var(--c-bg); color: var(--c-text-2); }
.m-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: var(--c-primary-soft);
color: var(--c-primary); font-family: inherit; font-size: 11px; }
.m-exp-edit { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.m-exp-lbl { color: var(--c-text-3); }
.m-src { padding: 1px 7px; border-radius: 9px; font-size: 11.5px; background: #e8f6ee; color: var(--c-ok); }
.m-src.上次 { background: #e8effd; color: #2f5bd3; }
.m-src.已修改 { background: #fff3e0; color: var(--c-warn); }
.m-reset { font-size: 12px; color: var(--c-text-3); text-decoration: underline; }
.m-qty small { font-size: 11px; font-weight: 400; color: var(--c-warn); }
.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; }