客户状态修改为4种

This commit is contained in:
WindowBird 2025-11-10 14:31:32 +08:00
parent ef46928b7e
commit 7f81c5385a
4 changed files with 102 additions and 52 deletions

View File

@ -7,7 +7,7 @@
* @param {Object} params 请求参数可选 * @param {Object} params 请求参数可选
* @param {number} params.pageNum 页码从1开始 * @param {number} params.pageNum 页码从1开始
* @param {number} params.pageSize 每页数量 * @param {number} params.pageSize 每页数量
* @param {string[]} params.statusList 客户状态列表["1"] 正在跟进, ["2"] 待跟进 * @param {string[]} params.statusList 客户状态列表["1"] 潜在, ["2"] 意向, ["3"] 成交, ["4"] 失效
* @param {string} params.excludeld 排除id * @param {string} params.excludeld 排除id
* @param {string[]} params.ids id列表 * @param {string[]} params.ids id列表
* @param {string} params.intent 意向 * @param {string} params.intent 意向

View File

@ -21,14 +21,24 @@
>全部</text> >全部</text>
<text <text
class="filter-option" class="filter-option"
:class="{ 'active': filterStatus === 'following' }" :class="{ 'active': filterStatus === 'potential' }"
@click="filterStatus = 'following'" @click="filterStatus = 'potential'"
>正在跟进</text> >潜在</text>
<text <text
class="filter-option" class="filter-option"
:class="{ 'active': filterStatus === 'pending' }" :class="{ 'active': filterStatus === 'intent' }"
@click="filterStatus = 'pending'" @click="filterStatus = 'intent'"
>待跟进</text> >意向</text>
<text
class="filter-option"
:class="{ 'active': filterStatus === 'deal' }"
@click="filterStatus = 'deal'"
>成交</text>
<text
class="filter-option"
:class="{ 'active': filterStatus === 'invalid' }"
@click="filterStatus = 'invalid'"
>失效</text>
</view> </view>
</view> </view>
</view> </view>
@ -73,7 +83,7 @@
<!-- 操作按钮 --> <!-- 操作按钮 -->
<view class="action-buttons"> <view class="action-buttons">
<view class="action-item" @click.stop="handleFollowup(customer)"> <view class="action-item" @click.stop="handleFollowup(customer)">
<text class="action-icon" :class="{ 'checked': customer.status === '1' }"></text> <text class="action-icon"></text>
<text class="action-text">跟进</text> <text class="action-text">跟进</text>
</view> </view>
<view class="action-item" @click.stop="handleTasks(customer)"> <view class="action-item" @click.stop="handleTasks(customer)">
@ -147,18 +157,20 @@ const {
// //
const getStatusClass = (status) => { const getStatusClass = (status) => {
return { return {
'status-following': status === '1', // 'status-potential': status === '1', //
'status-pending': status === '2' // 'status-intent': status === '2', //
'status-deal': status === '3', //
'status-invalid': status === '4' //
}; };
}; };
// //
const getStatusText = (status) => { const getStatusText = (status) => {
const statusMap = { const statusMap = {
'1': '正在跟进', '1': '潜在',
'2': '待跟进', '2': '意向',
'3': '其他', '3': '成交',
'4': '无效客户' '4': '失效'
}; };
return statusMap[status] || '未知'; return statusMap[status] || '未知';
}; };
@ -187,9 +199,10 @@ const buildQueryParams = () => {
// statusList // statusList
if (filterStatus.value) { if (filterStatus.value) {
const statusMap = { const statusMap = {
'following': ['1'], // 'potential': ['1'], //
'pending': ['2'], // 'intent': ['2'], //
'deal': ['3'], //
'invalid': ['4'] //
}; };
const statusList = statusMap[filterStatus.value]; const statusList = statusMap[filterStatus.value];
@ -593,13 +606,24 @@ defineExpose({
border-radius: 50%; border-radius: 50%;
flex-shrink: 0; flex-shrink: 0;
&.status-following { &.status-potential {
background-color: #2885ff; background-color: #e6a23c;
box-shadow: 0 0 4px rgba(40, 133, 255, 0.4); box-shadow: 0 0 4px rgba(230, 162, 60, 0.4);
} }
&.status-pending { &.status-intent {
background-color: #909399; background-color: #409eff;
box-shadow: 0 0 4px rgba(64, 158, 255, 0.4);
}
&.status-deal {
background-color: #67c23a;
box-shadow: 0 0 4px rgba(103, 194, 58, 0.4);
}
&.status-invalid {
background-color: #f56c6c;
box-shadow: 0 0 4px rgba(245, 108, 108, 0.4);
} }
} }

View File

@ -219,18 +219,20 @@ const loadProjectList = async () => {
// //
const getStatusClass = (status) => { const getStatusClass = (status) => {
return { return {
'status-following': status === '1', 'status-potential': status === '1', //
'status-pending': status === '2' 'status-intent': status === '2', //
'status-deal': status === '3', //
'status-invalid': status === '4' //
}; };
}; };
// //
const getStatusText = (status) => { const getStatusText = (status) => {
const statusMap = { const statusMap = {
'1': '正在跟进', '1': '潜在',
'2': '待跟进', '2': '意向',
'3': '其他', '3': '成交',
'4': '无效客户' '4': '失效'
}; };
return statusMap[status] || '未知'; return statusMap[status] || '未知';
}; };
@ -495,14 +497,24 @@ onShow(() => {
border-radius: 4px; border-radius: 4px;
font-size: 12px; font-size: 12px;
&.status-following { &.status-potential {
background-color: #e3f2fd; background-color: #fdf6ec;
color: #1976d2; color: #e6a23c;
} }
&.status-pending { &.status-intent {
background-color: #f5f5f5; background-color: #ecf5ff;
color: #666; color: #409eff;
}
&.status-deal {
background-color: #f0f9ff;
color: #67c23a;
}
&.status-invalid {
background-color: #fef0f0;
color: #f56c6c;
} }
} }

View File

@ -293,18 +293,20 @@ const formatIntents = (intents) => {
// //
const getStatusClass = (status) => { const getStatusClass = (status) => {
return { return {
'status-following': status === '1', 'status-potential': status === '1', //
'status-pending': status === '2' 'status-intent': status === '2', //
'status-deal': status === '3', //
'status-invalid': status === '4' //
}; };
}; };
// //
const getStatusText = (status) => { const getStatusText = (status) => {
const statusMap = { const statusMap = {
'1': '正在跟进', '1': '潜在',
'2': '待跟进', '2': '意向',
'3': '其他', '3': '成交',
'4': '无效客户' '4': '失效'
}; };
return statusMap[status] || '未知'; return statusMap[status] || '未知';
}; };
@ -312,18 +314,20 @@ const getStatusText = (status) => {
// //
const getCustomerStatusClass = (status) => { const getCustomerStatusClass = (status) => {
return { return {
'status-following': status === '1', 'status-potential': status === '1', //
'status-pending': status === '2' 'status-intent': status === '2', //
'status-deal': status === '3', //
'status-invalid': status === '4' //
}; };
}; };
// //
const getCustomerStatusText = (status) => { const getCustomerStatusText = (status) => {
const statusMap = { const statusMap = {
'1': '正在跟进', '1': '潜在',
'2': '待跟进', '2': '意向',
'3': '其他', '3': '成交',
'4': '无效客户' '4': '失效'
}; };
return statusMap[status] || '未知'; return statusMap[status] || '未知';
}; };
@ -536,14 +540,24 @@ onMounted(() => {
border-radius: 4px; border-radius: 4px;
font-size: 12px; font-size: 12px;
&.status-following { &.status-potential {
background-color: #e3f2fd; background-color: #fdf6ec;
color: #1976d2; color: #e6a23c;
} }
&.status-pending { &.status-intent {
background-color: #f5f5f5; background-color: #ecf5ff;
color: #666; color: #409eff;
}
&.status-deal {
background-color: #f0f9ff;
color: #67c23a;
}
&.status-invalid {
background-color: #fef0f0;
color: #f56c6c;
} }
} }