style(order-service): 优化配置工作台布局
This commit is contained in:
@@ -117,10 +117,10 @@ const STATUS_STEP_OPTIONS: Array<{
|
||||
key: keyof OrderServiceStatusSteps
|
||||
label: string
|
||||
}> = [
|
||||
{ key: 'submitted', label: '第 1 步 · 提交资料' },
|
||||
{ key: 'scheduled', label: '第 2 步 · 客服安排' },
|
||||
{ key: 'processing', label: '第 3 步 · 订单处理' },
|
||||
{ key: 'completed', label: '第 4 步 · 交付完成' },
|
||||
{ key: 'submitted', label: '提交资料' },
|
||||
{ key: 'scheduled', label: '客服安排' },
|
||||
{ key: 'processing', label: '订单处理' },
|
||||
{ key: 'completed', label: '交付完成' },
|
||||
]
|
||||
|
||||
type FieldPreset = Omit<OrderServiceField, 'sortOrder'>
|
||||
@@ -285,6 +285,8 @@ export default function OrderServicePanel() {
|
||||
)
|
||||
const materialConfirmationPreview =
|
||||
Form.useWatch('materialConfirmation', form) || DEFAULT_MATERIAL_CONFIRMATION
|
||||
const confirmationEnabledValue = Form.useWatch(['materialConfirmation', 'enabled'], form)
|
||||
const confirmationEnabled = confirmationEnabledValue !== false
|
||||
|
||||
useEffect(() => {
|
||||
if (selectedCategoryId !== null || categories.length === 0) return
|
||||
@@ -582,14 +584,16 @@ export default function OrderServicePanel() {
|
||||
>
|
||||
<span className="order-service-category-main">
|
||||
<span className="order-service-category-name">{category.name}</span>
|
||||
</span>
|
||||
<span className="order-service-category-meta">
|
||||
<span className="order-service-category-key">
|
||||
{category.categoryKey}
|
||||
{category.status === 'active' ? '' : ' · 已停用'}
|
||||
</span>
|
||||
<span className={`order-service-status-pill is-${status.tone}`}>
|
||||
{status.label}
|
||||
</span>
|
||||
</span>
|
||||
<span className="order-service-category-meta">
|
||||
{category.categoryKey}
|
||||
{category.status === 'active' ? '' : ' · 已停用'}
|
||||
</span>
|
||||
</button>
|
||||
)
|
||||
})}
|
||||
@@ -641,10 +645,11 @@ export default function OrderServicePanel() {
|
||||
<Form form={form} layout="vertical" onFinish={handleSave}>
|
||||
<section className="order-service-section">
|
||||
<div className="order-service-section-head">
|
||||
<div>
|
||||
<Text strong>基础信息</Text>
|
||||
<Text type="secondary">客户打开 `/o` 后看到的标题与提示。</Text>
|
||||
</div>
|
||||
<OrderServiceSectionTitle
|
||||
index="01"
|
||||
title="基础信息"
|
||||
description="客户打开 /o 后看到的标题、说明与提交反馈"
|
||||
/>
|
||||
</div>
|
||||
<div className="order-service-basic-grid">
|
||||
<div>
|
||||
@@ -710,17 +715,22 @@ export default function OrderServicePanel() {
|
||||
|
||||
<section className="order-service-section">
|
||||
<div className="order-service-section-head">
|
||||
<div>
|
||||
<Text strong>客户状态进度文案</Text>
|
||||
<Text type="secondary">
|
||||
四个节点独立展示;标题保持简短,补充说明可填写引导文案。
|
||||
</Text>
|
||||
</div>
|
||||
<OrderServiceSectionTitle
|
||||
index="02"
|
||||
title="客户状态进度"
|
||||
description="四个节点独立展示,标题保持简短,补充说明用于安抚和引导客户"
|
||||
/>
|
||||
</div>
|
||||
<div className="order-service-status-step-grid">
|
||||
{STATUS_STEP_OPTIONS.map((step) => (
|
||||
{STATUS_STEP_OPTIONS.map((step, index) => (
|
||||
<div className="order-service-status-step-card" key={step.key}>
|
||||
<Text strong>{step.label}</Text>
|
||||
<div className="order-service-status-step-head">
|
||||
<span className="order-service-status-step-index">{index + 1}</span>
|
||||
<div>
|
||||
<Text strong>{step.label}</Text>
|
||||
<Text type="secondary">客户页第 {index + 1} 个节点</Text>
|
||||
</div>
|
||||
</div>
|
||||
<Form.Item
|
||||
label="节点标题"
|
||||
name={['statusSteps', step.key, 'title']}
|
||||
@@ -743,14 +753,18 @@ export default function OrderServicePanel() {
|
||||
|
||||
<section className="order-service-section">
|
||||
<div className="order-service-section-head">
|
||||
<div>
|
||||
<Text strong>提交资料确认</Text>
|
||||
<Text type="secondary">
|
||||
客户点击提交时弹窗确认,可自定义提示内容和按钮文字。
|
||||
</Text>
|
||||
</div>
|
||||
<Space size={8}>
|
||||
<Text type="secondary">启用确认</Text>
|
||||
<OrderServiceSectionTitle
|
||||
index="03"
|
||||
title="提交资料确认"
|
||||
description="客户点击提交时二次确认,降低资料填写错误导致的售后风险"
|
||||
/>
|
||||
<div className="order-service-confirmation-switch">
|
||||
<span>
|
||||
<Text strong>{confirmationEnabled ? '已启用' : '已关闭'}</Text>
|
||||
<Text type="secondary">
|
||||
{confirmationEnabled ? '提交前弹窗确认' : '客户将直接提交资料'}
|
||||
</Text>
|
||||
</span>
|
||||
<Form.Item
|
||||
name={['materialConfirmation', 'enabled']}
|
||||
valuePropName="checked"
|
||||
@@ -758,46 +772,79 @@ export default function OrderServicePanel() {
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
</Space>
|
||||
</div>
|
||||
</div>
|
||||
<div className="order-service-confirmation-grid">
|
||||
<div className="order-service-confirmation-editor">
|
||||
<Row gutter={[12, 0]}>
|
||||
<Col span={24}>
|
||||
<Form.Item label="确认标题" name={['materialConfirmation', 'title']}>
|
||||
<Input
|
||||
disabled={!confirmationEnabled}
|
||||
maxLength={40}
|
||||
placeholder="例如:提交资料确认"
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col xs={12}>
|
||||
<Form.Item
|
||||
label="确认按钮"
|
||||
name={['materialConfirmation', 'confirmText']}
|
||||
>
|
||||
<Input
|
||||
disabled={!confirmationEnabled}
|
||||
maxLength={12}
|
||||
placeholder="确认提交"
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col xs={12}>
|
||||
<Form.Item
|
||||
label="取消按钮"
|
||||
name={['materialConfirmation', 'cancelText']}
|
||||
>
|
||||
<Input
|
||||
disabled={!confirmationEnabled}
|
||||
maxLength={12}
|
||||
placeholder="返回检查"
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<Form.Item label="确认内容" name={['materialConfirmation', 'content']}>
|
||||
<Input.TextArea
|
||||
autoSize={{ minRows: 4, maxRows: 7 }}
|
||||
disabled={!confirmationEnabled}
|
||||
maxLength={500}
|
||||
showCount
|
||||
placeholder="请输入客户提交资料前需要确认的内容"
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
<div className="order-service-confirmation-preview-panel">
|
||||
<div className="order-service-confirmation-preview-head">
|
||||
<span>
|
||||
<Text strong>客户端预览</Text>
|
||||
<Text type="secondary">实际弹窗会按客户资料生成摘要</Text>
|
||||
</span>
|
||||
<Tag color={confirmationEnabled ? 'green' : 'default'}>
|
||||
{confirmationEnabled ? '生效中' : '未启用'}
|
||||
</Tag>
|
||||
</div>
|
||||
<MaterialConfirmationPreview confirmation={materialConfirmationPreview} />
|
||||
</div>
|
||||
</div>
|
||||
<Row gutter={[12, 0]}>
|
||||
<Col xs={24} md={12}>
|
||||
<Form.Item label="确认标题" name={['materialConfirmation', 'title']}>
|
||||
<Input maxLength={40} placeholder="例如:提交资料确认" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col xs={12} md={6}>
|
||||
<Form.Item label="确认按钮" name={['materialConfirmation', 'confirmText']}>
|
||||
<Input maxLength={12} placeholder="确认提交" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col xs={12} md={6}>
|
||||
<Form.Item label="取消按钮" name={['materialConfirmation', 'cancelText']}>
|
||||
<Input maxLength={12} placeholder="返回检查" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<Form.Item label="确认内容" name={['materialConfirmation', 'content']}>
|
||||
<Input.TextArea
|
||||
autoSize={{ minRows: 3, maxRows: 6 }}
|
||||
maxLength={500}
|
||||
showCount
|
||||
placeholder="请输入客户提交资料前需要确认的内容"
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
<MaterialConfirmationPreview confirmation={materialConfirmationPreview} />
|
||||
</section>
|
||||
|
||||
<section className="order-service-section">
|
||||
<div className="order-service-section-head">
|
||||
<div>
|
||||
<Text strong>资料字段</Text>
|
||||
<Text type="secondary">
|
||||
优先添加常用字段;标准字段会自动支持搜索、复制和资料匹配。
|
||||
</Text>
|
||||
</div>
|
||||
<OrderServiceSectionTitle
|
||||
index="04"
|
||||
title="资料字段"
|
||||
description="标准字段自动支持搜索、复制与资料匹配;自定义字段仅用于展示"
|
||||
/>
|
||||
<Space wrap>
|
||||
<Dropdown
|
||||
menu={{
|
||||
@@ -946,10 +993,11 @@ export default function OrderServicePanel() {
|
||||
<Col xs={24} xl={12}>
|
||||
<section className="order-service-section order-service-section-fill">
|
||||
<div className="order-service-section-head">
|
||||
<div>
|
||||
<Text strong>截图规则</Text>
|
||||
<Text type="secondary">控制客户上传买家主页截图的限制。</Text>
|
||||
</div>
|
||||
<OrderServiceSectionTitle
|
||||
index="05"
|
||||
title="截图规则"
|
||||
description="控制客户上传买家主页截图的限制"
|
||||
/>
|
||||
</div>
|
||||
<Row gutter={[12, 0]}>
|
||||
<Col xs={24} md={12}>
|
||||
@@ -990,10 +1038,11 @@ export default function OrderServicePanel() {
|
||||
<Col xs={24} xl={12}>
|
||||
<section className="order-service-section order-service-section-fill">
|
||||
<div className="order-service-section-head">
|
||||
<div>
|
||||
<Text strong>自动发布并核销</Text>
|
||||
<Text type="secondary">客户提交后按工单快照自动处理。</Text>
|
||||
</div>
|
||||
<OrderServiceSectionTitle
|
||||
index="06"
|
||||
title="自动发布并核销"
|
||||
description="客户提交后按工单快照自动处理"
|
||||
/>
|
||||
</div>
|
||||
<div className="order-service-switch-grid is-auto-publish">
|
||||
<Form.Item
|
||||
@@ -1121,6 +1170,26 @@ function resolveProfileStatus(profile: AdminOrderServiceProfile | undefined) {
|
||||
return { label: '已归档', tone: 'muted' }
|
||||
}
|
||||
|
||||
function OrderServiceSectionTitle({
|
||||
index,
|
||||
title,
|
||||
description,
|
||||
}: {
|
||||
index: string
|
||||
title: string
|
||||
description: string
|
||||
}) {
|
||||
return (
|
||||
<div className="order-service-section-title">
|
||||
<span className="order-service-section-index">{index}</span>
|
||||
<span className="order-service-section-title-copy">
|
||||
<Text strong>{title}</Text>
|
||||
<Text type="secondary">{description}</Text>
|
||||
</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function MaterialConfirmationPreview({
|
||||
confirmation,
|
||||
}: {
|
||||
|
||||
@@ -1663,7 +1663,7 @@
|
||||
|
||||
.order-service-layout {
|
||||
display: grid;
|
||||
grid-template-columns: 270px minmax(0, 1fr);
|
||||
grid-template-columns: 240px minmax(0, 1fr);
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
@@ -1724,21 +1724,28 @@
|
||||
|
||||
.order-service-category-main {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.order-service-category-name {
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
line-height: 1.45;
|
||||
overflow-wrap: anywhere;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.order-service-category-meta {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.order-service-category-key {
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
color: #8a94a6;
|
||||
font-size: 11px;
|
||||
@@ -1774,7 +1781,7 @@
|
||||
|
||||
.order-service-editor {
|
||||
min-width: 0;
|
||||
padding: 20px 22px 0;
|
||||
padding: 18px 20px 0;
|
||||
}
|
||||
|
||||
.order-service-editor-head {
|
||||
@@ -1794,11 +1801,12 @@
|
||||
}
|
||||
|
||||
.order-service-section {
|
||||
padding: 16px;
|
||||
margin-bottom: 14px;
|
||||
padding: 15px 16px 16px;
|
||||
margin-bottom: 12px;
|
||||
background: #ffffff;
|
||||
border: 1px solid #edf0f5;
|
||||
border: 1px solid #e8edf4;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 1px 2px rgba(31, 45, 61, 0.025);
|
||||
}
|
||||
|
||||
.order-service-section-fill {
|
||||
@@ -1808,17 +1816,46 @@
|
||||
|
||||
.order-service-section-head {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
margin-bottom: 14px;
|
||||
gap: 16px;
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
|
||||
.order-service-section-head > div:first-child {
|
||||
.order-service-section-title {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.order-service-section-index {
|
||||
display: inline-flex;
|
||||
flex: none;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
color: #1677ff;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.04em;
|
||||
background: linear-gradient(135deg, #eef5ff 0%, #e6f0ff 100%);
|
||||
border: 1px solid #cfe2ff;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.order-service-section-title-copy {
|
||||
display: grid;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.order-service-section-title-copy .ant-typography:last-child {
|
||||
max-width: 760px;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.order-service-basic-grid {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 230px;
|
||||
@@ -1845,33 +1882,132 @@
|
||||
|
||||
.order-service-status-step-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.order-service-status-step-card {
|
||||
display: grid;
|
||||
gap: 4px;
|
||||
padding: 12px;
|
||||
background: #f8fafc;
|
||||
border: 1px solid #e5eaf1;
|
||||
align-content: start;
|
||||
gap: 8px;
|
||||
padding: 11px 12px 12px;
|
||||
background: #fbfcff;
|
||||
border: 1px solid #e6ebf3;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.order-service-status-step-head {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
min-height: 32px;
|
||||
}
|
||||
|
||||
.order-service-status-step-head > div {
|
||||
display: grid;
|
||||
gap: 1px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.order-service-status-step-head .ant-typography:last-child {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.order-service-status-step-index {
|
||||
display: inline-flex;
|
||||
flex: none;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
color: #0958d9;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
background: #e6f4ff;
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.order-service-status-step-card .ant-form-item {
|
||||
margin-bottom: 6px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.order-service-confirmation-switch {
|
||||
display: flex;
|
||||
flex: none;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
padding: 7px 10px 7px 12px;
|
||||
background: #f8fafc;
|
||||
border: 1px solid #e9edf3;
|
||||
border-radius: 9px;
|
||||
}
|
||||
|
||||
.order-service-confirmation-switch > span {
|
||||
display: grid;
|
||||
gap: 1px;
|
||||
}
|
||||
|
||||
.order-service-confirmation-switch .ant-typography:last-child {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.order-service-confirmation-grid {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
|
||||
gap: 16px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.order-service-confirmation-editor {
|
||||
min-width: 0;
|
||||
padding: 13px 13px 1px;
|
||||
background: #fbfcff;
|
||||
border: 1px solid #e9eef5;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.order-service-confirmation-editor .ant-form-item:last-child {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.order-service-confirmation-preview-panel {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
padding: 13px;
|
||||
background:
|
||||
radial-gradient(circle at 100% 0%, rgba(22, 119, 255, 0.08), transparent 34%), #f7f9fc;
|
||||
border: 1px solid #e6ebf2;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.order-service-confirmation-preview-head {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.order-service-confirmation-preview-head > span {
|
||||
display: grid;
|
||||
gap: 1px;
|
||||
}
|
||||
|
||||
.order-service-confirmation-preview-head .ant-typography:last-child {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.order-service-confirmation-preview {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
max-width: 560px;
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
padding: 16px;
|
||||
color: #1f2937;
|
||||
background: #ffffff;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
|
||||
box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
|
||||
}
|
||||
|
||||
.order-service-confirmation-preview-content {
|
||||
@@ -2037,6 +2173,14 @@
|
||||
.order-service-basic-grid {
|
||||
grid-template-columns: minmax(0, 1fr) 200px;
|
||||
}
|
||||
|
||||
.order-service-status-step-grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.order-service-confirmation-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 960px) {
|
||||
@@ -2078,6 +2222,10 @@
|
||||
grid-column: 2;
|
||||
grid-row: 1 / span 3;
|
||||
}
|
||||
|
||||
.order-service-section-head {
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
@@ -2087,6 +2235,19 @@
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.order-service-section-head {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.order-service-section-title,
|
||||
.order-service-confirmation-switch {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.order-service-confirmation-switch {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.order-service-category-list {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user