客户状态修改为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 {number} params.pageNum 页码从1开始
* @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.ids id列表
* @param {string} params.intent 意向

View File

@ -21,14 +21,24 @@
>全部</text>
<text
class="filter-option"
:class="{ 'active': filterStatus === 'following' }"
@click="filterStatus = 'following'"
>正在跟进</text>
:class="{ 'active': filterStatus === 'potential' }"
@click="filterStatus = 'potential'"
>潜在</text>
<text
class="filter-option"
:class="{ 'active': filterStatus === 'pending' }"
@click="filterStatus = 'pending'"
>待跟进</text>
:class="{ 'active': filterStatus === 'intent' }"
@click="filterStatus = 'intent'"
>意向</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>
@ -73,7 +83,7 @@
<!-- 操作按钮 -->
<view class="action-buttons">
<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>
</view>
<view class="action-item" @click.stop="handleTasks(customer)">
@ -147,18 +157,20 @@ const {
//
const getStatusClass = (status) => {
return {
'status-following': status === '1', //
'status-pending': status === '2' //
'status-potential': status === '1', //
'status-intent': status === '2', //
'status-deal': status === '3', //
'status-invalid': status === '4' //
};
};
//
const getStatusText = (status) => {
const statusMap = {
'1': '正在跟进',
'2': '待跟进',
'3': '其他',
'4': '无效客户'
'1': '潜在',
'2': '意向',
'3': '成交',
'4': '失效'
};
return statusMap[status] || '未知';
};
@ -187,9 +199,10 @@ const buildQueryParams = () => {
// statusList
if (filterStatus.value) {
const statusMap = {
'following': ['1'], //
'pending': ['2'], //
'potential': ['1'], //
'intent': ['2'], //
'deal': ['3'], //
'invalid': ['4'] //
};
const statusList = statusMap[filterStatus.value];
@ -593,13 +606,24 @@ defineExpose({
border-radius: 50%;
flex-shrink: 0;
&.status-following {
background-color: #2885ff;
box-shadow: 0 0 4px rgba(40, 133, 255, 0.4);
&.status-potential {
background-color: #e6a23c;
box-shadow: 0 0 4px rgba(230, 162, 60, 0.4);
}
&.status-pending {
background-color: #909399;
&.status-intent {
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) => {
return {
'status-following': status === '1',
'status-pending': status === '2'
'status-potential': status === '1', //
'status-intent': status === '2', //
'status-deal': status === '3', //
'status-invalid': status === '4' //
};
};
//
const getStatusText = (status) => {
const statusMap = {
'1': '正在跟进',
'2': '待跟进',
'3': '其他',
'4': '无效客户'
'1': '潜在',
'2': '意向',
'3': '成交',
'4': '失效'
};
return statusMap[status] || '未知';
};
@ -495,14 +497,24 @@ onShow(() => {
border-radius: 4px;
font-size: 12px;
&.status-following {
background-color: #e3f2fd;
color: #1976d2;
&.status-potential {
background-color: #fdf6ec;
color: #e6a23c;
}
&.status-pending {
background-color: #f5f5f5;
color: #666;
&.status-intent {
background-color: #ecf5ff;
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) => {
return {
'status-following': status === '1',
'status-pending': status === '2'
'status-potential': status === '1', //
'status-intent': status === '2', //
'status-deal': status === '3', //
'status-invalid': status === '4' //
};
};
//
const getStatusText = (status) => {
const statusMap = {
'1': '正在跟进',
'2': '待跟进',
'3': '其他',
'4': '无效客户'
'1': '潜在',
'2': '意向',
'3': '成交',
'4': '失效'
};
return statusMap[status] || '未知';
};
@ -312,18 +314,20 @@ const getStatusText = (status) => {
//
const getCustomerStatusClass = (status) => {
return {
'status-following': status === '1',
'status-pending': status === '2'
'status-potential': status === '1', //
'status-intent': status === '2', //
'status-deal': status === '3', //
'status-invalid': status === '4' //
};
};
//
const getCustomerStatusText = (status) => {
const statusMap = {
'1': '正在跟进',
'2': '待跟进',
'3': '其他',
'4': '无效客户'
'1': '潜在',
'2': '意向',
'3': '成交',
'4': '失效'
};
return statusMap[status] || '未知';
};
@ -536,14 +540,24 @@ onMounted(() => {
border-radius: 4px;
font-size: 12px;
&.status-following {
background-color: #e3f2fd;
color: #1976d2;
&.status-potential {
background-color: #fdf6ec;
color: #e6a23c;
}
&.status-pending {
background-color: #f5f5f5;
color: #666;
&.status-intent {
background-color: #ecf5ff;
color: #409eff;
}
&.status-deal {
background-color: #f0f9ff;
color: #67c23a;
}
&.status-invalid {
background-color: #fef0f0;
color: #f56c6c;
}
}