完善新版开单交互与移动布局,修复纸单号复制反馈

This commit is contained in:
黄健铭 committed 2026-12-04 21:52:39 -08:00
1 parent c594bf296f
commit f1a4e69f0d
20 files changed
+567 -91

No files matched your search

@@ -155,6 +155,26 @@ export function AppShell({
</span>
}
>
<div className="drawer-user">
<div className="drawer-user-info">
<span className="identity-avatar" aria-hidden="true">
{Array.from(who)[0]}
</span>
<div className="drawer-user-text">
<strong>{who}</strong>
<small>{state.user.role === 'owner' ? '店主' : '店员'}</small>
</div>
</div>
<Button
size="small"
icon={<LogoutOutlined />}
loading={leaving}
disabled={client.busy}
onClick={() => void leave()}
>
退出
</Button>
</div>
<SideNav role={state.user.role} onNavigate={() => setMenuOpen(false)} />
<div className="drawer-meta">
<Tag bordered={false}>{modeLabel(state.mode)}</Tag>
@@ -1,5 +1,5 @@
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { Alert, App as AntApp, Button, Spin, Typography } from 'antd';
import { Alert, App as AntApp, Button, Popconfirm, Spin, Typography } from 'antd';
import { ClearOutlined } from '@ant-design/icons';
import type { ApiError, LedgerClient, PendingJob } from '../../lib/api';
import { clearDraft, loadDraft } from '../../lib/drafts';
@@ -188,6 +188,36 @@ function CreateOrderForm({
setError('');
reset(null);
}
const hasDraftInput = useMemo(
() =>
Boolean(
form.id ||
form.customer.trim() ||
form.customer_type ||
form.note.trim() ||
form.internal_note.trim() ||
(form.discount.trim() && form.discount.trim() !== '0') ||
form.lines.length > 1 ||
form.lines.some(
line =>
line.quantity.trim() ||
line.goldPrice.trim() ||
line.laborRate.trim() ||
line.baseSale.trim() ||
line.charges.length > 0,
) ||
form.feeRows.length > 0 ||
Object.values(form.presets?.checked || {}).some(Boolean),
),
[form],
);
const feeCount = useMemo(() => {
const presetCount = Object.values(form.presets?.checked || {}).filter(Boolean).length;
return presetCount + form.feeRows.length;
}, [form.presets, form.feeRows.length]);
const jumpTo = useCallback((id: string) => {
document.getElementById(id)?.scrollIntoView({ behavior: 'smooth', block: 'start' });
}, []);
if (issued)
return (
@@ -206,9 +236,35 @@ function CreateOrderForm({
<Typography.Title level={1}>开一张新单</Typography.Title>
<Typography.Paragraph type="secondary">开单即交付,一次记录全额收款、实际费用、出库和利润。</Typography.Paragraph>
</div>
<Button icon={<ClearOutlined />} data-action="clear-draft" disabled={busy} onClick={startNew}>
清空表单
</Button>
{hasDraftInput ? (
<Popconfirm
title="确定清空当前表单?"
description="已填写的商品、费用与备注都会清除,且无法撤销。"
okText="确认清空"
cancelText="保留"
okButtonProps={{ danger: true }}
onConfirm={() => {
startNew();
message.success('表单已清空');
}}
>
<Button icon={<ClearOutlined />} data-action="clear-draft" disabled={busy}>
清空表单
</Button>
</Popconfirm>
) : (
<Button
icon={<ClearOutlined />}
data-action="clear-draft"
disabled={busy}
onClick={() => {
startNew();
message.info('当前表单已是空白');
}}
>
清空表单
</Button>
)}
</div>
{pending && (
<Alert
@@ -248,6 +304,22 @@ function CreateOrderForm({
update={update}
reset={draft => reset(draft)}
/>
<nav className="section-nav" aria-label="表单分区快捷跳转">
<button type="button" className="section-pill" onClick={() => jumpTo('section-customer')}>
<span className="section-pill-no">01</span> 客户与单据
</button>
<button type="button" className="section-pill" onClick={() => jumpTo('section-lines')}>
<span className="section-pill-no">02</span> 商品明细
<span className="section-pill-badge">{form.lines.length}</span>
</button>
<button type="button" className="section-pill section-pill-internal" onClick={() => jumpTo('section-fees')}>
<span className="section-pill-no">03</span> 实际费用
{feeCount > 0 ? <span className="section-pill-badge">{feeCount}</span> : null}
</button>
<button type="button" className="section-pill" onClick={() => jumpTo('section-summary')}>
<span className="section-pill-no">04</span> 优惠与备注
</button>
</nav>
<form
id="order-form"
ref={formRef}
@@ -276,7 +348,14 @@ function CreateOrderForm({
update={update}
onError={text => message.error(text)}
/>
<SubmitBar form={form} summary={summary} busy={busy} error={error} />
<SubmitBar
form={form}
summary={summary}
busy={busy}
error={error}
onClearError={() => setError('')}
onLocateError={() => focusInvalidField(formRef.current, error)}
/>
</fieldset>
</form>
</div>
@@ -23,6 +23,7 @@ export function CustomerSection({
const card = form.payment.method === '信用卡';
return (
<Section
id="section-customer"
step="01"
title="客户与单据"
help="生成单据即按成交合计记录全额收款,同时按所选货盘扣减黄金库存并计入实际利润。请核对商品已交付,选择实际收款方式与收款人;业务日期作为收款和出库日期。"
@@ -202,11 +202,18 @@ function TemplatePanel({
aria-label="选择模板"
data-testid="template-select"
style={{ minWidth: 220 }}
allowClear
value={selected || undefined}
placeholder={rows ? '选择后自动填入预设' : '正在读取模板…'}
disabled={!rows}
options={(rows || []).map(row => ({ value: row.id, label: row.name }))}
onChange={id => apply(id).catch(err => setStatus({ text: (err as Error).message, error: true }))}
onChange={id => {
if (!id) {
setSelected('');
return;
}
apply(id).catch(err => setStatus({ text: (err as Error).message, error: true }));
}}
/>
<Button onClick={() => setDialog({ kind: 'new', name: '', error: '' })}>保存为新模板</Button>
<Button
@@ -240,9 +247,11 @@ function TemplatePanel({
<Input
aria-label="模板名称"
maxLength={60}
autoFocus
placeholder="例如:足金手链常用报价"
value={dialog?.name || ''}
onChange={event => setDialog(current => current && { ...current, name: event.target.value })}
onPressEnter={() => void save()}
/>
{dialog?.error && <Alert type="error" showIcon message={dialog.error} style={{ marginTop: 12 }} />}
</Modal>
@@ -312,12 +321,28 @@ function FormulaPanel({ form, ctx, update }: { form: OrderForm; ctx: SyncContext
placeholder={'0.79×822+120=769\n0.58×(822+45)+55=558\n769+558=1327'}
value={text}
onChange={event => setText(event.target.value)}
onKeyDown={event => {
if ((event.metaKey || event.ctrlKey) && event.key === 'Enter' && text.trim()) {
event.preventDefault();
fill(false);
}
}}
/>
<Space style={{ marginTop: 8 }}>
<Space wrap style={{ marginTop: 8 }}>
<Button type="primary" onClick={() => fill(false)}>
识别并预填
</Button>
{result?.kind === 'warning' && <Button onClick={() => fill(true)}>按计算金额预填</Button>}
{text && (
<Button
onClick={() => {
setText('');
setResult(null);
}}
>
清空公式
</Button>
)}
</Space>
<p className="small muted">
括号内是克工费;金价乘克重后加的是一件工费,再加的金额记为附加费。合计行只校验,不增加商品。客户、货盘及内部成本仍按实际填写。
@@ -31,6 +31,7 @@ export function FeeCosts({
: `上方附加项目自动带入成本。证书默认${defaults.certificate}元、包装${defaults.packaging}元;快递按整单默认${defaults.shipping}元,均可修改。请填写实际已付金额,没有成本填0;不需要的整单费用可移除。开单时记录费用和付款人。`;
return (
<Section
id="section-fees"
step="03"
title="实际费用"
internal
@@ -41,7 +42,15 @@ export function FeeCosts({
size="small"
icon={<PlusOutlined />}
data-action="add-fee"
onClick={() => update(f => Model.addManualFee(f, state, uuid))}
onClick={() => {
update(f => Model.addManualFee(f, state, uuid));
window.requestAnimationFrame(() => {
const rows = document.querySelectorAll('.fee-row [data-field="feeNote"] input');
const last = rows[rows.length - 1] as HTMLInputElement | undefined;
last?.scrollIntoView?.({ behavior: 'smooth', block: 'nearest' });
last?.focus?.({ preventScroll: true });
});
}}
>
添加其他成本
</Button>
@@ -1,5 +1,6 @@
import { Button, Card, Result, Space, Typography } from 'antd';
import { FileTextOutlined, PlusOutlined, PrinterOutlined } from '@ant-design/icons';
import { useState } from 'react';
import { App as AntApp, Button, Card, Result, Space, Tooltip, Typography } from 'antd';
import { CheckOutlined, CopyOutlined, FileTextOutlined, PlusOutlined, PrinterOutlined } from '@ant-design/icons';
import { orderAmount } from '../../lib/format';
export interface IssuedOrder {
@@ -24,7 +25,21 @@ export function IssuedResult({
onRetry: () => void;
onNew: () => void;
}) {
const { message } = AntApp.useApp();
const [copied, setCopied] = useState(false);
const loaded = order.total !== undefined;
async function copyPaperNumber() {
if (!order.paper_number) return;
try {
await navigator.clipboard.writeText(order.paper_number);
setCopied(true);
message.success('已复制纸单号 ' + order.paper_number);
window.setTimeout(() => setCopied(false), 1800);
} catch {
setCopied(false);
message.info('请手动选择纸单号复制');
}
}
return (
<div className="issued-page">
<Card className="issued-card">
@@ -46,8 +61,22 @@ export function IssuedResult({
<dt>
<Typography.Text type="secondary">纸单号</Typography.Text>
</dt>
<dd className="issued-value num" data-testid="issued-paper-number">
{order.paper_number || '未分配'}
<dd className="issued-value-row">
<span className="issued-value num" data-testid="issued-paper-number">
{order.paper_number || '未分配'}
</span>
{order.paper_number && (
<Tooltip title={copied ? '已复制' : '复制纸单号'}>
<Button
type="text"
size="small"
className="issued-copy-btn"
aria-label="复制纸单号"
icon={copied ? <CheckOutlined /> : <CopyOutlined />}
onClick={() => void copyPaperNumber()}
/>
</Tooltip>
)}
</dd>
</div>
<div className="issued-item">
@@ -37,6 +37,7 @@ export function LineItems({
};
return (
<Section
id="section-lines"
step="02"
title="商品明细"
help="金价与工费分开填写。银饰不扣黄金货盘;外配使用店内金料时,选实际出库货盘。"
@@ -62,7 +63,15 @@ export function LineItems({
className="add-line-button"
icon={<PlusOutlined />}
data-action="add-line"
onClick={() => guarded(f => Model.addLine(f, { st: state, uuid }))}
onClick={() => {
const nextIndex = form.lines.length;
guarded(f => Model.addLine(f, { st: state, uuid }));
window.requestAnimationFrame(() => {
document
.querySelector(`[data-line="${nextIndex}"]`)
?.scrollIntoView?.({ behavior: 'smooth', block: 'nearest' });
});
}}
>
添加商品
</Button>
@@ -101,16 +110,29 @@ function LineCard({
<strong>商品 {String(index + 1).padStart(2, '0')}</strong>
<span className="line-name muted">{line.nameType === '其他' ? line.customName : line.nameType}</span>
</div>
<Button
type="text"
size="small"
icon={<DeleteOutlined />}
data-action="remove-line"
disabled={!canRemove}
onClick={onRemove}
>
移除
</Button>
<div className="line-top-right">
{line.sale && (
<span className="line-subtotal-chip num">
{line.quantity ? (
<span className="line-qty-meta">
{line.quantity}
{line.unit}
</span>
) : null}
<span>¥{line.sale}</span>
</span>
)}
<Button
type="text"
size="small"
icon={<DeleteOutlined />}
data-action="remove-line"
disabled={!canRemove}
onClick={onRemove}
>
移除
</Button>
</div>
</div>
<Row gutter={[16, 14]}>
<ChoiceField
@@ -4,6 +4,7 @@ import { Help, InternalTag } from './fields';
// 开单页分区卡片:编号(沿用旧界面 01 02… 的样式)、标题、可选说明与右侧操作;内部分区用金色左边框与暖色底。
export function Section({
id,
step,
title,
help,
@@ -13,6 +14,7 @@ export function Section({
testId,
children,
}: {
id?: string;
step: string;
title: ReactNode;
help?: ReactNode;
@@ -24,6 +26,7 @@ export function Section({
}) {
return (
<Card
id={id}
className={'panel' + (internal ? ' panel-internal' : '') + (className ? ' ' + className : '')}
data-testid={testId}
title={
@@ -1,4 +1,6 @@
import { useRef } from 'react';
import { Alert, Button, Input, Row } from 'antd';
import type { TextAreaRef } from 'antd/es/input/TextArea';
import { CheckOutlined, LockOutlined } from '@ant-design/icons';
import { Model } from '../../shared';
import type { FormSummary, OrderForm } from '../../shared';
@@ -25,8 +27,9 @@ export function SummarySection({
}) {
const shown = Model.filterNoteTags(tags, form.internal_note);
const query = /(?:^|[\s,。;、])#([\p{L}\p{N}_-]*)$/u.test(form.internal_note);
const internalNoteRef = useRef<TextAreaRef>(null);
return (
<Section step="04" title="优惠与备注">
<Section id="section-summary" step="04" title="优惠与备注">
<Row gutter={[16, 14]}>
<TextField
span={{ xs: 24, md: 8 }}
@@ -61,6 +64,7 @@ export function SummarySection({
id="order-internal-note"
>
<Input.TextArea
ref={internalNoteRef}
id="order-internal-note"
name="internal_note"
aria-label="内部备注"
@@ -75,25 +79,30 @@ export function SummarySection({
{tagsStatus ? (
<span className="small muted">{tagsStatus}</span>
) : shown.length ? (
shown.map(tag => (
<Button
key={tag}
size="small"
className="note-tag"
data-note-tag={tag}
disabled={busy}
onClick={() => {
try {
const next = Model.insertNoteTag(form.internal_note, tag);
update(f => ({ ...f, internal_note: next }));
} catch (err) {
onError((err as Error).message);
}
}}
>
{tag}
</Button>
))
shown.map(tag => {
const active = form.internal_note.includes(tag);
return (
<Button
key={tag}
size="small"
className={'note-tag' + (active ? ' note-tag-active' : '')}
data-note-tag={tag}
aria-pressed={active}
disabled={busy}
onClick={() => {
try {
const next = Model.insertNoteTag(form.internal_note, tag);
update(f => ({ ...f, internal_note: next }));
window.setTimeout(() => internalNoteRef.current?.focus(), 0);
} catch (err) {
onError((err as Error).message);
}
}}
>
{tag}
</Button>
);
})
) : (
<span className="small muted">
{query ? '没有匹配标签,可继续输入新标签。' : '暂无已保存标签,填写 #词语 并保存订单后即可复用。'}
@@ -111,18 +120,38 @@ export function SubmitBar({
summary,
busy,
error,
onClearError,
onLocateError,
}: {
form: OrderForm;
summary: FormSummary;
busy: boolean;
error: string;
onClearError?: () => void;
onLocateError?: () => void;
}) {
const discount = String(form.discount).trim();
const discountCents = /^\d+(?:\.\d{1,2})?$/.test(discount) ? Math.round(Number(discount) * 100) : 0;
return (
<div className="submit-bar" role="region" aria-label="成交合计与提交">
{error && (
<Alert type="error" showIcon message={error} className="order-error" role="alert" data-testid="order-error" />
<Alert
type="error"
showIcon
closable={!!onClearError}
onClose={onClearError}
message={error}
action={
onLocateError ? (
<Button size="small" type="link" danger onClick={onLocateError}>
定位问题项
</Button>
) : undefined
}
className="order-error"
role="alert"
data-testid="order-error"
/>
)}
<div className="submit-bar-row">
<div className="submit-total">
@@ -1,5 +1,5 @@
import { useState } from 'react';
import { Alert, Button, Card, Form, Input, Select, Typography } from 'antd';
import { useRef, useState } from 'react';
import { Alert, Button, Card, Form, Input, Select, Typography, type InputRef } from 'antd';
import { ArrowRightOutlined, LockOutlined, UserOutlined } from '@ant-design/icons';
import { BrandMark } from '../../components/BrandMark';
import { modeLabel } from '../../lib/format';
@@ -105,6 +105,7 @@ function LoginForm({
}) {
const [member, setMember] = useState('');
const [password, setPassword] = useState('');
const passwordRef = useRef<InputRef>(null);
return (
<form
className="login-form"
@@ -122,11 +123,15 @@ function LoginForm({
value={member || undefined}
placeholder="请选择账号"
options={options.map(row => ({ value: row.member, label: row.label }))}
onChange={setMember}
onChange={value => {
setMember(value);
window.setTimeout(() => passwordRef.current?.focus(), 0);
}}
/>
</Form.Item>
<Form.Item label="密码" required>
<Input.Password
ref={passwordRef}
name="password"
aria-label="密码"
prefix={<LockOutlined className="input-icon" />}
+264 -17
View File
@@ -3,6 +3,9 @@
* {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
html,
body {
margin: 0;
@@ -32,6 +35,7 @@ input.num {
a:focus-visible,
.help-icon:focus-visible,
.nav-link:focus-visible,
.section-pill:focus-visible,
.order-cost-option:focus-within {
outline: 2px solid var(--gold);
outline-offset: 2px;
@@ -55,8 +59,10 @@ a:focus-visible,
gap: 12px;
height: 68px;
padding: 0 28px;
background: var(--white);
background: rgba(255, 254, 250, 0.96);
backdrop-filter: blur(8px);
border-bottom: 1px solid var(--border);
box-shadow: 0 1px 3px rgba(35, 61, 53, 0.03);
}
.app-header-brand {
display: flex;
@@ -111,8 +117,21 @@ a:focus-visible,
font-size: 12px;
}
.old-ui-link {
display: inline-flex;
align-items: center;
gap: 5px;
white-space: nowrap;
font-size: 13px;
color: var(--muted);
padding: 4px 8px;
border-radius: 6px;
transition:
color 0.15s,
background 0.15s;
}
.old-ui-link:hover {
color: var(--green);
background: rgba(37, 78, 64, 0.06);
}
.identity {
display: inline-flex;
@@ -216,6 +235,40 @@ a:focus-visible,
.nav-drawer .ant-drawer-body {
padding: 12px;
}
.drawer-user {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
margin: 0 4px 12px;
padding: 10px 12px;
border-radius: 10px;
background: var(--paper);
border: 1px solid var(--border);
}
.drawer-user-info {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
}
.drawer-user-text {
display: flex;
flex-direction: column;
min-width: 0;
line-height: 1.3;
}
.drawer-user-text strong {
font-size: 14px;
color: var(--ink);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.drawer-user-text small {
font-size: 11.5px;
color: var(--muted);
}
.drawer-meta {
display: flex;
align-items: center;
@@ -232,9 +285,10 @@ a:focus-visible,
/* ───────── 页面主体 ───────── */
.main {
min-width: 0;
max-width: 1180px;
max-width: 1520px;
width: 100%;
padding: 28px 32px 0;
margin: 0 auto;
padding: 28px 36px 0;
}
.page-heading {
display: flex;
@@ -263,6 +317,74 @@ a:focus-visible,
.create-page > .ant-alert {
margin-bottom: 12px;
}
/* 分区快捷跳转条:桌面一行展示,窄屏可横向轻滑,不触发整页横向溢出 */
.section-nav {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 14px;
padding: 2px 0;
overflow-x: auto;
scrollbar-width: none;
-webkit-overflow-scrolling: touch;
}
.section-nav::-webkit-scrollbar {
display: none;
}
.section-pill {
display: inline-flex;
align-items: center;
gap: 6px;
flex: none;
padding: 6px 12px;
border: 1px solid var(--border);
border-radius: 999px;
background: var(--white);
color: var(--ink);
font-size: 12.5px;
font-weight: 500;
cursor: pointer;
transition:
border-color 0.15s,
background 0.15s,
color 0.15s,
box-shadow 0.15s;
}
.section-pill:hover {
border-color: var(--green);
color: var(--green);
background: var(--soft);
}
.section-pill-internal:hover {
border-color: var(--gold);
color: var(--internal-text);
background: var(--internal-bg);
}
.section-pill-no {
font-size: 11px;
font-weight: 700;
color: var(--green);
font-variant-numeric: tabular-nums;
}
.section-pill-internal .section-pill-no {
color: var(--gold-text);
}
.section-pill-badge {
display: inline-flex;
align-items: center;
padding: 0 6px;
height: 18px;
border-radius: 999px;
background: var(--soft);
color: var(--green);
font-size: 11px;
font-weight: 600;
font-variant-numeric: tabular-nums;
}
.section-pill-internal .section-pill-badge {
background: #f6ead5;
color: var(--internal-text);
}
.form-fieldset {
border: 0;
margin: 0;
@@ -285,6 +407,13 @@ a:focus-visible,
border-radius: 12px;
background: var(--white);
overflow: hidden;
transition:
border-color 0.15s,
box-shadow 0.15s;
}
.entry-tools.ant-collapse > .ant-collapse-item:hover {
border-color: var(--border-strong);
box-shadow: 0 2px 8px rgba(35, 61, 53, 0.05);
}
.entry-tools.ant-collapse > .ant-collapse-item:last-child,
.entry-tools.ant-collapse > .ant-collapse-item:last-child > .ant-collapse-header {
@@ -306,6 +435,8 @@ a:focus-visible,
margin-bottom: 16px;
border-color: var(--border);
box-shadow: 0 1px 2px rgba(35, 61, 53, 0.04);
scroll-margin-top: 84px;
transition: box-shadow 0.2s ease;
}
.panel > .ant-card-head {
border-bottom-color: var(--border);
@@ -376,6 +507,8 @@ a:focus-visible,
flex-direction: column;
gap: 6px;
min-width: 0;
scroll-margin-top: 96px;
scroll-margin-bottom: 112px;
}
.field-label-row {
display: flex;
@@ -441,12 +574,45 @@ a:focus-visible,
padding: 16px 18px 18px;
margin-bottom: 16px;
background: #fff;
scroll-margin-top: 88px;
transition:
border-color 0.18s ease,
box-shadow 0.18s ease;
}
.line-item:focus-within {
border-color: rgba(37, 78, 64, 0.42);
box-shadow: 0 4px 16px rgba(35, 61, 53, 0.07);
}
.line-top {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
flex-wrap: wrap;
margin-bottom: 12px;
padding-bottom: 10px;
border-bottom: 1px solid var(--border);
}
.line-top-right {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.line-subtotal-chip {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 2px 10px;
border-radius: 999px;
background: var(--soft);
color: var(--green);
font-size: 12.5px;
font-weight: 600;
}
.line-subtotal-chip .line-qty-meta {
color: var(--muted);
font-weight: 500;
}
.line-heading {
display: flex;
@@ -656,27 +822,30 @@ a:focus-visible,
.order-cost-option {
display: flex;
flex-direction: column;
gap: 10px;
padding: 12px 14px;
border: 1px solid var(--internal-border-alt);
border-radius: 10px;
background: #fff;
transition:
border-color 0.15s,
box-shadow 0.15s;
box-shadow 0.15s,
background-color 0.15s;
}
.order-cost-option:hover {
border-color: var(--internal-border);
border-color: var(--gold);
background: #fffdf9;
}
.order-cost-option.checked {
border-color: var(--internal-text-alt);
box-shadow: inset 0 0 0 1px var(--internal-text-alt);
background: #fffdf7;
box-shadow:
inset 0 0 0 1px var(--internal-text-alt),
0 2px 6px rgba(128, 86, 23, 0.08);
background: #fffdf5;
}
.order-cost-check.ant-checkbox-wrapper {
display: flex;
align-items: flex-start;
width: 100%;
padding: 12px 14px;
}
.order-cost-check .ant-checkbox {
margin-top: 2px;
@@ -708,7 +877,7 @@ a:focus-visible,
font-size: 12px;
}
.order-cost-quantity {
padding-left: 26px;
padding: 0 14px 12px 40px;
}
/* 费用行 */
@@ -779,6 +948,21 @@ a:focus-visible,
border-color: var(--internal-border);
color: var(--internal-text);
background: #fff;
transition:
background-color 0.15s,
border-color 0.15s,
color 0.15s;
}
.note-tag.ant-btn:not(:disabled):hover {
border-color: var(--gold);
background: #fdf6e7;
color: var(--internal-text);
}
.note-tag.note-tag-active.ant-btn {
border-color: var(--internal-text-alt);
background: #f6ead5;
color: var(--internal-text);
font-weight: 600;
}
/* ───────── 底部常驻操作栏 ───────── */
@@ -851,24 +1035,29 @@ a:focus-visible,
}
.issued-card.ant-card {
width: 100%;
max-width: 680px;
max-width: 780px;
border-color: var(--border);
border-top: 4px solid var(--green);
}
.issued-summary {
display: flex;
justify-content: center;
gap: 0;
align-items: stretch;
margin: 0;
padding: 16px 8px;
border: 1px solid var(--border);
border-radius: 12px;
background: var(--paper);
flex-wrap: wrap;
}
.issued-item {
flex: 1 1 160px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex: 1 1 auto;
padding: 4px 16px;
min-width: 0;
text-align: center;
}
.issued-item + .issued-item {
border-left: 1px solid var(--border);
@@ -880,9 +1069,9 @@ a:focus-visible,
margin: 4px 0 0;
}
.issued-value {
font-size: 24px;
font-size: 22px;
font-weight: 700;
letter-spacing: 1px;
letter-spacing: 0.5px;
}
.issued-total {
color: var(--green);
@@ -890,6 +1079,18 @@ a:focus-visible,
.issued-value.small {
font-size: 18px;
}
.issued-value-row {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
}
.issued-copy-btn.ant-btn {
color: var(--muted);
}
.issued-copy-btn.ant-btn:hover {
color: var(--green);
}
.issued-actions {
display: flex;
justify-content: center;
@@ -984,10 +1185,23 @@ h1.login-title.ant-typography {
border-radius: 12px;
border-color: var(--border);
background: #fff;
transition:
border-color 0.16s,
background-color 0.16s,
box-shadow 0.16s,
transform 0.16s;
}
.role-card.ant-btn:not(:disabled):hover {
border-color: var(--green);
background: #fbfcf9;
box-shadow: 0 4px 14px rgba(37, 78, 64, 0.08);
transform: translateY(-1px);
}
.role-card.ant-btn:not(:disabled):active {
transform: translateY(0);
}
.role-card.ant-btn:not(:disabled):hover .role-go {
transform: translateX(3px);
}
.role-avatar {
display: inline-grid;
@@ -1022,6 +1236,7 @@ h1.login-title.ant-typography {
}
.role-go {
color: var(--gold);
transition: transform 0.16s;
}
/* ───────── 响应式 ───────── */
@@ -1148,6 +1363,9 @@ h1.login-title.ant-typography {
gap: 8px;
}
.order-cost-option {
padding: 0;
}
.order-cost-check.ant-checkbox-wrapper {
padding: 10px 12px;
}
.order-cost-main {
@@ -1155,7 +1373,18 @@ h1.login-title.ant-typography {
gap: 0;
}
.order-cost-quantity {
padding-left: 0;
padding: 0 12px 10px;
}
.order-form .ant-input,
.order-form .ant-input-affix-wrapper input,
.order-form textarea.ant-input {
font-size: 15px;
}
.panel.ant-card {
scroll-margin-top: 72px;
}
.line-item {
scroll-margin-top: 74px;
}
.submit-bar {
margin: 8px -12px 0;
@@ -1208,6 +1437,12 @@ h1.login-title.ant-typography {
max-height: 30vh;
overflow: auto;
}
.issued-summary {
flex-direction: column;
}
.issued-item {
flex: none;
}
.issued-item + .issued-item {
border-left: 0;
border-top: 1px solid var(--border);
@@ -1219,3 +1454,15 @@ h1.login-title.ant-typography {
padding: 28px 20px 20px;
}
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
*,
*::before,
*::after {
transition-duration: 0.01ms !important;
animation-duration: 0.01ms !important;
}
}
+2
View File
@@ -66,6 +66,8 @@ export const theme: ThemeConfig = {
Tooltip: { colorBgSpotlight: brand.ink },
Result: { titleFontSize: 22 },
Drawer: { colorBgElevated: brand.white },
Input: { hoverBorderColor: brand.greenHover, activeBorderColor: brand.green },
Select: { hoverBorderColor: brand.greenHover, activeBorderColor: brand.green },
},
};