Commit 4bb8160d by 李长胜

修改

1 parent 80e41a16
......@@ -43,10 +43,18 @@
</p>
</div>
<div class="rightWrap">
<p>
<span>全部客户</span>
<!-- <p>
<span>客户列表</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">
<span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button>
......@@ -72,7 +80,7 @@
<span @click="goDetail(scope.scope.id)" class="blue-text">详情</span>
</template>
</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">
<p>该客户暂无员工跟进,无法查看该客户详情,</p>
<p class="bottomText">赶紧去加好友吧!</p>
......@@ -84,18 +92,20 @@
</template>
<script>
import { getTableDetail, getDetailTableList, getClientTableDetail } from '@/api/modules/clientGroupManage'
import { getTableDetail, getDetailTableList,getClientTableDetail } from '@/api/modules/clientGroupManage'
import url from '@/assets/clientDataOverview/nodata.png'
export default {
name: 'clientGroupDetail',
data() {
return {
dialogVisible:false,
titles:['全部客户','跟进员工','潜在客户','退群客户'],
currentIndex:0,
groupName: this.$route.query.groupName,
url: url,
leftPanelList: {},
searchForm: {},
searchFormTable: {},
searchFormTable:{},
clientGroupFormList: [
{
type: 'daterange',
......@@ -158,8 +168,7 @@ export default {
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName',
minWidth: 100
addHtml: 'customerName'
},
{
label: '手机号码',
......@@ -177,12 +186,13 @@ export default {
},
{
label: '邀请人',
prop: 'invitor'
prop: 'invitor',
},
{
label: '入群时间',
prop: 'joinTime',
width: 95
width:95
}
],
tableOption: {
......@@ -219,13 +229,16 @@ export default {
// console.log('val值:',val)
// if(val){
// console.log('7777777777777')
// this.searchTable()
// this.searchTable()
// }
// }
// }
// },
methods: {
tabClick(index){
this.currentIndex=index;
},
async getTableDetail(id = this.$route.query.id) {
const res = await getTableDetail({ id: id })
console.log('获取客户群数据', res)
......@@ -234,16 +247,13 @@ export default {
}
this.leftPanelList = res
},
beforeSearchFn() {
beforeSearchFn() {
return new Promise((resolve, reject) => {
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) {
this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange
delete this.searchFormTable.daterange
} else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
}
......@@ -258,9 +268,10 @@ export default {
console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total
//接收到的数据为空
if (!this.$refs.clientGroupDetail.data.length) {
this.$refs.clientGroupDetail.setTableHeightFun()
}
// if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun()
// }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
},
goBack() {
this.$router.push({ path: '/clientGroupManage/index' })
......@@ -274,26 +285,25 @@ export default {
this.searchForm = { id: this.$route.query.id }
this.$refs.clientGroupDetail.refreshTable()
},
handleClose() {
this.dialogVisible = !this.dialogVisible
},
handleConfirm() {
this.handleClose()
},
goDetail(id) {
// 接口通过了跳转
getClientTableDetail({ id }).then(res => {
if (res.code == '0') {
if(!res.data){
this.dialogVisible = true
return false;
}
this.$router.push({
path: '/clientManage/clientDetail',
query: {
id: id
}
})
} else if (res.code == '-1' && res.message=='该客户暂无员工跟进,无法查看该客户详情') {
this.dialogVisible = true
this.$message.error(`${res.message}`)
}else{
// else if (res.code == '-1' && res.message=='该客户暂无员工跟进,无法查看该客户详情') {
// this.dialogVisible = true
// this.$message.error(`${res.message}`)
// }
} else{
this.$message({
type:'error',
message:res.message
......@@ -388,32 +398,51 @@ export default {
}
}
.rightWrap {
position: relative;
margin-left: 20px;
width: calc(100% - 260px);
box-sizing: border-box;
background-color: #fff;
padding: 20px;
> p {
height: 20px;
line-height: 20px;
margin-bottom: 10px;
span {
vertical-align: middle;
padding-top: 50px;
.choseRow{
position: absolute;
width: 100%;
left: 0;
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 {
font-size: 18px;
span {
font-weight: 400;
color: #333333;
}
span:nth-child(2) {
margin-left: 6px;
font-size: 14px;
font-weight: 400;
color: #37383A;
}
}
.activeItem{
border-radius: 4px 4px 0 0;
background-color: #fff;
span {
color: $btnBlue;
height: 20px;
line-height: 20px;
font-weight: 600;
}
}
}
.el-button + .el-button {
margin-left: 20px;
}
......@@ -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>
......@@ -43,18 +43,10 @@
</p>
</div>
<div class="rightWrap">
<!-- <p>
<span>客户列表</span>
<p>
<span>全部客户</span>
<span>{{ clientTableDataNum || 0 }}个</span>
</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>
</p>
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button>
......@@ -80,7 +72,7 @@
<span @click="goDetail(scope.scope.id)" class="blue-text">详情</span>
</template>
</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">
<p>该客户暂无员工跟进,无法查看该客户详情,</p>
<p class="bottomText">赶紧去加好友吧!</p>
......@@ -92,20 +84,18 @@
</template>
<script>
import { getTableDetail, getDetailTableList,getClientTableDetail } from '@/api/modules/clientGroupManage'
import { getTableDetail, getDetailTableList, getClientTableDetail } from '@/api/modules/clientGroupManage'
import url from '@/assets/clientDataOverview/nodata.png'
export default {
name: 'clientGroupDetail',
data() {
return {
dialogVisible:false,
titles:['全部客户','潜在客户','退群客户','跟进员工'],
currentIndex:0,
groupName: this.$route.query.groupName,
url: url,
leftPanelList: {},
searchForm: {},
searchFormTable:{},
searchFormTable: {},
clientGroupFormList: [
{
type: 'daterange',
......@@ -168,7 +158,8 @@ export default {
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName'
addHtml: 'customerName',
minWidth: 100
},
{
label: '手机号码',
......@@ -186,13 +177,12 @@ export default {
},
{
label: '邀请人',
prop: 'invitor',
prop: 'invitor'
},
{
label: '入群时间',
prop: 'joinTime',
width:95
width: 95
}
],
tableOption: {
......@@ -229,16 +219,13 @@ export default {
// console.log('val值:',val)
// if(val){
// console.log('7777777777777')
// this.searchTable()
// this.searchTable()
// }
// }
// }
// },
methods: {
tabClick(index){
this.currentIndex=index;
},
async getTableDetail(id = this.$route.query.id) {
const res = await getTableDetail({ id: id })
console.log('获取客户群数据', res)
......@@ -247,13 +234,16 @@ export default {
}
this.leftPanelList = res
},
beforeSearchFn() {
beforeSearchFn() {
return new Promise((resolve, reject) => {
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) {
this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange
delete this.searchFormTable.daterange
} else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
}
......@@ -268,10 +258,9 @@ export default {
console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun()
// }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
if (!this.$refs.clientGroupDetail.data.length) {
this.$refs.clientGroupDetail.setTableHeightFun()
}
},
goBack() {
this.$router.push({ path: '/clientGroupManage/index' })
......@@ -285,6 +274,12 @@ export default {
this.searchForm = { id: this.$route.query.id }
this.$refs.clientGroupDetail.refreshTable()
},
handleClose() {
this.dialogVisible = !this.dialogVisible
},
handleConfirm() {
this.handleClose()
},
goDetail(id) {
// 接口通过了跳转
getClientTableDetail({ id }).then(res => {
......@@ -393,51 +388,32 @@ export default {
}
}
.rightWrap {
position: relative;
margin-left: 20px;
width: calc(100% - 260px);
box-sizing: border-box;
background-color: #fff;
padding: 20px;
padding-top: 50px;
.choseRow{
position: absolute;
width: 100%;
left: 0;
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 ;
> p {
height: 20px;
line-height: 20px;
margin-bottom: 10px;
span {
vertical-align: middle;
}
span {
span:first-child {
font-size: 18px;
font-weight: 400;
font-size: 14px;
color: #37383A;
color: #333333;
}
}
.activeItem{
border-radius: 4px 4px 0 0;
background-color: #fff;
span {
span:nth-child(2) {
margin-left: 6px;
font-size: 14px;
font-weight: 400;
color: $btnBlue;
font-weight: 600;
height: 20px;
line-height: 20px;
}
}
}
.el-button + .el-button {
margin-left: 20px;
}
......@@ -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>
<template>
<div>
<div class="scrm-sub-client-container">
</div>
</template>
......@@ -10,6 +10,10 @@ export default {
}
</script>
<style>
<style lang="scss" scope>
.scrm-sub-client-container{
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
}
</style>
\ 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!