From 3ba7b179e885b0cd27fad164339c8b4cf7c08781 Mon Sep 17 00:00:00 2001 From: jacy <18049821889@163.com> Date: Mon, 3 Aug 2026 19:59:44 +0800 Subject: [PATCH] =?UTF-8?q?style(store):=20=E7=BB=9F=E4=B8=80=E9=97=A8?= =?UTF-8?q?=E5=BA=97=E5=A5=97=E9=A4=90=E9=A1=B5=20UI=20=E4=B8=8E=E6=8B=93?= =?UTF-8?q?=E5=BA=97=E6=A0=A1=E9=AA=8C=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 管理后台套餐 Tab 对齐 Ant Design 表单;合伙人/门店端套餐表单与基本信息页风格一致;拓店下一步校验增加弹窗提示。 Co-authored-by: Cursor --- .../components/AdminStorePackagesSection.tsx | 95 +++++--- .../src/components/StorePackagesForm.tsx | 140 +++++++----- apps/h5-partner/src/pages/StoreCreatePage.tsx | 41 +++- .../src/pages/StorePackagesPage.tsx | 72 ++++-- apps/h5-partner/src/styles.css | 76 +++++++ .../src/components/ShopPackagesForm.tsx | 108 +++++++++ apps/h5-shop/src/pages/PackagesPage.tsx | 205 ++++++++---------- apps/h5-shop/src/styles.css | 135 ++++++++++++ 8 files changed, 637 insertions(+), 235 deletions(-) create mode 100644 apps/h5-shop/src/components/ShopPackagesForm.tsx diff --git a/apps/admin-web/src/components/AdminStorePackagesSection.tsx b/apps/admin-web/src/components/AdminStorePackagesSection.tsx index 9a38790..0a01a41 100644 --- a/apps/admin-web/src/components/AdminStorePackagesSection.tsx +++ b/apps/admin-web/src/components/AdminStorePackagesSection.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react'; -import { Button, Space, Typography, message } from 'antd'; +import { Alert, Button, Form, Input, InputNumber, Space, Typography, message } from 'antd'; import type { StorePackageItemDto } from '@dukang/shared-types'; import { STORE_PACKAGE_MAX_COUNT } from '@dukang/shared-types'; import { request } from '../lib/api'; @@ -87,68 +87,101 @@ export default function AdminStorePackagesSection({ storeId }: { storeId: string } } - if (loading) return 加载套餐中…; + if (loading) { + return 加载套餐中…; + } return ( -
- - 总部直存立即生效,无需审核。最多 {STORE_PACKAGE_MAX_COUNT} 条。 - +
+ + {items.map((item, index) => ( -
- - 套餐 {index + 1} +
+ + + 套餐 {index + 1} + {items.length > 1 ? ( ) : null} - - + updateAt(index, { name: e.target.value })} - style={{ width: '100%', padding: 8 }} /> - + + + updateAt(index, { price: e.target.value })} - style={{ width: '100%', padding: 8 }} + precision={2} + style={{ width: '100%' }} + addonAfter="元" + placeholder="198" + value={item.price === '' ? undefined : Number(item.price)} + onChange={(v) => updateAt(index, { price: v != null ? String(v) : '' })} /> -