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) : '' })} /> -