## P1 数据库基础 - zqyy_app: 创建 auth/biz schema、FDW 连接 etl_feiqiu - etl_feiqiu: 创建 app schema RLS 视图、商品库存预警表 - 清理 assistant_abolish 残留数据 ## P2 ETL/DWS 扩展 - 新增 DWS 助教订单贡献度表 (dws.assistant_order_contribution) - 新增 assistant_order_contribution_task 任务及 RLS 视图 - member_consumption 增加充值字段、assistant_daily 增加处罚字段 - 更新 ODS/DWD/DWS 任务文档及业务规则文档 - 更新 consistency_checker、flow_runner、task_registry 等核心模块 ## P3 小程序鉴权系统 - 新增 xcx_auth 路由/schema(微信登录 + JWT) - 新增 wechat/role/matching/application 服务层 - zqyy_app 鉴权表迁移 + 角色权限种子数据 - auth/dependencies.py 支持小程序 JWT 鉴权 ## 文档与审计 - 新增 DOCUMENTATION-MAP 文档导航 - 新增 7 份 BD_Manual 数据库变更文档 - 更新 DDL 基线快照(etl_feiqiu 6 schema + zqyy_app auth) - 新增全栈集成审计记录、部署检查清单更新 - 新增 BACKLOG 路线图、FDW→Core 迁移计划 ## Kiro 工程化 - 新增 5 个 Spec(P1/P2/P3/全栈集成/核心业务) - 新增审计自动化脚本(agent_on_stop/build_audit_context/compliance_prescan) - 新增 6 个 Hook(合规检查/会话日志/提交审计等) - 新增 doc-map steering 文件 ## 运维与测试 - 新增 ops 脚本:迁移验证/API 健康检查/ETL 监控/集成报告 - 新增属性测试:test_dws_contribution / test_auth_system - 清理过期 export 报告文件 - 更新 .gitignore 排除规则
304 lines
21 KiB
HTML
304 lines
21 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>客户详情 - 球房运营助手</title>
|
||
<script src="https://cdn.tailwindcss.com"></script>
|
||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||
<link href="../css/banner.css" rel="stylesheet">
|
||
<link href="../css/ai-icons.css" rel="stylesheet">
|
||
<script>
|
||
tailwind.config = {
|
||
theme: {
|
||
extend: {
|
||
colors: {
|
||
primary: '#0052d9', 'primary-light': '#ecf2fe',
|
||
success: '#00a870', warning: '#ed7b2f', error: '#e34d59',
|
||
'gray-1': '#f3f3f3', 'gray-2': '#eeeeee', 'gray-3': '#e7e7e7',
|
||
'gray-4': '#dcdcdc', 'gray-5': '#c5c5c5', 'gray-6': '#a6a6a6',
|
||
'gray-7': '#8b8b8b', 'gray-8': '#777777', 'gray-9': '#5e5e5e',
|
||
'gray-10': '#4b4b4b', 'gray-11': '#393939', 'gray-12': '#2c2c2c',
|
||
'gray-13': '#242424',
|
||
},
|
||
fontFamily: { sans: ['Noto Sans SC', 'sans-serif'] }
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
<style>
|
||
body { font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif; padding-bottom: 80px; }
|
||
.st { position: relative; padding-left: 12px; }
|
||
.st::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 16px; border-radius: 2px; }
|
||
.st.blue::before { background: linear-gradient(180deg, #0052d9, #5b9cf8); }
|
||
.st.green::before { background: linear-gradient(180deg, #00a870, #4cd964); }
|
||
.st.orange::before { background: linear-gradient(180deg, #ed7b2f, #ffc107); }
|
||
.st.pink::before { background: linear-gradient(180deg, #e851a4, #f5a0c0); }
|
||
.pv { font-variant-numeric: tabular-nums; }
|
||
.orig-price { text-decoration: line-through; color: #a6a6a6; font-size: 10px; }
|
||
</style>
|
||
</head>
|
||
<body class="bg-gray-1 min-h-screen">
|
||
<!-- Banner -->
|
||
<div class="banner-bg theme-dark-gold texture-aurora relative text-white">
|
||
<div class="h-11 flex items-center relative px-4">
|
||
<button onclick="history.back()" class="absolute left-4 p-1">
|
||
<svg class="w-5 h-5 text-white" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"/></svg>
|
||
</button>
|
||
<h1 class="flex-1 text-center text-base font-medium">客户详情</h1>
|
||
</div>
|
||
<div class="px-5 pt-2 pb-6">
|
||
<div class="flex items-center gap-4 mb-4">
|
||
<div class="w-16 h-16 rounded-2xl bg-white/20 backdrop-blur-sm flex items-center justify-center shadow-lg">
|
||
<span class="text-2xl font-bold text-white">王</span>
|
||
</div>
|
||
<div class="flex-1">
|
||
<div class="flex items-center gap-2 mb-2">
|
||
<span class="text-xl font-semibold">王先生</span>
|
||
<span class="px-2 py-0.5 bg-gradient-to-r from-amber-500 to-yellow-400 text-black font-medium rounded-full text-xs">VIP</span>
|
||
</div>
|
||
<div class="flex items-center gap-4 text-white/70 text-sm">
|
||
<span>138****5678</span>
|
||
<span>VIP20231215</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="bg-white/10 rounded-xl backdrop-blur-sm">
|
||
<div class="grid grid-cols-3">
|
||
<div class="text-center py-3 border-r border-white/10">
|
||
<p class="font-medium text-emerald-300 text-sm">¥8,600</p>
|
||
<p class="text-white/60 text-xs mt-1">储值余额</p>
|
||
</div>
|
||
<div class="text-center py-3 border-r border-white/10">
|
||
<p class="font-medium text-sm">¥2,800</p>
|
||
<p class="text-white/60 text-xs mt-1">60天累计消费</p>
|
||
</div>
|
||
<div class="text-center py-3">
|
||
<p class="font-medium text-sm">广州朗朗桌球</p>
|
||
<p class="text-white/60 text-xs mt-1">门店</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="p-4 space-y-4">
|
||
<!-- 消费习惯 -->
|
||
<div class="bg-white rounded-2xl p-5 shadow-sm">
|
||
<div class="flex items-center justify-between mb-4">
|
||
<h2 class="st green text-sm font-semibold text-gray-13">消费习惯</h2>
|
||
<span class="ai-title-badge ai-color-red"><span class="ai-title-badge-icon"><svg viewBox="0 0 24 24" fill="none"><rect x="5" y="7" width="14" height="12" rx="4" fill="white" stroke="currentColor" stroke-width="0.8"/><path d="M12 7V4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><circle cx="12" cy="3" r="1.5" fill="white" stroke="currentColor" stroke-width="0.7"/><circle cx="9" cy="11.5" r="2" fill="#667eea"/><circle cx="15" cy="11.5" r="2" fill="#667eea"/><circle cx="9.5" cy="11" r="0.7" fill="white"/><circle cx="15.5" cy="11" r="0.7" fill="white"/><path d="M9.5 15C10 16 14 16 14.5 15" stroke="#667eea" stroke-width="1.5" stroke-linecap="round"/><circle cx="7" cy="13.5" r="1" fill="#f5a0c0" opacity="0.6"/><circle cx="17" cy="13.5" r="1" fill="#f5a0c0" opacity="0.6"/><rect x="3" y="10" width="2" height="4" rx="1" fill="white" stroke="currentColor" stroke-width="0.7"/><rect x="19" y="10" width="2" height="4" rx="1" fill="white" stroke="currentColor" stroke-width="0.7"/></svg></span>AI智能洞察</span>
|
||
</div>
|
||
<div class="flex flex-wrap gap-2 mb-3">
|
||
<span class="px-3 py-1.5 bg-gradient-to-r from-blue-50 to-indigo-50 text-primary text-xs rounded-full border border-blue-100">🌙 常来夜场</span>
|
||
<span class="px-3 py-1.5 bg-gradient-to-r from-green-50 to-emerald-50 text-success text-xs rounded-full border border-green-100">🎱 偏爱中式</span>
|
||
<span class="px-3 py-1.5 bg-gradient-to-r from-orange-50 to-amber-50 text-warning text-xs rounded-full border border-orange-100">💰 高客单价</span>
|
||
<span class="px-3 py-1.5 bg-gradient-to-r from-pink-50 to-rose-50 text-error text-xs rounded-full border border-pink-100">🍷 爱点酒水</span>
|
||
</div>
|
||
<p class="text-sm text-gray-7 leading-relaxed">偏好晚间 21:00 后到店,喜欢中式台球和斯诺克。平均消费 350 元/次,月均到店 4-5 次。近 60 天到店 8 次,消费金额 2,800 元。</p>
|
||
</div>
|
||
|
||
<!-- 最喜欢的助教 -->
|
||
<div class="bg-white rounded-2xl p-5 shadow-sm">
|
||
<div class="flex items-center justify-between mb-4">
|
||
<h2 class="st pink text-sm font-semibold text-gray-13">最喜欢的助教</h2>
|
||
<span class="text-xs text-gray-6">近60天</span>
|
||
</div>
|
||
<div class="space-y-3">
|
||
<div class="p-4 bg-gradient-to-br from-pink-50/80 to-rose-50/60 rounded-xl border border-pink-100/60">
|
||
<div class="flex items-center justify-between mb-2.5">
|
||
<div class="flex items-center gap-2.5"><span class="text-lg">❤️</span><span class="text-sm font-semibold text-gray-13">小燕</span></div>
|
||
<div class="flex items-center gap-1.5"><span class="text-xs text-gray-7">关系指数</span><span class="text-lg font-bold text-success">0.92</span></div>
|
||
</div>
|
||
<p class="text-xs text-gray-7 mb-1.5 pl-0.5">近60天</p>
|
||
<div class="grid grid-cols-4 gap-2">
|
||
<div class="bg-white/80 rounded-lg py-2 text-center"><p class="text-xs text-gray-7 mb-0.5">基础</p><p class="text-base font-bold text-primary">12h</p></div>
|
||
<div class="bg-white/80 rounded-lg py-2 text-center"><p class="text-xs text-gray-7 mb-0.5">激励</p><p class="text-base font-bold text-warning">5h</p></div>
|
||
<div class="bg-white/80 rounded-lg py-2 text-center"><p class="text-xs text-gray-7 mb-0.5">上课</p><p class="text-base font-bold text-gray-13">18次</p></div>
|
||
<div class="bg-white/80 rounded-lg py-2 text-center"><p class="text-xs text-gray-7 mb-0.5">充值</p><p class="text-base font-bold text-success">¥5,000</p></div>
|
||
</div>
|
||
</div>
|
||
<div class="p-4 bg-gradient-to-br from-amber-50/80 to-yellow-50/60 rounded-xl border border-amber-100/60">
|
||
<div class="flex items-center justify-between mb-2.5">
|
||
<div class="flex items-center gap-2.5"><span class="text-lg">💛</span><span class="text-sm font-semibold text-gray-13">泡芙</span></div>
|
||
<div class="flex items-center gap-1.5"><span class="text-xs text-gray-7">关系指数</span><span class="text-lg font-bold text-warning">0.78</span></div>
|
||
</div>
|
||
<p class="text-xs text-gray-7 mb-1.5 pl-0.5">近60天</p>
|
||
<div class="grid grid-cols-4 gap-2">
|
||
<div class="bg-white/80 rounded-lg py-2 text-center"><p class="text-xs text-gray-7 mb-0.5">基础</p><p class="text-base font-bold text-primary">8h</p></div>
|
||
<div class="bg-white/80 rounded-lg py-2 text-center"><p class="text-xs text-gray-7 mb-0.5">激励</p><p class="text-base font-bold text-warning">3h</p></div>
|
||
<div class="bg-white/80 rounded-lg py-2 text-center"><p class="text-xs text-gray-7 mb-0.5">上课</p><p class="text-base font-bold text-gray-13">12次</p></div>
|
||
<div class="bg-white/80 rounded-lg py-2 text-center"><p class="text-xs text-gray-7 mb-0.5">充值</p><p class="text-base font-bold text-success">¥3,000</p></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 消费记录(放在最下方) -->
|
||
<div class="bg-white rounded-2xl p-5 shadow-sm">
|
||
<h2 class="st orange text-sm font-semibold text-gray-13 mb-4">消费记录</h2>
|
||
<div class="space-y-4">
|
||
|
||
<!-- 台桌详情 Record 1:有团购折扣,2位助教,有食品酒水 -->
|
||
<div class="rounded-xl border border-gray-200 overflow-hidden">
|
||
<div class="bg-gradient-to-r from-blue-50 to-indigo-50 px-4 py-2 flex items-center justify-between border-b border-blue-100/50">
|
||
<div class="flex items-center gap-2">
|
||
<span class="w-1.5 h-1.5 bg-primary rounded-full"></span>
|
||
<span class="text-sm font-semibold text-primary">A12号台</span>
|
||
</div>
|
||
<span class="text-sm text-gray-8">2026-02-05</span>
|
||
</div>
|
||
<!-- 时间信息:紧凑一行 -->
|
||
<div class="px-4 py-2.5 border-b border-gray-100 flex items-center justify-between">
|
||
<div class="flex items-center gap-3 text-base">
|
||
<span class="text-gray-13 font-medium pv">21:30</span>
|
||
<span class="text-gray-7">→</span>
|
||
<span class="text-gray-13 font-medium pv">00:50</span>
|
||
<span class="px-2 py-0.5 bg-primary/10 text-primary text-xs rounded-full font-medium">3h20min</span>
|
||
</div>
|
||
<!-- 台费(有团购折扣) -->
|
||
<div class="text-right flex-shrink-0">
|
||
<span class="text-base font-bold text-gray-13 pv">¥180</span>
|
||
<span class="orig-price ml-1">¥240</span>
|
||
</div>
|
||
</div>
|
||
<!-- 助教列表:一行2个卡片 -->
|
||
<div class="px-4 py-3">
|
||
<div class="grid grid-cols-2 gap-2 mb-3">
|
||
<!-- 助教卡片1:小燕 -->
|
||
<div class="bg-gray-50 rounded-lg p-2.5">
|
||
<div class="flex items-center gap-1 mb-0.5">
|
||
<span class="text-sm font-medium text-gray-13">小燕</span>
|
||
<span class="px-1 py-px bg-pink-50 text-pink-600 text-[10px] rounded">高级</span>
|
||
</div>
|
||
<div class="text-xs text-gray-8">基础课 · 2.5h</div>
|
||
<div class="text-right mt-0.5">
|
||
<span class="text-sm font-bold text-gray-13 pv">¥200</span>
|
||
</div>
|
||
</div>
|
||
<!-- 助教卡片2:Amy -->
|
||
<div class="bg-gray-50 rounded-lg p-2.5">
|
||
<div class="flex items-center gap-1 mb-0.5">
|
||
<span class="text-sm font-medium text-gray-13">Amy</span>
|
||
<span class="px-1 py-px bg-green-50 text-green-600 text-[10px] rounded">初级</span>
|
||
</div>
|
||
<div class="text-xs text-gray-8">激励课 · 0.5h</div>
|
||
<div class="flex items-center justify-between mt-0.5">
|
||
<span class="text-xs text-orange-500">定档绩效:1h</span>
|
||
<span class="text-sm font-bold text-gray-13 pv">¥50</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- 食品酒水 -->
|
||
<div class="flex items-center justify-between py-2 border-t border-gray-100">
|
||
<span class="text-sm text-gray-8">🍷 食品酒水</span>
|
||
<div class="text-right">
|
||
<span class="text-base font-medium text-warning pv">¥210</span>
|
||
<span class="orig-price ml-1">¥260</span>
|
||
</div>
|
||
</div>
|
||
<!-- 总金额 -->
|
||
<div class="flex items-center justify-between pt-2 border-t border-gray-200">
|
||
<span class="text-sm font-semibold text-gray-9">总金额</span>
|
||
<div class="text-right">
|
||
<span class="text-lg font-bold text-error pv">¥640</span>
|
||
<span class="orig-price ml-1">¥750</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 台桌详情 Record 2:无食品酒水,有定档绩效,无折扣 -->
|
||
<div class="rounded-xl border border-gray-200 overflow-hidden">
|
||
<div class="bg-gradient-to-r from-blue-50 to-indigo-50 px-4 py-2 flex items-center justify-between border-b border-blue-100/50">
|
||
<div class="flex items-center gap-2">
|
||
<span class="w-1.5 h-1.5 bg-primary rounded-full"></span>
|
||
<span class="text-sm font-semibold text-primary">888号台</span>
|
||
</div>
|
||
<span class="text-sm text-gray-8">2026-02-01</span>
|
||
</div>
|
||
<div class="px-4 py-2.5 border-b border-gray-100 flex items-center justify-between">
|
||
<div class="flex items-center gap-3 text-base">
|
||
<span class="text-gray-13 font-medium pv">14:00</span>
|
||
<span class="text-gray-7">→</span>
|
||
<span class="text-gray-13 font-medium pv">16:00</span>
|
||
<span class="px-2 py-0.5 bg-primary/10 text-primary text-xs rounded-full font-medium">2h00min</span>
|
||
</div>
|
||
<span class="text-base font-bold text-gray-13 pv">¥120</span>
|
||
</div>
|
||
<div class="px-4 py-3">
|
||
<div class="grid grid-cols-2 gap-2 mb-3">
|
||
<div class="bg-gray-50 rounded-lg p-2.5">
|
||
<div class="flex items-center gap-1 mb-0.5">
|
||
<span class="text-sm font-medium text-gray-13">泡芙</span>
|
||
<span class="px-1 py-px bg-purple-50 text-purple-600 text-[10px] rounded">中级</span>
|
||
</div>
|
||
<div class="text-xs text-gray-8">激励课 · 1.5h</div>
|
||
<div class="flex items-center justify-between mt-0.5">
|
||
<span class="text-xs text-orange-500">定档绩效:2h</span>
|
||
<span class="text-sm font-bold text-gray-13 pv">¥100</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- 总金额(无食品酒水,不展示该行) -->
|
||
<div class="flex items-center justify-between pt-2 border-t border-gray-200">
|
||
<span class="text-sm font-semibold text-gray-9">总金额</span>
|
||
<span class="text-lg font-bold text-error pv">¥220</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 商城订单 Record 3:有食品酒水 -->
|
||
<div class="rounded-xl border border-gray-200 overflow-hidden">
|
||
<div class="bg-gradient-to-r from-emerald-50 to-green-50 px-4 py-2 flex items-center justify-between border-b border-green-100/50">
|
||
<div class="flex items-center gap-2">
|
||
<span class="w-1.5 h-1.5 bg-success rounded-full"></span>
|
||
<span class="text-sm font-semibold text-success">商城订单</span>
|
||
</div>
|
||
<span class="text-sm text-gray-8">2026-01-28</span>
|
||
</div>
|
||
<div class="px-4 py-3 space-y-2.5">
|
||
<!-- 助教卡片列表:同台桌详情风格 -->
|
||
<div class="grid grid-cols-2 gap-2">
|
||
<div class="bg-gray-50 rounded-lg p-2.5">
|
||
<div class="flex items-center gap-1 mb-0.5">
|
||
<span class="text-sm font-medium text-gray-13">小燕</span>
|
||
<span class="px-1 py-px bg-pink-50 text-pink-600 text-[10px] rounded">高级</span>
|
||
</div>
|
||
<div class="text-xs text-gray-8">基础课 · 1h</div>
|
||
<div class="text-right mt-0.5">
|
||
<span class="text-sm font-bold text-gray-13 pv">¥100</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- 食品酒水 -->
|
||
<div class="flex items-center justify-between pt-2 border-t border-gray-100">
|
||
<span class="text-sm text-gray-8">🍷 食品酒水</span>
|
||
<span class="text-base font-medium text-warning pv">¥180</span>
|
||
</div>
|
||
<!-- 总金额 -->
|
||
<div class="flex items-center justify-between pt-2 border-t border-gray-200">
|
||
<span class="text-sm font-semibold text-gray-9">总金额</span>
|
||
<span class="text-lg font-bold text-error pv">¥280</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 底部操作栏 -->
|
||
<div class="fixed bottom-0 left-0 right-0 h-16 bg-white/95 backdrop-blur-lg border-t border-gray-2 flex items-center gap-3 px-4">
|
||
<button onclick="window.location.href='chat.html'" class="flex-1 h-11 bg-gradient-to-r from-primary to-blue-500 text-white font-medium rounded-xl flex items-center justify-center gap-2 shadow-lg shadow-primary/30">
|
||
<svg class="w-5 h-5" viewBox="0 0 24 24" fill="currentColor"><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z"/></svg>
|
||
问问助手
|
||
</button>
|
||
<button class="flex-1 h-11 bg-gray-100 text-gray-13 font-medium rounded-xl flex items-center justify-center gap-2">
|
||
<svg class="w-5 h-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>
|
||
备注
|
||
</button>
|
||
</div>
|
||
</body>
|
||
</html>
|