Commit c9e06b28 by xuyl

更新2.4代码

1 parent d3fd8929
......@@ -2,22 +2,30 @@
<div class="scrm-sub-client-container">
<div class="pageContent">
<GLCombiForm :formObj="searchForm" :formData="searchFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<GLTable v-loading="loading" :hasNum="true" @setTableHeightEvent="setTableHeightEvent" @setTableFinishFun="setTableFinishFun" ref="marketingPlan" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams"></GLTable>
<GLTable v-loading="loading" :hasNum="true" @setTableHeightEvent="setTableHeightEvent" @setTableFinishFun="setTableFinishFun" ref="marketingPlan" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams">
<template slot="options" slot-scope="scope">
<el-button class="blue-text" type="text" @click="goBasicInfo(scope.scope)">SOP分析</el-button>
<el-button class="blue-text" type="text" @click="goBasicInfo(scope.scope)">编辑</el-button>
<el-button class="blue-text" type="text" @click="confirm('delete')">删除</el-button>
<el-button class="blue-text" type="text" @click="confirm(scope.scope)">结束</el-button>
</template>
</GLTable>
</div>
</div>
</template>
<script>
import { getTableList } from '@/api/modules/clientManage'
export default {
data() {
return {
searchForm: {},
searchFormList: [{
searchFormList: [
{
type: 'input',
inputType: 'text',
// name: 'keyword',
label: '分群名称',
placeholder: '请输入分群关键字'
label: '人群名称'
},
{
type: 'select',
......@@ -29,31 +37,15 @@ export default {
{
label: '全部',
value: ''
},
{
label: '救援服务',
value: 3
},
{
label: '新车询价',
value: 4
},
{
label: '试驾预约',
value: 5
},
{
label: '维保预约',
value: 6
}
],
placeholder: '请选择'
}
],
// getListApi: getTableList,
getListApi: getTableList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'list',
listName: 'data',
tableColumns: [
{
label: '人群名称',
......@@ -74,12 +66,17 @@ export default {
{
label: '营销状态',
prop: 'dsdasds'
},
{
label: '操作',
prop: 'options',
addHtml: 'options'
}
]
}
}
},
mounted() {
mounted() {
//没数据的时候要算高度
setTimeout(() => {
if (!this.$refs.marketingPlan.data.length) {
......@@ -90,7 +87,27 @@ export default {
}, 200)
},
methods: {
setTableFinishFun() {
// 确认删除或结束
confirm(type) {
this.$confirm(`是否确认${type == 'delete' ? '删除' : '结束'}?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$message({
type: 'success',
message: '操作成功!'
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
setTableFinishFun() {
this.$refs.marketingPlan.data.length ? (this.$refs.marketingPlan.tableHeightValues = '') : this.$refs.marketingPlan.setTableHeightFun()
},
setTableHeightEvent() {
......
......@@ -8,7 +8,8 @@
<!-- 切换导航栏 -->
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="营销人群" name="first">
<div class="pageContent" v-if="activeName == 'first'">
<!-- v-if="activeName == 'first'" -->
<div class="pageContent">
<div class="markPeople">
<span>营销人群</span>
<span v-if="itemArr.length > 4 && !closeFlag" @click="expandClick('expand')">
......@@ -32,7 +33,7 @@
<span>人</span>
</p>
<p class="peopledesc">{{ item.desc }}</p>
<el-button class="createSOP" @click.stop="createMarketSOP()">创建营销SOP</el-button>
<el-button class="createSOP" @click.stop="createMarketSOP()" :disabled="item.type">创建营销SOP</el-button>
</div>
</template>
</div>
......@@ -40,7 +41,7 @@
<div v-show="!closeFlag">
<div class="swiper-container" id="swiper">
<div class="swiper-wrapper">
<div v-for="(item, idx) in itemArr" :key="idx" :class="[{ active: isActive == idx }, 'marketItem', 'swiper-slide']" @click="choickItem(idx)">
<div v-for="(item, idx) in itemArr" :key="idx" :class="[{ active: isActive == idx }, 'marketItem', 'swiper-slide']" @click="choickItem(idx, item.title)">
<div class="marketItem-border">
<p class="peopleName">{{ item.title }}</p>
<div class="itemBox">
......@@ -49,7 +50,7 @@
<span>人</span>
</p>
<p class="peopledesc">{{ item.desc }}</p>
<el-button class="createSOP" @click.stop="createMarketSOP()">创建营销SOP</el-button>
<el-button class="createSOP" @click.stop="createMarketSOP(item.id)" :disabled="item.type">创建营销SOP</el-button>
</div>
</div>
</div>
......@@ -60,14 +61,14 @@
</div>
</div>
<div class="otherPageContent">
<GLCombiForm :formObj="searchForm" :formData="marketPeopleFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<GLCombiForm v-if="activeName == 'first'" :formObj="searchForm" :formData="marketPeopleFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<div class="leadList">
<div>
<span>N-3待定保客户</span>
<span>{{ showTitle }}</span>
</div>
<div>
<el-button size="small" @click="handleExport">导出</el-button>
<el-button class="marketSOP" size="small">营销SOP</el-button>
<el-button class="marketSOP" size="small" @click="marketButton()">营销SOP</el-button>
</div>
</div>
<GLTable v-loading="loading" :hasNum="true" @setTableHeightEvent="setTableHeightEvent" @setTableFinishFun="setTableFinishFun" ref="marketPeople" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :tableParams="tableParams"></GLTable>
......@@ -95,10 +96,11 @@ export default {
isActive: -1,
displayNum: 4, //展示的数目
closeFlag: false, //展开收起
showTitle: '', // 展示的标题
itemArr: [
// 后台传一个状态回来
{ title: 'N-23待定保客户', num: 323, desc: '我顶着大太阳,只想为你撑伞' },
{ title: 'N-45待定保客户', num: 1312, desc: '你专心在画睫毛,我专心在等你笑' },
{ title: 'N-23待定保客户', num: 323, desc: '我顶着大太阳,只想为你撑伞', id: 1, type: 'false' },
{ title: 'N-45待定保客户', num: 1312, desc: '你专心在画睫毛,我专心在等你笑', id: 2 },
{ title: 'N-33待定保客户', num: 43133, desc: '气球在我手上,牵着你瞎逛' },
{ title: 'N-1待定保客户', num: 123213, desc: '城堡为爱守着秘密,而我为你守着爱情' },
{ title: 'N-2待定保客户', num: 1233, desc: '喜欢在人潮中,你只属于我的那画面' },
......@@ -166,33 +168,25 @@ export default {
},
{
type: 'select',
name: 'type',
name: 'isJoin',
label: '是否已加企微',
placeholder: '请选择',
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: ''
},
{
label: '救援服务',
value: 3
value: null
},
{
label: '新车询价',
value: 4
},
{
label: '试驾预约',
value: 5
label: '是',
value: 1
},
{
label: '维保预约',
value: 6
label: '否',
value: 0
}
],
placeholder: '请选择'
]
},
{
type: 'datePicker',
......@@ -282,9 +276,19 @@ export default {
})
},
methods: {
// 搜索表格
searchTable() {
console.log(this.searchForm)
this.$refs.marketPeople.refreshTable()
},
//重置表格
resetTable() {
this.searchForm = {}
this.$refs.marketPeople.refreshTable()
},
// 跳转到营销SOP
createMarketSOP() {
util.openUrl(location.origin + '/marketing/sop/editSop')
createMarketSOP(id) {
util.openUrl(location.origin + `/marketing/sop/editSop?addOrEdit=add&fromPage=sopList&corwedId=${id}`)
},
expandClick(val) {
if (val == 'expand') {
......@@ -296,8 +300,9 @@ export default {
}
},
// 选择的人群
choickItem(idx) {
this.isActive = idx;
choickItem(idx, title) {
this.isActive = idx
this.showTitle = title
// 发送请求查询列表
},
setTableFinishFun() {
......@@ -366,7 +371,7 @@ export default {
font-size: 14px;
color: #999999;
line-height: 20px;
// min-height: 40px;
height: 40px;
}
.createSOP {
margin: 24px 0;
......
......@@ -124,7 +124,7 @@
<p class="clientNum">
{{ (topDataObj.purchaseCustomerNAddCount || 0) | overThousandFilter }}
<span class="personText">人</span>
<span class="numPro">占比:{{ topDataObj.purchaseCustomerNAddPercent | percentageDeal }}%</span>
<span class="numPro">占比:{{ topDataObj.purchaseCustomerNAddPercent | percentageDeal }}%</span>
</p>
<!-- <div class="marketingBtn">
智能营销
......@@ -180,7 +180,7 @@
{{ (topDataObj.purposeCustomerAddCount || 0) | overThousandFilter }}
<span class="personText">人</span>
<!-- <span class="numPro">占比:{{ (topDataObj.purposeCustomerAddPercent && topDataObj.purposeCustomerAddPercent.toFixed(2)) || 0 }}%</span> -->
<span class="numPro">占比:{{ topDataObj.purposeCustomerAddPercent | percentageDeal}}%</span>
<span class="numPro">占比:{{ topDataObj.purposeCustomerAddPercent | percentageDeal }}%</span>
</p>
<!-- <div class="marketingBtn">
<el-dropdown>
......@@ -284,10 +284,17 @@
</div>
</div>
<div class="middlemsg">
<span class="normalTitle" @click="goToGroupOperating()">客户分群</span>
<div class="settiongBox">
<span class="normalTitle">客户分群</span>
<div class="set">
<span>设置</span>
<i class="el-icon-arrow-right color-58"></i>
</div>
</div>
<div class="itembox">
<template v-for="(item, index) in titles">
<div class="item" @click="goto(item.id)" fn="人群客户列表" mode="div" :key="index">
<!-- fn="人群客户列表" mode="div" -->
<div class="item" @click="goToGroupOperating()" :key="index">
<div class="itemTitle">
<span class="itemName">{{ item.name }}</span>
<el-popover placement="top" trigger="hover" :content="item.subName">
......@@ -383,7 +390,7 @@ export default {
},
data() {
return {
crowdType:3,
crowdType: 3,
isCloseShowNumTag: false,
isReload: true,
isShowModal: false,
......@@ -519,6 +526,9 @@ export default {
this.getDataOverviewBarMapFun()
},
methods: {
goToGroupOperating() {
this.$router.push('/clientDataOverview/GroupOperating/marketingPeople')
},
goNextPage() {
// window.open('https://www.baidu.com', '_blank')
// this.dialogVisible = true
......@@ -716,7 +726,7 @@ export default {
goto(id) {
if (this.userType == 2) return
// this.$router.push('/clientDataOverview/group/' + id )
this.$router.push(`/clientDataOverview/group/${id}/${this.crowdType}` )
this.$router.push(`/clientDataOverview/group/${id}/${this.crowdType}`)
}
}
}
......@@ -1173,6 +1183,20 @@ export default {
min-width: 1050px;
background: #ffffff;
padding-bottom: 1px;
.settiongBox {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #e5e5e5;
.normalTitle {
border-bottom: none;
}
.set {
font-size: 16px;
color: #5850ff;
margin-right: 20px;
}
}
.itembox {
margin: 20px;
display: flex;
......
......@@ -258,7 +258,7 @@ export default {
{
label: '客户ID',
prop: 'oneId',
width: 180,
width:140,
line: 1
},
{
......@@ -272,7 +272,7 @@ export default {
label: '企微名称',
prop: 'nickNameList',
addHtml: 'nickNameList',
width: 190
width: 190,
},
{
label: '联系电话',
......@@ -289,7 +289,7 @@ export default {
label: '跟进员工',
prop: 'followStaff',
addHtml: 'followStaff',
width: 280
width: 320
},
{
label: '是否加企微', //1. 加入,0.未加入
......@@ -301,7 +301,7 @@ export default {
label: '当前状态',
prop: 'status',
addHtml: 'status',
width: 130
width: 120
},
{
label: '所属渠道',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!