Commit 48dd1ef4 by 前端

Merge branch 'v3.5.0' into 'master'

合并V3.5.0

See merge request !454
2 parents e44600e9 837c3fbf
...@@ -89,6 +89,4 @@ const resetCard = params => { ...@@ -89,6 +89,4 @@ const resetCard = params => {
}) })
} }
export { resetCard,getCenterListApi, getMoreMerchant, updateCardContent, getCardContent, memberExportApi, getQrUrl ,getCardtypeList}
export {resetCard, getCenterListApi, getMoreMerchant, updateCardContent, getCardContent, memberExportApi, getQrUrl ,getCardtypeList}
...@@ -51,7 +51,30 @@ const momentStaffCustomers = params => { ...@@ -51,7 +51,30 @@ const momentStaffCustomers = params => {
sign: true sign: true
}) })
} }
//朋友圈任务详情 互动客户列表视图
const momentCommentView = params => {
params.method = 'marketing.api.moment.comment.view'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
// returnAll:true
})
}
// 互动列表导出
const commentExport = params => {
params.method = 'marketing.api.moment.comment.export'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
// returnAll:true
})
}
//朋友圈任务详情统计数据 //朋友圈任务详情统计数据
const momentStatistic = params => { const momentStatistic = params => {
params.method = 'marketing.api.moment.detail.statistic' params.method = 'marketing.api.moment.detail.statistic'
...@@ -152,5 +175,7 @@ export default { ...@@ -152,5 +175,7 @@ export default {
getListApi, getListApi,
momentCancel, momentCancel,
createStatus, createStatus,
publicStatus publicStatus,
momentCommentView,
commentExport
} }
...@@ -278,4 +278,15 @@ const liveroomOverview = params => { ...@@ -278,4 +278,15 @@ const liveroomOverview = params => {
sign: true sign: true
}) })
} }
export default { exportDailyOrderQuantityStatistics, liveroomDetailexport, liveroomDetailpage, getDailyOrderQuantityStatistics, liveroomOverview, getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getPayListApi, getPayMerchatListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi }
/**众筹活动直播视频列表 */
const getTencentcloudmediaList = params => {
params.method = 'scrm.api.shopmall.tencentcloudmedia.list'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default { exportDailyOrderQuantityStatistics, liveroomDetailexport, liveroomDetailpage, getDailyOrderQuantityStatistics, liveroomOverview, getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getPayListApi, getPayMerchatListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi, getTencentcloudmediaList }
...@@ -600,6 +600,12 @@ html { ...@@ -600,6 +600,12 @@ html {
.marketing .mt-10 { .marketing .mt-10 {
margin-top: 10px; margin-top: 10px;
} }
.marketing .pd-20 {
padding: 0 20px;
}
.marketing .hand {
cursor: pointer;
}
.el-tooltip__popper.is-light { .el-tooltip__popper.is-light {
background: #ffffff; background: #ffffff;
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.08); box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.08);
...@@ -720,3 +726,14 @@ html { ...@@ -720,3 +726,14 @@ html {
vertical-align: middle; vertical-align: middle;
margin-right: 8px; margin-right: 8px;
} }
.drawerWrap {
.el-drawer {
width: 50%!important;
.el-form .el-select {
width: 200px!important;
.el-input{
width: 200px!important;
}
}
}
}
...@@ -553,7 +553,7 @@ export default { ...@@ -553,7 +553,7 @@ export default {
this.isUpdate = true this.isUpdate = true
this.tagging = val || [] this.tagging = val || []
let arr = [] let arr = []
this.tagging.forEach(item => { this.tagging && this.tagging.forEach(item => {
item.labelList = item.labelList || [] item.labelList = item.labelList || []
item.labelList.forEach(tag => { item.labelList.forEach(tag => {
arr.push({ arr.push({
...@@ -578,7 +578,7 @@ export default { ...@@ -578,7 +578,7 @@ export default {
this.tagging.splice(idx, 1) this.tagging.splice(idx, 1)
} }
let arr = [] let arr = []
this.tagging.forEach(item => { this.tagging && this.tagging.forEach(item => {
item.labelList = item.labelList || [] item.labelList = item.labelList || []
item.labelList.forEach(tag => { item.labelList.forEach(tag => {
arr.push({ arr.push({
......
<template> <template>
<div class="container"> <div class="marketing container">
<div class="title">朋友圈详情</div> <div class="title">朋友圈营销</div>
<div class="detail-content"> <div class="detail-content">
<div class="content-info"> <div class="content-info">
<div class="content-info-title">朋友圈详情</div>
<div class="content-text"> <div class="content-text">
<div class="detail-item"> <div class="detail-item">
<div class="detail-label">朋友圈类型:</div> <div class="detail-label">朋友圈类型:</div>
...@@ -32,38 +33,81 @@ ...@@ -32,38 +33,81 @@
</div> </div>
</div> </div>
</div> </div>
<div class="title"> <div class="content-info-title">
数据统计 数据统计
<span class="info-refresh" @click="handleRefresh"> <div class="flex-align">
<i :class="{ 'el-icon-refresh': true, 'wait-status': refreshStatus }"></i> <span class="info-time">最近更新:{{ this.updatedTime }}</span>
更新数据
</span> <span class="info-refresh" @click="handleRefresh">
<span class="info-time">更新于:{{ this.updatedTime }}</span> 刷新数据
<div class="icon-wrap">
<i :class="{ 'el-icon-refresh': true, 'wait-status': refreshStatus }"></i>
</div>
</span>
</div>
</div> </div>
<div class="statistics-info"> <div class="statistics-info">
<div class="statistics-ul"> <div class="statistics-ul">
<div class="statistics-li statistics-border"> <div class="statistics-li statistics-border">
<div class="statistics-img">
<img src="@/assets/friendGroup/icon-send.png" />
</div>
<div class="statistics-number"> <div class="statistics-number">
<span>{{ basicInfo.sendStaffCount }}</span> <span>{{ basicInfo.sendStaffCount }}</span>
人
</div> </div>
<div class="statistics-text">已发送成员</div> <div class="statistics-text">已发送成员/人</div>
</div> </div>
<div class="statistics-li"> <div class="statistics-li">
<div class="statistics-img">
<img src="@/assets/friendGroup/icon-unsend.png" />
</div>
<div class="statistics-number"> <div class="statistics-number">
<span>{{ basicInfo.unSendStaffCount }}</span> <span>{{ basicInfo.unSendStaffCount }}</span>
{{ form == 'customer' ? '人' : '个' }}
</div> </div>
<div class="statistics-text">未发送成员</div> <div class="statistics-text">未发送成员/{{ form == 'customer' ? '人' : '个' }}</div>
</div> </div>
</div> </div>
<div v-if="form == 'customer'" class="statistics-ul"> <div v-if="form == 'customer'" class="statistics-ul" @click="getStatistics(1)">
<div class="statistics-li"> <div class="statistics-li">
<div class="statistics-img">
<img src="@/assets/friendGroup/icon-copy.png" />
</div>
<div class="statistics-number"> <div class="statistics-number">
<span>{{ basicInfo.copyCustomerCount }}</span> <span>{{ basicInfo.copyCustomerCount }}</span>
人
</div> </div>
<div>已送达客户</div> <div>已送达客户/人</div>
</div>
</div>
<div class="statistics-ul">
<div class="statistics-li statistics-border">
<div class="statistics-img">
<img src="@/assets/friendGroup/icon-interaction.png" />
</div>
<div class="statistics-number">
<span>{{ basicInfo.interactCount }}</span>
</div>
<div class="statistics-text">互动客户/人</div>
<div class="statistics-ratio">互动率:{{ ((basicInfo.interactRatio)*100).toFixed(2) }}%</div>
</div>
<div class="statistics-li statistics-border" @click="getStatistics(2)">
<div class="statistics-img">
<img src="@/assets/friendGroup/icon-like.png" />
</div>
<div class="statistics-number">
<span>{{ basicInfo.likeCount }}</span>
</div>
<div class="statistics-text">点赞客户/人</div>
<div class="statistics-ratio">互动率:{{ ((basicInfo.likeRatio)*100).toFixed(2) }}%</div>
</div>
<div class="statistics-li" @click="getStatistics(3)">
<div class="statistics-img">
<img src="@/assets/friendGroup/icon-comment.png" />
</div>
<div class="statistics-number">
<span>{{ basicInfo.commentCount }}</span>
</div>
<div class="statistics-text">评论客户/人</div>
<div class="statistics-ratio">互动率:{{ ((basicInfo.commentRatio)*100).toFixed(2) }}%</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -112,7 +156,7 @@ export default { ...@@ -112,7 +156,7 @@ export default {
}, },
watch: { watch: {
basicInfo(val) { basicInfo(val) {
if (val.userList.length > 4) { if (val.userList?.length > 4) {
this.limitUserList = val.userList.slice(0, 4) this.limitUserList = val.userList.slice(0, 4)
} else { } else {
this.limitUserList = val.userList this.limitUserList = val.userList
...@@ -133,7 +177,12 @@ export default { ...@@ -133,7 +177,12 @@ export default {
// } // }
}, },
methods: { methods: {
handleRefresh: utils.debounce(function() { getStatistics(value) {
this.$emit('getStatistics', {
activeName: value
})
},
handleRefresh: utils.debounce(function () {
this.publicStatus() this.publicStatus()
this.refreshStatus = true this.refreshStatus = true
setTimeout(() => { setTimeout(() => {
...@@ -152,7 +201,7 @@ export default { ...@@ -152,7 +201,7 @@ export default {
this.$apis.friendGroup.momentDetail({ id }).then(res => { this.$apis.friendGroup.momentDetail({ id }).then(res => {
this.updatedTime = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss') this.updatedTime = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
this.basicInfo = res this.basicInfo = res
// console.log(this.basicInfo, '123'); console.log(this.basicInfo, '123')
// this.basicInfo.sendTime = dayjs(this.basicInfo.sendTime).format('YYYY-MM-DD HH:mm:ss') // this.basicInfo.sendTime = dayjs(this.basicInfo.sendTime).format('YYYY-MM-DD HH:mm:ss')
const previewList = res.attachmentList.map(item => { const previewList = res.attachmentList.map(item => {
if (item.attType == 7 && item.attContent) item.attContent = JSON.parse(item.attContent) if (item.attType == 7 && item.attContent) item.attContent = JSON.parse(item.attContent)
...@@ -212,41 +261,74 @@ export default { ...@@ -212,41 +261,74 @@ export default {
background-color: #ffffff; background-color: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
.title { .title {
padding: 20px 0 17px 20px; height: 56px;
line-height: 56px;
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
color: #333; color: #333;
border-bottom: 1px solid #d8d8d8; border-bottom: 1px solid #d8d8d8;
.info-refresh { padding-left: 20px;
font-size: 14px; box-sizing: border-box;
color: #5850ff;
cursor: pointer;
margin-left: 20px;
.wait-status {
transition: all ease-in 1s;
transform: rotate(360deg);
}
}
.info-time {
font-size: 14px;
color: #7d7d7d;
margin-left: 10px;
}
} }
.detail-content { .detail-content {
display: flex; display: flex;
align-items: flex-end; // align-items: flex-end;
justify-content: space-between; justify-content: space-between;
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 20px 24px 40px 0; padding: 20px;
.content-info { .content-info {
width: calc(100% - 323px); width: calc(100% - 323px);
&-title {
font-size: 16px;
color: #333333;
font-weight: 600;
display: flex;
align-items: center;
justify-content: space-between;
.info-refresh {
display: flex;
align-items: center;
font-weight: 400;
.icon-wrap {
width: 24px;
height: 24px;
background: #5850ff;
border-radius: 4px;
margin-left: 4px;
text-align: center;
line-height: 24px;
}
.el-icon-refresh {
color: #fff;
}
font-size: 14px;
color: #5850ff;
cursor: pointer;
margin-left: 8px;
.wait-status {
transition: all ease-in 1s;
transform: rotate(360deg);
}
}
.info-time {
font-size: 14px;
color: #666666;
margin-left: 10px;
font-weight: 400;
}
}
.content-text { .content-text {
padding-left: 52px; width: 100%;
height: 400px; height: 124px;
padding: 32px 20px;
box-sizing: border-box;
background: #f8f8fc;
border-radius: 2px;
display: flex;
flex-wrap: wrap;
margin: 16px 0 41px;
} }
.detail-item { .detail-item {
display: flex; display: flex;
...@@ -255,10 +337,11 @@ export default { ...@@ -255,10 +337,11 @@ export default {
color: #333; color: #333;
line-height: 20px; line-height: 20px;
margin-bottom: 24px; margin-bottom: 24px;
width: 50%;
.detail-label { .detail-label {
width: 85px; width: 150px;
text-align: right; text-align: right;
margin-right: 12px; // margin-right: 12px;
} }
.detail-tips { .detail-tips {
margin-left: 8px; margin-left: 8px;
...@@ -304,7 +387,6 @@ export default { ...@@ -304,7 +387,6 @@ export default {
background: #f7f7f7; background: #f7f7f7;
border: 1px solid #d8d8d8; border: 1px solid #d8d8d8;
min-width: 325px; min-width: 325px;
.name { .name {
display: inline-block; display: inline-block;
width: 68px; width: 68px;
...@@ -314,22 +396,22 @@ export default { ...@@ -314,22 +396,22 @@ export default {
} }
} }
.statistics-info { .statistics-info {
margin-top: 24px; margin-top: 16px;
margin-left: 52px;
display: flex; display: flex;
overflow-x: scroll; overflow-x: scroll;
.statistics-ul { .statistics-ul {
display: flex; display: flex;
border-radius: 2px; border-radius: 2px;
background-color: #f6f6ff; height: 204px;
background: #f8f8fc;
border: 1px solid rgba(88, 80, 255, 0.8); border: 1px solid rgba(88, 80, 255, 0.8);
margin-right: 20px; margin-right: 16px;
height: 142px;
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
} }
} }
.statistics-li { .statistics-li {
height: 100%;
position: relative; position: relative;
color: #424242; color: #424242;
font-size: 14px; font-size: 14px;
...@@ -337,7 +419,6 @@ export default { ...@@ -337,7 +419,6 @@ export default {
width: 142px; width: 142px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
flex-direction: column; flex-direction: column;
&.statistics-border { &.statistics-border {
margin-right: 0; margin-right: 0;
...@@ -347,12 +428,22 @@ export default { ...@@ -347,12 +428,22 @@ export default {
display: inline-block; display: inline-block;
position: absolute; position: absolute;
right: 0; right: 0;
height: 58px; height: 156px;
border-right: 1px solid #5850ff; border-right: 1px solid #d8d7ea;
margin: 24px 0;
}
}
.statistics-img {
width: 40px;
height: 40px;
margin-bottom: 16px;
margin-top: 30px;
img {
width: 100%;
} }
} }
.statistics-number { .statistics-number {
margin-bottom: 12px; margin-bottom: 8px;
font-size: 16px; font-size: 16px;
color: #333; color: #333;
span { span {
...@@ -361,6 +452,13 @@ export default { ...@@ -361,6 +452,13 @@ export default {
} }
.statistics-text { .statistics-text {
width: 70px; width: 70px;
white-space: nowrap;
}
.statistics-ratio {
font-weight: 400;
font-size: 12px;
color: #666666;
margin-top: 8px;
} }
} }
} }
......
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
for (let i in previewVal) { for (let i in previewVal) {
if (previewVal[i].attType == 1) { if (previewVal[i].attType == 1) {
const attContent = previewVal[i].attContent const attContent = previewVal[i].attContent
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function(res) { const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function (res) {
let word = res.replace(/\[|\]/gi, '') let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity) const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1 let index = parseInt(list.indexOf(word)) + 1
...@@ -126,13 +126,15 @@ export default { ...@@ -126,13 +126,15 @@ export default {
} }
.img-bg { .img-bg {
position: relative; position: relative;
width: 290px; width: 240px;
height: 566px; height: 445px;
padding: 20px 0;
background-image: url(../../../assets/guestCustom/friend-bg.png); background-image: url(../../../assets/guestCustom/friend-bg.png);
background-size: 100%; background-size: 100%;
background-repeat: no-repeat;
.preview-content { .preview-content {
position: absolute; position: absolute;
width: 250px; width: 224px;
height: 350px; height: 350px;
overflow-y: auto; overflow-y: auto;
top: 90px; top: 90px;
...@@ -157,7 +159,7 @@ export default { ...@@ -157,7 +159,7 @@ export default {
} }
.preview-box { .preview-box {
margin-left: 30px; margin-left: 30px;
width: 180px; width: 165px;
} }
.preview-operation { .preview-operation {
float: right; float: right;
......
...@@ -108,7 +108,6 @@ export default { ...@@ -108,7 +108,6 @@ export default {
}, },
methods: { methods: {
selectionTable(val) { selectionTable(val) {
console.log(val)
this.innerTags = val this.innerTags = val
// this.$emit('selectTable', val) // this.$emit('selectTable', val)
}, },
......
<template> <template>
<div> <div>
<BasicInof :id="$route.query.id" :form="'customer'" @refreshList="refreshList"></BasicInof> <BasicInof :id="$route.query.id" :form="'customer'" ref="basicInfo" @refreshList="refreshList" @getStatistics="getStatistics"></BasicInof>
<div class="detail-container"> <div class="detail-container">
<div class="detail-modular"> <div class="detail-modular">
<div class="title">成员详情</div> <div class="title">成员详情</div>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</el-menu> </el-menu>
<GLTable style="margin-top: 20px" ref="table" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :hasPage="false" :pageConf="pageConf"> <GLTable style="margin-top: 20px" ref="table" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :hasPage="false" :pageConf="pageConf">
<div class="table-btns" slot="customerCount" slot-scope="scope"> <div class="table-btns" slot="customerCount" slot-scope="scope">
<span class="customer-detail" @click="handleCustomer(scope.scope.id)" v-if="scope.scope.customerCount">{{ scope.scope.customerCount }}</span> <span class="customer-detail" @click="getStatistics({ ...scope.scope, activeName: 4 })" v-if="scope.scope.customerCount">{{ scope.scope.customerCount }}</span>
<span v-else>{{ scope.scope.customerCount }}</span> <span v-else>{{ scope.scope.customerCount }}</span>
</div> </div>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
> >
<el-button type="primary" @click="handleCancel">取消</el-button> <el-button type="primary" @click="handleCancel">取消</el-button>
</div> --> </div> -->
<el-dialog title="已送达客户" :visible.sync="dialogVisible" width="576px" :before-close="handleClose" class="user-dialog"> <!-- <el-dialog title="已送达客户" :visible.sync="dialogVisible" width="576px" :before-close="handleClose" class="user-dialog">
<div class="user-list"> <div class="user-list">
<div class="user-item" v-for="(item, index) in userList" :key="index"> <div class="user-item" v-for="(item, index) in userList" :key="index">
<div class="user-image"> <div class="user-image">
...@@ -43,18 +43,58 @@ ...@@ -43,18 +43,58 @@
</div> </div>
</div> </div>
</div> </div>
</el-dialog> </el-dialog> -->
<el-drawer class="drawerWrap marketing" size="50%" :title="infoTitle" :visible.sync="dialogVisible" direction="rtl" :before-close="handleClose">
<div class="gl-form-page gl-form-min">
<el-form :inline="true" :model="drawerSearchForm" size="small" class="demo-form-inline">
<template v-if="activeName == 1 || activeName == 4">
<el-form-item label="是否互动:">
<el-select v-model="drawerSearchForm.isInteract" placeholder="">
<el-option label="全部" value=""></el-option>
<el-option label="是" value="true"></el-option>
<el-option label="否" value="false"></el-option>
</el-select>
</el-form-item>
</template>
<template v-else>
<el-form-item label="员工:">
<el-select v-model="drawerSearchForm.momentStaffId" placeholder="">
<template v-for="staff in tableEmpData">
<el-option :label="staff.staffName" :value="staff.staffId" :key="staff.staffId"></el-option>
</template>
</el-select>
</el-form-item>
</template>
<el-form-item>
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
</div>
<div class="flex-between m-b-10 m-t-10 pd-20">
<div class="text-16 color-3 weight-6">客户列表</div>
<div class="export" @click="handleExport">导出</div>
</div>
<GLTable class="pd-20" ref="drawerRef" :getListApi="getDrawerListApi" :searchForm="drawerSearchForm" :tableParams="drawerTableParams" :hasPage="true" :pageConf="pageConf">
<div slot="customerName" class="customer-wrap" slot-scope="scope">
<img :src="scope.scope.avatar" class="avatar" />
<span>{{ scope.scope.customerName }}</span>
</div>
</GLTable>
</el-drawer>
</div> </div>
</template> </template>
<script> <script>
import Vue from 'vue' import Vue from 'vue'
import BasicInof from './components/basicInfo.vue' import BasicInof from './components/basicInfo.vue'
import { exportFn } from '@/common/constant'
export default { export default {
components: { components: {
BasicInof BasicInof
}, },
data() { data() {
return { return {
activeName: '1',
infoTitle: '已送达客户',
userList: [], userList: [],
dialogVisible: false, dialogVisible: false,
activeIndex: '', activeIndex: '',
...@@ -102,6 +142,46 @@ export default { ...@@ -102,6 +142,46 @@ export default {
// return new Date(cellValue.createdDate).toLocaleDateString().replace(/\//g, '-') // return new Date(cellValue.createdDate).toLocaleDateString().replace(/\//g, '-')
// } // }
}, },
{
label: '互动客户',
prop: 'interactCount',
width: '110'
},
{
label: '互动率',
prop: 'interactRatio',
width: '110',
formatter: cellValue => {
return (cellValue.interactRatio*100).toFixed(0)+'%'
}
},
{
label: '点赞客户',
prop: 'likeCount',
width: '110'
},
{
label: '点赞率',
prop: 'likeRatio',
width: '110',
formatter: cellValue => {
return (cellValue.likeRatio*100).toFixed(0)+'%'
}
},
{
label: '评论客户',
prop: 'commentCount',
width: '110'
},
{
label: '评论率',
prop: 'commentRatio',
width: '110',
formatter: cellValue => {
return (cellValue.commentRatio*100).toFixed(0)+'%'
}
},
{ {
label: '操作', label: '操作',
prop: 'optionBtns', prop: 'optionBtns',
...@@ -110,23 +190,160 @@ export default { ...@@ -110,23 +190,160 @@ export default {
} }
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, searchFormData: [
{
label: '发布方式',
name: 'sendType',
type: 'select',
placeholder: '请选择',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'interactionList'
}
],
drawerSearchForm: {
scrmMomentId: '',
isInteract: '',
type: '',
momentStaffId: ''
},
tableData: [],
tableEmpData: [],
drawerTableParams: {
listName: 'data',
tableOption: false,
tableColumns: []
},
tableColumns: [
{
label: '送达客户',
prop: 'customerName',
filter: '1,2,4',
addHtml: 'customerName'
},
{
label: '评论客户',
prop: 'customerName',
filter: '3',
addHtml: 'customerName'
},
{
label: '是否互动',
prop: 'isInteract',
filter: '1,2,3,4'
},
{
label: '累计点赞次数',
prop: 'likeCount',
filter: '1'
},
{
label: '累计评论次数',
prop: 'commentCount',
filter: '1'
},
{
label: '员工',
prop: 'staffName',
filter: '2,3'
},
{
label: '点赞时间',
prop: 'likeTime',
filter: '2'
},
{
label: '评论时间',
prop: 'commentTime',
filter: '3'
},
{
label: '最近点赞时间',
prop: 'likeTime',
filter: '4'
},
{
label: '评论次数',
prop: 'commentCount',
filter: '4'
},
{
label: '最近评论时间',
prop: 'commentTime',
filter: '4'
}
],
baseData: {
interactionList: [
{
confId: '1',
confName: '是'
},
{
confId: '2',
confName: '否'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
getListApi: this.$apis.friendGroup.momentStaff, getListApi: this.$apis.friendGroup.momentStaff,
getDrawerListApi: this.$apis.friendGroup.momentCommentView,
footerLeft: 0, footerLeft: 0,
footerWidth: 0 footerWidth: 0
} }
}, },
mounted() { mounted() {
// this.getCustomerDetail(() => {
// // this.getStaffList()
// // this.getCustomerList()
// })
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.footerLeft = document.querySelector('.base-container-right').offsetLeft this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.boxHeight = clientHeight - 200 this.boxHeight = clientHeight - 200
}, },
methods: { methods: {
listDepartmentTree(isFollowerStaff) {
const params = { addChildrensFlag: true }
this.loading = true
params.isHavCustomer = true
params.isEntmicroCustomer = true
params.isFollowerStaff = isFollowerStaff
this.$apis.customerTransform.listDepartmentTree(params).then(res => {
if (res) {
this.tableEmpData =[{staffName:'全部',staffId:''}].concat(this.getEmployee(res))
} else {
this.treeData = []
}
})
},
getEmployee(d, arr = []) {
d.reverse().forEach(i => {
if (i.entmicroStaffResponses) {
i.entmicroStaffResponses.forEach(j => {
const flag = arr.find(m => m.id == j.id)
if (!flag) {
arr.push(j)
}
})
}
if (i.children) {
this.getEmployee(i.children, arr)
}
})
return arr
},
handleExport(row) {
var params = this.drawerSearchForm
this.$apis.friendGroup.commentExport(params).then(res => {
exportFn(res)
})
},
handleSearch() {
this.$refs.drawerRef.refreshTable()
},
handleReset() {
this.drawerSearchForm = {}
this.handleSearch()
},
handleSelect(val) { handleSelect(val) {
this.searchForm.status = val this.searchForm.status = val
this.$refs.table.refreshTable() this.$refs.table.refreshTable()
...@@ -158,12 +375,37 @@ export default { ...@@ -158,12 +375,37 @@ export default {
}) })
} }
}, },
handleCustomer(id) { initParams() {
this.$apis.friendGroup.momentStaffCustomers({ id }).then(res => { this.drawerTableParams.tableColumns = this.tableColumns.filter(item => {
if (res) { return !item.filter || item.filter.indexOf(this.activeName) != -1
this.dialogVisible = true })
this.userList = res },
} getStatistics(data) {
//朋友圈id
this.drawerSearchForm.scrmMomentId = this.$refs.basicInfo.basicInfo.id
this.drawerSearchForm.type = ''
this.drawerSearchForm.isInteract = ''
this.drawerSearchForm.momentStaffId = ''
this.activeName = data.activeName
const titleArray=['已送达客户','点赞客户','评论客户','已送达客户']
this.infoTitle = titleArray[data.activeName-1]
if (data.activeName == 2) {
this.drawerSearchForm.type = 1
}
if (data.activeName == 3) {
this.drawerSearchForm.type =2
}
if (data.activeName == 4) {
this.drawerSearchForm.momentStaffId = data.staffId
}
this.initParams()
if (this.activeName == 2 || this.activeName == 3) {
this.listDepartmentTree(false)
}
this.dialogVisible = true
this.$nextTick(() => {
this.$refs.drawerRef.refreshTable()
}) })
}, },
getCustomerDetail(callback) { getCustomerDetail(callback) {
...@@ -191,6 +433,9 @@ export default { ...@@ -191,6 +433,9 @@ export default {
remindUserGroup() { remindUserGroup() {
const id = this.$route.params.id const id = this.$route.params.id
this.$apis.friendGroup.remindUserGroup({ id, type: 1 }).then(res => {}) this.$apis.friendGroup.remindUserGroup({ id, type: 1 }).then(res => {})
},
handleClose() {
this.dialogVisible = false
} }
} }
} }
...@@ -423,4 +668,27 @@ export default { ...@@ -423,4 +668,27 @@ export default {
margin-bottom: 30px; margin-bottom: 30px;
} }
} }
.drawerWrap {
.export {
height: 32px;
border-radius: 4px;
border: 1px solid #5850ff;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 14px;
padding: 9px 20px;
box-sizing: border-box;
cursor: pointer;
}
}
.customer-wrap {
display: flex;
align-items: center;
.avatar {
width: 36px;
height: 36px;
margin-right: 8px;
}
}
</style> </style>
...@@ -2,16 +2,19 @@ ...@@ -2,16 +2,19 @@
<template> <template>
<div class="marketing pro-group"> <div class="marketing pro-group">
<div class="m-b-20 friend-title"> <div class="m-b-20 friend-title">
<div> <div class="friend-title-left">
<GLButton :size="size" type="primary" fn="编辑朋友圈" @click="handleEdit(1)">发布朋友圈</GLButton> <GLButton :size="size" type="primary" fn="编辑朋友圈" @click="handleEdit(1)">发布朋友圈</GLButton>
<span>管理员可直接在后台为员工创建朋友圈,员工收到朋友圈新消息提醒后,可快捷将管理员创建的朋友圈发送到自己朋友圈中。</span> <span class="friend-tip-text">管理员可直接在后台为员工创建朋友圈,员工收到朋友圈新消息提醒后,可快捷将管理员创建的朋友圈发送到自己朋友圈中。</span>
</div> </div>
<div class="title"> <div class="title">
<span class="info-time">{{this.sendType}}:{{ this.updatedTime }}</span>
<span class="info-refresh" @click="handleRefresh"> <span class="info-refresh" @click="handleRefresh">
<i :class="{ 'el-icon-refresh': true, 'wait-status': refreshStatus }"></i> 刷新数据
更新数据 <div class="icon-wrap">
<i :class="{ 'el-icon-refresh': true, 'wait-status': refreshStatus }"></i>
</div>
</span> </span>
<span class="info-time">更新于{{ this.updatedTime }}</span>
</div> </div>
</div> </div>
<div class="container"> <div class="container">
...@@ -97,6 +100,7 @@ export default { ...@@ -97,6 +100,7 @@ export default {
offReason: [{ required: true, message: '请输入下架备注', trigger: 'change' }] offReason: [{ required: true, message: '请输入下架备注', trigger: 'change' }]
}, },
updatedTime: '', updatedTime: '',
sendType:'',
// 分享 // 分享
isShareVisible: false, isShareVisible: false,
shareForm: {}, shareForm: {},
...@@ -241,20 +245,20 @@ export default { ...@@ -241,20 +245,20 @@ export default {
label: '发布方式', label: '发布方式',
name: 'sendType', name: 'sendType',
addHtml: 'sendType', addHtml: 'sendType',
width: '120' width: '110'
}, },
{ {
label: '类型', label: '类型',
name: 'type', name: 'type',
formatter: cellValue => { formatter: cellValue => {
console.log(this.baseData.typeStatusList.find(item => item.confId == cellValue.type))
return this.baseData.typeStatusList.find(item => item.confId == cellValue.type).confName return this.baseData.typeStatusList.find(item => item.confId == cellValue.type).confName
} },
width: '110'
}, },
{ {
label: '创建人', label: '创建人',
prop: 'createdName', prop: 'createdName',
width: '180' width: '190'
}, },
{ {
label: '创建时间', label: '创建时间',
...@@ -275,6 +279,18 @@ export default { ...@@ -275,6 +279,18 @@ export default {
label: '已送达客户', label: '已送达客户',
prop: 'copyCustomerCount', prop: 'copyCustomerCount',
width: '110' width: '110'
},
{
label: '互动客户',
prop: 'interactCount'
},
{
label: '点赞客户',
prop: 'likeCount'
},
{
label: '评论客户',
prop: 'commentCount'
} }
] ]
}, },
...@@ -313,7 +329,7 @@ export default { ...@@ -313,7 +329,7 @@ export default {
}, },
methods: { methods: {
handleRefresh: utils.debounce(function() { handleRefresh: utils.debounce(function () {
this.createStatus() this.createStatus()
this.refreshStatus = true this.refreshStatus = true
setTimeout(() => { setTimeout(() => {
...@@ -323,7 +339,10 @@ export default { ...@@ -323,7 +339,10 @@ export default {
async createStatus() { async createStatus() {
this.updatedTime = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss') this.updatedTime = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
await this.$apis.friendGroup.createStatus({}) await this.$apis.friendGroup.createStatus({})
await this.$apis.friendGroup.publicStatus({})
let res = await this.$apis.friendGroup.publicStatus({})
this.updatedTime = res.syncTime
this.sendType = res.syncType == 1 ? '更新中' : '已更新'
this.getListData() this.getListData()
}, },
getListData() { getListData() {
...@@ -350,9 +369,7 @@ export default { ...@@ -350,9 +369,7 @@ export default {
}) })
previewListFilter = previewListFilter.reduce((prev, cur) => { previewListFilter = previewListFilter.reduce((prev, cur) => {
let index = prev.findIndex(item => item.attType == 2) let index = prev.findIndex(item => item.attType == 2)
console.log(prev, cur, index)
if (index != -1 && prev.length) { if (index != -1 && prev.length) {
console.log(prev[index].attContent.concat(cur.attContent))
return prev.concat({ attType: cur.attType, attContent: prev[index].attContent.concat(cur.attContent) }) return prev.concat({ attType: cur.attType, attContent: prev[index].attContent.concat(cur.attContent) })
} }
return prev.concat(cur) return prev.concat(cur)
...@@ -517,15 +534,37 @@ export default { ...@@ -517,15 +534,37 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.friend-title { .friend-title {
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
color: #666666; color: #666666;
.friend-title-left {
display: flex;
align-items: center;
}
.title { .title {
display: flex;
align-items: center;
margin-left: 74px;
white-space: nowrap;
.info-refresh { .info-refresh {
display: flex;
align-items: center;
.icon-wrap {
width: 24px;
height: 24px;
background: #5850ff;
border-radius: 4px;
margin-left: 4px;
text-align: center;
line-height: 24px;
}
.el-icon-refresh {
color: #fff;
}
font-size: 14px; font-size: 14px;
color: #5850ff; color: #5850ff;
cursor: pointer; cursor: pointer;
margin-left: 20px; margin-left: 8px;
.wait-status { .wait-status {
transition: all ease-in 1s; transition: all ease-in 1s;
transform: rotate(360deg); transform: rotate(360deg);
...@@ -541,6 +580,8 @@ export default { ...@@ -541,6 +580,8 @@ export default {
font-size: 14px; font-size: 14px;
margin-left: 10px; margin-left: 10px;
font-weight: 100; font-weight: 100;
// display: inline-block;
// width: 80%;
} }
} }
.attachmentList-box { .attachmentList-box {
......
...@@ -807,7 +807,6 @@ export default { ...@@ -807,7 +807,6 @@ export default {
} }
} }
} }
.pageTitle { .pageTitle {
position: relative; position: relative;
padding: 15px 20px; padding: 15px 20px;
...@@ -833,7 +832,6 @@ export default { ...@@ -833,7 +832,6 @@ export default {
box-sizing: border-box; box-sizing: border-box;
cursor: pointer; cursor: pointer;
} }
.el-form-item { .el-form-item {
margin-bottom: 15px; margin-bottom: 15px;
} }
...@@ -910,7 +908,6 @@ export default { ...@@ -910,7 +908,6 @@ export default {
overflow: hidden; overflow: hidden;
} }
} }
.pricesMerge { .pricesMerge {
display: flex; display: flex;
width: 1500px; width: 1500px;
......
...@@ -513,7 +513,6 @@ export default { ...@@ -513,7 +513,6 @@ export default {
padding-top: 5px; padding-top: 5px;
padding-left: 10px; padding-left: 10px;
box-sizing: border-box; box-sizing: border-box;
.choseItem { .choseItem {
position: relative; position: relative;
min-width: 90px; min-width: 90px;
...@@ -611,7 +610,6 @@ export default { ...@@ -611,7 +610,6 @@ export default {
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
margin-top: 10px; margin-top: 10px;
>span:first-child { >span:first-child {
display: inline-block; display: inline-block;
min-width: 165px; min-width: 165px;
...@@ -719,7 +717,6 @@ export default { ...@@ -719,7 +717,6 @@ export default {
margin-left: -110px; margin-left: -110px;
} }
} }
.give-tip { .give-tip {
font-weight: 400; font-weight: 400;
font-size: 12px; font-size: 12px;
...@@ -728,7 +725,7 @@ export default { ...@@ -728,7 +725,7 @@ export default {
margin: -15px 0 20px 154px; margin: -15px 0 20px 154px;
} }
} }
/deep/ .el-form-item__error { /deep/ .el-form-item__error {
margin-left: 154px; margin-left: 154px;
}</style> }
</style>
...@@ -85,6 +85,18 @@ ...@@ -85,6 +85,18 @@
</template> </template>
</div> </div>
<div <div
slot="joinText"
slot-scope="scope"
>
<el-tooltip
effect="dark"
:content="formatterNumber(scope.scope,scope.prop)"
placement="top"
>
<div class="line-ellipsis">{{formatterNumber(scope.scope,scope.prop)}}</div>
</el-tooltip>
</div>
<div
class="table-btns" class="table-btns"
slot="auth-button" slot="auth-button"
slot-scope="scope" slot-scope="scope"
...@@ -315,7 +327,7 @@ export default { ...@@ -315,7 +327,7 @@ export default {
methods: { methods: {
async getCrowdfundingOrderConfig () { async getCrowdfundingOrderConfig () {
let tableColumns = [ let tableColumns = [
// { // {
// label: '序号', // label: '序号',
// // prop: 'activityImg', // // prop: 'activityImg',
...@@ -406,25 +418,22 @@ export default { ...@@ -406,25 +418,22 @@ export default {
prop: 'verificationNumber' prop: 'verificationNumber'
}, },
{ {
label: '定金(元)', label: '定金/元',
name: 'activityPrice', prop: 'activityPrice',
width: 140, addHtml: 'joinText',
formatter: cellValue => { width: 100
return (cellValue.activityPrice / 100).toFixed(2)
}
}, },
{ {
label: '众筹价(元)', label: '众筹价/元',
name: 'crowdFundingPrice', prop: 'crowdFundingPrice',
width: 140, addHtml: 'joinText',
formatter: cellValue => { width: 100
return (cellValue.crowdFundingPrice / 100).toFixed(2)
}
}, },
{ {
label: '库存', label: '库存',
prop: 'goodsStock', prop: 'activityGoodsStock',
width: 110 addHtml: 'joinText',
width: 100
}, },
{ {
label: '创建日期', label: '创建日期',
...@@ -646,6 +655,14 @@ export default { ...@@ -646,6 +655,14 @@ export default {
setTableFinishFun () { setTableFinishFun () {
//接收到的数据为空 //接收到的数据为空
this.$refs.activity.data.length ? (this.$refs.activity.tableHeightValues = '') : this.$refs.activity.setTableHeightFun() this.$refs.activity.data.length ? (this.$refs.activity.tableHeightValues = '') : this.$refs.activity.setTableHeightFun()
},
formatterNumber (cell, key) {
const str = []
cell?.goodsList?.map(e => {
str.push(key != 'activityGoodsStock' ? (e[key] / 100).toFixed(2) : e[key])
})
return str.length > 0 ? str.join(',') : '--'
} }
} }
} }
......
...@@ -64,6 +64,21 @@ ...@@ -64,6 +64,21 @@
:formData="editFormData" :formData="editFormData"
:formRules="editRule" :formRules="editRule"
> >
<div slot="merchantHtml">
<el-button
type="default"
class="el-icon-plus"
v-if="!isDisabled"
@click="handleRelateStoreClose"
>选择门店</el-button>
<div
class="merchantNameLabel"
v-if="editForm.merchantName"
>
<p>所属门店</p>
<div class="merchantName ellipsis-1">{{ editForm.merchantName }}</div>
</div>
</div>
<div <div
slot="activityImg" slot="activityImg"
class="edit-tips m-t-8" class="edit-tips m-t-8"
...@@ -73,6 +88,7 @@ ...@@ -73,6 +88,7 @@
slot-scope="scope" slot-scope="scope"
> >
<el-date-picker <el-date-picker
:disabled="isDisabled"
v-model="editForm.activityTime" v-model="editForm.activityTime"
type="datetimerange" type="datetimerange"
range-separator="至" range-separator="至"
...@@ -80,116 +96,103 @@ ...@@ -80,116 +96,103 @@
end-placeholder="结束日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']" :default-time="['00:00:00', '23:59:59']"
:disabled="isDisabled"
@change="e => handleTimeChange(e, scope.scope)" @change="e => handleTimeChange(e, scope.scope)"
></el-date-picker> ></el-date-picker>
</template> </template>
<div slot="goodsHtml"> <div
slot="goodsHtml"
style="width:700px"
id="goodsList"
>
<el-button <el-button
type="default" type="default"
class="el-icon-plus" class="el-icon-plus"
v-if="!isDisabled" v-if="!isDisabled"
@click="handleRelateProClose" @click="handleRelateProClose"
>选择商品</el-button> >选择商品</el-button>
<div <div class="goods-box">
v-if="selectedProInfo.id && !specificationDetailList.length" <template v-for="(i,index) in editForm.goodsList">
style="margin-top: 10px" <div
> :key="index"
<p> class="item"
<img >
class="img-60" <div class="flex-align">
:src="selectedProInfo.goodsImage" <img
/> class="img-60"
&nbsp;&nbsp;&nbsp; 零售价 {{ (selectedProInfo.retailPrice / 100).toFixed(2) }}元 &nbsp;&nbsp;&nbsp; 商品库存 {{ selectedProInfo.goodsStock }}件 :src="selectedProInfo[index].goodsImage"
</p> />
<el-form-item <div class="goods-info">
label="设置秒杀价:" <p>商品名称:{{selectedProInfo[index].goodsName}}</p>
prop="activityPrice" <p>零售价 {{ selectedProInfo[index].retailPrice }}元</p>
id="activityPrice" <p>商品库存 {{ selectedProInfo[index].goodsStock }}件</p>
> </div>
<el-input </div>
v-model="editForm.activityPrice" <glsx-combi-form
style="width: 150px" class="goods-form-box flex-align"
:disabled="isDisabled" ref="goodsListEditFormRef"
><span slot="append">元</span></el-input> :formRef="editChildRef"
</el-form-item> :isEdit="true"
<el-form-item :isBlock="true"
label="活动库存:" :formObj="i"
prop="goodsStock" :formData="goodsListEditFormData"
id="goodsStock" :formRules="goodsListEditRule"
>
<el-input
v-model="editForm.goodsStock"
style="width: 150px"
:disabled="isDisabled"
><span slot="append">件</span></el-input>
</el-form-item>
</div>
</div>
<div
slot="specificationsHtml"
v-if="specificationDetailList.length"
class="flex"
style="min-width: 600px"
id="specificationDetailList"
>
<div style="width: calc(100%)">
<table
class="table-spesc"
style="width: calc(100%)"
>
<tbody>
<tr>
<td
:style="{ width: specsWidth }"
v-for="(subItem, subIndex) in specificationDetailList"
:key="subIndex"
>{{ subItem.specificationName }}</td>
<td :style="{ width: specsWidth }">零售价(元)</td>
<td :style="{ width: specsWidth }">库存</td>
<td :style="{ width: specsWidth }">设置秒杀价</td>
<td :style="{ width: specsWidth }">活动库存</td>
</tr>
</tbody>
</table>
<table
class="table-spesc"
style="max-height: 400px"
>
<tbody>
<tr
style="border-bottom: 1px solid rgb(235, 235, 235)"
v-for="(item, index) in nameToValSpecsList"
:key="index"
> >
<td <div
:style="{ width: specsWidth }" class="goods-form-item"
v-for="(n, idx) in item.specsValueList" slot="crowdFundingPrice"
:key="idx" >
>{{ n }}</td>
<td :style="{ width: specsWidth }">{{ item.retailPrice }}元</td>
<td :style="{ width: specsWidth }">{{ item.stock }}件</td>
<td :style="{ width: specsWidth }">
<el-input <el-input
v-model="i.crowdFundingPrice"
:data-index="index"
style="width: 136px"
type="number"
:disabled="isDisabled" :disabled="isDisabled"
placeholder="秒杀价" @input="formatAppend(i.crowdFundingPrice,'crowdFundingPrice',index)"
style="width: 90%"
v-model="item.activityPrice"
@input="item.activityPrice = activityPrice_input($event, item.retailPrice)"
></el-input> ></el-input>
</td> 元
<td :style="{ width: specsWidth }"> </div>
<div
class="goods-form-item"
slot="activityPrice"
>
<el-input <el-input
v-model="i.activityPrice"
:data-index="index"
style="width: 136px"
type="number"
:disabled="isDisabled" :disabled="isDisabled"
placeholder="活动库存" @input="formatAppend(i.activityPrice,'activityPrice',index)"
style="width: 90%"
v-model="item.goodsStock"
@input="item.goodsStock = goodsStock_input($event, item.stock)"
></el-input> ></el-input>
</td> 元
</tr> </div>
</tbody> <div
</table> slot="last"
class="balancePayment"
>尾款:<span>{{ i.crowdFundingPrice | filterBalancePayment(i.activityPrice) }}</span>元
</div>
<div
class="goods-form-item"
slot="activityGoodsStock"
>
<el-input
v-model="i.activityGoodsStock"
:data-index="index"
style="width: 136px"
:disabled="isDisabled"
type="number"
@input="formatAppend(i.activityGoodsStock,'activityGoodsStock',index, true)"
></el-input>
</div>
</glsx-combi-form>
<div
v-if="!isDisabled"
class="del flex-align"
@click="delGoods(index)"
>
<img src="@/assets/icon-del.png" />
</div>
</div>
</template>
</div> </div>
</div> </div>
<template <template
...@@ -199,13 +202,14 @@ ...@@ -199,13 +202,14 @@
<el-radio-group <el-radio-group
v-model="editForm[scope.scope.name]" v-model="editForm[scope.scope.name]"
@change="handleIsLimit" @change="handleIsLimit"
:disabled="limitPurchaseDisabled"
> >
<el-radio <el-radio
v-for="(item, index) in scope.scope.optionList" v-for="(item, index) in scope.scope.optionList"
:key="index" :key="index"
:label="item[scope.scope.optionId]" :label="item[scope.scope.optionId]"
:disabled="isDisabled" >{{ item[scope.scope.optionLabel] }}
>{{ item[scope.scope.optionLabel] }}</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
<p <p
v-if="editForm[scope.scope.name] == 2" v-if="editForm[scope.scope.name] == 2"
...@@ -217,7 +221,6 @@ ...@@ -217,7 +221,6 @@
<el-input <el-input
v-model="editForm.limitPurchaseNumber" v-model="editForm.limitPurchaseNumber"
placeholder="请输入限购次数" placeholder="请输入限购次数"
:disabled="isDisabled"
></el-input> ></el-input>
</el-form-item> </el-form-item>
件 件
...@@ -245,13 +248,16 @@ ...@@ -245,13 +248,16 @@
slot="customerServiceFlag" slot="customerServiceFlag"
slot-scope="scope" slot-scope="scope"
> >
<el-radio-group v-model="editForm[scope.scope.name]"> <el-radio-group
v-model="editForm[scope.scope.name]"
:disabled="isDisabled"
>
<el-radio <el-radio
v-for="(item, index) in scope.scope.optionList" v-for="(item, index) in scope.scope.optionList"
:disabled="isDisabled"
:key="index" :key="index"
:label="item[scope.scope.optionId]" :label="item[scope.scope.optionId]"
>{{ item[scope.scope.optionLabel] }}</el-radio> >{{ item[scope.scope.optionLabel] }}
</el-radio>
</el-radio-group> </el-radio-group>
<div <div
class="customer-service" class="customer-service"
...@@ -270,16 +276,12 @@ ...@@ -270,16 +276,12 @@
></glsx-combi-form> ></glsx-combi-form>
</div> </div>
</template> </template>
<template <template slot="activityMusic">
slot="activityMusic"
slot-scope="scope"
>
<div class="flex"> <div class="flex">
<div <div
class="music-box flex-center" class="music-box flex-center"
v-for="(item, index) in musicList" v-for="(item, index) in musicList"
:key="index" :key="index"
@click="handleMusicChange(index)"
> >
<div <div
class="music-icon" class="music-icon"
...@@ -302,22 +304,7 @@ ...@@ -302,22 +304,7 @@
/> />
</div> </div>
</div> </div>
<el-upload
v-if="!isDisabled"
class="m-t-10"
action=""
accept="audio/mp3, audio/m4a"
:show-file-list="false"
:http-request="handleMusicUpload"
:before-upload="e => handleMusicBeforeUpload(e, scope.scope)"
:file-list="fileList"
>
<el-button
class="el-icon-plus"
size="small"
type="default"
>背景音乐</el-button>
</el-upload>
<audio <audio
v-if="playObj.src" v-if="playObj.src"
style="display: none;" style="display: none;"
...@@ -400,9 +387,11 @@ ...@@ -400,9 +387,11 @@
class="form-describe-box" class="form-describe-box"
slot="formDescribe" slot="formDescribe"
> >
<el-checkbox-group v-model="editForm.formDescribeCheck"> <el-checkbox-group
v-model="editForm.formDescribeCheck"
:disabled="isDisabled"
>
<el-checkbox <el-checkbox
:disabled="isDisabled"
v-for="(item, index) in formDescribeCheckList" v-for="(item, index) in formDescribeCheckList"
:label="item.value" :label="item.value"
:key="index" :key="index"
...@@ -429,7 +418,7 @@ ...@@ -429,7 +418,7 @@
</p> </p>
</div> </div>
<el-button <el-button
v-if="!isDisabled" :disabled="isDisabled"
class="btn-basic" class="btn-basic"
v-show="formDescribeList.length < describeNum" v-show="formDescribeList.length < describeNum"
:size="size" :size="size"
...@@ -445,8 +434,8 @@ ...@@ -445,8 +434,8 @@
</div> </div>
<div slot="showAvatarNicknameFlag"> <div slot="showAvatarNicknameFlag">
<el-radio-group <el-radio-group
:disabled="isDisabled"
v-model="editForm.showAvatarNicknameFlag" v-model="editForm.showAvatarNicknameFlag"
:disabled="isDisabled"
> >
<el-radio :label="1">隐藏</el-radio> <el-radio :label="1">隐藏</el-radio>
<el-radio :label="2">显示</el-radio> <el-radio :label="2">显示</el-radio>
...@@ -468,15 +457,13 @@ ...@@ -468,15 +457,13 @@
服务说明: 服务说明:
</span> </span>
<div class="form-show-box"> <div class="form-show-box">
<div <div :class="['btn-box', arrowFlagObj.activityServices == 'open' && editForm.activityServices.length ? 'line' : '']">
v-if="!isDisabled"
:class="['btn-box', arrowFlagObj.activityServices == 'open' && editForm.activityServices.length ? 'line' : '']"
>
<el-button <el-button
:class="[editForm.activityServices.length < 9 ? 'btn-basic' : 'btn-disable']" :class="[editForm.activityServices.length < 9 ? 'btn-basic' : 'btn-disable']"
:size="size" :size="size"
type="text" type="text"
@click="handleAddItem('services', 'activityServices', 9)" @click="handleAddItem('services', 'activityServices', 9)"
:disabled="isDisabled"
> >
<img <img
class="icon-add" class="icon-add"
...@@ -486,37 +473,33 @@ ...@@ -486,37 +473,33 @@
</el-button> </el-button>
</div> </div>
<div :class="['form-show-block', arrowFlagObj.activityServices == 'close' ? 'form-close' : 'form-open']"> <div :class="['form-show-block', arrowFlagObj.activityServices == 'close' ? 'form-close' : 'form-open']">
<div v-if="editForm.activityServices.length"> <div
<div v-for="(item, index) in editForm.activityServices"
v-for="(item, index) in editForm.activityServices" :key="index"
:key="index" :class="['form-show-item', editForm.activityServices.length > index + 1 ? 'line' : '']"
:class="['form-show-item', editForm.activityServices.length > index + 1 ? 'line' : '']" >
<glsx-combi-form
class="p-t-20"
ref="serviceEditFormRef"
:formRef="editChildRef"
:isEdit="true"
:isBlock="true"
:formObj="item"
:formData="serviceEditFormData"
:formRules="serviceEditRule"
></glsx-combi-form>
<el-button
:class="['btn-basic', 'btn-delete', index == editForm.activityServices.length - 1 ? 'last-btn-delete' : '']"
:size="size"
type="text"
@click="handleDeleteItem('services', 'activityServices', index)"
> >
<glsx-combi-form <img
class="p-t-20" class="icon-add"
ref="serviceEditFormRef" src="@/assets/icon-delete.png"
:formRef="editChildRef" />
:isEdit="true" </el-button>
:isBlock="true"
:formObj="item"
:formData="serviceEditFormData"
:formRules="serviceEditRule"
></glsx-combi-form>
<el-button
v-if="!isDisabled"
:class="['btn-basic', 'btn-delete', index == editForm.activityServices.length - 1 ? 'last-btn-delete' : '']"
:size="size"
type="text"
@click="handleDeleteItem('services', 'activityServices', index)"
>
<img
class="icon-add"
src="@/assets/icon-delete.png"
/>
</el-button>
</div>
</div> </div>
<div v-else>无数据</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -536,11 +519,9 @@ ...@@ -536,11 +519,9 @@
商品答疑: 商品答疑:
</span> </span>
<div class="form-show-box"> <div class="form-show-box">
<div <div :class="['btn-box', arrowFlagObj.activityCommoditys == 'open' && editForm.activityCommoditys.length ? 'line' : '']">
v-if="!isDisabled"
:class="['btn-box', arrowFlagObj.activityCommoditys == 'open' && editForm.activityCommoditys.length ? 'line' : '']"
>
<el-button <el-button
:disabled="isDisabled"
:class="[editForm.activityCommoditys.length < 9 ? 'btn-basic' : 'btn-disable']" :class="[editForm.activityCommoditys.length < 9 ? 'btn-basic' : 'btn-disable']"
:size="size" :size="size"
type="text" type="text"
...@@ -554,37 +535,34 @@ ...@@ -554,37 +535,34 @@
</el-button> </el-button>
</div> </div>
<div :class="['form-show-block', arrowFlagObj.activityCommoditys == 'close' ? 'form-close' : 'form-open']"> <div :class="['form-show-block', arrowFlagObj.activityCommoditys == 'close' ? 'form-close' : 'form-open']">
<div v-if="editForm.activityCommoditys.length"> <div
<div v-for="(item, index) in editForm.activityCommoditys"
v-for="(item, index) in editForm.activityCommoditys" :key="index"
:key="index" :class="['form-show-item', editForm.activityCommoditys.length > index + 1 ? 'line' : '']"
:class="['form-show-item', editForm.activityCommoditys.length > index + 1 ? 'line' : '']" >
<glsx-combi-form
class="p-t-20"
ref="commoditysEditFormRef"
:formRef="editChildRef"
:isEdit="true"
:isBlock="true"
:formObj="item"
:formData="commoditysEditFormData"
:formRules="commoditysEditRule"
></glsx-combi-form>
<el-button
:class="['btn-basic', 'btn-delete', index == editForm.activityCommoditys.length - 1 ? 'last-btn-delete' : '']"
:size="size"
:disabled="isDisabled"
type="text"
@click="handleDeleteItem('commoditys', 'activityCommoditys', index)"
> >
<glsx-combi-form <img
class="p-t-20" class="icon-add"
ref="commoditysEditFormRef" src="@/assets/icon-delete.png"
:formRef="editChildRef" />
:isEdit="true" </el-button>
:isBlock="true"
:formObj="item"
:formData="commoditysEditFormData"
:formRules="commoditysEditRule"
></glsx-combi-form>
<el-button
v-if="!isDisabled"
:class="['btn-basic', 'btn-delete', index == editForm.activityCommoditys.length - 1 ? 'last-btn-delete' : '']"
:size="size"
type="text"
@click="handleDeleteItem('commoditys', 'activityCommoditys', index)"
>
<img
class="icon-add"
src="@/assets/icon-delete.png"
/>
</el-button>
</div>
</div> </div>
<div v-else>无数据</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -604,14 +582,12 @@ ...@@ -604,14 +582,12 @@
服务评价: 服务评价:
</span> </span>
<div class="form-show-box"> <div class="form-show-box">
<div <div :class="['btn-box', arrowFlagObj.activityExperienceDTOs == 'open' && editForm.activityExperienceDTOs.length ? 'line' : '']">
v-if="!isDisabled"
:class="['btn-box', arrowFlagObj.activityExperienceDTOs == 'open' && editForm.activityExperienceDTOs.length ? 'line' : '']"
>
<el-button <el-button
:class="[editForm.activityExperienceDTOs.length < 9 ? 'btn-basic' : 'btn-disable']" :class="[editForm.activityExperienceDTOs.length < 9 ? 'btn-basic' : 'btn-disable']"
:size="size" :size="size"
type="text" type="text"
:disabled="isDisabled"
@click="handleAddItem('experiences', 'activityExperienceDTOs', 9)" @click="handleAddItem('experiences', 'activityExperienceDTOs', 9)"
> >
<img <img
...@@ -622,48 +598,44 @@ ...@@ -622,48 +598,44 @@
</el-button> </el-button>
</div> </div>
<div :class="['form-show-block', arrowFlagObj.activityExperienceDTOs == 'close' ? 'form-close' : 'form-open']"> <div :class="['form-show-block', arrowFlagObj.activityExperienceDTOs == 'close' ? 'form-close' : 'form-open']">
<div v-if="editForm.activityExperienceDTOs.length"> <div
<div v-for="(item, index) in editForm.activityExperienceDTOs"
v-for="(item, index) in editForm.activityExperienceDTOs" :key="index"
:key="index" :class="['form-show-item', editForm.activityExperienceDTOs.length > index + 1 ? 'line' : '']"
:class="['form-show-item', editForm.activityExperienceDTOs.length > index + 1 ? 'line' : '']" >
> <div class="head-box">
<div class="head-box"> <img
<img class="icon-head"
class="icon-head" src="@/assets/seckillActivity/icon-default-head.png"
src="@/assets/seckillActivity/icon-default-head.png" />
/> <span>虚拟人物{{ index + 1 }}</span>
<span>虚拟人物{{ index + 1 }}</span>
</div>
<glsx-combi-form
class="p-t-20"
:formRef="editChildRef"
:isEdit="true"
:isBlock="true"
:formObj="item"
:formData="experiencesEditFormData"
:formRules="editRule"
>
<div
slot="activityExperienceImgs"
class="edit-tips m-t-8"
>建议尺寸:图片大小不超过5m,最多可添加9张图片</div>
</glsx-combi-form>
<el-button
v-if="!isDisabled"
:class="['btn-basic', 'btn-delete', index == editForm.activityExperienceDTOs.length - 1 ? 'last-btn-delete' : '']"
:size="size"
type="text"
@click="handleDeleteItem('experiences', 'activityExperienceDTOs', index)"
>
<img
class="icon-add"
src="@/assets/icon-delete.png"
/>
</el-button>
</div> </div>
<glsx-combi-form
class="p-t-20"
:formRef="editChildRef"
:isEdit="true"
:isBlock="true"
:formObj="item"
:formData="experiencesEditFormData"
:formRules="editRule"
>
<div
slot="activityExperienceImgs"
class="edit-tips m-t-8"
>建议尺寸:图片大小不超过5m,最多可添加9张图片</div>
</glsx-combi-form>
<el-button
:class="['btn-basic', 'btn-delete', index == editForm.activityExperienceDTOs.length - 1 ? 'last-btn-delete' : '']"
:size="size"
type="text"
@click="handleDeleteItem('experiences', 'activityExperienceDTOs', index)"
>
<img
class="icon-add"
src="@/assets/icon-delete.png"
/>
</el-button>
</div> </div>
<div>无数据</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -673,14 +645,15 @@ ...@@ -673,14 +645,15 @@
slot-scope="scope" slot-scope="scope"
> >
<el-radio-group <el-radio-group
:disabled="isDisabled"
v-model="editForm[scope.scope.name]" v-model="editForm[scope.scope.name]"
:disabled="isDisabled"
> >
<el-radio <el-radio
v-for="(item, index) in scope.scope.optionList" v-for="(item, index) in scope.scope.optionList"
:key="index" :key="index"
:label="item[scope.scope.optionId]" :label="item[scope.scope.optionId]"
>{{ item[scope.scope.optionLabel] }}</el-radio> >{{ item[scope.scope.optionLabel] }}
</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<template slot="appointmentContacts"> <template slot="appointmentContacts">
...@@ -691,11 +664,11 @@ ...@@ -691,11 +664,11 @@
labelWidth="60px" labelWidth="60px"
> >
<el-input <el-input
:disabled="isDisabled"
v-model="editForm.reservationInstallContactsName" v-model="editForm.reservationInstallContactsName"
style="width: 432px;display: block;" style="width: 432px;display: block;"
maxlength="10" maxlength="10"
placeholder="请输入姓名" placeholder="请输入姓名"
:disabled="isDisabled"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
...@@ -705,22 +678,23 @@ ...@@ -705,22 +678,23 @@
class="phoneClass" class="phoneClass"
> >
<el-input <el-input
:disabled="isDisabled"
v-model="editForm.reservationInstallContactsPhone" v-model="editForm.reservationInstallContactsPhone"
style="width: 432px" style="width: 432px"
maxlength="11" maxlength="11"
placeholder="请输入电话" placeholder="请输入电话"
:disabled="isDisabled"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</div> </div>
</template> </template>
<!-- 战报内容配置 --> <!-- 战报内容配置 -->
<template slot="reportConfigure"> <template slot="reportConfigure">
<div class="reportConfigure-bag"> <div class="reportConfigure-bag tab-pane">
<el-tabs v-model="reportFlag"> <el-tabs v-model="reportFlag">
<el-tab-pane <el-tab-pane
label="进行中战报" label="进行中战报"
name="1" name="1"
:disabled="isDisabled"
> >
<el-form-item <el-form-item
label="产值活动报告:" label="产值活动报告:"
...@@ -728,7 +702,6 @@ ...@@ -728,7 +702,6 @@
labelWidth="100px" labelWidth="100px"
> >
<el-input <el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.produceReportSummary" v-model="editForm.activityActionReport.produceReportSummary"
placeholder="根据以往经验,活动前三天转发效果最好,赶紧督促大家转发起来吧" placeholder="根据以往经验,活动前三天转发效果最好,赶紧督促大家转发起来吧"
type="textarea" type="textarea"
...@@ -736,12 +709,14 @@ ...@@ -736,12 +709,14 @@
show-word-limit show-word-limit
style="width:580px;height:79px;" style="width:580px;height:79px;"
rows="3" rows="3"
:disabled="isDisabled"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane
label="已结束战报" label="已结束战报"
name="2" name="2"
:disabled="isDisabled"
> >
<el-form-item <el-form-item
label="客户资产分析总结:" label="客户资产分析总结:"
...@@ -750,7 +725,6 @@ ...@@ -750,7 +725,6 @@
style="margin-left: 27px;margin-bottom: 0px;" style="margin-left: 27px;margin-bottom: 0px;"
> >
<el-input <el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.customerAssetSummary" v-model="editForm.activityActionReport.customerAssetSummary"
placeholder="请输入" placeholder="请输入"
type="textarea" type="textarea"
...@@ -758,6 +732,7 @@ ...@@ -758,6 +732,7 @@
show-word-limit show-word-limit
style="width:580px;height:79px;" style="width:580px;height:79px;"
rows="3" rows="3"
:disabled="isDisabled"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
...@@ -767,7 +742,6 @@ ...@@ -767,7 +742,6 @@
style="margin-left: 27px;margin-top: 10px;" style="margin-left: 27px;margin-top: 10px;"
> >
<el-input <el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.touchPassageSummary" v-model="editForm.activityActionReport.touchPassageSummary"
placeholder="请输入" placeholder="请输入"
type="textarea" type="textarea"
...@@ -775,6 +749,7 @@ ...@@ -775,6 +749,7 @@
show-word-limit show-word-limit
style="width:580px;height:79px;" style="width:580px;height:79px;"
rows="3" rows="3"
:disabled="isDisabled"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<div class="reportConfigureList"> <div class="reportConfigureList">
...@@ -786,10 +761,10 @@ ...@@ -786,10 +761,10 @@
style="margin: 0px 8px 0px 0px;" style="margin: 0px 8px 0px 0px;"
> >
<el-input <el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.signMerchantShareCount" v-model="editForm.activityActionReport.signMerchantShareCount"
style="width: 136px;height:32px;" style="width: 136px;height:32px;"
placeholder="请输入" placeholder="请输入"
:disabled="isDisabled"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
...@@ -799,10 +774,10 @@ ...@@ -799,10 +774,10 @@
style="margin: 0px 8px 0px 0px;" style="margin: 0px 8px 0px 0px;"
> >
<el-input <el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.signMerchantBrowseCount" v-model="editForm.activityActionReport.signMerchantBrowseCount"
style="width: 136px;height:32px;" style="width: 136px;height:32px;"
placeholder="请输入" placeholder="请输入"
:disabled="isDisabled"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
...@@ -812,10 +787,10 @@ ...@@ -812,10 +787,10 @@
style="margin: 0px 8px 0px 0px;" style="margin: 0px 8px 0px 0px;"
> >
<el-input <el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.signMerchantVisitorCount" v-model="editForm.activityActionReport.signMerchantVisitorCount"
style="width: 136px;height:32px;" style="width: 136px;height:32px;"
placeholder="请输入" placeholder="请输入"
:disabled="isDisabled"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
...@@ -825,10 +800,10 @@ ...@@ -825,10 +800,10 @@
style="margin: 0px 8px 0px 0px;" style="margin: 0px 8px 0px 0px;"
> >
<el-input <el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.signMerchantOrderCount" v-model="editForm.activityActionReport.signMerchantOrderCount"
style="width: 136px;height:32px;" style="width: 136px;height:32px;"
placeholder="请输入" placeholder="请输入"
:disabled="isDisabled"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
...@@ -838,10 +813,10 @@ ...@@ -838,10 +813,10 @@
style="margin: 0px 8px 0px 0px;" style="margin: 0px 8px 0px 0px;"
> >
<el-input <el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.signMerchantProduceCount" v-model="editForm.activityActionReport.signMerchantProduceCount"
style="width: 136px;height:32px;" style="width: 136px;height:32px;"
placeholder="请输入" placeholder="请输入"
:disabled="isDisabled"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</div> </div>
...@@ -854,10 +829,10 @@ ...@@ -854,10 +829,10 @@
style="margin: 0px 8px 0px 0px;" style="margin: 0px 8px 0px 0px;"
> >
<el-input <el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.noteTouchCustomerCount" v-model="editForm.activityActionReport.noteTouchCustomerCount"
style="width: 136px;height:32px;" style="width: 136px;height:32px;"
placeholder="请输入" placeholder="请输入"
:disabled="isDisabled"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
...@@ -867,10 +842,10 @@ ...@@ -867,10 +842,10 @@
style="margin: 0px 8px 0px 0px;" style="margin: 0px 8px 0px 0px;"
> >
<el-input <el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.noteTouchVisitorCount" v-model="editForm.activityActionReport.noteTouchVisitorCount"
style="width: 136px;height:32px;" style="width: 136px;height:32px;"
placeholder="请输入" placeholder="请输入"
:disabled="isDisabled"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
...@@ -880,10 +855,10 @@ ...@@ -880,10 +855,10 @@
style="margin: 0px 8px 0px 0px;" style="margin: 0px 8px 0px 0px;"
> >
<el-input <el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.noteTouchOrderCount" v-model="editForm.activityActionReport.noteTouchOrderCount"
style="width: 136px;height:32px;" style="width: 136px;height:32px;"
placeholder="请输入" placeholder="请输入"
:disabled="isDisabled"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
...@@ -893,10 +868,10 @@ ...@@ -893,10 +868,10 @@
style="margin: 0px 8px 0px 0px;" style="margin: 0px 8px 0px 0px;"
> >
<el-input <el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.noteTouchConversionRate" v-model="editForm.activityActionReport.noteTouchConversionRate"
style="width: 136px;height:32px;" style="width: 136px;height:32px;"
readonly readonly
:disabled="isDisabled"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</div> </div>
...@@ -907,58 +882,92 @@ ...@@ -907,58 +882,92 @@
<!-- 直播配置 --> <!-- 直播配置 -->
<div slot="live"> <div slot="live">
<el-switch <el-switch
:disabled="isDisabled"
v-model="editForm.liveFlag" v-model="editForm.liveFlag"
:disabled="isDisabled"
></el-switch> ></el-switch>
<div <div
class="customer-service" class="live-box tab-pane"
v-if="editForm.liveFlag" v-if="editForm.liveFlag"
id="liveFlag" id="liveFlag"
> >
<glsx-combi-form <el-tabs v-model="editForm.liveBroadcastMediaType">
class="edit-form-container" <el-tab-pane
ref="liveEditFormRef" label="选择直播"
:formRef="editChildRef" :name="1"
:isEdit="true" :disabled="isDisabled"
:isBlock="true"
:formObj="editForm"
:formData="liveEditFormData"
:formRules="liveEditRule"
>
<div
slot="groupQrCode"
class="edit-tips m-t-8"
>注:用于直播间内加群展示;请上传2M以内的jpg、jpeg、png图片,建议图片尺寸284*284</div>
<div
v-if="!editForm.floatingMaskDiagram"
slot="defaultImg"
class="default-live-img"
>
<img :src="defaultFloatingMaskDiagram" />
</div>
<div
slot="floatingMaskDiagram"
class="edit-tips m-t-8"
>注:用于直播间内浮动元素展示;请上传2M以内的gif、jpg、jpeg、png图片,建议图片尺寸120*176</div>
<div
v-if="!editForm.liveBroadcastRoomCover"
slot="defaultImgCover"
class="default-live-img"
> >
<img :src="defaultImgObj.COVER_LIVE" /> <glsx-combi-form
</div> class="edit-form-container"
<div ref="liveEditFormRef"
v-if="!editForm.liveBroadcastRoomEndCover" :formRef="editChildRef"
slot="defaultImgEndCover" :isEdit="true"
class="default-live-img" :isBlock="true"
:formObj="editForm"
:formData="liveEditFormData_1"
:formRules="liveEditRule_1"
>
<div
slot="groupQrCode"
class="edit-tips m-t-8"
>注:用于直播间内加群展示;请上传2M以内的jpg、jpeg、png图片,建议图片尺寸284*284</div>
<div
v-if="!editForm.floatingMaskDiagram"
slot="defaultImg"
class="default-live-img"
>
<img :src="defaultFloatingMaskDiagram" />
</div>
<div
slot="floatingMaskDiagram"
class="edit-tips m-t-8"
>注:用于直播间内浮动元素展示;请上传2M以内的gif、jpg、jpeg、png图片,建议图片尺寸120*176
</div>
<div
v-if="!editForm.liveBroadcastRoomCover"
slot="defaultImgCover"
class="default-live-img"
>
<img :src="defaultImgObj.COVER_LIVE" />
</div>
<div
v-if="!editForm.liveBroadcastRoomEndCover"
slot="defaultImgEndCover"
class="default-live-img"
>
<img :src="defaultImgObj.COVER_REPLAY" />
</div>
<div
slot="liveBroadcastRoomEndCover"
class="edit-tips m-t-8"
>注:用于活动中直播小窗口展示;请上传2M以内的gif、jpg、jpeg、png图片,建议图片尺寸164*252
</div>
</glsx-combi-form>
</el-tab-pane>
<el-tab-pane
label="选择视频"
:name="2"
:disabled="isDisabled"
> >
<img :src="defaultImgObj.COVER_REPLAY" /> <glsx-combi-form
</div> class="edit-form-container"
<div ref="liveEditFormRef"
slot="liveBroadcastRoomEndCover" :formRef="editChildRef"
class="edit-tips m-t-8" :isEdit="true"
>注:用于活动中直播小窗口展示;请上传2M以内的gif、jpg、jpeg、png图片,建议图片尺寸164*252</div> :isBlock="true"
</glsx-combi-form> :formObj="editForm"
:formData="liveEditFormData_2"
:formRules="liveEditRule_2"
>
</glsx-combi-form>
<div class="previewVideo">
<el-button
type="text"
:disabled="!editForm.liveBroadcastMediaUrl"
@click="hideVideo(true)"
>预览</el-button>
</div>
</el-tab-pane>
</el-tabs>
</div> </div>
</div> </div>
<!-- 收款模式 --> <!-- 收款模式 -->
...@@ -970,26 +979,21 @@ ...@@ -970,26 +979,21 @@
v-model="editForm.paymentModel" v-model="editForm.paymentModel"
:disabled="isDisabled" :disabled="isDisabled"
> >
<el-radio <el-radio :label="1">广联收定金和尾款</el-radio>
:disabled="isDisabled" <el-radio :label="2">广联收定金门店收尾款</el-radio>
:label="1" <el-radio :label="3">广联收定金门店收全款退定金</el-radio>
>广联收定金和尾款</el-radio> <el-radio :label="4">门店收定金和尾款</el-radio>
<el-radio <el-radio :label="5">服务商收定金门店收尾款</el-radio>
:disabled="isDisabled" </el-radio-group>
:label="2" </div>
>广联收定金门店收尾款</el-radio> <!-- 常态化模式 -->
<el-radio <div slot="normalModel">
:disabled="isDisabled" <el-radio-group
:label="3" v-model="editForm.normalModel"
>广联收定金门店收全款退定金</el-radio> :disabled="isDisabled"
<el-radio >
:disabled="isDisabled" <el-radio :label="0">否</el-radio>
:label="4" <el-radio :label="1">是</el-radio>
>门店收定金和尾款</el-radio>
<el-radio
:disabled="isDisabled"
:label="5"
>服务商收定金门店收尾款</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</glsx-combi-form> </glsx-combi-form>
...@@ -998,18 +1002,11 @@ ...@@ -998,18 +1002,11 @@
<el-button <el-button
@click="handleCancel" @click="handleCancel"
size="medium" size="medium"
>{{ routeInfo.addOrEdit != 'detail' ? '取消' : '返回' }}</el-button> >返回</el-button>
<el-button <el-button
@click="handleWechat" @click="handleWechat"
size="medium" size="medium"
>预览</el-button> >预览</el-button>
<el-button
v-if="routeInfo.addOrEdit != 'detail'"
type="primary"
@click="handleConfirm"
size="medium"
:loading="loading"
>提交</el-button>
</GLFooter> </GLFooter>
<!-- 展示 --> <!-- 展示 -->
<GLDialog <GLDialog
...@@ -1025,25 +1022,46 @@ ...@@ -1025,25 +1022,46 @@
:countDownObj="countDownObj" :countDownObj="countDownObj"
></crowdEditWechat> ></crowdEditWechat>
</GLDialog> </GLDialog>
<GLDialog
bigTitle="预览视频"
mode="big"
:visible.sync="liveVideoVisible"
@onOk="hideVideo"
@onCancel="hideVideo"
>
<video
:src="editForm.liveBroadcastMediaUrl"
class="live-video"
controls
ref="liveVideo"
disablePictureInPicture
:autoplay="liveVideoVisible"
loop
/>
</GLDialog>
<select-single-pro-dialog <select-single-pro-dialog
v-if="isSingleSelectVisible" v-if="isSingleSelectVisible"
:merchantId="editForm.merchantId"
:isSingleSelectVisible="isSingleSelectVisible" :isSingleSelectVisible="isSingleSelectVisible"
:propSearch="{ deliveryType: 1 }" :propSearch="{ deliveryType: 1 }"
:selectedProInfo="selectedProInfo" :selectedProInfo="selectedProInfo"
@handleSingleSelectConfirm="handleSingleSelectConfirm" @handleSingleSelectConfirm="handleSingleSelectConfirm"
@handleSingleSelectClose="handleSingleSelectClose(true)" @handleSingleSelectClose="handleSingleSelectClose(true)"
></select-single-pro-dialog> multiple
>
</select-single-pro-dialog>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { limitPrice } from '@/common/constant' import { limitPrice, businessType } from '@/common/constant'
import { utils } from 'glsx-common'
import crowdEditWechat from './crowdEditWechat.vue' import crowdEditWechat from './crowdEditWechat.vue'
export default { export default {
name: 'editActivity', name: 'editActivity',
components: { components: {
crowdEditWechat crowdEditWechat,
}, },
data () { data () {
var validatorPhone = function (rule, value, callback) { var validatorPhone = function (rule, value, callback) {
...@@ -1090,28 +1108,35 @@ export default { ...@@ -1090,28 +1108,35 @@ export default {
m: '', m: '',
s: '' s: ''
}, },
isDisabled: false, isDisabled: true,
// 预览 wechatVisible: false, // 预览
wechatVisible: false,
// 商品选择 liveVideoVisible: false, //预览直播视频
isSingleSelectVisible: false,
selectedProInfo: {}, isSingleSelectVisible: false, // 商品选择
relateStoreVisible: false, // 选择门店
limitPurchaseDisabled: true,//多商品禁用限购
selectedList: [],
selectedProInfo: [],
specificationDetailList: [], specificationDetailList: [],
nameToValSpecsList: [], nameToValSpecsList: [],
activityInfo: {}, activityInfo: {},
editForm: { editForm: {
merchantId: '',
merchantName: '',
activityName: '', activityName: '',
activityImg: '', activityImg: '',
promotion: '', promotion: '',
activityTime: [], activityTime: [],
activityPrice: '', goodsList: [],
goodsStock: '',
goodsId: '',
limitPurchaseFlag: 1, limitPurchaseFlag: 1,
limitPurchaseNumber: '', limitPurchaseNumber: '',
goodsCategory: '', goodsCategory: '',
// 活动配置 // 活动配置
customerServiceFlag: 1, customerServiceFlag: 3,
customerServiceName: '', customerServiceName: '',
customerServicePhone: '', customerServicePhone: '',
customerServiceQrImg: '', customerServiceQrImg: '',
...@@ -1133,10 +1158,11 @@ export default { ...@@ -1133,10 +1158,11 @@ export default {
forwardTitle: '', forwardTitle: '',
posterImg: '', posterImg: '',
// 1-否,2-是 // 1-否,2-是
orderEndDays: 60,//订单完结时间天数
selectCarNumberFlag: 2, selectCarNumberFlag: 2,
selectVehicleTypeFlag: 2, selectVehicleTypeFlag: 2,
selectPhoneNumberFlag: 2, selectPhoneNumberFlag: 2,
businessType: 2, //业务场景
orderEndDays: 60, //订单完结时间天数
formDescribeCheck: ['selectCarNumberFlag', 'selectVehicleTypeFlag', 'selectPhoneNumberFlag'], formDescribeCheck: ['selectCarNumberFlag', 'selectVehicleTypeFlag', 'selectPhoneNumberFlag'],
activityServices: [], activityServices: [],
activityCommoditys: [], activityCommoditys: [],
...@@ -1146,11 +1172,15 @@ export default { ...@@ -1146,11 +1172,15 @@ export default {
// formDescribeThird: '', // formDescribeThird: '',
showAvatarNicknameFlag: 1, showAvatarNicknameFlag: 1,
liveFlag: false, liveFlag: false,
liveBroadcastMediaType: 1, //直播方式:1直播间,2短视频
liveBroadcastRoomId: '', liveBroadcastRoomId: '',
groupQrCode: '', groupQrCode: '',
floatingMaskDiagram: '', floatingMaskDiagram: '',
liveBroadcastRoomCover: '', liveBroadcastRoomCover: '',
liveBroadcastRoomEndCover: '', liveBroadcastRoomEndCover: '',
liveBroadcastMediaUrl: '', //直播(2短视频)播放媒体url
liveBroadcastMediaId: '',
liveBroadcastStateFlag: 1,//直播(2短视频)状态标签:1直播中,2直播回放
employeeRegistrationLinkFlag: 2, employeeRegistrationLinkFlag: 2,
reservationInstallContactsName: '', reservationInstallContactsName: '',
reservationInstallContactsPhone: '', reservationInstallContactsPhone: '',
...@@ -1158,6 +1188,7 @@ export default { ...@@ -1158,6 +1188,7 @@ export default {
paymentAccountSource: '1', paymentAccountSource: '1',
paymentAccountId: '', paymentAccountId: '',
payMannerId: '', payMannerId: '',
paymentModel: 1,
// 战报内容配置 // 战报内容配置
activityActionReport: { activityActionReport: {
produceReportSummary: '', produceReportSummary: '',
...@@ -1172,7 +1203,8 @@ export default { ...@@ -1172,7 +1203,8 @@ export default {
noteTouchVisitorCount: '', noteTouchVisitorCount: '',
noteTouchOrderCount: '', noteTouchOrderCount: '',
noteTouchConversionRate: '' noteTouchConversionRate: ''
} },
normalModel: 0//常态化模式
}, },
reportFlag: '1', reportFlag: '1',
//商品列表 //商品列表
...@@ -1200,21 +1232,12 @@ export default { ...@@ -1200,21 +1232,12 @@ export default {
// selectedAllProList: [], // selectedAllProList: [],
// selectedProList: [], // selectedProList: [],
editRule: { editRule: {
merchantId: [{ required: true, message: '请选择商户', trigger: 'change' }],
activityName: [{ required: true, message: '请输入活动名称', trigger: 'change' }], activityName: [{ required: true, message: '请输入活动名称', trigger: 'change' }],
activityImg: [{ required: true, message: '请选择活动宣传图', trigger: 'change' }], activityImg: [{ required: true, message: '请选择活动宣传图', trigger: 'change' }],
promotion: [{ required: true, message: '请输入活动宣传语', trigger: 'change' }], promotion: [{ required: true, message: '请输入活动宣传语', trigger: 'change' }],
activityTime: [{ required: true, message: '活动时间不能为空', trigger: 'change' }], activityTime: [{ required: true, message: '活动时间不能为空', trigger: 'change' }],
activityPrice: [ goodsList: [{ required: true, message: '请选择商品', trigger: ['change', 'blur'] }],
{ required: true, message: '请设置秒杀价', trigger: 'change' },
{
validator: (rule, value, callback) => {
return value >= +(this.selectedProInfo.retailPrice / 100).toFixed(2) ? callback(new Error('秒杀价必须小于零售价')) : callback()
},
trigger: 'change'
}
],
goodsStock: [{ required: true, message: '请设置活动库存', trigger: 'change' }],
goodsId: [{ required: true, message: '请选择商品', trigger: ['change', 'blur'] }],
goodsCategory: [{ required: true, message: '请选择关联产品类目项', trigger: ['change', 'blur'] }], goodsCategory: [{ required: true, message: '请选择关联产品类目项', trigger: ['change', 'blur'] }],
limitPurchaseFlag: [{ required: true, message: '请选择是否限购', trigger: 'change' }], limitPurchaseFlag: [{ required: true, message: '请选择是否限购', trigger: 'change' }],
limitPurchaseNumber: [ limitPurchaseNumber: [
...@@ -1247,7 +1270,8 @@ export default { ...@@ -1247,7 +1270,8 @@ export default {
activityBigImg: [{ required: true, message: '请选择活动大图', trigger: 'change' }], activityBigImg: [{ required: true, message: '请选择活动大图', trigger: 'change' }],
activityDetail: [{ required: true, message: '请输入活动详情', trigger: 'change' }], activityDetail: [{ required: true, message: '请输入活动详情', trigger: 'change' }],
forwardTitle: [{ required: true, message: '请输入转发标题', trigger: 'change' }], forwardTitle: [{ required: true, message: '请输入转发标题', trigger: 'change' }],
paymentAccountId: [{ required: true, message: '请选择定金收款账户', trigger: 'change' }] paymentAccountId: [{ required: true, message: '请选择定金收款账户', trigger: 'change' }],
businessType: [{ required: true, message: '请选择业务场景', trigger: 'change' }]
}, },
// 表单设置 // 表单设置
formDescribeCheckList: [ formDescribeCheckList: [
...@@ -1279,12 +1303,16 @@ export default { ...@@ -1279,12 +1303,16 @@ export default {
// 基本信息 // 基本信息
editFormData: [ editFormData: [
{ {
label: '门店',
name: 'merchantId',
addHtml: 'merchantHtml'
},
{
label: '活动名称', label: '活动名称',
name: 'activityName', name: 'activityName',
type: 'input', type: 'input',
maxlength: 20, maxlength: 40,
tips: '如XX店车主关怀活动', tips: '如XX店车主关怀活动'
isDisabled: false
}, },
{ {
label: '活动宣传图', label: '活动宣传图',
...@@ -1293,7 +1321,6 @@ export default { ...@@ -1293,7 +1321,6 @@ export default {
width: '320px', width: '320px',
limitSize: 10, limitSize: 10,
maxPhotoNum: 1, maxPhotoNum: 1,
isDisabled: false,
suffixSlot: 'activityImg', suffixSlot: 'activityImg',
handleUpload: (e, file, targetItem) => { handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result const imgFile = e.target.result
...@@ -1314,9 +1341,8 @@ export default { ...@@ -1314,9 +1341,8 @@ export default {
label: '活动宣传语', label: '活动宣传语',
name: 'promotion', name: 'promotion',
type: 'input', type: 'input',
maxlength: 20, maxlength: 50,
tips: '比如车主关怀,0元秒杀', tips: '比如车主关怀,0元秒杀'
isDisabled: false
}, },
{ {
label: '活动时间', label: '活动时间',
...@@ -1325,7 +1351,7 @@ export default { ...@@ -1325,7 +1351,7 @@ export default {
}, },
{ {
label: '商品', label: '商品',
name: 'goodsId', name: 'goodsList',
addHtml: 'goodsHtml' addHtml: 'goodsHtml'
}, },
{ {
...@@ -1371,6 +1397,7 @@ export default { ...@@ -1371,6 +1397,7 @@ export default {
isClear: true, isClear: true,
isHide: true isHide: true
}, },
{ {
label: '规格明细', label: '规格明细',
name: '', name: '',
...@@ -1378,6 +1405,16 @@ export default { ...@@ -1378,6 +1405,16 @@ export default {
isHide: true isHide: true
}, },
{ {
label: '业务场景',
name: 'businessType',
type: 'select',
optionList: utils.deepClone(businessType),
optionId: 'optionId',
optionLabel: 'optionLabel',
isClear: true
// isHide: true
},
{
label: '是否限购', label: '是否限购',
name: 'limitPurchaseFlag', name: 'limitPurchaseFlag',
addHtml: 'limitPurchaseFlag', addHtml: 'limitPurchaseFlag',
...@@ -1386,13 +1423,11 @@ export default { ...@@ -1386,13 +1423,11 @@ export default {
optionList: [ optionList: [
{ {
confId: 1, confId: 1,
confName: '否', confName: '否'
isDisabled: false
}, },
{ {
confId: 2, confId: 2,
confName: '是', confName: '是'
isDisabled: false
} }
] ]
} }
...@@ -1445,6 +1480,75 @@ export default { ...@@ -1445,6 +1480,75 @@ export default {
title: [{ required: true, message: '请输入标题', trigger: 'change' }], title: [{ required: true, message: '请输入标题', trigger: 'change' }],
content: [{ required: true, message: '请输入内容', trigger: 'change' }] content: [{ required: true, message: '请输入内容', trigger: 'change' }]
}, },
goodsListEditRule: {
crowdFundingPrice: [
{ required: true, message: '请设置众筹价', trigger: 'change' },
{
validator: (rule, value, callback) => {
const { dataset: { index } } = event.target || event.srcElement
if (typeof index == 'undefined' && value > -1) return callback()
const { activityPrice } = this.editForm.goodsList[index],
{ selectedProInfo } = this
if (value < +activityPrice) {
return callback(new Error('众筹价需要大于定金'))
}
return value > +(selectedProInfo[index].retailPrice / 100).toFixed(2) ? callback(new Error('众筹价必须小于等于零售价')) : callback()
},
trigger: 'change'
}
],
activityPrice: [
{ required: true, message: '请设置定金价', trigger: 'change' },
{
validator: (rule, value, callback) => {
const { dataset: { index } } = event.target || event.srcElement
if (typeof index == 'undefined' && value > -1) return callback()
const { crowdFundingPrice } = this.editForm.goodsList[index],
{ selectedProInfo } = this
if (!crowdFundingPrice) return callback(new Error('请先填写众筹价'))
if (value > Number(crowdFundingPrice)) return callback(new Error('定金不能大于众筹价格'))
return value > +(selectedProInfo[index].retailPrice / 100).toFixed(2) ? callback(new Error('定金必须小于等于零售价')) : callback()
},
trigger: 'change'
}
],
activityGoodsStock: [
{ required: true, message: '请设置活动库存', trigger: 'change' },
{
validator: (rule, value, callback) => {
const { dataset: { index } } = event.target || event.srcElement,
{ selectedProInfo } = this
if (typeof index == 'undefined' && value > -1) return callback()
if (value < 1) return callback(new Error('请设置活动库存'))
if (value > selectedProInfo[index].goodsStock) return callback(new Error('不能大于商品库存'))
},
trigger: 'change'
}
],
},
//**多商品 */
goodsListEditFormData: [
{
label: '众筹价',
name: 'crowdFundingPrice',
addHtml: 'crowdFundingPrice'
},
{
label: '定金',
name: 'activityPrice',
addHtml: 'activityPrice'
},
{
name: 'last',
addHtml: 'last'
},
{
label: '活动库存',
name: 'activityGoodsStock',
addHtml: 'activityGoodsStock'
}
],
// 服务说明 // 服务说明
serviceEditFormData: [ serviceEditFormData: [
{ {
...@@ -1512,7 +1616,7 @@ export default { ...@@ -1512,7 +1616,7 @@ export default {
limitSize: 5, limitSize: 5,
maxPhotoNum: 9, maxPhotoNum: 9,
suffixSlot: 'activityExperienceImgs', suffixSlot: 'activityExperienceImgs',
isDisabled: false, isDisabled: true,
uploadStyle: { uploadStyle: {
imgWH: { imgWH: {
width: '56px', width: '56px',
...@@ -1579,6 +1683,10 @@ export default { ...@@ -1579,6 +1683,10 @@ export default {
optionLabel: 'confName', optionLabel: 'confName',
optionList: [ optionList: [
{ {
confId: 3,
confName: '不显示'
},
{
confId: 1, confId: 1,
confName: '同步在线客服' confName: '同步在线客服'
}, },
...@@ -1816,7 +1924,7 @@ export default { ...@@ -1816,7 +1924,7 @@ export default {
confName: '服务商' confName: '服务商'
} }
], ],
isDisabled: false, isDisabled: true,
handleRadioChange: (value, targetItem) => { handleRadioChange: (value, targetItem) => {
this.editForm.paymentAccountId = '' this.editForm.paymentAccountId = ''
this.configEditFormData.find(item => item.name == 'paymentAccountId').optionList = value == '1' ? this.baseData.payList : this.baseData.payMerchatList this.configEditFormData.find(item => item.name == 'paymentAccountId').optionList = value == '1' ? this.baseData.payList : this.baseData.payMerchatList
...@@ -1834,11 +1942,18 @@ export default { ...@@ -1834,11 +1942,18 @@ export default {
{ {
label: '收款模式', label: '收款模式',
name: 'paymentModel', name: 'paymentModel',
addHtml: 'paymentModel' addHtml: 'paymentModel',
},
{
label: '常态化模式',
name: 'normalModel',
addHtml: 'normalModel',
tips: '活动结束后是否作为常态化活动自动上架'
} }
], ],
//直播配置 //直播配置_1
liveEditFormData: [ liveEditFormData_1: [
{ {
label: '选择直播', label: '选择直播',
name: 'liveBroadcastRoomId', name: 'liveBroadcastRoomId',
...@@ -1914,7 +2029,49 @@ export default { ...@@ -1914,7 +2029,49 @@ export default {
} }
} }
], ],
liveEditRule: { //直播配置_2
liveEditFormData_2: [
{
label: '视频',
name: 'liveBroadcastMediaId',
type: 'select',
maxlength: 30,
optionLabel: 'label',
optionId: 'value',
optionList: []
},
{
label: '视频封面',
name: 'liveBroadcastRoomCover',
type: 'upload',
width: '320px',
limitSize: 2,
maxPhotoNum: 1,
supportGif: true,
handleUpload: (e, file, targetItem) => {
this.uploadImgOrGif(e, file, targetItem)
}
},
{
label: '状态标签',
name: 'liveBroadcastStateFlag',
type: 'radio',
optionId: 'confId',
optionLabel: 'confName',
optionList: [
{
confId: 1,
confName: '直播中'
},
{
confId: 2,
confName: '直播回放'
}
]
}
],
//直播验证规则_1
liveEditRule_1: {
liveBroadcastRoomId: [{ required: true, message: '请选择直播', trigger: 'change' }], liveBroadcastRoomId: [{ required: true, message: '请选择直播', trigger: 'change' }],
// groupQrCode: [{ required: true, message: '请选择加群二维码', trigger: 'change' }], // groupQrCode: [{ required: true, message: '请选择加群二维码', trigger: 'change' }],
floatingMaskDiagram: [ floatingMaskDiagram: [
...@@ -1942,6 +2099,19 @@ export default { ...@@ -1942,6 +2099,19 @@ export default {
} }
] ]
}, },
//直播验证规则_2
liveEditRule_2: {
liveBroadcastMediaUrl: [{ required: true, message: '请选择视频', trigger: 'change' }],
liveBroadcastRoomCover: [
{
required: true,
validator: (rule, value, callback) => {
callback()
}
}
],
liveBroadcastStateFlag: [{ required: true }]
},
defaultImgObj: Object.freeze({ defaultImgObj: Object.freeze({
COVER_LIVE: 'https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/COVER_LIVE.gif', COVER_LIVE: 'https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/COVER_LIVE.gif',
COVER_REPLAY: 'https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/COVER_REPLAY.gif' COVER_REPLAY: 'https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/COVER_REPLAY.gif'
...@@ -1953,44 +2123,29 @@ export default { ...@@ -1953,44 +2123,29 @@ export default {
} }
} }
}, },
filters: {
filterBalancePayment (crowdFundingPrice, activityPrice) {
let BalancePaymentNum = Number(crowdFundingPrice) - Number(activityPrice)
if (BalancePaymentNum == 0) return 0
return BalancePaymentNum > 0 ? BalancePaymentNum.toFixed(2) : ''
}
},
mounted () { mounted () {
this.getCrowdfundingOrderConfig() this.getCrowdfundingOrderConfig()
this.getLiveList() this.getLiveList()
this.setMinHeight('.crowd-config') this.setMinHeight('.crowd-config')
this.routeInfo = this.$route.query this.routeInfo = this.$route.query
this.routeInfo.addOrEdit != 'add' ? this.getInfo() : this.getPayList() this.getInfo()
var id = this.routeInfo.id var id = this.routeInfo.id
// var detailDisableList = ['editFormData']
var disableObj = {
detail: ['editFormData', 'configEditFormData', 'serviceEditFormData', 'commoditysEditFormData', 'experiencesEditFormData', 'liveEditFormData'],
edit: ['editFormData']
}
if (this.routeInfo.addOrEdit == 'detail') {
this.isDisabled = true
disableObj.detail.forEach(attr => {
this.changeFormAttr(
attr,
'isDisabled',
this[attr].map(item => item.label),
true
)
})
}
if (id) { if (id) {
if (this.routeInfo.addOrEdit == 'edit' && this.routeInfo.activityStatus == 2) { const disabledList = ['editFormData', 'customerEditFormData',
// this.$refs.configEditFormRef.$refs.activityDetailTextBox[0].forbidEdit() 'configEditFormData', 'serviceEditFormData', 'commoditysEditFormData',
this.isDisabled = this.routeInfo.addOrEdit != 'add' 'experiencesEditFormData', 'liveEditFormData_1', 'liveEditFormData_2']
disableObj.edit.forEach(attr => { disabledList.map(e => {
this.changeFormAttr( this[e].map(item => {
attr, this.changeFormAttr(e, 'isDisabled', [item.label], true)
'isDisabled',
this[attr].map(item => item.label),
true
)
}) })
this.changeFormAttr('configEditFormData', 'isDisabled', ['账户类型', '定金收款账户'], true) })
}
} }
}, },
...@@ -2001,17 +2156,11 @@ export default { ...@@ -2001,17 +2156,11 @@ export default {
}, },
deep: true deep: true
}, },
'editForm.activityPrice' (newValue, oldValue) {
this.editForm.activityPrice = limitPrice(newValue, oldValue, 5, 2, 0)
},
'editForm.goodsStock' (newValue, oldValue) {
this.editForm.goodsStock = limitPrice(newValue, oldValue, 5, 0, 0)
},
'editForm.activityTime' (newValue) { 'editForm.activityTime' (newValue) {
newValue && newValue.length && this.countDown() newValue && newValue.length && this.countDown()
}, },
'editForm.predictVolume' (newValue, oldValue) { 'editForm.predictVolume' (newValue, oldValue) {
this.editForm.predictVolume = limitPrice(newValue, oldValue, 7, 2, 0, 1000000) this.editForm.predictVolume = limitPrice(newValue, oldValue, 10, 2, 0, 1000000000)
}, },
'editForm.fictitiousGroupQuantity' (newValue, oldValue) { 'editForm.fictitiousGroupQuantity' (newValue, oldValue) {
this.editForm.fictitiousGroupQuantity = limitPrice(newValue, oldValue, 3, 0, 0, 501) this.editForm.fictitiousGroupQuantity = limitPrice(newValue, oldValue, 3, 0, 0, 501)
...@@ -2022,14 +2171,15 @@ export default { ...@@ -2022,14 +2171,15 @@ export default {
'editForm.fictitiousViewQuantity' (newValue, oldValue) { 'editForm.fictitiousViewQuantity' (newValue, oldValue) {
this.editForm.fictitiousViewQuantity = limitPrice(newValue, oldValue, 7, 0, 0) this.editForm.fictitiousViewQuantity = limitPrice(newValue, oldValue, 7, 0, 0)
}, },
'editForm.liveBroadcastRoomId' (newValue, oldValue) { 'editForm.liveBroadcastMediaId' (newValue, oldValue) {
this.editForm.liveFlag = newValue ? true : false this.liveEditFormData_2.find(item => item.name == 'liveBroadcastMediaId').optionList.map(e => {
}, if (newValue) {
'editForm.goodsId' (newValue, oldValue) { if (e.value == newValue) {
if (newValue) { this.editForm.liveBroadcastRoomCover = e.coverUrl
let idx = this.editFormData.findIndex(val => val.name == 'goodsCategory') this.editForm.liveBroadcastMediaUrl = e.mediaUrl
this.editFormData[idx].isHide = false }
} }
})
}, },
'editForm.targetStock' (newValue, oldValue) { 'editForm.targetStock' (newValue, oldValue) {
this.editForm.targetStock = limitPrice(newValue, oldValue, 99999, 0) this.editForm.targetStock = limitPrice(newValue, oldValue, 99999, 0)
...@@ -2057,7 +2207,16 @@ export default { ...@@ -2057,7 +2207,16 @@ export default {
}, },
'editForm.activityActionReport.signMerchantProduceCount' (newValue, oldValue) { 'editForm.activityActionReport.signMerchantProduceCount' (newValue, oldValue) {
this.editForm.activityActionReport.signMerchantProduceCount = limitPrice(newValue, oldValue, 99999, 2, 0) this.editForm.activityActionReport.signMerchantProduceCount = limitPrice(newValue, oldValue, 99999, 2, 0)
} },
'liveVideoVisible' (newValue, oldVal) {
if (!newValue) this.hideVideo()
},
'editForm.goodsList' (newValue, oldValue) {
if (newValue) {
let idx = this.editFormData.findIndex(val => val.name == 'goodsCategory')
this.editFormData[idx].isHide = false
}
},
}, },
methods: { methods: {
...@@ -2168,7 +2327,23 @@ export default { ...@@ -2168,7 +2327,23 @@ export default {
} }
} }
}, },
// 选择门店
handleRelateStoreClose () {
// console.log('handleRelateStoreClose')
// this.selectedList = this.$common.utils.deepClone(this.editForm.supplyMerchantList)
this.relateStoreVisible = !this.relateStoreVisible
},
handleRelateStoreConfirm (selectedData) {
// this.editForm.supplyMerchantList = selectedData
selectedData.merchantId && (this.editForm.merchantId = selectedData.merchantId)
selectedData.merchantName && (this.editForm.merchantName = selectedData.merchantName)
// this.selectedList = selectedData
this.selectedProInfo = []
this.handleRelateStoreClose()
},
handleSearchStore () {
this.$refs.relateStore.handleCurrentChange(1)
},
handleTimeChange (value, targetItem) { handleTimeChange (value, targetItem) {
!value && (this.editForm[targetItem.name] = []) !value && (this.editForm[targetItem.name] = [])
}, },
...@@ -2178,48 +2353,47 @@ export default { ...@@ -2178,48 +2353,47 @@ export default {
this.editRule.limitPurchaseNumber[0].required = val != 1 this.editRule.limitPurchaseNumber[0].required = val != 1
}, },
handleRelateProChange (val) { handleRelateProClose () {
this.editRule.goodsId[0].required = val == 2 // 先选门店在选商品
var idx = this.editFormData.findIndex(item => item.name == 'goodsId') if (!this.editForm.merchantId) return this.$message.error('请先选择门店!')
this.editFormData[idx].isHide = val != 2
},
handleRelateProClose (targetItem) {
this.selectedProInfo = this.editForm.goodsId ? { id: this.editForm.goodsId } : {}
this.handleSingleSelectClose() this.handleSingleSelectClose()
}, },
handleSingleSelectConfirm (selectedProInfo) { formatAppend (val, target, index, isInt) {
this.editForm.activityPrice = '' let str = String(val)
this.editForm.goodsStock = '' if (str.split('.').length > 1) val = str.slice(0, str.indexOf('.') + 3)
if (isInt) val = Math.floor(val)
this.editForm.goodsList[index][target] = val < 0 ? 1 : val
},
handleSingleSelectConfirm (list) {
let { editForm: { goodsList } } = this,
arr = []
this.handleSingleSelectClose() this.handleSingleSelectClose()
if (selectedProInfo) { if (goodsList.length) {
this.editForm.goodsId = selectedProInfo.id list.map((i, index) => {
this.getGoodInfo(selectedProInfo.id) arr[index] = {
} goodsId: i.id,
}
goodsList.map(e => {
if (i.id == e.goodsId) arr[index] = {
...arr[index],
activityPrice: e.activityPrice,
activityGoodsStock: e.goodsStock,
crowdFundingPrice: e.crowdFundingPrice,
}
})
})
} else list.map(e => {
arr.push({ goodsId: e.id })
})
this.selectedProInfo = list || []
this.editForm.goodsList = arr || []
this.setLimitPurchase()
}, },
handleSingleSelectClose (isCancel = false) { handleSingleSelectClose (isCancel = false) {
if (isCancel) {
this.selectedProInfo.id && this.getGoodInfo(this.selectedProInfo.id)
}
this.isSingleSelectVisible = !this.isSingleSelectVisible this.isSingleSelectVisible = !this.isSingleSelectVisible
}, },
getGoodInfo (id) {
if (!id) this.isDisabled = false
else this.$apis.proManage.getProInfoApi({ id: id }).then(res => {
this.selectedProInfo = this.$common.utils.deepClone(res)
if (this.selectedProInfo.specificationDetailList.length) {
this.changeFormAttr('editFormData', 'isHide', ['规格明细'], false)
this.specificationDetailList = this.selectedProInfo.specificationList
this.recoverySpec()
} else {
this.changeFormAttr('editFormData', 'isHide', ['规格明细'], true)
this.nameToValSpecsList = []
this.specificationDetailList = []
}
})
},
// 规格值解构 // 规格值解构
changeSpecs (isRecovery) { changeSpecs (isRecovery) {
this.specsWidth = 100 / (this.specificationDetailList.length + 4) + '%' this.specsWidth = 100 / (this.specificationDetailList.length + 4) + '%'
...@@ -2385,9 +2559,6 @@ export default { ...@@ -2385,9 +2559,6 @@ export default {
}, },
handleMusicChange (idx) { handleMusicChange (idx) {
if (this.isDisabled) {
return true
}
this.musicList.forEach((item, index) => { this.musicList.forEach((item, index) => {
if (index != idx) { if (index != idx) {
item.isCheck = false item.isCheck = false
...@@ -2455,16 +2626,19 @@ export default { ...@@ -2455,16 +2626,19 @@ export default {
}, },
handleDeleteItem (attr, formAttr, idx) { handleDeleteItem (attr, formAttr, idx) {
this.$confirm('是否删除该项?', '删除', { return new Promise((resolve) => {
confirmButtonText: '确定', this.$confirm('是否删除该项?', '删除', {
cancelButtonText: '取消', confirmButtonText: '确定',
type: 'warning', cancelButtonText: '取消',
callback: action => { type: 'warning',
if (action == 'confirm') { callback: action => {
this.editForm[formAttr].splice(idx, 1) if (action == 'confirm') {
this.dealItem(attr, formAttr) this.editForm[formAttr].splice(idx, 1)
this.dealItem(attr, formAttr)
resolve()
}
} }
} })
}) })
}, },
...@@ -2503,15 +2677,33 @@ export default { ...@@ -2503,15 +2677,33 @@ export default {
this.$apis.seckillActivity this.$apis.seckillActivity
.getActivityDetailApi({ id: this.routeInfo.id }) .getActivityDetailApi({ id: this.routeInfo.id })
.then(res => { .then(res => {
var info = res var info = res,
selectedProInfo = [],
goodsList = []
/**商品 */
res.liveBroadcastMediaId = ''
res.goodsList && res.goodsList.map(e => {
goodsList.push({
activityPrice: (e.activityPrice / 100).toFixed(2),
crowdFundingPrice: (e.crowdFundingPrice / 100).toFixed(2),
goodsId: e.goodsId,
activityGoodsStock: e.activityGoodsStock
})
selectedProInfo.push({
id: e.goodsId,
goodsImage: e.goodsImage,
retailPrice: (e.originalPrice / 100).toFixed(2),
goodsStock: e.goodsStock,
goodsName: e.goodsName
})
})
if (res.liveBroadcastRoomId || res.liveBroadcastMediaUrl) res.liveFlag = true
info.goodsList = goodsList
this.editForm = this.$common.utils.deepClone(res) this.editForm = this.$common.utils.deepClone(res)
this.activityInfo = info this.activityInfo = info
this.$set(this.editForm, 'activityTime', [info.startTime, info.endTime]) this.$set(this.editForm, 'activityTime', [info.startTime, info.endTime])
this.routeInfo.addOrEdit != 'add' && this.getGoodInfo(info.goodsId) this.selectedProInfo = selectedProInfo
if (info.activityPrice != null && info.goodsStock != null) {
this.editForm.activityPrice = (info.activityPrice / 100).toFixed(2)
this.editForm.goodsStock = info.goodsStock + ''
}
// 预估销量 // 预估销量
if (info.predictVolume) { if (info.predictVolume) {
this.editForm.predictVolume = (info.predictVolume / 100).toFixed(2) this.editForm.predictVolume = (info.predictVolume / 100).toFixed(2)
...@@ -2528,9 +2720,7 @@ export default { ...@@ -2528,9 +2720,7 @@ export default {
// 活动详情 // 活动详情
if (info.activityDetail) { if (info.activityDetail) {
this.editForm.activityDetail = decodeURIComponent(info.activityDetail) this.editForm.activityDetail = decodeURIComponent(info.activityDetail)
if (!this.isDisabled) { this.$refs.configEditFormRef.$refs.activityDetailTextBox[0].setEdit(this.editForm.activityDetail)
this.$refs.configEditFormRef.$refs.activityDetailTextBox[0].setEdit(this.editForm.activityDetail)
}
} }
// 活动音乐 // 活动音乐
if (info.activityMusic) { if (info.activityMusic) {
...@@ -2548,7 +2738,7 @@ export default { ...@@ -2548,7 +2738,7 @@ export default {
} }
} }
// 定金收款账户 // 定金收款账户
this.editForm.paymentAccountSource = this.editForm.paymentAccountSource ? this.editForm.paymentAccountSource + '' : '1' this.editForm.paymentAccountSource = this.editForm.paymentAccountSource + ''
// 表单设置 // 表单设置
this.editForm.formDescribeCheck = [] this.editForm.formDescribeCheck = []
this.editForm.selectCarNumberFlag = this.editForm.selectCarNumberFlag || 1 this.editForm.selectCarNumberFlag = this.editForm.selectCarNumberFlag || 1
...@@ -2581,7 +2771,7 @@ export default { ...@@ -2581,7 +2771,7 @@ export default {
} }
// 复制 // 复制
if (this.routeInfo.addOrEdit == 'copy') { if (this.routeInfo.addOrEdit == 'copy') {
let resetArr = [{ name: 'id' }, { name: 'activityTime', type: 'array' }, { name: 'liveBroadcastRoomId' }, { name: 'groupQrCode' }, { name: 'floatingMaskDiagram' }, { name: 'liveBroadcastRoomCover' }, { name: 'liveBroadcastRoomEndCover' }, { name: 'selectedProInfo', type: 'Object' }, { name: 'goodsId' }, { name: 'activityPrice' }, { name: 'goodsStock' }] let resetArr = [{ name: 'id' }, { name: 'activityTime', type: 'array' }, { name: 'liveBroadcastRoomId' }, { name: 'groupQrCode' }, { name: 'floatingMaskDiagram' }, { name: 'liveBroadcastRoomCover' }, { name: 'liveBroadcastRoomEndCover' }, { name: 'goodsList' }]
this.copyReset(resetArr) this.copyReset(resetArr)
} }
// 兼容以前众筹活动没有战报内容配置,展示页面 // 兼容以前众筹活动没有战报内容配置,展示页面
...@@ -2630,21 +2820,14 @@ export default { ...@@ -2630,21 +2820,14 @@ export default {
}) })
}, },
validateRules () {
if (this.specificationDetailList.length) {
this.editRule.activityPrice[0].required = false
this.editRule.goodsStock[0].required = false
} else {
this.editRule.activityPrice[0].required = true
this.editRule.goodsStock[0].required = true
}
},
getCouponInfoParams () { getCouponInfoParams () {
var _this = this var _this = this
var param = this.$common.utils.deepClone(this.editForm) var param = this.$common.utils.deepClone(this.editForm)
param.marketingType = 3 param.marketingType = 3
param.activityPrice = (param.activityPrice * 100).toFixed(0) //存的分,需乘100 param.goodsList.map(e => {
e.activityPrice = (e.activityPrice * 100).toFixed(0) //存的分,需乘100
e.crowdFundingPrice = (e.crowdFundingPrice * 100).toFixed(0) //存的分,需乘100
})
if (this.routeInfo.id && this.routeInfo.addOrEdit != 'copy') { if (this.routeInfo.id && this.routeInfo.addOrEdit != 'copy') {
param.id = this.routeInfo.id param.id = this.routeInfo.id
} }
...@@ -2653,7 +2836,6 @@ export default { ...@@ -2653,7 +2836,6 @@ export default {
param.startTime = d[0] param.startTime = d[0]
param.endTime = d[1] param.endTime = d[1]
} }
param.goodsId = this.selectedProInfo.id
if (this.nameToValSpecsList.length > 0) { if (this.nameToValSpecsList.length > 0) {
delete param.activityPrice delete param.activityPrice
delete param.goodsStock delete param.goodsStock
...@@ -2661,6 +2843,7 @@ export default { ...@@ -2661,6 +2843,7 @@ export default {
this.nameToValSpecsList.forEach(function (item) { this.nameToValSpecsList.forEach(function (item) {
var obj = { var obj = {
retailPrice: (item.activityPrice * 100).toFixed(0), //存的分,需乘100 retailPrice: (item.activityPrice * 100).toFixed(0), //存的分,需乘100
crowdFundingPrice: (item.crowdFundingPrice * 100).toFixed(0), //存的分,需乘100
stock: item.goodsStock, stock: item.goodsStock,
specificationData: item.specificationData, specificationData: item.specificationData,
specificationKey: item.specificationKey specificationKey: item.specificationKey
...@@ -2692,15 +2875,24 @@ export default { ...@@ -2692,15 +2875,24 @@ export default {
}) })
//直播 //直播
if (param.liveFlag) { if (param.liveFlag) {
if (!param.floatingMaskDiagram) param.floatingMaskDiagram = this.defaultFloatingMaskDiagram //直播
if (!param.liveBroadcastRoomCover) param.liveBroadcastRoomCover = this.defaultImgObj.COVER_LIVE if (param.liveBroadcastMediaType == 1) {
if (!param.liveBroadcastRoomEndCover) param.liveBroadcastRoomEndCover = this.defaultImgObj.COVER_REPLAY if (!param.floatingMaskDiagram) param.floatingMaskDiagram = this.defaultFloatingMaskDiagram
if (!param.liveBroadcastRoomCover) param.liveBroadcastRoomCover = this.defaultImgObj.COVER_LIVE
if (!param.liveBroadcastRoomEndCover) param.liveBroadcastRoomEndCover = this.defaultImgObj.COVER_REPLAY
} else {
// 视频直播
delete param.liveBroadcastMediaId
}
} else { } else {
let resetAttr = this.liveEditFormData.map(item => item.name) let resetAttr = this.liveEditFormData_1.map(item => item.name)
resetAttr.forEach(item => { resetAttr.forEach(item => {
param[item] = '' param[item] = ''
}) })
} }
// 定金收款账户
param.payMannerId = param.paymentAccountSource == 1 ? '' : param.paymentAccountId
param.paymentAccountId = param.paymentAccountSource == 1 ? param.paymentAccountId : ''
// 标杆门店总产值/元(已结束战报) // 标杆门店总产值/元(已结束战报)
if (param.activityActionReport.signMerchantProduceCount) { if (param.activityActionReport.signMerchantProduceCount) {
param.activityActionReport.signMerchantProduceCount = (this.editForm.activityActionReport.signMerchantProduceCount * 10000).toFixed(0) param.activityActionReport.signMerchantProduceCount = (this.editForm.activityActionReport.signMerchantProduceCount * 10000).toFixed(0)
...@@ -2730,7 +2922,7 @@ export default { ...@@ -2730,7 +2922,7 @@ export default {
} }
} }
// 已结束战报转化率计算 // 已结束战报转化率计算
param.activityActionReport.noteTouchConversionRate = "" param.activityActionReport.noteTouchConversionRate = ''
if (param.activityActionReport.noteTouchVisitorCount && param.activityActionReport.noteTouchOrderCount) { if (param.activityActionReport.noteTouchVisitorCount && param.activityActionReport.noteTouchOrderCount) {
let val = param.activityActionReport.noteTouchOrderCount / param.activityActionReport.noteTouchVisitorCount let val = param.activityActionReport.noteTouchOrderCount / param.activityActionReport.noteTouchVisitorCount
param.activityActionReport.noteTouchConversionRate = (val * 10000).toFixed(0) param.activityActionReport.noteTouchConversionRate = (val * 10000).toFixed(0)
...@@ -2767,6 +2959,7 @@ export default { ...@@ -2767,6 +2959,7 @@ export default {
addOrUpdate () { addOrUpdate () {
this.loading = true this.loading = true
var params = this.getCouponInfoParams() var params = this.getCouponInfoParams()
console.log(JSON.parse(JSON.stringify(params)))
this.$apis.seckillActivity this.$apis.seckillActivity
.addOrUpdateActivityApi(params) .addOrUpdateActivityApi(params)
.then(res => { .then(res => {
...@@ -2812,7 +3005,6 @@ export default { ...@@ -2812,7 +3005,6 @@ export default {
this.editForm.activityServices = this.delListAllEmpty('activityServices', ['title', 'content']) this.editForm.activityServices = this.delListAllEmpty('activityServices', ['title', 'content'])
this.editForm.activityCommoditys = this.delListAllEmpty('activityCommoditys', ['question', 'answer']) this.editForm.activityCommoditys = this.delListAllEmpty('activityCommoditys', ['question', 'answer'])
this.editForm.activityExperienceDTOs = this.delListAllEmpty('activityExperienceDTOs', ['experience', 'activityExperienceImgs']) this.editForm.activityExperienceDTOs = this.delListAllEmpty('activityExperienceDTOs', ['experience', 'activityExperienceImgs'])
this.validateRules()
var flag = true var flag = true
if (this.nameToValSpecsList && this.nameToValSpecsList.length > 0) { if (this.nameToValSpecsList && this.nameToValSpecsList.length > 0) {
var list = this.nameToValSpecsList var list = this.nameToValSpecsList
...@@ -2826,7 +3018,7 @@ export default { ...@@ -2826,7 +3018,7 @@ export default {
flag = false flag = false
break break
} }
if (!item.goodsStock) { if (!item.activityGoodsStock) {
this.$message({ this.$message({
message: '有未设置活动库存的项', message: '有未设置活动库存的项',
type: 'error' type: 'error'
...@@ -2842,11 +3034,21 @@ export default { ...@@ -2842,11 +3034,21 @@ export default {
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid, errorObj) => { this.$refs.editFormRef.$refs[this.editChildRef].validate((valid, errorObj) => {
validList = [ validList = [
{ valid: !valid, errorObj: errorObj }, { valid: !valid, errorObj: errorObj },
{ valid: !flag, errorObj: { goodsId: '' } } { valid: !flag, errorObj: { goodsList: [] } }
] ]
this.$refs.configEditFormRef.$refs[this.editChildRef].validate((configValid, configErrorObj) => { this.$refs.configEditFormRef.$refs[this.editChildRef].validate((configValid, configErrorObj) => {
validList.push({ valid: !configValid, errorObj: configErrorObj }) validList.push({ valid: !configValid, errorObj: configErrorObj })
if (this.checkValid(validList)) { if (this.checkValid(validList)) {
if (this.$refs.goodsListEditFormRef) {
this.$refs.goodsListEditFormRef.forEach(item => {
item.$refs[this.editChildRef].validate((serviceValid, serviceErrorObj) => {
if (!serviceValid) {
validFlag = false
this.whereToGo('goodsList')
}
})
})
}
if (this.$refs.customerEditFormRef) { if (this.$refs.customerEditFormRef) {
this.$refs.customerEditFormRef.$refs[this.editChildRef].validate((customerValid, customerErrorObj) => { this.$refs.customerEditFormRef.$refs[this.editChildRef].validate((customerValid, customerErrorObj) => {
validList.splice(2, 0, { valid: !customerValid, errorObj: customerErrorObj }) validList.splice(2, 0, { valid: !customerValid, errorObj: customerErrorObj })
...@@ -2903,34 +3105,53 @@ export default { ...@@ -2903,34 +3105,53 @@ export default {
}) })
}, },
handleCancel () { handleCancel () {
if (this.editStatus && this.addOrEdit != 'detail') { this.cancelJump()
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', { // if (this.editStatus) {
confirmButtonText: '确定', // this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
cancelButtonText: '取消', // confirmButtonText: '确定',
type: 'warning' // cancelButtonText: '取消',
}) // type: 'warning'
.then(() => { // })
this.cancelJump() // .then(() => {
}) // this.cancelJump()
.catch(() => { }) // })
} else { // .catch(() => { })
this.cancelJump() // } else {
} // this.cancelJump()
// }
}, },
//获取跟进员工
getLiveList () { getLiveList () {
this.$apis.seckillActivity.getLiveListApi({}).then(res => { this.$apis.seckillActivity.getLiveListApi({}).then(res => {
if (res.length == 0) return '' if (res.length == 0) return ''
const index = this.liveEditFormData.findIndex(item => {
return item.name == 'liveBroadcastRoomId'
})
const staff = res.map(item => { const staff = res.map(item => {
return { return {
label: item.name + ' - ' + item.code, label: item.name + ' - ' + item.code,
value: item.id value: item.id
} }
}) })
this.liveEditFormData.find(item => item.name == 'liveBroadcastRoomId').optionList = staff this.liveEditFormData_1.find(item => item.name == 'liveBroadcastRoomId').optionList = staff
})
},
getVideoList () {
const { liveBroadcastMediaUrl } = this.editForm
this.$apis.seckillActivity.getTencentcloudmediaList({}).then(res => {
if (res.length == 0) return ''
const staff = res.map(item => {
return {
label: item.fileName,
mediaUrl: item.mediaUrl,
value: item.id,
coverUrl: item.coverUrl
}
})
this.liveEditFormData_2.find(item => item.name == 'liveBroadcastMediaId').optionList = staff
if (liveBroadcastMediaUrl) {
staff.map(item => {
if (liveBroadcastMediaUrl == item.mediaUrl) {
this.editForm.liveBroadcastMediaId = item.value
}
})
}
}) })
}, },
getPayMerchatList () { getPayMerchatList () {
...@@ -2948,13 +3169,35 @@ export default { ...@@ -2948,13 +3169,35 @@ export default {
}, },
// 定金收款账户 // 定金收款账户
getPayList () { getPayList () {
this.getVideoList()
this.$apis.seckillActivity.getPayListApi({}).then(res => { this.$apis.seckillActivity.getPayListApi({}).then(res => {
this.baseData.payList = res this.baseData.payList = res
this.editForm.paymentAccountSource = this.editForm.paymentAccountSource || '1' this.editForm.paymentAccountSource = this.editForm.paymentAccountSource || '1'
this.editForm.paymentAccountId = this.editForm.paymentAccountId || this.editForm.payMannerId || res.find(item => item.isDefault == 'Y')?.id this.editForm.paymentAccountId = this.editForm.paymentAccountId || this.editForm.payMannerId || res.find(item => item.isDefault == 'Y')?.id
this.getPayMerchatList() this.getPayMerchatList()
}) })
},
/**删除商品 */
async delGoods (index) {
await this.handleDeleteItem('', 'goodsList', index)
this.selectedProInfo.splice(index, 1)
this.setLimitPurchase()
},
setLimitPurchase () {
const { goodsList } = this.editForm
if (goodsList.length > 1) this.editForm.limitPurchaseFlag = 1
this.limitPurchaseDisabled = goodsList.length > 1
},
//预览直播视频
hideVideo (play) {
this.liveVideoVisible = play
if (!play) this.$refs.liveVideo?.pause()
else this.$refs.liveVideo?.play()
} }
} }
} }
</script> </script>
...@@ -2968,6 +3211,12 @@ export default { ...@@ -2968,6 +3211,12 @@ export default {
text-align: right; text-align: right;
padding-right: 12px; padding-right: 12px;
} }
.edit-activity .el-form-item__content {
width: auto;
}
#customerServiceFlag .el-form-item__content .el-radio-group {
width: 400px;
}
.edit-product-dh .table-spesc { .edit-product-dh .table-spesc {
width: 100%; width: 100%;
text-align: center; text-align: center;
...@@ -2976,7 +3225,30 @@ export default { ...@@ -2976,7 +3225,30 @@ export default {
.edit-product-dh .table-spesc tbody tr { .edit-product-dh .table-spesc tbody tr {
border: 1px solid #e7e7e7; border: 1px solid #e7e7e7;
} }
.merchantNameLabel {
width: 510px;
color: #1d1d1d;
// margin-left: 50px;
padding: 16px;
margin-top: 8px;
border: 1px solid #e6e6e6;
border-radius: 8rpx;
background: #f9f9f9;
.merchantName {
box-sizing: border-box;
width: 284px;
height: 32px;
background: #ffffff;
border: 1px solid #e6e6e6;
border-radius: 4px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #999999;
line-height: 32px;
padding: 0 8px;
}
}
.edit-product-dh .table-spesc tbody td { .edit-product-dh .table-spesc tbody td {
display: inline-block; display: inline-block;
box-sizing: border-box; box-sizing: border-box;
...@@ -3175,6 +3447,7 @@ export default { ...@@ -3175,6 +3447,7 @@ export default {
opacity: 0.1; opacity: 0.1;
} }
} }
.btn-box { .btn-box {
padding: 0 20px 2px; padding: 0 20px 2px;
} }
...@@ -3185,6 +3458,12 @@ export default { ...@@ -3185,6 +3458,12 @@ export default {
width: auto !important; width: auto !important;
} }
} }
.balancePayment {
span {
font-weight: 500;
color: #ee3040;
}
}
.el-switch { .el-switch {
.el-switch__core { .el-switch__core {
width: 44px !important; width: 44px !important;
...@@ -3275,16 +3554,6 @@ export default { ...@@ -3275,16 +3554,6 @@ export default {
} }
} }
.reportConfigure-bag { .reportConfigure-bag {
width: 964px;
background: #f9f9f9;
.el-tabs__nav-scroll {
border-bottom: 1px solid #e8e8e8;
}
.el-tabs__item.is-active {
border: 0px solid #f9f9f9 !important;
border-bottom: 1px solid #5850ff !important;
background: #f9f9f9 !important;
}
.el-form-item--small.el-form-item { .el-form-item--small.el-form-item {
margin: 20px 0 10px 74px; margin: 20px 0 10px 74px;
} }
...@@ -3306,4 +3575,119 @@ export default { ...@@ -3306,4 +3575,119 @@ export default {
} }
} }
} }
.tab-pane {
width: 964px;
background: #f9f9f9;
.el-tabs__nav-scroll {
border: 1px solid #e6e6e6;
}
.el-tabs__item.is-active {
border: 0px solid #f9f9f9 !important;
border-bottom: 1px solid #5850ff !important;
background: #f9f9f9 !important;
}
}
.live-box {
.previewVideo {
position: absolute;
top: 22px;
left: 618px;
}
}
.paymentModelSlot {
display: flex;
.el-radio {
margin-top: 10px;
}
}
.el-input input::-webkit-outer-spin-button,
.el-input input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
.el-input input[type='number'] {
-moz-appearance: textfield;
}
.el-input .el-input__inner {
line-height: 1 !important;
}
.goods-box {
margin-top: 10px;
width: 928px;
background: #f9f9f9;
border-radius: 4px;
overflow: hidden;
.item {
width: calc(100% - 72px);
height: 114px;
padding: 16px;
color: #333333;
border-bottom: 1px dashed rgba(0, 0, 0, 0.15);
position: relative;
.del {
position: absolute;
top: 0;
right: -40px;
width: 40px;
height: 100%;
background-color: #f1f1f1;
cursor: pointer;
justify-content: center;
border-bottom: 1px solid #f1f1f1;
img {
width: 20px;
height: 20px;
}
&:hover {
background-color: #ee3040;
border-color: #ee3040;
}
}
&:last-of-type {
border-bottom: none;
.del {
border-bottom: none;
}
}
.img-60 {
width: 72px;
height: 72px;
margin-right: 10px;
}
.goods-info {
p {
line-height: 20px;
}
}
.goods-form-box {
.glsx-combi-form-block {
width: 100%;
display: flex !important;
align-items: center;
padding-left: 0;
justify-content: space-between;
.el-form-item {
margin: 0 !important;
}
}
margin-top: 8px;
.goods-form-item {
display: flex;
align-items: center;
margin: 0 !important;
flex-shrink: 0;
}
.el-form-item__label {
width: auto !important;
flex-shrink: 0;
color: #333;
}
}
}
}
.live-video {
min-height: 156px;
max-height: 586px;
display: block;
margin: 0 auto;
}
</style> </style>
...@@ -66,6 +66,7 @@ export default { ...@@ -66,6 +66,7 @@ export default {
}, },
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
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</glsx-combi-form> </glsx-combi-form>
</div> </div>
</div> </div>
<div class="container edit-container"> <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>
<el-tooltip :disabled="!(!editForm.customerInfoList.length || !editForm.sopName)" effect="dark" <el-tooltip :disabled="!(!editForm.customerInfoList.length || !editForm.sopName)" effect="dark"
...@@ -81,7 +81,8 @@ ...@@ -81,7 +81,8 @@
<div v-show="editForm.eventList.length" class="event-box"> <div v-show="editForm.eventList.length" class="event-box">
<div class="event-item" v-for="(item, index) in editForm.eventList" :key="index"> <div class="event-item" v-for="(item, index) in editForm.eventList" :key="index">
<div class="flex-default event-title"> <div class="flex-default event-title">
<p class="m-r-10">{{ item.eventStartDate }}</p> <p :class="{'m-r-10':true,'editFlag':!item.eventStartDate}">
{{ item.eventStartDate ? item.eventStartDate : '请点击“编辑”完善事件的营销时间' }}</p>
<p class="m-r-20">{{ item.eventTime }}</p> <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 == 1">每天重复循环至</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y' && item.repeatMode == 2">每周{{ <p class="m-r-20" v-show="item.repeatFlag == 'Y' && item.repeatMode == 2">每周{{
...@@ -112,11 +113,14 @@ ...@@ -112,11 +113,14 @@
<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">
<img src="@/assets/welcomeWord/pdf_r.png" v-if="obj.attContent && !JSON.parse(obj.attContent).isFile"/> <img src="@/assets/welcomeWord/pdf_r.png"
<img src="@/assets/welcomeWord/text.png" v-if="obj.attContent && JSON.parse(obj.attContent).isFile"/>
v-if="obj.attContent && !backupContentJson(obj.attContent).isFile"/>
<img src="@/assets/welcomeWord/text.png"
v-if="obj.attContent && backupContentJson(obj.attContent).isFile"/>
</div> </div>
<div class="welcome-activity-desc"> <div class="welcome-activity-desc">
<div class="model-item-title">{{ JSON.parse(obj.attContent).fileName }}</div> <div class="model-item-title">{{ backupContentJson(obj.attContent).fileName }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -197,7 +201,7 @@ ...@@ -197,7 +201,7 @@
content="请先完善sop名称和营销对象" placement="top"> content="请先完善sop名称和营销对象" placement="top">
<div> <div>
<el-button class="default-blue-btn newBtnSty" <el-button class="default-blue-btn newBtnSty"
v-if="new Date(item.eventStartDate) > new Date()" v-if="new Date(item.eventStartDate) > new Date() || !item.eventStartDate"
:disabled="!editForm.customerInfoList.length || !editForm.sopName" :disabled="!editForm.customerInfoList.length || !editForm.sopName"
:size="size" @click="handleEventEdit('edit', item, index)">编辑 :size="size" @click="handleEventEdit('edit', item, index)">编辑
</el-button> </el-button>
...@@ -239,6 +243,7 @@ export default { ...@@ -239,6 +243,7 @@ export default {
size: 'small', size: 'small',
title: '基本信息', title: '基本信息',
url: url, url: url,
marketingEventLoading: false,
editChildRef: 'editChildRef', editChildRef: 'editChildRef',
editStatus: false, editStatus: false,
editDisabled: false, editDisabled: false,
...@@ -388,7 +393,14 @@ export default { ...@@ -388,7 +393,14 @@ export default {
confName: '微信朋友圈' confName: '微信朋友圈'
} }
] ]
} },
// 素材活动集合
materialGroupSet: [],
equityCardCollection: [],
equityPackageCollection: [],
mallCouponCollection: [],
seckillActivitySet: []
} }
}, },
...@@ -421,17 +433,60 @@ export default { ...@@ -421,17 +433,60 @@ export default {
}, },
mounted() { async mounted() {
this.setMinHeight('.sop-base-info') this.setMinHeight('.sop-base-info')
// this.routeInfo.addOrEdit == 'edit' // this.routeInfo.addOrEdit == 'edit'
await this.getTheMaterialActivityCollection()
if (['edit', 'copy', 'look'].includes(this.routeInfo.addOrEdit)) { if (['edit', 'copy', 'look'].includes(this.routeInfo.addOrEdit)) {
this.getInfo() this.getInfo()
} else if (this.routeInfo.info) { } else if (this.routeInfo.info) {
this.setCustomer() this.setCustomer()
} }
}, },
methods: { methods: {
async getTheMaterialActivityCollection() {
await this.$apis.welcomeword.getMaterialListApi({
pageNum: 1,
pageSize: 100000,
merchant: this.$globalState.session.merchantId,
status: 0
}).then(res =>
this.materialGroupSet = res.data
)
},
async getEachActivity(interfaceName) {
let params = {
pageNum: 1,
pageSize: 100000,
}
// 权益卡
if (interfaceName == 'merchant') {
params.tryAble = 1
params.merchantId = this.$globalState.session.merchantId
}
if (interfaceName == 'getActivity') {
params.currentPage = 1
}
await this.$apis.welcomeword[interfaceName](params).then(res => {
switch (interfaceName) {
case 'merchant':
this.equityCardCollection = res
break;
case 'getPackage':
this.equityPackageCollection = res.list
break;
case 'getMerchant':
this.mallCouponCollection = res.list
break;
case 'getActivity':
this.seckillActivitySet = res.list
}
})
},
tramWord(val) { tramWord(val) {
let htm = val.replace( let htm = val.replace(
/\[([\u4E00-\u9FA56]{1,4}|OK|NO|666)]/gi, /\[([\u4E00-\u9FA56]{1,4}|OK|NO|666)]/gi,
...@@ -564,65 +619,153 @@ export default { ...@@ -564,65 +619,153 @@ export default {
} }
}, },
async processOldSOPData(list, index) {
for (let i = 0; i < list['eventList'].length; i++) {
let item = list.eventList[i]
if (!item.backupContent) {
this.marketingEventLoading = true
let backUpContent = []
// 文本
backUpContent.push({attType: 1, attContent: item.eventContent})
// 图片
if (item.additionalType == 5 && item.objectType == 11) {
let imgResourceList = item.object && item.object.result.map(img => img.content)
imgResourceList.forEach(resource => {
backUpContent.push({attType: 2, attContent: resource})
})
}
// 视频
if (item.additionalType == 5 && item.objectType == 12) {
let videoResourceList = item.object && item.object.result.map(img => img.content)
backUpContent.push({attType: 3, attContent: videoResourceList})
}
// 活动-权益卡试用
if (item.additionalType == 2 && item.objectType == 6) {
await this.getEachActivity('merchant')
let activity = this.equityCardCollection && this.equityCardCollection.filter(it => it.equityClassId == item.objectId)
let {effectivedDay, equityClassId, effectiveType, equityName, freeDay} = activity[0]
backUpContent.push({
attType: 7,
attContent: {
marketingId: equityClassId,
marketingType: effectiveType,
marketingName: equityName,
marketingContent: {
equityName,
effectivedDay,
effectiveType,
freeDay,
selectType: 'card',
}
}
})
}
// 活动-权益套餐
if (item.additionalType == 2 && item.objectType == 7) {
await this.getEachActivity('getPackage')
let getPackage = this.equityPackageCollection && this.equityPackageCollection.filter(it => it.id == item.objectId)
let {id, packagePrice, packageName} = getPackage[0]
backUpContent.push({
attType: 7,
attContent: {
marketingId: id,
// marketingType: effectiveType,
marketingName: packageName,
marketingContent: {
packageName,
packagePrice,
selectType: 'package',
}
}
})
}
// 活动-商城券
if (item.additionalType == 3 && item.objectType == 5) {
await this.getEachActivity('getMerchant')
let coupon = this.mallCouponCollection && this.mallCouponCollection.filter(it => it.id == item.objectId)
let {id, couponName, effectiveType, residueAmount} = coupon[0]
backUpContent.push({
attType: 7,
attContent: {
marketingId: id,
marketingType: effectiveType,
marketingName: couponName,
marketingContent: {
couponName,
effectiveType,
residueAmount,
selectType: 'coupon',
}
}
})
}
// 活动-秒杀活动
if (item.additionalType == 2 && item.objectType == 8) {
await this.getEachActivity('getActivity')
let activity = this.seckillActivitySet && this.seckillActivitySet.filter(it => it.id == item.objectId)
let {id, activityName, startTime, endTime} = activity[0]
backUpContent.push({
attType: 7,
attContent: {
marketingId: id,
// marketingType: effectiveType,
marketingName: activityName,
marketingContent: {
activityName,
endTime,
startTime,
selectType: 'activity',
}
}
})
}
// 素材
if (item.additionalType == 1 && item.objectType == 10) {
let material = this.materialGroupSet && this.materialGroupSet.filter(it => it.id == item.objectId)
let {id, materialContentRpcResponse} = material[0]
let detail = {
'fileName': materialContentRpcResponse.materialName,
'objectId': id,
'isFile': decodeURIComponent(materialContentRpcResponse.materialUrl),
}
backUpContent.push({
attType: 6,
attContent: JSON.stringify(detail)
})
}
list.eventList[i].backupContent = backUpContent
}
}
return list
},
getInfo() { getInfo() {
this.$apis.sop.getSopInfoDetailApi({sopId: this.routeInfo.id}).then(res => { this.$apis.sop.getSopInfoDetailApi({sopId: this.routeInfo.id}).then(async res => {
if (this.routeInfo.addOrEdit == 'copy') { if (this.routeInfo.addOrEdit == 'copy') {
this.copyForm = res res.eventList && res.eventList.map(item => {
this.copyForm.eventList.forEach(item => {
item.eventStartDate = '' item.eventStartDate = ''
item.eventTime = '' item.eventTime = ''
if (item.object) {
item.object.objectId = item.objectId
item.object.objectType = item.objectType
item.object.objectName = item.objectName
item.object.additionalType = item.additionalType
}
// if (item.additionalType == 4) {
// // attType (1文本,2图片,3视频,4链接,5小程序,6附件,7活动)
// // attContent 附件内容
// // 文字
// let txtObj = item.object.attachmentList.find(k => k.attType == 1)
// item.object.showTxtContent = txtObj ? txtObj.attContent : ''
// // 图片
// let imgList = item.object.attachmentList.filter(k => k.attType == 2)
// item.object.showImgContent = imgList || []
// // 视频
// let videoList = item.object.attachmentList.filter(k => k.attType == 3)
// item.object.showVideoContent = videoList || []
// }
}) })
this.editForm.eventList = this.copyForm.eventList
this.$nextTick(() => { // 判断有没有旧数据
this.editStatus = false await this.processOldSOPData(res).then(res => {
this.marketingEventLoading = false
}) })
this.editForm.eventList = res.eventList
} else { } else {
this.editForm = res this.editForm = res
this.currentCustomerIdx = this.customerDataList.findIndex(item => item.confId == this.editForm.customerOptType) this.currentCustomerIdx = this.customerDataList.findIndex(item => item.confId == this.editForm.customerOptType)
this.recoverCustomerList() this.recoverCustomerList()
this.editForm.customerOptUpdate = this.editForm.customerOptUpdate + '' this.editForm.customerOptUpdate = this.editForm.customerOptUpdate + ''
//
// this.editForm.eventList.forEach(item => {
// console.log(item.object)
// if (item.object) {
// item.object.objectId = item.objectId
// item.object.objectType = item.objectType
// item.object.objectName = item.objectName
// item.object.additionalType = item.additionalType
// }
// if (item.additionalType == 4) {
// // attType (1文本,2图片,3视频,4链接,5小程序,6附件,7活动)
// // attContent 附件内容
// // 文字
// let txtObj = item.object.attachmentList.find(k => k.attType == 1)
// item.object.showTxtContent = txtObj ? txtObj.attContent : ''
// // // 图片
// let imgList = item.object.attachmentList.filter(k => k.attType == 2)
// item.object.showImgContent = imgList || []
// // // 视频
// let videoList = item.object.attachmentList.filter(k => k.attType == 3)
// item.object.showVideoContent = videoList || []
// }
// })
this.editDisabled = new Date(this.editForm.startDate) < new Date() this.editDisabled = new Date(this.editForm.startDate) < new Date()
this.editDisabled && this.judgeDisable() this.editDisabled && this.judgeDisable()
this.$nextTick(() => { this.$nextTick(() => {
...@@ -744,7 +887,7 @@ export default { ...@@ -744,7 +887,7 @@ export default {
if (action == 'confirm') { if (action == 'confirm') {
this.customerDataList[this.currentCustomerIdx].list = [] this.customerDataList[this.currentCustomerIdx].list = []
this.changeCustomer() this.changeCustomer()
this.editForm.eventList = [] // this.editForm.eventList = []
} }
} }
}) })
...@@ -755,7 +898,8 @@ export default { ...@@ -755,7 +898,8 @@ export default {
}, },
deleteCustPop() { deleteCustPop() {
this.$confirm('修改的客户类型(是否加企微、是否有手机号)不一致,原有营销渠道可能不可用,系统自动重置原有营销事件。是否确定修改?', '提示', { // ,原有营销渠道可能不可用,系统自动重置原有营销事件
this.$confirm('修改的客户类型(是否加企微、是否有手机号)不一致。是否确定修改?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
...@@ -765,7 +909,7 @@ export default { ...@@ -765,7 +909,7 @@ export default {
// this.$refs.editFormRef.$refs[this.editChildRef].validateField('customerInfoList') // this.$refs.editFormRef.$refs[this.editChildRef].validateField('customerInfoList')
this.customerDataList[this.currentCustomerIdx].list = [] this.customerDataList[this.currentCustomerIdx].list = []
this.changeCustomer() this.changeCustomer()
this.editForm.eventList = [] // this.editForm.eventList = []
} }
} }
}) })
...@@ -1042,6 +1186,18 @@ export default { ...@@ -1042,6 +1186,18 @@ export default {
} }
}) })
} else { } else {
// 处理复制事件的营销时间
let copyTimeFlag = this.editForm.eventList.every(its => {
return its.eventStartDate && its.eventTime
})
if (!copyTimeFlag) {
this.$message({
message: '请选择营销事件的营销时间',
type: 'error'
})
return
}
// 这边走的是新增 // 这边走的是新增
params.eventList = [] params.eventList = []
this.editForm.eventList.forEach((item, index) => { this.editForm.eventList.forEach((item, index) => {
...@@ -1447,4 +1603,9 @@ export default { ...@@ -1447,4 +1603,9 @@ export default {
margin-top: 8px; margin-top: 8px;
display: inline-block display: inline-block
} }
.editFlag {
color: #f56c6c;
font-size: 12px;
}
</style> </style>
...@@ -2,8 +2,11 @@ ...@@ -2,8 +2,11 @@
<div class="img-bg"> <div class="img-bg">
<div class="preview-content"> <div class="preview-content">
<div class="preview-time">{{ currentTime }}</div> <div class="preview-time">{{ currentTime }}</div>
<div :class="{'preview-info':true,'isMargin':previewList && previewList[2] && previewList[2].attType == 6 && item.attType ==6}" v-for="item in previewList" :key="item.id"> <div
<img class="avatar" src="@/assets/guestCustom/default-customer.png" v-if="!(hasSixType && hasSevenType) || item.attType !== 7" alt/> :class="{'preview-info':true,'isMargin':(previewList && previewList[2] && previewList[2].attType == 6 && item.attType ==6) || previewList && previewList[1] && previewList[0].attType == 7 && previewList[1].attType ==6 &&item.attType ==6}"
v-for="item in previewList" :key="item.id">
<img class="avatar" src="@/assets/guestCustom/default-customer.png"
v-if="!(hasSixType && hasSevenType) || item.attType !== 7" alt/>
<template v-if="item.attType == 1"> <template v-if="item.attType == 1">
<div class="preview-text text" v-html="item.attContent"></div> <div class="preview-text text" v-html="item.attContent"></div>
</template> </template>
...@@ -123,7 +126,6 @@ export default { ...@@ -123,7 +126,6 @@ export default {
}) })
item.attContent = htm item.attContent = htm
} else if (item.attType != 2 && item.attType != 3 && item.attType != 7) { } else if (item.attType != 2 && item.attType != 3 && item.attType != 7) {
// console.log(item.attContent, JSON.parse(item.attContent).fileName)
item.attContent = JSON.parse(item.attContent) item.attContent = JSON.parse(item.attContent)
} }
}) })
...@@ -131,7 +133,6 @@ export default { ...@@ -131,7 +133,6 @@ export default {
}, },
previewVal: { previewVal: {
handler(val) { handler(val) {
console.log(val)
this.previewList = utils.deepClone(val).filter(item => item.attContent) this.previewList = utils.deepClone(val).filter(item => item.attContent)
}, },
deep: true deep: true
...@@ -156,9 +157,10 @@ export default { ...@@ -156,9 +157,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.isMargin{ .isMargin {
margin-top: -20px; margin-top: -20px;
} }
.img-bg { .img-bg {
position: relative; position: relative;
width: 290px; width: 290px;
......
...@@ -2,73 +2,48 @@ ...@@ -2,73 +2,48 @@
<div class="img-bg"> <div class="img-bg">
<div class="preview-content"> <div class="preview-content">
<div class="preview-info" v-show="previewListFilter.length"> <div class="preview-info" v-show="previewListFilter.length">
<img class="avatar" src="@/assets/guestCustom/default-customer.png" alt /> <img class="avatar" src="@/assets/guestCustom/default-customer.png" alt/>
<template v-if="previewListFilter && previewListFilter.length <= 3"> <template>
<div class="preview-box" v-for="item in previewListFilter" :key="item.id"> <div class="preview-box" v-for="item in previewListFilter" :key="item.id">
<div class="preview-box-desc"> <div class="preview-box-desc">
<template v-if="item.attType == 1"> <template v-if="item.attType == 1">
<div class="preview-text text" v-html="item.attContent"></div> <div class="preview-text text" v-html="item.attContent"></div>
</template> </template>
<template v-else-if="item.attType == 7"> <template v-else-if="hasSixType || hasSevenType">
<div class="preview-text preview-link"> <template v-if="hasSixType && hasSevenType">
<img src="@/assets/guestCustom/preview-link.png" alt /> <template v-if="item.attType == 6">
<div>{{item.attContent.marketingName }}</div> <div class="preview-text preview-link">
</div> <img src="@/assets/guestCustom/preview-link.png" alt/>
</template> <div>{{ JSON.parse(item.attContent).fileName }}</div>
<template v-else-if="item.attType == 6"> </div>
<div class="preview-text preview-link"> </template>
<img src="@/assets/guestCustom/preview-link.png" alt /> </template>
<div>{{JSON.parse(item.attContent).fileName}}</div> <template v-else>
</div> <template v-if="item.attType == 7">
</template> <div class="preview-text preview-link">
<template v-else-if="item.attType == 2" v-for="(imgItem, index) in item.attContent"> <img src="@/assets/guestCustom/preview-link.png" alt/>
<el-image style="width: 52px; height: 52px" class="img-list" :src="imgItem" fit="fit" :key="index" :preview-src-list="item.attContent"></el-image> <div>{{ item.attContent.marketingName }}</div>
</template> </div>
<template v-else-if="item.attType == 3"> </template>
<!-- <el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image> --> <template v-if="item.attType == 6">
<div class="video-panel"> <div class="preview-text preview-link">
<video id="video" width="100%" height="100%" preload loop muted> <img src="@/assets/guestCustom/preview-link.png" alt/>
<source :src="item.attContent" type="video/mp4" /> <div>{{ JSON.parse(item.attContent).fileName }}</div>
</video> </div>
<i </template>
class="el-icon-video-play" </template>
@click="
videoShow = true
videoUrl = item.attContent
"
></i>
</div>
</template>
</div>
</div>
</template>
<template v-else>
<div class="preview-box" v-for="item in previewListFilter" :key="item.id">
<div class="preview-box-desc">
<template v-if="item.attType == 1">
<div class="preview-text text" v-html="item.attContent"></div>
</template>
<!-- <template v-else-if="item.attType == 7">-->
<!-- <div class="preview-text preview-link">-->
<!-- <img src="@/assets/guestCustom/preview-link.png" alt />-->
<!-- <div>{{item.attContent.marketingName }}</div>-->
<!-- </div>-->
<!-- </template>-->
<template v-else-if="item.attType == 6">
<div class="preview-text preview-link">
<img src="@/assets/guestCustom/preview-link.png" alt />
<div>{{JSON.parse(item.attContent).fileName}}</div>
</div>
</template> </template>
<template v-else-if="item.attType == 2" v-for="(imgItem, index) in item.attContent"> <template v-else-if="item.attType == 2" v-for="(imgItem, index) in item.attContent">
<el-image style="width: 52px; height: 52px" class="img-list" :src="imgItem" fit="fit" :key="index" :preview-src-list="item.attContent"></el-image> <el-image style="width: 52px; height: 52px" class="img-list" :src="imgItem" fit="fit" :key="index"
:preview-src-list="item.attContent"></el-image>
</template> </template>
<template v-else-if="item.attType == 3"> <template v-else-if="item.attType == 3">
<!-- <el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image> --> <!-- <el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image> -->
<div class="video-panel"> <div class="video-panel">
<video id="video" width="100%" height="100%" preload loop muted> <video id="video" width="100%" height="100%" preload loop muted>
<source :src="item.attContent" type="video/mp4" /> <source :src="item.attContent" type="video/mp4"/>
</video> </video>
<i <i
class="el-icon-video-play" class="el-icon-video-play"
...@@ -105,27 +80,31 @@ const ATT_TYPE = { ...@@ -105,27 +80,31 @@ const ATT_TYPE = {
ACTIVITY: 7 ACTIVITY: 7
} }
import emoji from '@/utils/emo' import emoji from '@/utils/emo'
export default { export default {
name: 'Preview', name: 'Preview',
props: { previewView: Array }, props: {previewView: Array},
data() { data() {
return { return {
videoShow: false, videoShow: false,
previewList: [], previewList: [],
previewListFilter: [], previewListFilter: [],
videoUrl: '' videoUrl: '',
hasSixType: false,
hasSevenType: false
} }
}, },
watch: { watch: {
previewView: { previewView: {
handler(val) { handler(val) {
const previewVal = this.$common.utils.deepClone(val).filter(item => item) const previewVal = this.$common.utils.deepClone(val).filter(item => item)
console.log(previewVal) this.hasSixType = previewVal.some(item => item.attType == 6)
this.hasSevenType = previewVal.some(item => item.attType == 7)
this.previewListFilter = [] this.previewListFilter = []
for (let i in previewVal) { for (let i in previewVal) {
if (previewVal[i].attType == 1) { if (previewVal[i].attType == 1) {
const attContent = previewVal[i].attContent const attContent = previewVal[i].attContent
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function(res) { const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function (res) {
let word = res.replace(/\[|\]/gi, '') let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity) const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1 let index = parseInt(list.indexOf(word)) + 1
...@@ -171,12 +150,14 @@ export default { ...@@ -171,12 +150,14 @@ export default {
.img-list { .img-list {
margin-right: 3px; margin-right: 3px;
} }
.img-bg { .img-bg {
position: relative; position: relative;
width: 290px; width: 290px;
height: 566px; height: 566px;
background-image: url(../../../../../assets/guestCustom/friend-bg.png); background-image: url(../../../../../assets/guestCustom/friend-bg.png);
background-size: 100%; background-size: 100%;
.preview-content { .preview-content {
position: absolute; position: absolute;
width: 250px; width: 250px;
...@@ -191,9 +172,11 @@ export default { ...@@ -191,9 +172,11 @@ export default {
text-align: center; text-align: center;
margin-bottom: 15px; margin-bottom: 15px;
} }
.preview-info { .preview-info {
padding: 0 0px 20px 9px; padding: 0 0px 20px 9px;
position: relative; position: relative;
.avatar { .avatar {
position: absolute; position: absolute;
top: 0px; top: 0px;
...@@ -202,10 +185,12 @@ export default { ...@@ -202,10 +185,12 @@ export default {
height: 26px; height: 26px;
margin-right: 8px; margin-right: 8px;
} }
.preview-box { .preview-box {
margin-left: 30px; margin-left: 30px;
width: 180px; width: 180px;
} }
.preview-operation { .preview-operation {
float: right; float: right;
margin-right: 30px; margin-right: 30px;
...@@ -219,6 +204,7 @@ export default { ...@@ -219,6 +204,7 @@ export default {
font-weight: 400; font-weight: 400;
color: #556993; color: #556993;
} }
.video-panel { .video-panel {
width: 100%; width: 100%;
height: 102px; height: 102px;
...@@ -226,9 +212,11 @@ export default { ...@@ -226,9 +212,11 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: relative; position: relative;
video { video {
position: absolute; position: absolute;
} }
i { i {
z-index: 10; z-index: 10;
font-size: 20px; font-size: 20px;
...@@ -236,6 +224,7 @@ export default { ...@@ -236,6 +224,7 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
.preview-text { .preview-text {
font-size: 14px; font-size: 14px;
position: relative; position: relative;
...@@ -245,29 +234,34 @@ export default { ...@@ -245,29 +234,34 @@ export default {
word-wrap: break-word; word-wrap: break-word;
word-break: break-all; word-break: break-all;
line-height: 20px; line-height: 20px;
/deep/ img { /deep/ img {
width: 20px; width: 20px;
height: 20px; height: 20px;
vertical-align: middle; vertical-align: middle;
} }
} }
.text { .text {
width: 100%; width: 100%;
font-size: 12px; font-size: 12px;
padding: 0px; padding: 0px;
margin-bottom: 6px; margin-bottom: 6px;
} }
.preview-link { .preview-link {
padding: 6px 0px; padding: 6px 0px;
font-size: 12px; font-size: 12px;
background: #f7f7f7; background: #f7f7f7;
display: flex; display: flex;
align-items: center; align-items: center;
img { img {
margin: 0px 12px 0px 5px; margin: 0px 12px 0px 5px;
width: 24px; width: 24px;
height: 24px; height: 24px;
} }
div { div {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -277,6 +271,7 @@ export default { ...@@ -277,6 +271,7 @@ export default {
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
} }
.preview-text::before { .preview-text::before {
content: ''; content: '';
position: absolute; position: absolute;
...@@ -287,12 +282,14 @@ export default { ...@@ -287,12 +282,14 @@ export default {
border-color: transparent #fff transparent transparent; border-color: transparent #fff transparent transparent;
// background-color: cornflowerblue; // background-color: cornflowerblue;
} }
.preview-applet { .preview-applet {
img { img {
width: 20px; width: 20px;
height: 20px; height: 20px;
margin-right: 4px; margin-right: 4px;
} }
&-title { &-title {
display: flex; display: flex;
align-self: center; align-self: center;
...@@ -300,6 +297,7 @@ export default { ...@@ -300,6 +297,7 @@ export default {
margin-bottom: 5px; margin-bottom: 5px;
} }
} }
.preview-activity { .preview-activity {
width: 160px; width: 160px;
// height: 184px; // height: 184px;
...@@ -307,6 +305,7 @@ export default { ...@@ -307,6 +305,7 @@ export default {
border-radius: 4px; border-radius: 4px;
border: 1px solid #dce1e5; border: 1px solid #dce1e5;
padding: 7px 7px 0; padding: 7px 7px 0;
.activity-name { .activity-name {
font-size: 12px; font-size: 12px;
color: #333; color: #333;
...@@ -316,10 +315,12 @@ export default { ...@@ -316,10 +315,12 @@ export default {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
} }
.applet-logo { .applet-logo {
width: 95px; width: 95px;
height: 24px; height: 24px;
} }
.activity-footer { .activity-footer {
margin-top: 4px; margin-top: 4px;
border-top: 1px solid #edeff3; border-top: 1px solid #edeff3;
...@@ -328,6 +329,7 @@ export default { ...@@ -328,6 +329,7 @@ export default {
} }
} }
} }
.video-dialog { .video-dialog {
z-index: 2001; z-index: 2001;
position: fixed; position: fixed;
...@@ -337,6 +339,7 @@ export default { ...@@ -337,6 +339,7 @@ export default {
left: 0; left: 0;
overflow: auto; overflow: auto;
background: rgba($color: #000000, $alpha: 0.5); background: rgba($color: #000000, $alpha: 0.5);
&-panel { &-panel {
background: #000000; background: #000000;
position: absolute; position: absolute;
...@@ -348,10 +351,12 @@ export default { ...@@ -348,10 +351,12 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding: 10px 20px 20px; padding: 10px 20px 20px;
overflow: hidden; overflow: hidden;
.video-close { .video-close {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
height: 40px; height: 40px;
i { i {
cursor: pointer; cursor: pointer;
font-size: 25px; font-size: 25px;
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<div class="marketingContent"> <div class="marketingContent">
<div class="group-content"> <div class="group-content">
<el-form :model="editForm" :rules="editRule" ref="groupForm" label-width="154px"> <el-form :model="editForm" :rules="editRule" ref="groupForm" label-width="154px">
<el-form-item class="attachment-panel"> <el-form-item class="attachment-panel">
<label slot="label" class="required"><span style="color:red;margin-right: 3px">*</span>营销内容:</label> <label slot="label" class="required"><span style="color:red;margin-right: 3px">*</span>营销内容:</label>
<GLEditor ref="welcome" :form="'object'" style="line-height: 12px;width:650px" :btnList="btnList" <GLEditor ref="welcome" :form="'object'" style="line-height: 12px;width:650px" :btnList="btnList"
@previewWord="previewForm"></GLEditor> @previewWord="previewForm"></GLEditor>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</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"></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>
...@@ -594,7 +594,6 @@ export default { ...@@ -594,7 +594,6 @@ export default {
setTimeout(() => { setTimeout(() => {
this.previewList = JSON.parse(JSON.stringify(this.previewList)) this.previewList = JSON.parse(JSON.stringify(this.previewList))
}) })
}, },
}, },
...@@ -608,6 +607,7 @@ export default { ...@@ -608,6 +607,7 @@ export default {
}, },
mounted() { mounted() {
Object.assign(this.editForm, this.eventObj.info) Object.assign(this.editForm, this.eventObj.info)
this.getStaffTypeList() this.getStaffTypeList()
this.$nextTick(() => { this.$nextTick(() => {
...@@ -722,13 +722,13 @@ export default { ...@@ -722,13 +722,13 @@ export default {
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
if (backupContent) { if (backupContent) {
const previewList = backupContent.map(item => { const previewList = backupContent.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent) if (item.attType == 7) item.attContent = typeof (item.attContent) == 'string' ? JSON.parse(item.attContent) : item.attContent
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(this.editForm.backupContent).map(item => { const previewList = JSON.parse(backupContent).map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent) if (item.attType == 7) item.attContent = typeof (item.attContent) == 'string' ? JSON.parse(item.attContent) : item.attContent
return item return item
}) })
this.$refs.welcome.updateList(previewList) this.$refs.welcome.updateList(previewList)
...@@ -744,7 +744,7 @@ export default { ...@@ -744,7 +744,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
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 {
this.hasEventContentDisplaySpecial = false this.hasEventContentDisplaySpecial = false
......
...@@ -92,16 +92,16 @@ export default { ...@@ -92,16 +92,16 @@ export default {
// click: row => this.handleEdit('look', row) // click: row => this.handleEdit('look', row)
// } // }
// }, // },
// { {
// type: 'el-button', type: 'el-button',
// name: '复制', name: '复制',
// attrs: { attrs: {
// type: 'text' type: 'text'
// }, },
// listeners: { listeners: {
// click: row => this.handleEdit('copy', row) click: row => this.handleEdit('copy', row)
// } }
// }, },
{ {
type: 'el-button', type: 'el-button',
name: '编辑', name: '编辑',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!