查看跟进详细
This commit is contained in:
parent
f8d41c7f3b
commit
22554d7638
|
|
@ -281,6 +281,18 @@ export const getCustomerStatusDict = () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取客户跟进方式字典数据
|
||||||
|
* @returns {Promise} 返回字典数据数组,包含 dictLabel 和 dictValue
|
||||||
|
*/
|
||||||
|
export const getCustomerFollowTypeDict = () => {
|
||||||
|
return uni.$uv.http.get(`system/dict/data/type/customer_follow_type`, {
|
||||||
|
custom: {
|
||||||
|
auth: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取微信列表
|
* 获取微信列表
|
||||||
* @returns {Promise} 返回微信列表 { total: number, rows: array }
|
* @returns {Promise} 返回微信列表 { total: number, rows: array }
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,7 @@
|
||||||
<text class="user-name">{{ followupDetail.userName || '--' }}</text>
|
<text class="user-name">{{ followupDetail.userName || '--' }}</text>
|
||||||
<text class="user-role">销售经理</text>
|
<text class="user-role">销售经理</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="follow-time">
|
|
||||||
<text class="time-text">{{ formatDateTime(followupDetail.followTime) }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -66,14 +64,18 @@
|
||||||
|
|
||||||
<!-- 下次跟进 -->
|
<!-- 下次跟进 -->
|
||||||
<view class="info-card" v-if="followupDetail.nextFollowTime">
|
<view class="info-card" v-if="followupDetail.nextFollowTime">
|
||||||
<view class="card-title">下次跟进</view>
|
<view class="card-title">时间信息</view>
|
||||||
<view class="info-row">
|
<view class="info-row">
|
||||||
<text class="info-label">跟进时间</text>
|
<text class="info-label">跟进时间</text>
|
||||||
|
<text class="info-value">{{ formatDateTime(followupDetail.followTime) }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-row">
|
||||||
|
<text class="info-label">下次跟进</text>
|
||||||
<text class="info-value">{{ formatDateTime(followupDetail.nextFollowTime) }}</text>
|
<text class="info-value">{{ formatDateTime(followupDetail.nextFollowTime) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-row" v-if="followupDetail.nextFollowContent">
|
<view class="info-row" v-if="followupDetail.createTime">
|
||||||
<text class="info-label">跟进内容</text>
|
<text class="info-label">创建时间</text>
|
||||||
<text class="info-value">{{ followupDetail.nextFollowContent }}</text>
|
<text class="info-value">{{ followupDetail.createTime }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -104,6 +106,10 @@
|
||||||
<text class="info-label">客户意向</text>
|
<text class="info-label">客户意向</text>
|
||||||
<text class="info-value">{{ formatIntents(followupDetail.intents) }}</text>
|
<text class="info-value">{{ formatIntents(followupDetail.intents) }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="info-row" v-if="followupDetail.followType || followupDetail.followMethod || followupDetail.type">
|
||||||
|
<text class="info-label">跟进方式</text>
|
||||||
|
<text class="info-value">{{ getFollowTypeText(followupDetail.followType || followupDetail.followMethod || followupDetail.type) }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 备注信息 -->
|
<!-- 备注信息 -->
|
||||||
|
|
@ -133,18 +139,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 时间信息 -->
|
|
||||||
<view class="info-card">
|
|
||||||
<view class="card-title">时间信息</view>
|
|
||||||
<view class="info-row" v-if="followupDetail.createTime">
|
|
||||||
<text class="info-label">创建时间</text>
|
|
||||||
<text class="info-value">{{ formatDateTime(followupDetail.createTime) }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="info-row" v-if="followupDetail.updateTime">
|
|
||||||
<text class="info-label">更新时间</text>
|
|
||||||
<text class="info-value">{{ formatDateTime(followupDetail.updateTime) }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
|
|
@ -166,7 +161,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onMounted } from 'vue';
|
import { ref, computed, onMounted } from 'vue';
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
import { getFollowupDetail } from '@/common/api/customer';
|
import { getFollowupDetail, getCustomerFollowTypeDict } from '@/common/api/customer';
|
||||||
|
|
||||||
// 页面参数
|
// 页面参数
|
||||||
const followId = ref('');
|
const followId = ref('');
|
||||||
|
|
@ -174,6 +169,9 @@ const followupDetail = ref({});
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const error = ref('');
|
const error = ref('');
|
||||||
|
|
||||||
|
// 跟进方式字典数据
|
||||||
|
const followTypeOptions = ref([]);
|
||||||
|
|
||||||
// 计算是否有客户分析信息
|
// 计算是否有客户分析信息
|
||||||
const hasAnalysis = computed(() => {
|
const hasAnalysis = computed(() => {
|
||||||
return followupDetail.value.concern ||
|
return followupDetail.value.concern ||
|
||||||
|
|
@ -224,6 +222,18 @@ onLoad((options) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 加载跟进方式字典数据
|
||||||
|
const loadFollowTypeDict = async () => {
|
||||||
|
try {
|
||||||
|
const res = await getCustomerFollowTypeDict();
|
||||||
|
if (res && Array.isArray(res)) {
|
||||||
|
followTypeOptions.value = res;
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error('加载跟进方式字典失败:', err);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 加载跟进详情
|
// 加载跟进详情
|
||||||
const loadFollowupDetail = async () => {
|
const loadFollowupDetail = async () => {
|
||||||
if (!followId.value) return;
|
if (!followId.value) return;
|
||||||
|
|
@ -232,7 +242,12 @@ const loadFollowupDetail = async () => {
|
||||||
error.value = '';
|
error.value = '';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await getFollowupDetail(followId.value);
|
// 并行加载跟进详情和字典数据
|
||||||
|
const [res] = await Promise.all([
|
||||||
|
getFollowupDetail(followId.value),
|
||||||
|
loadFollowTypeDict()
|
||||||
|
]);
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
followupDetail.value = res;
|
followupDetail.value = res;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -323,6 +338,15 @@ const getIntentStrengthText = (intentLevel) => {
|
||||||
return levelMap[intentLevel] || '--';
|
return levelMap[intentLevel] || '--';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 获取跟进方式文本
|
||||||
|
const getFollowTypeText = (followTypeValue) => {
|
||||||
|
if (!followTypeValue) return '--';
|
||||||
|
|
||||||
|
// 从字典数据中查找对应的标签
|
||||||
|
const option = followTypeOptions.value.find(item => item.dictValue === String(followTypeValue));
|
||||||
|
return option ? option.dictLabel : '--';
|
||||||
|
};
|
||||||
|
|
||||||
// 预览图片
|
// 预览图片
|
||||||
const previewFollowupImages = (images, currentIndex) => {
|
const previewFollowupImages = (images, currentIndex) => {
|
||||||
if (!images || images.length === 0) return;
|
if (!images || images.length === 0) return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user