Files
cunkebao_v3/Cunkebao/app/workspace/traffic-pricing/page.tsx
2025-07-07 17:08:27 +08:00

165 lines
7.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use client"
import { useState } from "react"
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { Switch } from "@/components/ui/switch"
import { Share2 } from "lucide-react"
import Link from "next/link"
import { TrafficTeamSettings } from "@/app/components/TrafficTeamSettings"
export default function TrafficPricingPage() {
const [activeTab, setActiveTab] = useState("pricing")
return (
<div className="flex-1 p-4 bg-gray-50">
<div className="max-w-6xl mx-auto">
<div className="flex justify-between items-center mb-6">
<h1 className="text-2xl font-bold"></h1>
<Button asChild variant="outline">
<Link href="/workspace/traffic-distribution/new">
<Share2 className="mr-2 h-4 w-4" />
</Link>
</Button>
</div>
<Tabs defaultValue="pricing" value={activeTab} onValueChange={setActiveTab} className="space-y-4">
<TabsList className="grid w-full grid-cols-2 md:w-auto md:grid-cols-3">
<TabsTrigger value="pricing"></TabsTrigger>
<TabsTrigger value="distribution"></TabsTrigger>
<TabsTrigger value="teams"></TabsTrigger>
</TabsList>
<TabsContent value="pricing" className="space-y-4">
<Card>
<CardHeader>
<CardTitle></CardTitle>
<CardDescription></CardDescription>
</CardHeader>
<CardContent className="space-y-4">
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
<div className="space-y-2">
<Label htmlFor="douyin-price"> (/)</Label>
<Input id="douyin-price" type="number" defaultValue="2" />
</div>
<div className="space-y-2">
<Label htmlFor="wechat-price"> (/)</Label>
<Input id="wechat-price" type="number" defaultValue="3" />
</div>
<div className="space-y-2">
<Label htmlFor="xiaohongshu-price"> (/)</Label>
<Input id="xiaohongshu-price" type="number" defaultValue="4" />
</div>
<div className="space-y-2">
<Label htmlFor="phone-price"> (/)</Label>
<Input id="phone-price" type="number" defaultValue="5" />
</div>
</div>
</CardContent>
<CardFooter className="flex justify-end">
<Button></Button>
</CardFooter>
</Card>
<Card>
<CardHeader>
<CardTitle></CardTitle>
<CardDescription></CardDescription>
</CardHeader>
<CardContent className="space-y-4">
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
<div className="space-y-2">
<Label htmlFor="age-pricing"></Label>
<Select defaultValue="1.2">
<SelectTrigger id="age-pricing">
<SelectValue placeholder="选择溢价系数" />
</SelectTrigger>
<SelectContent>
<SelectItem value="1.0"> (1.0)</SelectItem>
<SelectItem value="1.2"> (1.2)</SelectItem>
<SelectItem value="1.5"> (1.5)</SelectItem>
<SelectItem value="2.0"> (2.0)</SelectItem>
</SelectContent>
</Select>
</div>
<div className="space-y-2">
<Label htmlFor="gender-pricing"></Label>
<Select defaultValue="1.0">
<SelectTrigger id="gender-pricing">
<SelectValue placeholder="选择溢价系数" />
</SelectTrigger>
<SelectContent>
<SelectItem value="1.0"> (1.0)</SelectItem>
<SelectItem value="1.2"> (1.2)</SelectItem>
<SelectItem value="1.5"> (1.5)</SelectItem>
<SelectItem value="2.0"> (2.0)</SelectItem>
</SelectContent>
</Select>
</div>
</div>
</CardContent>
<CardFooter className="flex justify-end">
<Button></Button>
</CardFooter>
</Card>
</TabsContent>
<TabsContent value="distribution" className="space-y-4">
<Card>
<CardHeader>
<CardTitle></CardTitle>
<CardDescription></CardDescription>
</CardHeader>
<CardContent className="space-y-4">
<div className="space-y-4">
<div className="flex items-center justify-between">
<div className="space-y-0.5">
<Label className="text-base"></Label>
<p className="text-sm text-gray-500"></p>
</div>
<Switch defaultChecked />
</div>
<div className="flex items-center justify-between">
<div className="space-y-0.5">
<Label className="text-base"></Label>
<p className="text-sm text-gray-500"></p>
</div>
<Switch defaultChecked />
</div>
<div className="flex items-center justify-between">
<div className="space-y-0.5">
<Label className="text-base"></Label>
<p className="text-sm text-gray-500"></p>
</div>
<Switch />
</div>
</div>
</CardContent>
<CardFooter className="flex justify-end">
<Button></Button>
</CardFooter>
</Card>
</TabsContent>
<TabsContent value="teams" className="space-y-4">
<Card>
<CardHeader>
<CardTitle></CardTitle>
<CardDescription></CardDescription>
</CardHeader>
<CardContent>
<TrafficTeamSettings />
</CardContent>
</Card>
</TabsContent>
</Tabs>
</div>
</div>
)
}