去掉客户星级

This commit is contained in:
WindowBird 2025-11-08 17:32:06 +08:00
parent d7690fc0b4
commit 3ce802d10c
6 changed files with 0 additions and 161 deletions

View File

@ -60,19 +60,6 @@
</view> </view>
</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"> <view class="assigned-user">
<image <image
@ -176,15 +163,6 @@ const getStatusText = (status) => {
return statusMap[status] || '未知'; return statusMap[status] || '未知';
}; };
// 1==52==3
const getRatingFromIntentLevel = (intentLevel) => {
const levelMap = {
'1': 5, // = 5
'2': 3 // = 3
};
return levelMap[intentLevel] || 0;
};
// //
const formatDateTime = (dateTime) => { const formatDateTime = (dateTime) => {
if (!dateTime) return '暂无'; if (!dateTime) return '暂无';
@ -631,41 +609,6 @@ defineExpose({
font-weight: 500; 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 { .assigned-user {
display: flex; display: flex;

View File

@ -44,17 +44,6 @@
<view class="title-line"></view> <view class="title-line"></view>
<text>其他信息</text> <text>其他信息</text>
</view> </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"> <view class="info-item">
<text class="info-label">备注</text> <text class="info-label">备注</text>
<text class="info-value">{{ customerDetail.remark || '--' }}</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) => { const formatIntents = (intents) => {
if (!intents || !Array.isArray(intents) || intents.length === 0) return '--'; if (!intents || !Array.isArray(intents) || intents.length === 0) return '--';
@ -168,21 +148,5 @@ const getIntentStrengthText = (intentLevel) => {
color: #333; color: #333;
text-align: right; 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> </style>

View File

@ -2,20 +2,6 @@
<view class="form-section"> <view class="form-section">
<view class="section-title">其他信息</view> <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"> <view class="form-item">
<textarea <textarea
@ -175,22 +161,5 @@ const updateField = (field, value) => {
font-size: 20px; font-size: 20px;
color: #999; 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> </style>

View File

@ -99,7 +99,6 @@ const formData = ref({
regionIds: [], regionIds: [],
workWechat: '', workWechat: '',
workWechatId: null, workWechatId: null,
rating: 0,
remark: '', remark: '',
concern: '', concern: '',
pain: '', pain: '',

View File

@ -18,17 +18,6 @@
<text>{{ getStatusText(customerDetail.status) }}</text> <text>{{ getStatusText(customerDetail.status) }}</text>
</view> </view>
</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>
<view class="summary-row"> <view class="summary-row">
<view class="summary-item"> <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) => { const getCustomerTypeText = (type) => {
@ -489,20 +470,6 @@ onShow(() => {
} }
} }
.stars {
display: flex;
gap: 2px;
}
.star {
font-size: 14px;
color: #ddd;
&.filled {
color: #ffc107;
}
}
.tab-navigation { .tab-navigation {
display: flex; display: flex;
background-color: #fff; background-color: #fff;

View File

@ -105,7 +105,6 @@ const formData = ref({
regionIds: [], regionIds: [],
workWechat: '', workWechat: '',
workWechatId: null, workWechatId: null,
rating: 0,
remark: '', remark: '',
concern: '', concern: '',
pain: '', pain: '',
@ -160,7 +159,6 @@ const loadCustomerDetail = async () => {
regionIds: [res.provinceId, res.cityId, res.countyId], regionIds: [res.provinceId, res.cityId, res.countyId],
workWechat: res.wechatId || '', workWechat: res.wechatId || '',
workWechatId: res.workWechatId || null, workWechatId: res.workWechatId || null,
rating: res.rating ||'',
remark: res.remark || '', remark: res.remark || '',
concern: res.concern || '', concern: res.concern || '',
pain: res.pain || '', pain: res.pain || '',
@ -327,7 +325,6 @@ const handleSave = async () => {
provinceId: (regionIdsArray[0] !== undefined && regionIdsArray[0] !== null) ? regionIdsArray[0] : null, provinceId: (regionIdsArray[0] !== undefined && regionIdsArray[0] !== null) ? regionIdsArray[0] : null,
cityId: (regionIdsArray[1] !== undefined && regionIdsArray[1] !== null) ? regionIdsArray[1] : null, cityId: (regionIdsArray[1] !== undefined && regionIdsArray[1] !== null) ? regionIdsArray[1] : null,
countyId: (regionIdsArray[2] !== undefined && regionIdsArray[2] !== null) ? regionIdsArray[2] : null, countyId: (regionIdsArray[2] !== undefined && regionIdsArray[2] !== null) ? regionIdsArray[2] : null,
rating: formData.value.rating || 0,
attention: formData.value.attention.trim() || null, attention: formData.value.attention.trim() || null,
concern: formData.value.concern.trim() || null, concern: formData.value.concern.trim() || null,
demand: formData.value.demand.trim() || null, demand: formData.value.demand.trim() || null,