去掉客户星级
This commit is contained in:
parent
d7690fc0b4
commit
3ce802d10c
|
|
@ -60,19 +60,6 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 客户星级 -->
|
||||
<view class="customer-rating">
|
||||
<text class="rating-label">客户星级:</text>
|
||||
<view class="stars">
|
||||
<text
|
||||
class="star"
|
||||
v-for="i in 5"
|
||||
:key="i"
|
||||
:class="{ 'filled': i <= getRatingFromIntentLevel(customer.intentLevel) }"
|
||||
>★</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 分配用户 -->
|
||||
<view class="assigned-user">
|
||||
<image
|
||||
|
|
@ -176,15 +163,6 @@ const getStatusText = (status) => {
|
|||
return statusMap[status] || '未知';
|
||||
};
|
||||
|
||||
// 根据意向等级获取星级(1=高=5星,2=中=3星)
|
||||
const getRatingFromIntentLevel = (intentLevel) => {
|
||||
const levelMap = {
|
||||
'1': 5, // 高意向 = 5星
|
||||
'2': 3 // 中意向 = 3星
|
||||
};
|
||||
return levelMap[intentLevel] || 0;
|
||||
};
|
||||
|
||||
// 格式化日期时间
|
||||
const formatDateTime = (dateTime) => {
|
||||
if (!dateTime) return '暂无';
|
||||
|
|
@ -631,41 +609,6 @@ defineExpose({
|
|||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* 客户星级 */
|
||||
.customer-rating {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-bottom: 14px;
|
||||
padding: 8px 12px;
|
||||
background-color: #fafbfc;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.rating-label {
|
||||
font-size: 13px;
|
||||
color: #606266;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.stars {
|
||||
display: flex;
|
||||
gap: 3px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.star {
|
||||
font-size: 16px;
|
||||
color: #e4e7ed;
|
||||
line-height: 1;
|
||||
transition: color 0.2s ease;
|
||||
|
||||
&.filled {
|
||||
color: #ffc107;
|
||||
text-shadow: 0 0 2px rgba(255, 193, 7, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
/* 分配用户 */
|
||||
.assigned-user {
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -44,17 +44,6 @@
|
|||
<view class="title-line"></view>
|
||||
<text>其他信息</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="info-label">客户星级</text>
|
||||
<view class="info-value-stars">
|
||||
<text
|
||||
class="star"
|
||||
v-for="i in 5"
|
||||
:key="i"
|
||||
:class="{ 'filled': i <= getRatingFromIntentLevel(customerDetail.intentLevel) }"
|
||||
>★</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="info-label">备注</text>
|
||||
<text class="info-value">{{ customerDetail.remark || '--' }}</text>
|
||||
|
|
@ -87,15 +76,6 @@ const props = defineProps({
|
|||
}
|
||||
});
|
||||
|
||||
// 根据意向等级获取星级
|
||||
const getRatingFromIntentLevel = (intentLevel) => {
|
||||
const levelMap = {
|
||||
'1': 5,
|
||||
'2': 3
|
||||
};
|
||||
return levelMap[intentLevel] || 0;
|
||||
};
|
||||
|
||||
// 格式化客户意向(数组转字符串)
|
||||
const formatIntents = (intents) => {
|
||||
if (!intents || !Array.isArray(intents) || intents.length === 0) return '--';
|
||||
|
|
@ -168,21 +148,5 @@ const getIntentStrengthText = (intentLevel) => {
|
|||
color: #333;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.info-value-stars {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.star {
|
||||
font-size: 14px;
|
||||
color: #ddd;
|
||||
|
||||
&.filled {
|
||||
color: #ffc107;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,20 +2,6 @@
|
|||
<view class="form-section">
|
||||
<view class="section-title">其他信息</view>
|
||||
|
||||
<!-- 客户星级 -->
|
||||
<view class="form-item">
|
||||
<text class="form-label">客户星级</text>
|
||||
<view class="star-rating">
|
||||
<text
|
||||
class="star"
|
||||
v-for="i in 5"
|
||||
:key="i"
|
||||
:class="{ 'filled': i <= formData.rating }"
|
||||
@click="updateField('rating', i)"
|
||||
>★</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 备注 -->
|
||||
<view class="form-item">
|
||||
<textarea
|
||||
|
|
@ -175,22 +161,5 @@ const updateField = (field, value) => {
|
|||
font-size: 20px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.star-rating {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.star {
|
||||
font-size: 24px;
|
||||
color: #ddd;
|
||||
cursor: pointer;
|
||||
transition: color 0.2s;
|
||||
|
||||
&.filled {
|
||||
color: #ffc107;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,6 @@ const formData = ref({
|
|||
regionIds: [],
|
||||
workWechat: '',
|
||||
workWechatId: null,
|
||||
rating: 0,
|
||||
remark: '',
|
||||
concern: '',
|
||||
pain: '',
|
||||
|
|
|
|||
|
|
@ -18,17 +18,6 @@
|
|||
<text>{{ getStatusText(customerDetail.status) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="summary-item">
|
||||
<text class="summary-label">客户星级</text>
|
||||
<view class="stars">
|
||||
<text
|
||||
class="star"
|
||||
v-for="i in 5"
|
||||
:key="i"
|
||||
:class="{ 'filled': i <= getRatingFromIntentLevel(customerDetail.intentLevel) }"
|
||||
>★</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="summary-row">
|
||||
<view class="summary-item">
|
||||
|
|
@ -245,14 +234,6 @@ const formatDateTime = (dateTime) => {
|
|||
}
|
||||
};
|
||||
|
||||
// 根据意向等级获取星级
|
||||
const getRatingFromIntentLevel = (intentLevel) => {
|
||||
const levelMap = {
|
||||
'1': 5,
|
||||
'2': 3
|
||||
};
|
||||
return levelMap[intentLevel] || 0;
|
||||
};
|
||||
|
||||
// 获取客户类型文本
|
||||
const getCustomerTypeText = (type) => {
|
||||
|
|
@ -489,20 +470,6 @@ onShow(() => {
|
|||
}
|
||||
}
|
||||
|
||||
.stars {
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.star {
|
||||
font-size: 14px;
|
||||
color: #ddd;
|
||||
|
||||
&.filled {
|
||||
color: #ffc107;
|
||||
}
|
||||
}
|
||||
|
||||
.tab-navigation {
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
|
|
|
|||
|
|
@ -105,7 +105,6 @@ const formData = ref({
|
|||
regionIds: [],
|
||||
workWechat: '',
|
||||
workWechatId: null,
|
||||
rating: 0,
|
||||
remark: '',
|
||||
concern: '',
|
||||
pain: '',
|
||||
|
|
@ -160,7 +159,6 @@ const loadCustomerDetail = async () => {
|
|||
regionIds: [res.provinceId, res.cityId, res.countyId],
|
||||
workWechat: res.wechatId || '',
|
||||
workWechatId: res.workWechatId || null,
|
||||
rating: res.rating ||'',
|
||||
remark: res.remark || '',
|
||||
concern: res.concern || '',
|
||||
pain: res.pain || '',
|
||||
|
|
@ -327,7 +325,6 @@ const handleSave = async () => {
|
|||
provinceId: (regionIdsArray[0] !== undefined && regionIdsArray[0] !== null) ? regionIdsArray[0] : null,
|
||||
cityId: (regionIdsArray[1] !== undefined && regionIdsArray[1] !== null) ? regionIdsArray[1] : null,
|
||||
countyId: (regionIdsArray[2] !== undefined && regionIdsArray[2] !== null) ? regionIdsArray[2] : null,
|
||||
rating: formData.value.rating || 0,
|
||||
attention: formData.value.attention.trim() || null,
|
||||
concern: formData.value.concern.trim() || null,
|
||||
demand: formData.value.demand.trim() || null,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user