客户状态修改为4种
This commit is contained in:
parent
ef46928b7e
commit
7f81c5385a
|
|
@ -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 意向
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user