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

205 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-orange">
<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">139****1234</text>
<block wx:if="{{detail.daysAbsent}}">
<text class="absent-info">⚠️ {{detail.daysAbsent}}天未到店</text>
</block>
</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">👤 普通会员 · 注册10个月 · 近期活跃度下降</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">🌙 偏好夜场 20:00-23:00 · 之前月均3-4次</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">场均消费 ¥220近月到店仅 1 次(之前月均 3-4 次);喜欢和朋友组局</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">中式八球占比 90%,技术水平中等;喜欢 3-4 人组局对战</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月3日沟通时提到最近换了工作周末可能更方便</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-amber">
<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 rel-bar-amber" style="width: {{detail.heartScore * 10}}%"></view>
</view>
<text class="rel-score rel-score-amber">{{fmt.toFixed(detail.heartScore / 10, 2)}}</text>
</view>
<text class="card-desc">最近 2 个月互动较少,仅有 3 次服务记录。客户对您的印象中等,有提升空间。</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-orange">任务建议</text>
<view class="suggestion-box suggestion-orange">
<view class="suggestion-header">
<text class="suggestion-icon">💡 建议执行</text>
<text class="ai-badge">AI智能洞察</text>
</view>
<text class="suggestion-desc">该客户消费频率从月均 4 次下降到近月仅 1 次,需要关注原因:</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-orange" 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 />