Files
Neo-ZQYY/apps/miniprogram - 副本/miniprogram/pages/task-detail-callback/task-detail-callback.wxml

204 lines
8.3 KiB
Plaintext
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.
<wxs src="../../utils/format.wxs" module="fmt" />
<!-- 加载态 -->
<view class="page-loading" wx:if="{{pageState === 'loading'}}">
<t-loading theme="circular" size="80rpx" text="加载中..." />
</view>
<!-- 空态 -->
<view class="page-empty" wx:elif="{{pageState === 'empty'}}">
<t-icon name="info-circle" size="120rpx" color="#c5c5c5" />
<text class="empty-text">未找到任务信息</text>
</view>
<!-- 正常态 -->
<block wx:elif="{{pageState === 'normal'}}">
<!-- Banner - 青绿色主题 -->
<view class="banner-area banner-teal">
<view class="banner-nav">
<view class="nav-back" bindtap="onBack">
<t-icon name="chevron-left" size="48rpx" color="#ffffff" />
</view>
<text class="nav-title">任务详情</text>
<view class="nav-placeholder"></view>
</view>
<view class="customer-info">
<view class="avatar-box">
<text class="avatar-text">{{detail.customerName[0] || '?'}}</text>
</view>
<view class="info-right">
<view class="name-row">
<text class="customer-name">{{detail.customerName}}</text>
<text class="task-type-tag">客户回访</text>
</view>
<view class="sub-info">
<text class="phone">135****6677</text>
</view>
</view>
</view>
</view>
<view class="main-content">
<!-- ① 维客线索(回访页面排第一) -->
<view class="card">
<view class="card-header">
<text class="section-title title-green">维客线索</text>
<text class="ai-badge">AI智能洞察</text>
</view>
<view class="clue-list">
<view class="clue-item">
<view class="clue-tag clue-tag-primary">客户<text>\n</text>基础</view>
<view class="clue-body">
<text class="clue-text">👩 女性 · VIP会员 · 入会1年半 · 忠实老客户</text>
<text class="clue-source">By:系统</text>
</view>
</view>
<view class="clue-item">
<view class="clue-tag clue-tag-success">消费<text>\n</text>习惯</view>
<view class="clue-body">
<text class="clue-text">☀️ 偏好周末下午 · 月均6-8次</text>
<text class="clue-source">By:系统</text>
</view>
</view>
<view class="clue-item clue-item-detail">
<view class="clue-tag clue-tag-success">消费<text>\n</text>习惯</view>
<view class="clue-body">
<text class="clue-text">💰 高客单价 · 爱点酒水</text>
<text class="clue-source">By:系统</text>
</view>
<text class="clue-detail">场均消费 ¥420高于门店均值 ¥180酒水小食附加消费占比 40%偏好VIP包厢</text>
</view>
<view class="clue-item clue-item-detail">
<view class="clue-tag clue-tag-purple">玩法<text>\n</text>偏好</view>
<view class="clue-body">
<text class="clue-text">🎱 斯诺克爱好者 · 技术中上 · 喜欢研究杆法</text>
<text class="clue-source">By:系统</text>
</view>
<text class="clue-detail">斯诺克占比 85%,偶尔玩中式八球;对高级杆法有浓厚兴趣</text>
</view>
<view class="clue-item clue-item-detail">
<view class="clue-tag clue-tag-error">重要<text>\n</text>反馈</view>
<view class="clue-body">
<text class="clue-text">⭐ 上次服务好评,新球杆手感满意</text>
<text class="clue-source">By:小燕</text>
</view>
<text class="clue-detail">2月4日到店时表示新球杆手感很好希望下次能提前预留VIP包厢</text>
</view>
</view>
</view>
<!-- ② 与我的关系(含近期服务记录) -->
<view class="card">
<view class="card-header">
<text class="section-title title-blue">与我的关系</text>
<text class="ai-badge">AI智能洞察</text>
</view>
<view class="relationship-row">
<view class="rel-tag rel-tag-pink">
<heart-icon score="{{detail.heartScore}}" />
<text>{{detail.heartScore > 8.5 ? '非常好' : detail.heartScore > 7 ? '良好' : detail.heartScore > 5 ? '一般' : '待发展'}}</text>
</view>
<view class="rel-bar">
<view class="rel-bar-fill" style="width: {{detail.heartScore * 10}}%"></view>
</view>
<text class="rel-score">{{fmt.toFixed(detail.heartScore / 10, 2)}}</text>
</view>
<text class="card-desc">长期合作关系良好,共有 45 次服务记录。客户多次指定您服务,评价均为 5 星。</text>
<!-- 近期服务记录(嵌入关系卡片内) -->
<view class="svc-section">
<text class="svc-title">📋 近期服务记录</text>
<view class="svc-record" wx:for="{{serviceRecords}}" wx:key="date">
<view class="svc-row-top">
<view class="svc-tags">
<text class="svc-table">{{item.table}}</text>
<text class="svc-type svc-type-{{item.typeClass}}">{{item.type}}</text>
<text class="svc-duration">{{item.duration}}</text>
</view>
<text class="svc-income">{{item.income}}</text>
</view>
<view class="svc-row-bottom">
<text class="svc-drinks">{{item.drinks}}</text>
<text class="svc-date">{{item.date}}</text>
</view>
</view>
<view class="svc-more" bindtap="onViewAllRecords">
<text>查看全部服务记录 →</text>
</view>
</view>
</view>
<!-- ③ 任务建议 -->
<view class="card">
<text class="section-title title-purple">任务建议</text>
<view class="suggestion-box suggestion-teal">
<view class="suggestion-header">
<text class="suggestion-icon">📞 常规回访要点</text>
<text class="ai-badge">AI智能洞察</text>
</view>
<text class="suggestion-desc">该客户上次到店是 3 天前,关系良好,进行常规关怀回访:</text>
<view class="suggestion-list">
<text class="suggestion-item">• 询问上次体验是否满意,是否有改进建议</text>
<text class="suggestion-item">• 告知近期新到的斯诺克相关设备或活动</text>
<text class="suggestion-item">• 提前预约下次到店时间,提供专属服务</text>
</view>
</view>
<!-- 话术参考(竖线样式) -->
<view class="talking-section">
<view class="talking-header">
<text class="talking-title">💬 话术参考</text>
<text class="ai-badge">AI智能洞察</text>
</view>
<view class="talking-list">
<text class="talking-item" wx:for="{{talkingPoints}}" wx:key="index">"{{item}}"</text>
</view>
</view>
</view>
<!-- ④ 我给TA的备注 -->
<view class="card">
<view class="card-header">
<text class="section-title title-blue">我给TA的备注</text>
<text class="note-count">{{sortedNotes.length}} 条备注</text>
</view>
<block wx:if="{{sortedNotes.length > 0}}">
<view class="note-item" wx:for="{{sortedNotes}}" wx:key="id">
<view class="note-top">
<text class="note-date">{{item.createdAt}}</text>
<text class="note-tag-inline {{item.tagType === 'coach' ? 'tag-coach-inline' : 'tag-customer-inline'}}">{{item.tagLabel}}</text>
</view>
<text class="note-content">{{item.content}}</text>
</view>
</block>
<view class="note-empty" wx:else>
<t-icon name="edit-1" size="80rpx" color="#dcdcdc" />
<text class="empty-hint">暂无备注</text>
</view>
</view>
</view>
<!-- 底部操作栏 -->
<view class="bottom-bar safe-area-bottom">
<view class="btn-ask btn-ask-teal" bindtap="onAskAssistant">
<t-icon name="chat" size="40rpx" color="#ffffff" />
<text>问问助手</text>
</view>
<view class="btn-note" bindtap="onAddNote">
<t-icon name="edit-1" size="40rpx" color="#242424" />
<text>备注</text>
</view>
</view>
<note-modal
visible="{{noteModalVisible}}"
customerName="{{detail.customerName}}"
initialScore="{{0}}"
initialContent=""
bind:confirm="onNoteConfirm"
bind:cancel="onNoteCancel"
/>
<ai-float-button bottom="{{200}}" customerId="{{detail.id}}" />
</block>
<dev-fab />