Commit 4bb8160d by 李长胜

修改

1 parent 80e41a16
...@@ -43,10 +43,18 @@ ...@@ -43,10 +43,18 @@
</p> </p>
</div> </div>
<div class="rightWrap"> <div class="rightWrap">
<p> <!-- <p>
<span>全部客户</span> <span>客户列表</span>
<span>{{ clientTableDataNum || 0 }}个</span> <span>{{ clientTableDataNum || 0 }}个</span>
</p> </p> -->
<div class="choseRow">
<div class="choseItem" :class="{activeItem:currentIndex==index}" v-for="(item,index) in titles" :key="index" @click="tabClick(index)">
<!-- <span>{{item}}</span>
<span>{{ clientTableDataNum || 0 }}个</span> -->
<span>{{item}}({{clientTableDataNum || 0}})个</span>
</div>
</div>
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent"> <search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
...@@ -72,7 +80,7 @@ ...@@ -72,7 +80,7 @@
<span @click="goDetail(scope.scope.id)" class="blue-text">详情</span> <span @click="goDetail(scope.scope.id)" class="blue-text">详情</span>
</template> </template>
</GLTable> </GLTable>
<basic-dialog title="" width="547px" :isVisible="dialogVisible" btnOkLabel="我知道了" :isHasCancelBtn="false" @confirmDialog="handleConfirm" @closeDialog="handleClose"> <basic-dialog title="" width="547px" :isVisible="dialogVisible" btnOkLabel="我知道了" :isHasCancelBtn="false" @confirmDialog="handleConfirm" @closeDialog="handleClose">
<div class="content-body"> <div class="content-body">
<p>该客户暂无员工跟进,无法查看该客户详情,</p> <p>该客户暂无员工跟进,无法查看该客户详情,</p>
<p class="bottomText">赶紧去加好友吧!</p> <p class="bottomText">赶紧去加好友吧!</p>
...@@ -84,18 +92,20 @@ ...@@ -84,18 +92,20 @@
</template> </template>
<script> <script>
import { getTableDetail, getDetailTableList, getClientTableDetail } from '@/api/modules/clientGroupManage' import { getTableDetail, getDetailTableList,getClientTableDetail } from '@/api/modules/clientGroupManage'
import url from '@/assets/clientDataOverview/nodata.png' import url from '@/assets/clientDataOverview/nodata.png'
export default { export default {
name: 'clientGroupDetail', name: 'clientGroupDetail',
data() { data() {
return { return {
dialogVisible:false, dialogVisible:false,
titles:['全部客户','跟进员工','潜在客户','退群客户'],
currentIndex:0,
groupName: this.$route.query.groupName, groupName: this.$route.query.groupName,
url: url, url: url,
leftPanelList: {}, leftPanelList: {},
searchForm: {}, searchForm: {},
searchFormTable: {}, searchFormTable:{},
clientGroupFormList: [ clientGroupFormList: [
{ {
type: 'daterange', type: 'daterange',
...@@ -158,8 +168,7 @@ export default { ...@@ -158,8 +168,7 @@ export default {
{ {
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
addHtml: 'customerName', addHtml: 'customerName'
minWidth: 100
}, },
{ {
label: '手机号码', label: '手机号码',
...@@ -177,12 +186,13 @@ export default { ...@@ -177,12 +186,13 @@ export default {
}, },
{ {
label: '邀请人', label: '邀请人',
prop: 'invitor' prop: 'invitor',
}, },
{ {
label: '入群时间', label: '入群时间',
prop: 'joinTime', prop: 'joinTime',
width: 95 width:95
} }
], ],
tableOption: { tableOption: {
...@@ -219,13 +229,16 @@ export default { ...@@ -219,13 +229,16 @@ export default {
// console.log('val值:',val) // console.log('val值:',val)
// if(val){ // if(val){
// console.log('7777777777777') // console.log('7777777777777')
// this.searchTable() // this.searchTable()
// } // }
// } // }
// } // }
// }, // },
methods: { methods: {
tabClick(index){
this.currentIndex=index;
},
async getTableDetail(id = this.$route.query.id) { async getTableDetail(id = this.$route.query.id) {
const res = await getTableDetail({ id: id }) const res = await getTableDetail({ id: id })
console.log('获取客户群数据', res) console.log('获取客户群数据', res)
...@@ -234,16 +247,13 @@ export default { ...@@ -234,16 +247,13 @@ export default {
} }
this.leftPanelList = res this.leftPanelList = res
}, },
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.searchForm,'数据')
// console.log(this.searchForm.daterange,this.searchForm.id,this.searchFormTable,'时间选择器')
// console.log(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
} }
...@@ -258,9 +268,10 @@ export default { ...@@ -258,9 +268,10 @@ export default {
console.log(content) console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total this.clientTableDataNum = this.$refs.clientGroupDetail.total
//接收到的数据为空 //接收到的数据为空
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()
}, },
goBack() { goBack() {
this.$router.push({ path: '/clientGroupManage/index' }) this.$router.push({ path: '/clientGroupManage/index' })
...@@ -274,26 +285,25 @@ export default { ...@@ -274,26 +285,25 @@ export default {
this.searchForm = { id: this.$route.query.id } this.searchForm = { id: this.$route.query.id }
this.$refs.clientGroupDetail.refreshTable() this.$refs.clientGroupDetail.refreshTable()
}, },
handleClose() {
this.dialogVisible = !this.dialogVisible
},
handleConfirm() {
this.handleClose()
},
goDetail(id) { goDetail(id) {
// 接口通过了跳转 // 接口通过了跳转
getClientTableDetail({ id }).then(res => { getClientTableDetail({ id }).then(res => {
if (res.code == '0') { if (res.code == '0') {
if(!res.data){
this.dialogVisible = true
return false;
}
this.$router.push({ this.$router.push({
path: '/clientManage/clientDetail', path: '/clientManage/clientDetail',
query: { query: {
id: id id: id
} }
}) })
} else if (res.code == '-1' && res.message=='该客户暂无员工跟进,无法查看该客户详情') { // else if (res.code == '-1' && res.message=='该客户暂无员工跟进,无法查看该客户详情') {
this.dialogVisible = true // this.dialogVisible = true
this.$message.error(`${res.message}`) // this.$message.error(`${res.message}`)
}else{ // }
} else{
this.$message({ this.$message({
type:'error', type:'error',
message:res.message message:res.message
...@@ -388,32 +398,51 @@ export default { ...@@ -388,32 +398,51 @@ export default {
} }
} }
.rightWrap { .rightWrap {
position: relative;
margin-left: 20px; margin-left: 20px;
width: calc(100% - 260px); width: calc(100% - 260px);
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #fff;
padding: 20px; padding: 20px;
> p { padding-top: 50px;
height: 20px; .choseRow{
line-height: 20px; position: absolute;
margin-bottom: 10px; width: 100%;
span { left: 0;
vertical-align: middle; top: 0;
display: flex;
background-color:$bgColor;
z-index: 10;
padding: 2px 0 0 0;
.choseItem {
height: 40px;
line-height: 40px;
width: 180px;
// background: #FFFFFF;
text-align: center;
border: 1px solid #EEEDFF;
border-bottom: 0;
&:first-child{
border-left:0 ;
} }
span:first-child { span {
font-size: 18px;
font-weight: 400; font-weight: 400;
color: #333333;
}
span:nth-child(2) {
margin-left: 6px;
font-size: 14px; font-size: 14px;
font-weight: 400; color: #37383A;
}
}
.activeItem{
border-radius: 4px 4px 0 0;
background-color: #fff;
span {
color: $btnBlue; color: $btnBlue;
height: 20px; font-weight: 600;
line-height: 20px;
} }
} }
}
.el-button + .el-button { .el-button + .el-button {
margin-left: 20px; margin-left: 20px;
} }
...@@ -437,27 +466,5 @@ export default { ...@@ -437,27 +466,5 @@ export default {
} }
} }
} }
/deep/ .el-dialog__header {
border: 0;
}
/deep/ .el-dialog__body {
border-bottom: 1px solid #e6e6e6;
padding: 0px 65px 35px;
min-height: 0;
.container {
font-size: 18px;
text-align: center;
font-weight: 400;
color: #333333;
.bottomText {
margin-top: 10px;
}
}
}
/deep/ .el-dialog__footer {
text-align: center;
padding-top: 15px;
padding-bottom: 15px;
}
} }
</style> </style>
...@@ -43,18 +43,10 @@ ...@@ -43,18 +43,10 @@
</p> </p>
</div> </div>
<div class="rightWrap"> <div class="rightWrap">
<!-- <p> <p>
<span>客户列表</span> <span>全部客户</span>
<span>{{ clientTableDataNum || 0 }}个</span> <span>{{ clientTableDataNum || 0 }}个</span>
</p> --> </p>
<div class="choseRow">
<div class="choseItem" :class="{activeItem:currentIndex==index}" v-for="(item,index) in titles" :key="index" @click="tabClick(index)">
<!-- <span>{{item}}</span>
<span>{{ clientTableDataNum || 0 }}个</span> -->
<span>{{item}}({{clientTableDataNum || 0}})个</span>
</div>
</div>
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent"> <search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
...@@ -80,7 +72,7 @@ ...@@ -80,7 +72,7 @@
<span @click="goDetail(scope.scope.id)" class="blue-text">详情</span> <span @click="goDetail(scope.scope.id)" class="blue-text">详情</span>
</template> </template>
</GLTable> </GLTable>
<basic-dialog title="" width="547px" :isVisible="dialogVisible" btnOkLabel="我知道了" :isHasCancelBtn="false" @confirmDialog="handleConfirm" @closeDialog="handleClose"> <basic-dialog title="" width="547px" :isVisible="dialogVisible" btnOkLabel="我知道了" :isHasCancelBtn="false" @confirmDialog="handleConfirm" @closeDialog="handleClose">
<div class="content-body"> <div class="content-body">
<p>该客户暂无员工跟进,无法查看该客户详情,</p> <p>该客户暂无员工跟进,无法查看该客户详情,</p>
<p class="bottomText">赶紧去加好友吧!</p> <p class="bottomText">赶紧去加好友吧!</p>
...@@ -92,20 +84,18 @@ ...@@ -92,20 +84,18 @@
</template> </template>
<script> <script>
import { getTableDetail, getDetailTableList,getClientTableDetail } from '@/api/modules/clientGroupManage' import { getTableDetail, getDetailTableList, getClientTableDetail } from '@/api/modules/clientGroupManage'
import url from '@/assets/clientDataOverview/nodata.png' import url from '@/assets/clientDataOverview/nodata.png'
export default { export default {
name: 'clientGroupDetail', name: 'clientGroupDetail',
data() { data() {
return { return {
dialogVisible:false, dialogVisible:false,
titles:['全部客户','潜在客户','退群客户','跟进员工'],
currentIndex:0,
groupName: this.$route.query.groupName, groupName: this.$route.query.groupName,
url: url, url: url,
leftPanelList: {}, leftPanelList: {},
searchForm: {}, searchForm: {},
searchFormTable:{}, searchFormTable: {},
clientGroupFormList: [ clientGroupFormList: [
{ {
type: 'daterange', type: 'daterange',
...@@ -168,7 +158,8 @@ export default { ...@@ -168,7 +158,8 @@ export default {
{ {
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
addHtml: 'customerName' addHtml: 'customerName',
minWidth: 100
}, },
{ {
label: '手机号码', label: '手机号码',
...@@ -186,13 +177,12 @@ export default { ...@@ -186,13 +177,12 @@ export default {
}, },
{ {
label: '邀请人', label: '邀请人',
prop: 'invitor', prop: 'invitor'
}, },
{ {
label: '入群时间', label: '入群时间',
prop: 'joinTime', prop: 'joinTime',
width:95 width: 95
} }
], ],
tableOption: { tableOption: {
...@@ -229,16 +219,13 @@ export default { ...@@ -229,16 +219,13 @@ export default {
// console.log('val值:',val) // console.log('val值:',val)
// if(val){ // if(val){
// console.log('7777777777777') // console.log('7777777777777')
// this.searchTable() // this.searchTable()
// } // }
// } // }
// } // }
// }, // },
methods: { methods: {
tabClick(index){
this.currentIndex=index;
},
async getTableDetail(id = this.$route.query.id) { async getTableDetail(id = this.$route.query.id) {
const res = await getTableDetail({ id: id }) const res = await getTableDetail({ id: id })
console.log('获取客户群数据', res) console.log('获取客户群数据', res)
...@@ -247,13 +234,16 @@ export default { ...@@ -247,13 +234,16 @@ export default {
} }
this.leftPanelList = res this.leftPanelList = res
}, },
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.searchForm,'数据')
// console.log(this.searchForm.daterange,this.searchForm.id,this.searchFormTable,'时间选择器')
// console.log(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
} }
...@@ -268,10 +258,9 @@ export default { ...@@ -268,10 +258,9 @@ export default {
console.log(content) console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total this.clientTableDataNum = this.$refs.clientGroupDetail.total
//接收到的数据为空 //接收到的数据为空
// 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()
}, },
goBack() { goBack() {
this.$router.push({ path: '/clientGroupManage/index' }) this.$router.push({ path: '/clientGroupManage/index' })
...@@ -285,6 +274,12 @@ export default { ...@@ -285,6 +274,12 @@ export default {
this.searchForm = { id: this.$route.query.id } this.searchForm = { id: this.$route.query.id }
this.$refs.clientGroupDetail.refreshTable() this.$refs.clientGroupDetail.refreshTable()
}, },
handleClose() {
this.dialogVisible = !this.dialogVisible
},
handleConfirm() {
this.handleClose()
},
goDetail(id) { goDetail(id) {
// 接口通过了跳转 // 接口通过了跳转
getClientTableDetail({ id }).then(res => { getClientTableDetail({ id }).then(res => {
...@@ -393,51 +388,32 @@ export default { ...@@ -393,51 +388,32 @@ export default {
} }
} }
.rightWrap { .rightWrap {
position: relative;
margin-left: 20px; margin-left: 20px;
width: calc(100% - 260px); width: calc(100% - 260px);
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #fff;
padding: 20px; padding: 20px;
padding-top: 50px; > p {
.choseRow{ height: 20px;
position: absolute; line-height: 20px;
width: 100%; margin-bottom: 10px;
left: 0; span {
top: 0; vertical-align: middle;
display: flex;
background-color:$bgColor;
z-index: 10;
padding: 2px 0 0 0;
.choseItem {
height: 40px;
line-height: 40px;
width: 180px;
// background: #FFFFFF;
text-align: center;
border: 1px solid #EEEDFF;
border-bottom: 0;
&:first-child{
border-left:0 ;
} }
span { span:first-child {
font-size: 18px;
font-weight: 400; font-weight: 400;
font-size: 14px; color: #333333;
color: #37383A;
} }
span:nth-child(2) {
} margin-left: 6px;
.activeItem{ font-size: 14px;
border-radius: 4px 4px 0 0; font-weight: 400;
background-color: #fff;
span {
color: $btnBlue; color: $btnBlue;
font-weight: 600; height: 20px;
line-height: 20px;
} }
} }
}
.el-button + .el-button { .el-button + .el-button {
margin-left: 20px; margin-left: 20px;
} }
...@@ -461,5 +437,27 @@ export default { ...@@ -461,5 +437,27 @@ export default {
} }
} }
} }
/deep/ .el-dialog__header {
border: 0;
}
/deep/ .el-dialog__body {
border-bottom: 1px solid #e6e6e6;
padding: 0px 65px 35px;
min-height: 0;
.container {
font-size: 18px;
text-align: center;
font-weight: 400;
color: #333333;
.bottomText {
margin-top: 10px;
}
}
}
/deep/ .el-dialog__footer {
text-align: center;
padding-top: 15px;
padding-bottom: 15px;
}
} }
</style> </style>
<template> <template>
<div> <div class="scrm-sub-client-container">
</div> </div>
</template> </template>
...@@ -10,6 +10,10 @@ export default { ...@@ -10,6 +10,10 @@ export default {
} }
</script> </script>
<style> <style lang="scss" scope>
.scrm-sub-client-container{
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
}
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!