diff --git a/apps/frontend/src/pages/admin/panels/OrderServicePanel.tsx b/apps/frontend/src/pages/admin/panels/OrderServicePanel.tsx index efe9cd1c..5a0be982 100644 --- a/apps/frontend/src/pages/admin/panels/OrderServicePanel.tsx +++ b/apps/frontend/src/pages/admin/panels/OrderServicePanel.tsx @@ -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 @@ -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() { > {category.name} + + + + {category.categoryKey} + {category.status === 'active' ? '' : ' · 已停用'} + {status.label} - - {category.categoryKey} - {category.status === 'active' ? '' : ' · 已停用'} - ) })} @@ -641,10 +645,11 @@ export default function OrderServicePanel() {
-
- 基础信息 - 客户打开 `/o` 后看到的标题与提示。 -
+
@@ -710,17 +715,22 @@ export default function OrderServicePanel() {
-
- 客户状态进度文案 - - 四个节点独立展示;标题保持简短,补充说明可填写引导文案。 - -
+
- {STATUS_STEP_OPTIONS.map((step) => ( + {STATUS_STEP_OPTIONS.map((step, index) => (
- {step.label} +
+ {index + 1} +
+ {step.label} + 客户页第 {index + 1} 个节点 +
+
-
- 提交资料确认 - - 客户点击提交时弹窗确认,可自定义提示内容和按钮文字。 - -
- - 启用确认 + +
+ + {confirmationEnabled ? '已启用' : '已关闭'} + + {confirmationEnabled ? '提交前弹窗确认' : '客户将直接提交资料'} + + - +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + 客户端预览 + 实际弹窗会按客户资料生成摘要 + + + {confirmationEnabled ? '生效中' : '未启用'} + +
+ +
- - - - - - - - - - - - - - - - - - - - - - -
-
- 资料字段 - - 优先添加常用字段;标准字段会自动支持搜索、复制和资料匹配。 - -
+
-
- 截图规则 - 控制客户上传买家主页截图的限制。 -
+
@@ -990,10 +1038,11 @@ export default function OrderServicePanel() {
-
- 自动发布并核销 - 客户提交后按工单快照自动处理。 -
+
+ {index} + + {title} + {description} + +
+ ) +} + function MaterialConfirmationPreview({ confirmation, }: { diff --git a/apps/frontend/src/styles/admin.css b/apps/frontend/src/styles/admin.css index 2cc29b3c..aae9ff1d 100644 --- a/apps/frontend/src/styles/admin.css +++ b/apps/frontend/src/styles/admin.css @@ -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; }