修改客户池列表
This commit is contained in:
@@ -51,3 +51,13 @@ export async function getSearch(params) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function pageCluesEnroll(params) {
|
||||
const res = await request.get('/receiver/clues/enroll', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -43,3 +43,17 @@ export async function getSearch(params) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param params 查询条件
|
||||
*/
|
||||
export async function pageCustomerMobile(params) {
|
||||
const res = await request.get('/receiver/customer/mobileList', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -88,6 +88,18 @@
|
||||
<template v-else>{{ row.log }}</template>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
<!-- 留资记录 -->
|
||||
<ele-pro-table
|
||||
ref="table"
|
||||
:columns="columns2"
|
||||
:datasource="datasource2"
|
||||
cache-key="receiverCustomerEnrollTables"
|
||||
>
|
||||
<!-- 表头工具栏 -->
|
||||
<template v-slot:toolbar>
|
||||
<el-link>留资记录</el-link>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</el-card>
|
||||
<el-dialog title="新增小记" :visible.sync="addLogVisible" width="30%">
|
||||
<el-form ref="form" label-width="50px">
|
||||
@@ -116,7 +128,8 @@
|
||||
import {
|
||||
getClues,
|
||||
pageCluesOptLog,
|
||||
addCluesOptLog
|
||||
addCluesOptLog,
|
||||
pageCluesEnroll
|
||||
} from '@/api/receiver/clues';
|
||||
import CarModelSelector from '@/components/CarSelector/index.vue';
|
||||
import RegionsSelect from '@/components/RegionsSelect/index.vue';
|
||||
@@ -175,6 +188,40 @@
|
||||
showOverflowTooltip: true
|
||||
}
|
||||
],
|
||||
// 留资列表配置
|
||||
columns2: [
|
||||
{
|
||||
prop: 'sid',
|
||||
label: '编号',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'mobile',
|
||||
label: '手机号',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'brandName',
|
||||
label: '关注品牌车型',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'cfrom2',
|
||||
label: '留资渠道',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'c_time',
|
||||
label: '时间',
|
||||
align: 'center',
|
||||
resizable: false,
|
||||
showOverflowTooltip: true
|
||||
}
|
||||
],
|
||||
addLogVisible: false
|
||||
};
|
||||
},
|
||||
@@ -209,6 +256,10 @@
|
||||
console.warn('表格引用或 reload 方法不存在');
|
||||
}
|
||||
},
|
||||
datasource2({ page, limit, where, order }) {
|
||||
where['id'] = this.form.id;
|
||||
return pageCluesEnroll({ ...where, ...order, page, limit });
|
||||
},
|
||||
handleCarChange(carInfo) {
|
||||
this.form.selectedCar = carInfo;
|
||||
},
|
||||
|
||||
@@ -24,11 +24,14 @@
|
||||
</el-col>
|
||||
<el-col :md="6" :sm="12">
|
||||
<el-form-item label="线索状态:">
|
||||
<el-cascader
|
||||
v-model="where.status"
|
||||
:options="statusList"
|
||||
clearable
|
||||
></el-cascader>
|
||||
<el-select clearable v-model="where.status" class="ele-block">
|
||||
<el-option
|
||||
v-for="(item, index) in statusList"
|
||||
:key="index"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="6" :sm="12">
|
||||
@@ -100,6 +103,11 @@
|
||||
>
|
||||
<!-- 表头工具栏 -->
|
||||
<template v-slot:toolbar></template>
|
||||
<template v-slot:customer="{ row }">
|
||||
<div>{{ row.name }}</div>
|
||||
<div>{{ row.mobile }}</div>
|
||||
<div>{{ row.sid }}</div>
|
||||
</template>
|
||||
<!-- 操作列 -->
|
||||
<template v-slot:action="{ row }">
|
||||
<el-link type="primary" :underline="false" @click="goDetail(row)">
|
||||
@@ -130,26 +138,13 @@
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{
|
||||
prop: 'sid',
|
||||
prop: 'customer',
|
||||
label: '编号',
|
||||
minWidth: 100,
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
fixed: 'left'
|
||||
},
|
||||
{
|
||||
prop: 'mobile',
|
||||
label: '客户',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'statusCn',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
fixed: 'left',
|
||||
slot: 'customer'
|
||||
},
|
||||
{
|
||||
prop: 'cfrom',
|
||||
@@ -166,6 +161,13 @@
|
||||
resizable: false,
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'statusCn',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'enTime',
|
||||
label: '日期',
|
||||
|
||||
@@ -24,11 +24,14 @@
|
||||
</el-col>
|
||||
<el-col :md="6" :sm="12">
|
||||
<el-form-item label="客户状态:">
|
||||
<el-cascader
|
||||
v-model="where.status"
|
||||
:options="statusList"
|
||||
clearable
|
||||
></el-cascader>
|
||||
<el-select clearable v-model="where.status" class="ele-block">
|
||||
<el-option
|
||||
v-for="(item, index) in statusList"
|
||||
:key="index"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="6" :sm="12">
|
||||
@@ -96,12 +99,17 @@
|
||||
<!-- 表头工具栏 -->
|
||||
<template v-slot:toolbar></template>
|
||||
<template v-slot:biz="{ row }">
|
||||
<!--
|
||||
{{ row.biz_poi }} <br />
|
||||
{{ row.biz_name }}
|
||||
-->
|
||||
<div v-for="item in row.bizList" :key="item.id">{{
|
||||
item.biz_name
|
||||
}}</div>
|
||||
</template>
|
||||
<!-- 操作列 -->
|
||||
<template v-slot:action="{ row }">
|
||||
<el-link type="primary" :underline="false" @click="goDetail(row)">
|
||||
<el-link type="primary" :underline="false" @click="goMobileList(row)">
|
||||
查看
|
||||
</el-link>
|
||||
</template>
|
||||
@@ -152,21 +160,21 @@
|
||||
minWidth: 80,
|
||||
slot: 'biz'
|
||||
},
|
||||
{
|
||||
prop: 'status_name',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'brand_detail',
|
||||
label: '关注车型',
|
||||
align: 'center',
|
||||
minWidth: 80,
|
||||
resizable: false,
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
// {
|
||||
// prop: 'status_name',
|
||||
// label: '状态',
|
||||
// align: 'center',
|
||||
// showOverflowTooltip: true,
|
||||
// minWidth: 80
|
||||
// },
|
||||
// {
|
||||
// prop: 'brand_detail',
|
||||
// label: '关注车型',
|
||||
// align: 'center',
|
||||
// minWidth: 80,
|
||||
// resizable: false,
|
||||
// showOverflowTooltip: true
|
||||
// },
|
||||
{
|
||||
columnKey: 'action',
|
||||
label: '操作',
|
||||
@@ -263,6 +271,14 @@
|
||||
query: row ? { id: row.id, title: row.title } : undefined
|
||||
});
|
||||
},
|
||||
//跳转手机号列表
|
||||
goMobileList(row) {
|
||||
const path = '/receiver/customer/mobileList';
|
||||
this.$router.push({
|
||||
path,
|
||||
query: row ? { id: row.id, title: row.title } : undefined
|
||||
});
|
||||
},
|
||||
/* 表格数据源 */
|
||||
datasource({ page, limit, where, order }) {
|
||||
return pageCustomer({ ...where, ...order, page, limit });
|
||||
|
||||
@@ -0,0 +1,308 @@
|
||||
<template>
|
||||
<div class="ele-body">
|
||||
<el-card shadow="never">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form label-width="77px" class="ele-form-search">
|
||||
<el-row :gutter="15">
|
||||
<el-col :md="6" :sm="12">
|
||||
<el-form-item label="客户:">
|
||||
<el-input
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
v-model="where.title"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="6" :sm="12">
|
||||
<el-form-item label="客户编号:">
|
||||
<el-input
|
||||
placeholder="请输入客户编号"
|
||||
clearable
|
||||
v-model="where.cid"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="6" :sm="12">
|
||||
<el-form-item label="客户状态:">
|
||||
<el-select clearable v-model="where.status" class="ele-block">
|
||||
<el-option
|
||||
v-for="(item, index) in statusList"
|
||||
:key="index"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="6" :sm="12">
|
||||
<el-form-item label="门店:">
|
||||
<biz-select v-model="where.bizIds" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="6" :sm="12">
|
||||
<el-form-item label="关注车型:">
|
||||
<brand-select
|
||||
v-model="where.brands"
|
||||
type="provinceCity"
|
||||
:props="{ multiple: true }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="6" :sm="12">
|
||||
<el-form-item label="线索归属:">
|
||||
<el-cascader
|
||||
v-model="where.belong"
|
||||
:options="belongOptions"
|
||||
:props="{ multiple: true, checkStrictly: true }"
|
||||
clearable
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="styleResponsive ? { lg: 12, md: 12 } : { span: 12 }">
|
||||
<el-form-item label="筛选日期:">
|
||||
<el-date-picker
|
||||
unlink-panels
|
||||
v-model="where.dateRange"
|
||||
range-separator="-"
|
||||
type="daterange"
|
||||
end-placeholder="结束日期"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
value-format="yyyy-MM-dd"
|
||||
class="ele-fluid"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="6" :sm="12">
|
||||
<div class="ele-form-actions">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
class="ele-btn-icon"
|
||||
@click="reload"
|
||||
>
|
||||
查询
|
||||
</el-button>
|
||||
<el-button @click="reset">重置</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<!-- 数据表格 -->
|
||||
<ele-pro-table
|
||||
ref="table"
|
||||
:columns="columns"
|
||||
:datasource="datasource"
|
||||
:selection.sync="selection"
|
||||
cache-key="receiverCustomerTables"
|
||||
>
|
||||
<!-- 表头工具栏 -->
|
||||
<template v-slot:toolbar></template>
|
||||
<template v-slot:biz="{ row }">
|
||||
{{ row.biz_poi }} <br />
|
||||
{{ row.biz_name }}
|
||||
</template>
|
||||
<!-- 操作列 -->
|
||||
<template v-slot:action="{ row }">
|
||||
<el-link type="primary" :underline="false" @click="goDetail(row)">
|
||||
查看
|
||||
</el-link>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSearch, pageCustomerMobile } from '@/api/receiver/customer';
|
||||
import BrandSelect from '@/components/BrandSelect/index.vue';
|
||||
import BizSelect from '@/components/BizSelect/index.vue';
|
||||
const ROUTE_PATH = '/receiver/customer/mobileList';
|
||||
export default {
|
||||
name: 'receiverClues',
|
||||
components: { BrandSelect, BizSelect },
|
||||
data() {
|
||||
return {
|
||||
mobileId: '',
|
||||
where: {
|
||||
title: '',
|
||||
cid: '',
|
||||
citys: [],
|
||||
brands: [],
|
||||
belong: [],
|
||||
bizIds: []
|
||||
},
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{
|
||||
prop: 'cid',
|
||||
label: '编号',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'mobile',
|
||||
label: '客户',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'biz',
|
||||
label: '所属门店',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80,
|
||||
slot: 'biz'
|
||||
},
|
||||
{
|
||||
prop: 'status_name',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'brand_detail',
|
||||
label: '关注车型',
|
||||
align: 'center',
|
||||
minWidth: 80,
|
||||
resizable: false,
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
columnKey: 'action',
|
||||
label: '操作',
|
||||
width: 200,
|
||||
align: 'center',
|
||||
resizable: false,
|
||||
slot: 'action'
|
||||
}
|
||||
],
|
||||
// 表格选中数据
|
||||
selection: [],
|
||||
// 当前编辑数据
|
||||
current: null,
|
||||
// 是否显示编辑弹窗
|
||||
showEdit: false,
|
||||
// 日期时间选择器快捷项
|
||||
pickerOptions: {
|
||||
shortcuts: [
|
||||
{
|
||||
text: '今天',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '昨天',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24);
|
||||
end.setTime(end.getTime() - 3600 * 1000 * 24);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '最近一周',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '最近一个月',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '最近三个月',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
belongOptions: [],
|
||||
statusList: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.loadSearch();
|
||||
},
|
||||
computed: {
|
||||
// 是否开启响应式布局
|
||||
styleResponsive() {
|
||||
return this.$store.state.theme.styleResponsive;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadSearch() {
|
||||
getSearch()
|
||||
.then((data) => {
|
||||
this.statusList = data.statusList;
|
||||
this.belongOptions = data.belongList;
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e.message);
|
||||
});
|
||||
},
|
||||
goDetail(row) {
|
||||
const path = '/receiver/customer/detail';
|
||||
this.$router.push({
|
||||
path,
|
||||
query: row ? { id: row.id, title: row.title } : undefined
|
||||
});
|
||||
},
|
||||
/* 表格数据源 */
|
||||
datasource({ page, limit, where, order }) {
|
||||
where['id'] = this.mobileId;
|
||||
return pageCustomerMobile({ ...where, ...order, page, limit });
|
||||
},
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
if (this.$refs.table && typeof this.$refs.table.reload === 'function') {
|
||||
this.$refs.table.reload({ page: 1, where: this.where });
|
||||
} else {
|
||||
console.warn('表格引用或 reload 方法不存在');
|
||||
}
|
||||
},
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {};
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler(route) {
|
||||
const { path } = route;
|
||||
if (path !== ROUTE_PATH) {
|
||||
return;
|
||||
}
|
||||
this.mobileId = this.$route.query.id;
|
||||
this.reload();
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
::v-deep .el-cascader__tags input::-webkit-input-placeholder {
|
||||
color: white;
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user