Commit 8f0f508f by chenwq

sop

1 parent 3cdd6304
...@@ -88,6 +88,28 @@ const getSopStaffTaskListApi = params => { ...@@ -88,6 +88,28 @@ const getSopStaffTaskListApi = params => {
}) })
} }
// sop-完成率-根据evnetid获取失败事件列表
const getFailEventList = params => {
params.method = 'scrm.api.sop.sopEvent.listEventFailByEventId'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// sop-完成率-根据evnetid获取成功事件列表
// const getSuccessEventList = params => {
// params.method = 'scrm.api.sop.sopEvent.listEventFailByEventId'
// return http({
// url: 'rop-scrm-sop/router',
// method: 'POST',
// data: params,
// sign: true
// })
// }
// 校验当前商户的企微群发任务情况 // 校验当前商户的企微群发任务情况
const getTaskStatusApi = params => { const getTaskStatusApi = params => {
params.method = 'scrm.api.sop.task.merchantWWMsgTaskStatusCheck' params.method = 'scrm.api.sop.task.merchantWWMsgTaskStatusCheck'
...@@ -214,4 +236,4 @@ const getMomentListApi = params => { ...@@ -214,4 +236,4 @@ const getMomentListApi = params => {
}) })
} }
export default { getCustomerListApi, getCustomerByTagListApi, getCustomerCrowdApi, getSopInfoListApi, getSopBaseInfoApi, getEventListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, getTaskStatusApi, parseEventCountApi, deleteSopEventApi, endSopEventApi, batchEditSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi, getGroupListApi, getMaterialListApi, getMomentListApi } export default { getCustomerListApi, getCustomerByTagListApi, getCustomerCrowdApi, getSopInfoListApi, getSopBaseInfoApi, getEventListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, getFailEventList, getTaskStatusApi, parseEventCountApi, deleteSopEventApi, endSopEventApi, batchEditSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi, getGroupListApi, getMaterialListApi, getMomentListApi }
...@@ -313,6 +313,20 @@ export default { ...@@ -313,6 +313,20 @@ export default {
}) })
}, },
recoverCrowdList() {
var list = []
this.editForm[this.customerDataList[this.currentCustomerIdx].reqListName].forEach(item => {
list.push({
crowdId: item.crowdId,
crowdName: item.crowdName,
crowdDesc: item.crowdDesc,
total: item.total
})
})
this.customerDataList[this.currentCustomerIdx].list = JSON.parse(JSON.stringify(list))
this.changeCustomer()
},
recoverLabelList() { recoverLabelList() {
var list = [] var list = []
var groupIdList = [] var groupIdList = []
...@@ -369,6 +383,7 @@ export default { ...@@ -369,6 +383,7 @@ export default {
recoverCustomerList() { recoverCustomerList() {
switch (this.customerDataList[this.currentCustomerIdx].confName) { switch (this.customerDataList[this.currentCustomerIdx].confName) {
case '人群': case '人群':
this.recoverCrowdList()
break break
case '标签': case '标签':
this.recoverLabelList() this.recoverLabelList()
...@@ -497,6 +512,7 @@ export default { ...@@ -497,6 +512,7 @@ export default {
} }
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.$refs[this.editChildRef].validateField('customerInfoList') this.$refs.editFormRef.$refs[this.editChildRef].validateField('customerInfoList')
// this.key = new Date()
}, },
// 选择标签 // 选择标签
...@@ -514,7 +530,6 @@ export default { ...@@ -514,7 +530,6 @@ export default {
} }
this.customerDataList[this.currentCustomerIdx].list = obj this.customerDataList[this.currentCustomerIdx].list = obj
this.changeCustomer() this.changeCustomer()
this.key = new Date()
}, },
// 营销对象类型 // 营销对象类型
...@@ -570,7 +585,6 @@ export default { ...@@ -570,7 +585,6 @@ export default {
}, },
deleteCustPop() { deleteCustPop() {
// this.$confirm('修改的客户类型(是否加企微、是否有手机号)不一致,原有营销渠道可能不可用,系统自动重置原有营销事件。是否确定修改?', '提示', {
this.$confirm('修改的客户类型(是否加企微、是否有手机号)不一致,原有营销渠道可能不可用,系统自动重置原有营销事件。是否确定修改?', '提示', { this.$confirm('修改的客户类型(是否加企微、是否有手机号)不一致,原有营销渠道可能不可用,系统自动重置原有营销事件。是否确定修改?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -640,11 +654,13 @@ export default { ...@@ -640,11 +654,13 @@ export default {
this.$emit('handleTabChange', { activeName: 'editEvent', addOrEdit: addOrEdit, eventIndex: addOrEdit == 'add' ? '-1' : idx, info: { ...row, sopName: this.editForm.sopName } }) this.$emit('handleTabChange', { activeName: 'editEvent', addOrEdit: addOrEdit, eventIndex: addOrEdit == 'add' ? '-1' : idx, info: { ...row, sopName: this.editForm.sopName } })
}, },
reqCrowdAttrs() { }, reqCrowdAttrs() {
var list = JSON.parse(JSON.stringify(this.customerDataList[this.currentCustomerIdx].list))
return list
},
reqLabelAttrs() { reqLabelAttrs() {
var list = [] var list = []
console.log(this.customerDataList[this.currentCustomerIdx].list)
this.customerDataList[this.currentCustomerIdx].list.forEach(item => { this.customerDataList[this.currentCustomerIdx].list.forEach(item => {
item.labelList.forEach(subItem => { item.labelList.forEach(subItem => {
list.push({ list.push({
...@@ -719,6 +735,7 @@ export default { ...@@ -719,6 +735,7 @@ export default {
sopName: item.sopName, sopName: item.sopName,
sopId: this.routeInfo.id, sopId: this.routeInfo.id,
followerTypeId: item.followerTypeId, followerTypeId: item.followerTypeId,
followerTypeName: item.followerTypeName,
reachesType: item.reachesType, reachesType: item.reachesType,
reachesTypeSet: item.reachesTypeSet reachesTypeSet: item.reachesTypeSet
}) })
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRefChannel" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormDataChannel" :formRules="editRule"> <glsx-combi-form class="edit-form-container m-r-20" ref="editFormRefChannel" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormDataChannel" :formRules="editRule">
<div slot="channelSuffix" class="edit-tips m-t-8">预估受众用户总数:100/500</div> <div slot="channelSuffix" class="edit-tips m-t-8">预估受众用户总数:100/500</div>
<template slot="reachesType" slot-scope="scope"> <template slot="reachesType" slot-scope="scope">
<el-radio-group v-model="editForm[scope.scope.name]"> <el-radio-group v-model="editForm[scope.scope.name]" @change="handleReachesType">
<el-radio v-for="(item, index) in scope.scope.optionList" :key="index" :label="item[scope.scope.optionId]">{{ item[scope.scope.optionLabel] }}</el-radio> <el-radio v-for="(item, index) in scope.scope.optionList" :key="index" :label="item[scope.scope.optionId]">{{ item[scope.scope.optionLabel] }}</el-radio>
</el-radio-group> </el-radio-group>
<span class="m-l-20" v-if="editForm[scope.scope.name] == 2" id="reachesTypeSet"> <span class="m-l-20" v-if="editForm[scope.scope.name] == 2" id="reachesTypeSet">
...@@ -353,11 +353,6 @@ export default { ...@@ -353,11 +353,6 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionList: [ optionList: [
// {
// confId: 3,
// confName: '不限制',
// isDisabled: false
// },
{ {
confId: 1, confId: 1,
confName: '单次', confName: '单次',
...@@ -530,6 +525,10 @@ export default { ...@@ -530,6 +525,10 @@ export default {
this.recoveryEndTime() this.recoveryEndTime()
}, },
handleReachesType(val) {
this.editForm.reachesTypeSet = val == 1 ? 1 : ''
},
// 素材 // 素材
handleMaterialConfirm(val) { handleMaterialConfirm(val) {
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板) // additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
...@@ -642,6 +641,9 @@ export default { ...@@ -642,6 +641,9 @@ export default {
this.submit = false this.submit = false
return true return true
} }
// 跟进员工类型followerTypeId
this.editForm.followerTypeName = this.baseData.staffTypeList.find(item => item.id).businessName
// console.log(this.editForm)
if (this.editForm.repeatFlag == 'Y') { if (this.editForm.repeatFlag == 'Y') {
this.$apis.sop.parseEventCountApi(countParams).then(res => { this.$apis.sop.parseEventCountApi(countParams).then(res => {
this.editForm.eventCount = res.eventStatistics.eventCount this.editForm.eventCount = res.eventStatistics.eventCount
......
...@@ -48,14 +48,16 @@ ...@@ -48,14 +48,16 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="completeListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="completeListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<template slot="finishEventCount" slot-scope="scope"> <template slot="finishEventCount" slot-scope="scope">
<el-popover placement="bottom-end" width="200" trigger="click" content="因企微、短信等限制无法正常执行的事件"> <el-popover v-show="scope.scope.successEventList" placement="bottom-end" width="200" trigger="click" :content="scope.scope.successEventList">
<span class="cursor-pointer" slot="reference">{{ scope.scope.eventStatistics ? scope.scope.eventStatistics.finishEventCount : '-' }}</span> <span class="cursor-pointer" slot="reference" @click="handleGetSuccessEvent(scope.scope)">{{ scope.scope.eventStatistics ? scope.scope.eventStatistics.finishEventCount : '-' }}</span>
</el-popover> </el-popover>
<span v-show="!scope.scope.successEventList" class="cursor-pointer" @click="handleGetSuccessEvent(scope.scope)">{{ scope.scope.eventStatistics ? scope.scope.eventStatistics.finishEventCount : '-' }}</span>
</template> </template>
<template slot="failEventCount" slot-scope="scope"> <template slot="failEventCount" slot-scope="scope">
<el-popover placement="bottom-end" width="200" trigger="click" content="因企微、短信等限制无法正常执行的事件"> <el-popover v-show="scope.scope.failEventList" placement="bottom-end" width="200" trigger="click" :content="scope.scope.failEventList">
<span class="cursor-pointer" slot="reference">{{ scope.scope.eventStatistics ? scope.scope.eventStatistics.failEventCount : '-' }}</span> <span class="cursor-pointer" slot="reference" @click="handleGetFailEvent(scope.scope)">{{ scope.scope.eventStatistics ? scope.scope.eventStatistics.failEventCount : '-' }}</span>
</el-popover> </el-popover>
<span v-show="!scope.scope.failEventList" class="cursor-pointer" slot="reference" @click="handleGetFailEvent(scope.scope)">{{ scope.scope.eventStatistics ? scope.scope.eventStatistics.failEventCount : '-' }}</span>
</template> </template>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -186,6 +188,20 @@ export default { ...@@ -186,6 +188,20 @@ export default {
}) })
}, },
handleGetSuccessEvent(row) {
this.$apis.sop.getFailEventList({ id: row.id }).then(res => {
let idx = this.$refs.completeListRef.data.findIndex(item => item.id == row.id)
this.$refs.completeListRef.data[idx].successEventList = res
})
},
handleGetFailEvent(row) {
this.$apis.sop.getFailEventList({ id: row.id }).then(res => {
let idx = this.$refs.completeListRef.data.findIndex(item => item.id == row.id)
this.$refs.completeListRef.data[idx].failEventList = res
})
},
drawPie() { drawPie() {
let chartDom = document.getElementById('completePie') let chartDom = document.getElementById('completePie')
let myChart = echarts.init(chartDom) let myChart = echarts.init(chartDom)
......
...@@ -130,11 +130,11 @@ export default { ...@@ -130,11 +130,11 @@ export default {
formatter: cellValue => { formatter: cellValue => {
return cellValue.viewCount || '-' return cellValue.viewCount || '-'
} }
},
{
label: '查看总时长',
prop: ''
} }
// {
// label: '查看总时长',
// prop: ''
// }
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!