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
} }
...@@ -11,10 +11,16 @@ ...@@ -11,10 +11,16 @@
</div> </div>
<div class="checkbox-group-box" :style="{ height: heightBox + 'px' }" v-loading="loading"> <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"> <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> <span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }"
<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> @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> <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 v-for="(itm, idx) in item.labelList" :label="itm" :key="idx">{{ itm.name }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
...@@ -35,7 +41,8 @@ ...@@ -35,7 +41,8 @@
<p class="tag-selected-label" v-show="item.tagChecked.length">{{ item.labelGroup.name }}:</p> <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 v-for="(tag, idx) in item.tagChecked" :key="idx">
<span class="tag-txt" v-show="idx != 0">或</span> <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 }} {{ tag.name.length > 11 ? tag.name.slice(0, 11) + '...' : tag.name }}
</el-tag> </el-tag>
</span> </span>
...@@ -46,7 +53,8 @@ ...@@ -46,7 +53,8 @@
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <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 size="small" @click="handleClose">
取 消 取 消
</el-button> </el-button>
...@@ -57,14 +65,19 @@ ...@@ -57,14 +65,19 @@
</template> </template>
<script> <script>
import { utils } from 'glsx-common' import {utils} from 'glsx-common'
import util from '@/utils/util' import util from '@/utils/util'
export default { export default {
name: 'activityModel', name: 'activityModel',
props:{ props: {
labelTypesStr:{ labelTypesStr: {
type:String, type: String,
default:'自店标签,企业标签,系统标签' default: '自店标签,企业标签,系统标签'
},
isGroupTag: {
type: Boolean,
default: false
} }
}, },
data() { data() {
...@@ -111,10 +124,12 @@ export default { ...@@ -111,10 +124,12 @@ export default {
labelTreeReq: { labelTreeReq: {
pageNum: 1, pageNum: 1,
pageSize: 1000, pageSize: 1000,
shopId: this.$globalState.session.merchantId, // shopId: this.$globalState.session.merchantId,
shopId:'44209846',
labelGroupName: this.labelGroupName, labelGroupName: this.labelGroupName,
labelTypesStr: this.labelTypesStr, labelTypesStr: this.labelTypesStr,
edition: this.$globalState.session.merchantModel edition: this.$globalState.session.merchantModel,
belongType: this.isGroupTag ? 2 : 1
} }
}) })
.then(res => { .then(res => {
...@@ -287,18 +302,22 @@ export default { ...@@ -287,18 +302,22 @@ export default {
text-decoration: underline; text-decoration: underline;
cursor: pointer; cursor: pointer;
} }
.select-tag { .select-tag {
.label-box { .label-box {
margin-left: 42px; margin-left: 42px;
height: 100%; height: 100%;
overflow-y: scroll; overflow-y: scroll;
} }
.tag-selected-label { .tag-selected-label {
margin: 9px 0; margin: 9px 0;
} }
.tag-line-and { .tag-line-and {
position: relative; position: relative;
} }
.tag-line { .tag-line {
position: absolute; position: absolute;
left: 17px; left: 17px;
...@@ -306,6 +325,7 @@ export default { ...@@ -306,6 +325,7 @@ export default {
border-width: 0 0 0 1px; border-width: 0 0 0 1px;
height: 100%; height: 100%;
} }
.tag-and { .tag-and {
position: absolute; position: absolute;
background: #efeeff; background: #efeeff;
...@@ -314,9 +334,11 @@ export default { ...@@ -314,9 +334,11 @@ export default {
padding: 10px; padding: 10px;
z-index: 20; z-index: 20;
} }
.tag-txt { .tag-txt {
padding: 0 8px; padding: 0 8px;
} }
.customer-tag-selected-item { .customer-tag-selected-item {
background: #f4f6fc !important; background: #f4f6fc !important;
border: 1px solid rgba(232, 232, 234, 1) !important; border: 1px solid rgba(232, 232, 234, 1) !important;
...@@ -326,10 +348,13 @@ export default { ...@@ -326,10 +348,13 @@ export default {
margin-bottom: 10px; margin-bottom: 10px;
} }
} }
.tag-panel { .tag-panel {
display: flex; display: flex;
.tag-panel-select { .tag-panel-select {
width: 60%; width: 60%;
/deep/ { /deep/ {
.el-checkbox__label { .el-checkbox__label {
width: 100%; width: 100%;
...@@ -341,9 +366,11 @@ export default { ...@@ -341,9 +366,11 @@ export default {
} }
} }
} }
.tag-panel-selected { .tag-panel-selected {
width: 40%; width: 40%;
margin-left: 10px; margin-left: 10px;
.tag-box-header { .tag-box-header {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
...@@ -352,17 +379,20 @@ export default { ...@@ -352,17 +379,20 @@ export default {
padding-left: 20px !important; padding-left: 20px !important;
} }
} }
.tag-title { .tag-title {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
line-height: 22px; line-height: 22px;
} }
.tag-select-box { .tag-select-box {
margin-top: 10px; margin-top: 10px;
border-radius: 2px; border-radius: 2px;
border: 1px solid #eeeeee; border: 1px solid #eeeeee;
padding: 6px; padding: 6px;
.tag-box-header { .tag-box-header {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
...@@ -372,6 +402,7 @@ export default { ...@@ -372,6 +402,7 @@ export default {
margin: -6px; margin: -6px;
margin-bottom: 10px; margin-bottom: 10px;
padding: 0px 6px; padding: 0px 6px;
/deep/ { /deep/ {
.el-input { .el-input {
width: 60%; width: 60%;
...@@ -379,6 +410,7 @@ export default { ...@@ -379,6 +410,7 @@ export default {
} }
} }
} }
.tag-selected-item { .tag-selected-item {
margin: 0px 6px 6px 0px; margin: 0px 6px 6px 0px;
height: 26px; height: 26px;
...@@ -390,14 +422,17 @@ export default { ...@@ -390,14 +422,17 @@ export default {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
} }
.el-tree-node__expand-icon { .el-tree-node__expand-icon {
color: #5850ff; color: #5850ff;
font-size: 16px; font-size: 16px;
} }
.tag-group { .tag-group {
margin-left: 40px; margin-left: 40px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.el-checkbox { .el-checkbox {
width: 40%; width: 40%;
margin-bottom: 6px; margin-bottom: 6px;
...@@ -407,9 +442,11 @@ export default { ...@@ -407,9 +442,11 @@ export default {
} }
} }
} }
.checkbox-group-box { .checkbox-group-box {
overflow: auto; overflow: auto;
} }
.tag-selected-box { .tag-selected-box {
min-height: 200px; min-height: 200px;
display: flex; 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 { ...@@ -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
......
...@@ -14,12 +14,14 @@ ...@@ -14,12 +14,14 @@
:placeholder="!editForm.eventList.length ? '设置营销事件后自动补充' : editForm.startDate + (editForm.endDate ? ' - ' + editForm.endDate : '')" :placeholder="!editForm.eventList.length ? '设置营销事件后自动补充' : editForm.startDate + (editForm.endDate ? ' - ' + editForm.endDate : '')"
disabled></el-input> disabled></el-input>
</div> </div>
<!-- <div v-if="editForm.sopType =='1'">-->
<div slot="customerInfoList" slot-scope="scope"> <div slot="customerInfoList" slot-scope="scope">
<div v-if="!scope.scope.isDisabled"> <div v-if="!scope.scope.isDisabled">
<!-- <el-button class="default-blue-btn" :size="size" @click="handleSelectCustomer">选择客户</el-button> <!-- <el-button class="default-blue-btn" :size="size" @click="handleSelectCustomer">选择客户</el-button>
<el-button v-show="editForm.customerInfoList.length" :size="size" @click="handleResetCustomer">重置客户</el-button> --> <el-button v-show="editForm.customerInfoList.length" :size="size" @click="handleResetCustomer">重置客户</el-button> -->
<el-radio-group v-model="editForm[scope.scope.name]" @change="handleCustTypeChange"> <el-radio-group v-model="editForm[scope.scope.name]" @change="handleCustTypeChange">
<el-radio v-for="(item, index) in scope.scope.customerRadioList" :key="index" :label="item.confId"> <el-radio v-for="(item, index) in handleTypeSelect(scope.scope.customerRadioList)" :key="index"
:label="item.confId">
{{ item.confName }} {{ item.confName }}
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
...@@ -32,9 +34,12 @@ ...@@ -32,9 +34,12 @@
<!-- <div v-show="editForm.customerInfoList.length != 0" class="customer-box m-t-10"> --> <!-- <div v-show="editForm.customerInfoList.length != 0" class="customer-box m-t-10"> -->
<div v-show="item.list.length != 0"> <div v-show="item.list.length != 0">
<div class="customer-box m-t-10"> <div class="customer-box m-t-10">
<div class="customer-title">{{ item.confName }}客户:预估{{ item.customerCount }}人</div> <div class="customer-title">
{{ item.confName }}客户
:预估{{ item.customerCount }}人
</div>
<div :key="key" class="el-input-tag input-tag-wrapper"> <div :key="key" class="el-input-tag input-tag-wrapper">
<template v-if="item.confName == '标签'"> <template v-if="item.confName == '标签' || item.confName == '群标签'">
<div v-for="(subItem, subIdx) in item.list" :key="subIdx"> <div v-for="(subItem, subIdx) in item.list" :key="subIdx">
<el-tag v-for="(k, n) in subItem.labelList" :key="n" class="customer-tag" :size="size" <el-tag v-for="(k, n) in subItem.labelList" :key="n" class="customer-tag" :size="size"
type="info" :closable="!scope.scope.isDisabled" :disable-transitions="false" type="info" :closable="!scope.scope.isDisabled" :disable-transitions="false"
...@@ -44,7 +49,8 @@ ...@@ -44,7 +49,8 @@
</div> </div>
</template> </template>
<template v-else> <template v-else>
<el-tag v-for="(subItem, subIdx) in item.list" :key="subIdx" class="customer-tag" :size="size" <el-tag v-for="(subItem, subIdx) in item.list" :key="subIdx" class="customer-tag"
:size="size"
type="info" :closable="!scope.scope.isDisabled" :disable-transitions="false" type="info" :closable="!scope.scope.isDisabled" :disable-transitions="false"
@close="handleDeleteCustomer(subIdx)"> @close="handleDeleteCustomer(subIdx)">
<!-- <i class="el-icon-user-solid"></i> --> <!-- <i class="el-icon-user-solid"></i> -->
...@@ -59,9 +65,12 @@ ...@@ -59,9 +65,12 @@
</div> </div>
</div> </div>
</div> </div>
<!-- </div>-->
</glsx-combi-form> </glsx-combi-form>
</div> </div>
</div> </div>
<!-- 营销事件设置-->
<div class="container edit-container" v-loading="marketingEventLoading"> <div class="container edit-container" v-loading="marketingEventLoading">
<div class="edit-title flex" style="align-items: center"> <div class="edit-title flex" style="align-items: center">
<p>营销事件设置</p> <p>营销事件设置</p>
...@@ -69,7 +78,7 @@ ...@@ -69,7 +78,7 @@
content="请先完善sop名称和营销对象" placement="top"> content="请先完善sop名称和营销对象" placement="top">
<div> <div>
<el-button class="m-r-20" :disabled="!editForm.customerInfoList.length || !editForm.sopName" :size="size" <el-button class="m-r-20" :disabled="!editForm.customerInfoList.length || !editForm.sopName" :size="size"
type="primary" v-if="this.routeInfo.addOrEdit !=='look'" @click="handleEventEdit('add')">添加事件 type="primary" @click="handleEventEdit('add')">添加事件
</el-button> </el-button>
</div> </div>
</el-tooltip> </el-tooltip>
...@@ -92,7 +101,7 @@ ...@@ -92,7 +101,7 @@
item.repeatTime item.repeatTime
}}重复循环至</p> }}重复循环至</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y'">{{ item.eventEndDate }}</p> <p class="m-r-20" v-show="item.repeatFlag == 'Y'">{{ item.eventEndDate }}</p>
<p class="m-r-20 txt-blue"> <p class="m-r-20 txt-blue" v-if="editForm.sopType == 1">
{{ baseData.channelTypeList.find(k => k.confId == item.pushChannelType).confName }}</p> {{ baseData.channelTypeList.find(k => k.confId == item.pushChannelType).confName }}</p>
</div> </div>
<div> <div>
...@@ -125,7 +134,7 @@ ...@@ -125,7 +134,7 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="obj.attType == 7"> <div v-if="obj.attType == 7 || obj.attType == 4" >
<div class="welcome-activity-panel"> <div class="welcome-activity-panel">
<div class="welcome-activity-box"> <div class="welcome-activity-box">
<div class="welcome-activity-icon"> <div class="welcome-activity-icon">
...@@ -161,6 +170,20 @@ ...@@ -161,6 +170,20 @@
<span>{{ marketingContentJSON(obj).residueAmount }}</span> <span>{{ marketingContentJSON(obj).residueAmount }}</span>
</div> </div>
</template> </template>
<template v-else-if="marketingContentJSON(obj).selectType == 'crowdfunding'">
<div class="model-item-title" :title="marketingContentJSON(obj).activityName">
{{ marketingContentJSON(obj).activityName }}
</div>
<div class="model-item-content"></div>
<div class="model-item-content">
开始时间:
{{ marketingContentJSON(obj).startTime }}
</div>
<div class="model-item-content">
结束时间:
{{ marketingContentJSON(obj).endTime }}
</div>
</template>
<template v-else-if="marketingContentJSON(obj).selectType == 'activity'"> <template v-else-if="marketingContentJSON(obj).selectType == 'activity'">
<div class="model-item-title" :title="marketingContentJSON(obj).activityName"> <div class="model-item-title" :title="marketingContentJSON(obj).activityName">
{{ marketingContentJSON(obj).activityName }} {{ marketingContentJSON(obj).activityName }}
...@@ -222,7 +245,8 @@ ...@@ -222,7 +245,8 @@
:selectedCrowdList="JSON.parse(JSON.stringify(customerDataList[0].list))" :selectedCrowdList="JSON.parse(JSON.stringify(customerDataList[0].list))"
@handleCrowdCustClose="handleCrowdCustClose" @handleCrowdCustClose="handleCrowdCustClose"
@handleCrowdCustConfirm="handleDialogConfirm"></select-Crowd> @handleCrowdCustConfirm="handleDialogConfirm"></select-Crowd>
<select-tag ref="selectTagForm" @tagSelected="handleDialogConfirm" :dialogVisible="isTagVisible"></select-tag> <select-tag ref="selectTagForm" :isGroupTag="isGroupTag" @tagSelected="handleDialogConfirm"
:dialogVisible="isTagVisible"></select-tag>
<select-customer v-if="isAppointCustVisible" :dialogVisible="isAppointCustVisible" <select-customer v-if="isAppointCustVisible" :dialogVisible="isAppointCustVisible"
:parentSelectedCustomerList="customerDataList[2].list" :parentSelectedCustomerList="customerDataList[2].list"
@handleAppointCustClose="handleAppointCustClose" @handleAppointCustClose="handleAppointCustClose"
...@@ -240,6 +264,8 @@ export default { ...@@ -240,6 +264,8 @@ export default {
name: 'baseInfo', name: 'baseInfo',
data() { data() {
return { return {
isGroupTag: false,
pageStatus: '',
size: 'small', size: 'small',
title: '基本信息', title: '基本信息',
url: url, url: url,
...@@ -303,7 +329,14 @@ export default { ...@@ -303,7 +329,14 @@ export default {
otherConfName: 'customerPhone' otherConfName: 'customerPhone'
}, },
list: [] list: []
} },
{
confId: 4,
confName: '群标签',
reqListName: 'labelList',
customerCount: '',
list: []
},
], ],
editForm: { editForm: {
sopName: '', sopName: '',
...@@ -315,13 +348,15 @@ export default { ...@@ -315,13 +348,15 @@ export default {
customerInfoList: [], customerInfoList: [],
// customerIds: [], // customerIds: [],
customerOptUpdate: '1', customerOptUpdate: '1',
sopType: '1',
eventList: [] eventList: []
}, },
editRule: { editRule: {
sopName: [{required: true, message: '请输入SOP名称', trigger: 'change'}], sopName: [{required: true, message: '请输入SOP名称', trigger: 'change'}],
customerOptUpdate: [{required: true, message: '请选择更新人群', trigger: 'change'}], customerOptUpdate: [{required: true, message: '请选择更新人群', trigger: 'change'}],
customerOptType: [{required: true, message: '请选择有效对象', trigger: 'change'}], customerOptType: [{required: true, message: '请选择有效对象', trigger: 'change'}],
customerInfoList: [{required: true, message: '请选择营销对象', trigger: 'change'}] customerInfoList: [{required: true, message: '请选择营销对象', trigger: 'change'}],
sopType: [{required: true, message: '请选择类型', trigger: 'change'}]
}, },
isEdit: true, isEdit: true,
editFormData: [ editFormData: [
...@@ -333,6 +368,24 @@ export default { ...@@ -333,6 +368,24 @@ export default {
isDisabled: false isDisabled: false
}, },
{ {
label: '类型',
name: 'sopType',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
isDisabled: false,
optionList: [
{
confId: '1',
confName: '客户sop'
},
{
confId: '2',
confName: '群sop'
}
]
},
{
label: '营销时间', label: '营销时间',
name: 'startDate', name: 'startDate',
addHtml: 'startDate' addHtml: 'startDate'
...@@ -345,15 +398,23 @@ export default { ...@@ -345,15 +398,23 @@ export default {
customerRadioList: [ customerRadioList: [
{ {
confId: 2, confId: 2,
confName: '按人群选择客户' confName: '按人群选择客户',
sopType: 1
}, },
{ {
confId: 3, confId: 3,
confName: '按标签选择客户' confName: '按标签选择客户',
sopType: 1
}, },
{ {
confId: 1, confId: 1,
confName: '选择指定客户' confName: '选择指定客户',
sopType: 1
},
{
confId: 4,
confName: '按群标签选择群聊',
sopType: 2
} }
], ],
isDisabled: false isDisabled: false
...@@ -430,14 +491,31 @@ export default { ...@@ -430,14 +491,31 @@ export default {
}, },
deep: true deep: true
}, },
'editForm.sopType'(val) {
let show = false
this.isGroupTag = val == 1 ? false : true
this.editForm.customerOptType = val == 1 ? '' : 4
if (this.editForm.eventList.length ){
this.$confirm(`切换sop类型,系统将自动重置已配置的营销对象和营销事件。是否确定切换?`, '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'warning'
})
.then(() => {
this.cancelJump()
})
.catch(() => {
})
}
}
}, },
async mounted() { async mounted() {
this.setMinHeight('.sop-base-info') this.setMinHeight('.sop-base-info')
// this.routeInfo.addOrEdit == 'edit'
await this.getTheMaterialActivityCollection() await this.getTheMaterialActivityCollection()
if (['edit', 'copy', 'look'].includes(this.routeInfo.addOrEdit)) { if (['edit', 'copy'].includes(this.routeInfo.addOrEdit)) {
this.pageStatus = this.routeInfo.addOrEdit
this.getInfo() this.getInfo()
} else if (this.routeInfo.info) { } else if (this.routeInfo.info) {
this.setCustomer() this.setCustomer()
...@@ -446,6 +524,10 @@ export default { ...@@ -446,6 +524,10 @@ export default {
}, },
methods: { methods: {
handleTypeSelect(val) {
return val.filter(item => item.sopType == this.editForm.sopType)
},
async getTheMaterialActivityCollection() { async getTheMaterialActivityCollection() {
await this.$apis.welcomeword.getMaterialListApi({ await this.$apis.welcomeword.getMaterialListApi({
pageNum: 1, pageNum: 1,
...@@ -456,6 +538,7 @@ export default { ...@@ -456,6 +538,7 @@ export default {
this.materialGroupSet = res.data this.materialGroupSet = res.data
) )
}, },
async getEachActivity(interfaceName) { async getEachActivity(interfaceName) {
let params = { let params = {
pageNum: 1, pageNum: 1,
...@@ -504,6 +587,7 @@ export default { ...@@ -504,6 +587,7 @@ export default {
) )
return htm return htm
}, },
backupContentJson(val) { backupContentJson(val) {
if (typeof (val) == 'string') { if (typeof (val) == 'string') {
return JSON.parse(val) return JSON.parse(val)
...@@ -511,6 +595,7 @@ export default { ...@@ -511,6 +595,7 @@ export default {
return val return val
} }
}, },
marketingContentJSON(val) { marketingContentJSON(val) {
if (typeof (val.attContent) == 'string') { if (typeof (val.attContent) == 'string') {
return JSON.parse(val.attContent).marketingContent return JSON.parse(val.attContent).marketingContent
...@@ -607,6 +692,9 @@ export default { ...@@ -607,6 +692,9 @@ export default {
case '指定': case '指定':
this.recoverAppointList() this.recoverAppointList()
break break
case '群标签':
this.recoverLabelList()
break
} }
}, },
...@@ -785,7 +873,31 @@ export default { ...@@ -785,7 +873,31 @@ export default {
this.customerDataList[this.currentCustomerIdx].customerCount = res.count this.customerDataList[this.currentCustomerIdx].customerCount = res.count
}) })
}, },
// 群标签 预估
getGroupByTagList(){
var params = {
combineType: 2,
pageSize: 1,
pageNum: 1,
tagLists: []
}
this.customerDataList[this.currentCustomerIdx].list &&
this.customerDataList[this.currentCustomerIdx].list.forEach(item => {
item.labelList.length &&
item.labelList.forEach(subItem => {
params.tagLists.push({
groupId: item.labelGroup.id,
groupName: item.labelGroup.name,
groupType: item.labelType,
labelId: subItem.id,
labelName: subItem.name
})
})
})
this.$apis.sop.getCustomerByTagListApi(params).then(res => {
this.customerDataList[this.currentCustomerIdx].customerCount = res.count
})
},
getCustomerByTagList() { getCustomerByTagList() {
var params = { var params = {
combineType: 2, combineType: 2,
...@@ -823,6 +935,9 @@ export default { ...@@ -823,6 +935,9 @@ export default {
case '指定': case '指定':
this.customerDataList[this.currentCustomerIdx].customerCount = this.customerDataList[this.currentCustomerIdx].list.length this.customerDataList[this.currentCustomerIdx].customerCount = this.customerDataList[this.currentCustomerIdx].list.length
break break
case '群标签':
this.customerDataList[this.currentCustomerIdx].list.length && this.getGroupByTagList()
break
} }
this.editForm.customerInfoList = JSON.parse(JSON.stringify(this.customerDataList[this.currentCustomerIdx].list)) this.editForm.customerInfoList = JSON.parse(JSON.stringify(this.customerDataList[this.currentCustomerIdx].list))
this.$refs.editFormRef && this.$refs.editFormRef.$refs[this.editChildRef].validateField('customerInfoList') this.$refs.editFormRef && this.$refs.editFormRef.$refs[this.editChildRef].validateField('customerInfoList')
...@@ -840,8 +955,11 @@ export default { ...@@ -840,8 +955,11 @@ export default {
case '指定': case '指定':
this.handleAppointCustClose() this.handleAppointCustClose()
break break
case '群标签':
break
} }
this.customerDataList[this.currentCustomerIdx].list = obj this.customerDataList[this.currentCustomerIdx].list = obj
console.log(this.customerDataList)
this.changeCustomer() this.changeCustomer()
}, },
...@@ -862,7 +980,7 @@ export default { ...@@ -862,7 +980,7 @@ export default {
handleSelectCustomer(idx) { handleSelectCustomer(idx) {
this.currentCustomerIdx = idx this.currentCustomerIdx = idx
// 0-人群;1-标签;2-指定客户 // 0-人群;1-标签;2-指定客户 3 群聊
switch (idx) { switch (idx) {
case 0: case 0:
this.handleCrowdCustClose() this.handleCrowdCustClose()
...@@ -874,6 +992,9 @@ export default { ...@@ -874,6 +992,9 @@ export default {
case 2: case 2:
this.handleAppointCustClose() this.handleAppointCustClose()
break break
case 3:
this.isTagVisible = !this.isTagVisible
this.$refs.selectTagForm.init(JSON.parse(JSON.stringify(this.customerDataList[idx].list)))
} }
}, },
...@@ -982,7 +1103,7 @@ export default { ...@@ -982,7 +1103,7 @@ export default {
addOrEdit: addOrEdit, addOrEdit: addOrEdit,
eventIndex: addOrEdit == 'add' ? '-1' : idx, eventIndex: addOrEdit == 'add' ? '-1' : idx,
parentCustomerObj: this.parentCustomerObj, parentCustomerObj: this.parentCustomerObj,
info: {...row, sopName: this.editForm.sopName} info: {...row, sopName: this.editForm.sopName,sopType:this.editForm.sopType}
}) })
}, },
...@@ -991,6 +1112,7 @@ export default { ...@@ -991,6 +1112,7 @@ export default {
return list return list
}, },
reqLabelAttrs() { reqLabelAttrs() {
var list = [] var list = []
this.customerDataList[this.currentCustomerIdx].list.forEach(item => { this.customerDataList[this.currentCustomerIdx].list.forEach(item => {
...@@ -1004,6 +1126,7 @@ export default { ...@@ -1004,6 +1126,7 @@ export default {
}) })
}) })
}) })
console.log(list)
return list return list
}, },
...@@ -1038,6 +1161,8 @@ export default { ...@@ -1038,6 +1161,8 @@ export default {
return this.reqLabelAttrs() return this.reqLabelAttrs()
case '指定': case '指定':
return this.reqAppointAttrs() return this.reqAppointAttrs()
case '群标签':
return this.reqLabelAttrs()
} }
}, },
...@@ -1055,7 +1180,7 @@ export default { ...@@ -1055,7 +1180,7 @@ export default {
params.customerCount = this.customerDataList[this.currentCustomerIdx].customerCount params.customerCount = this.customerDataList[this.currentCustomerIdx].customerCount
delete params.customerInfoList delete params.customerInfoList
this.customerDataList.forEach((item, index) => { this.customerDataList.forEach((item, index) => {
if (index != this.currentCustomerIdx) { if (index != this.currentCustomerIdx && item.reqListName !== 'labelList') {
delete params[item.reqListName] delete params[item.reqListName]
} }
}) })
...@@ -1111,7 +1236,7 @@ export default { ...@@ -1111,7 +1236,7 @@ export default {
videoImageStorage = [] videoImageStorage = []
} }
// 活动 // 活动
if (obj && obj.attType == 7) { if (obj && (obj.attType == 7 || obj.attType == 4)) {
params.eventList[index].additionalType = 2 params.eventList[index].additionalType = 2
let attContentCopy = JSON.parse(obj.attContent) let attContentCopy = JSON.parse(obj.attContent)
if (attContentCopy.marketingContent.selectType == 'coupon') { if (attContentCopy.marketingContent.selectType == 'coupon') {
...@@ -1129,7 +1254,7 @@ export default { ...@@ -1129,7 +1254,7 @@ export default {
params.eventList[index].objectId = attContentCopy.marketingId params.eventList[index].objectId = attContentCopy.marketingId
} }
// 还差一个秒杀活动 // 还差一个秒杀活动
if (attContentCopy.marketingContent.selectType == 'activity') { if (attContentCopy.marketingContent.selectType == 'activity' || attContentCopy.marketingContent.selectType == 'crowdfunding' ) {
params.eventList[index].objectType = 8 params.eventList[index].objectType = 8
params.eventList[index].objectId = attContentCopy.marketingId params.eventList[index].objectId = attContentCopy.marketingId
...@@ -1158,7 +1283,7 @@ export default { ...@@ -1158,7 +1283,7 @@ export default {
let backupattContent = typeof (obj.attContent) == 'string' ? JSON.parse(obj.attContent) : obj.attContent let backupattContent = typeof (obj.attContent) == 'string' ? JSON.parse(obj.attContent) : obj.attContent
params.eventList[index].objectId = backupattContent.objectId params.eventList[index].objectId = backupattContent.objectId
} }
if (obj && obj.attType == 7) { if (obj && (obj.attType == 7 || obj.attTye ==4)) {
let attContentCopy = JSON.parse(obj.attContent) let attContentCopy = JSON.parse(obj.attContent)
if (attContentCopy.marketingContent.selectType == 'coupon') { if (attContentCopy.marketingContent.selectType == 'coupon') {
params.eventList[index].objectType = 16 params.eventList[index].objectType = 16
...@@ -1172,7 +1297,7 @@ export default { ...@@ -1172,7 +1297,7 @@ export default {
params.eventList[index].objectType = 15 params.eventList[index].objectType = 15
params.eventList[index].objectCombId = attContentCopy.marketingId params.eventList[index].objectCombId = attContentCopy.marketingId
} }
if (attContentCopy.marketingContent.selectType == 'activity') { if (attContentCopy.marketingContent.selectType == 'activity' || attContentCopy.marketingContent.selectType == 'crowdfunding') {
params.eventList[index].objectType = 13 params.eventList[index].objectType = 13
params.eventList[index].objectCombId = attContentCopy.marketingId params.eventList[index].objectCombId = attContentCopy.marketingId
} }
...@@ -1228,7 +1353,7 @@ export default { ...@@ -1228,7 +1353,7 @@ export default {
let backupattContent = typeof (obj.attContent) == 'string' ? JSON.parse(obj.attContent) : obj.attContent let backupattContent = typeof (obj.attContent) == 'string' ? JSON.parse(obj.attContent) : obj.attContent
params.eventList[index].objectId = backupattContent.objectId params.eventList[index].objectId = backupattContent.objectId
} }
if (obj && obj.attType == 7) { if (obj && (obj.attType == 7 || obj.attType == 4 )) {
params.eventList[index].additionalType = 2 params.eventList[index].additionalType = 2
let attContentCopy = JSON.parse(obj.attContent) let attContentCopy = JSON.parse(obj.attContent)
if (attContentCopy.marketingContent.selectType == 'coupon') { if (attContentCopy.marketingContent.selectType == 'coupon') {
...@@ -1244,7 +1369,7 @@ export default { ...@@ -1244,7 +1369,7 @@ export default {
params.eventList[index].objectType = 7 params.eventList[index].objectType = 7
params.eventList[index].objectId = attContentCopy.marketingId params.eventList[index].objectId = attContentCopy.marketingId
} }
if (attContentCopy.marketingContent.selectType == 'activity') { if (attContentCopy.marketingContent.selectType == 'activity' || attContentCopy.marketingContent.selectType == 'crowdfunding') {
params.eventList[index].objectType = 8 params.eventList[index].objectType = 8
params.eventList[index].objectId = attContentCopy.marketingId params.eventList[index].objectId = attContentCopy.marketingId
} }
...@@ -1267,7 +1392,7 @@ export default { ...@@ -1267,7 +1392,7 @@ export default {
let backupattContent = typeof (obj.attContent) == 'string' ? JSON.parse(obj.attContent) : obj.attContent let backupattContent = typeof (obj.attContent) == 'string' ? JSON.parse(obj.attContent) : obj.attContent
params.eventList[index].objectId = backupattContent.objectId params.eventList[index].objectId = backupattContent.objectId
} }
if (obj && obj.attType == 7) { if (obj && (obj.attType == 7 || obj.attType == 4)) {
let attContentCopy = JSON.parse(obj.attContent) let attContentCopy = JSON.parse(obj.attContent)
if (attContentCopy.marketingContent.selectType == 'coupon') { if (attContentCopy.marketingContent.selectType == 'coupon') {
params.eventList[index].objectType = 16 params.eventList[index].objectType = 16
...@@ -1281,7 +1406,7 @@ export default { ...@@ -1281,7 +1406,7 @@ export default {
params.eventList[index].objectType = 15 params.eventList[index].objectType = 15
params.eventList[index].objectCombId = attContentCopy.marketingId params.eventList[index].objectCombId = attContentCopy.marketingId
} }
if (attContentCopy.marketingContent.selectType == 'activity') { if (attContentCopy.marketingContent.selectType == 'activity' || attContentCopy.marketingContent.selectType == 'crowdfunding') {
params.eventList[index].objectType = 13 params.eventList[index].objectType = 13
params.eventList[index].objectCombId = attContentCopy.marketingId params.eventList[index].objectCombId = attContentCopy.marketingId
} }
...@@ -1608,4 +1733,9 @@ export default { ...@@ -1608,4 +1733,9 @@ export default {
color: #f56c6c; color: #f56c6c;
font-size: 12px; font-size: 12px;
} }
.group-select {
font-size: 14px;
color: #999999;
}
</style> </style>
...@@ -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> <template>
<div class="sop-overview marketing edit-box"> <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"> <div class="container edit-container m-b-20">
<p class="edit-title">营销SOP</p> <p class="edit-title">营销SOP</p>
<div class="sop-box"> <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 class="flex-center">
<div>
<p class="step-circle">1</p> <p class="step-circle">1</p>
<p class="step-txt">创建SOP</p> <p class="step-txt">创建SOP</p>
</div>
<p class="step-line"></p> <p class="step-line"></p>
<div>
<p class="step-circle">2</p> <p class="step-circle">2</p>
<p class="step-txt">添加推送客户</p> <p class="step-txt">添加推送客户</p>
</div>
<p class="step-line"></p> <p class="step-line"></p>
<div>
<p class="step-circle">3</p> <p class="step-circle">3</p>
<p class="step-txt">设置推送内容及时间</p> <p class="step-txt">设置推送内容及时间</p>
</div>
<p class="step-line"></p> <p class="step-line"></p>
<div>
<p class="step-circle">4</p> <p class="step-circle">4</p>
<p class="step-txt">系统定时自动推送/任务下发</p> <p class="step-txt">系统定时自动推送/任务下发</p>
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="container edit-container m-b-20"> <div class="container edit-container m-b-20">
<div class="edit-title flex p-r-20"> <div class="edit-title flex p-r-20">
<p>SOP监测</p> <p>SOP监测</p>
<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="handleEdit('add')">-->
<GLButton :size="size" type="default" class="default-blue-btn" fn="管理SOP" @click="handleJump('sopList')">管理全部SOP</GLButton> <!-- 创建SOP-->
</div> <!-- </GLButton>-->
<!-- <GLButton :size="size" type="default" class="default-blue-btn" fn="管理SOP" @click="handleJump('sopList')">管理全部SOP</GLButton>-->
<!-- </div>-->
</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-box sop-flex" v-show="sopList.length">
<div class="chart-item" v-for="item in sopList" :key="item.id"> <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> <p class="sop-name">{{ item.sopName }}</p>
<div :id="'sopPie' + item.id" class="chart-pie"></div> <div :id="'sopPie' + item.id" class="chart-pie"></div>
<p>{{ item.dateRange }}</p> <p>{{ item.dateRange }}</p>
<div class="sop-btns"> <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"
<GLButton class="btn-item" :size="size" type="primary" display="disabled" fn="编辑SOP" @click="handleEdit('edit', item)">编辑</GLButton> @click="handleJump('sopAnalysisList', item)">SOP分析
<GLButton class="btn-item" :size="size" type="primary" display="disabled" fn="结束SOP" @click="handleEnd(item)">结束</GLButton> </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>
</div> </div>
<div v-show="!sopList.length" class="txt-center" style="height: 400px;"> <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> <p class="m-t-10">暂无数据</p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import * as echarts from 'echarts' import * as echarts from 'echarts'
import * as moment from 'moment' import * as moment from 'moment'
import SopNav from "views/sop/SopNav";
export default { export default {
name: 'sopIndex', name: 'sopIndex',
components: {SopNav},
data() { data() {
return { return {
activeName: 'first',
size: 'small', size: 'small',
// 环形图配置 // 环形图配置
pieOption: { pieOption: {
...@@ -104,10 +149,13 @@ export default { ...@@ -104,10 +149,13 @@ export default {
}, },
methods: { methods: {
handleClick(tab) {
tab == 'second' ? this.handleJump('sopList') : ''
},
handleJump(path, row = {}) { handleJump(path, row = {}) {
this.$router.push({ this.$router.push({
path: '/sop/' + path, 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 { ...@@ -190,7 +238,7 @@ export default {
// 结束 // 结束
handleEnd(row) { handleEnd(row) {
this.secondConfirm('结束', '结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'sop', 'endSopEventApi', { sopId: row.id }) this.secondConfirm('结束', '结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'sop', 'endSopEventApi', {sopId: row.id})
}, },
// 1-新增;2-编辑 // 1-新增;2-编辑
...@@ -210,36 +258,71 @@ export default { ...@@ -210,36 +258,71 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.sop-overview { .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 { .sop-box {
padding: 32px 20px 12px; padding: 32px 20px 12px;
.box-txt { .box-txt {
line-height: 24px; line-height: 24px;
margin-bottom: 28px; margin-bottom: 28px;
} }
.step-circle { .step-circle {
width: 32px; width: 32px;
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
text-align: center; text-align: center;
color: #5058ff; //color: #5058ff;
background: rgba(80, 88, 255, 0.1); //background: rgba(80, 88, 255, 0.1);
border: 1px solid #5058ff; //border: 1px solid #5058ff;
color: #fff;
background: #5850FF;
border-radius: 32px; border-radius: 32px;
margin-right: 8px; margin-right: 8px;
margin: 0 auto;
flex: 0 0 auto; flex: 0 0 auto;
} }
.step-txt {
margin-top: 16px;
text-align: center;
width: 100%;
}
.step-line { .step-line {
width: 120px; width: 17%;
height: 1px; height: 1px;
background: #5850ff; background: #F0F1F7;
margin: 0 20px; margin: -25px 10px 0;
} }
.sop-flex { .sop-flex {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.chart-box { .chart-box {
.chart-item { .chart-item {
position: relative; position: relative;
...@@ -252,13 +335,48 @@ export default { ...@@ -252,13 +335,48 @@ export default {
border: 1px solid #eaeaea; border: 1px solid #eaeaea;
padding: 16px; padding: 16px;
margin: 0 20px 20px 0; 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 { .chart-pie {
height: 104px; height: 104px;
margin: 8px 0; margin: 8px 0;
} }
.sop-name { .sop-name {
font-weight: 600; font-weight: 600;
} }
.sop-btns { .sop-btns {
display: none; display: none;
box-sizing: border-box; box-sizing: border-box;
...@@ -269,16 +387,19 @@ export default { ...@@ -269,16 +387,19 @@ export default {
left: 0; left: 0;
background: rgba(244, 244, 252, 0.85); background: rgba(244, 244, 252, 0.85);
padding: 28px 0; padding: 28px 0;
.btn-item { .btn-item {
display: block; display: block;
width: 89px; width: 89px;
margin: 0 auto; margin: 0 auto;
} }
.btn-item:nth-child(2) { .btn-item:nth-child(2) {
margin: 16px auto; margin: 16px auto;
} }
} }
} }
// .chart-item:nth-child(4n + 0) { // .chart-item:nth-child(4n + 0) {
// margin-right: 0px; // margin-right: 0px;
// } // }
...@@ -287,6 +408,7 @@ export default { ...@@ -287,6 +408,7 @@ export default {
} }
} }
} }
.p-r-20 { .p-r-20 {
padding-right: 20px; 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 @@ ...@@ -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"/>
<div class="analysis-name">
已触达客户数 已触达客户数
<img src="@/assets/sop/touch-customer.png" /> <p class="analysis-num">
{{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.reachCustomerCount : '-' }}</p>
</div> </div>
<p class="analysis-num">{{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.reachCustomerCount : '-' }}</p>
</div> </div>
<div class="analysis-block back-image-blue">
</div>
<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">
触达率 触达率
</div>
<p class="analysis-num">{{ sopInfo.touchPercent }}</p> <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>
</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()
...@@ -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);
.analysis-title-block {
display: flex; display: flex;
justify-content: space-between; align-items: center;
.analysis-title-block {
//display: flex;
//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>
<template>
<div class="marketing edit-box">
<div class="sop-base-info">
<div class="container m-b-20">
<p class="edit-title">{{ title }}</p>
<div class="base-info-list">
<div class="base-info-item">
<span>sop名称:</span>
<span>{{ editForm.sopName }}</span>
</div>
<div class="base-info-item">
<span>sop类型:</span>
<span>{{ editForm.sopType == '2' ? '群sop' : '客户sop' }}</span>
</div>
<div class="base-info-item">
<span>营销时间:</span>
<span>{{ editForm.startDate }}~{{ editForm.endDate }}</span>
</div>
<div class="base-info-item">
<span>更新人群:</span>
<span>{{ editForm.customerOptUpdate == '1' ? '从不更新' : '自动更新' }}</span>
</div>
<div class="base-info-item">
<span>营销对象:</span>
<span>{{
editForm.customerOptType == '1' ? '选择指定客户' : editForm.customerOptType == '2' ? '按人群选择客户' : editForm.customerOptType == '3' ? '按标签选择客户' : ''
}}</span>
<div class="base-info-obj">
<el-tag v-for="(item,index) in marketingObj" :key="index" class="customer-tag" :size="size"
type="info" :disable-transitions="false"
>
<span v-if="editForm.customerOptType == '1'">{{ item.customerName }}</span>
<span v-if="editForm.customerOptType == '2'">{{ item.crowdName }}</span>
<span v-if="editForm.customerOptType == '3'">{{ item.labelGroupName }}:{{ item.labelName }}</span>
</el-tag>
</div>
</div>
</div>
</div>
<!-- 营销事件设置-->
<div class="container edit-container" v-loading="marketingEventLoading">
<div class="edit-title flex" style="align-items: center">
<p>营销事件设置</p>
</div>
<div v-show="!editForm.eventList.length" class="event-empty">
<img class="empty-img" :src="url"/>
<p class="empty-txt">暂无营销事件</p>
</div>
<div v-show="editForm.eventList.length" class="event-box">
<div class="event-item" v-for="(item, index) in editForm.eventList" :key="index">
<div class="flex-default event-title">
<p class="m-r-20">{{ item.eventTime }}</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y' && item.repeatMode == 1">每天重复循环至</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y' && item.repeatMode == 2">每周{{
item.repeatTime
}}重复循环至</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y' && item.repeatMode == 3">每月{{
item.repeatTime
}}重复循环至</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y'">{{ item.eventEndDate }}</p>
<p class="m-r-20 txt-blue">
{{ baseData.channelTypeList.find(k => k.confId == item.pushChannelType).confName }}</p>
</div>
<div>
<div v-for="(obj,index) in backupContentJson(item.backupContent)" :key="index">
<div class="textHidden" :title="obj.attContent" v-if="obj.attType == 1"
v-html="tramWord(obj.attContent)"></div>
</div>
<div class="event-inline" v-for="(obj,index) in backupContentJson(item.backupContent)" :key="index">
<div>
<div v-if="obj.attType == 2">
<img class="model-item-img"
:src="obj.attContent" alt/>
</div>
<div v-if="obj.attType == 3">
<video class="model-item-img" :src="obj.attContent" controls="controls"/>
</div>
<div v-if="obj.attType == 6">
<div class="welcome-activity-panel">
<div class="welcome-activity-box">
<img src="@/assets/welcomeWord/material-icon.png" alt=""/>
<div class="welcome-activity-desc">
<div class="model-item-title">{{ backupContentJson(obj.attContent).fileName }}</div>
</div>
</div>
</div>
</div>
<div v-if="obj.attType == 7">
<div class="welcome-activity-panel">
<div class="welcome-activity-box">
<img src="@/assets/welcomeWord/activity-icon.png" alt=""/>
<div class="welcome-activity-desc">
<template v-if="marketingContentJSON(obj).selectType == 'card'">
<div class="model-item-title" :title="marketingContentJSON(obj).equityName">
{{ marketingContentJSON(obj).equityName }}
</div>
</template>
<template v-else-if="marketingContentJSON(obj).selectType == 'package'">
<div class="model-item-title" :title="marketingContentJSON(obj).packageName">
{{ marketingContentJSON(obj).packageName }}
</div>
</template>
<template v-else-if="marketingContentJSON(obj).selectType == 'coupon'">
<div class="model-item-title" :title="marketingContentJSON(obj).couponName">
{{ marketingContentJSON(obj).couponName }}
</div>
</template>
<template v-else-if="marketingContentJSON(obj).selectType == 'activity'">
<div class="model-item-title" :title="marketingContentJSON(obj).activityName">
{{ marketingContentJSON(obj).activityName }}
</div>
</template>
<template v-else>
<div class="model-item-title" :title="marketingContentJSON(obj.attContent).couponName">
{{ marketingContentJSON(obj).equityName }}
</div>
</template>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="event-btns">
<el-button type="primary" size="small" @click="handleViewEvent">查看</el-button>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
import emoji from '@/utils/emo'
export default {
name: 'baseInfo',
data() {
return {
size: 'small',
title: '基本信息',
url: url,
marketingEventLoading: false,
deleteIdList: [],
labelWidth: '144px',
imgIcon: {
1: 'material',
2: 'activity',
3: 'coupon',
4: 'nickname'
},
baseData: {
channelTypeList: [
{
confId: 1,
confName: '企业微信'
},
{
confId: 2,
confName: '短信'
},
{
confId: 3,
confName: '微信朋友圈'
}
]
},
currentCustomerIdx: -1,
editForm: {
sopName: '',
startDate: '',
endDate: '',
customerOptType: '',
customerInfoList: [],
customerOptUpdate: '1',
sopType: '1',
eventList: []
},
// 素材活动集合
marketingObj: []
}
},
async mounted() {
this.setMinHeight('.sop-base-info')
this.getInfo()
},
methods: {
handleViewEvent() {
console.log(this.editForm)
this.$router.push('/sop/viewEvent/' + this.editForm)
},
tramWord(val) {
let htm = val.replace(
/\[([\u4E00-\u9FA56]{1,4}|OK|NO|666)]/gi,
function (res) {
let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
return `<img style='width:25px;height:25px' src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
}
)
return htm
},
backupContentJson(val) {
if (typeof (val) == 'string') {
return JSON.parse(val)
} else {
return val
}
},
marketingContentJSON(val) {
if (typeof (val.attContent) == 'string') {
return JSON.parse(val.attContent).marketingContent
} else {
return val.attContent.marketingContent
}
},
getInfo() {
this.$apis.sop.getSopInfoDetailApi({sopId: this.$route.query.id}).then(async res => {
this.editForm = res
this.marketingObj = res.customerOptType == '1' ? res.customerList : res.customerOptType == '2' ? res.crowdList : res.customerOptType == '3' ? res.labelList : ''
}
)
},
}
}
</script>
<style lang="scss">
.sop-base-info {
.customer-box {
width: 567px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
.customer-title {
box-sizing: border-box;
height: 39px;
line-height: 39px;
padding: 0 10px;
// border-bottom: 1px solid #dcdfe6;
}
.input-tag-wrapper {
max-height: 227px;
overflow: auto;
position: relative;
font-size: 14px;
padding: 0 10px 10px;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
display: flex;
align-items: center;
font-size: 14px;
.el-tag.el-tag--info .el-tag__close {
color: #909399 !important;
background: transparent !important;
}
.customer-tag {
margin: 4px;
}
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
}
.event-empty {
height: 234px;
text-align: center;
.empty-img {
margin: 80px 0 12px;
}
.empty-txt {
color: #000000;
font-size: 14px;
opacity: 0.65;
}
}
.event-box {
padding: 32px 20px;
.event-item {
position: relative;
padding: 16px;
background: #f7f7f7;
border: 1px solid rgba(220, 223, 230, 1);
margin-bottom: 20px;
.event-title {
height: 32px;
line-height: 32px;
margin-bottom: 12px;
}
.model-item-img {
width: 90px;
height: 78px;
margin-right: 5px;
}
.event-link {
margin-top: 12px;
display: flex;
align-items: center;
}
.event-content {
line-height: 24px;
}
.event-flex {
display: flex;
}
.event-btns {
position: absolute;
top: 16px;
right: 16px;
display: flex;
.newBtnSty {
margin-right: 8px;
}
}
}
.event-item:last-child {
margin-bottom: 0;
}
}
}
.welcome-activity-panel {
display: flex;
margin-right: 10px;
.welcome-activity-box {
cursor: pointer;
position: relative;
min-width: 180px;
//background: #fafbfe;
border-radius: 2px;
//border: 1px solid #e8e8ea;
//padding: 8px;
box-sizing: border-box;
display: flex;
&:hover {
.delete-solid {
opacity: 1;
}
}
.welcome-activity-icon {
width: 36px;
height: 36px;
margin-right: 8px;
position: relative;
background-size: 100% 100%;
img {
width: 100%;
height: 100%;
}
video {
object-fit: fill;
}
.el-icon-video-play {
position: absolute;
top: 7px;
left: 7px;
font-size: 22px;
color: rgba(255, 255, 255, 0.8);
}
.img-filter-box {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
display: flex;
font-size: 13px;
align-items: center;
justify-content: center;
}
}
.delete-solid {
transition: all 0.5s;
opacity: 0;
position: absolute;
top: 0px;
right: 0px;
width: 14px;
height: 14px;
background: rgba(0, 0, 0, 0.5);
display: flex;
font-size: 12px;
align-items: center;
justify-content: center;
}
.el-icon-delete-solid {
color: rgba(255, 255, 255, 0.5);
}
.model-item-title {
margin-left: 3px;
font-size: 14px;
color: #999999;
line-height: 20px;
max-width: 150px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.model-item-content {
font-size: 12px;
font-weight: 400;
color: #999999;
line-height: 17px;
max-width: 150px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
span {
color: #5850ff;
}
}
}
}
.textHidden {
max-width: 1000px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.event-inline {
margin-top: 8px;
display: inline-block
}
.base-info-list {
padding: 32px 84px;
display: grid;
grid-template-columns: repeat(2, 50%);
width: 100%;
.base-info-item {
padding-bottom: 16px;
color: #666666;
font-size: 14px;
.base-info-obj {
background: #F9F9F9;
margin: 10px 0 0 64px;
padding: 8px;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!