Commit c4b41bc2 by 李长胜

1.0.2内容调整

1 parent 291cb446
...@@ -57,3 +57,106 @@ ...@@ -57,3 +57,106 @@
}) })
} }
/*
未授权时,打开进入页面即弹出提示。 触发条件:跟企业微信相关且该账户暂未绑定企业微信时提示
*/
export function getStatus(params) {
params.method = 'scrm.api.work.wechat.access.status'
return http({
url: '/rop-scrm-wechat/router',
method: 'POST',
data: params,
sign: true
})
}
/*
跟进员工
*/
// POST /router/entmicro.api.customer.base.staff.page/1.0.0
export function getDetailStaffTableList(params){
params.method='entmicro.api.customer.base.staff.page'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
/*
退群客户
*/
export function getDetailQuitTableList(params){
params.method='entmicro.api.customer.base.quit.cust.page'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
/*
潜在客户
*/
export function getDetailPotentialTableList(params){
params.method='entmicro.api.customer.base.potential.cust.page'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//客户群管理(群聊管理)导出
export function clientGroupExportApi(params){
params.method=`entmicro.api.customer.base.list.export`
return http({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
// 全部客户导出
export function clientExportApi(params){
params.method=`entmicro.api.customer.base.cust.export`
return http({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
//跟进员工导出
export function followEmployeeExportApi(params){
params.method=`entmicro.api.customer.base.staff.export`
return http({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
//退群客户导出
export function leaveGroupExportApi(params){
params.method=`entmicro.api.customer.base.quit.export`
return http({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
//潜在客户导出
export function potentialClientExportApi(params){
params.method=`entmicro.api.customer.base.potential.export`
return http({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
\ No newline at end of file \ No newline at end of file
...@@ -103,3 +103,15 @@ ...@@ -103,3 +103,15 @@
sign: true sign: true
}) })
} }
// entmicro.api.customer.list.export
//客户信息管理导出
export function clientManageExportApi(params){
params.method=`entmicro.api.customer.list.export`
return http({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
\ No newline at end of file \ No newline at end of file
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
}) })
} }
// /router/datahub.api.label.addlabel/1.0.0
export function newAddTag(params){ export function newAddTag(params){
params.method='scrm.api.datahub.label.addlabel' params.method='scrm.api.datahub.label.addlabel'
// params.method='scrm.api.datahub.labelgroup.addLabel' // params.method='scrm.api.datahub.labelgroup.addLabel'
......
...@@ -5,6 +5,42 @@ import Vue from 'vue' ...@@ -5,6 +5,42 @@ import Vue from 'vue'
let loadingInstance = '' let loadingInstance = ''
export const Util = { export const Util = {
getExplorer: function() {
var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null
if (ua.match(/msie/) != null || ua.match(/trident/) != null) {
browserType = 'IE'
} else if (ua.match(/firefox/) != null) {
browserType = '火狐'
} else if (ua.match(/ubrowser/) != null) {
browserType = 'UC'
} else if (ua.match(/opera/) != null) {
browserType = '欧朋'
} else if (ua.match(/bidubrowser/) != null) {
browserType = '百度'
} else if (ua.match(/metasr/) != null) {
browserType = '搜狗'
} else if (ua.match(/tencenttraveler/) != null || ua.match(/qqbrowse/) != null) {
browserType = 'QQ'
} else if (ua.match(/maxthon/) != null) {
browserType = '遨游'
} else {
browserType = '谷歌'
}
return browserType
},
exportFn:function(url) {
let browserType = getExplorer()
if (browserType == 'QQ') {
window.open(url)
return
}
let iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = url
document.body.appendChild(iframe)
},
/** /**
* 校验手机号码格式 * 校验手机号码格式
*/ */
...@@ -122,4 +158,6 @@ export const Util = { ...@@ -122,4 +158,6 @@ export const Util = {
export const validationTel = Util.validationTel; export const validationTel = Util.validationTel;
export const checkPhone = Util.checkPhone; export const checkPhone = Util.checkPhone;
export const getExplorer=Util.getExplorer;
export const exportFn=Util.exportFn;
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
</div> </div>
</div> </div>
<div class="firstRowBtn" v-if="!expande && isShowBtns && isNeedThreeBtns"> <div class="firstRowBtn" v-if="!expande && isShowBtns && isNeedThreeBtns">
<el-button type="primary" size="small" @click="handleExport">导出</el-button>
<el-button plain @click="resetTable" size="small">重置</el-button> <el-button plain @click="resetTable" size="small">重置</el-button>
<el-button type="primary" @click="searchTable" size="small">查询</el-button> <el-button type="primary" @click="searchTable" size="small">查询</el-button>
<!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)" --> <!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)" -->
...@@ -92,6 +93,10 @@ export default { ...@@ -92,6 +93,10 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
isThreeRowShow:{
type: Boolean,
default: false
},
merchantModel: { merchantModel: {
type: Number, type: Number,
default: 1 default: 1
...@@ -123,8 +128,9 @@ export default { ...@@ -123,8 +128,9 @@ export default {
//调用默认时间(30天) //调用默认时间(30天)
this.getPassMonthFormatDate() this.getPassMonthFormatDate()
} }
this.$nextTick(()=>{
var sf = document.getElementById('searchForm') var sf = document.getElementById('searchForm')
// this.$nextTick(() => { console.log(sf.clientWidth,'555')
if (sf.clientWidth < 1280 && this.isHasSyncBtn) { if (sf.clientWidth < 1280 && this.isHasSyncBtn) {
console.log(sf.clientWidth, 'sf') console.log(sf.clientWidth, 'sf')
document.querySelector('.itemWidth').style.maxWidth = 700 + 'px' document.querySelector('.itemWidth').style.maxWidth = 700 + 'px'
...@@ -132,16 +138,26 @@ export default { ...@@ -132,16 +138,26 @@ export default {
if (sf.clientWidth < 952 && this.isHasSyncBtn) { if (sf.clientWidth < 952 && this.isHasSyncBtn) {
this.isShowBtns = false this.isShowBtns = false
} }
let lineHeight = 75 //75
let lineHeight = 75 //75
if (document.getElementById('searchForm').offsetHeight > lineHeight * 2) { if (document.getElementById('searchForm').offsetHeight > lineHeight * 2) {
// console.log('第一次searchForm高度', document.getElementById('searchForm').offsetHeight) console.log('第一次searchForm高度', document.getElementById('searchForm').offsetHeight)
this.expande = false this.expande = false
this.needShowExpande = true this.needShowExpande = true
} else { } else {
this.needShowExpande = false this.needShowExpande = false
this.expande = true this.expande = true
} }
if( sf.clientWidth< 840 && this.isThreeRowShow){
document.querySelector('.itemWidth').style.minHeight= document.querySelector('.itemWidth').offsetHeight + 50 + 'px'
// 客户群里面四个表做特殊处理,当为苹果笔记本电脑尺寸时,不是现实展开收起按钮
this.needShowExpande = false
this.expande = true
}
})
//有数据不算表格高度,没数据算高度 //有数据不算表格高度,没数据算高度
// setTimeout(() => { // setTimeout(() => {
// this.$emit('setTableHeightEvent') // this.$emit('setTableHeightEvent')
...@@ -209,12 +225,15 @@ export default { ...@@ -209,12 +225,15 @@ export default {
syncClick() { syncClick() {
this.$emit('syncClick') this.$emit('syncClick')
}, },
handleExport(){
this.$emit('handleExport')
},
expandeClick() { expandeClick() {
this.expande = !this.expande this.expande = !this.expande
setTimeout(() => { // setTimeout(() => {
this.$emit('setTableHeightEvent') // this.$emit('setTableHeightEvent')
}, 200) // }, 200)
}, },
//时间选择器显示默认一月的时间 //时间选择器显示默认一月的时间
/* 获取过去时间,并传值给现在时间 */ /* 获取过去时间,并传值给现在时间 */
...@@ -257,7 +276,7 @@ export default { ...@@ -257,7 +276,7 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.search-form { .search-form {
padding: 18px 25px 0 0; padding: 18px 0 0 0;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
min-height: 50px; min-height: 50px;
...@@ -271,11 +290,11 @@ export default { ...@@ -271,11 +290,11 @@ export default {
right: 52px; right: 52px;
z-index: 1; z-index: 1;
.el-button + .el-button { .el-button + .el-button {
margin-left: 20px; margin-left: 10px;
} }
} }
.itemWidth { .itemWidth {
max-width: 1050px; max-width: 1027px;
min-width: 660px; min-width: 660px;
} }
.expande-button-wrap { .expande-button-wrap {
...@@ -314,6 +333,10 @@ export default { ...@@ -314,6 +333,10 @@ export default {
.el-select { .el-select {
width: 215px; width: 215px;
} }
.el-select>.el-input{
width: 215px;
}
.el-form-item__content { .el-form-item__content {
width: 100%; width: 100%;
} }
......
<template>
<div>
<div class="initPanel" :style="{ width: panelWidth, minHeight: panelMinHeight }">
{{ panelContent }}
<img src="@/assets/tagsManage/Shape.png" alt="" />
<i class="el-icon-close" v-if="isShowCloseBtn" @click="closeInitPanel"></i>
</div>
</div>
</template>
<script>
export default {
props: {
panelWidth: {
type: String,
default: ''
},
panelMinHeight: {
type: String,
default: '20px'
},
panelContent: {
type: String,
default: '请传入面板内容'
},
isShowCloseBtn:{
type:Boolean,
default:false
}
},
data() {
return {}
},
methods: {
closeInitPanel() {
this.$emit('closePanel')
}
}
}
</script>
<style lang="scss" scoped>
.initPanel {
position: relative;
margin-bottom: 20px;
box-sizing: border-box;
background: #e6e9ff;
border: 1px solid #5850ff;
border-radius: 4px;
padding: 10px 38px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 20px;
img {
position: absolute;
left: 16px;
top: 13px;
}
i {
position: absolute;
top: 14px;
right: 18px;
width: 9px;
height: 9px;
cursor: pointer;
}
}
</style>
...@@ -19,6 +19,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt ...@@ -19,6 +19,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: "mini-14eda653-4284-4165-bb85-325bb82a516d-rop" } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
//Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) //Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
......
<template> <template>
<div class="sub-container"> <div class="sub-container">
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent"> <search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button type="primary" @click="handleExport">导出</el-button>
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
</span> </span>
...@@ -29,7 +30,7 @@ ...@@ -29,7 +30,7 @@
</template> </template>
<script> <script>
import { getDetailTableList } from '@/api/modules/clientGroupManage' import { getDetailTableList,clientExportApi } from '@/api/modules/clientGroupManage'
export default { export default {
props: { props: {
url: { url: {
...@@ -98,16 +99,19 @@ export default { ...@@ -98,16 +99,19 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '本群昵称', label: '本群昵称',
prop: 'groupNickName' prop: 'groupNickName',
minWidth:120
}, },
{ {
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
addHtml: 'customerName' addHtml: 'customerName',
minWidth: 150
}, },
{ {
label: '手机号码', label: '手机号码',
prop: 'customerPhone' prop: 'customerPhone',
minWidth:120
}, },
{ {
label: '性别', label: '性别',
...@@ -117,11 +121,13 @@ export default { ...@@ -117,11 +121,13 @@ export default {
{ {
label: '入群方式', label: '入群方式',
prop: 'joinScene', prop: 'joinScene',
addHtml: 'joinScene' addHtml: 'joinScene',
minWidth:120
}, },
{ {
label: '邀请人', label: '邀请人',
prop: 'invitorName' prop: 'invitorName',
minWidth:120
}, },
{ {
label: '入群时间', label: '入群时间',
...@@ -149,16 +155,31 @@ export default { ...@@ -149,16 +155,31 @@ export default {
} }
}, },
methods: { methods: {
getParams(){
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
}
delete params.daterange
return params
},
beforeSearchFn() { beforeSearchFn() {
// return new Promise((resolve, reject) => {
// this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
// if (this.searchFormTable.daterange) {
// this.searchFormTable.beginTime = this.searchForm.daterange[0]
// this.searchFormTable.endTime = this.searchForm.daterange[1]
// delete this.searchFormTable.daterange
// } else {
// if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
// }
// resolve()
// })
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm)) this.searchFormTable = this.getParams()
if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange
} else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
}
resolve() resolve()
}) })
}, },
...@@ -169,13 +190,20 @@ export default { ...@@ -169,13 +190,20 @@ export default {
//content是第一页的数据 //content是第一页的数据
console.log(content) console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total this.clientTableDataNum = this.$refs.clientGroupDetail.total
this.$emit('getTotal',this.clientTableDataNum) // this.$emit('getTotal',this.clientTableDataNum)
//接收到的数据为空 //接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) { // if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun() // this.$refs.clientGroupDetail.setTableHeightFun()
// } // }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun() this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
}, },
//导出
handleExport(){
var params = this.getParams()
clientExportApi(params).then(res => {
this.$Utils.exportFn(res)
})
},
//搜索表格 //搜索表格
searchTable() { searchTable() {
this.$refs.clientGroupDetail.refreshTable() this.$refs.clientGroupDetail.refreshTable()
......
<template> <template>
<div class="sub-container"> <div class="sub-container">
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent"> <search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button type="primary" @click="handleExport">导出</el-button>
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
</span> </span>
...@@ -22,7 +23,7 @@ ...@@ -22,7 +23,7 @@
</template> </template>
<script> <script>
// import { getDetailTableList } from '@/api/modules/clientGroupManage' import { getDetailStaffTableList,followEmployeeExportApi } from '@/api/modules/clientGroupManage'
export default { export default {
props: { props: {
url: { url: {
...@@ -92,16 +93,19 @@ export default { ...@@ -92,16 +93,19 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '本群昵称', label: '本群昵称',
prop: 'groupNickName' prop: 'groupNickName',
minWidth:120
}, },
{ {
label: '员工名称', label: '员工名称',
prop: 'customerName', prop: 'customerName',
minWidth: 150
}, },
{ {
label: '手机号码', label: '手机号码',
prop: 'customerPhone' prop: 'customerPhone',
minWidth:120
}, },
{ {
label: '性别', label: '性别',
...@@ -111,21 +115,23 @@ export default { ...@@ -111,21 +115,23 @@ export default {
{ {
label: '入群方式', label: '入群方式',
prop: 'joinScene', prop: 'joinScene',
addHtml: 'joinScene' addHtml: 'joinScene',
minWidth:120
}, },
{ {
label: '邀请人', label: '邀请人',
prop: 'invitorName' prop: 'invitorName',
minWidth:120
}, },
{ {
label: '入群时间', label: '入群时间',
prop: 'joinTime', prop: 'joinTime',
width: 95 width: 98
} }
] ]
}, },
getListApi: '', getListApi: getDetailStaffTableList,
clientTableDataNum: 0 clientTableDataNum: 0
} }
}, },
...@@ -135,16 +141,31 @@ export default { ...@@ -135,16 +141,31 @@ export default {
} }
}, },
methods: { methods: {
getParams(){
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
}
delete params.daterange
return params
},
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm)) // this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchFormTable.daterange) { // if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0] // this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1] // this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange // delete this.searchFormTable.daterange
} else { // } else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime // if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
} // }
// resolve()
// })
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve() resolve()
}) })
}, },
...@@ -155,13 +176,20 @@ export default { ...@@ -155,13 +176,20 @@ export default {
//content是第一页的数据 //content是第一页的数据
console.log(content) console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total this.clientTableDataNum = this.$refs.clientGroupDetail.total
this.$emit('getTotal',this.clientTableDataNum) // this.$emit('getTotal',this.clientTableDataNum)
//接收到的数据为空 //接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) { // if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun() // this.$refs.clientGroupDetail.setTableHeightFun()
// } // }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun() this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
}, },
//导出
handleExport(){
var params = this.getParams()
followEmployeeExportApi(params).then(res => {
this.$Utils.exportFn(res)
})
},
//搜索表格 //搜索表格
searchTable() { searchTable() {
this.$refs.clientGroupDetail.refreshTable() this.$refs.clientGroupDetail.refreshTable()
......
<template> <template>
<div class="sub-container"> <div class="sub-container">
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent"> <search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button type="primary" @click="handleExport">导出</el-button>
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
</span> </span>
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
</template> </template>
<script> <script>
// import { getDetailTableList } from '@/api/modules/clientGroupManage' import { getDetailQuitTableList,leaveGroupExportApi } from '@/api/modules/clientGroupManage'
export default { export default {
props: { props: {
url: { url: {
...@@ -96,16 +97,19 @@ export default { ...@@ -96,16 +97,19 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '本群昵称', label: '本群昵称',
prop: 'groupNickName' prop: 'groupNickName',
minWidth:120
}, },
{ {
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
addHtml: 'customerName' addHtml: 'customerName',
minWidth: 150
}, },
{ {
label: '手机号码', label: '手机号码',
prop: 'customerPhone' prop: 'customerPhone',
minWidth:120
}, },
{ {
label: '性别', label: '性别',
...@@ -115,16 +119,18 @@ export default { ...@@ -115,16 +119,18 @@ export default {
{ {
label: '入群方式', label: '入群方式',
prop: 'joinScene', prop: 'joinScene',
addHtml: 'joinScene' addHtml: 'joinScene',
minWidth:120
}, },
{ {
label: '邀请人', label: '邀请人',
prop: 'invitorName' prop: 'invitorName',
minWidth:120
}, },
{ {
label: '入群时间', label: '入群时间',
prop: 'joinTime', prop: 'joinTime',
width: 95 width: 98
} }
], ],
tableOption: { tableOption: {
...@@ -137,7 +143,7 @@ export default { ...@@ -137,7 +143,7 @@ export default {
] ]
} }
}, },
getListApi: '', getListApi: getDetailQuitTableList,
clientTableDataNum: 0 clientTableDataNum: 0
} }
}, },
...@@ -147,16 +153,31 @@ export default { ...@@ -147,16 +153,31 @@ export default {
} }
}, },
methods: { methods: {
getParams(){
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
}
delete params.daterange
return params
},
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm)) // this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchFormTable.daterange) { // if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0] // this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1] // this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange // delete this.searchFormTable.daterange
} else { // } else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime // if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
} // }
// resolve()
// })
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve() resolve()
}) })
}, },
...@@ -173,6 +194,13 @@ export default { ...@@ -173,6 +194,13 @@ export default {
// } // }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun() this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
}, },
//导出
handleExport(){
var params = this.getParams()
leaveGroupExportApi(params).then(res => {
this.$Utils.exportFn(res)
})
},
//搜索表格 //搜索表格
searchTable() { searchTable() {
this.$refs.clientGroupDetail.refreshTable() this.$refs.clientGroupDetail.refreshTable()
......
<template> <template>
<div class="sub-container"> <div class="sub-container">
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent"> <search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button type="primary" @click="handleExport">导出</el-button>
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
</span> </span>
...@@ -29,7 +30,7 @@ ...@@ -29,7 +30,7 @@
</template> </template>
<script> <script>
import { getDetailTableList } from '@/api/modules/clientGroupManage' import { getDetailPotentialTableList,potentialClientExportApi } from '@/api/modules/clientGroupManage'
export default { export default {
props: { props: {
url: { url: {
...@@ -52,43 +53,36 @@ export default { ...@@ -52,43 +53,36 @@ export default {
} }
} }
}, },
{ // {
type: 'select', // type: 'select',
prop: 'customerSex', // prop: 'customerSex',
label: '性别', // label: '性别',
placeholder: '请选择性别', // placeholder: '请选择性别',
options: [ // options: [
{ // {
label: '全部', // label: '全部',
value: null // value: null
}, // },
{ // {
label: '男', // label: '男',
value: 1 // value: 1
}, // },
{ // {
label: '女', // label: '女',
value: 2 // value: 2
}, // },
{ // {
label: '未知', // label: '未知',
value: 0 // value: 0
} // }
] // ]
}, // },
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'groupNickName', prop: 'groupNickName',
label: '本群昵称', label: '本群昵称',
placeholder: '请输入本群昵称' placeholder: '请输入本群昵称'
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
} }
], ],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
...@@ -100,20 +94,15 @@ export default { ...@@ -100,20 +94,15 @@ export default {
label: '本群昵称', label: '本群昵称',
prop: 'groupNickName' prop: 'groupNickName'
}, },
{ // {
label: '客户名称', // label: '手机号码',
prop: 'customerName', // prop: 'customerPhone'
addHtml: 'customerName' // },
}, // {
{ // label: '性别',
label: '手机号码', // prop: 'customerSex',
prop: 'customerPhone' // addHtml: 'customerSex'
}, // },
{
label: '性别',
prop: 'customerSex',
addHtml: 'customerSex'
},
{ {
label: '入群方式', label: '入群方式',
prop: 'joinScene', prop: 'joinScene',
...@@ -126,20 +115,20 @@ export default { ...@@ -126,20 +115,20 @@ export default {
{ {
label: '入群时间', label: '入群时间',
prop: 'joinTime', prop: 'joinTime',
width: 95 width: 98
} }
], ],
tableOption: { // tableOption: {
width: 80, // width: 80,
btnList: [ // btnList: [
{ // {
name: '详情', // name: '详情',
pType: 'detail' // pType: 'detail'
} // }
] // ]
} // }
}, },
getListApi: getDetailTableList, getListApi: getDetailPotentialTableList,
clientTableDataNum: 0 clientTableDataNum: 0
} }
}, },
...@@ -149,16 +138,31 @@ export default { ...@@ -149,16 +138,31 @@ export default {
} }
}, },
methods: { methods: {
getParams(){
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
}
delete params.daterange
return params
},
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm)) // this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchFormTable.daterange) { // if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0] // this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1] // this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange // delete this.searchFormTable.daterange
} else { // } else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime // if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
} // }
// resolve()
// })
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve() resolve()
}) })
}, },
...@@ -175,6 +179,13 @@ export default { ...@@ -175,6 +179,13 @@ export default {
// } // }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun() this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
}, },
//导出
handleExport(){
var params = this.getParams()
potentialClientExportApi(params).then(res => {
this.$Utils.exportFn(res)
})
},
//搜索表格 //搜索表格
searchTable() { searchTable() {
this.$refs.clientGroupDetail.refreshTable() this.$refs.clientGroupDetail.refreshTable()
......
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<!-- <p class="pageTitle">客户群管理</p> --> <!-- <p class="pageTitle">客户群管理</p> -->
<div class="pageContent"> <div class="pageContent">
<search-form class="searchTop border-shadow" :isHasSyncBtn="true" :showDefaultTime="false" :merchantModel="merchantModel" :accountLevel="accountLevel" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent" @resetTable="resetTable" @searchTable="searchTable" @syncClick="syncClick"> <search-form class="searchTop border-shadow" :isHasSyncBtn="true" :showDefaultTime="false" :merchantModel="merchantModel" :accountLevel="accountLevel" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent" @resetTable="resetTable" @searchTable="searchTable" @handleExport="handleExport" @syncClick="syncClick">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button type="primary" @click="handleExport">导出</el-button>
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
<!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)"允许所有人同步 --> <!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)"允许所有人同步 -->
...@@ -29,7 +30,7 @@ ...@@ -29,7 +30,7 @@
</template> </template>
<script> <script>
import { getTableList, syncCustomerBase } from '@/api/modules/clientGroupManage' import { getTableList, syncCustomerBase, getStatus,clientGroupExportApi } from '@/api/modules/clientGroupManage'
import url from '@/assets/clientDataOverview/nodata.png' import url from '@/assets/clientDataOverview/nodata.png'
export default { export default {
name: 'clientGroupManage', name: 'clientGroupManage',
...@@ -56,8 +57,8 @@ export default { ...@@ -56,8 +57,8 @@ export default {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'custGroupName', prop: 'custGroupName',
label: '客户群名称', label: '群聊名称',
placeholder: '请输入客户群名称' placeholder: '请输入群聊名称'
}, },
{ {
type: 'input', type: 'input',
...@@ -72,6 +73,26 @@ export default { ...@@ -72,6 +73,26 @@ export default {
prop: 'groupAdminName', prop: 'groupAdminName',
label: '管理员', label: '管理员',
placeholder: '请输入管理员' placeholder: '请输入管理员'
},
{
type: 'select',
prop: 'creationMethod',
label: '创建方式',
placeholder: '请选择',
options: [
{
label: '全部',
value: null
},
{
label: '手动拉群',
value: 1
},
{
label: '一客一群',
value: 2
}
]
} }
], ],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
...@@ -80,11 +101,11 @@ export default { ...@@ -80,11 +101,11 @@ export default {
listName: 'data', listName: 'data',
tableColumns: [ tableColumns: [
{ {
label: '客户群名称', label: '群聊名称',
prop: 'custGroupName', prop: 'custGroupName',
minWidth: 160 minWidth: 160
}, },
{ {
label: '当前成员总数', label: '当前成员总数',
prop: 'allMembers', prop: 'allMembers',
minWidth: 140 minWidth: 140
...@@ -110,11 +131,6 @@ export default { ...@@ -110,11 +131,6 @@ export default {
minWidth: 140 minWidth: 140
}, },
{ {
label: '创建方式',
prop: 'creationMethod',
minWidth: 140
},
{
label: '群主', label: '群主',
prop: 'groupHostName' prop: 'groupHostName'
}, },
...@@ -123,13 +139,18 @@ export default { ...@@ -123,13 +139,18 @@ export default {
prop: 'groupAdminName' prop: 'groupAdminName'
}, },
{ {
label: '创建方式',
prop: 'creationMethod',
minWidth: 140
},
{
label: '创建时间', label: '创建时间',
prop: 'addTime', prop: 'addTime',
width: 95 width: 95
} }
], ],
tableOption: { tableOption: {
width: 170, width: 170
// btnList: [ // btnList: [
// { // {
// name: '详情', // name: '详情',
...@@ -145,8 +166,8 @@ export default { ...@@ -145,8 +166,8 @@ export default {
flushTime: false flushTime: false
} }
}, },
activated () { activated() {
this.searchTable(); this.searchTable()
}, },
created() { created() {
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
...@@ -166,8 +187,38 @@ export default { ...@@ -166,8 +187,38 @@ export default {
// } // }
// } // }
// }, // },
mounted() {}, beforeDestroy() {
this.$message.closeAll()
},
mounted() {
this.wxTips()
},
methods: { methods: {
jumpWx() {
this.$history.push('/home/enterpriseWechat/index')
},
wxTips() {
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
menu.forEach(item => {
if (!item.children) {
return
}
item.children.forEach(itm => {
if (itm.path == '/enterpriseWechat/index') {
getStatus({}).then(res => {
if (res.status != 'SUCCESS') {
const h = this.$createElement
this.$message({
showClose: true,
duration: 0,
message: h('p', null, [h('span', null, '此功能需完成【企业微信授权】后方可使用! '), h('span', { on: { click: this.jumpWx }, style: { marginRight: '150px', cursor: 'pointer', color: '#5850ff' } }, ['企业微信授权 ', h('i', { class: 'el-icon-d-arrow-right' }, '')])])
})
}
})
}
})
})
},
syncClick() { syncClick() {
let _this = this let _this = this
_this.sloading = true _this.sloading = true
...@@ -182,8 +233,9 @@ export default { ...@@ -182,8 +233,9 @@ export default {
}) })
.catch(err => { .catch(err => {
_this.sloading = false _this.sloading = false
}).finally(()=>{ })
_this.sloading=false; .finally(() => {
_this.sloading = false
}) })
}, },
setTableHeightEvent() { setTableHeightEvent() {
...@@ -202,19 +254,41 @@ export default { ...@@ -202,19 +254,41 @@ export default {
// } // }
this.$refs.clientGroupManage.data.length ? (this.$refs.clientGroupManage.tableHeightValues = '') : this.$refs.clientGroupManage.setTableHeightFun() this.$refs.clientGroupManage.data.length ? (this.$refs.clientGroupManage.tableHeightValues = '') : this.$refs.clientGroupManage.setTableHeightFun()
}, },
//导出
handleExport(){
var params = this.getParams()
clientGroupExportApi(params).then(res => {
this.$Utils.exportFn(res)
})
},
searchTable() { searchTable() {
this.$refs.clientGroupManage.refreshTable() this.$refs.clientGroupManage.refreshTable()
}, },
getParams(){
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
}
delete params.daterange
return params
},
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm)) // this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchFormTable.daterange) { // if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0] // this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1] // this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange // delete this.searchFormTable.daterange
} else { // } else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime // if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
} // }
// resolve()
// })
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve() resolve()
}) })
}, },
...@@ -258,8 +332,20 @@ export default { ...@@ -258,8 +332,20 @@ export default {
// min-width: 1300px; // min-width: 1300px;
background-color: #fff; background-color: #fff;
.el-button + .el-button { .el-button + .el-button {
margin-left: 20px; margin-left: 10px;
} }
} }
.el-message--info {
height: 40px;
background: #e6e9ff;
border: 1px solid #5850ff;
border-radius: 4px;
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
}
.el-message .el-icon-info {
color: #5850ff;
font-size: 16px;
}
} }
</style> </style>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</el-tooltip> </el-tooltip>
</p> </p>
<p> <p>
<span>渠道来源</span> <span>所属渠道</span>
<el-tooltip effect="dark" :content="leftPanelInfo.sourceChannel" placement="top"> <el-tooltip effect="dark" :content="leftPanelInfo.sourceChannel" placement="top">
<span class="ellipsis-1">{{ leftPanelInfo.sourceChannel }}</span> <span class="ellipsis-1">{{ leftPanelInfo.sourceChannel }}</span>
</el-tooltip> </el-tooltip>
...@@ -124,9 +124,11 @@ ...@@ -124,9 +124,11 @@
</GLTable> </GLTable>
</template> </template>
<div v-show="currentIndex == 2" class="clientTagsWrap"> <div v-show="currentIndex == 2" class="clientTagsWrap">
<div style="height:40px"></div> <div style="height: 40px"></div>
<!-- //提示面板组件 -->
<tip-panel panelWidth="666px" panelMinHeight="45px" :panelContent="panelContent" ></tip-panel>
<!-- v-if="userType == 2" --> <!-- v-if="userType == 2" -->
<el-button type="primary" class="addTagBtn" size="small" @click="btnClick('create')" v-if="userType == 2" >添加标签</el-button> <el-button type="primary" class="addTagBtn" size="small" @click="btnClick('create')" v-if="userType == 2">添加标签</el-button>
<GLTable ref="clientTagsListRef" :hasNum="false" :noDataImg="url" noDataText="客户暂无已添加的标签" :tableData="clientTagsList" :hasPage="false" :tableParams="tagsParams" :headerStyle="{ height: '54px' }"> <GLTable ref="clientTagsListRef" :hasNum="false" :noDataImg="url" noDataText="客户暂无已添加的标签" :tableData="clientTagsList" :hasPage="false" :tableParams="tagsParams" :headerStyle="{ height: '54px' }">
<span slot="labelGroupInfo" slot-scope="scope"> <span slot="labelGroupInfo" slot-scope="scope">
<span>{{ scope.scope.labelGroupInfo.labelGroupName }}</span> <span>{{ scope.scope.labelGroupInfo.labelGroupName }}</span>
...@@ -163,15 +165,15 @@ ...@@ -163,15 +165,15 @@
<span v-for="(i, j) in item.labelList" :key="j" class="ellipsis-1" :class="{ activeTag: i.checked }" :title="i.name" @click="checkNewTag(i.checked, j, item.labelList, i.original)">{{ i.name }}</span> <span v-for="(i, j) in item.labelList" :key="j" class="ellipsis-1" :class="{ activeTag: i.checked }" :title="i.name" @click="checkNewTag(i.checked, j, item.labelList, i.original)">{{ i.name }}</span>
</div> </div>
</div> </div>
<template v-if="merchantModel == 1 && accountLevel == 4"> <template v-if="merchantModel == 1 && accountLevel == 4">
<p class="dialogSubTitle">自店标签</p> <p class="dialogSubTitle">自店标签</p>
<div class="ownShopRowData" v-for="(xItem, xIndex) in ownShopTagsList" :key="xIndex"> <div class="ownShopRowData" v-for="(xItem, xIndex) in ownShopTagsList" :key="xIndex">
<span :title="xItem.labelGroup.name">{{ xItem.labelGroup.name }}</span> <span :title="xItem.labelGroup.name">{{ xItem.labelGroup.name }}</span>
<div class="tagsBox"> <div class="tagsBox">
<span v-for="(m, n) in xItem.labelList" :key="n" class="ellipsis-1" :class="{ activeTag: m.checked }" :title="m.name" @click="checkNewTag(m.checked, n, xItem.labelList, m.original)">{{ m.name }}</span> <span v-for="(m, n) in xItem.labelList" :key="n" class="ellipsis-1" :class="{ activeTag: m.checked }" :title="m.name" @click="checkNewTag(m.checked, n, xItem.labelList, m.original)">{{ m.name }}</span>
</div>
</div> </div>
</div>
</template> </template>
<!-- 这里btn-behind插槽莫名失效了,原因:??? --> <!-- 这里btn-behind插槽莫名失效了,原因:??? -->
...@@ -183,12 +185,17 @@ ...@@ -183,12 +185,17 @@
<script> <script>
import { getAllTagTree, getSingleClientTag, addSingleClientTag, getTableDetail } from '@/api/modules/clientManage' import { getAllTagTree, getSingleClientTag, addSingleClientTag, getTableDetail } from '@/api/modules/clientManage'
import url from "@/assets/clientDetail/noDataBox.png" import tipPanel from '@/components/tipPanel/index.vue'
import url from '@/assets/clientDetail/noDataBox.png'
export default { export default {
name: 'clientDetail', name: 'clientDetail',
components: {
tipPanel
},
data() { data() {
return { return {
url:url, panelContent: '说明:标签信息包含跟进员工标记的企业标签和自店标签,以及通过大数据算法生成的系统标签',
url: url,
leftPanelInfo: {}, leftPanelInfo: {},
labelIdList: [], //存放用户被标记标签的id labelIdList: [], //存放用户被标记标签的id
tagsList: [ tagsList: [
...@@ -312,7 +319,7 @@ export default { ...@@ -312,7 +319,7 @@ export default {
listName: 'customerBases', listName: 'customerBases',
tableColumns: [ tableColumns: [
{ {
label: '客户群名称', label: '群聊名称',
prop: 'groupName', prop: 'groupName',
addHtml: 'groupName' addHtml: 'groupName'
}, },
...@@ -358,6 +365,14 @@ export default { ...@@ -358,6 +365,14 @@ export default {
width: '160' width: '160'
}, },
{ {
label: '标签组类型',
prop: 'labelGroupInfo',
formatter: cellValue => {
return cellValue.labelGroupInfo.labelGroupType
},
width: '160'
},
{
label: '已打标签', label: '已打标签',
prop: 'labelInfoList', prop: 'labelInfoList',
addHtml: 'labelInfoList', addHtml: 'labelInfoList',
...@@ -379,7 +394,8 @@ export default { ...@@ -379,7 +394,8 @@ export default {
merchantModel: 1, //集团:1,门店:2 merchantModel: 1, //集团:1,门店:2
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店 accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
userType: 0, //1是商户,2是员工 userType: 0, //1是商户,2是员工
userid: 0 //小龙需要用户id userid: 0, //小龙需要用户id
staffId:0
} }
}, },
...@@ -398,13 +414,13 @@ export default { ...@@ -398,13 +414,13 @@ export default {
console.log(this.tagsParams, 'kkkk') console.log(this.tagsParams, 'kkkk')
}, },
methods: { methods: {
tabClick(index){ closePanel() {
// if (!this.$refs.memberOrderRef.data.length) { this.isFirstShow = false
// this.$refs.memberOrderRef.setTableHeightFun() },
// } tabClick(index) {
this.currentIndex=index this.currentIndex = index
if(this.currentIndex ==2 && this.clientTagsList.length<=0){ if (this.currentIndex == 2 && this.clientTagsList.length <= 0) {
this.$refs.clientTagsListRef.setTableHeightFun() this.$refs.clientTagsListRef.setTableHeightFun()
} }
}, },
showTagArray(list) { showTagArray(list) {
...@@ -484,6 +500,7 @@ export default { ...@@ -484,6 +500,7 @@ export default {
return false return false
} }
this.userid = res.userid this.userid = res.userid
this.staffId=res.staffId
this.leftPanelInfo = res.info this.leftPanelInfo = res.info
this.vehicleTableData = res.vehicleInfoList || [] this.vehicleTableData = res.vehicleInfoList || []
this.employTableList = res.staffFollows || [] this.employTableList = res.staffFollows || []
...@@ -566,7 +583,9 @@ export default { ...@@ -566,7 +583,9 @@ export default {
'req.labelGroupId': item.labelGroup.id, 'req.labelGroupId': item.labelGroup.id,
'req.edition': this.merchantModel, 'req.edition': this.merchantModel,
'req.merchantId': this.merchantId, 'req.merchantId': this.merchantId,
'req.staffId': this.userid 'req.uuId': this.userid,
'req.staffId': this.staffId
// 'req.labelIdList': item.labelList.map(ele => ele.id) // 'req.labelIdList': item.labelList.map(ele => ele.id)
} }
var ids = item.labelList.map(ele => ele.id) var ids = item.labelList.map(ele => ele.id)
...@@ -759,7 +778,7 @@ export default { ...@@ -759,7 +778,7 @@ export default {
} }
} }
.addTagBtn { .addTagBtn {
margin-bottom: 10px; margin-bottom: 10px;
} }
// 处理客户标签的样式 // 处理客户标签的样式
.clientTagsWrap { .clientTagsWrap {
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<!-- <p class="pageTitle">客户管理</p> --> <!-- <p class="pageTitle">客户管理</p> -->
<div class="pageContent"> <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" @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"> <span class="inline-b" slot="form-slot">
<el-button type="primary">导出</el-button> <el-button type="primary" @click="handleExport">导出</el-button>
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
<!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)" 不做判定了, 允许所有人同步 --> <!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)" 不做判定了, 允许所有人同步 -->
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
</template> </template>
<script> <script>
import { getTableList, getDictionaryFun, syncCustomer } from '@/api/modules/clientManage' import { getTableList, getDictionaryFun, syncCustomer ,clientManageExportApi} from '@/api/modules/clientManage'
import url from '@/assets/clientDataOverview/nodata.png' import url from '@/assets/clientDataOverview/nodata.png'
export default { export default {
name: 'clientManage', name: 'clientManage',
...@@ -146,7 +146,7 @@ export default { ...@@ -146,7 +146,7 @@ export default {
{ {
type: 'select', type: 'select',
prop: 'addWay', prop: 'addWay',
label: '来源', label: '添加来源',
placeholder: '请选择当前来源', placeholder: '请选择当前来源',
options: [] //this.$Constants.SOURCE_OPTION options: [] //this.$Constants.SOURCE_OPTION
}, },
...@@ -216,17 +216,6 @@ export default { ...@@ -216,17 +216,6 @@ export default {
minWidth: 120 minWidth: 120
}, },
{ {
label: '来源',
prop: 'addWay',
addHtml: 'addWay',
minWidth: 100
},
{
label: '渠道来源',
prop: 'sourceChannel',
width: 100
},
{
label: '是否加企微', //1. 加入,0.未加入 label: '是否加企微', //1. 加入,0.未加入
prop: 'isJoin', prop: 'isJoin',
addHtml: 'isJoin', addHtml: 'isJoin',
...@@ -239,6 +228,17 @@ export default { ...@@ -239,6 +228,17 @@ export default {
minWidth: 100 minWidth: 100
}, },
{ {
label: '所属渠道',
prop: 'sourceChannel',
width: 100
},
{
label: '添加来源',
prop: 'addWay',
addHtml: 'addWay',
minWidth: 100
},
{
label: '添加时间', label: '添加时间',
prop: 'addTime', prop: 'addTime',
width: 98 width: 98
...@@ -299,17 +299,31 @@ export default { ...@@ -299,17 +299,31 @@ export default {
// } // }
this.$refs.clientManage.data.length ? (this.$refs.clientManage.tableHeightValues = '') : this.$refs.clientManage.setTableHeightFun() this.$refs.clientManage.data.length ? (this.$refs.clientManage.tableHeightValues = '') : this.$refs.clientManage.setTableHeightFun()
}, },
getParams(){
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
}
delete params.daterange
return params
},
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm)) // this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
console.log(this.searchFormTable.daterange, '时间') // if (this.searchFormTable.daterange) {
if (this.searchFormTable.daterange) { // this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.beginTime = this.searchForm.daterange[0] // this.searchFormTable.endTime = this.searchForm.daterange[1]
this.searchFormTable.endTime = this.searchForm.daterange[1] // delete this.searchFormTable.daterange
} else { // } else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime // if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
} // }
delete this.searchFormTable.daterange // resolve()
// })
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve() resolve()
}) })
}, },
...@@ -345,6 +359,13 @@ export default { ...@@ -345,6 +359,13 @@ export default {
return curElement.label return curElement.label
}, },
//导出
handleExport(){
var params = this.getParams()
clientManageExportApi(params).then(res => {
this.$Utils.exportFn(res)
})
},
//搜索表格 //搜索表格
searchTable() { searchTable() {
this.$refs.clientManage.refreshTable() this.$refs.clientManage.refreshTable()
...@@ -411,7 +432,7 @@ export default { ...@@ -411,7 +432,7 @@ export default {
// min-width: 1300px; // min-width: 1300px;
background-color: #fff; background-color: #fff;
.el-button + .el-button { .el-button + .el-button {
margin-left: 20px; margin-left: 10px;
} }
.searchTop { .searchTop {
// margin-bottom: 20px; // margin-bottom: 20px;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<!-- v-if="!(merchantModel == 1 && accountLevel == 4)" --> <!-- v-if="!(merchantModel == 1 && accountLevel == 4)" -->
<div>企业标签为全局标签,员工可在企微APP端客户详情、客户跟进等模块查看和打标签,最多3000个;</div> <div>企业标签为全局标签,员工可在企微APP端客户详情、客户跟进等模块查看和打标签,最多3000个;</div>
<div v-if="!((merchantModel == 2 && accountLevel == 4) || (merchantModel == 1 && accountLevel == 1))">自店标签为企业商户自有标签,员工可在企微APP端客户跟进等模块查看和打标签,最多3000个;</div> <div v-if="!((merchantModel == 2 && accountLevel == 4) || (merchantModel == 1 && accountLevel == 1))">自店标签为企业商户自有标签,员工可在企微APP端客户跟进等模块查看和打标签,最多3000个;</div>
<div>行业标签为通过大数据算法规则生成的标签</div> <div>系统标签为通过大数据算法规则生成的标签</div>
<img src="@/assets/tagsManage/question.png" slot="reference" alt="" /> <img src="@/assets/tagsManage/question.png" slot="reference" alt="" />
</el-popover> </el-popover>
</span> </span>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<div class="initPanel" v-if="isFirstShow"> <div class="initPanel" v-if="isFirstShow">
<template v-if="!(merchantModel == 1 && accountLevel == 4)">企业标签为全局标签,员工可在企微APP端客户详情、客户跟进等模块查看和打标签,最多3000个;</template> <template v-if="!(merchantModel == 1 && accountLevel == 4)">企业标签为全局标签,员工可在企微APP端客户详情、客户跟进等模块查看和打标签,最多3000个;</template>
<template v-if="!((merchantModel == 2 && accountLevel == 4) || (merchantModel == 1 && accountLevel == 1))">自店标签为企业商户自有标签,员工可在企微APP端客户跟进等模块查看和打标签,最多3000个;</template> <template v-if="!((merchantModel == 2 && accountLevel == 4) || (merchantModel == 1 && accountLevel == 1))">自店标签为企业商户自有标签,员工可在企微APP端客户跟进等模块查看和打标签,最多3000个;</template>
行业标签为通过大数据算法规则生成的标签 系统标签为通过大数据算法规则生成的标签
<img src="@/assets/tagsManage/Shape.png" alt="" /> <img src="@/assets/tagsManage/Shape.png" alt="" />
<i class="el-icon-close" @click="closeInitPanel"></i> <i class="el-icon-close" @click="closeInitPanel"></i>
</div> </div>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</span> </span>
<template slot="xxx" slot-scope="scope"> <template slot="xxx" slot-scope="scope">
<!-- //这版关掉自店标签 1.0.1允许集团的门店打字店标签,也可以编辑--> <!-- //这版关掉自店标签 1.0.1允许集团的门店打字店标签,也可以编辑-->
<span @click="btnClick('edit', scope.scope)" class="blue-text" v-if="scope.scope.labelType != '行业标签' && isShowEditBtn(scope.scope)">编辑标签组</span> <span @click="btnClick('edit', scope.scope)" class="blue-text" v-if="scope.scope.labelType != '系统标签' && isShowEditBtn(scope.scope)">编辑标签组</span>
</template> </template>
</GLTable> </GLTable>
</div> </div>
...@@ -208,8 +208,8 @@ export default { ...@@ -208,8 +208,8 @@ export default {
value: '自店标签' value: '自店标签'
}, },
{ {
label: '行业标签', label: '系统标签',
value: '行业标签' value: '系统标签'
} }
] ]
}, },
...@@ -832,7 +832,7 @@ export default { ...@@ -832,7 +832,7 @@ export default {
margin-top: 20px; margin-top: 20px;
background-color: #fff; background-color: #fff;
.el-button + .el-button { .el-button + .el-button {
margin-left: 20px; margin-left: 10px;
} }
.allTagsWrap { .allTagsWrap {
...@@ -854,7 +854,7 @@ export default { ...@@ -854,7 +854,7 @@ export default {
display: inline-block; display: inline-block;
margin-right: 10px; margin-right: 10px;
// margin-bottom: 2px; margin-bottom: 10px;
padding: 0 10px; padding: 0 10px;
box-sizing: border-box; box-sizing: border-box;
min-width: 76px; min-width: 76px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!