Commit 0b4923bb by yangming

bug

1 parent 787d728c
...@@ -55,6 +55,16 @@ const exportAdd = params => { ...@@ -55,6 +55,16 @@ const exportAdd = params => {
sign: true sign: true
}) })
} }
const exportUpdate = params => {
params.method = 'entmicro.api.dracIm.exportUpdate'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const findById = params => { const findById = params => {
params.method = 'entmicro.api.dracIm.findById' params.method = 'entmicro.api.dracIm.findById'
params.sessionId = session params.sessionId = session
...@@ -123,6 +133,7 @@ export default { ...@@ -123,6 +133,7 @@ export default {
findAllByPage, findAllByPage,
dracImMessage, dracImMessage,
exportAdd, exportAdd,
exportUpdate,
findById, findById,
updateConfig, updateConfig,
findConfig, findConfig,
......
...@@ -84,6 +84,17 @@ const overview = params => { ...@@ -84,6 +84,17 @@ const overview = params => {
sign: true sign: true
}) })
} }
const findMessageStatic = params => {
params.method = 'entmicro.api.dracIm.findMessageStatic'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const viewChart = params => { const viewChart = params => {
params.method = 'entmicro.api.customer.view.chart' params.method = 'entmicro.api.customer.view.chart'
params.sessionId = session params.sessionId = session
...@@ -115,5 +126,6 @@ export default { ...@@ -115,5 +126,6 @@ export default {
dayTrend, dayTrend,
overview, overview,
viewChart, viewChart,
findMessageStatic,
findAllMessageByPage findAllMessageByPage
} }
\ No newline at end of file \ No newline at end of file

19.2 KB | W: | H:

18.7 KB | W: | H:

src/assets/img/marketing/phone.png
src/assets/img/marketing/phone.png
src/assets/img/marketing/phone.png
src/assets/img/marketing/phone.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<div class="square-main">
<el-dialog title="选择活动" :visible.sync="dialogVisible" width="70%" :before-close="handleClose">
<div class="model-panel">
<div class="model-panel-tab">
<label>活动类型:</label>
<el-tabs v-model="activeName" @tab-click="handleClick" type="card">
<el-tab-pane label="券营销" name="1"></el-tab-pane>
<el-tab-pane label="权益卡" name="2"></el-tab-pane>
</el-tabs>
</div>
<div class="model-item-panel" v-if="modelList.length > 0" v-loading="loading">
<div
class="model-item"
:class="{ checked: selectItem == item }"
v-for="(item, index) in modelList"
:key="index"
@click="handleSelectItem(item)"
>
<div class="model-item-title" v-show="activeName == 2">{{ item.cardClassName }}</div>
<div class="model-item-title" v-show="activeName == 1">{{ item.couponName }}</div>
<div class="model-item-content" v-show="activeName == 1">数量:{{ item.residueAmount }}</div>
<div class="model-item-content" v-show="activeName == 2">价格:{{ item.price }}</div>
<div
class="model-item-content"
v-show="activeName == 2 && item.effectiveType == 2"
>有效期:{{ item.effectiveNum }}天</div>
<div
class="model-item-content"
v-show="activeName == 2 && item.effectiveType == 1"
>有效期:无限制</div>
<div
class="model-item-content"
v-show="activeName == 1 && item.effectiveType == 2"
>有效期:{{ item.effectiveStartTime }}~{{ item.effectiveEndTime }}</div>
<div
class="model-item-content"
v-show="activeName == 1 && item.effectiveType == 1"
>有效期:{{ item.effectiveDays }}天</div>
<div
class="model-item-content"
v-show="activeName == 1 && item.effectiveType == 3"
>有效期:无限制</div>
<div
class="model-item-content"
v-show="activeName == 1"
>类型:{{ item.discountType == 1 ? '满减劵' : item.discountType == 2 ? '折扣券' : item.discountType == 3 ? '代金券' : item.discountType == 4 ? '实物券' : item.discountType == 5 ? '购车代金券' : item.discountType == 6 ? '商品折扣券' : item.discountType == 7 ? '会员服务' : '' }}</div>
<div class="model-item-content" v-show="activeName == 2">类型:权益卡</div>
</div>
</div>
<div class="model-item-empty" v-else v-loading="loading">
<img src="@/assets/img/empty.png" />
<div class="empty-item">暂无数据</div>
</div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="tableTotal"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'ActivityModel',
data() {
return {
dialogVisible: false,
loading: false,
activeName: '1',
modelList: [],
pageNum: 1,
pageSize: 10,
tableTotal: 0,
selectItem: {}
}
},
methods: {
handleSelectItem(item) {
this.selectItem = item
},
handleSelect() {
if (!this.selectItem.id) {
this.$message({
type: 'error',
message: '请选择活动'
})
return
}
this.dialogVisible = false
this.$emit('selectActivity', { marketingId: this.selectItem.id, marketingType: this.activeName, marketingName: this.activeName == 2 ? this.selectItem.cardClassName : this.selectItem.couponName })
},
handleSizeChange(val) {
this.pageSize = val
this.getModelList()
},
handleCurrentChange(val) {
this.pageNum = val
this.getModelList()
},
getModelList() {
this.modelList = []
this.loading = true
let market = ''
switch (this.activeName) {
case '1':
market = 'getMerchant'
break
case '2':
market = 'getCard'
break
}
let params = {
pageSize: this.pageSize,
pageNum: this.pageNum
}
this.$apis.marketing[market](params).then(res => {
this.modelList = res.list ? res.list : res.data
this.tableTotal = res.total
this.loading = false
})
},
init() {
this.dialogVisible = true
this.getModelList()
this.selectItem = {}
},
handleClick() {
this.getModelList()
}
}
}
</script>
<style lang="scss" scoped>
.model-panel {
.model-panel-tab {
display: flex;
align-items: center;
margin-bottom: 18px;
label {
font-size: 16px;
font-weight: 400;
color: #000000;
line-height: 24px;
}
/deep/ {
.el-checkbox:last-of-type {
margin-right: 8px;
}
.el-tabs__nav {
border: 0;
}
.el-tabs__header {
border: 0;
background-color: #f4f6fc;
margin: 0px;
}
.el-tabs__item {
border: none;
width: 180px;
height: 32px;
line-height: 32px;
margin: 2px;
text-align: center;
}
.el-tabs__item.is-active {
background-color: #fff;
border-radius: 4px;
}
}
}
.model-item-empty {
> img {
display: block;
margin: 50px auto 0px;
width: 60px;
height: auto;
}
.empty-item {
text-align: center;
font-size: 14px;
font-weight: 400;
color: #000000;
line-height: 22px;
margin-bottom: 30px;
}
}
.model-item-panel {
display: grid;
grid-template-columns: repeat(4, 25%);
grid-row-gap: 10px;
height: 40vh;
overflow: auto;
.model-item {
position: relative;
height: 128px;
background: #ffffff;
border-radius: 4px;
border: 2px solid #e6e6e6;
padding: 14px 24px;
box-sizing: border-box;
margin-right: 10px;
&:nth-child(4n) {
margin-right: 0px;
}
&.checked {
border: 2px solid #5850ff;
}
&-qrcode {
position: absolute;
right: 10px;
bottom: 10px;
width: 60px;
height: 60px;
border: 1px solid #979797;
}
&-title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
margin-bottom: 5px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
&-content {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
margin-top: 6px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="img-bg">
<div class="preview-content">
<div class="preview-time">{{ currentTime }}</div>
<div class="preview-info" v-for="item in previewList" :key="item.id">
<img class="avatar" src="@/assets/img/guestCustom/logo.png" alt />
<template v-if="item.attType == 1">
<div class="preview-text text">{{ item.attContent }}</div>
</template>
<template v-else-if="item.attType == 7">
<div class="preview-activity">
<img class="applet-logo" src="@/assets/img/guestCustom/applet-logo.png" alt />
<div class="activity-name">{{item.attContent.marketingName}}</div>
<img class="activity-logo" src="@/assets/img/guestCustom/activity-logo.png" alt />
<div class="activity-footer">
<img src="@/assets/img/guestCustom/applet-footer.png" alt />
</div>
</div>
<!-- <div class="preview-text preview-link">
{{ item.attContent.url }}
<img src="@/assets/guestCustom/preview-link.png" alt />
</div>-->
</template>
<template v-else-if="item.attType == 2">
<el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image>
</template>
<template v-else-if="item.attType == 3">
<!-- <el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image> -->
<video style="width: 100px" :src="item.attContent"></video>
</template>
<template v-else-if="item.attType == 5">
<div class="preview-text text preview-applet">
<div class="preview-applet-title">
<img :src="item.attContent.picUrl" alt />
<span>{{ item.attContent.title }}</span>
</div>
{{ item.attContent.page }}
</div>
</template>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'Preview',
props: { eventBus: Object, list: Array },
data() {
return {
previewList: [],
currentTime: ''
}
},
created() {
this.$nextTick(() => {
console.log(1, this.list)
})
this.eventBus.$on('update', val => {
console.log(val)
this.previewList = val
})
},
mounted() {
const date = new Date()
let hours = date.getHours()
hours = hours < 10 ? `0${hours}` : hours
let minutes = date.getMinutes()
minutes = minutes < 10 ? `0${minutes}` : minutes
this.currentTime = `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日 ${hours}:${minutes}`
}
}
</script>
<style lang="scss" scope>
.img-bg {
position: relative;
width: 290px;
height: 566px;
background-image: url(../../../assets/img/guestCustom/iphone-bg.png);
background-size: 100%;
.preview-content {
position: absolute;
width: 250px;
height: 350px;
overflow-y: auto;
top: 115px;
left: 20px;
// background-color: cornflowerblue;
.preview-time {
font-size: 10px;
color: #999;
text-align: center;
margin-bottom: 15px;
}
.preview-info {
display: flex;
padding: 0 44px 20px 9px;
.avatar {
width: 26px;
height: 26px;
margin-right: 8px;
}
.preview-text {
position: relative;
max-width: 169px;
color: #333;
background-color: #fff;
border-radius: 4px;
word-wrap: break-word;
}
.text {
font-size: 16px;
padding: 8px 11px;
}
.preview-link {
display: inline-flex;
word-break: break-all;
font-size: 14px;
padding: 8px 8px 8px 11px;
img {
width: 34px;
height: 34px;
margin-left: 10px;
}
}
.preview-text::before {
content: '';
position: absolute;
left: -10px;
top: 20%;
border-width: 5px;
border-style: dashed solid dashed dashed;
border-color: transparent #fff transparent transparent;
// background-color: cornflowerblue;
}
.preview-applet {
img {
width: 20px;
height: 20px;
margin-right: 4px;
}
&-title {
display: flex;
align-self: center;
color: #999;
margin-bottom: 5px;
}
}
.preview-activity {
width: 160px;
// height: 184px;
background-color: #fff;
border-radius: 4px;
border: 1px solid #dce1e5;
padding: 7px 7px 0;
.activity-name {
font-size: 12px;
color: #333;
margin: 7px 0 4px;
width: 160px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.applet-logo {
width: 95px;
height: 24px;
}
.activity-footer {
margin-top: 4px;
border-top: 1px solid #edeff3;
}
}
}
}
}
</style>
...@@ -39,14 +39,14 @@ const staticRoutes = Object.freeze([{ ...@@ -39,14 +39,14 @@ const staticRoutes = Object.freeze([{
component: resolve => require([`@/views/square/drainage.vue`], resolve), component: resolve => require([`@/views/square/drainage.vue`], resolve),
meta: {} meta: {}
}, { }, {
name: 'marketing', name: 'market',
path: '/marketing/index', path: '/market/index',
component: resolve => require([`@/views/marketing/index.vue`], resolve), component: resolve => require([`@/views/market/index.vue`], resolve),
meta: {} meta: {}
}, { }, {
name: 'config', name: 'config',
path: '/marketing/config/:id?', path: '/market/config/:id?',
component: resolve => require([`@/views/marketing/config.vue`], resolve), component: resolve => require([`@/views/market/config.vue`], resolve),
meta: {} meta: {}
}, { }, {
name: 'overview', name: 'overview',
......
...@@ -87,9 +87,8 @@ ...@@ -87,9 +87,8 @@
width: footerWidth + 'px' width: footerWidth + 'px'
}" }"
> >
<el-button type="primary" @click="goback">返回</el-button>
<el-button type="primary" @click="handleSave">提交</el-button>
<el-button type="primary" @click="goback">取消</el-button> <el-button type="primary" @click="goback">取消</el-button>
<el-button type="primary" @click="handleSave">提交</el-button>
</div> </div>
<select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp> <select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp>
<select-tag ref="selectTagForm" @tagSelected="tagSelected"></select-tag> <select-tag ref="selectTagForm" @tagSelected="tagSelected"></select-tag>
...@@ -101,7 +100,7 @@ import { utils } from 'glsx-common' ...@@ -101,7 +100,7 @@ import { utils } from 'glsx-common'
import Vue from 'vue' import Vue from 'vue'
import selectEmp from '@/components/selectEmp' import selectEmp from '@/components/selectEmp'
import selectTag from '@/components/selectTag' import selectTag from '@/components/selectTag'
import welcomeWords from './components/welcomeWords.vue' import welcomeWords from '@/components/welcome/welcomeWords.vue'
export default { export default {
name: 'addCode', name: 'addCode',
components: { welcomeWords, selectEmp, selectTag }, components: { welcomeWords, selectEmp, selectTag },
...@@ -189,8 +188,16 @@ export default { ...@@ -189,8 +188,16 @@ export default {
delete param.staffInfo delete param.staffInfo
param.staffId = staffId.join(',') param.staffId = staffId.join(',')
param.autoAdd ? (param.autoAdd = 1) : (param.autoAdd = 0) param.autoAdd ? (param.autoAdd = 1) : (param.autoAdd = 0)
const previewList = this.$refs.welcome.previewList const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
param.welcomeInfo = previewList const attachmentList = previewList.map(item => {
if (item.attType == 1) {
item.attContent = item.attContent.replace('@昵称', '[@昵称]')
} else if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
return item
})
param.welcomeInfo = attachmentList
this.$apis.channel[channel](param).then(res => { this.$apis.channel[channel](param).then(res => {
if (res) this.$router.push('/channel/index') if (res) this.$router.push('/channel/index')
}) })
...@@ -208,7 +215,11 @@ export default { ...@@ -208,7 +215,11 @@ export default {
this.staffInfo = res.staffInfo this.staffInfo = res.staffInfo
this.tagging = eval(res.tagging) this.tagging = eval(res.tagging)
this.autoWelcome = res.autoWelcome ? true : false this.autoWelcome = res.autoWelcome ? true : false
this.$refs.welcome.updateList(res.welcomeInfo) const previewList = res.welcomeInfo.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
return item
})
this.$refs.welcome.updateList(previewList)
}) })
} }
}, },
......
...@@ -85,7 +85,7 @@ export default { ...@@ -85,7 +85,7 @@ export default {
addHtml: 'codeRemark' addHtml: 'codeRemark'
}, },
{ {
label: '昨日新增客户数', label: '今日新增客户数',
prop: 'yesterdayNum', prop: 'yesterdayNum',
width: '120px' width: '120px'
}, },
......
<template> <template>
<div class="channel-main scrm-box-f"> <div class="channel-main scrm-box-f">
<div class="scrm-flex"> <div class="scrm-flex">
<el-radio-group v-model="timeRadio" size="mini"> <el-radio-group v-model="timeRadio" size="mini" @change="handleTab">
<el-radio-button label="1">昨天</el-radio-button> <el-radio-button label="1">今天</el-radio-button>
<el-radio-button label="2">近1周</el-radio-button> <el-radio-button label="2">近1周</el-radio-button>
<el-radio-button label="3">近2周</el-radio-button> <el-radio-button label="3">近2周</el-radio-button>
<el-radio-button label="4">近1个月</el-radio-button> <el-radio-button label="4">近1个月</el-radio-button>
</el-radio-group> </el-radio-group>
<el-form :inline="true" :model="tableSearchForm" class="follow-form-item" label-width="80px"> <el-form :inline="true" :model="tableSearchForm" class="follow-form-item" label-width="80px">
<el-form-item size="small" label="添加时间"> <el-form-item size="small" label="添加时间">
<el-date-picker v-model="tableSearchForm.time" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> <el-date-picker :picker-options="pickerOptions" value-format="yyyy-MM-dd" v-model="createTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item size="small" label="渠道名称"> <el-form-item size="small" label="渠道名称">
<el-input size="small" v-model="tableSearchForm.keyWord" placeholder="请输入渠道名称"></el-input> <el-input size="small" v-model="tableSearchForm.keyWord" placeholder="请输入渠道名称"></el-input>
...@@ -23,21 +23,21 @@ ...@@ -23,21 +23,21 @@
<div class="channel-chart-box"> <div class="channel-chart-box">
<div class="channel-chart-title">新增客户走势</div> <div class="channel-chart-title">新增客户走势</div>
<div class="channel-chart-container"> <div class="channel-chart-container">
<linechart ref="channelLine"></linechart> <linechart ref="channelLine" :colorList="colorList"></linechart>
</div> </div>
</div> </div>
<div class="channel-chart-desc"> <div class="channel-chart-desc">
<div class="chart-desc"> <div class="chart-desc">
<div class="chart-desc-title"> <div class="chart-desc-title">
<div class="chart-title-time">昨日</div> <div class="chart-title-time">{{timeRadio==1?'今天':timeRadio==2?'近1周':timeRadio==3?'近2周':timeRadio==4?'近1个月':startTime+'-'+endTime}}</div>
<div class="chart-title-num">各渠道新增客户数</div> <div class="chart-title-num">各渠道新增客户数</div>
</div> </div>
<div class="chart-desc-item" v-for="(item, index) in channel" :key="index"> <div class="chart-desc-item" v-for="(item, index) in codeIds" :key="index">
<div class="chart-item-title"> <div class="chart-item-title">
<span>-</span> <span :style="{color: colorList[index]}">—</span>
{{ item.codeName }} {{ item.codeName }}
</div> </div>
<div class="chart-item-num">{{ item.newlyCount }}</div> <div class="chart-item-num">{{ item.totalNum }}</div>
</div> </div>
</div> </div>
<div> <div>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</div> </div>
</div> </div>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch"></GLTable> <GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch"></GLTable>
<select-channel ref="channelForm" @selectTable="selectTable"></select-channel> <select-channel :colorList="colorList" ref="channelForm" @selectTable="selectTable"></select-channel>
</div> </div>
</template> </template>
...@@ -65,7 +65,13 @@ export default { ...@@ -65,7 +65,13 @@ export default {
return { return {
timeRadio: 1, timeRadio: 1,
trendType: 1, trendType: 1,
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
},
channel: [], channel: [],
createTime: [],
tableSearchForm: {}, tableSearchForm: {},
tableParams: { tableParams: {
listName: 'data', listName: 'data',
...@@ -95,28 +101,36 @@ export default { ...@@ -95,28 +101,36 @@ export default {
tableTotal: 0, tableTotal: 0,
startTime: '', startTime: '',
endTime: '', endTime: '',
selectItem: [] selectItem: [],
codeIds: [],
colorList: ['#5850FF','#2CCA74','#EB4E4E','#FF6D00','#F8C900','#2CCAC4','#E74EEB','#6F2828']
} }
}, },
watch: { watch: {
timeRadio() { createTime(value) {
this.trendType = this.timeRadio if (value) {
this.startTime = value[0]
this.endTime = value[1]
this.timeRadio = null
this.trendType = null
} else {
this.startTime = ''
this.endTime = ''
this.timeRadio = 1
this.trendType = 1
}
this.codeTrend()
} }
}, },
methods: { methods: {
handleSearch() { handleTab() {
this.getListChannel() this.trendType = this.timeRadio
this.codeSearch(); this.startTime = ''
this.getFollower(); this.endTime = ''
this.codeTrend()
}, },
getListChannel() { handleSearch() {
this.$apis.overview.codeDefault({}).then(res => { this.codeSearch()
console.log(res)
this.selectItem = res
this.selectItem.forEach(item => {
this.codeTrend(item.codeId)
})
})
}, },
codeSearch() { codeSearch() {
var params = { var params = {
...@@ -132,37 +146,58 @@ export default { ...@@ -132,37 +146,58 @@ export default {
this.tableTotal = res.count this.tableTotal = res.count
}) })
}, },
codeTrend(codeIds,codeName) { codeTrend() {
this.$apis.overview.codeTrend({ codeIds }).then(res => { let codeIds = this.codeIds.map(item => {
this.$refs.channelLine.init(res,codeName) return item.codeState
})
let codeName = this.codeIds.map(item => {
return item.codeName
})
const { trendType, startTime, endTime } = this
let params = {
codeIds,
trendType: trendType?trendType:null,
startTime,
endTime
}
this.$apis.overview.codeTrend(params).then(res => {
this.$refs.channelLine.init(res, codeName)
}) })
}, },
selectTable(item) { selectTable(value) {
console.log(item) this.codeIds = value.map(item => {
return {
codeState: item.codeState,
codeName: item.codeName,
totalNum: item.totalNum
}
})
this.codeTrend()
}, },
handleChannel() { handleChannel() {
this.$refs.channelForm.init() this.$refs.channelForm.init(this.codeIds)
}, },
getFollower() { getFollower() {
var params = { var params = {
pageSize: 8, pageSize: 8,
pageNum: 1, pageNum: 1
}; }
this.$apis.channel.listChannelCodeByPage(params).then((res) => { this.$apis.channel.listChannelCodeByPage(params).then(res => {
this.channel = res.data; this.channel = res.data
let codeId = []; this.codeIds = this.channel.map(item => {
let codeName = []; return {
this.channel.forEach(item=>{ codeState: item.codeState,
codeId.push(item.codeState) codeName: item.codeName,
codeName.push(item.codeName) totalNum: item.totalNum
}
}) })
this.codeTrend(codeId,codeName) this.codeTrend()
}); })
}, }
}, },
mounted() { mounted() {
this.getListChannel() this.codeSearch()
this.getFollower(); this.getFollower()
} }
} }
</script> </script>
......
<template> <template>
<div id="channel-main" class="chart-line"></div> <div>
<div id="channel-main" class="chart-line" ref="line" v-show="lineStatus"></div>
<div class="chart-line-empty" v-show="!lineStatus">
<img src="@/assets/img/empty.png" />
<div class="chart-empty-d">暂无数据</div>
</div>
</div>
</template> </template>
<script> <script>
import * as echarts from 'echarts' import * as echarts from 'echarts'
export default { export default {
name: 'linechart', name: 'line',
data() { data() {
return {} return {
lineStatus: true
}
},
props: {
colorList: {
type: Array
}
}, },
methods: { methods: {
init(chartList,codeName) { init(chartList, codeName) {
let time = chartList[0].trendItemList.map(item => { let time = chartList[0].trendItemList.map(item => {
return item.dayTime return item.dayTime
}) })
let seriesList = chartList.map((item,index) => { let seriesList = chartList.map((item, index) => {
let newlyQyCount = [] let newlyQyCount = []
item.trendItemList.forEach(i => { item.trendItemList.forEach(i => {
newlyQyCount.push(i.newlyQyCount) newlyQyCount.push(i.newlyQyCount)
...@@ -27,17 +39,19 @@ export default { ...@@ -27,17 +39,19 @@ export default {
data: newlyQyCount data: newlyQyCount
} }
}) })
echarts.init(document.getElementById('channel-main')).clear()
let chartDom = document.getElementById('channel-main') let chartDom = document.getElementById('channel-main')
let myChart = echarts.init(chartDom) let myChart = echarts.init(chartDom)
let option let option = {
option = {
legend: { legend: {
left: 'auto', left: 'auto',
icon: 'stack', icon: 'stack',
itemHeight: 2, itemHeight: 2,
textStyle: { color: ['#5850FF', '#FF6D00'] }, itemWidth: 12,
itemWidth: 12 color: this.colorList
},
tooltip: {
trigger: 'axis'
}, },
grid: { grid: {
left: '3%', left: '3%',
...@@ -51,12 +65,21 @@ export default { ...@@ -51,12 +65,21 @@ export default {
data: time data: time
}, },
yAxis: { yAxis: {
type: 'value' type: 'value',
minInterval: 1
}, },
series: seriesList series: seriesList
} }
myChart.setOption(option)
option && myChart.setOption(option) let dataList = []
seriesList.forEach(item=>{
dataList = dataList.concat(item.data)
})
if(dataList.every(item => item == 0)) {
this.lineStatus = false
}else {
this.lineStatus = true
}
} }
} }
} }
...@@ -66,4 +89,13 @@ export default { ...@@ -66,4 +89,13 @@ export default {
.chart-line { .chart-line {
height: 300px; height: 300px;
} }
.chart-line-empty {
height: 300px;
text-align: center;
img {
margin-top: 100px;
width: 64px;
height: 32px;
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="square-main"> <div class="square-main">
<el-dialog <el-dialog title="选择渠道" :visible.sync="dialogVisible" width="70%" :before-close="handleClose">
title="选择渠道" <div class="square-tabel">
:visible.sync="dialogVisible" <div class="square-tabel-select">
width="50%" <GLTable ref="table" :hasPage="false" :tableData="tableData" :tableTotal="tableTotal" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"></GLTable>
:before-close="handleClose" </div>
> <div class="square-tabel-selected">
<GLTable <div class="selected-title">已选渠道</div>
ref="table" <div class="selected-panel">
:layout="layout" <div class="selected-item" v-for="(item, index) in selectedList" :key="index">
:tableData="tableData" <div><span :style="{color: colorList[index]}">—</span>
:tableTotal="tableTotal" {{ item.codeName }}
:pageConf="pageConf" </div>
:tableParams="tableParams" <img src="@/assets/img/channel/del.png" @click="delTag(item)" />
@refreshTable="handleSearch" </div>
@selectionTable="selectionTable" </div>
> </div>
</GLTable> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button> <el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button> <el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
...@@ -26,72 +26,132 @@ ...@@ -26,72 +26,132 @@
</template> </template>
<script> <script>
import { utils } from 'glsx-common'
export default { export default {
name: "selectEmp", name: 'selectEmp',
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
tableSearchForm: {}, tableSearchForm: {},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "total" },
tableParams: { tableParams: {
listName: "data", listName: 'data',
tableOption: false, tableOption: false,
// 行数据的key // 行数据的key
mutiSelectUniqueKey: "id", mutiSelectUniqueKey: 'id',
// 多选ref的名称 // 多选ref的名称
mutiSelectName: "salelist", mutiSelectName: 'salelist',
tableColumns: [ tableColumns: [
{ {
label: "渠道名称", label: '渠道名称',
prop: "codeName", prop: 'codeName'
}, },
{ {
label: "备注", label: '备注',
prop: "codeRemark", prop: 'codeRemark'
} }
], ]
}, },
layout: "sizes, prev, pager, next, jumper, ->, total",
tableData: [], tableData: [],
tableTotal: 0, tableTotal: 0,
selectItem: [], selectItem: [],
}; selectCode: [],
selectedList: []
}
},
props: {
colorList: {
type: Array
}
}, },
methods: { methods: {
getFollower() { getFollower() {
var params = { var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)), pageSize: 1000,
pageSize: this.$refs.table.page.pageSize, pageNum: 1
pageNum: this.$refs.table.page.pageNum, }
}; this.$apis.channel.listChannelCodeByPage(params).then(res => {
this.$apis.channel.listChannelCodeByPage(params).then((res) => { console.log(res)
console.log(res); this.tableData = res.data
this.tableData = res.data; this.tableTotal = res.count
this.tableTotal = res.count; this.tableData.forEach(item => {
}); this.selectCode.forEach((itm, index) => {
if (itm.codeState == item.codeState) {
this.$refs.table.$refs.salelistMutiTable.toggleRowSelection(item)
}
})
})
})
}, },
init() { init(codeId) {
this.dialogVisible = true; this.selectCode = JSON.parse(JSON.stringify(codeId))
this.selectedList = []
this.dialogVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.getFollower(); this.getFollower()
}); })
}, },
handleSearch() { handleSearch() {
this.getFollower(); this.getFollower()
}, },
selectionTable(val) { selectionTable(val) {
this.selectItem = val; this.selectedList = val
}, },
handleSelect() { delTag(item) {
this.dialogVisible = false; this.$refs.table.$refs.salelistMutiTable.toggleRowSelection(item)
this.$emit("selectTable", this.selectItem);
}, },
}, handleSelect: utils.debounce(function () {
}; if (this.selectedList.length == 0) {
this.$message.error('请选择渠道')
return
}
if (this.selectedList.length > 8) {
this.$message.error('最多选择8个渠道数据')
return
}
this.dialogVisible = false
this.$emit('selectTable', this.selectedList)
this.$refs.table.$refs.salelistMutiTable.clearSelection()
}, 300)
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.square-main { .square-main {
.square-tabel {
display: flex;
&-select {
flex: 1;
}
&-selected {
width: 320px;
margin-left: 20px;
.selected-title {
background: #f4f6fc;
color: #333333;
line-height: 20px;
padding: 16px 20px;
font-weight: 600;
}
.selected-panel {
padding: 0px 20px;
.selected-item {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 30px;
display: flex;
align-items: center;
justify-content: space-between;
img {
width: 16px;
height: 16px;
cursor: pointer;
}
}
}
}
}
/deep/ { /deep/ {
.el-table { .el-table {
height: 50vh; height: 50vh;
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<el-tab-pane label="渠道码列表" name="first"></el-tab-pane> <el-tab-pane label="渠道码列表" name="first"></el-tab-pane>
<el-tab-pane label="数据统计" name="second"></el-tab-pane> <el-tab-pane label="数据统计" name="second"></el-tab-pane>
</el-tabs> </el-tabs>
<channel-list v-show="activeName == 'first'"></channel-list> <channel-list v-if="activeName == 'first'"></channel-list>
<channel-statistics v-show="activeName == 'second'"></channel-statistics> <channel-statistics v-if="activeName == 'second'"></channel-statistics>
</div> </div>
</template> </template>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="channel-main scrm-box-f" v-loading="loading"> <div class="channel-main scrm-box-f" v-loading="loading">
<div class="channel-header"> <div class="channel-header">
<el-button type="primary" size="small" @click="goBack">返回</el-button> <el-button type="primary" size="small" @click="goBack">返回</el-button>
<el-upload class="image-uploader" :before-upload="upLoadImg"> <el-upload action='#' class="image-uploader" :before-upload="upLoadImg">
<el-button type="primary" size="small">创建活码海报</el-button> <el-button type="primary" size="small">创建活码海报</el-button>
</el-upload> </el-upload>
</div> </div>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<div class="poster-item-link" @click="downloadIamge(item.autoUrl)">下载海报</div> <div class="poster-item-link" @click="downloadIamge(item.autoUrl)">下载海报</div>
</div> </div>
</div> </div>
<el-dialog title="创建活码海报" :visible.sync="dialogVisible" width="50%" :before-close="handleClose"> <el-dialog v-loading="loadingDrag" title="创建活码海报" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<div class="poster-draggable-title">拖动活码可调整活码位置</div> <div class="poster-draggable-title">拖动活码可调整活码位置</div>
<div class="poster-draggable"> <div class="poster-draggable">
<div <div
...@@ -76,6 +76,7 @@ export default { ...@@ -76,6 +76,7 @@ export default {
data() { data() {
return { return {
loading: false, loading: false,
loadingDrag: false,
dialogVisible: false, dialogVisible: false,
posterList: [], posterList: [],
img_url: '', img_url: '',
...@@ -86,6 +87,8 @@ export default { ...@@ -86,6 +87,8 @@ export default {
y: 0, y: 0,
width: 50, width: 50,
height: 50, height: 50,
backHeight: 0,
backWidth: 0,
backUrl: '', backUrl: '',
codeUrl: '' codeUrl: ''
} }
...@@ -184,7 +187,8 @@ export default { ...@@ -184,7 +187,8 @@ export default {
this.height = height this.height = height
}, },
savePoster() { savePoster() {
let { x, y, width, height, backUrl, codeUrl, id } = this this.loadingDrag = true;
let { x, y, width, height, backUrl, codeUrl, id ,dragHeight} = this
let params = { let params = {
x, x,
y, y,
...@@ -192,7 +196,9 @@ export default { ...@@ -192,7 +196,9 @@ export default {
width, width,
height, height,
backUrl, backUrl,
codeUrl codeUrl,
backWidth: 375,
backHeight: parseInt(dragHeight)
} }
let code let code
if (id) { if (id) {
...@@ -220,6 +226,7 @@ export default { ...@@ -220,6 +226,7 @@ export default {
let img = new Image() let img = new Image()
img.src = backUrl img.src = backUrl
this.loadingImg = true this.loadingImg = true
this.loadingDrag = false
img.onload = function () { img.onload = function () {
if (img.width > img.height) { if (img.width > img.height) {
item.imgWidth = 280 item.imgWidth = 280
...@@ -239,7 +246,7 @@ export default { ...@@ -239,7 +246,7 @@ export default {
img.src = img_url img.src = img_url
let self = this let self = this
img.onload = function () { img.onload = function () {
self.dragHeight = (img.height * 300) / img.width self.dragHeight = (img.height * 375) / img.width
self.dialogVisible = true self.dialogVisible = true
self.loading = false self.loading = false
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="channel-main scrm-box-f"> <div class="channel-main scrm-box-f">
<div><el-button type="primary" size="small" @click="goback">返回</el-button></div> <div><el-button type="primary" size="small" @click="goback">返回</el-button></div>
<div class="detail-form"> <div class="detail-form">
<el-form :inline="true" :model="detailCodeForm" label-width="120px"> <el-form :model="detailCodeForm" label-width="120px">
<el-row> <el-row>
<el-form-item size="small" label="渠道名称:">{{ detailCodeForm.codeName }}</el-form-item> <el-form-item size="small" label="渠道名称:">{{ detailCodeForm.codeName }}</el-form-item>
</el-row> </el-row>
...@@ -30,13 +30,13 @@ ...@@ -30,13 +30,13 @@
</el-form> </el-form>
<div class="count-panel"> <div class="count-panel">
<div class="count-panel-item"> <div class="count-panel-item">
<div class="count-item-title">昨日新增客户</div> <div class="count-item-title">今日新增客户</div>
<div class="count-item-num">{{ totalNum.newlyTotalCount }}人</div> <div class="count-item-num">{{ detailCodeForm.yesTodayAddCount }}人</div>
<img src="@/assets/img/channel/count3.png" class="count-item-icon" /> <img src="@/assets/img/channel/count3.png" class="count-item-icon" />
</div> </div>
<div class="count-panel-item"> <div class="count-panel-item">
<div class="count-item-title">总新增客户</div> <div class="count-item-title">总新增客户</div>
<div class="count-item-num">{{ totalNum.todayNewlyCount }}人</div> <div class="count-item-num">{{ detailCodeForm.newlyCount }}人</div>
<img src="@/assets/img/channel/count2.png" class="count-item-icon" /> <img src="@/assets/img/channel/count2.png" class="count-item-icon" />
</div> </div>
<div class="count-panel-item"> <div class="count-panel-item">
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover> </el-popover>
</div> </div>
<div class="count-item-num">{{ totalNum.keepTotalCount }}人</div> <div class="count-item-num">{{ detailCodeForm.newlyKeepCount }}人</div>
<img src="@/assets/img/channel/count1.png" class="count-item-icon" /> <img src="@/assets/img/channel/count1.png" class="count-item-icon" />
</div> </div>
</div> </div>
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
<el-tab-pane label="按日期查看" name="1"></el-tab-pane> <el-tab-pane label="按日期查看" name="1"></el-tab-pane>
<el-tab-pane label="按成员查看" name="2"></el-tab-pane> <el-tab-pane label="按成员查看" name="2"></el-tab-pane>
</el-tabs> </el-tabs>
<GLTable v-show="activeName == 1" ref="timeTable" :getListApi="getTimeApi" :tableParams="tableParams" :pageConf="pageConf" :hasNum="false"></GLTable> <GLTable v-show="activeName == 1" ref="timeTable" :tableData="getTimeApi" :tableParams="tableParams" :hasNum="false" :hasPage="false"></GLTable>
<GLTable v-show="activeName == 2" ref="memberTabel" :getListApi="getMemberApi" :tableParams="tableMemberParams" :pageConf="pageMemberConf" :hasNum="false"></GLTable> <GLTable v-show="activeName == 2" @refreshTable="listStaff" :layout="layout" :tableTotal="tableTotal" ref="memberTabel" :tableData="getMemberApi" :tableParams="tableMemberParams" :pageConf="pageMemberConf" :hasNum="false"></GLTable>
</div> </div>
</template> </template>
...@@ -65,12 +65,11 @@ export default { ...@@ -65,12 +65,11 @@ export default {
name: 'store', name: 'store',
data() { data() {
return { return {
totalNum: {},
activeName: '1', activeName: '1',
detailCodeForm: {}, detailCodeForm: {},
tableSearchForm: {}, tableSearchForm: {},
getMemberApi: this.$apis.overview.listStaff, getMemberApi: [],
getTimeApi: this.$apis.overview.listTime, getTimeApi: [],
tableParams: { tableParams: {
listName: 'data', listName: 'data',
tableOption: false, tableOption: false,
...@@ -111,14 +110,11 @@ export default { ...@@ -111,14 +110,11 @@ export default {
} }
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
pageMemberConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }, pageMemberConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
layout: 'sizes, prev, pager, next, jumper, ->, total',
tagging: [], tagging: [],
baseData: { tableTotal: 0,
allMerchantList: [], codeId: ''
roleList: [],
staffStatusList: []
}
} }
}, },
methods: { methods: {
...@@ -135,16 +131,31 @@ export default { ...@@ -135,16 +131,31 @@ export default {
this.tagging = eval('(' + res.tagging + ')') this.tagging = eval('(' + res.tagging + ')')
}) })
}, },
detailTotal(codeId) { listTime(codeId) {
this.$apis.overview.detailTotal({ codeId }).then(res => { this.$apis.overview.listTime({ codeId }).then(res => {
this.totalNum = res this.getTimeApi = res
})
},
beforeSearchFn() {},
listStaff() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.memberTabel.page.pageSize,
pageNum: this.$refs.memberTabel.page.pageNum,
codeId: this.codeId
}
this.$apis.overview.listStaff(params).then(res => {
this.getMemberApi = res.data;
this.tableTotal = res.count
}) })
} }
}, },
mounted() { mounted() {
const { id, codeUuid } = this.$route.params const { id, codeUuid } = this.$route.params
this.codeId = id;
this.detailChannelCode(id, codeUuid) this.detailChannelCode(id, codeUuid)
this.detailTotal() this.listTime(id)
this.listStaff()
} }
} }
</script> </script>
...@@ -159,6 +170,7 @@ export default { ...@@ -159,6 +170,7 @@ export default {
margin-top: 10px; margin-top: 10px;
.form-row { .form-row {
display: flex; display: flex;
flex-wrap: wrap;
margin-top: 5px; margin-top: 5px;
.tag-item { .tag-item {
display: inline-block; display: inline-block;
......
...@@ -139,9 +139,9 @@ ...@@ -139,9 +139,9 @@
<div class="drainage-wrap scrm-box-f"> <div class="drainage-wrap scrm-box-f">
<div class="drainage-title">营销配置</div> <div class="drainage-title">营销配置</div>
<div class="drainage-form"> <div class="drainage-form">
<div class="drainage-form-item" v-if="editStatus"> <div class="drainage-form-item el-form-item is-required" v-if="editStatus">
<label>跟进员工</label> <label class="el-form-item__label">跟进员工</label>
<div> <div style="position: relative">
<el-button size="small" @click="handleAddEmp"> <el-button size="small" @click="handleAddEmp">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
选择跟进专员 选择跟进专员
...@@ -152,6 +152,7 @@ ...@@ -152,6 +152,7 @@
{{ tag.staffName }} {{ tag.staffName }}
</el-tag> </el-tag>
</div> </div>
<div class="el-form-item__error" v-if="imNameStatus">请选择跟进专员</div>
</div> </div>
</div> </div>
<div class="drainage-form-item" v-else> <div class="drainage-form-item" v-else>
...@@ -172,7 +173,7 @@ ...@@ -172,7 +173,7 @@
}" }"
> >
<el-button type="primary" @click="goback" v-if="configType">返回</el-button> <el-button type="primary" @click="goback" v-if="configType">返回</el-button>
<el-button type="primary" @click="handleCancel">取消</el-button> <el-button type="primary" @click="handleCancel" v-if="!configType">取消</el-button>
<el-button type="primary" @click="handleSave">确定</el-button> <el-button type="primary" @click="handleSave">确定</el-button>
</div> </div>
<select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp> <select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp>
...@@ -188,6 +189,7 @@ export default { ...@@ -188,6 +189,7 @@ export default {
}, },
data() { data() {
return { return {
imNameStatus: false,
noStatus: false, noStatus: false,
editStatus: false, editStatus: false,
configType: false, configType: false,
...@@ -238,12 +240,17 @@ export default { ...@@ -238,12 +240,17 @@ export default {
}) })
}, },
handleAddEmp() { handleAddEmp() {
this.imNameStatus = false;
this.$refs.selectEmpForm.init(this.staffIds) this.$refs.selectEmpForm.init(this.staffIds)
}, },
handleCancel() { handleCancel() {
this.init() this.init()
}, },
handleSave() { handleSave() {
if(this.editStatus && this.staffIds && this.staffIds.length == 0) {
this.imNameStatus = true;
return
}
let params = { let params = {
configType: this.configType ? 2 : 1, configType: this.configType ? 2 : 1,
id: this.configItem.id, id: this.configItem.id,
...@@ -336,6 +343,7 @@ export default { ...@@ -336,6 +343,7 @@ export default {
margin-right: 20px; margin-right: 20px;
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
font-size: 16px;
} }
} }
.drainage-emp { .drainage-emp {
......
<template>
<div class="square-main">
<el-dialog title="选择活动" :visible.sync="dialogVisible" width="70%" :before-close="handleClose">
<div class="model-panel">
<div class="model-panel-tab">
<label>活动类型:</label>
<el-tabs v-model="activeName" @tab-click="handleClick" type="card">
<el-tab-pane label="券营销" name="1"></el-tab-pane>
<el-tab-pane label="权益卡" name="2"></el-tab-pane>
</el-tabs>
</div>
<div class="model-item-panel" v-if="modelList.length > 0" v-loading="loading">
<div class="model-item" :class="{ checked: selectItem == item }" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)">
<div class="model-item-title" v-show="activeName == 2">
{{ item.cardClassName }}
</div>
<div class="model-item-title" v-show="activeName == 1">
{{ item.couponName }}
</div>
<div class="model-item-content" v-show="activeName == 1">数量:{{ item.residueAmount }}</div>
<div class="model-item-content" v-show="activeName == 2">价格:{{ item.price }}</div>
<div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 2">有效期:{{ item.effectiveNum }}天</div>
<div class="model-item-content" v-show="activeName == 2 && item.effectiveType == 1">有效期:无限制</div>
<div class="model-item-content" v-show="activeName == 1 && item.effectiveType == 2">有效期:{{ item.effectiveStartTime }}~{{ item.effectiveEndTime }}</div>
<div class="model-item-content" v-show="activeName == 1 && item.effectiveType == 1">有效期:{{ item.effectiveDays }}天</div>
<div class="model-item-content" v-show="activeName == 1 && item.effectiveType == 3">有效期:无限制</div>
<div class="model-item-content" v-show="activeName == 1">类型:{{ item.discountType == 1 ? '满减劵' : item.discountType == 2 ? '折扣券' : item.discountType == 3 ? '代金券' : item.discountType == 4 ? '实物券' : item.discountType == 5 ? '购车代金券' : item.discountType == 6 ? '商品折扣券' : item.discountType == 7 ? '会员服务' : '' }}</div>
<div class="model-item-content" v-show="activeName == 2">类型:权益卡</div>
</div>
</div>
<div class="model-item-empty" v-else v-loading="loading">
<img src="@/assets/img/empty.png" />
<div class="empty-item">暂无数据</div>
</div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[10, 20, 30, 40]" :page-size="pageSize" :total="tableTotal" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'activityModel',
data() {
return {
dialogVisible: false,
loading: false,
activeName: '1',
modelList: [],
pageNum: 1,
pageSize: 10,
tableTotal: 0,
selectItem: {}
}
},
methods: {
handleSelectItem(item) {
this.selectItem = item
},
handleSelect() {
this.dialogVisible = false
this.$emit('selectActivity', { marketingId: this.selectItem.id, marketingType: this.activeName, marketingUrl: this.selectItem.autoUrl })
},
handleSizeChange(val) {
this.pageSize = val
this.getModelList()
},
handleCurrentChange(val) {
this.pageNum = val
this.getModelList()
},
getModelList() {
this.modelList = []
this.loading = true
let market = ''
switch (this.activeName) {
case '1':
market = 'getMerchant'
break
case '2':
market = 'getCard'
break
}
let params = {
pageSize: this.pageSize,
pageNum: this.pageNum
}
this.$apis.marketing[market](params).then(res => {
this.modelList = res.list ? res.list : res.data
this.tableTotal = res.total
this.loading = false
})
},
init() {
this.dialogVisible = true
this.getModelList()
},
handleClick() {
this.getModelList()
}
}
}
</script>
<style lang="scss" scoped>
.model-panel {
.model-panel-tab {
display: flex;
align-items: center;
margin-bottom: 18px;
label {
font-size: 16px;
font-weight: 400;
color: #000000;
line-height: 24px;
}
/deep/ {
.el-checkbox:last-of-type {
margin-right: 8px;
}
.el-tabs__nav {
border: 0;
}
.el-tabs__header {
border: 0;
background-color: #f4f6fc;
margin: 0px;
}
.el-tabs__item {
border: none;
width: 180px;
height: 32px;
line-height: 32px;
margin: 2px;
text-align: center;
}
.el-tabs__item.is-active {
background-color: #fff;
border-radius: 4px;
}
}
}
.model-item-empty {
> img {
display: block;
margin: 50px auto 0px;
width: 60px;
height: auto;
}
.empty-item {
text-align: center;
font-size: 14px;
font-weight: 400;
color: #000000;
line-height: 22px;
margin-bottom: 30px;
}
}
.model-item-panel {
display: grid;
grid-template-columns: repeat(4, 25%);
grid-row-gap: 10px;
height: 40vh;
overflow: auto;
.model-item {
position: relative;
height: 128px;
background: #ffffff;
border-radius: 4px;
border: 2px solid #e6e6e6;
padding: 14px 24px;
box-sizing: border-box;
margin-right: 10px;
&:nth-child(4n) {
margin-right: 0px;
}
&.checked {
border: 2px solid #5850ff;
}
&-qrcode {
position: absolute;
right: 10px;
bottom: 10px;
width: 60px;
height: 60px;
border: 1px solid #979797;
}
&-title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
margin-bottom: 5px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
&-content {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
margin-top: 6px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="square-main">
<el-dialog
title="选择模板"
:visible.sync="dialogVisible"
width="70%"
:before-close="handleClose"
>
<div class="model-panel">
<div class="model-panel-tab">
<label>模板类型:</label>
<el-tabs v-model="activeName" @tab-click="handleClick" type="card">
<el-tab-pane label="售前" name="1"></el-tab-pane>
<el-tab-pane label="售中" name="2"></el-tab-pane>
<el-tab-pane label="售后" name="3"></el-tab-pane>
</el-tabs>
</div>
<div class="model-item-panel" v-if="modelList.length>0" v-loading="loading">
<div class="model-item" v-for="(item, index) in modelList" :key="index">
<div class="model-item-radio">
<el-radio v-model="messageRadio" :label="item"></el-radio>
</div>
<div class="model-item-title">
<div class="model-title-h1">{{ item.title }}</div>
<div class="model-title-h2">{{ item.content }}</div>
</div>
<div class="model-item-content">
<div class="model-content">创建人:巴拉巴拉</div>
<div class="model-content">创建日期:{{ item.createdTime }}</div>
</div>
</div>
</div>
<div class="model-item-panel" v-else v-loading="loading">
<img src="@/assets/img/empty.png" />
<div class="empty-item">暂无数据</div>
</div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="tableTotal"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="selectModelItem">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "activityModel",
data() {
return {
dialogVisible: false,
loading: false,
activeName: "1",
messageRadio: {},
modelList: [],
pageNum: 1,
pageSize: 10,
tableTotal: 0,
};
},
methods: {
init() {
this.messageRadio = {};
this.dialogVisible = true;
this.dracImMessage();
},
selectModelItem() {
this.dialogVisible = false;
this.$emit("selectItem", this.messageRadio);
},
handleClick() {
this.dracImMessage();
},
dracImMessage() {
this.loading = true;
let params = {
pageSize: this.pageSize,
pageNum: this.pageNum,
type: this.activeName,
};
this.$apis.marketing.dracImMessage(params).then((res) => {
console.log(res);
this.modelList = res.data;
this.tableTotal = res.count;
this.loading = false;
});
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
},
},
};
</script>
<style lang="scss" scoped>
.model-panel {
.model-panel-tab {
display: flex;
align-items: center;
margin-bottom: 18px;
label {
font-size: 16px;
font-weight: 400;
color: #000000;
line-height: 24px;
}
/deep/ {
.el-checkbox:last-of-type {
margin-right: 8px;
}
.el-tabs__nav {
border: 0;
}
.el-tabs__header {
border: 0;
background-color: #f4f6fc;
margin: 0px;
}
.el-tabs__item {
border: none;
width: 180px;
height: 32px;
line-height: 32px;
margin: 2px;
text-align: center;
}
.el-tabs__item.is-active {
background-color: #fff;
border-radius: 4px;
}
}
}
.model-item-panel {
> img {
display: block;
margin: 50px auto 0px;
width: 60px;
height: auto;
}
.empty-item {
text-align: center;
font-size: 14px;
font-weight: 400;
color: #000000;
line-height: 22px;
margin-bottom: 30px;
}
.model-item {
display: flex;
padding: 20px;
border-bottom: 1px solid #e9e9e9;
&-radio {
width: 80px;
/deep/ {
.el-radio__input {
margin-top: 10px;
}
.el-radio__label {
display: none;
}
}
}
&-content {
width: 210px;
.model-content {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
}
&-title {
flex: 1;
.model-title-h1 {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
}
.model-title-h2 {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="square-main">
<div class="square-main-header">
<el-button type="primary" size="small" @click="addConfig">
<i class="el-icon-plus"></i>
新增营销
</el-button>
<label>结合门店营销活动,指定客户创建智能营销,提高活动转化率</label>
<el-popover placement="top" width="400" trigger="hover" content="通过导入的客户,门店可通过智能外呼及智能短信,结合营销活动的需要向离店用户进行智能营销,可实现标准、高效的营销同时实现用户线上化。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</div>
<div class="square-tabel scrm-box-f">
<div class="square-tabel-form">
<el-form :inline="true" :model="tableSearchForm" class="follow-form-item" label-width="68px">
<el-form-item size="small" label="添加时间">
<el-date-picker :picker-options="pickerOptions" v-model="createTime" type="daterange" value-format="yyyy/MM/dd" start-placeholder="开始时间" end-placeholder="结束时间"></el-date-picker>
</el-form-item>
<el-form-item size="small" label="状态">
<el-select v-model="tableSearchForm.imStatus" placeholder="请选择">
<el-option v-for="item in optionstatus" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="营销名称">
<el-input v-model="tableSearchForm.imName" placeholder="请输入营销名称"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button @click="handleReset">重置</el-button>
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button :disabled="scope.scope.imStatus!=1" type="text" @click="handleDetail(scope.scope)">营销配置</el-button>
</div>
</GLTable>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'marketing',
data() {
return {
optionstatus: [
{
value: '',
label: '全部'
},
{
value: '1',
label: '待处理'
},
{
value: '2',
label: '处理中'
},
{
value: '3',
label: '已处理'
}
],
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
},
createTime: '',
dialogVisible: true,
tableSearchForm: {},
getListApi: this.$apis.marketing.findAllByPage,
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '营销名称',
prop: 'imName'
},
{
label: '营销客户数',
prop: 'customerCount',
width: '120px'
},
{
label: '状态',
prop: 'imStatusName'
},
{
label: '创建时间',
prop: 'createdTime',
width: '180px'
},
{
label: '创建人',
prop: 'staffPhone',
width: '130px'
},
{
label: '操作',
prop: 'optionBtns',
width: '100px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: []
}
}
},
watch: {
createTime(value) {
if (value) {
this.tableSearchForm.beginTime = value[0]
this.tableSearchForm.endTime = value[1]
} else {
delete this.tableSearchForm.beginTime
delete this.tableSearchForm.endTime
}
}
},
methods: {
handleSearch() {
this.$refs.employeeRef.refreshTable()
},
handleReset() {
this.createTime = []
this.tableSearchForm = {}
this.$refs.employeeRef.refreshTable()
},
handleImport() {},
addConfig() {
this.$router.push('/market/config/-1')
},
handleDetail(scope) {
this.$router.push('/market/config/' + scope.id)
}
}
}
</script>
<style lang="scss" scoped>
.square-main-header {
label {
margin: 0px 20px 0px 10px;
color: #666666;
}
img {
width: 14px;
height: 14px;
margin-top: 8px;
}
}
.dialog-wrap-box {
z-index: 2001;
position: fixed;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
background: rgba(0, 0, 0, 0.5);
.dialog-wrap-panel {
background: #ffffff;
position: absolute;
top: 50%;
left: 10%;
transform: translateY(-50%);
height: 360px;
width: 80%;
.dialog-wrap-items {
position: relative;
display: flex;
width: 100%;
height: 360px;
.footer-btn {
cursor: pointer;
position: absolute;
bottom: -50px;
left: 50%;
text-align: center;
width: 120px;
margin-left: -60px;
height: 34px;
line-height: 34px;
background: #5850ff;
border-radius: 4px;
font-size: 14px;
color: #ffffff;
}
}
.dialog-wrap-item {
padding: 30px;
width: 33.33%;
text-align: center;
border-right: 1px solid #eeeeee;
.dialog-item-title {
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 22px;
}
img {
width: 200px;
height: auto;
margin: 20px;
}
.dialog-item-content {
font-size: 14px;
width: 240px;
margin: 0 auto;
font-weight: 400;
color: #333333;
line-height: 20px;
}
}
}
}
.square-title {
font-size: 20px;
font-weight: 600;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
img {
width: 14px;
height: 14px;
margin-top: 5px;
}
}
.square-num-box {
height: 102px;
margin: 20px 0px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
display: flex;
.square-num-item {
width: 33.33%;
padding-left: 20px;
.square-num-title {
margin-top: 20px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
}
.square-num-count {
font-size: 30px;
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
line-height: 38px;
}
}
}
.coustom-box {
margin-top: 20px;
display: flex;
&-item {
box-sizing: border-box;
width: 25%;
margin-right: 20px;
padding: 20px;
height: 334px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
text-align: center;
&:last-child {
margin-right: 0px;
}
.coustom-box-title {
font-size: 20px;
font-weight: 500;
color: #424242;
line-height: 28px;
letter-spacing: 1px;
margin: 10px;
}
.coustom-echart {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
.coustom-echart-desc {
margin-left: 10px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
.coustom-echart-num {
font-size: 20px;
}
}
}
.coustom-box-content {
font-size: 14px;
font-weight: 500;
color: #a3a3a3;
line-height: 20px;
text-align: left;
height: 110px;
}
.coustom-box-config {
margin: 10px auto;
display: inline-block;
border-radius: 4px;
border: 1px solid #5850ff;
padding: 7px 28px;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 14px;
}
}
}
.square-tabel {
padding: 10px;
margin-top: 20px;
/deep/ {
.el-date-editor.el-input,
.el-date-editor.el-input__inner {
width: 220px;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -21,14 +21,18 @@ export default { ...@@ -21,14 +21,18 @@ export default {
default: "", default: "",
}, },
coustomCount: { coustomCount: {
type: Array, type: String,
}, },
}, },
data() { data() {
return {}; return {};
}, },
watch: {
coustomCount() {
this.getEchart()
}
},
methods: { methods: {
getEchart() { getEchart() {
const chartDom = document.getElementById(this.coustomId); const chartDom = document.getElementById(this.coustomId);
...@@ -49,18 +53,14 @@ export default { ...@@ -49,18 +53,14 @@ export default {
labelLine: { labelLine: {
show: false, show: false,
}, },
data: [{ value: 1 }, { value: 1 }], data: [{ value: 100 }, { value: this.coustomCount.split('%')[0] }],
}, },
], ],
}; };
option && myChart.setOption(option); option && myChart.setOption(option);
}, },
}, }
mounted() {
this.getEchart();
},
}; };
</script> </script>
......
<template> <template>
<div id="channel-main" class="chart-line"></div> <div>
<div id="channel-main" class="chart-line" v-show="lineStatus"></div>
<div class="chart-line-empty" v-show="!lineStatus">
<img src="@/assets/img/empty.png" />
<div class="chart-empty-d">暂无数据</div>
</div>
</div>
</template> </template>
<script> <script>
...@@ -8,7 +14,9 @@ export default { ...@@ -8,7 +14,9 @@ export default {
name: 'linechart', name: 'linechart',
data() { data() {
return {} return {
lineStatus: true
}
}, },
methods: { methods: {
...@@ -61,7 +69,8 @@ export default { ...@@ -61,7 +69,8 @@ export default {
data: dateTime data: dateTime
}, },
yAxis: { yAxis: {
type: 'value' type: 'value',
minInterval: 1,
}, },
series: [ series: [
{ {
...@@ -80,6 +89,11 @@ export default { ...@@ -80,6 +89,11 @@ export default {
} }
option && myChart.setOption(option) option && myChart.setOption(option)
if(newCustomerCount.every(item => item == 0) && newEntmicroCount.every(item => item == 0)) {
this.lineStatus = false
}else {
this.lineStatus = true
}
} }
} }
} }
...@@ -89,4 +103,13 @@ export default { ...@@ -89,4 +103,13 @@ export default {
.chart-line { .chart-line {
height: 300px; height: 300px;
} }
.chart-line-empty {
height: 300px;
text-align: center;
img {
margin-top: 100px;
width: 64px;
height: 32px;
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="form-panel scrm-box-f"> <div class="form-panel scrm-box-f">
<div class="statistics-panel"> <div class="statistics-panel">
<div class="statistics-panel-item"> <div class="statistics-panel-item">
<div class="statistics-title"> <div class="statistics-title">
<span>任务完成率</span> <span>任务完成率</span>
<el-popover <el-popover placement="top" width="300" trigger="hover" content="已发送短信数量 / 累计的营销短信总数。">
placement="top" <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
width="300" </el-popover>
trigger="hover" </div>
content="当前外呼任务的完成情况,分子为完成数量,分母为任务总数量。" <div class="circle-box">
> <echart-circle bgColor1="#F0F0F0" bgColor2="#6F76EE" coustomId="coustomId_5" :coustomCount="percentage"></echart-circle>
<img <div class="circle-box-item">
src="@/assets/img/question.png" <div class="circle-item-scale">{{percentage}}</div>
slot="reference" <div class="circle-item-num">{{totalCount}}</div>
class="count-item-question"
/>
</el-popover>
</div>
<div class="circle-box">
<echart-circle
bgColor1="#F0F0F0"
bgColor2="#6F76EE"
coustomId="coustomId_5"
></echart-circle>
<div class="circle-box-item">
<div class="circle-item-scale">60%</div>
<div class="circle-item-num">28000</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<el-form
:inline="true"
:model="tableSearchForm"
class="follow-form-item"
label-width="80px"
>
<el-row>
<el-form-item size="small" label="电话号码">
<el-input
size="small"
v-model="tableSearchForm.phone"
placeholder="请输入电话号码"
>
</el-input>
</el-form-item>
<el-form-item size="small" label="发送状态">
<el-select v-model="tableSearchForm.status" placeholder="请选择">
<el-option
v-for="item in optionstatus"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button @click="handleReset">重置</el-button>
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
</el-form>
<GLTable
ref="employeeRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">短信内容</el-button>
</div>
</GLTable>
</div> </div>
<el-form :inline="true" :model="tableSearchForm" class="follow-form-item" label-width="80px">
<el-row>
<el-form-item size="small" label="电话号码">
<el-input size="small" v-model="tableSearchForm.phone" placeholder="请输入电话号码"></el-input>
</el-form-item>
<el-form-item size="small" label="发送状态">
<el-select v-model="tableSearchForm.status" placeholder="请选择">
<el-option v-for="item in optionstatus" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button @click="handleReset">重置</el-button>
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
</el-form>
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">短信内容</el-button>
</div>
</GLTable>
</div>
</template> </template>
<script> <script>
import echartCircle from "./echartCircle"; import echartCircle from './echartCircle'
export default { export default {
name: "channelList", name: 'channelList',
components: { components: {
echartCircle, echartCircle
}, },
data() { data() {
return { return {
optionstatus: [ totalCount: 0,
{ percentage: 0,
value: "", optionstatus: [
label: "全部",
},
{ {
value: "1", value: '',
label: "未发送", label: '全部'
}, },
{ {
value: "2", value: '0',
label: "已发送", label: '未发送'
}, },
{ {
value: "3", value: '1',
label: "待发送", label: '已发送'
}, }
], ],
tableSearchForm: {}, tableSearchForm: {},
getListApi: this.$apis.overview.findAllMessageByPage, getListApi: this.$apis.overview.findAllMessageByPage,
tableParams: { tableParams: {
listName: "data", listName: 'data',
tableOption: false, tableOption: false,
otherOptions: { otherOptions: {
label: "启用开关", label: '启用开关'
}, },
tableColumns: [ tableColumns: [
{ {
label: "用户联系方式", label: '用户联系方式',
prop: "phone", prop: 'phone'
}, },
{ {
label: "发送状态", label: '发送状态',
prop: "statusName", prop: 'statusName'
}, },
{ {
label: "发送时间", label: '发送时间',
prop: "sendTime", prop: 'sendTime'
}, },
{ {
label: "操作", label: '操作',
prop: "optionBtns", prop: 'optionBtns',
width: "140px", width: '140px',
addHtml: "optionBtns", addHtml: 'optionBtns',
fixed: "right", fixed: 'right'
}, }
], ]
}, },
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
baseData: { baseData: {
allMerchantList: [], allMerchantList: [],
roleList: [], roleList: [],
staffStatusList: [], staffStatusList: []
}, }
}; }
}, },
methods: { methods: {
findMessageStatic() {
this.$apis.overview.findMessageStatic({}).then(res => {
this.totalCount = res.totalCount
this.percentage = res.percentage
})
},
handleReset() { handleReset() {
this.tableSearchForm = {}; this.tableSearchForm = {}
this.handleSearch(); this.handleSearch()
}, },
handleSearch() { handleSearch() {
this.$refs.employeeRef.refreshTable(); this.$refs.employeeRef.refreshTable()
}, },
handleDetail(scope) { handleDetail(scope) {
this.$alert(scope.content) this.$alert(scope.content, { center: true })
}
}, },
mounted() {
this.findMessageStatic()
} }
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -163,7 +134,7 @@ export default { ...@@ -163,7 +134,7 @@ export default {
} }
.form-panel { .form-panel {
padding: 20px; padding: 20px;
.statistics-panel { .statistics-panel {
display: flex; display: flex;
&-item { &-item {
width: 33.33%; width: 33.33%;
......
...@@ -91,8 +91,10 @@ ...@@ -91,8 +91,10 @@
</div> </div>
<div class="user-panel-balance scrm-box-f"> <div class="user-panel-balance scrm-box-f">
<div class="balance-title">资源剩余</div> <div class="balance-title">资源剩余</div>
<div class="balance-image"><img src="@/assets/img/overview/balance1.png" /></div> <div class="balance-image" v-if="customerCount"><img src="@/assets/img/overview/balance1.png" /></div>
<div class="balance-image"><img src="@/assets/img/overview/balance2.png" /></div> <div class="balance-image" v-if="customerCount"><img src="@/assets/img/overview/balance2.png" /></div>
<div class="balance-image" v-if="!customerCount"><img src="@/assets/img/overview/balance3.png" /></div>
<div class="balance-image" v-if="!customerCount"><img src="@/assets/img/overview/balance4.png" /></div>
</div> </div>
</div> </div>
<div class="statistics-main"> <div class="statistics-main">
......
...@@ -3,61 +3,61 @@ ...@@ -3,61 +3,61 @@
</template> </template>
<script> <script>
import * as echarts from "echarts"; import * as echarts from 'echarts'
export default { export default {
name: "echartCircle", name: 'echartCircle',
props: { props: {
coustomId: { coustomId: {
type: String, type: String,
default: "", default: ''
}, },
bgColor: { bgColor: {
type: String, type: String,
default: "", default: ''
},
coustomCount: {
type: Array,
}, },
lineData: {
type: Array
}
}, },
data() { data() {
return {}; return {}
},
watch: {
lineData() {
this.getEchart()
}
}, },
methods: { methods: {
getEchart() { getEchart() {
const chartDom = document.getElementById(this.coustomId); const chartDom = document.getElementById(this.coustomId)
const myChart = echarts.init(chartDom); const myChart = echarts.init(chartDom)
let option; let option
option = { option = {
series: [ series: [
{ {
type: "pie", type: 'pie',
radius: ["40%", "70%"], radius: ['40%', '70%'],
hoverAnimation: false, hoverAnimation: false,
avoidLabelOverlap: false, avoidLabelOverlap: false,
color: ["rgba(0,0,0,.06)", this.bgColor], color: ['rgba(0,0,0,.06)', this.bgColor],
label: { label: {
show: false, show: false,
position: "center", position: 'center'
}, },
labelLine: { labelLine: {
show: false, show: false
}, },
data: [{ value: 1 }, { value: 1 }], data: [{ value: (this.lineData[0] == 0 && this.lineData[1] == 0) ? 1 : this.lineData[1] },{ value: this.lineData[0] } ]
}, }
], ]
}; }
option && myChart.setOption(option); option && myChart.setOption(option)
}, }
},
mounted() {
this.getEchart();
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="drainage-title">客户引流企微</div> <div class="drainage-title">客户引流企微</div>
<div class="drainage-panel"> <div class="drainage-panel">
<div class="drainage-config-wrap"> <div class="drainage-config-wrap">
<div class="drainage-item-label">平台通过智能外呼精准获取客户意向,结束通话后自动下发引流短信,用户一键接入微信生态。用户接入企微后可领取会员权益卡,实现高效锁客及后续营销策略提供精准触达的通道。</div> <div class="drainage-item-label">通过自动下发引流短信,用户一键接入微信生态。用户接入企微后可领取会员权益卡,实现高效锁客及后续营销策略提供精准触达的通道。</div>
<div class="drainage-item-switch"> <div class="drainage-item-switch">
<el-switch v-model="addValue" active-color="#5850FF" inactive-color="#999999"></el-switch> <el-switch v-model="addValue" active-color="#5850FF" inactive-color="#999999"></el-switch>
</div> </div>
...@@ -69,13 +69,25 @@ ...@@ -69,13 +69,25 @@
</div> </div>
</div> </div>
</div> </div>
<div class="channel-main-welcome scrm-box-f">
<div class="chanel-form-title">欢迎语</div>
<div class="welcome-panel">
<div class="welcome-switch">
<label>自动发送欢迎语</label>
<el-switch v-model="autoWelcome" active-color="#5850FF" inactive-color="#999999"></el-switch>
</div>
<div class="welcome-box">
<welcome-words :eventBus="eventBus" ref="welcome"></welcome-words>
</div>
</div>
</div>
<div class="drainage-wrap scrm-box-f"> <div class="drainage-wrap scrm-box-f">
<div class="drainage-title">营销配置</div> <div class="drainage-title">营销配置</div>
<div class="form-main"> <div class="form-main">
<div class="drainage-form"> <div class="drainage-form">
<div class="drainage-form-item" v-if="editStatus"> <div class="drainage-form-item" v-if="editStatus">
<label class="is-require">跟进员工</label> <label class="is-require">跟进员工</label>
<div> <div style="position: relative">
<el-button size="small" @click="handleAddEmp"> <el-button size="small" @click="handleAddEmp">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
选择跟进专员 选择跟进专员
...@@ -86,6 +98,7 @@ ...@@ -86,6 +98,7 @@
{{ tag.staffName }} {{ tag.staffName }}
</el-tag> </el-tag>
</div> </div>
<div class="el-form-item__error" v-if="empStatus">请选择跟进专员</div>
</div> </div>
</div> </div>
<div class="drainage-form-item" v-else> <div class="drainage-form-item" v-else>
...@@ -100,7 +113,7 @@ ...@@ -100,7 +113,7 @@
<label>群发短信</label> <label>群发短信</label>
<div class="message-panel"> <div class="message-panel">
<el-form ref="configForm" label-position="left" label-width="100px" :model="addForm" :rules="addRules" class="code-body-form"> <el-form ref="configForm" label-position="left" label-width="100px" :model="addForm" :rules="addRules" class="code-body-form">
<el-form-item label="推送时间:">系统将在「开始营销时间」之后启动智能外呼任务,并在「截止营销时间」之后停止该营销活动</el-form-item> <el-form-item label="推送时间:">系统将在「开始营销时间」之后启动智系统将在「开始营销时间」之后启动短信营销,并在「截止营销时间」之后停止短信发送。由于相关管控限制,营销类短信无法实时触达用户,若短信时效要求很高,请谨慎使用。</el-form-item>
<el-form-item size="small" label="营销时间" prop="time"> <el-form-item size="small" label="营销时间" prop="time">
<el-time-picker is-range :disabled="!editStatus" value-format="HH:mm:ss" v-model="addForm.time" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker> <el-time-picker is-range :disabled="!editStatus" value-format="HH:mm:ss" v-model="addForm.time" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
</el-form-item> </el-form-item>
...@@ -110,9 +123,6 @@ ...@@ -110,9 +123,6 @@
<div @click="handleSelectMessage"> <div @click="handleSelectMessage">
<i class="el-icon-circle-plus-outline"><span>选择模板</span></i> <i class="el-icon-circle-plus-outline"><span>选择模板</span></i>
</div> </div>
<div @click="handleSelectModel">
<i class="el-icon-circle-plus-outline"><span>活动</span></i>
</div>
</div> </div>
<div class="form-tips">共可输入341字,70字內(含70字)计一条,超过70字,按70字/条计费。</div> <div class="form-tips">共可输入341字,70字內(含70字)计一条,超过70字,按70字/条计费。</div>
<div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按1条短信发送且计费。</div> <div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按1条短信发送且计费。</div>
...@@ -158,7 +168,6 @@ ...@@ -158,7 +168,6 @@
</div> </div>
<select-emp ref="selectEmpForm" @selectTable="selectTable"></select-emp> <select-emp ref="selectEmpForm" @selectTable="selectTable"></select-emp>
<select-tag ref="selectTagForm" @tagSelected="tagSelected"></select-tag> <select-tag ref="selectTagForm" @tagSelected="tagSelected"></select-tag>
<activity-model ref="selectModelForm" @selectActivity="selectActivity"></activity-model>
<message-model ref="selectMessageForm" @selectItem="selectItem"></message-model> <message-model ref="selectMessageForm" @selectItem="selectItem"></message-model>
<div class="dialog-wrap-box" v-show="dialogVisible"> <div class="dialog-wrap-box" v-show="dialogVisible">
<div class="dialog-wrap-panel"> <div class="dialog-wrap-panel">
...@@ -225,21 +234,24 @@ ...@@ -225,21 +234,24 @@
</template> </template>
<script> <script>
import Vue from 'vue'
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
import welcomeWords from '@/components/welcome/welcomeWords.vue'
import selectEmp from '@/components/selectEmp' import selectEmp from '@/components/selectEmp'
import selectTag from '@/components/selectTag' import selectTag from '@/components/selectTag'
import activityModel from '../marketing/components/activityModel' import messageModel from '../market/components/messageModel'
import messageModel from '../marketing/components/messageModel'
export default { export default {
name: 'drainage', name: 'drainage',
components: { components: {
selectEmp, selectEmp,
selectTag, selectTag,
activityModel, messageModel,
messageModel welcomeWords
}, },
data() { data() {
return { return {
eventBus: new Vue(),
autoWelcome: false,
editStatus: false, editStatus: false,
footerLeft: 0, footerLeft: 0,
footerWidth: 0, footerWidth: 0,
...@@ -248,9 +260,6 @@ export default { ...@@ -248,9 +260,6 @@ export default {
content: '', content: '',
endTime: [], endTime: [],
id: '', id: '',
marketingId: '',
marketingType: '',
marketingUrl: '',
staffIds: [], staffIds: [],
startTime: '', startTime: '',
tagging: [], tagging: [],
...@@ -258,11 +267,12 @@ export default { ...@@ -258,11 +267,12 @@ export default {
}, },
dialogVisible: false, dialogVisible: false,
addValue: false, addValue: false,
empStatus: false,
value1: false, value1: false,
dracImFollowStaffResponses: [{ codeId: null, imId: 5, staffId: 366, staffName: 'fddfdf' }], dracImFollowStaffResponses: [{ codeId: null, imId: 5, staffId: 366, staffName: 'fddfdf' }],
addRules: { addRules: {
time: [{ required: true, message: '请选择营销时间', trigger: 'change' }], time: [{ required: true, message: '请选择营销时间', trigger: 'change' }],
content: [{ required: true, message: '请选择短信模板', trigger: 'blur' }] content: [{ required: true, message: '请选择短信模板', trigger: 'change' }]
} }
} }
}, },
...@@ -274,12 +284,6 @@ export default { ...@@ -274,12 +284,6 @@ export default {
tagSelected(item) { tagSelected(item) {
this.addForm.tagging = item this.addForm.tagging = item
}, },
selectActivity(item) {
this.addForm.marketingId = item.marketingId
this.addForm.marketingType = item.marketingType
this.addForm.marketingUrl = item.marketingUrl
console.log(this.addForm)
},
selectTable(item) { selectTable(item) {
this.addForm.staffIds = item.map(item => { this.addForm.staffIds = item.map(item => {
return { return {
...@@ -322,28 +326,47 @@ export default { ...@@ -322,28 +326,47 @@ export default {
this.$router.push('/square/index') this.$router.push('/square/index')
}, },
handleSave() { handleSave() {
let params = utils.deepClone(this.addForm) if (this.editStatus && this.addForm.staffIds.length == 0) {
if (this.addForm.time) { this.empStatus = true
params.startTime = this.addForm.time[0] return
params.endTime = this.addForm.time[1]
} }
this.$refs['configForm'].validate(valid => {
if (valid) {
let params = utils.deepClone(this.addForm)
if (this.addForm.time) {
params.startTime = this.addForm.time[0]
params.endTime = this.addForm.time[1]
}
params.tagging = JSON.stringify(params.tagging) params.tagging = JSON.stringify(params.tagging)
params.staffIds = JSON.stringify(params.staffIds) params.staffIds = JSON.stringify(params.staffIds)
let config params.autoWelcome = this.autoWelcome ? 1 : 0
if (this.addForm.id) { const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
config = 'updateConfig' const attachmentList = previewList.map(item => {
params.delFlag = this.addValue ? 0 : 1 if (item.attType == 1) {
} else { item.attContent = item.attContent.replace('@昵称', '[@昵称]')
config = 'addConfig' } else if (item.attType == 7) {
} item.attContent = JSON.stringify(item.attContent)
this.$apis.marketing[config](params).then(res => { }
if (res) { return item
this.$message({ })
message: '操作成功', params.welcomeInfo = attachmentList
type: 'success' let config
if (this.addForm.id) {
config = 'updateConfig'
params.delFlag = this.addValue ? 0 : 1
} else {
config = 'addConfig'
}
this.$apis.marketing[config](params).then(res => {
if (res) {
this.$message({
message: '操作成功',
type: 'success'
})
this.findConfig()
}
}) })
this.findConfig()
} }
}) })
}, },
...@@ -356,6 +379,12 @@ export default { ...@@ -356,6 +379,12 @@ export default {
this.addForm.tagging = eval(this.addForm.tagging) this.addForm.tagging = eval(this.addForm.tagging)
this.$set(this.addForm, 'time', [this.addForm.startTime, this.addForm.endTime]) this.$set(this.addForm, 'time', [this.addForm.startTime, this.addForm.endTime])
this.addValue = res.delFlag == 0 ? true : false this.addValue = res.delFlag == 0 ? true : false
this.autoWelcome = res.autoWelcome ? true : false
const previewList = res.dracScrmWelcomeConfigDTOS.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
return item
})
this.$refs.welcome.updateList(previewList)
} }
}) })
} }
...@@ -369,6 +398,34 @@ export default { ...@@ -369,6 +398,34 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.channel-main-welcome {
margin: 20px 0px 20px;
.chanel-form-title {
padding-left: 20px;
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 57px;
height: 57px;
border-bottom: 1px solid #d8d8d8;
}
.welcome-panel {
margin: 10px;
padding: 0px 20px 20px;
.welcome-switch {
margin-bottom: 20px;
label {
margin-right: 10px;
font-size: 14px;
font-weight: 400;
color: #666666;
}
}
.welcome-box {
margin-left: 55px;
}
}
}
.dialog-step { .dialog-step {
width: 80%; width: 80%;
margin: 0 auto 20px; margin: 0 auto 20px;
......
...@@ -61,7 +61,6 @@ ...@@ -61,7 +61,6 @@
</div> </div>
<div class="safe-upload-footer"> <div class="safe-upload-footer">
<el-button type="primary" size="small" @click="handleSubmit">提交</el-button> <el-button type="primary" size="small" @click="handleSubmit">提交</el-button>
<el-button size="small" @click="goBack">返回</el-button>
</div> </div>
</div> </div>
<div class="squre-safe-panel scrm-box-f"> <div class="squre-safe-panel scrm-box-f">
...@@ -301,7 +300,7 @@ export default { ...@@ -301,7 +300,7 @@ export default {
padding: 40px; padding: 40px;
margin-top: 20px; margin-top: 20px;
/deep/ { /deep/ {
.el-carousel__indicators { .el-carousel__indicators,.el-carousel__arrow {
display: none; display: none;
} }
} }
...@@ -346,7 +345,7 @@ export default { ...@@ -346,7 +345,7 @@ export default {
.safe-upload-footer { .safe-upload-footer {
width: 300px; width: 300px;
display: flex; display: flex;
justify-content: space-between; justify-content: center;
margin: 0 auto; margin: 0 auto;
} }
.squre-safe-title { .squre-safe-title {
......
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
<div class="coustom-box-item"> <div class="coustom-box-item">
<div class="coustom-box-title">待添加企微客户</div> <div class="coustom-box-title">待添加企微客户</div>
<div class="coustom-echart"> <div class="coustom-echart">
<echart-circle bgColor="#6395FA" coustomId="coustomId_1"></echart-circle> <echart-circle bgColor="#6395FA" coustomId="coustomId_1" :lineData="[countAll.unQyCount,countAll.totalCount - countAll.unQyCount]"></echart-circle>
<div class="coustom-echart-desc"> <div class="coustom-echart-desc">
<div class="coustom-echart-title">人群数量</div> <div class="coustom-echart-title">人群占比</div>
<div class="coustom-echart-num">{{ countAll.unQyCount }}</div> <div class="coustom-echart-num">{{ countAll.unQyCount }}/{{ countAll.totalCount }}</div>
</div> </div>
</div> </div>
<div class="coustom-box-content">当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。</div> <div class="coustom-box-content">当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。</div>
...@@ -37,10 +37,10 @@ ...@@ -37,10 +37,10 @@
<div class="coustom-box-item"> <div class="coustom-box-item">
<div class="coustom-box-title">信息待完善客户</div> <div class="coustom-box-title">信息待完善客户</div>
<div class="coustom-echart"> <div class="coustom-echart">
<echart-circle bgColor="#5AD8A6" coustomId="coustomId_2"></echart-circle> <echart-circle bgColor="#5AD8A6" coustomId="coustomId_2" :lineData="[countAll.unInfoCount,countAll.totalCount - countAll.unInfoCount]"></echart-circle>
<div class="coustom-echart-desc"> <div class="coustom-echart-desc">
<div class="coustom-echart-title">人群数量</div> <div class="coustom-echart-title">人群占比</div>
<div class="coustom-echart-num">{{ countAll.unInfoCount }}</div> <div class="coustom-echart-num">{{ countAll.unInfoCount }}/{{ countAll.totalCount }}</div>
</div> </div>
</div> </div>
<div class="coustom-box-content">当前客户池中,有企微客户尚未维护手机号码。建议批量通知对应的销售顾问维护此类客户信息。</div> <div class="coustom-box-content">当前客户池中,有企微客户尚未维护手机号码。建议批量通知对应的销售顾问维护此类客户信息。</div>
...@@ -49,10 +49,10 @@ ...@@ -49,10 +49,10 @@
<div class="coustom-box-item"> <div class="coustom-box-item">
<div class="coustom-box-title">待续保客户</div> <div class="coustom-box-title">待续保客户</div>
<div class="coustom-echart"> <div class="coustom-echart">
<echart-circle bgColor="#5D7092" coustomId="coustomId_3"></echart-circle> <echart-circle bgColor="#5D7092" coustomId="coustomId_3" :lineData="[countAll.unRenewCount,countAll.totalCount - countAll.unRenewCount]"></echart-circle>
<div class="coustom-echart-desc"> <div class="coustom-echart-desc">
<div class="coustom-echart-title">人群数量</div> <div class="coustom-echart-title">人群占比</div>
<div class="coustom-echart-num">{{ countAll.unRenewCount }}</div> <div class="coustom-echart-num">{{ countAll.unRenewCount }}/{{ countAll.totalCount }}</div>
</div> </div>
</div> </div>
<div class="coustom-box-content">提前给车险快到期的用户自动推荐适合该客户的优惠服务,提高客户续保率。</div> <div class="coustom-box-content">提前给车险快到期的用户自动推荐适合该客户的优惠服务,提高客户续保率。</div>
...@@ -61,10 +61,10 @@ ...@@ -61,10 +61,10 @@
<div class="coustom-box-item"> <div class="coustom-box-item">
<div class="coustom-box-title">待定保客户</div> <div class="coustom-box-title">待定保客户</div>
<div class="coustom-echart"> <div class="coustom-echart">
<echart-circle bgColor="#5B8FF9" coustomId="coustomId_4"></echart-circle> <echart-circle bgColor="#5B8FF9" coustomId="coustomId_4" :lineData="[countAll.unRegularCount,countAll.totalCount - countAll.unRegularCount]"></echart-circle>
<div class="coustom-echart-desc"> <div class="coustom-echart-desc">
<div class="coustom-echart-title">人群占比</div> <div class="coustom-echart-title">人群占比</div>
<div class="coustom-echart-num">{{ countAll.unRegularCount }}</div> <div class="coustom-echart-num">{{ countAll.unRegularCount }}/{{ countAll.totalCount }}</div>
</div> </div>
</div> </div>
<div class="coustom-box-content">智能提醒用户定期保养,推荐保养项目和优惠活动,提高用户返店率。</div> <div class="coustom-box-content">智能提醒用户定期保养,推荐保养项目和优惠活动,提高用户返店率。</div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!