'use client' import { useState } from 'react' import { useRouter } from 'next/navigation' import { useToast } from '@/components/ui/Toast' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/Card' import { Button } from '@/components/ui/Button' import { Input } from '@/components/ui/Input' import { ArrowLeft, Upload, Calendar, FileText, CheckCircle, X, Users, Search, Building2, Check } from 'lucide-react' // 平台选项 const platformOptions = [ { id: 'douyin', name: '抖音', icon: '🎵', color: 'bg-[#1a1a1a]' }, { id: 'xiaohongshu', name: '小红书', icon: '📕', color: 'bg-[#fe2c55]' }, { id: 'bilibili', name: 'B站', icon: '📺', color: 'bg-[#00a1d6]' }, { id: 'kuaishou', name: '快手', icon: '⚡', color: 'bg-[#ff4906]' }, { id: 'weibo', name: '微博', icon: '🔴', color: 'bg-[#e6162d]' }, { id: 'wechat', name: '微信视频号', icon: '💬', color: 'bg-[#07c160]' }, ] // 模拟品牌方已添加的代理商(来自代理商管理) const mockAgencies = [ { id: 'AG789012', name: '星耀传媒', companyName: '上海星耀文化传媒有限公司', creatorCount: 50, passRate: 92 }, { id: 'AG456789', name: '创意无限', companyName: '深圳创意无限广告有限公司', creatorCount: 35, passRate: 88 }, { id: 'AG123456', name: '美妆达人MCN', companyName: '杭州美妆达人网络科技有限公司', creatorCount: 28, passRate: 82 }, { id: 'AG111111', name: '蓝海科技', companyName: '北京蓝海数字科技有限公司', creatorCount: 42, passRate: 85 }, { id: 'AG222222', name: '云创网络', companyName: '杭州云创网络技术有限公司', creatorCount: 30, passRate: 90 }, { id: 'AG333333', name: '天府传媒', companyName: '成都天府传媒集团有限公司', creatorCount: 25, passRate: 87 }, ] export default function CreateProjectPage() { const router = useRouter() const toast = useToast() const [projectName, setProjectName] = useState('') const [deadline, setDeadline] = useState('') const [briefFile, setBriefFile] = useState(null) const [selectedAgencies, setSelectedAgencies] = useState([]) const [selectedPlatform, setSelectedPlatform] = useState('') const [isSubmitting, setIsSubmitting] = useState(false) const [agencySearch, setAgencySearch] = useState('') // 搜索过滤代理商 const filteredAgencies = mockAgencies.filter(agency => agencySearch === '' || agency.name.toLowerCase().includes(agencySearch.toLowerCase()) || agency.id.toLowerCase().includes(agencySearch.toLowerCase()) || agency.companyName.toLowerCase().includes(agencySearch.toLowerCase()) ) const handleFileChange = (e: React.ChangeEvent) => { const file = e.target.files?.[0] if (file) { setBriefFile(file) } } const toggleAgency = (agencyId: string) => { setSelectedAgencies(prev => prev.includes(agencyId) ? prev.filter(id => id !== agencyId) : [...prev, agencyId] ) } const handleSubmit = async () => { if (!projectName.trim() || !deadline || !briefFile || selectedAgencies.length === 0 || !selectedPlatform) { toast.error('请填写完整信息') return } setIsSubmitting(true) // 模拟提交 await new Promise(resolve => setTimeout(resolve, 1500)) toast.success('项目创建成功!') router.push('/brand') } const isValid = projectName.trim() && deadline && briefFile && selectedAgencies.length > 0 && selectedPlatform return (
{/* 顶部导航 */}

创建项目

{/* 项目名称 */}
setProjectName(e.target.value)} placeholder="例如:XX品牌618推广" className="w-full px-4 py-3 border border-border-subtle rounded-lg bg-bg-elevated text-text-primary focus:outline-none focus:ring-2 focus:ring-accent-indigo" />
{/* 选择平台 */}

选择视频将发布的平台,系统将应用对应平台的审核规则

{platformOptions.map((platform) => ( ))}
{/* 截止日期 */}
setDeadline(e.target.value)} className="w-full pl-12 pr-4 py-3 border border-border-subtle rounded-lg bg-bg-elevated text-text-primary focus:outline-none focus:ring-2 focus:ring-accent-indigo" />
{/* Brief 上传 */}
{briefFile ? (
{briefFile.name}
) : ( )}
{/* 选择代理商 */}
{/* 搜索框 */}
setAgencySearch(e.target.value)} placeholder="搜索代理商名称、ID或公司名..." className="w-full pl-11 pr-4 py-3 border border-border-subtle rounded-lg bg-bg-elevated text-text-primary focus:outline-none focus:ring-2 focus:ring-accent-indigo" />
{/* 代理商列表 */}
{filteredAgencies.length > 0 ? ( filteredAgencies.map((agency) => { const isSelected = selectedAgencies.includes(agency.id) return ( ) }) ) : (

未找到匹配的代理商

)}

仅显示已在"代理商管理"中添加的代理商

{/* 操作按钮 */}
) }