Commit 12d5e724 by xuyl

客户信息管理搜索框更改,客户信息详情

1 parent a8adc32d
......@@ -24,95 +24,103 @@ import { http, http3 } from '@/main'
// params.method='datahub.api.label.querylabeltree'
export function getSingleClientTag(params) {
params.method = 'scrm.api.datahub.user.getuserlabel'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'scrm.api.datahub.user.getuserlabel'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
export function getAllTagTree(params) {
// params.method='scrm.api.datahub.label.querylabeltree'
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
// params.method='scrm.api.datahub.label.querylabeltree'
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
})
}
// /router/datahub.api.user.addUserLabel/1.0.0
//编辑用户标签(包含标签新增列表和删除列表)
export function addSingleClientTag(params) {
params.method = 'scrm.api.datahub.user.editUserLabel'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
params.method = 'scrm.api.datahub.user.editUserLabel'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
})
}
export function getTableList(params) {
params.method = 'entmicro.api.customer.page'
// params.sessionId="mini-e72437ba-845e-4da3-9966-0b25684d6373-rop"
// params.timestamp=new Date().getTime()
// +'?method=org.ore.api.customer.page'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'entmicro.api.customer.page'
// params.sessionId="mini-e72437ba-845e-4da3-9966-0b25684d6373-rop"
// params.timestamp=new Date().getTime()
// +'?method=org.ore.api.customer.page'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export function syncCustomer(params) {
params.method = 'entmicro.api.synchro.syncCustomer'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'entmicro.api.synchro.syncCustomer'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export function getTableDetail(params) {
params.method = 'entmicro.api.customer.detail'
params.method = 'entmicro.api.customer.detail'
// params.sessionId="mini-e72437ba-845e-4da3-9966-0b25684d6373-rop"
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
// params.sessionId="mini-e72437ba-845e-4da3-9966-0b25684d6373-rop"
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
/*获取来源字典的
*/
*/
export function getDictionaryFun(params) {
params.method = 'entmicro.api.common.dictdata.list'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
params.method = 'entmicro.api.common.dictdata.list'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
export function getStaffList(params) {
params.method = 'entmicro.api.staff.findStaffByMerchantId'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// entmicro.api.customer.list.export
//客户信息管理导出
export function clientManageExportApi(params) {
params.method = `entmicro.api.customer.customerListExport`
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
params.method = `entmicro.api.customer.customerListExport`
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
\ No newline at end of file
......@@ -31,7 +31,7 @@
<el-input v-model="formModel[item.prop]" :type="item.inputType || 'text'" :placeholder="item.placeholder || '请输入'" :clearable="item.clearable || false" :readonly="item.readonly || false" @keyup.enter.native="onInput" ></el-input>
</template>
<template v-else-if="item.type === 'select'">
<el-select size="small" v-model="formModel[item.prop]" :placeholder="item.placeholder || '请选择'">
<el-select size="small" v-model="formModel[item.prop]" :placeholder="item.placeholder || '请选择'" :filterable="!item.noFilter">
<el-option v-for="i in item.options" :key="i[item.value] || i.value" :label="i[item.key] || i.label" :value="i[item.value] || i.value" :disabled="i.disabled"></el-option>
</el-select>
</template>
......
......@@ -101,7 +101,7 @@
<div class="public-text">
<div class="public-text-info font-16 flex">
车辆信息
<span class="font-14 color-58">{{ vehicleTableData.length || 0 }}辆</span>
<span class="font-14 color-58">{{ vehicleTableData | filterCar }}辆</span>
</div>
<div class="expande-button" v-if="expande" @click="expandeClick(false, 'expande')">
<span class="font-14 color-58">收起</span>
......@@ -109,7 +109,7 @@
</div>
<div class="expande-button" @click="expandeClick(true, 'expande')" v-if="vehicleTableData.length > 1 && !expande">
<span class="font-14 color-58">更多车辆</span>
<i class="el-icon-arrow-down color-58"></i>
<i class="el-icon-arrow-up color-58"></i>
</div>
</div>
<layout-row class="layout-detail" :layoutData="vehicleTableData" :layoutParams="vehicleTableParams" :isHidden="expande"></layout-row>
......@@ -117,7 +117,7 @@
<div class="public-text">
<div class="public-text-info font-16 flex">
设备信息
<span class="font-14 color-58">{{ deviceTableData.length || 0 }}辆</span>
<span class="font-14 color-58">{{ deviceTableData | filterCar }}辆</span>
</div>
<div class="expande-button" v-if="deviceExpande" @click="expandeClick(false, 'deviceExpande')">
<span class="font-14 color-58">收起</span>
......@@ -125,7 +125,7 @@
</div>
<div class="expande-button" @click="expandeClick(true, 'deviceExpande')" v-if="deviceTableData.length > 1 && !deviceExpande">
<span class="font-14 color-58">更多设备</span>
<i class="el-icon-arrow-down color-58"></i>
<i class="el-icon-arrow-up color-58"></i>
</div>
</div>
<layout-row class="layout-detail" :layoutData="deviceTableData" :layoutParams="deviceTableParams" :isHidden="deviceExpande"></layout-row>
......@@ -134,15 +134,15 @@
<div class="public-text">
<div class="public-text-info font-16 flex">
保单信息
<span class="font-14 color-58">{{ guaranteeTableData.length || 0 }}辆</span>
<span class="font-14 color-58">{{ guaranteeTableData | filterCar }}辆</span>
</div>
<div class="expande-button" v-if="guaranteeExpande" @click="expandeClick(false, 'guaranteeExpande')">
<span class="font-14 color-58">收起</span>
<i class="el-icon-arrow-down color-58"></i>
</div>
<div class="expande-button" @click="expandeClick(true, 'guaranteeExpande')" v-if="guaranteeTableData.length > 1 && !guaranteeExpande">
<span class="font-14 color-58">更多设备</span>
<i class="el-icon-arrow-down color-58"></i>
<span class="font-14 color-58">更多保单</span>
<i class="el-icon-arrow-up color-58"></i>
</div>
</div>
<layout-row class="layout-detail" :layoutData="guaranteeTableData" :layoutParams="guaranteeTableParams" :isHidden="guaranteeExpande"></layout-row>
......@@ -284,7 +284,7 @@ export default {
},
{
label: '发动机号:',
prop: 'vehicleBrand'
prop: 'engineNumber'
},
{
label: '车辆品牌:',
......@@ -300,7 +300,7 @@ export default {
},
{
label: '车身颜色:',
prop: 'vehicleType'
prop: 'vehicleColor'
},
{
label: '购车价格:',
......@@ -327,72 +327,72 @@ export default {
deviceTableParams: [
{
label: '设备号(SN/IMEI):',
prop: 'standNo',
prop: 'sn',
addHtml: 'standNo'
},
{
label: '设备流量卡(ICCID):',
prop: 'vehicleNo'
prop: 'iccId'
},
{
label: '设备类型:',
prop: 'vehicleBrand'
prop: 'deviceType'
},
{
label: '设备型号:',
prop: 'vehicleBrand'
prop: 'deviceModel'
},
{
label: '验证码:',
prop: 'vehicleTrain'
prop: 'verificationCode'
},
{
label: '批次号:',
prop: 'vehicleType'
prop: 'batchNo'
},
{
label: '绑定车辆(车架号):',
prop: 'vehicleType'
prop: 'standNo'
},
{
label: '设备激活时间:',
prop: 'vehiclePrice'
prop: 'deviceActiveTime'
}
],
guaranteeTableData: [], //保单
guaranteeTableParams: [
{
label: '保单号:',
prop: 'standNo',
prop: 'attInsureOrder',
addHtml: 'standNo'
},
{
label: '产品名称:',
prop: 'vehicleNo'
prop: 'attProductName'
},
{
label: '服务期限:',
prop: 'vehicleBrand'
prop: 'attServicePeriod'
},
{
label: '服务公司:',
prop: 'vehicleBrand'
prop: 'attServiceCompany'
},
{
label: '保险生效时间:',
prop: 'vehicleTrain'
prop: 'attInsureStartTime'
},
{
label: '保险到期时间:',
prop: 'vehicleType'
prop: 'attInsureEndTime'
},
{
label: '保险提单时间:',
prop: 'vehicleType'
prop: 'attInsureSubmitTime'
},
{
label: '绑定车辆:',
prop: 'vehiclePrice'
prop: 'standNo'
}
],
//员工跟进
......@@ -402,39 +402,47 @@ export default {
tableColumns: [
{
label: '跟进员工',
prop: 'staffName'
prop: 'staffName',
align: 'left'
},
{
label: '所属部门',
prop: 'departmentName'
prop: 'departmentName',
align: 'left'
},
{
label: '添加时间',
prop: 'addTime',
width: 100
width: 100,
align: 'left'
},
{
label: '来源',
prop: 'addWay',
addHtml: 'addWay'
addHtml: 'addWay',
align: 'left'
},
{
label: '添加类型',
prop: 'addType',
addHtml: 'addType',
width: 170
width: 170,
align: 'left'
},
{
label: '备注手机号',
prop: 'remarkMobiles'
prop: 'remarkMobiles',
align: 'left'
},
{
label: '备注',
prop: 'remark'
prop: 'remark',
align: 'left'
},
{
label: '描述',
prop: 'description'
prop: 'description',
align: 'left'
}
]
},
......@@ -446,23 +454,28 @@ export default {
{
label: '群聊名称',
prop: 'groupName',
addHtml: 'groupName'
addHtml: 'groupName',
align: 'left'
},
{
label: '群主',
prop: 'groupHostName'
prop: 'groupHostName',
align: 'left'
},
{
label: '客户数',
prop: 'membersNumber'
prop: 'membersNumber',
align: 'left'
},
{
label: '本群昵称',
prop: 'groupNickName'
prop: 'groupNickName',
align: 'left'
},
{
label: '入群时间',
prop: 'joinTime'
prop: 'joinTime',
align: 'left'
},
{
label: '操作',
......@@ -540,6 +553,20 @@ export default {
// this.getSingleClientTag(this.$route.query.id, this.merchantId)
console.log(this.tagsParams, 'kkkk')
},
filters: {
filterCar(val) {
// if (val && Object.keys(val[0])) {
// return 0
// } else {
// return val.length
// }
if (val && JSON.stringify(val[0]) === '{}') {
return 0
} else {
return val.length
}
}
},
methods: {
expandeClick(value, data) {
this[data] = value
......@@ -632,8 +659,9 @@ export default {
this.userid = res.userid
this.staffId = res.staffId
this.leftPanelInfo = res.info
// this.vehicleTableData = res.vehicleInfoList || []
this.vehicleTableData = [{}] || []
this.vehicleTableData = res.vehicleInfoList || [{}]
this.deviceTableData = res.deviceInfoList || [{}]
this.guaranteeTableData = res.insureInfoList || [{}] //保单
this.employTableList = res.staffFollows || []
this.clientGroupTableList = res.customerBases || []
this.tagsList = res.labels || []
......@@ -1167,6 +1195,10 @@ export default {
font-size: 10px;
margin-left: 7px;
}
.el-icon-arrow-up {
font-size: 10px;
margin-left: 7px;
}
}
}
.layout-detail {
......
......@@ -3,7 +3,7 @@
<div class="scrm-sub-client-container">
<!-- <p class="pageTitle">客户管理</p> -->
<div class="pageContent">
<search-form :ploading="sloading" :isHasSyncBtn="true" :showDefaultTime="false" :merchantModel="merchantModel" :accountLevel="accountLevel" class="searchTop border-shadow" :formModel="searchForm" :formList="clientManageFormList" @resetTable="resetTable" @searchTable="searchTable" @handleExport="handleExport" @syncClick="syncClick">
<search-form :ploading="sloading" :isHasSyncBtn="true" :showDefaultTime="false" :merchantModel="merchantModel" :accountLevel="accountLevel" class="searchTop border-shadow" :formModel="searchForm" :formList="clientManageFormList" @resetTable="resetTable" @searchTable="searchTable" @handleExport="handleExport" @syncClick="syncClick">
<span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button>
......@@ -16,7 +16,7 @@
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="clientManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams">
<span slot="customerName" class="flex-center" slot-scope="scope">
<el-tooltip effect="dark" :content="scope.scope.customerName" placement="top">
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left;">{{ scope.scope.customerName }}</span>
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span>
</el-tooltip>
<!-- <span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span> -->
......@@ -36,9 +36,9 @@
</el-tooltip>
<el-tag type="info" v-if="followList(scope.scope.followStaff).length > 2 && idx == 2">
<el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<div slot="reference">...({{ followList(scope.scope.followStaff).length }})</div>
<div class="entmicro-hover" >
<div class="entmicro-hover">
<el-tag type="info" style="margin-right: 10px; margin-bottom: 10px" v-for="(i, index) in followList(scope.scope.followStaff)" :key="index" :disable-transitions="false">
<i class="el-icon-user-solid" style="color: #75acff"></i>
<!-- {{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }} -->
......@@ -57,10 +57,10 @@
<span class="smallFontSize" :class="[list.type == 1 ? 'pure-green-text' : '', list.type == 2 ? 'pure-yello-text' : '']">@{{ list.corpName }}</span>
</div>
<span v-if="idx == 1">
<el-popover placement="right-start" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<div v-for="(i, index) in scope.scope.nickNameList" :key="index" style="padding-bottom:3px !important">
<el-popover placement="right-start" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<div v-for="(i, index) in scope.scope.nickNameList" :key="index" style="padding-bottom: 3px !important">
<span>{{ i.nickName }}</span>
<span style="height: 20px; font-size: 12px; letter-spacing: 0; line-height: 20px; font-weight: 400;margin-left:2px" :class="[i.type == 1 ? 'pure-green-text' : '', i.type == 2 ? 'pure-yello-text' : '']">@{{ i.corpName }}</span>
<span style="height: 20px; font-size: 12px; letter-spacing: 0; line-height: 20px; font-weight: 400; margin-left: 2px" :class="[i.type == 1 ? 'pure-green-text' : '', i.type == 2 ? 'pure-yello-text' : '']">@{{ i.corpName }}</span>
</div>
<img class="imgEll" src="@/assets/tagsManage/ellipsis.png" alt="" slot="reference" />
</el-popover>
......@@ -99,7 +99,7 @@
</template>
<script>
import { getTableList, getDictionaryFun, syncCustomer, clientManageExportApi } from '@/api/modules/clientManage'
import { getTableList, getDictionaryFun, getStaffList, syncCustomer, clientManageExportApi } from '@/api/modules/clientManage'
import url from '@/assets/clientDataOverview/nodata.png'
export default {
name: 'clientManage',
......@@ -113,58 +113,90 @@ export default {
searchFormTable: {},
clientManageFormList: [
{
type: 'daterange',
prop: 'daterange',
label: '添加时间',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
type: 'input',
inputType: 'text',
prop: 'customerPhone',
label: '联系电话',
placeholder: '联系电话'
},
{
type: 'select',
prop: 'status',
label: '当前状态',
placeholder: '请选择当前状态',
name: 'followStaffList',
prop: 'followStaff',
noFilter: false,
label: '跟进员工',
placeholder: '请输入跟进员工',
options: []
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
},
{
type: 'input',
inputType: 'text',
prop: 'nickName',
label: '企微名称',
placeholder: '请输入企微名称'
},
{
type: 'select',
prop: 'isJoin',
label: '是否已加企微',
placeholder: '请选择',
options: [
{
label: '全部',
value: null
},
{
label: '正常',
value: 0
label: '是',
value: 1
},
{
label: '删除好友',
value: -1
label: '否',
value: 0
}
]
},
{
type: 'select',
prop: 'isJoin',
label: '是否已加企微',
placeholder: '请选择',
prop: 'status',
label: '当前状态',
placeholder: '请选择当前状态',
options: [
{
label: '全部',
value: null
},
{
label: '是',
value: 1
label: '正常',
value: 0
},
{
label: '否',
value: 0
label: '删除好友',
value: -1
}
]
},
{
type: 'daterange',
prop: 'daterange',
label: '添加时间',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
},
{
type: 'select',
prop: 'addWay',
name: 'addWaySource',
label: '添加来源',
placeholder: '请选择当前来源',
options: [] //this.$Constants.SOURCE_OPTION
......@@ -175,34 +207,6 @@ export default {
label: '性别',
placeholder: '请选择性别',
options: this.$Constants.GENDER_OPTION
},
{
type: 'input',
inputType: 'text',
prop: 'customerPhone',
label: '联系电话',
placeholder: '联系电话'
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
},
{
type: 'input',
inputType: 'text',
prop: 'followStaff',
label: '跟进员工',
placeholder: '请输入跟进员工'
},
{
type: 'input',
inputType: 'text',
prop: 'nickName',
label: '企微名称',
placeholder: '请输入企微名称'
}
],
......@@ -287,6 +291,7 @@ export default {
// width: 80
// }
},
followList2: [],
getListApi: getTableList,
sourceList: [],
merchantModel: 1,
......@@ -304,6 +309,7 @@ export default {
this.accountLevel = this.$globalState.session.accountLevel
}
this.getDictionaryFun()
this.getStaffList()
},
// filters:{
// // 截取@后面的文字
......@@ -373,6 +379,10 @@ export default {
if (!res) {
return
}
// addWaySource
const id = this.clientManageFormList.findIndex(item => {
return item.name == 'addWaySource'
})
let data = res.map(item => {
return {
...item,
......@@ -381,12 +391,32 @@ export default {
}
})
data.unshift({ label: '全部', value: '' })
this.sourceList = data || []
if (data && data.length > 0) {
window.localStorage.setItem('sourceList', JSON.stringify(data))
}
this.$set(this.clientManageFormList[3], 'options', data)
this.$set(this.clientManageFormList[id], 'options', data)
})
},
getStaffList(val) {
const params = {
staffName: val ? val.trim() : ''
}
getStaffList(params).then(res => {
const id = this.clientManageFormList.findIndex(item => {
return item.name == 'followStaffList'
})
const staff = res.map(item => {
return {
label: item.staffName,
value: item.staffName
}
})
staff.unshift({ label: '全部', value: '' })
this.$nextTick(() => {
this.clientManageFormList[id].options = staff
})
})
},
//来源 value值转为对应label
......@@ -461,7 +491,7 @@ export default {
justify-content: center;
.smallFontSize {
margin-left: 2px;
height: 20px;
height: 20px;
font-size: 12px;
letter-spacing: 0;
line-height: 20px;
......@@ -548,6 +578,5 @@ export default {
background-color: #fff !important;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!