Commit fcbd2cb5 by 李长胜

修改

1 parent 4bb8160d
...@@ -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>
...@@ -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: {
...@@ -236,9 +226,6 @@ export default { ...@@ -236,9 +226,6 @@ export default {
// }, // },
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)
...@@ -250,6 +237,9 @@ export default { ...@@ -250,6 +237,9 @@ export default {
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]
...@@ -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,13 +274,19 @@ export default { ...@@ -285,13 +274,19 @@ 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){ if (!res.data) {
this.dialogVisible = true this.dialogVisible = true
return false; return false
} }
this.$router.push({ this.$router.push({
path: '/clientManage/clientDetail', path: '/clientManage/clientDetail',
...@@ -299,14 +294,14 @@ export default { ...@@ -299,14 +294,14 @@ export default {
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
}) })
} }
}) })
...@@ -398,51 +393,32 @@ export default { ...@@ -398,51 +393,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;
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 { span {
font-weight: 400; vertical-align: middle;
font-size: 14px;
color: #37383A;
} }
span:first-child {
font-size: 18px;
font-weight: 400;
color: #333333;
} }
.activeItem{ span:nth-child(2) {
border-radius: 4px 4px 0 0; margin-left: 6px;
background-color: #fff; font-size: 14px;
span { font-weight: 400;
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;
} }
...@@ -466,5 +442,27 @@ export default { ...@@ -466,5 +442,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>
...@@ -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>
...@@ -90,7 +98,9 @@ export default { ...@@ -90,7 +98,9 @@ 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: {},
...@@ -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: '手机号码',
...@@ -226,6 +235,9 @@ export default { ...@@ -226,6 +235,9 @@ export default {
// }, // },
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)
...@@ -237,9 +249,6 @@ export default { ...@@ -237,9 +249,6 @@ export default {
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]
...@@ -258,9 +267,10 @@ export default { ...@@ -258,9 +267,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,29 +284,28 @@ export default { ...@@ -274,29 +284,28 @@ 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 +397,50 @@ export default { ...@@ -388,32 +397,50 @@ 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 +464,5 @@ export default { ...@@ -437,27 +464,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>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!