2025-06-16
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param params 查询条件
|
||||
*/
|
||||
export async function pageClues(params) {
|
||||
const res = await request.get('/receiver/clues/page', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function getClues(params) {
|
||||
const res = await request.get('/receiver/clues', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function pageCluesOptLog(params) {
|
||||
const res = await request.get('/receiver/clues/opt', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param params 查询条件
|
||||
*/
|
||||
export async function pageCustomer(params) {
|
||||
const res = await request.get('/receiver/customer/page', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function getCustomer(params) {
|
||||
const res = await request.get('/receiver/customer', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function pageCustomerOptLog(params) {
|
||||
const res = await request.get('/receiver/customer/opt', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param params 查询条件
|
||||
*/
|
||||
export async function pageSubsidy(params) {
|
||||
const res = await request.get('/receiver/subsidy/page', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
<template>
|
||||
<div class="ele-body ele-body-card">
|
||||
<el-card shadow="never pd10">
|
||||
<el-form label-width="100px" class="customer-info-form">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户姓名">
|
||||
<el-input v-model="form.name" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手机号码">
|
||||
<el-input v-model="form.mobile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="添加微信">
|
||||
<el-select value="" v-model="form.wxgr">
|
||||
<el-option label="是" value="1"></el-option>
|
||||
<el-option label="否" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<car-model-selector
|
||||
type="brandSeries"
|
||||
title="关注车型"
|
||||
:model-value="form.selectedCar"
|
||||
v-model="form.selectedCar"
|
||||
@update:modelValue="handleCarChange"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所在地区">
|
||||
<regions-select v-model="form.provinceCity" class="ele-fluid" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户来源"></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="首次留资">
|
||||
<el-input v-model="form.c_time" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="最新留资">
|
||||
<el-input v-model="form.en_time" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-button type="success">保存</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
-->
|
||||
</el-form>
|
||||
<!-- 数据表格 -->
|
||||
<ele-pro-table
|
||||
ref="table"
|
||||
:columns="columns"
|
||||
:datasource="datasource"
|
||||
cache-key="receiverCustomerOptTables"
|
||||
>
|
||||
<!-- 表头工具栏 -->
|
||||
<template v-slot:toolbar>跟进记录</template>
|
||||
<!-- 操作列 -->
|
||||
<template v-slot:content="{ row }">
|
||||
<template v-if="row.rec_url">
|
||||
<audio controls="controls">
|
||||
<source :src="row.rec_url" />
|
||||
</audio>
|
||||
</template>
|
||||
<template v-else-if="row.rec_text">
|
||||
{{ row.rec_text }}
|
||||
</template>
|
||||
<template v-else>{{ row.log }}</template>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { setPageTabTitle } from '@/utils/page-tab-util';
|
||||
import { getClues, pageCluesOptLog } from '@/api/receiver/clues';
|
||||
import CarModelSelector from '@/components/CarSelector/index.vue';
|
||||
import RegionsSelect from '@/components/RegionsSelect/index.vue';
|
||||
const ROUTE_PATH = '/receiver/clues/detail';
|
||||
export default {
|
||||
name: 'receiverCluesDetail',
|
||||
components: { RegionsSelect, CarModelSelector },
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
form: {
|
||||
id: '',
|
||||
name: '',
|
||||
mobile: '',
|
||||
c_time: '',
|
||||
en_time: '',
|
||||
selectedCar: {},
|
||||
wxgr: 0,
|
||||
provinceCity: []
|
||||
},
|
||||
title: '',
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{
|
||||
prop: 'uname',
|
||||
label: '操作人员',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'content',
|
||||
slot: 'content',
|
||||
label: '内容',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'type_name',
|
||||
label: '类型',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'c_time',
|
||||
label: '时间',
|
||||
align: 'center',
|
||||
minWidth: 80,
|
||||
resizable: false,
|
||||
showOverflowTooltip: true
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
query() {
|
||||
const id = this.$route.query.id;
|
||||
if (!id || this.form.id === Number(id)) {
|
||||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
getClues({ id: Number(id) })
|
||||
.then((data) => {
|
||||
this.loading = false;
|
||||
this.$util.assignObject(this.form, { ...data });
|
||||
})
|
||||
.catch((e) => {
|
||||
this.loading = false;
|
||||
this.$message.error(e.message);
|
||||
});
|
||||
},
|
||||
/* 表格数据源 */
|
||||
datasource({ page, limit, where, order }) {
|
||||
where['id'] = this.form.id;
|
||||
return pageCluesOptLog({ ...where, ...order, page, limit });
|
||||
},
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.$refs.table.reload({ page: 1, where: this.where });
|
||||
},
|
||||
handleCarChange(carInfo) {
|
||||
this.form.selectedCar = carInfo;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler(route) {
|
||||
const { path } = route;
|
||||
if (path !== ROUTE_PATH) {
|
||||
return;
|
||||
}
|
||||
this.title = this.$route.query.title
|
||||
? this.$route.query.title
|
||||
: '线索详情';
|
||||
this.form.id = this.$route.query.id;
|
||||
setPageTabTitle(this.title);
|
||||
this.query();
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.pd10 {
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -5,20 +5,28 @@
|
||||
<el-form label-width="77px" class="ele-form-search">
|
||||
<el-row :gutter="15">
|
||||
<el-col :md="6" :sm="12">
|
||||
<el-form-item label="名称:">
|
||||
<el-form-item label="客户:">
|
||||
<el-input
|
||||
placeholder="请输入名称"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
v-model="where.title"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<car-model-selector
|
||||
type="brandSeries"
|
||||
v-model="where.selectedCar"
|
||||
:key="componentKey"
|
||||
/>
|
||||
<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">
|
||||
@@ -41,74 +49,15 @@
|
||||
:columns="columns"
|
||||
:datasource="datasource"
|
||||
:selection.sync="selection"
|
||||
cache-key="syliveActivityTable"
|
||||
cache-key="receiverCluesTables"
|
||||
>
|
||||
<!-- 表头工具栏 -->
|
||||
<template v-slot:toolbar>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
class="ele-btn-icon"
|
||||
@click="dropClick('edit')"
|
||||
>
|
||||
新建
|
||||
</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
class="ele-btn-icon"
|
||||
@click="removeBatch"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
<!-- 状态列 -->
|
||||
<template v-slot:title="{ row }">
|
||||
<div class="cell-content">
|
||||
<el-image
|
||||
v-if="row.banner && row.banner[0]"
|
||||
:src="row.banner[0]['url']"
|
||||
class="table-image"
|
||||
/>
|
||||
<span class="table-text">{{ row.title }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:status="{ row }">
|
||||
<el-switch
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
v-model="row.status"
|
||||
@change="editStatus(row)"
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:toolbar></template>
|
||||
<!-- 操作列 -->
|
||||
<template v-slot:action="{ row }">
|
||||
<el-dropdown @command="(command) => dropClick(command, row)">
|
||||
<el-link type="primary" :underline="false" icon="el-icon-edit">
|
||||
修改
|
||||
<i class="el-icon-arrow-down"></i>
|
||||
</el-link>
|
||||
<template v-slot:dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item command="edit">产品</el-dropdown-item>
|
||||
<el-dropdown-item command="brokerage">佣金</el-dropdown-item>
|
||||
<el-dropdown-item command="coupon">优惠券</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<el-popconfirm
|
||||
class="ele-action"
|
||||
title="确定要删除此数据吗?"
|
||||
@confirm="remove(row)"
|
||||
>
|
||||
<template v-slot:reference>
|
||||
<el-link type="danger" :underline="false" icon="el-icon-delete">
|
||||
删除
|
||||
</el-link>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
<el-link type="primary" :underline="false" @click="goDetail(row)">
|
||||
查看
|
||||
</el-link>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</el-card>
|
||||
@@ -116,16 +65,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
pageProduct,
|
||||
removeProduct,
|
||||
updateProductStatus
|
||||
} from '@/api/car/product';
|
||||
import CarModelSelector from '@/components/CarSelector/index.vue';
|
||||
import { pageClues } from '@/api/receiver/clues';
|
||||
|
||||
export default {
|
||||
name: 'receiverClues',
|
||||
components: { CarModelSelector },
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
where: {
|
||||
@@ -138,13 +82,6 @@
|
||||
},
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{
|
||||
columnKey: 'selection',
|
||||
type: 'selection',
|
||||
width: 45,
|
||||
align: 'center',
|
||||
fixed: 'left'
|
||||
},
|
||||
{
|
||||
prop: 'id',
|
||||
label: '编号',
|
||||
@@ -154,32 +91,40 @@
|
||||
fixed: 'left'
|
||||
},
|
||||
{
|
||||
prop: 'title',
|
||||
prop: 'mobile',
|
||||
label: '客户',
|
||||
slot: 'title',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 150
|
||||
},
|
||||
{
|
||||
prop: 'cityName',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'timeLaunch',
|
||||
label: '来源',
|
||||
sortable: 'custom',
|
||||
prop: 'statusCn',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 100
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
prop: 'cfrom',
|
||||
label: '来源',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'brandSeries',
|
||||
label: '关注车型',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
minWidth: 80,
|
||||
resizable: false,
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'enTime',
|
||||
label: '日期',
|
||||
align: 'center',
|
||||
minWidth: 80,
|
||||
resizable: false,
|
||||
slot: 'status',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
@@ -197,12 +142,65 @@
|
||||
current: null,
|
||||
// 是否显示编辑弹窗
|
||||
showEdit: false,
|
||||
componentKey: 0,
|
||||
// 佣金编辑框
|
||||
showEditBrokerage: 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]);
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
computed: {
|
||||
// 是否开启响应式布局
|
||||
styleResponsive() {
|
||||
return this.$store.state.theme.styleResponsive;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/* 下拉按钮点击 */
|
||||
dropClick(command, row) {
|
||||
@@ -222,98 +220,26 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
goDetail(row) {
|
||||
const path = '/receiver/clues/detail';
|
||||
this.$router.push({
|
||||
path,
|
||||
query: row ? { id: row.id, title: row.title } : undefined
|
||||
});
|
||||
},
|
||||
/* 表格数据源 */
|
||||
datasource({ page, limit, where, order }) {
|
||||
return pageProduct({ ...where, ...order, page, limit });
|
||||
return pageClues({ ...where, ...order, page, limit });
|
||||
},
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.$refs.table.reload({ page: 1, where: this.where });
|
||||
},
|
||||
/* 删除 */
|
||||
remove(row) {
|
||||
const loading = this.$loading({ lock: true });
|
||||
removeProduct(row.id)
|
||||
.then((msg) => {
|
||||
loading.close();
|
||||
this.$message.success(msg);
|
||||
this.reload();
|
||||
})
|
||||
.catch((e) => {
|
||||
loading.close();
|
||||
this.$message.error(e.message);
|
||||
});
|
||||
},
|
||||
/* 批量删除 */
|
||||
removeBatch() {
|
||||
if (!this.selection.length) {
|
||||
this.$message.error('请至少选择一条数据');
|
||||
return;
|
||||
}
|
||||
this.$confirm('确定要删除选中数据吗?', '提示', {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
const loading = this.$loading({ lock: true });
|
||||
removeProduct(this.selection.map((d) => d.id))
|
||||
.then((msg) => {
|
||||
loading.close();
|
||||
this.$message.success(msg);
|
||||
this.reload();
|
||||
})
|
||||
.catch((e) => {
|
||||
loading.close();
|
||||
this.$message.error(e.message);
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/* 更改状态 */
|
||||
editStatus(row) {
|
||||
const loading = this.$loading({ lock: true });
|
||||
updateProductStatus(row.id, row.status)
|
||||
.then((msg) => {
|
||||
loading.close();
|
||||
this.$message.success(msg);
|
||||
this.reload();
|
||||
})
|
||||
.catch((e) => {
|
||||
loading.close();
|
||||
this.$message.error(e.message);
|
||||
});
|
||||
},
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {
|
||||
selectedCar: {
|
||||
brandId: null,
|
||||
seriesId: null,
|
||||
modelId: null
|
||||
}
|
||||
};
|
||||
// 更新 key 强制组件重新渲染
|
||||
this.componentKey = Date.now();
|
||||
},
|
||||
handleCarChange(carInfo) {
|
||||
this.where.selectedCar = carInfo;
|
||||
this.where = {};
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.cell-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.table-image {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.table-text {
|
||||
/* 文本样式 */
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
<style scoped></style>
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
<template>
|
||||
<div class="ele-body ele-body-card">
|
||||
<el-card shadow="never pd10">
|
||||
<el-form label-width="100px" class="customer-info-form">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户姓名">
|
||||
<el-input v-model="form.name" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手机号码">
|
||||
<el-input v-model="form.mobile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属门店">
|
||||
{{ form.biz }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<car-model-selector
|
||||
type="brandSeries"
|
||||
title="关注车型"
|
||||
:model-value="form.selectedCar"
|
||||
v-model="form.selectedCar"
|
||||
@update:modelValue="handleCarChange"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户等级">
|
||||
{{ form.level }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="微信好友">
|
||||
{{ form.wx_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户位置">
|
||||
{{ form.poi }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户来源">
|
||||
{{ form.of_title }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="建档时间">
|
||||
{{ form.c_time }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-button type="success">保存</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
-->
|
||||
</el-form>
|
||||
<!-- 数据表格 -->
|
||||
<ele-pro-table
|
||||
ref="table"
|
||||
:columns="columns"
|
||||
:datasource="datasource"
|
||||
cache-key="receiverCustomerOptTables"
|
||||
>
|
||||
<!-- 表头工具栏 -->
|
||||
<template v-slot:toolbar>跟进记录</template>
|
||||
<!-- 操作列 -->
|
||||
<template v-slot:content="{ row }">
|
||||
<template v-if="row.rec_url">
|
||||
<audio controls="controls">
|
||||
<source :src="row.rec_url" />
|
||||
</audio>
|
||||
</template>
|
||||
<template v-else-if="row.rec_text">
|
||||
{{ row.rec_text }}
|
||||
</template>
|
||||
<template v-else>{{ row.log }}</template>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { setPageTabTitle } from '@/utils/page-tab-util';
|
||||
import { getCustomer, pageCustomerOptLog } from '@/api/receiver/customer';
|
||||
import CarModelSelector from '@/components/CarSelector/index.vue';
|
||||
const ROUTE_PATH = '/receiver/customer/detail';
|
||||
export default {
|
||||
name: 'receiverCluesDetail',
|
||||
components: { CarModelSelector },
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
form: {
|
||||
id: '',
|
||||
name: '',
|
||||
mobile: '',
|
||||
c_time: '',
|
||||
en_time: '',
|
||||
selectedCar: {},
|
||||
wxgr: 0,
|
||||
provinceCity: [],
|
||||
level: '',
|
||||
wx_name: '',
|
||||
of_title: '',
|
||||
biz: '',
|
||||
poi: ''
|
||||
},
|
||||
title: '',
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{
|
||||
prop: 'uname',
|
||||
label: '操作人员',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'content',
|
||||
slot: 'content',
|
||||
label: '内容',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'type_name',
|
||||
label: '类型',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'c_time',
|
||||
label: '时间',
|
||||
align: 'center',
|
||||
minWidth: 80,
|
||||
resizable: false,
|
||||
showOverflowTooltip: true
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
query() {
|
||||
const id = this.$route.query.id;
|
||||
if (!id || this.form.id === Number(id)) {
|
||||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
getCustomer({ id: Number(id) })
|
||||
.then((data) => {
|
||||
this.loading = false;
|
||||
this.$util.assignObject(this.form, { ...data });
|
||||
})
|
||||
.catch((e) => {
|
||||
this.loading = false;
|
||||
this.$message.error(e.message);
|
||||
});
|
||||
},
|
||||
/* 表格数据源 */
|
||||
datasource({ page, limit, where, order }) {
|
||||
where['id'] = this.form.id;
|
||||
return pageCustomerOptLog({ ...where, ...order, page, limit });
|
||||
},
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.$refs.table.reload({ page: 1, where: this.where });
|
||||
},
|
||||
handleCarChange(carInfo) {
|
||||
this.form.selectedCar = carInfo;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler(route) {
|
||||
const { path } = route;
|
||||
if (path !== ROUTE_PATH) {
|
||||
return;
|
||||
}
|
||||
this.title = this.$route.query.title
|
||||
? this.$route.query.title
|
||||
: '客户详情';
|
||||
this.form.id = this.$route.query.id;
|
||||
setPageTabTitle(this.title);
|
||||
this.query();
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.pd10 {
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,234 @@
|
||||
<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 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 { pageCustomer } from '@/api/receiver/customer';
|
||||
|
||||
export default {
|
||||
name: 'receiverClues',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
where: {
|
||||
title: '',
|
||||
selectedCar: {
|
||||
brandId: '',
|
||||
seriesId: '',
|
||||
modelId: ''
|
||||
}
|
||||
},
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{
|
||||
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]);
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
computed: {
|
||||
// 是否开启响应式布局
|
||||
styleResponsive() {
|
||||
return this.$store.state.theme.styleResponsive;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/* 下拉按钮点击 */
|
||||
dropClick(command, row) {
|
||||
if (command === 'edit') {
|
||||
this.current = row;
|
||||
this.showEdit = true;
|
||||
} else if (command === 'brokerage') {
|
||||
this.current = row;
|
||||
this.showEditBrokerage = true;
|
||||
} else if (command === 'coupon') {
|
||||
const path = '/car/product/coupon';
|
||||
this.$nextTick(() => {
|
||||
this.$router.push({
|
||||
path,
|
||||
query: row ? { id: row.id, title: row.title } : undefined
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
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 }) {
|
||||
return pageCustomer({ ...where, ...order, page, limit });
|
||||
},
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.$refs.table.reload({ page: 1, where: this.where });
|
||||
},
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {};
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped></style>
|
||||
@@ -0,0 +1,265 @@
|
||||
<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">
|
||||
<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:action="{ row }">
|
||||
<el-link type="primary" :underline="false" @click="goDetail(row)">
|
||||
查看
|
||||
</el-link>
|
||||
<template v-if="0 === row.ifcheck">
|
||||
<el-link
|
||||
type="primary"
|
||||
:underline="false"
|
||||
@click="check(row, true)"
|
||||
>
|
||||
审核通过
|
||||
</el-link>
|
||||
<el-link
|
||||
type="primary"
|
||||
:underline="false"
|
||||
@click="check(row, false)"
|
||||
>
|
||||
不通过
|
||||
</el-link>
|
||||
</template>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { pageSubsidy } from '@/api/receiver/subsidy';
|
||||
|
||||
export default {
|
||||
name: 'receiverClues',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
where: {
|
||||
title: '',
|
||||
selectedCar: {
|
||||
brandId: '',
|
||||
seriesId: '',
|
||||
modelId: ''
|
||||
}
|
||||
},
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{
|
||||
prop: 'sid',
|
||||
label: '订单号',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'bizName',
|
||||
label: '购车门店',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'brandName',
|
||||
label: '品牌车型',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'statusCn',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
prop: 'cTime',
|
||||
label: '提交时间',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
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]);
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
computed: {
|
||||
// 是否开启响应式布局
|
||||
styleResponsive() {
|
||||
return this.$store.state.theme.styleResponsive;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/* 下拉按钮点击 */
|
||||
dropClick(command, row) {
|
||||
if (command === 'edit') {
|
||||
this.current = row;
|
||||
this.showEdit = true;
|
||||
} else if (command === 'brokerage') {
|
||||
this.current = row;
|
||||
this.showEditBrokerage = true;
|
||||
} else if (command === 'coupon') {
|
||||
const path = '/car/product/coupon';
|
||||
this.$nextTick(() => {
|
||||
this.$router.push({
|
||||
path,
|
||||
query: row ? { id: row.id, title: row.title } : undefined
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
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 }) {
|
||||
return pageSubsidy({ ...where, ...order, page, limit });
|
||||
},
|
||||
/* 刷新表格 */
|
||||
reload() {
|
||||
this.$refs.table.reload({ page: 1, where: this.where });
|
||||
},
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {};
|
||||
},
|
||||
check(row, status = false) {
|
||||
console.log(row);
|
||||
console.log(status);
|
||||
let msg;
|
||||
if (status) {
|
||||
msg = '确定审核通过【' + row.sid + '】订单吗?';
|
||||
} else {
|
||||
msg = '确定审核不通过【' + row.sid + '】订单吗?';
|
||||
}
|
||||
this.$confirm(msg, '提示', {
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
// const loading = this.$loading({ lock: true });
|
||||
// removeFiles(this.selection.map((d) => d.id))
|
||||
// .then((msg) => {
|
||||
// loading.close();
|
||||
// this.$message.success(msg);
|
||||
// this.reload();
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// loading.close();
|
||||
// this.$message.error(e.message);
|
||||
// });
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped></style>
|
||||
Reference in New Issue
Block a user