mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 11:51:55 +08:00
跟进记录完善
This commit is contained in:
@@ -8,6 +8,14 @@ export function listCustomer(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询客户预约信息列表
|
||||
export function listCustomerMaker(query) {
|
||||
return request({
|
||||
url: '/system/customer/makerList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询客户信息列表
|
||||
export function listCustomerFollow(query) {
|
||||
return request({
|
||||
@@ -49,7 +57,13 @@ export function addCustomerFollowRecerd(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function addCustomerOrderRecerd(data){
|
||||
return request({
|
||||
url: '/system/customerOrder',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function updateCustomerFollowRecerd(data) {
|
||||
return request({
|
||||
url: '/system/up',
|
||||
@@ -57,6 +71,14 @@ export function updateCustomerFollowRecerd(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
//确认到店
|
||||
export function confirmToStore(data) {
|
||||
return request({
|
||||
url: '/system/up',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 删除客户信息
|
||||
export function delCustomer(id) {
|
||||
return request({
|
||||
|
||||
58
ruoyi-ui/src/api/system/customerOrder.js
Normal file
58
ruoyi-ui/src/api/system/customerOrder.js
Normal file
@@ -0,0 +1,58 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询客户-订车列表
|
||||
export function listCustomerOrder(query) {
|
||||
return request({
|
||||
url: '/system/customerOrder/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询客户-订车列表
|
||||
export function getCustomerOrderPage(query) {
|
||||
return request({
|
||||
url: '/system/customerOrder/getCustomerOrderPage',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function confirmToOut(data){
|
||||
return request({
|
||||
url: '/system/customerOrder',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 查询客户-订车详细
|
||||
export function getCustomerOrder(id) {
|
||||
return request({
|
||||
url: '/system/customerOrder/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增客户-订车
|
||||
export function addCustomerOrder(data) {
|
||||
return request({
|
||||
url: '/system/customerOrder',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改客户-订车
|
||||
export function updateCustomerOrder(data) {
|
||||
return request({
|
||||
url: '/system/customerOrder',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除客户-订车
|
||||
export function delCustomerOrder(id) {
|
||||
return request({
|
||||
url: '/system/customerOrder/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -1,82 +1,91 @@
|
||||
import Vue from 'vue'
|
||||
import { mergeRecursive } from "@/utils/ruoyi";
|
||||
import DictMeta from './DictMeta'
|
||||
import DictData from './DictData'
|
||||
|
||||
const DEFAULT_DICT_OPTIONS = {
|
||||
types: [],
|
||||
}
|
||||
|
||||
/**
|
||||
* @classdesc 字典
|
||||
* @property {Object} label 标签对象,内部属性名为字典类型名称
|
||||
* @property {Object} dict 字段数组,内部属性名为字典类型名称
|
||||
* @property {Array.<DictMeta>} _dictMetas 字典元数据数组
|
||||
*/
|
||||
export default class Dict {
|
||||
constructor() {
|
||||
this.owner = null
|
||||
this.label = {}
|
||||
this.type = {}
|
||||
}
|
||||
|
||||
init(options) {
|
||||
if (options instanceof Array) {
|
||||
options = { types: options }
|
||||
}
|
||||
const opts = mergeRecursive(DEFAULT_DICT_OPTIONS, options)
|
||||
if (opts.types === undefined) {
|
||||
throw new Error('need dict types')
|
||||
}
|
||||
const ps = []
|
||||
this._dictMetas = opts.types.map(t => DictMeta.parse(t))
|
||||
this._dictMetas.forEach(dictMeta => {
|
||||
const type = dictMeta.type
|
||||
Vue.set(this.label, type, {})
|
||||
Vue.set(this.type, type, [])
|
||||
if (dictMeta.lazy) {
|
||||
return
|
||||
}
|
||||
ps.push(loadDict(this, dictMeta))
|
||||
})
|
||||
return Promise.all(ps)
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新加载字典
|
||||
* @param {String} type 字典类型
|
||||
*/
|
||||
reloadDict(type) {
|
||||
const dictMeta = this._dictMetas.find(e => e.type === type)
|
||||
if (dictMeta === undefined) {
|
||||
return Promise.reject(`the dict meta of ${type} was not found`)
|
||||
}
|
||||
return loadDict(this, dictMeta)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载字典
|
||||
* @param {Dict} dict 字典
|
||||
* @param {DictMeta} dictMeta 字典元数据
|
||||
* @returns {Promise}
|
||||
*/
|
||||
function loadDict(dict, dictMeta) {
|
||||
return dictMeta.request(dictMeta)
|
||||
.then(response => {
|
||||
const type = dictMeta.type
|
||||
let dicts = dictMeta.responseConverter(response, dictMeta)
|
||||
if (!(dicts instanceof Array)) {
|
||||
console.error('the return of responseConverter must be Array.<DictData>')
|
||||
dicts = []
|
||||
} else if (dicts.filter(d => d instanceof DictData).length !== dicts.length) {
|
||||
console.error('the type of elements in dicts must be DictData')
|
||||
dicts = []
|
||||
}
|
||||
dict.type[type].splice(0, Number.MAX_SAFE_INTEGER, ...dicts)
|
||||
dicts.forEach(d => {
|
||||
Vue.set(dict.label[type], d.value, d.label)
|
||||
})
|
||||
return dicts
|
||||
})
|
||||
}
|
||||
import Vue from 'vue'
|
||||
import { mergeRecursive } from "@/utils/ruoyi";
|
||||
import DictMeta from './DictMeta'
|
||||
import DictData from './DictData'
|
||||
|
||||
const DEFAULT_DICT_OPTIONS = {
|
||||
types: [],
|
||||
}
|
||||
//字典翻译
|
||||
export function translateDict(list, e){
|
||||
var value = ''
|
||||
list.map(i =>{
|
||||
if (i.code ==e) {
|
||||
value =i.value
|
||||
}
|
||||
})
|
||||
return value
|
||||
}
|
||||
/**
|
||||
* @classdesc 字典
|
||||
* @property {Object} label 标签对象,内部属性名为字典类型名称
|
||||
* @property {Object} dict 字段数组,内部属性名为字典类型名称
|
||||
* @property {Array.<DictMeta>} _dictMetas 字典元数据数组
|
||||
*/
|
||||
export default class Dict {
|
||||
constructor() {
|
||||
this.owner = null
|
||||
this.label = {}
|
||||
this.type = {}
|
||||
}
|
||||
|
||||
init(options) {
|
||||
if (options instanceof Array) {
|
||||
options = { types: options }
|
||||
}
|
||||
const opts = mergeRecursive(DEFAULT_DICT_OPTIONS, options)
|
||||
if (opts.types === undefined) {
|
||||
throw new Error('need dict types')
|
||||
}
|
||||
const ps = []
|
||||
this._dictMetas = opts.types.map(t => DictMeta.parse(t))
|
||||
this._dictMetas.forEach(dictMeta => {
|
||||
const type = dictMeta.type
|
||||
Vue.set(this.label, type, {})
|
||||
Vue.set(this.type, type, [])
|
||||
if (dictMeta.lazy) {
|
||||
return
|
||||
}
|
||||
ps.push(loadDict(this, dictMeta))
|
||||
})
|
||||
return Promise.all(ps)
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新加载字典
|
||||
* @param {String} type 字典类型
|
||||
*/
|
||||
reloadDict(type) {
|
||||
const dictMeta = this._dictMetas.find(e => e.type === type)
|
||||
if (dictMeta === undefined) {
|
||||
return Promise.reject(`the dict meta of ${type} was not found`)
|
||||
}
|
||||
return loadDict(this, dictMeta)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载字典
|
||||
* @param {Dict} dict 字典
|
||||
* @param {DictMeta} dictMeta 字典元数据
|
||||
* @returns {Promise}
|
||||
*/
|
||||
function loadDict(dict, dictMeta) {
|
||||
return dictMeta.request(dictMeta)
|
||||
.then(response => {
|
||||
const type = dictMeta.type
|
||||
let dicts = dictMeta.responseConverter(response, dictMeta)
|
||||
if (!(dicts instanceof Array)) {
|
||||
console.error('the return of responseConverter must be Array.<DictData>')
|
||||
dicts = []
|
||||
} else if (dicts.filter(d => d instanceof DictData).length !== dicts.length) {
|
||||
console.error('the type of elements in dicts must be DictData')
|
||||
dicts = []
|
||||
}
|
||||
dict.type[type].splice(0, Number.MAX_SAFE_INTEGER, ...dicts)
|
||||
dicts.forEach(d => {
|
||||
Vue.set(dict.label[type], d.value, d.label)
|
||||
})
|
||||
return dicts
|
||||
})
|
||||
}
|
||||
|
||||
@@ -27,75 +27,23 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线索渠道" prop="clueChannel">
|
||||
<el-select v-model="queryParams.clueChannel" placeholder="请选择线索渠道" clearable>
|
||||
<el-form-item label="预约状态" prop="status">
|
||||
<el-select v-model="queryParams.makerStatus" placeholder="请选择到店状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.clue_channels"
|
||||
v-for="dict in dict.type.maker_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="信息来源" prop="dataSource">
|
||||
<el-select v-model="queryParams.dataSource" placeholder="请选择信息来源" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.customer_source"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="到店状态" prop="status">
|
||||
<el-select v-model="queryParams.storeStatus" placeholder="请选择到店状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.to_store_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="微信号" prop="wechat">
|
||||
<el-input
|
||||
v-model="queryParams.wechat"
|
||||
placeholder="请输入微信号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="意向车型" prop="intentionCarModels">
|
||||
<el-input
|
||||
v-model="queryParams.intentionCarModels"
|
||||
placeholder="请输入意向车型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预计到店" prop="preToStoreDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.preToStoreDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择预计到店">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="下单日期" prop="orderDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.orderDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择下单日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -139,22 +87,17 @@
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns" :pageName="$options.name" ></right-toolbar>
|
||||
</el-row>
|
||||
</el-row>-->
|
||||
|
||||
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="客户姓名" align="center" prop="userName" width="120" v-if="columns[1].visible" show-overflow-tooltip />
|
||||
<el-table-column label="客户状态" align="center" prop="status" width="120" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.customer_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户级别" align="center" prop="userType" v-if="columns[3].visible" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.customer_level" :value="scope.row.userType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="手机号码" align="center" prop="phoneNumber" width="110" v-if="columns[5].visible" show-overflow-tooltip />
|
||||
<el-table-column label="客户性别" align="center" prop="sex" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="线索渠道" align="center" prop="clueChannel" v-if="columns[8].visible" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.clue_channels" :value="scope.row.clueChannel"/>
|
||||
@@ -166,52 +109,33 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户居住" align="center" prop="liveAddress" width="100" v-if="columns[10].visible" show-overflow-tooltip />
|
||||
<el-table-column label="到店状态" align="center" prop="status" width="100" v-if="columns[11].visible" show-overflow-tooltip >
|
||||
<el-table-column label="意向级别" align="center" prop="intentionLevel" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.to_store_status" :value="scope.row.storeStatus"/>
|
||||
<dict-tag :options="dict.type.customer_level" :value="scope.row.intentionLevel"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="微信号" align="center" prop="wechat" width="110" v-if="columns[20].visible" show-overflow-tooltip />
|
||||
<el-table-column label="下单日期" align="center" prop="orderDate" width="120" v-if="columns[33].visible" show-overflow-tooltip >
|
||||
<el-table-column label="预约状态" align="center" prop="status" width="100" v-if="columns[11].visible" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.orderDate, '{y}-{m}-{d}') }}</span>
|
||||
<dict-tag :options="dict.type.maker_status" :value="scope.row.makerStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="是否评估" align="center" prop="isAssessment" />-->
|
||||
<el-table-column label="意向车型" align="center" prop="intentionCarModels" width="120" v-if="columns[24].visible" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="对比车型" align="center" prop="contrastCarModels" />
|
||||
<el-table-column label="是否试驾" align="center" prop="isTestDrive" />
|
||||
<el-table-column label="是否报价" align="center" prop="isOffer" />
|
||||
<el-table-column label="是否金融" align="center" prop="isFinance" />-->
|
||||
<!-- <el-table-column label="最后到店" align="center" prop="lastToStoreDate" width="120">
|
||||
<el-table-column label="预约时间" class-name="specialColor" align="center" prop="appointmentTime" width="180" v-if="columns[30].visible" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.lastToStoreDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="已有车辆" align="center" prop="existModels" v-if="columns[22].visible" show-overflow-tooltip />
|
||||
<el-table-column label="预计到店" class-name="specialColor" align="center" prop="preToStoreDate" width="120" v-if="columns[30].visible" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.preToStoreDate, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.appointmentTime, '{y}-{m}-{d} {h}:{i}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到店时间" class-name="specialColor" align="center" prop="arrivalTime" show-overflow-tooltip width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.arrivalTime, '{y}-{m}-{d} {h}:{i}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="跟进次数" class-name="specialColor" align="center" prop="followUpTimes" v-if="columns[34].visible" show-overflow-tooltip />
|
||||
<el-table-column label="最新跟进日" class-name="specialColor" align="center" prop="followUpLastDate" width="100" v-if="columns[35].visible" show-overflow-tooltip />
|
||||
<el-table-column label="最新跟进级别" class-name="specialColor" align="center" prop="followUpLastLevel" width="100" v-if="columns[36].visible" show-overflow-tooltip />
|
||||
<el-table-column label="建议下次跟进日" class-name="specialColor" align="center" prop="proposalNextFollowDate" width="120" v-if="columns[37].visible" show-overflow-tooltip />
|
||||
<el-table-column label="跟进超期" class-name="specialColor" align="center" prop="followUpOverdueDate" width="120" v-if="columns[38].visible" show-overflow-tooltip />
|
||||
<el-table-column label="未订车原因" align="center" prop="unBookingCarReason" width="110" show-overflow-tooltip v-if="columns[29].visible" show-overflow-tooltip />
|
||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip v-if="columns[19].visible" />
|
||||
|
||||
<el-table-column label="操作" width="160" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleFollow(scope.row)"
|
||||
v-hasPermi="['system:customer:edit']"
|
||||
>跟进</el-button>
|
||||
<el-button
|
||||
<el-popconfirm title="是否确认到店?" @confirm="popConfirm(scope.row)" @cancel="popCancel" >
|
||||
<el-button v-if="scope.row.makerStatus =='waitStore'" size="mini" type="text" icon="el-icon-edit" slot="reference">确认到店</el-button>
|
||||
</el-popconfirm>
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@@ -224,7 +148,7 @@
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:customer:remove']"
|
||||
>删除</el-button>
|
||||
>取消</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -348,14 +272,6 @@
|
||||
placeholder="请选择预计到店">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="最后到店" prop="lastToStoreDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.lastToStoreDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择最后到店">
|
||||
</el-date-picker>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="4S店" prop="storeName">
|
||||
<el-input v-model="form.storeName" placeholder="请输入4S店" />
|
||||
</el-form-item>
|
||||
@@ -457,9 +373,10 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
listCustomer,
|
||||
listCustomerMaker,
|
||||
getCustomer,
|
||||
delCustomer,
|
||||
confirmToStore,
|
||||
addCustomer,
|
||||
updateCustomer,
|
||||
addCustomerFollowRecerd, updateCustomerFollowRecerd, listCustomerFollow
|
||||
@@ -468,7 +385,7 @@ import Data from "@/views/system/dict/data";
|
||||
|
||||
export default {
|
||||
name: "bookManagerCustomer",
|
||||
dicts: ['to_store_status', 'customer_source','customer_status', 'sys_user_sex', 'customer_level', 'clue_channels','follow_result','follow_up_method'],
|
||||
dicts: ['maker_status', 'customer_source','customer_status', 'sys_user_sex', 'customer_level', 'clue_channels','follow_result','follow_up_method'],
|
||||
data() {
|
||||
return {
|
||||
drawer:false,
|
||||
@@ -512,7 +429,9 @@ export default {
|
||||
wechat: null,
|
||||
intentionCarModels: null,
|
||||
preToStoreDate: null,
|
||||
orderDate: null
|
||||
orderDate: null,
|
||||
orderByColumn:'appointment_time',
|
||||
isAsc:'desc'
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
@@ -616,7 +535,7 @@ export default {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.status = 'potential';
|
||||
listCustomer(this.queryParams).then(response => {
|
||||
listCustomerMaker(this.queryParams).then(response => {
|
||||
this.customerList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
@@ -705,6 +624,30 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "添加客户信息";
|
||||
},
|
||||
popConfirm(row){
|
||||
let param = {
|
||||
id : row.id,
|
||||
makerStatus:'alreadyStore',
|
||||
arrivalTime:this.getDateYYYYMMddHHMMSS()
|
||||
}
|
||||
confirmToStore(param).then(response => {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
popCancel(){
|
||||
console.log('取消')
|
||||
},
|
||||
getDateYYYYMMddHHMMSS(){
|
||||
const date = new Date();
|
||||
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
||||
const strDate = date.getDate().toString().padStart(2, '0');
|
||||
const starHours = date.getHours().toString().padStart(2, '0');
|
||||
const starMinutes = date.getMinutes().toString().padStart(2, '0');
|
||||
const starSeconds = date.getSeconds().toString().padStart(2, '0');
|
||||
return `${date.getFullYear()}-${month}-${strDate} ${starHours}:${starMinutes}:${starSeconds}`;
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
|
||||
@@ -83,9 +83,9 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预计到店" prop="preToStoreDate">
|
||||
<el-form-item label="预计到店" prop="appointmentTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.preToStoreDate"
|
||||
v-model="queryParams.appointmentTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择预计到店">
|
||||
@@ -154,6 +154,11 @@
|
||||
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="客户姓名" align="center" prop="userName" width="120" v-if="columns[1].visible" show-overflow-tooltip />
|
||||
<el-table-column label="客户性别" align="center" prop="sex" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户状态" align="center" prop="status" width="120" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.customer_status" :value="scope.row.status"/>
|
||||
@@ -199,11 +204,11 @@
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="已有车辆" align="center" prop="existModels" v-if="columns[22].visible" show-overflow-tooltip />
|
||||
<el-table-column label="预计到店" class-name="specialColor" align="center" prop="preToStoreDate" width="120" v-if="columns[30].visible" show-overflow-tooltip >
|
||||
<!-- <el-table-column label="预计到店" class-name="specialColor" align="center" prop="appointmentTime" width="120" v-if="columns[30].visible" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.preToStoreDate, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.appointmentTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="跟进次数" class-name="specialColor" align="center" prop="followUpTimes" v-if="columns[34].visible" show-overflow-tooltip />
|
||||
<el-table-column label="最新跟进日" class-name="specialColor" align="center" prop="followUpLastDate" width="100" v-if="columns[35].visible" show-overflow-tooltip />
|
||||
<el-table-column label="最新跟进级别" class-name="specialColor" align="center" prop="followUpLastLevel" width="100" v-if="columns[36].visible" show-overflow-tooltip />
|
||||
@@ -214,13 +219,13 @@
|
||||
|
||||
<el-table-column label="操作" width="160" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleFollow(scope.row)"
|
||||
v-hasPermi="['system:customer:edit']"
|
||||
>跟进</el-button>
|
||||
>跟进</el-button>-->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@@ -350,9 +355,9 @@
|
||||
<el-input v-model="form.isFinance" placeholder="请输入是否金融" />
|
||||
</el-form-item>
|
||||
-->
|
||||
<el-form-item label="预计到店" prop="preToStoreDate">
|
||||
<el-form-item label="预计到店" prop="appointmentTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.preToStoreDate"
|
||||
v-model="form.appointmentTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择预计到店">
|
||||
@@ -393,19 +398,14 @@
|
||||
<el-timeline :reverse="reverse">
|
||||
<el-timeline-item placement="top" v-for="(follow, index) in followUpList" :key="index" :timestamp="follow.followUpDate">
|
||||
<el-card shadow="hover">
|
||||
<p><el-tag>跟进方式:</el-tag>
|
||||
<el-select v-model="follow.followUpMethod" disabled>
|
||||
<el-option
|
||||
v-for="dict in dict.type.follow_up_method"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</p>
|
||||
<p><el-tag>级别:</el-tag> {{follow.followLevel}} </p>
|
||||
<h4><el-tag>记录:</el-tag> {{follow.followUpRecord}}</h4>
|
||||
<p> <el-tag>再次预约到店日期:</el-tag> {{follow.preToStoreDate}} </p>
|
||||
<p><el-tag>跟进方式:</el-tag> {{follow.followUpMethod}} </p>
|
||||
<p><el-tag>跟进结果:</el-tag> {{follow.followResultDesc}} </p>
|
||||
<p v-show="follow.followResult!='fail'" ><el-tag>意向级别:</el-tag> {{follow.intentionLevel}} </p>
|
||||
<p><el-tag>跟进记录:</el-tag> {{follow.followUpRecord}}</p>
|
||||
<p v-show="follow.followResult == 'maker'" > <el-tag>预约时间:</el-tag> {{follow.appointmentTime}} </p>
|
||||
<p v-show="follow.followResult !='fail' && follow.nextFollowUpTime " > <el-tag>下次跟进时间:</el-tag> {{follow.nextFollowUpTime}} </p>
|
||||
<p v-show="follow.followResult !='fail' && follow.nextFollowUpRecord" > <el-tag>下次跟进记录:</el-tag> {{follow.nextFollowUpRecord}} </p>
|
||||
<p v-show="follow.followResult=='fail'"><el-tag>战败原因:</el-tag> {{follow.defeatReasons}}</p>
|
||||
<p>提交于 {{follow.createTime}}</p>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
@@ -430,11 +430,39 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="跟进记录" prop="followUpRecord">
|
||||
<el-form-item label="本次跟进记录" prop="followUpRecord">
|
||||
<el-input v-model="followForm.followUpRecord" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="级别" prop="followLevel">
|
||||
<el-select v-model="followForm.followLevel" placeholder="请选择级别" clearable>
|
||||
<el-form-item label="跟进结果" prop="followResult">
|
||||
<el-radio-group v-model="followForm.followResult" @input="selctRadion">
|
||||
<el-radio-button v-for="dict in dict.type.follow_result"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
:name="dict.value">{{ dict.label }}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="followFormShow.appointmentTimeShow" label="预约时间" prop="appointmentTime" :rules="followForm.followResult=='maker' ? [{ required:true, message: '预约时间不能为空', trigger: 'blur'}]:[{ required:false}]">
|
||||
<el-date-picker clearable
|
||||
v-model="followForm.appointmentTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择预约时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="followFormShow.nextFollowUpTimeShow" label="下次跟进时间" prop="nextFollowUpTime" :rules="followForm.followResult == 'fail' ?[{ required:false}] : [{ required:true, message: '下次跟进时间不能为空', trigger: 'blur'}]">
|
||||
<el-date-picker clearable
|
||||
v-model="followForm.nextFollowUpTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择下次跟进时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="followFormShow.nextFollowUpRecordShow" label="下次跟进记录" prop="nextFollowUpRecord">
|
||||
<el-input v-model="followForm.nextFollowUpRecord" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item v-show="followFormShow.intentionLevelShow" label="意向级别" prop="intentionLevel" :rules="followForm.followResult=='fail' ? [{ required:false}] : [{ required:true, message: '意向级别不能为空', trigger: 'blur'}]">
|
||||
<el-select v-model="followForm.intentionLevel" placeholder="请选择级别" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.customer_level"
|
||||
:key="dict.value"
|
||||
@@ -443,16 +471,8 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="再次预约到店日期" prop="preToStoreDate">
|
||||
<el-date-picker clearable
|
||||
v-model="followForm.preToStoreDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择再次预约到店日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="followForm.remark" type="textarea" placeholder="请输入内容" />
|
||||
<el-form-item v-show="followFormShow.defeatReasonsShow" label="战败原因" prop="defeatReasons" :rules="followForm.followResult!='fail' ? followForm.defeatReasons : [{ required:true, message: '战败原因不能为空', trigger: 'blur'}]">
|
||||
<el-input v-model="followForm.defeatReasons" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: center">
|
||||
@@ -460,7 +480,6 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
@@ -474,7 +493,6 @@ import {
|
||||
updateCustomer,
|
||||
addCustomerFollowRecerd, updateCustomerFollowRecerd, listCustomerFollow
|
||||
} from "@/api/system/customer";
|
||||
import Data from "@/views/system/dict/data";
|
||||
|
||||
export default {
|
||||
name: "Customer",
|
||||
@@ -521,7 +539,7 @@ export default {
|
||||
status: null,
|
||||
wechat: null,
|
||||
intentionCarModels: null,
|
||||
preToStoreDate: null,
|
||||
appointmentTime: null,
|
||||
orderDate: null
|
||||
},
|
||||
// 表单参数
|
||||
@@ -532,6 +550,13 @@ export default {
|
||||
followUpDate:null,
|
||||
customerId:null,
|
||||
},
|
||||
followFormShow:{
|
||||
appointmentTimeShow:false,
|
||||
intentionLevelShow:false,
|
||||
nextFollowUpTimeShow:false,
|
||||
nextFollowUpRecordShow:false,
|
||||
defeatReasonsShow:false,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
userName: [
|
||||
@@ -558,7 +583,7 @@ export default {
|
||||
followUpRecord:[
|
||||
{ required: true, message: "跟进记录不能为空", trigger: "blur" }
|
||||
],
|
||||
followLevel: [
|
||||
intentionLevel: [
|
||||
{ required: true, message: "级别不能为空", trigger: "blur" }
|
||||
],
|
||||
followUpMethod:[
|
||||
@@ -633,18 +658,39 @@ export default {
|
||||
},
|
||||
/** 查询客户跟进信息列表 */
|
||||
getFollowList(customerId) {
|
||||
let that = this;
|
||||
this.loading = true;
|
||||
let queryParams = {
|
||||
customerId:customerId,
|
||||
pageNum:1,
|
||||
pageSize:1000,
|
||||
}
|
||||
let dictType = that.dict.type;
|
||||
listCustomerFollow(queryParams).then(response => {
|
||||
this.followUpList = response.rows;
|
||||
//赋值
|
||||
for (let follow of this.followUpList) {
|
||||
let followUpMethod = this.getDictLableByVal(dictType.follow_up_method,follow.followUpMethod);
|
||||
let followResult = this.getDictLableByVal(dictType.follow_result,follow.followResult);
|
||||
let intentionLevel = this.getDictLableByVal(dictType.customer_level,follow.intentionLevel);
|
||||
follow.followUpMethod = followUpMethod;
|
||||
follow.followResultDesc = followResult;
|
||||
follow.intentionLevel = intentionLevel;
|
||||
}
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
//跟进字典val获取描述
|
||||
getDictLableByVal(dictData,val){
|
||||
let lable = '';
|
||||
dictData.map(i =>{
|
||||
if (i.value == val) {
|
||||
lable = i.label
|
||||
}
|
||||
})
|
||||
return lable
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
@@ -683,7 +729,7 @@ export default {
|
||||
isOffer: null,
|
||||
isFinance: null,
|
||||
unBookingCarReason: null,
|
||||
preToStoreDate: null,
|
||||
appointmentTime: null,
|
||||
lastToStoreDate: null,
|
||||
storeName: null,
|
||||
orderDate: null
|
||||
@@ -729,7 +775,7 @@ export default {
|
||||
handleFollow(row){
|
||||
this.drawer = true;
|
||||
this.customerId = row.id;
|
||||
this.followTitle = row.userName + " 跟进记录";
|
||||
this.followTitle = row.userName +" "+ row.phoneNumber+" 跟进记录";
|
||||
this.getFollowList(this.customerId);
|
||||
},
|
||||
handleDrawerAddFollowUp(){
|
||||
@@ -798,9 +844,9 @@ export default {
|
||||
let obj = {};
|
||||
obj.followUpDate = "";
|
||||
obj.followUpRecord = "";
|
||||
obj.preToStoreDate = "";
|
||||
obj.appointmentTime = "";
|
||||
obj.remark = "";
|
||||
obj.followLevel = "";
|
||||
obj.intentionLevel = "";
|
||||
this.followUpList.push(obj);
|
||||
},
|
||||
/** 跟进模块-客户跟进记录删除按钮操作 */
|
||||
@@ -815,6 +861,34 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
//新增跟进时,选择跟进结果实现不同表单校验
|
||||
selctRadion(e){
|
||||
if(e=='fail'){
|
||||
// this.followRules.defeatReasons = [{required: true, message: "战败原因不能为空", trigger: "blur"}]
|
||||
this.followRules.intentionLevel = [];
|
||||
this.followRules.nextFollowUpTime = [];
|
||||
this.followFormShow.defeatReasonsShow = true;
|
||||
this.followFormShow.appointmentTimeShow=false;
|
||||
this.followFormShow.intentionLevelShow=false;
|
||||
this.followFormShow.nextFollowUpTimeShow=false;
|
||||
this.followFormShow.nextFollowUpRecordShow=false;
|
||||
}else if(e=='going'){
|
||||
this.followRules.defeatReasons = [];
|
||||
this.followRules.appointmentTime = [];
|
||||
this.followFormShow.defeatReasonsShow = false;
|
||||
this.followFormShow.appointmentTimeShow=false;
|
||||
this.followFormShow.intentionLevelShow=true;
|
||||
this.followFormShow.nextFollowUpTimeShow=true;
|
||||
this.followFormShow.nextFollowUpRecordShow=true;
|
||||
}else if(e=='maker'){
|
||||
this.followRules.defeatReasons = [];
|
||||
this.followFormShow.defeatReasonsShow = false;
|
||||
this.followFormShow.appointmentTimeShow=true;
|
||||
this.followFormShow.intentionLevelShow=true;
|
||||
this.followFormShow.nextFollowUpTimeShow=true;
|
||||
this.followFormShow.nextFollowUpRecordShow=true;
|
||||
}
|
||||
},
|
||||
/** 复选框选中数据 */
|
||||
handleFollowUpSelectionChange(selection) {
|
||||
this.checkedFollowUp = selection.map(item => item.index)
|
||||
|
||||
385
ruoyi-ui/src/views/system/customerOrder/index.vue
Normal file
385
ruoyi-ui/src/views/system/customerOrder/index.vue
Normal file
@@ -0,0 +1,385 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="客户" prop="userName">
|
||||
<el-input
|
||||
v-model="queryParams.userName"
|
||||
placeholder="请输入客户"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户手机" prop="phoneNumber">
|
||||
<el-input
|
||||
v-model="queryParams.phoneNumber"
|
||||
placeholder="请输入客户手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订车时间" prop="orderDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.orderDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择订车时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆详细" prop="carInfo">
|
||||
<el-input
|
||||
v-model="queryParams.carInfo"
|
||||
placeholder="请输入车辆详细"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆VIN" prop="carVin">
|
||||
<el-input
|
||||
v-model="queryParams.carVin"
|
||||
placeholder="请输入车辆VIN"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:customerOrder:add']"
|
||||
>新增</el-button>
|
||||
</el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:customerOrder:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:customerOrder:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:customerOrder:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="customerOrderList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="客户" align="center" prop="userName" />
|
||||
<el-table-column label="客户手机" align="center" prop="phoneNumber" />
|
||||
<el-table-column label="客户性别" align="center" prop="sex" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="线索渠道" align="center" prop="clueChannel" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.clue_channels" :value="scope.row.clueChannel"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="信息来源" align="center" prop="dataSource" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.customer_source" :value="scope.row.dataSource"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订车时间" align="center" prop="orderDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.orderDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="车辆详细" align="center" prop="carInfo" width="280"/>
|
||||
<el-table-column label="车辆VIN" align="center" prop="carVin" width="220" />
|
||||
<el-table-column label="车辆状态" align="center" prop="carStatus" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.car_status" :value="scope.row.carStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库日期" align="center" prop="outDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.outDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="创建者" align="center" prop="createBy" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="更新者" align="center" prop="updateBy" />
|
||||
<el-table-column label="更新时间" align="center" prop="updateTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:customerOrder:edit']"
|
||||
>修改</el-button>
|
||||
<el-popconfirm title="是否确认出库?" @confirm="popConfirm(scope.row)" @cancel="popCancel" >
|
||||
<el-button v-if="scope.row.carStatus =='notOut'" size="mini" type="text" icon="el-icon-check" slot="reference">确认出库</el-button>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改客户-订车对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<!-- <el-form-item label="客户id" prop="customerId">
|
||||
<el-input v-model="form.customerId" placeholder="请输入客户id" />
|
||||
</el-form-item>-->
|
||||
<el-form-item label="订车时间" prop="orderDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.orderDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择订车时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆详细" prop="carInfo">
|
||||
<el-input v-model="form.carInfo" placeholder="请输入车辆详细" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆VIN" prop="carVin">
|
||||
<el-input v-model="form.carVin" placeholder="请输入车辆VIN" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆状态" prop="carStatus">
|
||||
<el-select v-model="form.carStatus" placeholder="请选择车辆状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.car_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { confirmToOut,getCustomerOrderPage, getCustomerOrder, delCustomerOrder, addCustomerOrder, updateCustomerOrder } from "@/api/system/customerOrder";
|
||||
|
||||
export default {
|
||||
name: "CustomerOrder",
|
||||
dicts: ['to_store_status', 'customer_source','customer_status', 'sys_user_sex', 'customer_level', 'clue_channels','follow_result','car_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 客户-订车表格数据
|
||||
customerOrderList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
customerId: null,
|
||||
orderDate: null,
|
||||
carInfo: null,
|
||||
carVin: null,
|
||||
carStatus: null,
|
||||
orderByColumn:'t.order_date',
|
||||
isAsc:'desc'
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询客户-订车列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getCustomerOrderPage(this.queryParams).then(response => {
|
||||
this.customerOrderList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
customerId: null,
|
||||
orderDate: null,
|
||||
carInfo: null,
|
||||
carVin: null,
|
||||
carStatus: "0",
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
popConfirm(row){
|
||||
let param = {
|
||||
id : row.id,
|
||||
carStatus:'outbound',
|
||||
outDate:this.getDateYYYYMMddHHMMSS()
|
||||
}
|
||||
confirmToOut(param).then(response => {
|
||||
this.$modal.msgSuccess("出库成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
popCancel(){
|
||||
console.log('取消')
|
||||
},
|
||||
getDateYYYYMMddHHMMSS(){
|
||||
const date = new Date();
|
||||
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
||||
const strDate = date.getDate().toString().padStart(2, '0');
|
||||
const starHours = date.getHours().toString().padStart(2, '0');
|
||||
const starMinutes = date.getMinutes().toString().padStart(2, '0');
|
||||
const starSeconds = date.getSeconds().toString().padStart(2, '0');
|
||||
return `${date.getFullYear()}-${month}-${strDate} ${starHours}:${starMinutes}:${starSeconds}`;
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加客户-订车";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getCustomerOrder(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改客户-订车";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateCustomerOrder(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addCustomerOrder(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除客户-订车编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delCustomerOrder(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/customerOrder/export', {
|
||||
...this.queryParams
|
||||
}, `customerOrder_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -9,7 +9,6 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户级别" prop="userType">
|
||||
<el-select v-model="queryParams.userType" placeholder="请选择客户级别" clearable>
|
||||
<el-option
|
||||
@@ -48,16 +47,6 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="到店状态" prop="status">
|
||||
<el-select v-model="queryParams.storeStatus" placeholder="请选择到店状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.to_store_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="微信号" prop="wechat">
|
||||
<el-input
|
||||
v-model="queryParams.wechat"
|
||||
@@ -74,14 +63,6 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预计到店" prop="preToStoreDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.preToStoreDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择预计到店">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="下单日期" prop="orderDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.orderDate"
|
||||
@@ -145,6 +126,11 @@
|
||||
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="客户姓名" align="center" prop="userName" width="120" v-if="columns[1].visible" show-overflow-tooltip />
|
||||
<el-table-column label="客户性别" align="center" prop="sex" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户级别" align="center" prop="userType" v-if="columns[3].visible" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.customer_level" :value="scope.row.userType"/>
|
||||
@@ -162,32 +148,27 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户居住" align="center" prop="liveAddress" width="100" v-if="columns[10].visible" show-overflow-tooltip />
|
||||
<el-table-column label="到店状态" align="center" prop="status" width="100" v-if="columns[11].visible" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.to_store_status" :value="scope.row.storeStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="微信号" align="center" prop="wechat" width="110" v-if="columns[20].visible" show-overflow-tooltip />
|
||||
<el-table-column label="下单日期" align="center" prop="orderDate" width="120" v-if="columns[33].visible" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.orderDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="是否评估" align="center" prop="isAssessment" />-->
|
||||
<!-- <el-table-column label="是否评估" align="center" prop="isAssessment" />-->
|
||||
<el-table-column label="意向车型" align="center" prop="intentionCarModels" width="120" v-if="columns[24].visible" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="对比车型" align="center" prop="contrastCarModels" />
|
||||
<el-table-column label="是否试驾" align="center" prop="isTestDrive" />
|
||||
<el-table-column label="是否报价" align="center" prop="isOffer" />
|
||||
<el-table-column label="是否金融" align="center" prop="isFinance" />-->
|
||||
<!-- <el-table-column label="最后到店" align="center" prop="lastToStoreDate" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.lastToStoreDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<!-- <el-table-column label="对比车型" align="center" prop="contrastCarModels" />
|
||||
<el-table-column label="是否试驾" align="center" prop="isTestDrive" />
|
||||
<el-table-column label="是否报价" align="center" prop="isOffer" />
|
||||
<el-table-column label="是否金融" align="center" prop="isFinance" />-->
|
||||
<!-- <el-table-column label="最后到店" align="center" prop="lastToStoreDate" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.lastToStoreDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="已有车辆" align="center" prop="existModels" v-if="columns[22].visible" show-overflow-tooltip />
|
||||
<el-table-column label="预计到店" class-name="specialColor" align="center" prop="preToStoreDate" width="120" v-if="columns[30].visible" show-overflow-tooltip >
|
||||
<el-table-column label="预计到店" class-name="specialColor" align="center" prop="appointmentTime" width="120" v-if="columns[30].visible" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.preToStoreDate, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.appointmentTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="跟进次数" class-name="specialColor" align="center" prop="followUpTimes" v-if="columns[34].visible" show-overflow-tooltip />
|
||||
@@ -207,6 +188,13 @@
|
||||
@click="handleFollow(scope.row)"
|
||||
v-hasPermi="['system:customer:edit']"
|
||||
>跟进</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleToOrder(scope.row)"
|
||||
v-hasPermi="['system:customer:toOrder']"
|
||||
>下订单</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@@ -326,32 +314,32 @@
|
||||
<el-form-item label="意向车型" prop="intentionCarModels">
|
||||
<el-input v-model="form.intentionCarModels" placeholder="请输入意向车型" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="是否试驾" prop="isTestDrive">
|
||||
<el-input v-model="form.isTestDrive" placeholder="请输入是否试驾" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否报价" prop="isOffer">
|
||||
<el-input v-model="form.isOffer" placeholder="请输入是否报价" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否金融" prop="isFinance">
|
||||
<el-input v-model="form.isFinance" placeholder="请输入是否金融" />
|
||||
</el-form-item>
|
||||
-->
|
||||
<el-form-item label="预计到店" prop="preToStoreDate">
|
||||
<!-- <el-form-item label="是否试驾" prop="isTestDrive">
|
||||
<el-input v-model="form.isTestDrive" placeholder="请输入是否试驾" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否报价" prop="isOffer">
|
||||
<el-input v-model="form.isOffer" placeholder="请输入是否报价" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否金融" prop="isFinance">
|
||||
<el-input v-model="form.isFinance" placeholder="请输入是否金融" />
|
||||
</el-form-item>
|
||||
-->
|
||||
<el-form-item label="预计到店" prop="appointmentTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.preToStoreDate"
|
||||
v-model="form.appointmentTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择预计到店">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="最后到店" prop="lastToStoreDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.lastToStoreDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择最后到店">
|
||||
</el-date-picker>
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item label="最后到店" prop="lastToStoreDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.lastToStoreDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择最后到店">
|
||||
</el-date-picker>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="4S店" prop="storeName">
|
||||
<el-input v-model="form.storeName" placeholder="请输入4S店" />
|
||||
</el-form-item>
|
||||
@@ -379,19 +367,14 @@
|
||||
<el-timeline :reverse="reverse">
|
||||
<el-timeline-item placement="top" v-for="(follow, index) in followUpList" :key="index" :timestamp="follow.followUpDate">
|
||||
<el-card shadow="hover">
|
||||
<p><el-tag>跟进方式:</el-tag>
|
||||
<el-select v-model="follow.followUpMethod" disabled>
|
||||
<el-option
|
||||
v-for="dict in dict.type.follow_up_method"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</p>
|
||||
<p><el-tag>级别:</el-tag> {{follow.followLevel}} </p>
|
||||
<h4><el-tag>记录:</el-tag> {{follow.followUpRecord}}</h4>
|
||||
<p> <el-tag>再次预约到店日期:</el-tag> {{follow.preToStoreDate}} </p>
|
||||
<p><el-tag>跟进方式:</el-tag> {{follow.followUpMethod}} </p>
|
||||
<p><el-tag>跟进结果:</el-tag> {{follow.followResultDesc}} </p>
|
||||
<p v-show="follow.followResult!='fail'" ><el-tag>意向级别:</el-tag> {{follow.intentionLevel}} </p>
|
||||
<p><el-tag>跟进记录:</el-tag> {{follow.followUpRecord}}</p>
|
||||
<p v-show="follow.followResult == 'maker'" > <el-tag>预约时间:</el-tag> {{follow.appointmentTime}} </p>
|
||||
<p v-show="follow.followResult !='fail' && follow.nextFollowUpTime " > <el-tag>下次跟进时间:</el-tag> {{follow.nextFollowUpTime}} </p>
|
||||
<p v-show="follow.followResult !='fail' && follow.nextFollowUpRecord" > <el-tag>下次跟进记录:</el-tag> {{follow.nextFollowUpRecord}} </p>
|
||||
<p v-show="follow.followResult=='fail'"><el-tag>战败原因:</el-tag> {{follow.defeatReasons}}</p>
|
||||
<p>提交于 {{follow.createTime}}</p>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
@@ -416,11 +399,39 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="跟进记录" prop="followUpRecord">
|
||||
<el-form-item label="本次跟进记录" prop="followUpRecord">
|
||||
<el-input v-model="followForm.followUpRecord" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="级别" prop="followLevel">
|
||||
<el-select v-model="followForm.followLevel" placeholder="请选择级别" clearable>
|
||||
<el-form-item label="跟进结果" prop="followResult">
|
||||
<el-radio-group v-model="followForm.followResult" @input="selctRadion">
|
||||
<el-radio-button v-for="dict in dict.type.follow_result"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
:name="dict.value">{{ dict.label }}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="followFormShow.appointmentTimeShow" label="预约时间" prop="appointmentTime" :rules="followForm.followResult=='maker' ? [{ required:true, message: '预约时间不能为空', trigger: 'blur'}]:[{ required:false}]">
|
||||
<el-date-picker clearable
|
||||
v-model="followForm.appointmentTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择预约时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="followFormShow.nextFollowUpTimeShow" label="下次跟进时间" prop="nextFollowUpTime" :rules="followForm.followResult == 'fail' ?[{ required:false}] : [{ required:true, message: '下次跟进时间不能为空', trigger: 'blur'}]">
|
||||
<el-date-picker clearable
|
||||
v-model="followForm.nextFollowUpTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择下次跟进时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="followFormShow.nextFollowUpRecordShow" label="下次跟进记录" prop="nextFollowUpRecord">
|
||||
<el-input v-model="followForm.nextFollowUpRecord" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item v-show="followFormShow.intentionLevelShow" label="意向级别" prop="intentionLevel" :rules="followForm.followResult=='fail' ? [{ required:false}] : [{ required:true, message: '意向级别不能为空', trigger: 'blur'}]">
|
||||
<el-select v-model="followForm.intentionLevel" placeholder="请选择级别" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.customer_level"
|
||||
:key="dict.value"
|
||||
@@ -429,16 +440,8 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="再次预约到店日期" prop="preToStoreDate">
|
||||
<el-date-picker clearable
|
||||
v-model="followForm.preToStoreDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择再次预约到店日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="followForm.remark" type="textarea" placeholder="请输入内容" />
|
||||
<el-form-item v-show="followFormShow.defeatReasonsShow" label="战败原因" prop="defeatReasons" :rules="followForm.followResult!='fail' ? followForm.defeatReasons : [{ required:true, message: '战败原因不能为空', trigger: 'blur'}]">
|
||||
<el-input v-model="followForm.defeatReasons" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: center">
|
||||
@@ -446,8 +449,54 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
|
||||
</el-drawer>
|
||||
|
||||
<el-dialog :title="orderTitle" :visible.sync="orderOpen" width="500px" append-to-body>
|
||||
<el-form ref="orderForm" :model="orderForm" :rules="orderRules" label-width="80px">
|
||||
<el-form-item label="客户" prop="customerName">
|
||||
{{orderForm.customerName}}
|
||||
</el-form-item>
|
||||
<el-form-item label="订车时间" prop="orderDate">
|
||||
<el-date-picker clearable
|
||||
v-model="orderForm.orderDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择订车时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆详细" prop="carInfo">
|
||||
<el-input v-model="orderForm.carInfo" type="textarea" placeholder="请输入车辆详细" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆VIN" prop="carVin">
|
||||
<el-input v-model="orderForm.carVin" placeholder="请输入车辆VIN" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆状态" prop="carStatus">
|
||||
<el-select v-model="orderForm.carStatus" placeholder="请选择车辆状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.car_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库日期" prop="outDate">
|
||||
<el-date-picker clearable
|
||||
v-model="orderForm.outDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择出库日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="orderForm.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="orderSubmitForm">确 定</el-button>
|
||||
<el-button @click="orderCancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -458,13 +507,12 @@ import {
|
||||
delCustomer,
|
||||
addCustomer,
|
||||
updateCustomer,
|
||||
addCustomerFollowRecerd, updateCustomerFollowRecerd, listCustomerFollow
|
||||
addCustomerFollowRecerd, updateCustomerFollowRecerd, listCustomerFollow, addCustomerOrderRecerd
|
||||
} from "@/api/system/customer";
|
||||
import Data from "@/views/system/dict/data";
|
||||
|
||||
export default {
|
||||
name: "potentialCustomer",
|
||||
dicts: ['to_store_status', 'customer_source','customer_status', 'sys_user_sex', 'customer_level', 'clue_channels','follow_result','follow_up_method'],
|
||||
dicts: ['to_store_status','car_status' ,'customer_source','customer_status', 'sys_user_sex', 'customer_level', 'clue_channels','follow_result','follow_up_method'],
|
||||
data() {
|
||||
return {
|
||||
drawer:false,
|
||||
@@ -472,6 +520,7 @@ export default {
|
||||
innerDrawer:false,
|
||||
dafaultValue:null,
|
||||
customerId:null,
|
||||
customerStatus:null,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
followTitle:null,
|
||||
@@ -495,6 +544,23 @@ export default {
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
orderOpen:false,
|
||||
orderTitle:null,
|
||||
orderForm:{},
|
||||
orderRules:{
|
||||
orderDate: [
|
||||
{ required: true, message: "订单日期不能为空", trigger: "blur" }
|
||||
],
|
||||
carInfo: [
|
||||
{ required: true, message: "车辆信息不能为空", trigger: "blur" }
|
||||
],
|
||||
carVin: [
|
||||
{ required: true, message: "车辆VIN不能为空", trigger: "blur" }
|
||||
],
|
||||
carStatus:[
|
||||
{ required: true, message: "车辆状态不能为空", trigger: "change" }
|
||||
],
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@@ -507,7 +573,7 @@ export default {
|
||||
status: null,
|
||||
wechat: null,
|
||||
intentionCarModels: null,
|
||||
preToStoreDate: null,
|
||||
appointmentTime: null,
|
||||
orderDate: null
|
||||
},
|
||||
// 表单参数
|
||||
@@ -518,6 +584,13 @@ export default {
|
||||
followUpDate:null,
|
||||
customerId:null,
|
||||
},
|
||||
followFormShow:{
|
||||
appointmentTimeShow:false,
|
||||
intentionLevelShow:false,
|
||||
nextFollowUpTimeShow:false,
|
||||
nextFollowUpRecordShow:false,
|
||||
defeatReasonsShow:false,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
userName: [
|
||||
@@ -544,7 +617,7 @@ export default {
|
||||
followUpRecord:[
|
||||
{ required: true, message: "跟进记录不能为空", trigger: "blur" }
|
||||
],
|
||||
followLevel: [
|
||||
intentionLevel: [
|
||||
{ required: true, message: "级别不能为空", trigger: "blur" }
|
||||
],
|
||||
followUpMethod:[
|
||||
@@ -556,39 +629,39 @@ export default {
|
||||
},
|
||||
// 列表的列的显示隐藏设置
|
||||
columns:[
|
||||
{ key: 0, label: `客户ID`, visible: true },
|
||||
{ key: 0, label: `客户ID`, visible: false },
|
||||
{ key: 1, label: `客户名`, visible: true },
|
||||
{ key: 2, label: `客户昵称`, visible: true },
|
||||
{ key: 2, label: `客户昵称`, visible: false },
|
||||
{ key: 3, label: `客户级别`, visible: true },
|
||||
{ key: 4, label: `用户邮箱`, visible: true },
|
||||
{ key: 5, label: `手机号码`, visible: true },
|
||||
{ key: 6, label: `客户性别`, visible: true },
|
||||
{ key: 7, label: `头像地址`, visible: true },
|
||||
{ key: 8, label: `线索渠道`, visible: true },
|
||||
{ key: 9, label: `信息来源`, visible: true },
|
||||
{ key: 7, label: `头像地址`, visible: false },
|
||||
{ key: 8, label: `线索渠道`, visible: false },
|
||||
{ key: 9, label: `信息来源`, visible: false },
|
||||
{ key: 10, label: `客户居住`, visible: true },
|
||||
{ key: 11, label: `到店状态`, visible: true },
|
||||
{ key: 12, label: `删除标志`, visible: true },
|
||||
{ key: 13, label: `最后登录IP`, visible: true },
|
||||
{ key: 14, label: `最后登录时间`, visible: true },
|
||||
{ key: 15, label: `创建者`, visible: true },
|
||||
{ key: 12, label: `删除标志`, visible: false },
|
||||
{ key: 13, label: `最后登录IP`, visible: false },
|
||||
{ key: 14, label: `最后登录时间`, visible: false },
|
||||
{ key: 15, label: `创建者`, visible: false },
|
||||
{ key: 16, label: `创建时间`, visible: true },
|
||||
{ key: 17, label: `更新者`, visible: true },
|
||||
{ key: 17, label: `更新者`, visible: false },
|
||||
{ key: 18, label: `更新时间`, visible: true },
|
||||
{ key: 19, label: `备注`, visible: true },
|
||||
{ key: 19, label: `备注`, visible: false },
|
||||
{ key: 20, label: `微信号`, visible: true },
|
||||
{ key: 21, label: `购车类型`, visible: true },
|
||||
{ key: 22, label: `已有车辆`, visible: true },
|
||||
{ key: 23, label: `是否评估`, visible: true },
|
||||
{ key: 21, label: `购车类型`, visible: false },
|
||||
{ key: 22, label: `已有车辆`, visible: false },
|
||||
{ key: 23, label: `是否评估`, visible: false },
|
||||
{ key: 24, label: `意向车型`, visible: true },
|
||||
{ key: 25, label: `对比车型`, visible: true },
|
||||
{ key: 26, label: `是否试驾`, visible: true },
|
||||
{ key: 27, label: `是否报价`, visible: true },
|
||||
{ key: 28, label: `是否金融`, visible: true },
|
||||
{ key: 29, label: `未订车原因`, visible: true },
|
||||
{ key: 30, label: `预计到店`, visible: true },
|
||||
{ key: 31, label: `最后到店`, visible: true },
|
||||
{ key: 32, label: `4S店`, visible: true },
|
||||
{ key: 25, label: `对比车型`, visible: false },
|
||||
{ key: 26, label: `是否试驾`, visible: false },
|
||||
{ key: 27, label: `是否报价`, visible: false },
|
||||
{ key: 28, label: `是否金融`, visible: false },
|
||||
{ key: 29, label: `未订车原因`, visible: false },
|
||||
{ key: 30, label: `预计到店`, visible: false },
|
||||
{ key: 31, label: `最后到店`, visible: false },
|
||||
{ key: 32, label: `4S店`, visible: false },
|
||||
{ key: 33, label: `下单日期`, visible: true },
|
||||
{ key: 34, label: `跟进次数`, visible: true },
|
||||
{ key: 35, label: `最新跟进日`, visible: true },
|
||||
@@ -620,18 +693,40 @@ export default {
|
||||
},
|
||||
/** 查询客户跟进信息列表 */
|
||||
getFollowList(customerId) {
|
||||
let that = this;
|
||||
this.loading = true;
|
||||
let queryParams = {
|
||||
customerId:customerId,
|
||||
pageNum:1,
|
||||
pageSize:1000,
|
||||
followType:'potential'
|
||||
}
|
||||
let dictType = that.dict.type;
|
||||
listCustomerFollow(queryParams).then(response => {
|
||||
this.followUpList = response.rows;
|
||||
//赋值
|
||||
for (let follow of this.followUpList) {
|
||||
let followUpMethod = this.getDictLableByVal(dictType.follow_up_method,follow.followUpMethod);
|
||||
let followResult = this.getDictLableByVal(dictType.follow_result,follow.followResult);
|
||||
let intentionLevel = this.getDictLableByVal(dictType.customer_level,follow.intentionLevel);
|
||||
follow.followUpMethod = followUpMethod;
|
||||
follow.followResultDesc = followResult;
|
||||
follow.intentionLevel = intentionLevel;
|
||||
}
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
//跟进字典val获取描述
|
||||
getDictLableByVal(dictData,val){
|
||||
let lable = '';
|
||||
dictData.map(i =>{
|
||||
if (i.value == val) {
|
||||
lable = i.label
|
||||
}
|
||||
})
|
||||
return lable
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
@@ -670,7 +765,7 @@ export default {
|
||||
isOffer: null,
|
||||
isFinance: null,
|
||||
unBookingCarReason: null,
|
||||
preToStoreDate: null,
|
||||
appointmentTime: null,
|
||||
lastToStoreDate: null,
|
||||
storeName: null,
|
||||
orderDate: null
|
||||
@@ -716,14 +811,39 @@ export default {
|
||||
handleFollow(row){
|
||||
this.drawer = true;
|
||||
this.customerId = row.id;
|
||||
this.followTitle = row.userName + " 跟进记录";
|
||||
this.customerStatus = row.status;
|
||||
this.followTitle = row.userName +" "+ row.phoneNumber+" 跟进记录";
|
||||
this.getFollowList(this.customerId);
|
||||
},
|
||||
//订车
|
||||
handleToOrder(row){
|
||||
this.orderForm.customerId = row.id;
|
||||
this.orderForm.customerName = row.userName;
|
||||
this.orderForm.carStatus = 'notOut';
|
||||
this.orderOpen = true;
|
||||
this.orderTitle = "新增订单";
|
||||
},
|
||||
orderSubmitForm(){
|
||||
this.$refs["orderForm"].validate(valid => {
|
||||
if (valid) {
|
||||
addCustomerOrderRecerd(this.orderForm).then(response => {
|
||||
this.$modal.msgSuccess("订单新增成功");
|
||||
this.orderOpen = false;
|
||||
this.getList(this.customerId);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
orderCancel(){
|
||||
this.orderOpen = false;
|
||||
this.orderForm = { };
|
||||
},
|
||||
handleDrawerAddFollowUp(){
|
||||
this.innerDrawer = true;
|
||||
this.followForm = {};
|
||||
this.followForm.followUpDate = new Date();
|
||||
this.followForm.customerId = this.customerId;
|
||||
this.followForm.followType = this.customerStatus;
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
@@ -785,9 +905,9 @@ export default {
|
||||
let obj = {};
|
||||
obj.followUpDate = "";
|
||||
obj.followUpRecord = "";
|
||||
obj.preToStoreDate = "";
|
||||
obj.appointmentTime = "";
|
||||
obj.remark = "";
|
||||
obj.followLevel = "";
|
||||
obj.intentionLevel = "";
|
||||
this.followUpList.push(obj);
|
||||
},
|
||||
/** 跟进模块-客户跟进记录删除按钮操作 */
|
||||
@@ -802,6 +922,35 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
//新增跟进时,选择跟进结果实现不同表单校验
|
||||
selctRadion(e){
|
||||
if(e=='fail'){
|
||||
// this.followRules.defeatReasons = [{required: true, message: "战败原因不能为空", trigger: "blur"}]
|
||||
this.followRules.intentionLevel = [];
|
||||
this.followRules.nextFollowUpTime = [];
|
||||
this.followFormShow.defeatReasonsShow = true;
|
||||
this.followFormShow.appointmentTimeShow=false;
|
||||
this.followFormShow.intentionLevelShow=false;
|
||||
this.followFormShow.nextFollowUpTimeShow=false;
|
||||
this.followFormShow.nextFollowUpRecordShow=false;
|
||||
}else if(e=='going'){
|
||||
this.followRules.defeatReasons = [];
|
||||
this.followRules.appointmentTime = [];
|
||||
this.followFormShow.defeatReasonsShow = false;
|
||||
this.followFormShow.appointmentTimeShow=false;
|
||||
this.followFormShow.intentionLevelShow=true;
|
||||
this.followFormShow.nextFollowUpTimeShow=true;
|
||||
this.followFormShow.nextFollowUpRecordShow=true;
|
||||
}else if(e=='maker'){
|
||||
this.followRules.defeatReasons = [];
|
||||
this.followFormShow.defeatReasonsShow = false;
|
||||
this.followFormShow.appointmentTimeShow=true;
|
||||
this.followFormShow.intentionLevelShow=true;
|
||||
this.followFormShow.nextFollowUpTimeShow=true;
|
||||
this.followFormShow.nextFollowUpRecordShow=true;
|
||||
this.followForm.makerStatus ="waitStore";
|
||||
}
|
||||
},
|
||||
/** 复选框选中数据 */
|
||||
handleFollowUpSelectionChange(selection) {
|
||||
this.checkedFollowUp = selection.map(item => item.index)
|
||||
|
||||
@@ -1,95 +1,46 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="客户名" prop="userName">
|
||||
<el-form-item label="客户" prop="userName">
|
||||
<el-input
|
||||
v-model="queryParams.userName"
|
||||
placeholder="请输入客户名"
|
||||
placeholder="请输入客户"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户级别" prop="userType">
|
||||
<el-select v-model="queryParams.userType" placeholder="请选择客户级别" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.customer_level"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码" prop="phoneNumber">
|
||||
<el-form-item label="客户手机" prop="phoneNumber">
|
||||
<el-input
|
||||
v-model="queryParams.phoneNumber"
|
||||
placeholder="请输入手机号码"
|
||||
placeholder="请输入客户手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线索渠道" prop="clueChannel">
|
||||
<el-select v-model="queryParams.clueChannel" placeholder="请选择线索渠道" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.clue_channels"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="信息来源" prop="dataSource">
|
||||
<el-select v-model="queryParams.dataSource" placeholder="请选择信息来源" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.customer_source"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="到店状态" prop="status">
|
||||
<el-select v-model="queryParams.storeStatus" placeholder="请选择到店状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.to_store_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="微信号" prop="wechat">
|
||||
<el-input
|
||||
v-model="queryParams.wechat"
|
||||
placeholder="请输入微信号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="意向车型" prop="intentionCarModels">
|
||||
<el-input
|
||||
v-model="queryParams.intentionCarModels"
|
||||
placeholder="请输入意向车型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预计到店" prop="preToStoreDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.preToStoreDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择预计到店">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="下单日期" prop="orderDate">
|
||||
<el-form-item label="订车时间" prop="orderDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.orderDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择下单日期">
|
||||
placeholder="请选择订车时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆详细" prop="carInfo">
|
||||
<el-input
|
||||
v-model="queryParams.carInfo"
|
||||
placeholder="请输入车辆详细"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆VIN" prop="carVin">
|
||||
<el-input
|
||||
v-model="queryParams.carVin"
|
||||
placeholder="请输入车辆VIN"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@@ -97,7 +48,7 @@
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@@ -128,7 +79,7 @@
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:customer:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
@@ -145,6 +96,11 @@
|
||||
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="客户姓名" align="center" prop="userName" width="120" v-if="columns[1].visible" show-overflow-tooltip />
|
||||
<el-table-column label="客户性别" align="center" prop="sex" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户级别" align="center" prop="userType" v-if="columns[3].visible" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.customer_level" :value="scope.row.userType"/>
|
||||
@@ -161,43 +117,39 @@
|
||||
<dict-tag :options="dict.type.customer_source" :value="scope.row.dataSource"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户居住" align="center" prop="liveAddress" width="100" v-if="columns[10].visible" show-overflow-tooltip />
|
||||
<el-table-column label="到店状态" align="center" prop="status" width="100" v-if="columns[11].visible" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.to_store_status" :value="scope.row.storeStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="微信号" align="center" prop="wechat" width="110" v-if="columns[20].visible" show-overflow-tooltip />
|
||||
<el-table-column label="下单日期" align="center" prop="orderDate" width="120" v-if="columns[33].visible" show-overflow-tooltip >
|
||||
<el-table-column label="订单日期" align="center" prop="orderDate" width="120" v-if="columns[33].visible" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.orderDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="是否评估" align="center" prop="isAssessment" />-->
|
||||
<el-table-column label="意向车型" align="center" prop="intentionCarModels" width="120" v-if="columns[24].visible" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="对比车型" align="center" prop="contrastCarModels" />
|
||||
<el-table-column label="是否试驾" align="center" prop="isTestDrive" />
|
||||
<el-table-column label="是否报价" align="center" prop="isOffer" />
|
||||
<el-table-column label="是否金融" align="center" prop="isFinance" />-->
|
||||
<!-- <el-table-column label="最后到店" align="center" prop="lastToStoreDate" width="120">
|
||||
<el-table-column label="车辆详细" align="center" prop="carInfo" width="280"/>
|
||||
<el-table-column label="车辆VIN" align="center" prop="carVin" width="220" />
|
||||
<el-table-column label="车辆状态" align="center" prop="carStatus" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.lastToStoreDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="已有车辆" align="center" prop="existModels" v-if="columns[22].visible" show-overflow-tooltip />
|
||||
<el-table-column label="预计到店" class-name="specialColor" align="center" prop="preToStoreDate" width="120" v-if="columns[30].visible" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.preToStoreDate, '{y}-{m}-{d}') }}</span>
|
||||
<dict-tag :options="dict.type.car_status" :value="scope.row.carStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库日期" align="center" prop="outDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.outDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="跟进备注" align="center" prop="remark" width="120" />
|
||||
<el-table-column label="计划跟进日期" align="center" prop="planFollowUpDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.planFollowUpDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际跟进日期" align="center" prop="actualFollowUpDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.actualFollowUpDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="跟进方式" align="center" prop="followUpMethod" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.follow_up_method" :value="scope.row.followUpMethod"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="跟进次数" class-name="specialColor" align="center" prop="followUpTimes" v-if="columns[34].visible" show-overflow-tooltip />
|
||||
<el-table-column label="最新跟进日" class-name="specialColor" align="center" prop="followUpLastDate" width="100" v-if="columns[35].visible" show-overflow-tooltip />
|
||||
<el-table-column label="最新跟进级别" class-name="specialColor" align="center" prop="followUpLastLevel" width="100" v-if="columns[36].visible" show-overflow-tooltip />
|
||||
<el-table-column label="建议下次跟进日" class-name="specialColor" align="center" prop="proposalNextFollowDate" width="120" v-if="columns[37].visible" show-overflow-tooltip />
|
||||
<el-table-column label="跟进超期" class-name="specialColor" align="center" prop="followUpOverdueDate" width="120" v-if="columns[38].visible" show-overflow-tooltip />
|
||||
<el-table-column label="未订车原因" align="center" prop="unBookingCarReason" width="110" show-overflow-tooltip v-if="columns[29].visible" show-overflow-tooltip />
|
||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip v-if="columns[19].visible" />
|
||||
|
||||
<el-table-column label="操作" width="160" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -206,21 +158,21 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleFollow(scope.row)"
|
||||
v-hasPermi="['system:customer:edit']"
|
||||
>跟进</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:customer:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:customer:remove']"
|
||||
>删除</el-button>
|
||||
>回访</el-button>
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:customer:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:customer:remove']"
|
||||
>删除</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -297,7 +249,7 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="信息来源" prop="dataSource">
|
||||
<!-- <el-form-item label="信息来源" prop="dataSource">
|
||||
<el-select v-model="form.dataSource" placeholder="请选择信息来源">
|
||||
<el-option
|
||||
v-for="dict in dict.type.customer_source"
|
||||
@@ -309,8 +261,8 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="客户居住" prop="liveAddress">
|
||||
<el-input v-model="form.liveAddress" placeholder="请输入客户居住" />
|
||||
</el-form-item>
|
||||
<el-form-item label="到店状态" prop="status">
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item label="到店状态" prop="status">
|
||||
<el-select v-model="form.storeStatus" placeholder="请选择到店状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.to_store_status"
|
||||
@@ -319,7 +271,7 @@
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="已有车型" prop="existModels">
|
||||
<el-input v-model="form.existModels" placeholder="请输入已有车型" />
|
||||
</el-form-item>
|
||||
@@ -379,33 +331,43 @@
|
||||
<el-timeline :reverse="reverse">
|
||||
<el-timeline-item placement="top" v-for="(follow, index) in followUpList" :key="index" :timestamp="follow.followUpDate">
|
||||
<el-card shadow="hover">
|
||||
<p><el-tag>跟进方式:</el-tag>
|
||||
<el-select v-model="follow.followUpMethod" disabled>
|
||||
<el-option
|
||||
v-for="dict in dict.type.follow_up_method"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</p>
|
||||
<p><el-tag>级别:</el-tag> {{follow.followLevel}} </p>
|
||||
<h4><el-tag>记录:</el-tag> {{follow.followUpRecord}}</h4>
|
||||
<p> <el-tag>再次预约到店日期:</el-tag> {{follow.preToStoreDate}} </p>
|
||||
<p><el-tag>跟进方式:</el-tag> {{follow.followUpMethod}} </p>
|
||||
<p> <el-tag>跟进目的:</el-tag> {{follow.objective}} </p>
|
||||
<p><el-tag>跟进记录:</el-tag> {{follow.followUpRecord}}</p>
|
||||
<p>提交于 {{follow.createTime}}</p>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<el-drawer title="新增跟进日志" :append-to-body="true" :visible.sync="innerDrawer">
|
||||
<el-form ref="followForm" :model="followForm" :rules="followRules" label-width="140px">
|
||||
<el-form-item label="跟进日期" prop="followUpDate">
|
||||
<el-date-picker clearable
|
||||
<el-form-item label="计划跟进日期" prop="followUpDate">
|
||||
<el-date-picker clearable disabled
|
||||
v-model="followForm.followUpDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择跟进日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="跟进备注" prop="followUpRecord">
|
||||
<el-input v-model="followForm.remark" disabled placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-divider content-position="left">订单车型</el-divider>
|
||||
<el-descriptions direction="vertical" :column="6" border size="mini">
|
||||
<!-- <el-descriptions-item label="状态">正常</el-descriptions-item>-->
|
||||
<el-descriptions-item label="VIN" show-overflow-tooltip>{{followForm.carVin}}</el-descriptions-item>
|
||||
<el-descriptions-item label="车辆信息" show-overflow-tooltip>{{followForm.carInfo}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-divider></el-divider>
|
||||
<el-form-item label="跟进目的" prop="objectiveList">
|
||||
<el-select v-model="followForm.objectiveList" multiple placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in objectiveList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="跟进方式" prop="followUpMethod">
|
||||
<el-select v-model="followForm.followUpMethod" placeholder="请选择跟进方式" clearable>
|
||||
<el-option
|
||||
@@ -419,27 +381,6 @@
|
||||
<el-form-item label="跟进记录" prop="followUpRecord">
|
||||
<el-input v-model="followForm.followUpRecord" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="级别" prop="followLevel">
|
||||
<el-select v-model="followForm.followLevel" placeholder="请选择级别" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.customer_level"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="再次预约到店日期" prop="preToStoreDate">
|
||||
<el-date-picker clearable
|
||||
v-model="followForm.preToStoreDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择再次预约到店日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="followForm.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: center">
|
||||
<el-button type="primary" @click="submitFollowForm">确 定</el-button>
|
||||
@@ -452,19 +393,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCustomerOrderPage, getCustomerOrder, delCustomerOrder, addCustomerOrder, updateCustomerOrder } from "@/api/system/customerOrder";
|
||||
import {
|
||||
listCustomer,
|
||||
getCustomer,
|
||||
delCustomer,
|
||||
addCustomer,
|
||||
updateCustomer,
|
||||
addCustomerFollowRecerd, updateCustomerFollowRecerd, listCustomerFollow
|
||||
} from "@/api/system/customer";
|
||||
import Data from "@/views/system/dict/data";
|
||||
|
||||
export default {
|
||||
name: "salesFollowCustomer",
|
||||
dicts: ['to_store_status', 'customer_source','customer_status', 'sys_user_sex', 'customer_level', 'clue_channels','follow_result','follow_up_method'],
|
||||
dicts: ['to_store_status', 'customer_source','customer_status', 'sys_user_sex', 'customer_level', 'clue_channels','follow_result','car_status','follow_up_method'],
|
||||
data() {
|
||||
return {
|
||||
drawer:false,
|
||||
@@ -472,6 +411,7 @@ export default {
|
||||
innerDrawer:false,
|
||||
dafaultValue:null,
|
||||
customerId:null,
|
||||
customerRow:null,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
followTitle:null,
|
||||
@@ -508,15 +448,24 @@ export default {
|
||||
wechat: null,
|
||||
intentionCarModels: null,
|
||||
preToStoreDate: null,
|
||||
orderDate: null
|
||||
orderDate: null,
|
||||
orderByColumn:'out_date',
|
||||
isAsc:'desc'
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
|
||||
},
|
||||
objectiveList:[
|
||||
{label:"三包政策",value:"三包政策"},
|
||||
{label:"操作说明",value:"操作说明"},
|
||||
{label:"7日电访说明",value:"7日电访说明"},
|
||||
{label:"首保关怀提醒",value:"首保关怀提醒"},
|
||||
],
|
||||
followForm:{
|
||||
followUpDate:null,
|
||||
customerId:null,
|
||||
objectiveList:[]
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
@@ -538,20 +487,11 @@ export default {
|
||||
},
|
||||
// 跟进表单校验
|
||||
followRules: {
|
||||
followUpDate: [
|
||||
{ required: true, message: "跟进日期不能为空", trigger: "blur" }
|
||||
],
|
||||
followUpRecord:[
|
||||
{ required: true, message: "跟进记录不能为空", trigger: "blur" }
|
||||
],
|
||||
followLevel: [
|
||||
{ required: true, message: "级别不能为空", trigger: "blur" }
|
||||
],
|
||||
followUpMethod:[
|
||||
{ required: true, message: "跟进方式不能为空", trigger: "blur" }
|
||||
],
|
||||
followResult:[
|
||||
{ required: true, message: "跟进结果不能为空", trigger: "blur" }
|
||||
objectiveList:[
|
||||
{ type: 'array', required: true, message: '请至少选择一个跟进目的', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
// 列表的列的显示隐藏设置
|
||||
@@ -612,7 +552,7 @@ export default {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.status = 'order';
|
||||
listCustomer(this.queryParams).then(response => {
|
||||
getCustomerOrderPage(this.queryParams).then(response => {
|
||||
this.customerList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
@@ -625,13 +565,30 @@ export default {
|
||||
customerId:customerId,
|
||||
pageNum:1,
|
||||
pageSize:1000,
|
||||
followType:'order'
|
||||
}
|
||||
let dictType = this.dict.type;
|
||||
listCustomerFollow(queryParams).then(response => {
|
||||
this.followUpList = response.rows;
|
||||
//赋值
|
||||
for (let follow of this.followUpList) {
|
||||
let followUpMethod = this.getDictLableByVal(dictType.follow_up_method,follow.followUpMethod);
|
||||
follow.followUpMethod = followUpMethod;
|
||||
}
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
//跟进字典val获取描述
|
||||
getDictLableByVal(dictData,val){
|
||||
let lable = '';
|
||||
dictData.map(i =>{
|
||||
if (i.value == val) {
|
||||
lable = i.label
|
||||
}
|
||||
})
|
||||
return lable
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
@@ -715,6 +672,7 @@ export default {
|
||||
/**跟进按钮**/
|
||||
handleFollow(row){
|
||||
this.drawer = true;
|
||||
this.customerRow = row;
|
||||
this.customerId = row.id;
|
||||
this.followTitle = row.userName + " 跟进记录";
|
||||
this.getFollowList(this.customerId);
|
||||
@@ -724,6 +682,10 @@ export default {
|
||||
this.followForm = {};
|
||||
this.followForm.followUpDate = new Date();
|
||||
this.followForm.customerId = this.customerId;
|
||||
this.followForm.remark = "回访任务-7日回访";
|
||||
this.followForm.carVin = this.customerRow.carVin;
|
||||
this.followForm.carInfo = this.customerRow.carInfo;
|
||||
this.followForm.planFollowUpDate = this.customerRow.planFollowUpDate;
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
@@ -756,6 +718,9 @@ export default {
|
||||
this.getFollowList(this.customerId);
|
||||
});
|
||||
} else {
|
||||
this.followForm.objective = this.followForm.objectiveList.join(",");
|
||||
this.followForm.followType=this.customerRow.status;
|
||||
this.followForm.customerId=this.customerId;
|
||||
addCustomerFollowRecerd(this.followForm).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
|
||||
Reference in New Issue
Block a user