Commit 7d23fc42 by 前端

Merge branch 'chenwq_dev_v2.3.0' into 'v2.3.0'

Chenwq dev v2.3.0

See merge request !150
2 parents 4e6e7063 4c4fa0ff
import { http, http_common } from '@/main'
import { http, http_common, http2 } from '@/main'
const defaultPath = 'scrm.api.carlife.'
const getMerchantGoodsListApi = params => {
......@@ -94,4 +94,38 @@ const pictureUpload = params => {
noSignAttr: ['file']
})
}
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload }
const querylabeltree = params => {
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
// params.sessionId = session
return http2({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
// 人群列表
const getCrowdTreeListApi = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http2({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
// 跟进员工类型
const getStaffTypeListApi = params => {
params.method = 'entmicro.api.staff.listEntBusinessType'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload, querylabeltree, getCrowdTreeListApi, getStaffTypeListApi }
......@@ -4,7 +4,6 @@ const defaultPath = 'scrm.api.coupon.'
//优惠券列表
const getCouponListApi = params => {
// params.method = `${defaultPath}list.merchant`
params.method = 'scrm.backstage.coupon.list.merchant'
return http({
url: 'rop-scrm-coupon/router',
......
......@@ -15,7 +15,17 @@ const getCustomerListApi = params => {
// 标签获取客户列表
const getCustomerByTagListApi = params => {
params.method = 'entmicro.api.customer.getCustomerPageByTag'
params.source = 'scrm-home'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 人群获取客户列表
const getCustomerCrowdApi = params => {
params.method = 'entmicro.api.customer.crowd.page'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
......@@ -78,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 => {
params.method = 'scrm.api.sop.task.merchantWWMsgTaskStatusCheck'
......@@ -204,4 +236,4 @@ const getMomentListApi = params => {
})
}
export default { getCustomerListApi, getCustomerByTagListApi, 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 }
......@@ -523,6 +523,14 @@ html {
border-radius: 4px 0px 0px 0px;
border: 1px solid #f4f6fc !important;
}
.marketing .tips-icon {
display: inline-block;
width: 14px;
height: 14px;
margin-right: 12px;
vertical-align: middle;
cursor: pointer;
}
.el-message--info {
height: 40px;
......
......@@ -6,12 +6,11 @@
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '144px' : labelWidth" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'">
<span class="tips-icon"></span>
</el-tooltip>
{{ item.label }}
<el-popover placement="top" width="200" trigger="hover" :content="item.tips">
<img slot="reference" class="tips-icon" src="./images/icon-tip.png" />
</el-popover>
</span>
<span v-else-if="!item.isHide && item.label" slot="label">
<span v-else-if="!item.isHide && item.label && !item.tips" slot="label">
<span class="combi-form-label" :style="{ width: item.labelWidth ? item.labelWidth + labelPaddingRight + 'px' : '', 'padding-right': isEdit ? '12px' : labelPaddingRight + 'px' }">{{ item.label }}</span>
</span>
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
......@@ -54,9 +53,12 @@
<slot :name="item.suffixSlot" :scope="item"></slot>
</div>
<!-- radio -->
<el-radio-group v-else-if="item.type === 'radio'" v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :disabled="item.isDisabled" @change="item.handleRadioChange">
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :disabled="subItem.isDisabled" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio>
</el-radio-group>
<div v-else-if="item.type === 'radio'">
<el-radio-group v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :disabled="item.isDisabled" @change="item.handleRadioChange">
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :disabled="subItem.isDisabled" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio>
</el-radio-group>
<slot :name="item.suffixSlot" :scope="item"></slot>
</div>
<el-date-picker v-else-if="item.type === 'datePicker'" v-model="formObj[item.name]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :type="item.dateType || 'daterange'" :disabled="item.isDisabled" :value-format="item.valueFormat" :style="{ width: item.width || defaultWidth }" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="item.customPickerOptions || pickerOption[item.pickerOptions]"></el-date-picker>
<template v-else-if="item.type === 'upload'">
<p class="photo-top-tips">{{ item.topTips }}</p>
......@@ -307,36 +309,20 @@ export default {
background-color: #fff;
}
/* 提示图标 */
.glsx-combi-form .tips-block {
/* .glsx-combi-form .tips-block {
position: relative;
}
} */
.glsx-combi-form .tips-label {
margin-right: 20px;
margin-right: 2px;
}
.glsx-combi-form .tips-icon {
position: absolute;
display: inline-block;
width: 12px;
height: 12px;
top: 3px;
right: 14px;
margin-right: 4px;
width: 14px;
height: 14px;
margin-right: 12px;
vertical-align: middle;
cursor: pointer;
border: 1px dotted #7f7f7f;
border-radius: 50%;
}
.glsx-combi-form .tips-icon::before {
content: '?';
position: absolute;
width: 8px;
height: 8px;
top: -8px;
left: 1px;
font-size: 10px;
}
/* .glsx-combi-form .tips {
margin: 0;
} */
.glsx-combi-form .combi-form-label {
display: inline-block;
box-sizing: border-box;
......
......@@ -89,6 +89,12 @@ const staticRoutes = Object.freeze([
meta: {}
},
{
name: 'editMemberService',
path: '/couponManage/editMemberService',
component: resolve => require([`@/views/couponManage/editMemberService.vue`], resolve),
meta: {}
},
{
name: 'editCashCoupon',
path: '/couponManage/editCashCoupon/:addOrEdit',
component: resolve => require([`@/views/couponManage/editCashCoupon.vue`], resolve),
......
......@@ -751,7 +751,7 @@ export default {
var merchantval = true
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.merchantval = merchantVaild
merchantval = merchantVaild
})
}
if (valid && merchantval) {
......
......@@ -534,7 +534,7 @@ export default {
var merchantval = true
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.merchantval = merchantVaild
merchantval = merchantVaild
})
}
if (valid && merchantval) {
......
<!-- 编辑兑换券 -->
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container" style="position: relative" v-loading="loading">
<div class="container edit-container" style="position: relative; min-height: 700px;" v-loading="loading">
<div class="right_show">
<div class="card-top"></div>
<div class="slider">
......@@ -437,7 +437,7 @@ export default {
var merchantval = true
if (this.$isGroupUp) {
this.$refs.merchantRef.$refs[this.editChildRef].validate(merchantVaild => {
this.merchantval = merchantVaild
merchantval = merchantVaild
})
}
if (valid && merchantval) {
......
......@@ -349,7 +349,13 @@ export default {
//新增服务券
addService() {
this.$router.push('/couponManage/editMemberService/1')
// this.$router.push('/couponManage/editMemberService/1')
this.$router.push({
path: '/couponManage/editMemberService',
query: {
$title: encodeURI('创建服务')
}
})
},
//新增折扣劵
......@@ -371,7 +377,15 @@ export default {
goto = '/couponManage/editCashCoupon/'
} else if (row.discountType == '7') {
//服务券
goto = '/couponManage/editMemberService/'
this.$router.push({
path: '/couponManage/editMemberService',
query: {
couponId: row.id,
title: addOrEdit == 2 ? '编辑' : '查看',
$title: encodeURI('编辑服务')
}
})
return true
} else if (row.discountType == '2') {
//折扣劵
goto = '/couponManage/editDiscountCoupon/'
......
......@@ -167,7 +167,7 @@ export default {
label: '领取用户',
prop: 'userName',
formatter: cellValue => {
return cellValue.userName + ' ' + cellValue.phone
return cellValue.userName == cellValue.phone ? cellValue.userName : cellValue.userName + ' ' + cellValue.phone
}
},
{
......@@ -203,7 +203,7 @@ export default {
// },
{
confId: '1',
confName: '已领取'
confName: '未使用'
},
{
confId: '2',
......@@ -211,7 +211,7 @@ export default {
},
{
confId: '3',
confName: '已过期'
confName: '已失效'
}
],
wechatUserFlagList: [
......
......@@ -202,7 +202,22 @@ export default {
label: '券来源',
prop: 'packageName',
formatter: cellValue => {
return cellValue.packageId ? cellValue.packageName : cellValue.directionalGiftId ? cellValue.directionalGiftName : '-'
let txt = ''
if (this.$isGroupUp) {
txt = cellValue.packageId ? cellValue.packageName : cellValue.directionalGiftId ? cellValue.directionalGiftName : '-'
} else {
txt = {
'': '-',
1: '营销活动',
2: '营销活动',
3: '会员服务套餐',
4: '营销活动',
5: '关联商品购买',
6: '通过集团套餐赠送',
7: '通过定向礼包赠送'
}[cellValue.receiveWay]
}
return txt
}
},
{
......
<template>
<div>
<base-info v-show="activeName == 'baseInfo'" ref="baseInfoRef" :routeInfo="routeInfo" @handleTabChange="jumpEvent"></base-info>
<edit-event v-if="activeName == 'editEvent'" :eventObj="eventObj" :condLimitObj="condLimitObj" @handleTabChange="jumpBaseInfo" @handleInfoConfirm="handleInfoConfirm"></edit-event>
<edit-event v-if="activeName == 'editEvent'" :eventObj="eventObj" @handleTabChange="jumpBaseInfo" @handleInfoConfirm="handleInfoConfirm"></edit-event>
</div>
</template>
......@@ -21,11 +21,6 @@ export default {
},
// 编辑-标记idx
eventIndex: '',
condLimitObj: {
// 1-有;0-无
hasPhone: 0,
hasQw: 0
},
eventObj: {
addOrEdit: 'add',
info: {}
......@@ -56,8 +51,6 @@ export default {
this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit)
this.$set(this.eventObj, 'info', obj.info)
this.eventIndex = obj.eventIndex
this.$set(this.condLimitObj, 'hasPhone', obj.condLimitObj.hasPhone)
this.$set(this.condLimitObj, 'hasQw', obj.condLimitObj.hasQw)
this.activeName = obj.activeName
}
}
......
<template>
<div class="select-crowd">
<el-dialog title="选择人群" :visible="dialogVisible" width="1080px" :before-close="handleClose" :close-on-click-modal="false">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer">
<el-button :size="size" type="primary" @click="getList">查询</el-button>
</span>
</glsx-combi-form>
<GLTable ref="crowdRef" :pageConf="pageConf" :noDataImg="url" :tableData="crowdList" :tableTotal="total" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable"></GLTable>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleClose">取 消</el-button>
<el-button size="small" type="primary" @click="handleConfirm">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'selectCrowd',
data() {
return {
url: url,
searchForm: {
req: {
crowdType: 2
}
},
total: 0,
crowdList: [],
heightBox: 200,
// 搜索
searchFormData: [
{
label: '关键字',
name: 'keyword',
type: 'input',
placeholder: '请输入人群名称'
}
],
// 表格
// getListApi: this.$apis.common.getCrowdTreeListApi,
tableParams: {
listName: 'crowdUnitList',
// 行数据的key
mutiSelectUniqueKey: 'crowdId',
checkSelectKey: 'crowdId',
checkSelectVal: [],
// 多选ref的名称
mutiSelectName: 'list',
tableColumns: [
{
label: '人群名称',
prop: 'crowdName',
formatter: cellValue => {
return cellValue.crowdName || '-'
}
},
{
label: '人群描述',
prop: 'crowdDesc',
formatter: cellValue => {
return cellValue.crowdDesc || '-'
}
},
{
label: '预估人数',
prop: 'total',
width: '160px'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
baseData: {}
}
},
props: {
dialogVisible: {
type: Boolean,
default: false
},
selectedLabelList: {
type: Array,
default: () => []
},
selectedCustomerList: {
type: Array,
default: () => []
}
},
mounted() {
let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 425
this.getList()
},
methods: {
getList() {
var params = {
req: {
...this.searchForm,
pageNum: this.$refs.crowdRef ? this.$refs.crowdRef.page.pageNum : 1,
pageSize: this.$refs.crowdRef ? this.$refs.crowdRef.page.pageSize : 10
}
}
this.$apis.common.getCrowdTreeListApi(params).then(res => {
this.crowdList = res.crowdUnitList
this.total = res.total
this.recoverySelected()
this.$refs.crowdRef.tableHeightValues = '460px'
})
},
// setTableFinishFun() {
// this.crowdList = this.$refs.crowdRef.data
// this.recoverySelected()
// //接收到的数据为空
// // this.$refs.crowdRef.tableHeightValues = this.$refs.crowdRef.data.length ? '' : '400px'
// this.$refs.crowdRef.tableHeightValues = '460px'
// },
recoverySelected() {
this.$nextTick(() => {
this.selectedCustomerList.forEach(row => {
var idx = this.crowdList.findIndex(k => k.crowdId == row.crowdId)
if (idx != -1) {
this.$refs.crowdRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.crowdList[idx], true)
}
})
})
},
handleSelectionTable(val) {
// 未选客户时,筛选客户条件
// if (!this.selectedCustomerList.length) {
// this.dealCondLimit(val[0])
// }
let currentList = JSON.parse(JSON.stringify(this.selectedCustomerList))
let tableIds = this.crowdList.map(item => item.crowdId)
this.selectedCustomerList = JSON.parse(JSON.stringify(val))
var selectIds = this.selectedCustomerList.map(item => item.crowdId)
currentList.forEach(item => {
if (!selectIds.includes(item.crowdId) && !tableIds.includes(item.crowdId)) {
this.selectedCustomerList.push(item)
}
})
this.recoverySelected()
},
handleClose() {
this.$emit('handleCrowdCustClose')
},
handleConfirm() {
this.$emit('handleCrowdCustConfirm', this.selectedCustomerList)
}
}
}
</script>
<style lang="scss" scoped>
.select-crowd {
.title {
margin-bottom: 12px;
}
.customer-tag-box {
display: flex;
margin: 20px 16px;
.tag-label {
display: inline-block;
height: 30px;
line-height: 30px;
}
.input-tag-wrapper {
max-height: 75px;
overflow: auto;
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding: 5px;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 648px;
display: flex;
align-items: center;
cursor: pointer;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
}
// .customer-list {
// width: calc(100% - 280px);
// margin-right: 10px;
// }
.p-16 {
padding: 16px;
}
}
</style>
......@@ -76,7 +76,21 @@
<!-- 营销渠道 -->
<div class="container edit-container">
<p class="edit-title">营销渠道</p>
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRefChannel" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormDataChannel" :formRules="editRule"></glsx-combi-form>
<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>
<template slot="reachesType" slot-scope="scope">
<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-group>
<span class="m-l-20" v-if="editForm[scope.scope.name] == 2" id="reachesTypeSet">
同一用户最多参与
<el-form-item prop="reachesTypeSet">
<el-input v-model="editForm.reachesTypeSet"></el-input>
</el-form-item>
次
</span>
</template>
</glsx-combi-form>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" @click="handleConfirm">确定</el-button>
......@@ -118,7 +132,11 @@ export default {
// 营销内容
eventContent: '',
eventCount: '',
object: {}
object: {},
//营销渠道
followerTypeId: '',
reachesType: '',
reachesTypeSet: ''
},
// 营销内容
previewList: [],
......@@ -155,7 +173,10 @@ export default {
eventEndDate: [{ required: true, message: '请选择营销结束日期', trigger: 'change' }],
eventContent: [{ 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' }],
reachesType: [{ required: true, message: '请选择参与次数', trigger: 'change' }],
reachesTypeSet: [{ required: true, message: '请输入参与次数', trigger: 'change' }]
},
isEdit: true,
sopNameFormData: [
......@@ -292,7 +313,9 @@ export default {
{
label: '营销渠道',
name: 'pushChannelType',
tips: '企业微信和微信朋友圈会自动给客户的跟进专员派发群发任务;短信会自动推送至客户手机。',
type: 'radio',
suffixSlot: 'channelSuffix',
optionId: 'confId',
optionLabel: 'confName',
optionList: [
......@@ -312,11 +335,41 @@ export default {
isDisabled: false
}
]
},
{
label: '跟进员工类型',
name: 'followerTypeId',
tips: '系统优先按照跟进员工类型匹配营销对象的跟进员工',
type: 'select',
optionList: [],
optionId: 'id',
optionLabel: 'businessName',
optionsName: 'staffTypeList'
},
{
label: '参与次数',
name: 'reachesType',
addHtml: 'reachesType',
optionId: 'confId',
optionLabel: 'confName',
optionList: [
{
confId: 1,
confName: '单次',
isDisabled: false
},
{
confId: 2,
confName: '多次',
isDisabled: false
}
]
}
],
baseData: {
weekList: [],
monthList: []
monthList: [],
staffTypeList: []
}
}
},
......@@ -331,17 +384,17 @@ export default {
info: {}
}
}
},
condLimitObj: {
type: Object,
default: () => {
return {
// 1-有;0-无
hasPhone: 0,
hasQw: 0
}
}
}
// condLimitObj: {
// type: Object,
// default: () => {
// return {
// // 1-有;0-无
// hasPhone: 0,
// hasQw: 0
// }
// }
// }
},
components: {
......@@ -356,27 +409,28 @@ export default {
this.editStatus = true
},
deep: true
},
'editForm.object.additionalType'(val) {
var idx = this.editFormDataChannel.findIndex(item => item.name == 'pushChannelType')
this.editFormDataChannel[idx].optionList[0].isDisabled = val == '4' || !this.condLimitObj.hasQw
this.editFormDataChannel[idx].optionList[1].isDisabled = val == '4' || !this.condLimitObj.hasPhone
if (this.condLimitObj.hasQw) {
this.editFormDataChannel[idx].optionList[2].isDisabled = [1, 2, 3].includes(val)
}
}
// 'editForm.object.additionalType'(val) {
// var idx = this.editFormDataChannel.findIndex(item => item.name == 'pushChannelType')
// this.editFormDataChannel[idx].optionList[0].isDisabled = val == '4' || !this.condLimitObj.hasQw
// this.editFormDataChannel[idx].optionList[1].isDisabled = val == '4' || !this.condLimitObj.hasPhone
// if (this.condLimitObj.hasQw) {
// this.editFormDataChannel[idx].optionList[2].isDisabled = [1, 2, 3].includes(val)
// }
// }
},
created() {
this.getDay('weekList', 7)
this.getDay('monthList', 31)
this.limitQwPhone()
// this.limitQwPhone()
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
Object.assign(this.editForm, this.eventObj.info)
this.getStaffTypeList()
this.$nextTick(() => {
this.editStatus = false
})
......@@ -384,16 +438,48 @@ export default {
},
methods: {
limitQwPhone() {
// 有企微 - 企业微信、微信朋友圈
// 有手机号 - 短信
var channelIdx = this.editFormDataChannel.findIndex(item => item.name == 'pushChannelType')
// 企微
this.editFormDataChannel[channelIdx].optionList[0].isDisabled = !this.condLimitObj.hasQw
// 短信
this.editFormDataChannel[channelIdx].optionList[1].isDisabled = !this.condLimitObj.hasPhone
// 微信朋友圈
this.editFormDataChannel[channelIdx].optionList[2].isDisabled = !this.condLimitObj.hasQw
// limitQwPhone() {
// // 有企微 - 企业微信、微信朋友圈
// // 有手机号 - 短信
// var channelIdx = this.editFormDataChannel.findIndex(item => item.name == 'pushChannelType')
// // 企微
// this.editFormDataChannel[channelIdx].optionList[0].isDisabled = !this.condLimitObj.hasQw
// // 短信
// this.editFormDataChannel[channelIdx].optionList[1].isDisabled = !this.condLimitObj.hasPhone
// // 微信朋友圈
// this.editFormDataChannel[channelIdx].optionList[2].isDisabled = !this.condLimitObj.hasQw
// },
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
getStaffTypeList() {
this.$apis.common.getStaffTypeListApi({ flag: 0 }).then(res => {
this.baseData.staffTypeList = res
this.getOptionsList('editFormDataChannel', false, 'followerTypeId')
})
},
getDay(attrName, day) {
......@@ -434,10 +520,15 @@ export default {
this.editForm.eventStartDate = moment(this.editForm.eventStartDate).format('YYYY-MM-DD')
this.editForm.eventEndDate = this.editForm.eventEndDate ? moment(this.editForm.eventEndDate).format('YYYY-MM-DD') : ''
this.previewList = this.editForm.object ? [{ attContent: JSON.parse(JSON.stringify(this.editForm.object)), additionalType: this.editForm.object.additionalType }] : []
this.editForm.followerTypeId = this.editForm.followerTypeId + ''
this.recoveryRepeat()
this.recoveryEndTime()
},
handleReachesType(val) {
this.editForm.reachesTypeSet = val == 1 ? 1 : ''
},
// 素材
handleMaterialConfirm(val) {
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
......@@ -550,6 +641,9 @@ export default {
this.submit = false
return true
}
// 跟进员工类型followerTypeId
this.editForm.followerTypeName = this.baseData.staffTypeList.find(item => item.id).businessName
// console.log(this.editForm)
if (this.editForm.repeatFlag == 'Y') {
this.$apis.sop.parseEventCountApi(countParams).then(res => {
this.editForm.eventCount = res.eventStatistics.eventCount
......
......@@ -15,14 +15,26 @@
</div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.eventCount : '-' }}</p>
</div>
<div class="analysis-block">
<div class="analysis-block back-image-green">
<div class="analysis-title-block m-b-20">
已完成事件数
<img src="@/assets/sop/completed-event.png" />
</div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.finishEventCount : '-' }}</p>
</div>
<div class="analysis-block">
<div class="analysis-block back-image-orange">
<div class="analysis-title-block m-b-20">
<div>
失败事件数
<el-popover placement="top" width="200" trigger="hover" content="因企微、短信等限制无法正常执行的事件">
<img slot="reference" class="tips-icon" src="@/assets/icon-tip.png" />
</el-popover>
</div>
<img src="@/assets/sop/completed-event.png" />
</div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.failEventCount || '-' : '-' }}</p>
</div>
<div class="analysis-block back-image-blue">
<div class="analysis-title-block m-b-20">
完成率
</div>
......@@ -34,7 +46,20 @@
<p class="m-b-10">日营销事件明细</p>
<!-- 表格区域 开始 -->
<GLTable ref="completeListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<GLTable ref="completeListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<template slot="finishEventCount" slot-scope="scope">
<el-popover v-show="scope.scope.successEventList" placement="bottom-end" width="200" trigger="click" :content="scope.scope.successEventList">
<span class="cursor-pointer" slot="reference" @click="handleGetSuccessEvent(scope.scope)">{{ scope.scope.eventStatistics ? scope.scope.eventStatistics.finishEventCount : '-' }}</span>
</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 slot="failEventCount" slot-scope="scope">
<el-popover v-show="scope.scope.failEventList" placement="bottom-end" width="200" trigger="click" :content="scope.scope.failEventList">
<span class="cursor-pointer" slot="reference" @click="handleGetFailEvent(scope.scope)">{{ scope.scope.eventStatistics ? scope.scope.eventStatistics.failEventCount : '-' }}</span>
</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>
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
......@@ -111,11 +136,18 @@ export default {
},
{
label: '已完成事件数',
prop: 'eventStatistics',
prop: 'finishEventCount',
width: '140',
formatter: cellValue => {
return cellValue.eventStatistics ? cellValue.eventStatistics.finishEventCount : '-'
}
addHtml: 'finishEventCount'
// formatter: cellValue => {
// return cellValue.eventStatistics ? cellValue.eventStatistics.finishEventCount : '-'
// }
},
{
label: '失败事件数',
prop: 'failEventCount',
width: '140',
addHtml: 'failEventCount'
}
]
},
......@@ -150,11 +182,26 @@ export default {
getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => {
this.sopInfo = res
console.log(this.sopInfo)
this.sopInfo.completedPercent = Math.round((this.sopInfo.sopStatistics.finishEventCount / this.sopInfo.sopStatistics.eventCount) * 100).toFixed(0) + '%'
this.drawPie()
})
},
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() {
let chartDom = document.getElementById('completePie')
let myChart = echarts.init(chartDom)
......@@ -197,7 +244,7 @@ export default {
margin-right: 20px;
flex-basis: 0 0 auto;
background: #ffffff;
background-image: linear-gradient(0deg, #f8f8fc 0%, #f4f4ff 100%);
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f7ff 100%);
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
.analysis-title-block {
display: flex;
......@@ -220,6 +267,15 @@ export default {
font-weight: 600;
}
}
.analysis-block.back-image-green {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0fffa 100%);
}
.analysis-block.back-image-orange {
background-image: linear-gradient(0deg, #f8f8fc 0%, #fff6f0 100%);
}
.analysis-block.back-image-blue {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f0ff 100%);
}
}
}
</style>
......@@ -24,14 +24,14 @@
</div>
<p class="analysis-num">{{ baseData.sopEventList.length ? sopInfo.customerCount : '-' }}</p>
</div>
<div class="analysis-block">
<div class="analysis-block back-image-green">
<div class="analysis-title-block m-b-20">
已触达客户数
<img src="@/assets/sop/touch-customer.png" />
</div>
<p class="analysis-num">{{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.reachCustomerCount : '-' }}</p>
</div>
<div class="analysis-block">
<div class="analysis-block back-image-blue">
<div class="analysis-title-block m-b-20">
触达率
</div>
......@@ -107,6 +107,17 @@ export default {
}
},
{
label: '推送人',
prop: 'pusherName'
},
{
label: '推送时间',
prop: 'pusherTime',
formatter: cellValue => {
return cellValue.pusherTime ? dayjs(cellValue.pusherTime).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '初次查看事件',
prop: 'firstViewDate',
formatter: cellValue => {
......@@ -120,6 +131,10 @@ export default {
return cellValue.viewCount || '-'
}
}
// {
// label: '查看总时长',
// prop: ''
// }
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
......@@ -263,7 +278,7 @@ export default {
margin-right: 20px;
flex-basis: 0 0 auto;
background: #ffffff;
background-image: linear-gradient(0deg, #f8f8fc 0%, #f4f4ff 100%);
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f7ff 100%);
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
.analysis-title-block {
display: flex;
......@@ -286,6 +301,12 @@ export default {
font-weight: 600;
}
}
.analysis-block.back-image-green {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0fffa 100%);
}
.analysis-block.back-image-blue {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f0ff 100%);
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!