Commit 501ffdc3 by 前端

更新六月份版本sop代码

1 parent d56fe0f3
......@@ -225,4 +225,14 @@ const getMomentListApi = params => {
})
}
export default { getCustomerListApi, getCustomerByTagListApi, getCustomerCrowdApi, getSopInfoListApi, getSopBaseInfoApi, getEventListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, getFailEventList, getTaskStatusApi, parseEventCountApi, deleteSopEventApi, endSopEventApi, batchEditSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi, getGroupListApi, getMaterialListApi, getMomentListApi }
// 根据sopId获取SOP营销效果分析
const getEffectAnalysisApi = params => {
params.method = 'scrm.api.sop.sopEvent.effectAnalysis'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getCustomerListApi, getCustomerByTagListApi, getCustomerCrowdApi, getSopInfoListApi, getSopBaseInfoApi, getEventListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, getFailEventList, getTaskStatusApi, parseEventCountApi, deleteSopEventApi, endSopEventApi, batchEditSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi, getGroupListApi, getMaterialListApi, getMomentListApi,getEffectAnalysisApi }
......@@ -101,6 +101,17 @@ const crowdfundingActivity = params => {
sign: true
})
}
//膨胀金活动
const bulgeActivity = params => {
params.method = 'scrm.api.shopmall.bulge.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//模板列表
const templatePage = params => {
params.method = `${path}template.page.search`
......@@ -165,5 +176,6 @@ export default {
templateUpdate,
templateSave,
templateDetail,
crowdfundingActivity
crowdfundingActivity,
bulgeActivity
}
......@@ -11,10 +11,16 @@
</div>
<div class="checkbox-group-box" :style="{ height: heightBox + 'px' }" v-loading="loading">
<div style="margin-bottom: 8px" v-for="(item, index) in labelTreeRets" :key="index">
<span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }" @click.self="item.checked = !item.checked"></span>
<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" @change="handleCheckAllChange(item.checkAll, index)">{{ item.labelGroup.name }}({{ item.tagChecked.length }}/{{ item.labelList.length }} 项)</el-checkbox>
<span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }"
@click.self="item.checked = !item.checked"></span>
<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll"
@change="handleCheckAllChange(item.checkAll, index)">{{
item.labelGroup.name
}}({{ item.tagChecked.length }}/{{ item.labelList.length }} 项)
</el-checkbox>
<div style="margin: 15px 0"></div>
<el-checkbox-group class="tag-group" v-model="item.tagChecked" @change="handleCheckedChange(item.tagChecked, index)" v-if="item.checked">
<el-checkbox-group class="tag-group" v-model="item.tagChecked"
@change="handleCheckedChange(item.tagChecked, index)" v-if="item.checked">
<el-checkbox v-for="(itm, idx) in item.labelList" :label="itm" :key="idx">{{ itm.name }}</el-checkbox>
</el-checkbox-group>
</div>
......@@ -35,7 +41,8 @@
<p class="tag-selected-label" v-show="item.tagChecked.length">{{ item.labelGroup.name }}:</p>
<span v-for="(tag, idx) in item.tagChecked" :key="idx">
<span class="tag-txt" v-show="idx != 0">或</span>
<el-tag :title="tag.name" type="info" class="customer-tag-selected-item" :key="idx" v-if="tag" closable :disable-transitions="false" @close="remove(item, idx)">
<el-tag :title="tag.name" type="info" class="customer-tag-selected-item" :key="idx" v-if="tag"
closable :disable-transitions="false" @close="remove(item, idx)">
{{ tag.name.length > 11 ? tag.name.slice(0, 11) + '...' : tag.name }}
</el-tag>
</span>
......@@ -46,7 +53,8 @@
</div>
</div>
<span slot="footer" class="dialog-footer">
<a class="dialog-jump" @click="jumpUrl" v-if="this.$globalState.session.accountLevel == 4 && this.$globalState.session.merchantModel == 2">没有意向标签?点我创建</a>
<a class="dialog-jump" @click="jumpUrl"
v-if="this.$globalState.session.accountLevel == 4 && this.$globalState.session.merchantModel == 2">没有意向标签?点我创建</a>
<el-button size="small" @click="handleClose">
取 消
</el-button>
......@@ -57,14 +65,19 @@
</template>
<script>
import { utils } from 'glsx-common'
import {utils} from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'activityModel',
props:{
labelTypesStr:{
type:String,
default:'自店标签,企业标签,系统标签'
props: {
labelTypesStr: {
type: String,
default: '自店标签,企业标签,系统标签'
},
isGroupTag: {
type: Boolean,
default: false
}
},
data() {
......@@ -111,10 +124,12 @@ export default {
labelTreeReq: {
pageNum: 1,
pageSize: 1000,
shopId: this.$globalState.session.merchantId,
// shopId: this.$globalState.session.merchantId,
shopId:'44209846',
labelGroupName: this.labelGroupName,
labelTypesStr: this.labelTypesStr,
edition: this.$globalState.session.merchantModel
edition: this.$globalState.session.merchantModel,
belongType: this.isGroupTag ? 2 : 1
}
})
.then(res => {
......@@ -287,18 +302,22 @@ export default {
text-decoration: underline;
cursor: pointer;
}
.select-tag {
.label-box {
margin-left: 42px;
height: 100%;
overflow-y: scroll;
}
.tag-selected-label {
margin: 9px 0;
}
.tag-line-and {
position: relative;
}
.tag-line {
position: absolute;
left: 17px;
......@@ -306,6 +325,7 @@ export default {
border-width: 0 0 0 1px;
height: 100%;
}
.tag-and {
position: absolute;
background: #efeeff;
......@@ -314,9 +334,11 @@ export default {
padding: 10px;
z-index: 20;
}
.tag-txt {
padding: 0 8px;
}
.customer-tag-selected-item {
background: #f4f6fc !important;
border: 1px solid rgba(232, 232, 234, 1) !important;
......@@ -326,10 +348,13 @@ export default {
margin-bottom: 10px;
}
}
.tag-panel {
display: flex;
.tag-panel-select {
width: 60%;
/deep/ {
.el-checkbox__label {
width: 100%;
......@@ -341,9 +366,11 @@ export default {
}
}
}
.tag-panel-selected {
width: 40%;
margin-left: 10px;
.tag-box-header {
font-size: 14px;
font-weight: 400;
......@@ -352,17 +379,20 @@ export default {
padding-left: 20px !important;
}
}
.tag-title {
font-size: 16px;
font-weight: 400;
color: #333333;
line-height: 22px;
}
.tag-select-box {
margin-top: 10px;
border-radius: 2px;
border: 1px solid #eeeeee;
padding: 6px;
.tag-box-header {
box-sizing: border-box;
display: flex;
......@@ -372,6 +402,7 @@ export default {
margin: -6px;
margin-bottom: 10px;
padding: 0px 6px;
/deep/ {
.el-input {
width: 60%;
......@@ -379,6 +410,7 @@ export default {
}
}
}
.tag-selected-item {
margin: 0px 6px 6px 0px;
height: 26px;
......@@ -390,14 +422,17 @@ export default {
overflow: hidden;
white-space: nowrap;
}
.el-tree-node__expand-icon {
color: #5850ff;
font-size: 16px;
}
.tag-group {
margin-left: 40px;
display: flex;
flex-wrap: wrap;
.el-checkbox {
width: 40%;
margin-bottom: 6px;
......@@ -407,9 +442,11 @@ export default {
}
}
}
.checkbox-group-box {
overflow: auto;
}
.tag-selected-box {
min-height: 200px;
display: flex;
......
<template>
<div>
<el-tabs class="gl-tabs" v-model="activeName" @tab-click="clickNav(activeName)">
<el-tab-pane label="SOP概览" name='first'></el-tab-pane>
<el-tab-pane label="SOP列表" name='second'></el-tab-pane>
</el-tabs>
</div>
</template>
<script>
export default {
name: "SopNav",
data() {
return {
activeName: 'first'
}
},
methods: {
clickNav(name) {
this.$emit('clickNav', name)
}
}
}
</script>
<style lang="scss" scoped>
.gl-tabs {
/deep/ .el-tabs__header {
margin: 0 0 10px;
}
/deep/ .el-tabs__nav-wrap::after {
content: none;
}
/deep/ .el-tabs__item {
font-size: 16px;
color: #717171;
letter-spacing: 0.8px;
background: #f0f1f7 !important;
}
/deep/ .is-active {
color: #5850ff;
font-weight: 600;
background: #f0f1f7;
border-bottom: 2px solid #5850ff !important;
}
}
</style>
......@@ -57,16 +57,17 @@ export default {
this.activeName = obj.activeName
},
handleInfoConfirm(info) {
console.log(this.eventObj.addOrEdit == 'add')
console.log(info.baseInfo)
this.eventObj.addOrEdit == 'add' ? this.$refs.baseInfoRef.editForm.eventList.push(info.baseInfo) : this.$set(this.$refs.baseInfoRef.editForm.eventList, this.eventIndex, info.baseInfo)
this.$refs.baseInfoRef.parentCustomerObj.phone = info.predictCountObj.phone
this.$refs.baseInfoRef.parentCustomerObj.qiwei = info.predictCountObj.qiwei
this.$refs.baseInfoRef.dealSopTime()
console.log(this.$refs.baseInfoRef.editForm.eventList)
this.jumpBaseInfo({ activeName: 'baseInfo' })
},
jumpEvent(obj) {
console.log(obj)
this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit)
this.$set(this.eventObj, 'info', obj.info)
this.parentCustomerObj = obj.parentCustomerObj
......
......@@ -4,9 +4,11 @@
<!-- 营销时间 -->
<div class="container m-b-20">
<p class="edit-title">营销时间</p>
<glsx-combi-form class="edit-form-container m-r-20" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px"
:isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="sopNameFormData"
:formRules="editRule"></glsx-combi-form>
<!-- sop名称-->
<!-- <glsx-combi-form class="edit-form-container m-r-20" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px"-->
<!-- :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="sopNameFormData"-->
<!-- :formRules="editRule"></glsx-combi-form>-->
<glsx-combi-form ref="editFormRefDate" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px"
:formRef="editChildRef" :formObj="editForm" :formData="editFormDataDate" :formRules="editRule">
<div slot="eventStartDate" slot-scope="scope">
......@@ -23,9 +25,11 @@
:placeholder="scope.scope.placeholder"></el-time-picker>
</div>
</glsx-combi-form>
<glsx-combi-form ref="editFormRefRepeat" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px"
:isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormDataRepeat"
:formRules="editRule"></glsx-combi-form>
<glsx-combi-form ref="editFormRefTime" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px"
:formRef="editChildRef" :formObj="editForm" :formData="editFormDataTime" :formRules="editRule">
<div class="flex-default m-r-20" slot="repeatTime" slot-scope="scope">
......@@ -70,15 +74,15 @@
</el-form>
</div>
<div class="preview">
<Preview :previewVal="previewList" v-if="editForm.pushChannelType == 1"></Preview>
<Preview :previewVal="previewList" v-if="editForm.pushChannelType == 1 && sopType ==1"></Preview>
<!-- <MessagePreview :previewView="previewList" v-if="editForm.pushChannelType == 2"></MessagePreview>-->
<FriendGroupPreview :previewView="previewList" v-if="editForm.pushChannelType == 3"></FriendGroupPreview>
</div>
</div>
</div>
<!-- 营销渠道 -->
<!-- 营销设置 -->
<div class="container edit-container">
<p class="edit-title">营销渠道</p>
<p class="edit-title">营销设置</p>
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRefChannel" :isEdit="isEdit"
:labelWidth="labelWidth" defaultWidth="320px" :isBlock="true" :formRef="editChildRef"
:formObj="editForm" :formData="editFormDataChannel" :formRules="editRule">
......@@ -219,7 +223,7 @@ export default {
activityStatus: 2,
currentPage: 1
}
}
},
// {
// itemName: '无忧服务',
// itemValue: 6,
......@@ -235,16 +239,25 @@ export default {
// merchantId: this.$globalState.session.merchantId
// }
// }
// {
// itemName: '众筹活动',
// itemValue: 7,
// itemType: 'crowdfunding',
// getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity,
// params: {
// currentPage: 1,
// activityStatus: 2
// }
// }
{
itemName: '众筹活动',
itemValue: 6,
itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity,
params: {
currentPage: 1
}
},
// 膨胀金活动
{
itemName: '膨胀金活动',
itemValue: 7,
itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.bulgeActivity,
params: {
currentPage: 1
}
},
]
},
{
......@@ -288,10 +301,11 @@ export default {
eventContent: '',
// eventCount: '',
object: {},
//营销渠道
//营销设置
followerTypeId: '',
reachesType: 1,
reachesTypeSet: ''
reachesTypeSet: '',
labelOptUpdate: 1
},
// 营销内容
previewList: [],
......@@ -330,10 +344,11 @@ export default {
eventEndDate: [{required: true, message: '请选择营销结束日期', trigger: 'change'}],
// eventContent: [{required: true, message: '', trigger: 'input'}],
repeatFlag: [{required: true, message: '请选择是否重复', trigger: 'change'}],
pushChannelType: [{required: true, message: '请选择营销渠道', trigger: 'change'}],
pushChannelType: [{required: true, message: '请选择营销设置', trigger: 'change'}],
followerTypeId: [{required: true, message: '请选择跟进员工类型', trigger: 'change'}],
reachesType: [{required: true, message: '请选择参与次数', trigger: 'change'}],
reachesTypeSet: [{required: true, message: '请输入参与次数', trigger: 'change'}]
reachesType: [{required: true, message: '请选择营销次数', trigger: 'change'}],
reachesTypeSet: [{required: true, message: '请输入营销次数', trigger: 'change'}],
labelOptUpdate: [{required: true, message: '请选择标签更新', trigger: 'change'}]
},
isEdit: true,
sopNameFormData: [
......@@ -410,7 +425,7 @@ export default {
this.editForm.repeatMode = 1
this.editForm.repeatTime = ''
this.editForm.eventEndDate = ''
// 参与次数
// 营销次数
this.editForm.reachesType = 1
this.editForm.reachesTypeSet = 1
}
......@@ -472,7 +487,7 @@ export default {
],
editFormDataChannel: [
{
label: '营销渠道',
label: '营销设置',
name: 'pushChannelType',
tips: '企业微信和微信朋友圈会自动给客户的跟进专员派发群发任务;短信会自动推送至客户手机。',
type: 'radio',
......@@ -511,7 +526,7 @@ export default {
optionsName: 'staffTypeList'
},
{
label: '参与次数',
label: '营销次数',
name: 'reachesType',
addHtml: 'reachesType',
optionId: 'confId',
......@@ -528,7 +543,26 @@ export default {
isDisabled: false
}
],
}
},
{
label: '标签更新',
name: 'labelOptUpdate',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
optionList: [
{
confId: 1,
confName: '开启',
isDisabled: false
},
{
confId: 2,
confName: '关闭',
isDisabled: false
},
],
},
],
baseData: {
weekList: [],
......@@ -609,6 +643,15 @@ export default {
mounted() {
Object.assign(this.editForm, this.eventObj.info)
// 客户sop还是群sop做营销设置处理
if (this.editForm.sopType == 2) {
this.editForm.pushChannelType = 1
this.editFormDataChannel = this.editFormDataChannel.filter(item => {
return item.name !== 'pushChannelType' && item.name !== 'followerTypeId'
})
}
this.getStaffTypeList()
this.$nextTick(() => {
this.editStatus = false
......@@ -630,6 +673,7 @@ export default {
}
})
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
......@@ -718,17 +762,25 @@ export default {
this.recoveryEndTime()
this.getCustomerNum()
},
getWelcomeDetails() {
let backupContent = typeof (this.editForm.backupContent) == 'string' ? JSON.parse(this.editForm.backupContent) : this.editForm.backupContent
console.log(backupContent)
if (backupContent) {
const previewList = backupContent.map(item => {
if (item.attType == 7) item.attContent = typeof (item.attContent) == 'string' ? JSON.parse(item.attContent) : item.attContent
if (item.attType == 7 || item.attType == 4) item.attContent = typeof (item.attContent) == 'string' ? JSON.parse(item.attContent) : item.attContent
if (item.attType == 4) {
item.attType = 7
}
return item
})
this.$refs.welcome.updateList(previewList)
} else if (this.editForm.object && this.editForm.object.length != 0) {
const previewList = JSON.parse(backupContent).map(item => {
if (item.attType == 7) item.attContent = typeof (item.attContent) == 'string' ? JSON.parse(item.attContent) : item.attContent
if (item.attType == 7 || item.attType == 4) item.attContent = typeof (item.attContent) == 'string' ? JSON.parse(item.attContent) : item.attContent
if (item.attType == 4) {
item.attType = 7
}
return item
})
this.$refs.welcome.updateList(previewList)
......@@ -744,6 +796,7 @@ export default {
handleMarketingContent() {
let params = {}
const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
console.log(previewList)
if ((previewList[0] && previewList[0].attType == 1 && previewList[0].attContent == '') || !previewList.length || (previewList[0] && previewList[0].attType !== 1)) {
this.hasEventContentDisplaySpecial = true
} else {
......@@ -954,10 +1007,12 @@ export default {
this.submit = false
return true
}
console.log(this.editForm)
this.$emit('handleInfoConfirm', {baseInfo: this.editForm, predictCountObj: this.predictCountObj})
})
} else {
// this.editForm.eventCount = 1
console.log(this.editForm)
this.$emit('handleInfoConfirm', {baseInfo: this.editForm, predictCountObj: this.predictCountObj})
}
},
......
<template>
<div class="sop-overview marketing edit-box">
<SopNav @clickNav="handleClick"/>
<div class="overview-describe">
<img src="@/assets/icon-info.png" alt=""/>
<p class="describe-text">
锁定目标客户群,设置触发时间、场景事件、策略内容和触点,自动触发场景营销SOP推送,完成保养提醒、事故车送修等智能线索推送、新用户培育、客户关怀、激活沉默客户、转化复购等。
</p>
</div>
<div class="container edit-container m-b-20">
<p class="edit-title">营销SOP</p>
<div class="sop-box">
<p class="box-txt">锁定目标客户群,设置触发时间、场景事件、策略内容和触点,自动触发场景营销SOP推送,完成保养提醒、事故车送修等智能线索推送、新用户培育、客户关怀、激活沉默客户、转化复购等。</p>
<!-- <div class="flex-center">-->
<!-- <p class="step-circle">1</p>-->
<!-- <p class="step-txt">创建SOP</p>-->
<!-- <p class="step-line"></p>-->
<!-- <p class="step-circle">2</p>-->
<!-- <p class="step-txt">添加推送客户</p>-->
<!-- <p class="step-line"></p>-->
<!-- <p class="step-circle">3</p>-->
<!-- <p class="step-txt">设置推送内容及时间</p>-->
<!-- <p class="step-line"></p>-->
<!-- <p class="step-circle">4</p>-->
<!-- <p class="step-txt">系统定时自动推送/任务下发</p>-->
<!-- </div>-->
<div class="flex-center">
<div>
<p class="step-circle">1</p>
<p class="step-txt">创建SOP</p>
</div>
<p class="step-line"></p>
<div>
<p class="step-circle">2</p>
<p class="step-txt">添加推送客户</p>
</div>
<p class="step-line"></p>
<div>
<p class="step-circle">3</p>
<p class="step-txt">设置推送内容及时间</p>
</div>
<p class="step-line"></p>
<div>
<p class="step-circle">4</p>
<p class="step-txt">系统定时自动推送/任务下发</p>
</div>
</div>
</div>
</div>
<div class="container edit-container m-b-20">
<div class="edit-title flex p-r-20">
<p>SOP监测</p>
<div>
<GLButton :size="size" type="default" class="default-blue-btn" fn="创建SOP" @click="handleEdit('add')">创建SOP</GLButton>
<GLButton :size="size" type="default" class="default-blue-btn" fn="管理SOP" @click="handleJump('sopList')">管理全部SOP</GLButton>
</div>
<!-- <div>-->
<!-- <GLButton :size="size" type="default" class="default-blue-btn" fn="创建SOP" @click="handleEdit('add')">-->
<!-- 创建SOP-->
<!-- </GLButton>-->
<!-- <GLButton :size="size" type="default" class="default-blue-btn" fn="管理SOP" @click="handleJump('sopList')">管理全部SOP</GLButton>-->
<!-- </div>-->
</div>
<div class="sop-box" :style="{ 'padding-bottom': sopList.length ? '2px' : '12px', 'padding-right': sopList.length ? '0' : '20px' }">
<div class="sop-box"
:style="{ 'padding-bottom': sopList.length ? '2px' : '12px', 'padding-right': sopList.length ? '0' : '20px' }">
<div class="chart-box sop-flex" v-show="sopList.length">
<div class="chart-item" v-for="item in sopList" :key="item.id">
<span :class="item.sopType == 2 ? 'sop-type-orange':'sop-type-green'">
{{ item.sopType == 2 ? '群sop' : '客户sop' }}
</span>
<p class="sop-name">{{ item.sopName }}</p>
<div :id="'sopPie' + item.id" class="chart-pie"></div>
<p>{{ item.dateRange }}</p>
<div class="sop-btns">
<GLButton class="btn-item" :size="size" type="primary" display="disabled" fn="分析SOP" @click="handleJump('sopAnalysisList', item)">SOP分析</GLButton>
<GLButton class="btn-item" :size="size" type="primary" display="disabled" fn="编辑SOP" @click="handleEdit('edit', item)">编辑</GLButton>
<GLButton class="btn-item" :size="size" type="primary" display="disabled" fn="结束SOP" @click="handleEnd(item)">结束</GLButton>
<GLButton class="btn-item" :size="size" type="primary" display="disabled" fn="分析SOP"
@click="handleJump('sopAnalysisList', item)">SOP分析
</GLButton>
<GLButton class="btn-item" :size="size" type="primary" plain display="disabled" fn="编辑SOP"
@click="handleEdit('edit', item)">编辑
</GLButton>
<GLButton class="btn-item" :size="size" type="default" display="disabled" fn="结束SOP"
@click="handleEnd(item)">结束
</GLButton>
</div>
</div>
</div>
<div v-show="!sopList.length" class="txt-center" style="height: 400px;">
<img style="margin-top: 140px;" src="@/assets/empty.png" />
<img style="margin-top: 140px;" src="@/assets/empty.png"/>
<p class="m-t-10">暂无数据</p>
</div>
</div>
</div>
</div>
</template>
<script>
import * as echarts from 'echarts'
import * as moment from 'moment'
import SopNav from "views/sop/SopNav";
export default {
name: 'sopIndex',
components: {SopNav},
data() {
return {
activeName: 'first',
size: 'small',
// 环形图配置
pieOption: {
......@@ -104,10 +149,13 @@ export default {
},
methods: {
handleClick(tab) {
tab == 'second' ? this.handleJump('sopList') : ''
},
handleJump(path, row = {}) {
this.$router.push({
path: '/sop/' + path,
query: row ? { id: row.id, fromPage: '/marketing/sop/index' } : ''
query: row ? {id: row.id, fromPage: '/marketing/sop/index'} : ''
})
},
......@@ -190,7 +238,7 @@ export default {
// 结束
handleEnd(row) {
this.secondConfirm('结束', '结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'sop', 'endSopEventApi', { sopId: row.id })
this.secondConfirm('结束', '结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'sop', 'endSopEventApi', {sopId: row.id})
},
// 1-新增;2-编辑
......@@ -210,36 +258,71 @@ export default {
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.sop-overview {
.overview-describe {
display: flex;
background: #E4E3FF;
color: #000000;
font-size: 14px;
padding: 10px;
margin: 16px 0;
img {
width: 14px;
height: 14px;
margin-right: 6px;
margin-top: 3px;
}
.describe-text {
line-height: 20px;
}
}
.sop-box {
padding: 32px 20px 12px;
.box-txt {
line-height: 24px;
margin-bottom: 28px;
}
.step-circle {
width: 32px;
height: 32px;
line-height: 32px;
text-align: center;
color: #5058ff;
background: rgba(80, 88, 255, 0.1);
border: 1px solid #5058ff;
//color: #5058ff;
//background: rgba(80, 88, 255, 0.1);
//border: 1px solid #5058ff;
color: #fff;
background: #5850FF;
border-radius: 32px;
margin-right: 8px;
margin: 0 auto;
flex: 0 0 auto;
}
.step-txt {
margin-top: 16px;
text-align: center;
width: 100%;
}
.step-line {
width: 120px;
width: 17%;
height: 1px;
background: #5850ff;
margin: 0 20px;
background: #F0F1F7;
margin: -25px 10px 0;
}
.sop-flex {
display: flex;
flex-wrap: wrap;
}
.chart-box {
.chart-item {
position: relative;
......@@ -252,13 +335,48 @@ export default {
border: 1px solid #eaeaea;
padding: 16px;
margin: 0 20px 20px 0;
.sop-type-orange {
position: absolute;
right: 0;
top: 0;
text-align: center;
padding: 0 8px;
line-height: 20px;
//width: 49px;
height: 20px;
font-size: 12px;
background: #FDEAE0;
color: #BE8C72;
border-radius: 1px 0 0 2px;
}
.sop-type-green {
position: absolute;
//width: 45px;
padding: 0 8px;
height: 17px;
right: 0;
top: 0;
text-align: center;
line-height: 20px;
width: 49px;
height: 20px;
font-size: 12px;
background: #DEF6E4;
color: #6FA17C;
border-radius: 1px 0 0 2px;
}
.chart-pie {
height: 104px;
margin: 8px 0;
}
.sop-name {
font-weight: 600;
}
.sop-btns {
display: none;
box-sizing: border-box;
......@@ -269,16 +387,19 @@ export default {
left: 0;
background: rgba(244, 244, 252, 0.85);
padding: 28px 0;
.btn-item {
display: block;
width: 89px;
margin: 0 auto;
}
.btn-item:nth-child(2) {
margin: 16px auto;
}
}
}
// .chart-item:nth-child(4n + 0) {
// margin-right: 0px;
// }
......@@ -287,6 +408,7 @@ export default {
}
}
}
.p-r-20 {
padding-right: 20px;
}
......
<template>
<div class="marketing">
<div class="container">
<div class="sop-title">SOP名称:</div>
<div class="funnel-box">
<div class="funnel-bg">
<img class="funnel-img" src="@/assets/sop/funel.png"/>
</div>
<div class="funnel-content">
<div class="left">
<div v-for="(item,index) in numList" :key="index">
{{ item.title }}
<span class="left-num">{{ list[item.num] || 0 }}</span>
</div>
</div>
<div class="right">
<div class="sort-box" v-for="(item,index) in sortList" :key="index">
<div>{{ item.title }}</div>
<div class="sort">{{ rates[item.sort] }}%</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "resultList",
props: {
sopId: {
type: String,
default: ''
}
},
data() {
return {
numList: [
{title: '营销客户', num: 'marketingCustomerCount'},
{title: '触达客户', num: 'reachCustomerCount'},
{title: '潜在客户', num: 'potentialCustomerCount'},
{title: '成单客户', num: 'dealCustomerCount'}
],
sortList: [
{title: '触达率', sort: 'reachRate'},
{title: '转化率', sort: 'percentConversion'},
{title: '成单率', sort: 'turnoverRatio'}
],
list: null,
rates: {
reachRate:'',
percentConversion:'',
turnoverRatio:''
}
}
},
async mounted() {
await this.getResult()
this.handleRates()
},
methods: {
async getResult() {
await this.$apis.sop.getEffectAnalysisApi({sopId: this.sopId}).then( res => {
this.list = res
}
)
},
handleRates() {
const {marketingCustomerCount, reachCustomerCount, potentialCustomerCount, dealCustomerCount} = this.list
this.rates.reachRate = (reachCustomerCount / marketingCustomerCount).toFixed(2) * 100
this.rates.percentConversion
= (potentialCustomerCount / marketingCustomerCount).toFixed(2) * 100
this.rates.turnoverRatio = (dealCustomerCount / marketingCustomerCount).toFixed(2) * 100
}
}
}
</script>
<style lang="scss" scoped>
.sop-title {
display: flex;
justify-content: center;
font-weight: 600;
font-size: 20px;
color: #1B233D;
line-height: 48px;
}
.funnel-box {
padding: 40px 0;
position: relative;
.funnel-bg {
position: absolute;
top: 40px;
left: 50%;
transform: translate(-50%);
width: 406px;
height: 288px;
.funnel-img {
width: 406px;
height: 288px;
}
}
.funnel-content {
display: flex;
justify-content: center;
height: 248px;
width: 100%;
padding-top: 40px;
//left: 50%;
//transform: translate(-50%);
.left,
.right {
display: flex;
}
.left {
//flex: 0 0 900px;
flex-flow: column;
justify-content: space-around;
align-items: flex-end;
// align-items: center;
z-index: 1;
font-size: 14px;
color: #2D2D33;
box-sizing: border-box;
padding-right: 20px;
margin-left: 200px;
div {
display: flex;
align-items: center;
margin-right: 28px;
.left-num {
font-size: 20px;
font-weight: 500;
margin-left: 4px;
}
}
}
.right {
//flex: 1;
//flex-flow: column;
//align-items: flex-start;
//margin-left: 130px;
color: #4466F0;
//padding-top: 20px;
font-size: 14px;
display: inline;
margin-left: 125px;
//position: relative;
.sort-box {
margin: 38px 0;
}
.sort-box:nth-last-child(2) {
margin-left: -40px;
}
.sort-box:last-child {
//position: absolute;
margin-left: -90px;
//top: 50%;
}
.sort {
font-size: 20px;
font-weight: bold;
margin-top: 6px;
}
}
}
}
</style>
......@@ -8,42 +8,73 @@
</div>
<div v-loading="loading">
<div>
<div class="tagUpdate-warp">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<!-- <span slot="footer">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span> -->
</glsx-combi-form>
<p class="tag-update">标签更新:{{ sopInfo.customerOptUpdate == 1 ? '开启' : '关闭' }}</p>
</div>
<div class="analysis-box flex-default">
<div class="analysis-box">
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
客户总数
<img src="@/assets/sop/customer-total.png" />
<img src="@/assets/sop/sop01.png"/>
<div class="analysis-name"> 客户总数
<p class="analysis-num">{{ baseData.sopEventList.length ? sopInfo.customerCount : '-' }}</p></div>
</div>
<p class="analysis-num">{{ baseData.sopEventList.length ? sopInfo.customerCount : '-' }}</p>
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
<img src="@/assets/sop/sop02.png"/>
<div class="analysis-name"> 已执行客户数
<p class="analysis-num">{{ baseData.sopEventList.length ? sopInfo.executedTargetCount : '-' }}111</p></div>
</div>
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
<img src="@/assets/sop/sop03.png"/>
<div class="analysis-name"> 执行率
<p class="analysis-num">{{ baseData.sopEventList.length ? sopInfo.executedRatio : '-' }}</p></div>
</div>
</div>
<div class="analysis-block back-image-green">
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
<img src="@/assets/sop/sop04.png"/>
<div class="analysis-name">
已触达客户数
<img src="@/assets/sop/touch-customer.png" />
<p class="analysis-num">
{{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.reachCustomerCount : '-' }}</p>
</div>
<p class="analysis-num">{{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.reachCustomerCount : '-' }}</p>
</div>
<div class="analysis-block back-image-blue">
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
<img src="@/assets/sop/sop05.png"/>
<div class="analysis-name">
触达率
</div>
<p class="analysis-num">{{ sopInfo.touchPercent }}</p>
<div id="completePie" class="chart-pie"></div>
</div>
</div>
<!-- <div id="completePie" class="chart-pie"></div>-->
</div>
</div>
<p class="m-b-10">客户触达明细</p>
<!-- 表格区域 开始 -->
<GLTable ref="touchListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<GLTable ref="touchListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm"
:tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
</div>
</div>
......@@ -54,7 +85,8 @@
import * as echarts from 'echarts'
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { pieOption } from './pieOption'
import {pieOption} from './pieOption'
export default {
name: 'touchList',
data() {
......@@ -95,6 +127,10 @@ export default {
listName: 'list',
tableColumns: [
{
label: '群名称',
prop: 'groupName',
},
{
label: '客户名称',
prop: 'customerName',
formatter: cellValue => {
......@@ -130,14 +166,21 @@ export default {
formatter: cellValue => {
return cellValue.viewCount || '0'
}
},
{
label: '查看总时长',
prop: 'viewDuration',
},
{
label: '点赞数',
prop: 'likeCount',
}, {
label: '评论数',
prop: 'commentCount',
}
// {
// label: '查看总时长',
// prop: ''
// }
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'},
baseData: {
sopEventList: []
}
......@@ -158,7 +201,8 @@ export default {
methods: {
getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => {
this.$apis.sop.getSopBaseInfoApi({sopId: this.sopId}).then(res => {
console.log(res)
this.sopInfo = res
this.sopInfo.touchPercent = this.baseData.sopEventList.length && this.sopInfo.customerCount ? Math.round((this.selectedEventInfo.eventStatistics.reachCustomerCount / this.sopInfo.customerCount) * 100).toFixed(0) + '%' : '-'
this.drawPie()
......@@ -259,7 +303,7 @@ export default {
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.sop-analysis {
.title {
height: 32px;
......@@ -267,28 +311,40 @@ export default {
font-size: 20px;
font-weight: 600;
}
.analysis-box {
margin-bottom: 40px;
display: flex;
//background: #F9FAFC;
.analysis-block {
position: relative;
box-sizing: border-box;
width: 216px;
height: 116px;
padding: 10px 20px 20px;
padding: 30px 20px 20px;
margin-right: 20px;
flex-basis: 0 0 auto;
background: #ffffff;
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f7ff 100%);
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
.analysis-title-block {
//flex-basis: 0 0 auto;;
//box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
background: #F9FAFC;
display: flex;
justify-content: space-between;
align-items: center;
.analysis-title-block {
//display: flex;
//justify-content: space-between;
margin-left: 16px;
align-items: center;
height: 40px;
line-height: 40px;
font-size: 14px;
color: #666666;
.analysis-name{
margin-left: 16px;
color: #333333;
}
}
.chart-pie {
position: absolute;
top: 20px;
......@@ -296,17 +352,30 @@ export default {
width: 70px;
height: 74px;
}
.analysis-num {
font-size: 26px;
font-weight: 600;
}
}
.analysis-block.back-image-green {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0fffa 100%);
}
.analysis-block.back-image-blue {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f0ff 100%);
}
}
}
.tagUpdate-warp {
display: flex;
//align-items: center;
.tag-update {
color: #5850FF;
font-size: 14px;
line-height: 32px;
}
}
</style>
......@@ -11,6 +11,9 @@
<el-tab-pane label="员工完成率分析" name="staffList">
<staff-list v-if="activeName == 'staffList'" :sopId="routeInfo.id"></staff-list>
</el-tab-pane>
<el-tab-pane label="效果分析" name="resultList">
<ResultList v-if="activeName == 'resultList'" :sopId="routeInfo.id"></ResultList>
</el-tab-pane>
</el-tabs>
<el-button :size="size" class="sop-back-btn" type="primary" @click="handleBack">返回</el-button>
</div>
......@@ -20,6 +23,7 @@
import completeList from './sopAnalysis/completeList.vue'
import touchList from './sopAnalysis/touchList.vue'
import staffList from './sopAnalysis/staffList.vue'
import ResultList from './sopAnalysis/resultList.vue'
export default {
name: 'gitfBag',
data() {
......@@ -36,11 +40,14 @@ export default {
components: {
completeList,
touchList,
staffList
staffList,
ResultList
},
created() {
this.routeInfo = this.$route.query
console.log(this.$route.query)
console.log(this.routeInfo)
},
methods: {
......
<!-- sop管理 -->
<template>
<div class="marketing sop-list">
<div class="m-b-20 p-relative">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit('add')">新建SOP</el-button>
<el-button class="sop-back-btn" :size="size" type="primary" @click="handleBack">返回</el-button>
<SopNav @clickNav="handleClick"/>
<div class="m-b-20 m-t-20 p-relative">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit('add')"> 新建SOP</el-button>
<!-- <el-button class="sop-back-btn" :size="size" type="primary" @click="handleBack">返回</el-button>-->
</div>
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
......@@ -22,15 +23,18 @@
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import SopNav from "views/sop/SopNav";
export default {
name: 'sopList',
components:{SopNav},
data() {
return {
size: 'small',
url: url,
searchForm: {
sopName: '',
sopStatus: ''
sopStatus: '',
sopType:''
},
// 搜索
searchFormData: [
......@@ -42,6 +46,15 @@ export default {
maxlength: 20
},
{
label: '类型',
name: 'sopType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'sopTypeList'
},
{
label: '营销状态',
name: 'sopStatus',
type: 'select',
......@@ -79,19 +92,19 @@ export default {
click: this.handleEnd
}
},
// {
// type: 'el-button',
// name: '查看',
// attrs: {
// type: 'text'
// },
// condition: row => {
// return row.sopStatus == 3
// },
// listeners: {
// click: row => this.handleEdit('look', row)
// }
// },
{
type: 'el-button',
name: '查看',
attrs: {
type: 'text'
},
condition: row => {
return row.sopStatus == 3
},
listeners: {
click: row => this.handleJump('viewSop', row)
}
},
{
type: 'el-button',
name: '复制',
......@@ -142,6 +155,15 @@ export default {
line: 1
},
{
label: '类型',
prop: 'sopType',
width: 240,
line: 1,
formatter: cellValue => {
return cellValue.sopType == 2 ? '群sop' :'客户sop'
}
},
{
label: '营销时间',
prop: 'startDate',
width: '220',
......@@ -192,6 +214,16 @@ export default {
confId: 3,
confName: '已结束'
}
],
sopTypeList: [
{
confId: 1,
confName: '客户sop'
},
{
confId: 2,
confName: '群sop'
},
]
}
}
......@@ -202,6 +234,9 @@ export default {
},
methods: {
handleClick(tab) {
tab == 'first' ? this.handleJump('index') : ''
},
handleJump(path, row = {}) {
this.$router.push({
path: '/sop/' + path,
......@@ -305,7 +340,28 @@ export default {
}
</script>
<style scoped>
<style lang="scss" scoped>
.gl-tabs{
/deep/ .el-tabs__header {
margin: 0 0 10px;
//background: #f0f1f7;
}
/deep/ .el-tabs__nav-wrap::after {
content: none;
}
/deep/ .el-tabs__item {
font-size: 16px;
color: #717171;
letter-spacing: 0.8px;
background: #f0f1f7 !important;
}
/deep/ .is-active {
color: #5850ff;
font-weight: 600;
background: #f0f1f7;
border-bottom: 2px solid #5850ff !important;
}
}
.sop-list .sop-back-btn {
position: absolute;
right: 0;
......
<template>
<div>?????</div>
</template>
<script>
export default {
name: "viewEvent",
mounted() {
console.log(this.$router)
}
}
</script>
<style scoped>
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!