|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<el-drawer size="75%" title="追加客户选择" :visible.sync="shows" append-to-body>
|
|
|
<div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="82px">
|
|
|
<el-form-item label="公司名" prop="companyId">
|
|
|
<el-select filterable v-model="queryParams.companyId" :disabled="designatedCompany" placeholder="请选择公司名" @change="companyChange" clearable size="small">
|
|
|
<el-option
|
|
|
@@ -24,7 +24,13 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="客户状态" prop="status">
|
|
|
+ <el-form-item label="是否可追加" prop="taskCustomerFilter">
|
|
|
+ <el-select v-model="taskCustomerFilter" placeholder="请选择是否可追加" clearable size="small" @change="handleQuery">
|
|
|
+ <el-option label="不在任务(可追加)" value="notInTask" />
|
|
|
+ <el-option label="已在任务(不可追加)" value="inTask" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- <el-form-item label="客户状态" prop="status">
|
|
|
<el-select v-model="queryParams.status" placeholder="请选择客户状态" clearable size="small">
|
|
|
<el-option
|
|
|
v-for="item in statusOptions"
|
|
|
@@ -43,7 +49,7 @@
|
|
|
:value="item.dictValue"
|
|
|
/>
|
|
|
</el-select>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
<el-form-item label="创建时间" prop="createTime">
|
|
|
<el-date-picker clearable size="small" style="width: 205.4px"
|
|
|
v-model="dateRange"
|
|
|
@@ -82,6 +88,15 @@
|
|
|
:value="item.dictLabel"
|
|
|
/>
|
|
|
</el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="自定义标签" prop="customTag">
|
|
|
+ <el-input
|
|
|
+ v-model="customTag"
|
|
|
+ placeholder="输入标签关键词模糊搜索"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
@@ -103,35 +118,71 @@
|
|
|
</el-row>
|
|
|
<el-table border v-loading="loading" :data="customerList" :row-key="getRowKeys" @selection-change="handleSelectionChange" size="mini" ref="table" height="450" :selectable="canSelect">
|
|
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" :selectable="canSelect" />
|
|
|
- <el-table-column label="ID" align="center" prop="customerId" />
|
|
|
- <el-table-column label="所属公司" align="center" prop="companyName" width="300"/>
|
|
|
- <el-table-column label="客户编码" align="center" prop="customerCode" width="150"/>
|
|
|
- <el-table-column label="客户名称" align="center" prop="customerName" />
|
|
|
- <el-table-column label="手机" align="center" prop="mobile" width="90"/>
|
|
|
+ <el-table-column label="ID" align="center" prop="customerId" width="65" />
|
|
|
+ <el-table-column label="所属公司" align="center" prop="companyName" width="220"/>
|
|
|
+ <!-- <el-table-column label="客户编码" align="center" prop="customerCode" width="150"/> -->
|
|
|
+ <el-table-column label="客户名称" align="center" prop="customerName" width="110"/>
|
|
|
+ <el-table-column label="手机" align="center" prop="mobile" width="110"/>
|
|
|
<el-table-column label="性别" align="center" prop="sex" width="55">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag prop="sex" v-for="(item, index) in sexOptions" :key="'sex'+index" v-if="scope.row.sex==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="微信号" align="center" prop="weixin" width="95"/>
|
|
|
- <el-table-column label="所在地" align="center" prop="address" />
|
|
|
+ <!-- <el-table-column label="微信号" align="center" prop="weixin" width="95"/> -->
|
|
|
+ <!-- <el-table-column label="所在地" align="center" prop="address" /> -->
|
|
|
<el-table-column label="标签" align="center" prop="tags" width="100" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="客户来源" align="center" prop="source">
|
|
|
+ <el-table-column label="客户来源" align="center" prop="source" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag prop="source" v-for="(item, index) in sourceOptions" :key="'source'+index" v-if="scope.row.source==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="客户类型" align="center" prop="customerType">
|
|
|
+ <!-- <el-table-column label="客户类型" align="center" prop="customerType"> -->
|
|
|
+ <!-- <template slot-scope="scope"> -->
|
|
|
+ <!-- <el-tag prop="customerType" v-for="(item, index) in typeOptions" :key="'customerType'+index" v-if="scope.row.customerType==item.dictValue">{{item.dictLabel}}</el-tag> -->
|
|
|
+ <!-- </template> -->
|
|
|
+ <!-- </el-table-column> -->
|
|
|
+ <!-- <el-table-column label="客户状态" align="center" prop="status"> -->
|
|
|
+ <!-- <template slot-scope="scope"> -->
|
|
|
+ <!-- <el-tag prop="status" v-for="(item, index) in statusOptions" :key="'status'+index" v-if="scope.row.status==item.dictValue">{{item.dictLabel}}</el-tag> -->
|
|
|
+ <!-- </template> -->
|
|
|
+ <!-- </el-table-column> -->
|
|
|
+ <el-table-column label="认领人" align="center" prop="companyUserNickName" width="90"/>
|
|
|
+ <el-table-column align="center" width="120">
|
|
|
+ <template slot="header">
|
|
|
+ <div>今日手动外呼</div>
|
|
|
+ <div style="font-size:11px;color:#909399">(接通/总数)</div>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ (scope.row.todayManualConnectCount || 0) }}/{{ (scope.row.todayManualTotalCount || 0) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" width="120">
|
|
|
+ <template slot="header">
|
|
|
+ <div>今日AI外呼</div>
|
|
|
+ <div style="font-size:11px;color:#909399">(接通/总数)</div>
|
|
|
+ </template>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag prop="customerType" v-for="(item, index) in typeOptions" :key="'customerType'+index" v-if="scope.row.customerType==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
+ {{ (scope.row.todayAiConnectCount || 0) }}/{{ (scope.row.todayAiTotalCount || 0) }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="客户状态" align="center" prop="status">
|
|
|
+ <el-table-column align="center" width="120">
|
|
|
+ <template slot="header">
|
|
|
+ <div>累计手动外呼</div>
|
|
|
+ <div style="font-size:11px;color:#909399">(接通/总数)</div>
|
|
|
+ </template>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag prop="status" v-for="(item, index) in statusOptions" :key="'status'+index" v-if="scope.row.status==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
+ {{ (scope.row.totalManualConnectCount || 0) }}/{{ (scope.row.totalManualTotalCount || 0) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" width="120">
|
|
|
+ <template slot="header">
|
|
|
+ <div>累计AI外呼</div>
|
|
|
+ <div style="font-size:11px;color:#909399">(接通/总数)</div>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ (scope.row.totalAiConnectCount || 0) }}/{{ (scope.row.totalAiTotalCount || 0) }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="认领人" align="center" prop="companyUserNickName" />
|
|
|
<el-table-column label="状态" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag v-if="isExcluded(scope.row.customerId)" type="info" size="small">已添加</el-tag>
|
|
|
@@ -200,6 +251,7 @@ export default {
|
|
|
citys: [],
|
|
|
tags: [],
|
|
|
tagIds: [],
|
|
|
+ customTag: null,
|
|
|
inputVisible: false,
|
|
|
inputValue: '',
|
|
|
statusOptions: [],
|
|
|
@@ -208,6 +260,8 @@ export default {
|
|
|
sexOptions: [],
|
|
|
pageSizes: [10, 20, 30, 50, 100, 500],
|
|
|
submitLoading: false,
|
|
|
+ roboticId: null,
|
|
|
+ taskCustomerFilter: null,
|
|
|
_excludeCustomerIds: [],
|
|
|
show: {
|
|
|
title: "客户详情",
|
|
|
@@ -254,7 +308,8 @@ export default {
|
|
|
companyId: null,
|
|
|
isLine: null,
|
|
|
source: null,
|
|
|
- tags: null
|
|
|
+ tags: null,
|
|
|
+ companyUserNickName: null
|
|
|
},
|
|
|
form: {},
|
|
|
rules: {
|
|
|
@@ -267,6 +322,8 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ },
|
|
|
created() {
|
|
|
this.getDicts("crm_customer_tag").then((response) => {
|
|
|
this.tagsOptions = response.data;
|
|
|
@@ -296,6 +353,9 @@ export default {
|
|
|
setExcludeCustomerIds(ids) {
|
|
|
this._excludeCustomerIds = ids || [];
|
|
|
},
|
|
|
+ setTaskId(roboticId) {
|
|
|
+ this.roboticId = roboticId;
|
|
|
+ },
|
|
|
canSelect(row) {
|
|
|
return !this.isExcluded(row.customerId);
|
|
|
},
|
|
|
@@ -341,6 +401,9 @@ export default {
|
|
|
},
|
|
|
buildQueryParams(extraParams = {}) {
|
|
|
const params = Object.assign({}, this.queryParams, extraParams);
|
|
|
+ params.taskCustomerFilter = this.taskCustomerFilter || null;
|
|
|
+ params.roboticId = this.roboticId || null;
|
|
|
+ params.customTag = this.customTag || null;
|
|
|
if (this.receiveTimeRange != null && this.receiveTimeRange.length === 2) {
|
|
|
params.receiveTimeRange = this.receiveTimeRange[0] + "--" + this.receiveTimeRange[1];
|
|
|
} else {
|
|
|
@@ -399,6 +462,18 @@ export default {
|
|
|
},
|
|
|
resetQuery() {
|
|
|
this.resetForm("queryForm");
|
|
|
+ this.dateRange = [];
|
|
|
+ this.receiveTimeRange = [];
|
|
|
+ this.ctsTypeArr = [];
|
|
|
+ this.sourceArr = [];
|
|
|
+ this.tagIds = [];
|
|
|
+ this.customTag = null;
|
|
|
+ this.taskCustomerFilter = null;
|
|
|
+ if (!this.designatedCompany) {
|
|
|
+ this.queryParams.companyId = null;
|
|
|
+ }
|
|
|
+ this.queryParams.deptId = undefined;
|
|
|
+ this.handleQuery();
|
|
|
},
|
|
|
handleSelectionChange(selection) {
|
|
|
if (this.isSyncingSelection) {
|