Commit 501ffdc3 by 前端

更新六月份版本sop代码

1 parent d56fe0f3
...@@ -225,4 +225,14 @@ const getMomentListApi = params => { ...@@ -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 => { ...@@ -101,6 +101,17 @@ const crowdfundingActivity = params => {
sign: true 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 => { const templatePage = params => {
params.method = `${path}template.page.search` params.method = `${path}template.page.search`
...@@ -165,5 +176,6 @@ export default { ...@@ -165,5 +176,6 @@ export default {
templateUpdate, templateUpdate,
templateSave, templateSave,
templateDetail, templateDetail,
crowdfundingActivity crowdfundingActivity,
bulgeActivity
} }
<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 { ...@@ -57,16 +57,17 @@ export default {
this.activeName = obj.activeName this.activeName = obj.activeName
}, },
handleInfoConfirm(info) { 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.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.phone = info.predictCountObj.phone
this.$refs.baseInfoRef.parentCustomerObj.qiwei = info.predictCountObj.qiwei this.$refs.baseInfoRef.parentCustomerObj.qiwei = info.predictCountObj.qiwei
this.$refs.baseInfoRef.dealSopTime() this.$refs.baseInfoRef.dealSopTime()
console.log(this.$refs.baseInfoRef.editForm.eventList)
this.jumpBaseInfo({ activeName: 'baseInfo' }) this.jumpBaseInfo({ activeName: 'baseInfo' })
}, },
jumpEvent(obj) { jumpEvent(obj) {
console.log(obj)
this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit) this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit)
this.$set(this.eventObj, 'info', obj.info) this.$set(this.eventObj, 'info', obj.info)
this.parentCustomerObj = obj.parentCustomerObj this.parentCustomerObj = obj.parentCustomerObj
......
...@@ -4,9 +4,11 @@ ...@@ -4,9 +4,11 @@
<!-- 营销时间 --> <!-- 营销时间 -->
<div class="container m-b-20"> <div class="container m-b-20">
<p class="edit-title">营销时间</p> <p class="edit-title">营销时间</p>
<glsx-combi-form class="edit-form-container m-r-20" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px" <!-- sop名称-->
:isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="sopNameFormData" <!-- <glsx-combi-form class="edit-form-container m-r-20" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px"-->
:formRules="editRule"></glsx-combi-form> <!-- :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="sopNameFormData"-->
<!-- :formRules="editRule"></glsx-combi-form>-->
<glsx-combi-form ref="editFormRefDate" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px" <glsx-combi-form ref="editFormRefDate" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px"
:formRef="editChildRef" :formObj="editForm" :formData="editFormDataDate" :formRules="editRule"> :formRef="editChildRef" :formObj="editForm" :formData="editFormDataDate" :formRules="editRule">
<div slot="eventStartDate" slot-scope="scope"> <div slot="eventStartDate" slot-scope="scope">
...@@ -23,9 +25,11 @@ ...@@ -23,9 +25,11 @@
:placeholder="scope.scope.placeholder"></el-time-picker> :placeholder="scope.scope.placeholder"></el-time-picker>
</div> </div>
</glsx-combi-form> </glsx-combi-form>
<glsx-combi-form ref="editFormRefRepeat" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px" <glsx-combi-form ref="editFormRefRepeat" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px"
:isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormDataRepeat" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormDataRepeat"
:formRules="editRule"></glsx-combi-form> :formRules="editRule"></glsx-combi-form>
<glsx-combi-form ref="editFormRefTime" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px" <glsx-combi-form ref="editFormRefTime" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px"
:formRef="editChildRef" :formObj="editForm" :formData="editFormDataTime" :formRules="editRule"> :formRef="editChildRef" :formObj="editForm" :formData="editFormDataTime" :formRules="editRule">
<div class="flex-default m-r-20" slot="repeatTime" slot-scope="scope"> <div class="flex-default m-r-20" slot="repeatTime" slot-scope="scope">
...@@ -70,15 +74,15 @@ ...@@ -70,15 +74,15 @@
</el-form> </el-form>
</div> </div>
<div class="preview"> <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>--> <!-- <MessagePreview :previewView="previewList" v-if="editForm.pushChannelType == 2"></MessagePreview>-->
<FriendGroupPreview :previewView="previewList" v-if="editForm.pushChannelType == 3"></FriendGroupPreview> <FriendGroupPreview :previewView="previewList" v-if="editForm.pushChannelType == 3"></FriendGroupPreview>
</div> </div>
</div> </div>
</div> </div>
<!-- 营销渠道 --> <!-- 营销设置 -->
<div class="container edit-container"> <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" <glsx-combi-form class="edit-form-container m-r-20" ref="editFormRefChannel" :isEdit="isEdit"
:labelWidth="labelWidth" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :labelWidth="labelWidth" defaultWidth="320px" :isBlock="true" :formRef="editChildRef"
:formObj="editForm" :formData="editFormDataChannel" :formRules="editRule"> :formObj="editForm" :formData="editFormDataChannel" :formRules="editRule">
...@@ -219,7 +223,7 @@ export default { ...@@ -219,7 +223,7 @@ export default {
activityStatus: 2, activityStatus: 2,
currentPage: 1 currentPage: 1
} }
} },
// { // {
// itemName: '无忧服务', // itemName: '无忧服务',
// itemValue: 6, // itemValue: 6,
...@@ -235,16 +239,25 @@ export default { ...@@ -235,16 +239,25 @@ export default {
// merchantId: this.$globalState.session.merchantId // merchantId: this.$globalState.session.merchantId
// } // }
// } // }
// { {
// itemName: '众筹活动', itemName: '众筹活动',
// itemValue: 7, itemValue: 6,
// itemType: 'crowdfunding', itemType: 'crowdfunding',
// getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity, getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity,
// params: { params: {
// currentPage: 1, currentPage: 1
// activityStatus: 2 }
// } },
// } // 膨胀金活动
{
itemName: '膨胀金活动',
itemValue: 7,
itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.bulgeActivity,
params: {
currentPage: 1
}
},
] ]
}, },
{ {
...@@ -288,10 +301,11 @@ export default { ...@@ -288,10 +301,11 @@ export default {
eventContent: '', eventContent: '',
// eventCount: '', // eventCount: '',
object: {}, object: {},
//营销渠道 //营销设置
followerTypeId: '', followerTypeId: '',
reachesType: 1, reachesType: 1,
reachesTypeSet: '' reachesTypeSet: '',
labelOptUpdate: 1
}, },
// 营销内容 // 营销内容
previewList: [], previewList: [],
...@@ -330,10 +344,11 @@ export default { ...@@ -330,10 +344,11 @@ export default {
eventEndDate: [{required: true, message: '请选择营销结束日期', trigger: 'change'}], eventEndDate: [{required: true, message: '请选择营销结束日期', trigger: 'change'}],
// eventContent: [{required: true, message: '', trigger: 'input'}], // eventContent: [{required: true, message: '', trigger: 'input'}],
repeatFlag: [{required: true, message: '请选择是否重复', trigger: 'change'}], repeatFlag: [{required: true, message: '请选择是否重复', trigger: 'change'}],
pushChannelType: [{required: true, message: '请选择营销渠道', trigger: 'change'}], pushChannelType: [{required: true, message: '请选择营销设置', trigger: 'change'}],
followerTypeId: [{required: true, message: '请选择跟进员工类型', trigger: 'change'}], followerTypeId: [{required: true, message: '请选择跟进员工类型', trigger: 'change'}],
reachesType: [{required: true, message: '请选择参与次数', trigger: 'change'}], reachesType: [{required: true, message: '请选择营销次数', trigger: 'change'}],
reachesTypeSet: [{required: true, message: '请输入参与次数', trigger: 'change'}] reachesTypeSet: [{required: true, message: '请输入营销次数', trigger: 'change'}],
labelOptUpdate: [{required: true, message: '请选择标签更新', trigger: 'change'}]
}, },
isEdit: true, isEdit: true,
sopNameFormData: [ sopNameFormData: [
...@@ -410,7 +425,7 @@ export default { ...@@ -410,7 +425,7 @@ export default {
this.editForm.repeatMode = 1 this.editForm.repeatMode = 1
this.editForm.repeatTime = '' this.editForm.repeatTime = ''
this.editForm.eventEndDate = '' this.editForm.eventEndDate = ''
// 参与次数 // 营销次数
this.editForm.reachesType = 1 this.editForm.reachesType = 1
this.editForm.reachesTypeSet = 1 this.editForm.reachesTypeSet = 1
} }
...@@ -472,7 +487,7 @@ export default { ...@@ -472,7 +487,7 @@ export default {
], ],
editFormDataChannel: [ editFormDataChannel: [
{ {
label: '营销渠道', label: '营销设置',
name: 'pushChannelType', name: 'pushChannelType',
tips: '企业微信和微信朋友圈会自动给客户的跟进专员派发群发任务;短信会自动推送至客户手机。', tips: '企业微信和微信朋友圈会自动给客户的跟进专员派发群发任务;短信会自动推送至客户手机。',
type: 'radio', type: 'radio',
...@@ -511,7 +526,7 @@ export default { ...@@ -511,7 +526,7 @@ export default {
optionsName: 'staffTypeList' optionsName: 'staffTypeList'
}, },
{ {
label: '参与次数', label: '营销次数',
name: 'reachesType', name: 'reachesType',
addHtml: 'reachesType', addHtml: 'reachesType',
optionId: 'confId', optionId: 'confId',
...@@ -528,7 +543,26 @@ export default { ...@@ -528,7 +543,26 @@ export default {
isDisabled: false isDisabled: false
} }
], ],
} },
{
label: '标签更新',
name: 'labelOptUpdate',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
optionList: [
{
confId: 1,
confName: '开启',
isDisabled: false
},
{
confId: 2,
confName: '关闭',
isDisabled: false
},
],
},
], ],
baseData: { baseData: {
weekList: [], weekList: [],
...@@ -609,6 +643,15 @@ export default { ...@@ -609,6 +643,15 @@ export default {
mounted() { mounted() {
Object.assign(this.editForm, this.eventObj.info) 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.getStaffTypeList()
this.$nextTick(() => { this.$nextTick(() => {
this.editStatus = false this.editStatus = false
...@@ -630,6 +673,7 @@ export default { ...@@ -630,6 +673,7 @@ export default {
} }
}) })
}, },
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle) var item = this[formName].find(k => k.name == refreshSigle)
...@@ -718,17 +762,25 @@ export default { ...@@ -718,17 +762,25 @@ export default {
this.recoveryEndTime() this.recoveryEndTime()
this.getCustomerNum() this.getCustomerNum()
}, },
getWelcomeDetails() { getWelcomeDetails() {
let backupContent = typeof (this.editForm.backupContent) == 'string' ? JSON.parse(this.editForm.backupContent) : this.editForm.backupContent let backupContent = typeof (this.editForm.backupContent) == 'string' ? JSON.parse(this.editForm.backupContent) : this.editForm.backupContent
console.log(backupContent)
if (backupContent) { if (backupContent) {
const previewList = backupContent.map(item => { 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 return item
}) })
this.$refs.welcome.updateList(previewList) this.$refs.welcome.updateList(previewList)
} else if (this.editForm.object && this.editForm.object.length != 0) { } else if (this.editForm.object && this.editForm.object.length != 0) {
const previewList = JSON.parse(backupContent).map(item => { 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 return item
}) })
this.$refs.welcome.updateList(previewList) this.$refs.welcome.updateList(previewList)
...@@ -744,6 +796,7 @@ export default { ...@@ -744,6 +796,7 @@ export default {
handleMarketingContent() { handleMarketingContent() {
let params = {} let params = {}
const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList 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)) { if ((previewList[0] && previewList[0].attType == 1 && previewList[0].attContent == '') || !previewList.length || (previewList[0] && previewList[0].attType !== 1)) {
this.hasEventContentDisplaySpecial = true this.hasEventContentDisplaySpecial = true
} else { } else {
...@@ -954,10 +1007,12 @@ export default { ...@@ -954,10 +1007,12 @@ export default {
this.submit = false this.submit = false
return true return true
} }
console.log(this.editForm)
this.$emit('handleInfoConfirm', {baseInfo: this.editForm, predictCountObj: this.predictCountObj}) this.$emit('handleInfoConfirm', {baseInfo: this.editForm, predictCountObj: this.predictCountObj})
}) })
} else { } else {
// this.editForm.eventCount = 1 // this.editForm.eventCount = 1
console.log(this.editForm)
this.$emit('handleInfoConfirm', {baseInfo: this.editForm, predictCountObj: this.predictCountObj}) this.$emit('handleInfoConfirm', {baseInfo: this.editForm, predictCountObj: this.predictCountObj})
} }
}, },
......
<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 @@ ...@@ -8,42 +8,73 @@
</div> </div>
<div v-loading="loading"> <div v-loading="loading">
<div> <div class="tagUpdate-warp">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<!-- <span slot="footer"> <!-- <span slot="footer">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span> --> </span> -->
</glsx-combi-form> </glsx-combi-form>
<p class="tag-update">标签更新:{{ sopInfo.customerOptUpdate == 1 ? '开启' : '关闭' }}</p>
</div> </div>
<div class="analysis-box flex-default"> <div class="analysis-box">
<div class="analysis-block"> <div class="analysis-block">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
客户总数 <img src="@/assets/sop/sop01.png"/>
<img src="@/assets/sop/customer-total.png" /> <div class="analysis-name"> 客户总数
<p class="analysis-num">{{ baseData.sopEventList.length ? sopInfo.customerCount : '-' }}</p></div>
</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>
<div class="analysis-block back-image-green">
<div class="analysis-block">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
已触达客户数 <img src="@/assets/sop/sop04.png"/>
<img src="@/assets/sop/touch-customer.png" /> <div class="analysis-name">
已触达客户数
<p class="analysis-num">
{{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.reachCustomerCount : '-' }}</p>
</div>
</div> </div>
<p class="analysis-num">{{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.reachCustomerCount : '-' }}</p>
</div> </div>
<div class="analysis-block back-image-blue"> <div class="analysis-block">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
触达率 <img src="@/assets/sop/sop05.png"/>
<div class="analysis-name">
触达率
<p class="analysis-num">{{ sopInfo.touchPercent }}</p>
</div>
</div> </div>
<p class="analysis-num">{{ sopInfo.touchPercent }}</p>
<div id="completePie" class="chart-pie"></div> <!-- <div id="completePie" class="chart-pie"></div>-->
</div> </div>
</div> </div>
<p class="m-b-10">客户触达明细</p> <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 --> <!-- 表格区域 end -->
</div> </div>
</div> </div>
...@@ -54,7 +85,8 @@ ...@@ -54,7 +85,8 @@
import * as echarts from 'echarts' import * as echarts from 'echarts'
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { pieOption } from './pieOption' import {pieOption} from './pieOption'
export default { export default {
name: 'touchList', name: 'touchList',
data() { data() {
...@@ -95,6 +127,10 @@ export default { ...@@ -95,6 +127,10 @@ export default {
listName: 'list', listName: 'list',
tableColumns: [ tableColumns: [
{ {
label: '群名称',
prop: 'groupName',
},
{
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
formatter: cellValue => { formatter: cellValue => {
...@@ -130,14 +166,21 @@ export default { ...@@ -130,14 +166,21 @@ export default {
formatter: cellValue => { formatter: cellValue => {
return cellValue.viewCount || '0' 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: { baseData: {
sopEventList: [] sopEventList: []
} }
...@@ -158,7 +201,8 @@ export default { ...@@ -158,7 +201,8 @@ export default {
methods: { methods: {
getBaseInfo() { 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 = res
this.sopInfo.touchPercent = this.baseData.sopEventList.length && this.sopInfo.customerCount ? Math.round((this.selectedEventInfo.eventStatistics.reachCustomerCount / this.sopInfo.customerCount) * 100).toFixed(0) + '%' : '-' this.sopInfo.touchPercent = this.baseData.sopEventList.length && this.sopInfo.customerCount ? Math.round((this.selectedEventInfo.eventStatistics.reachCustomerCount / this.sopInfo.customerCount) * 100).toFixed(0) + '%' : '-'
this.drawPie() this.drawPie()
...@@ -179,23 +223,23 @@ export default { ...@@ -179,23 +223,23 @@ export default {
3: '微信朋友圈' 3: '微信朋友圈'
} }
this.$apis.sop this.$apis.sop
.getEventListApi(params) .getEventListApi(params)
.then(res => { .then(res => {
this.baseData.sopEventList = res.list this.baseData.sopEventList = res.list
if (this.baseData.sopEventList.length) { if (this.baseData.sopEventList.length) {
this.baseData.sopEventList.forEach(item => { this.baseData.sopEventList.forEach(item => {
item.confName = item.eventStartDate + (item.repeatFlag == 'Y' ? '-' + item.eventEndDate : '') + ' ' + item.eventTime + ' ' + pushChannelTypeList[item.pushChannelType] item.confName = item.eventStartDate + (item.repeatFlag == 'Y' ? '-' + item.eventEndDate : '') + ' ' + item.eventTime + ' ' + pushChannelTypeList[item.pushChannelType]
}) })
this.getOptionsList('searchFormData', false) this.getOptionsList('searchFormData', false)
this.searchForm.eventId = this.baseData.sopEventList[0].id this.searchForm.eventId = this.baseData.sopEventList[0].id
this.selectedEventInfo = this.baseData.sopEventList[0] this.selectedEventInfo = this.baseData.sopEventList[0]
} }
this.getBaseInfo() this.getBaseInfo()
this.$refs.touchListRef.refreshTable() this.$refs.touchListRef.refreshTable()
}) })
.finally(() => { .finally(() => {
this.loading = false this.loading = false
}) })
}, },
beforeSearchFn() { beforeSearchFn() {
...@@ -259,7 +303,7 @@ export default { ...@@ -259,7 +303,7 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.sop-analysis { .sop-analysis {
.title { .title {
height: 32px; height: 32px;
...@@ -267,28 +311,40 @@ export default { ...@@ -267,28 +311,40 @@ export default {
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
} }
.analysis-box { .analysis-box {
margin-bottom: 40px; margin-bottom: 40px;
display: flex;
//background: #F9FAFC;
.analysis-block { .analysis-block {
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
width: 216px; width: 216px;
height: 116px; height: 116px;
padding: 10px 20px 20px; padding: 30px 20px 20px;
margin-right: 20px; margin-right: 20px;
flex-basis: 0 0 auto; //flex-basis: 0 0 auto;;
background: #ffffff; //box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f7ff 100%); background: #F9FAFC;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1); display: flex;
align-items: center;
.analysis-title-block { .analysis-title-block {
display: flex; //display: flex;
justify-content: space-between; //justify-content: space-between;
margin-left: 16px;
align-items: center; align-items: center;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
.analysis-name{
margin-left: 16px;
color: #333333;
}
} }
.chart-pie { .chart-pie {
position: absolute; position: absolute;
top: 20px; top: 20px;
...@@ -296,17 +352,30 @@ export default { ...@@ -296,17 +352,30 @@ export default {
width: 70px; width: 70px;
height: 74px; height: 74px;
} }
.analysis-num { .analysis-num {
font-size: 26px; font-size: 26px;
font-weight: 600; font-weight: 600;
} }
} }
.analysis-block.back-image-green { .analysis-block.back-image-green {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0fffa 100%); background-image: linear-gradient(0deg, #f8f8fc 0%, #f0fffa 100%);
} }
.analysis-block.back-image-blue { .analysis-block.back-image-blue {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f0ff 100%); 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> </style>
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
<el-tab-pane label="员工完成率分析" name="staffList"> <el-tab-pane label="员工完成率分析" name="staffList">
<staff-list v-if="activeName == 'staffList'" :sopId="routeInfo.id"></staff-list> <staff-list v-if="activeName == 'staffList'" :sopId="routeInfo.id"></staff-list>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="效果分析" name="resultList">
<ResultList v-if="activeName == 'resultList'" :sopId="routeInfo.id"></ResultList>
</el-tab-pane>
</el-tabs> </el-tabs>
<el-button :size="size" class="sop-back-btn" type="primary" @click="handleBack">返回</el-button> <el-button :size="size" class="sop-back-btn" type="primary" @click="handleBack">返回</el-button>
</div> </div>
...@@ -20,6 +23,7 @@ ...@@ -20,6 +23,7 @@
import completeList from './sopAnalysis/completeList.vue' import completeList from './sopAnalysis/completeList.vue'
import touchList from './sopAnalysis/touchList.vue' import touchList from './sopAnalysis/touchList.vue'
import staffList from './sopAnalysis/staffList.vue' import staffList from './sopAnalysis/staffList.vue'
import ResultList from './sopAnalysis/resultList.vue'
export default { export default {
name: 'gitfBag', name: 'gitfBag',
data() { data() {
...@@ -36,11 +40,14 @@ export default { ...@@ -36,11 +40,14 @@ export default {
components: { components: {
completeList, completeList,
touchList, touchList,
staffList staffList,
ResultList
}, },
created() { created() {
this.routeInfo = this.$route.query this.routeInfo = this.$route.query
console.log(this.$route.query)
console.log(this.routeInfo)
}, },
methods: { methods: {
......
<!-- sop管理 --> <!-- sop管理 -->
<template> <template>
<div class="marketing sop-list"> <div class="marketing sop-list">
<div class="m-b-20 p-relative"> <SopNav @clickNav="handleClick"/>
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit('add')">新建SOP</el-button> <div class="m-b-20 m-t-20 p-relative">
<el-button class="sop-back-btn" :size="size" type="primary" @click="handleBack">返回</el-button> <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>
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
...@@ -22,15 +23,18 @@ ...@@ -22,15 +23,18 @@
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import SopNav from "views/sop/SopNav";
export default { export default {
name: 'sopList', name: 'sopList',
components:{SopNav},
data() { data() {
return { return {
size: 'small', size: 'small',
url: url, url: url,
searchForm: { searchForm: {
sopName: '', sopName: '',
sopStatus: '' sopStatus: '',
sopType:''
}, },
// 搜索 // 搜索
searchFormData: [ searchFormData: [
...@@ -42,6 +46,15 @@ export default { ...@@ -42,6 +46,15 @@ export default {
maxlength: 20 maxlength: 20
}, },
{ {
label: '类型',
name: 'sopType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'sopTypeList'
},
{
label: '营销状态', label: '营销状态',
name: 'sopStatus', name: 'sopStatus',
type: 'select', type: 'select',
...@@ -79,19 +92,19 @@ export default { ...@@ -79,19 +92,19 @@ export default {
click: this.handleEnd click: this.handleEnd
} }
}, },
// { {
// type: 'el-button', type: 'el-button',
// name: '查看', name: '查看',
// attrs: { attrs: {
// type: 'text' type: 'text'
// }, },
// condition: row => { condition: row => {
// return row.sopStatus == 3 return row.sopStatus == 3
// }, },
// listeners: { listeners: {
// click: row => this.handleEdit('look', row) click: row => this.handleJump('viewSop', row)
// } }
// }, },
{ {
type: 'el-button', type: 'el-button',
name: '复制', name: '复制',
...@@ -142,6 +155,15 @@ export default { ...@@ -142,6 +155,15 @@ export default {
line: 1 line: 1
}, },
{ {
label: '类型',
prop: 'sopType',
width: 240,
line: 1,
formatter: cellValue => {
return cellValue.sopType == 2 ? '群sop' :'客户sop'
}
},
{
label: '营销时间', label: '营销时间',
prop: 'startDate', prop: 'startDate',
width: '220', width: '220',
...@@ -192,6 +214,16 @@ export default { ...@@ -192,6 +214,16 @@ export default {
confId: 3, confId: 3,
confName: '已结束' confName: '已结束'
} }
],
sopTypeList: [
{
confId: 1,
confName: '客户sop'
},
{
confId: 2,
confName: '群sop'
},
] ]
} }
} }
...@@ -202,6 +234,9 @@ export default { ...@@ -202,6 +234,9 @@ export default {
}, },
methods: { methods: {
handleClick(tab) {
tab == 'first' ? this.handleJump('index') : ''
},
handleJump(path, row = {}) { handleJump(path, row = {}) {
this.$router.push({ this.$router.push({
path: '/sop/' + path, path: '/sop/' + path,
...@@ -305,7 +340,28 @@ export default { ...@@ -305,7 +340,28 @@ export default {
} }
</script> </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 { .sop-list .sop-back-btn {
position: absolute; position: absolute;
right: 0; 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!