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 => {
})
}
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 => {
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 => {
params.method = 'marketing.api.moment.detail.statistic'
......@@ -152,5 +175,7 @@ export default {
getListApi,
momentCancel,
createStatus,
publicStatus
publicStatus,
momentCommentView,
commentExport
}
......@@ -278,4 +278,15 @@ const liveroomOverview = 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 }
/**众筹活动直播视频列表 */
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 {
.marketing .mt-10 {
margin-top: 10px;
}
.marketing .pd-20 {
padding: 0 20px;
}
.marketing .hand {
cursor: pointer;
}
.el-tooltip__popper.is-light {
background: #ffffff;
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.08);
......@@ -720,3 +726,14 @@ html {
vertical-align: middle;
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 {
this.isUpdate = true
this.tagging = val || []
let arr = []
this.tagging.forEach(item => {
this.tagging && this.tagging.forEach(item => {
item.labelList = item.labelList || []
item.labelList.forEach(tag => {
arr.push({
......@@ -578,7 +578,7 @@ export default {
this.tagging.splice(idx, 1)
}
let arr = []
this.tagging.forEach(item => {
this.tagging && this.tagging.forEach(item => {
item.labelList = item.labelList || []
item.labelList.forEach(tag => {
arr.push({
......
<template>
<div class="container">
<div class="title">朋友圈详情</div>
<div class="marketing container">
<div class="title">朋友圈营销</div>
<div class="detail-content">
<div class="content-info">
<div class="content-info-title">朋友圈详情</div>
<div class="content-text">
<div class="detail-item">
<div class="detail-label">朋友圈类型:</div>
......@@ -32,38 +33,81 @@
</div>
</div>
</div>
<div class="title">
<div class="content-info-title">
数据统计
<span class="info-refresh" @click="handleRefresh">
<i :class="{ 'el-icon-refresh': true, 'wait-status': refreshStatus }"></i>
更新数据
</span>
<span class="info-time">更新于:{{ this.updatedTime }}</span>
<div class="flex-align">
<span class="info-time">最近更新:{{ this.updatedTime }}</span>
<span class="info-refresh" @click="handleRefresh">
刷新数据
<div class="icon-wrap">
<i :class="{ 'el-icon-refresh': true, 'wait-status': refreshStatus }"></i>
</div>
</span>
</div>
</div>
<div class="statistics-info">
<div class="statistics-ul">
<div class="statistics-li statistics-border">
<div class="statistics-img">
<img src="@/assets/friendGroup/icon-send.png" />
</div>
<div class="statistics-number">
<span>{{ basicInfo.sendStaffCount }}</span>
人
</div>
<div class="statistics-text">已发送成员</div>
<div class="statistics-text">已发送成员/人</div>
</div>
<div class="statistics-li">
<div class="statistics-img">
<img src="@/assets/friendGroup/icon-unsend.png" />
</div>
<div class="statistics-number">
<span>{{ basicInfo.unSendStaffCount }}</span>
{{ form == 'customer' ? '人' : '个' }}
</div>
<div class="statistics-text">未发送成员</div>
<div class="statistics-text">未发送成员/{{ form == 'customer' ? '人' : '个' }}</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-img">
<img src="@/assets/friendGroup/icon-copy.png" />
</div>
<div class="statistics-number">
<span>{{ basicInfo.copyCustomerCount }}</span>
人
</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>
......@@ -112,7 +156,7 @@ export default {
},
watch: {
basicInfo(val) {
if (val.userList.length > 4) {
if (val.userList?.length > 4) {
this.limitUserList = val.userList.slice(0, 4)
} else {
this.limitUserList = val.userList
......@@ -133,7 +177,12 @@ export default {
// }
},
methods: {
handleRefresh: utils.debounce(function() {
getStatistics(value) {
this.$emit('getStatistics', {
activeName: value
})
},
handleRefresh: utils.debounce(function () {
this.publicStatus()
this.refreshStatus = true
setTimeout(() => {
......@@ -152,7 +201,7 @@ export default {
this.$apis.friendGroup.momentDetail({ id }).then(res => {
this.updatedTime = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
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')
const previewList = res.attachmentList.map(item => {
if (item.attType == 7 && item.attContent) item.attContent = JSON.parse(item.attContent)
......@@ -212,41 +261,74 @@ export default {
background-color: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
.title {
padding: 20px 0 17px 20px;
height: 56px;
line-height: 56px;
font-size: 16px;
font-weight: 600;
color: #333;
border-bottom: 1px solid #d8d8d8;
.info-refresh {
font-size: 14px;
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;
}
padding-left: 20px;
box-sizing: border-box;
}
.detail-content {
display: flex;
align-items: flex-end;
// align-items: flex-end;
justify-content: space-between;
box-sizing: border-box;
width: 100%;
height: 100%;
padding: 20px 24px 40px 0;
padding: 20px;
.content-info {
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 {
padding-left: 52px;
height: 400px;
width: 100%;
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 {
display: flex;
......@@ -255,10 +337,11 @@ export default {
color: #333;
line-height: 20px;
margin-bottom: 24px;
width: 50%;
.detail-label {
width: 85px;
width: 150px;
text-align: right;
margin-right: 12px;
// margin-right: 12px;
}
.detail-tips {
margin-left: 8px;
......@@ -304,7 +387,6 @@ export default {
background: #f7f7f7;
border: 1px solid #d8d8d8;
min-width: 325px;
.name {
display: inline-block;
width: 68px;
......@@ -314,22 +396,22 @@ export default {
}
}
.statistics-info {
margin-top: 24px;
margin-left: 52px;
margin-top: 16px;
display: flex;
overflow-x: scroll;
.statistics-ul {
display: flex;
border-radius: 2px;
background-color: #f6f6ff;
height: 204px;
background: #f8f8fc;
border: 1px solid rgba(88, 80, 255, 0.8);
margin-right: 20px;
height: 142px;
margin-right: 16px;
&:last-child {
margin-right: 0;
}
}
.statistics-li {
height: 100%;
position: relative;
color: #424242;
font-size: 14px;
......@@ -337,7 +419,6 @@ export default {
width: 142px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
&.statistics-border {
margin-right: 0;
......@@ -347,12 +428,22 @@ export default {
display: inline-block;
position: absolute;
right: 0;
height: 58px;
border-right: 1px solid #5850ff;
height: 156px;
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 {
margin-bottom: 12px;
margin-bottom: 8px;
font-size: 16px;
color: #333;
span {
......@@ -361,6 +452,13 @@ export default {
}
.statistics-text {
width: 70px;
white-space: nowrap;
}
.statistics-ratio {
font-weight: 400;
font-size: 12px;
color: #666666;
margin-top: 8px;
}
}
}
......
......@@ -78,7 +78,7 @@ export default {
for (let i in previewVal) {
if (previewVal[i].attType == 1) {
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, '')
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1
......@@ -126,13 +126,15 @@ export default {
}
.img-bg {
position: relative;
width: 290px;
height: 566px;
width: 240px;
height: 445px;
padding: 20px 0;
background-image: url(../../../assets/guestCustom/friend-bg.png);
background-size: 100%;
background-repeat: no-repeat;
.preview-content {
position: absolute;
width: 250px;
width: 224px;
height: 350px;
overflow-y: auto;
top: 90px;
......@@ -157,7 +159,7 @@ export default {
}
.preview-box {
margin-left: 30px;
width: 180px;
width: 165px;
}
.preview-operation {
float: right;
......
......@@ -108,7 +108,6 @@ export default {
},
methods: {
selectionTable(val) {
console.log(val)
this.innerTags = val
// this.$emit('selectTable', val)
},
......
<template>
<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-modular">
<div class="title">成员详情</div>
......@@ -12,7 +12,7 @@
</el-menu>
<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">
<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>
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
......@@ -31,7 +31,7 @@
>
<el-button type="primary" @click="handleCancel">取消</el-button>
</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-item" v-for="(item, index) in userList" :key="index">
<div class="user-image">
......@@ -43,18 +43,58 @@
</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>
</template>
<script>
import Vue from 'vue'
import BasicInof from './components/basicInfo.vue'
import { exportFn } from '@/common/constant'
export default {
components: {
BasicInof
},
data() {
return {
activeName: '1',
infoTitle: '已送达客户',
userList: [],
dialogVisible: false,
activeIndex: '',
......@@ -102,6 +142,46 @@ export default {
// 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: '操作',
prop: 'optionBtns',
......@@ -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,
getDrawerListApi: this.$apis.friendGroup.momentCommentView,
footerLeft: 0,
footerWidth: 0
}
},
mounted() {
// this.getCustomerDetail(() => {
// // this.getStaffList()
// // this.getCustomerList()
// })
let clientHeight = document.documentElement.clientHeight
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.boxHeight = clientHeight - 200
},
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) {
this.searchForm.status = val
this.$refs.table.refreshTable()
......@@ -158,12 +375,37 @@ export default {
})
}
},
handleCustomer(id) {
this.$apis.friendGroup.momentStaffCustomers({ id }).then(res => {
if (res) {
this.dialogVisible = true
this.userList = res
}
initParams() {
this.drawerTableParams.tableColumns = this.tableColumns.filter(item => {
return !item.filter || item.filter.indexOf(this.activeName) != -1
})
},
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) {
......@@ -191,6 +433,9 @@ export default {
remindUserGroup() {
const id = this.$route.params.id
this.$apis.friendGroup.remindUserGroup({ id, type: 1 }).then(res => {})
},
handleClose() {
this.dialogVisible = false
}
}
}
......@@ -423,4 +668,27 @@ export default {
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>
......@@ -2,16 +2,19 @@
<template>
<div class="marketing pro-group">
<div class="m-b-20 friend-title">
<div>
<div class="friend-title-left">
<GLButton :size="size" type="primary" fn="编辑朋友圈" @click="handleEdit(1)">发布朋友圈</GLButton>
<span>管理员可直接在后台为员工创建朋友圈,员工收到朋友圈新消息提醒后,可快捷将管理员创建的朋友圈发送到自己朋友圈中。</span>
<span class="friend-tip-text">管理员可直接在后台为员工创建朋友圈,员工收到朋友圈新消息提醒后,可快捷将管理员创建的朋友圈发送到自己朋友圈中。</span>
</div>
<div class="title">
<span class="info-time">{{this.sendType}}:{{ this.updatedTime }}</span>
<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 class="info-time">更新于{{ this.updatedTime }}</span>
</div>
</div>
<div class="container">
......@@ -97,6 +100,7 @@ export default {
offReason: [{ required: true, message: '请输入下架备注', trigger: 'change' }]
},
updatedTime: '',
sendType:'',
// 分享
isShareVisible: false,
shareForm: {},
......@@ -241,20 +245,20 @@ export default {
label: '发布方式',
name: 'sendType',
addHtml: 'sendType',
width: '120'
width: '110'
},
{
label: '类型',
name: 'type',
formatter: cellValue => {
console.log(this.baseData.typeStatusList.find(item => item.confId == cellValue.type))
return this.baseData.typeStatusList.find(item => item.confId == cellValue.type).confName
}
},
width: '110'
},
{
label: '创建人',
prop: 'createdName',
width: '180'
width: '190'
},
{
label: '创建时间',
......@@ -275,6 +279,18 @@ export default {
label: '已送达客户',
prop: 'copyCustomerCount',
width: '110'
},
{
label: '互动客户',
prop: 'interactCount'
},
{
label: '点赞客户',
prop: 'likeCount'
},
{
label: '评论客户',
prop: 'commentCount'
}
]
},
......@@ -313,7 +329,7 @@ export default {
},
methods: {
handleRefresh: utils.debounce(function() {
handleRefresh: utils.debounce(function () {
this.createStatus()
this.refreshStatus = true
setTimeout(() => {
......@@ -323,7 +339,10 @@ export default {
async createStatus() {
this.updatedTime = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
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()
},
getListData() {
......@@ -350,9 +369,7 @@ export default {
})
previewListFilter = previewListFilter.reduce((prev, cur) => {
let index = prev.findIndex(item => item.attType == 2)
console.log(prev, cur, index)
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(cur)
......@@ -517,15 +534,37 @@ export default {
<style scoped lang="scss">
.friend-title {
display: flex;
justify-content: space-between;
align-items: center;
color: #666666;
.friend-title-left {
display: flex;
align-items: center;
}
.title {
display: flex;
align-items: center;
margin-left: 74px;
white-space: nowrap;
.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;
color: #5850ff;
cursor: pointer;
margin-left: 20px;
margin-left: 8px;
.wait-status {
transition: all ease-in 1s;
transform: rotate(360deg);
......@@ -541,6 +580,8 @@ export default {
font-size: 14px;
margin-left: 10px;
font-weight: 100;
// display: inline-block;
// width: 80%;
}
}
.attachmentList-box {
......
......@@ -807,7 +807,6 @@ export default {
}
}
}
.pageTitle {
position: relative;
padding: 15px 20px;
......@@ -833,7 +832,6 @@ export default {
box-sizing: border-box;
cursor: pointer;
}
.el-form-item {
margin-bottom: 15px;
}
......@@ -910,7 +908,6 @@ export default {
overflow: hidden;
}
}
.pricesMerge {
display: flex;
width: 1500px;
......
......@@ -513,7 +513,6 @@ export default {
padding-top: 5px;
padding-left: 10px;
box-sizing: border-box;
.choseItem {
position: relative;
min-width: 90px;
......@@ -611,7 +610,6 @@ export default {
font-weight: 400;
color: #666666;
margin-top: 10px;
>span:first-child {
display: inline-block;
min-width: 165px;
......@@ -719,7 +717,6 @@ export default {
margin-left: -110px;
}
}
.give-tip {
font-weight: 400;
font-size: 12px;
......@@ -728,7 +725,7 @@ export default {
margin: -15px 0 20px 154px;
}
}
/deep/ .el-form-item__error {
margin-left: 154px;
}</style>
}
</style>
......@@ -85,6 +85,18 @@
</template>
</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"
slot="auth-button"
slot-scope="scope"
......@@ -315,7 +327,7 @@ export default {
methods: {
async getCrowdfundingOrderConfig () {
let tableColumns = [
let tableColumns = [
// {
// label: '序号',
// // prop: 'activityImg',
......@@ -406,25 +418,22 @@ export default {
prop: 'verificationNumber'
},
{
label: '定金(元)',
name: 'activityPrice',
width: 140,
formatter: cellValue => {
return (cellValue.activityPrice / 100).toFixed(2)
}
label: '定金/元',
prop: 'activityPrice',
addHtml: 'joinText',
width: 100
},
{
label: '众筹价(元)',
name: 'crowdFundingPrice',
width: 140,
formatter: cellValue => {
return (cellValue.crowdFundingPrice / 100).toFixed(2)
}
label: '众筹价/元',
prop: 'crowdFundingPrice',
addHtml: 'joinText',
width: 100
},
{
label: '库存',
prop: 'goodsStock',
width: 110
prop: 'activityGoodsStock',
addHtml: 'joinText',
width: 100
},
{
label: '创建日期',
......@@ -646,6 +655,14 @@ export default {
setTableFinishFun () {
//接收到的数据为空
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 @@
:formData="editFormData"
: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
slot="activityImg"
class="edit-tips m-t-8"
......@@ -73,6 +88,7 @@
slot-scope="scope"
>
<el-date-picker
:disabled="isDisabled"
v-model="editForm.activityTime"
type="datetimerange"
range-separator="至"
......@@ -80,116 +96,103 @@
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']"
:disabled="isDisabled"
@change="e => handleTimeChange(e, scope.scope)"
></el-date-picker>
</template>
<div slot="goodsHtml">
<div
slot="goodsHtml"
style="width:700px"
id="goodsList"
>
<el-button
type="default"
class="el-icon-plus"
v-if="!isDisabled"
@click="handleRelateProClose"
>选择商品</el-button>
<div
v-if="selectedProInfo.id && !specificationDetailList.length"
style="margin-top: 10px"
>
<p>
<img
class="img-60"
:src="selectedProInfo.goodsImage"
/>
&nbsp;&nbsp;&nbsp; 零售价 {{ (selectedProInfo.retailPrice / 100).toFixed(2) }}元 &nbsp;&nbsp;&nbsp; 商品库存 {{ selectedProInfo.goodsStock }}件
</p>
<el-form-item
label="设置秒杀价:"
prop="activityPrice"
id="activityPrice"
>
<el-input
v-model="editForm.activityPrice"
style="width: 150px"
:disabled="isDisabled"
><span slot="append">元</span></el-input>
</el-form-item>
<el-form-item
label="活动库存:"
prop="goodsStock"
id="goodsStock"
>
<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"
<div class="goods-box">
<template v-for="(i,index) in editForm.goodsList">
<div
:key="index"
class="item"
>
<div class="flex-align">
<img
class="img-60"
:src="selectedProInfo[index].goodsImage"
/>
<div class="goods-info">
<p>商品名称:{{selectedProInfo[index].goodsName}}</p>
<p>零售价 {{ selectedProInfo[index].retailPrice }}元</p>
<p>商品库存 {{ selectedProInfo[index].goodsStock }}件</p>
</div>
</div>
<glsx-combi-form
class="goods-form-box flex-align"
ref="goodsListEditFormRef"
:formRef="editChildRef"
:isEdit="true"
:isBlock="true"
:formObj="i"
:formData="goodsListEditFormData"
:formRules="goodsListEditRule"
>
<td
:style="{ width: specsWidth }"
v-for="(n, idx) in item.specsValueList"
:key="idx"
>{{ n }}</td>
<td :style="{ width: specsWidth }">{{ item.retailPrice }}元</td>
<td :style="{ width: specsWidth }">{{ item.stock }}件</td>
<td :style="{ width: specsWidth }">
<div
class="goods-form-item"
slot="crowdFundingPrice"
>
<el-input
v-model="i.crowdFundingPrice"
:data-index="index"
style="width: 136px"
type="number"
:disabled="isDisabled"
placeholder="秒杀价"
style="width: 90%"
v-model="item.activityPrice"
@input="item.activityPrice = activityPrice_input($event, item.retailPrice)"
@input="formatAppend(i.crowdFundingPrice,'crowdFundingPrice',index)"
></el-input>
</td>
<td :style="{ width: specsWidth }">
元
</div>
<div
class="goods-form-item"
slot="activityPrice"
>
<el-input
v-model="i.activityPrice"
:data-index="index"
style="width: 136px"
type="number"
:disabled="isDisabled"
placeholder="活动库存"
style="width: 90%"
v-model="item.goodsStock"
@input="item.goodsStock = goodsStock_input($event, item.stock)"
@input="formatAppend(i.activityPrice,'activityPrice',index)"
></el-input>
</td>
</tr>
</tbody>
</table>
元
</div>
<div
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>
<template
......@@ -199,13 +202,14 @@
<el-radio-group
v-model="editForm[scope.scope.name]"
@change="handleIsLimit"
:disabled="limitPurchaseDisabled"
>
<el-radio
v-for="(item, index) in scope.scope.optionList"
:key="index"
:label="item[scope.scope.optionId]"
:disabled="isDisabled"
>{{ item[scope.scope.optionLabel] }}</el-radio>
>{{ item[scope.scope.optionLabel] }}
</el-radio>
</el-radio-group>
<p
v-if="editForm[scope.scope.name] == 2"
......@@ -217,7 +221,6 @@
<el-input
v-model="editForm.limitPurchaseNumber"
placeholder="请输入限购次数"
:disabled="isDisabled"
></el-input>
</el-form-item>
件
......@@ -245,13 +248,16 @@
slot="customerServiceFlag"
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
v-for="(item, index) in scope.scope.optionList"
:disabled="isDisabled"
:key="index"
:label="item[scope.scope.optionId]"
>{{ item[scope.scope.optionLabel] }}</el-radio>
>{{ item[scope.scope.optionLabel] }}
</el-radio>
</el-radio-group>
<div
class="customer-service"
......@@ -270,16 +276,12 @@
></glsx-combi-form>
</div>
</template>
<template
slot="activityMusic"
slot-scope="scope"
>
<template slot="activityMusic">
<div class="flex">
<div
class="music-box flex-center"
v-for="(item, index) in musicList"
:key="index"
@click="handleMusicChange(index)"
>
<div
class="music-icon"
......@@ -302,22 +304,7 @@
/>
</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
v-if="playObj.src"
style="display: none;"
......@@ -400,9 +387,11 @@
class="form-describe-box"
slot="formDescribe"
>
<el-checkbox-group v-model="editForm.formDescribeCheck">
<el-checkbox-group
v-model="editForm.formDescribeCheck"
:disabled="isDisabled"
>
<el-checkbox
:disabled="isDisabled"
v-for="(item, index) in formDescribeCheckList"
:label="item.value"
:key="index"
......@@ -429,7 +418,7 @@
</p>
</div>
<el-button
v-if="!isDisabled"
:disabled="isDisabled"
class="btn-basic"
v-show="formDescribeList.length < describeNum"
:size="size"
......@@ -445,8 +434,8 @@
</div>
<div slot="showAvatarNicknameFlag">
<el-radio-group
:disabled="isDisabled"
v-model="editForm.showAvatarNicknameFlag"
:disabled="isDisabled"
>
<el-radio :label="1">隐藏</el-radio>
<el-radio :label="2">显示</el-radio>
......@@ -468,15 +457,13 @@
服务说明:
</span>
<div class="form-show-box">
<div
v-if="!isDisabled"
:class="['btn-box', arrowFlagObj.activityServices == 'open' && editForm.activityServices.length ? 'line' : '']"
>
<div :class="['btn-box', arrowFlagObj.activityServices == 'open' && editForm.activityServices.length ? 'line' : '']">
<el-button
:class="[editForm.activityServices.length < 9 ? 'btn-basic' : 'btn-disable']"
:size="size"
type="text"
@click="handleAddItem('services', 'activityServices', 9)"
:disabled="isDisabled"
>
<img
class="icon-add"
......@@ -486,37 +473,33 @@
</el-button>
</div>
<div :class="['form-show-block', arrowFlagObj.activityServices == 'close' ? 'form-close' : 'form-open']">
<div v-if="editForm.activityServices.length">
<div
v-for="(item, index) in editForm.activityServices"
:key="index"
:class="['form-show-item', editForm.activityServices.length > index + 1 ? 'line' : '']"
<div
v-for="(item, index) in editForm.activityServices"
:key="index"
: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
class="p-t-20"
ref="serviceEditFormRef"
:formRef="editChildRef"
:isEdit="true"
: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>
<img
class="icon-add"
src="@/assets/icon-delete.png"
/>
</el-button>
</div>
<div v-else>无数据</div>
</div>
</div>
</div>
......@@ -536,11 +519,9 @@
商品答疑:
</span>
<div class="form-show-box">
<div
v-if="!isDisabled"
:class="['btn-box', arrowFlagObj.activityCommoditys == 'open' && editForm.activityCommoditys.length ? 'line' : '']"
>
<div :class="['btn-box', arrowFlagObj.activityCommoditys == 'open' && editForm.activityCommoditys.length ? 'line' : '']">
<el-button
:disabled="isDisabled"
:class="[editForm.activityCommoditys.length < 9 ? 'btn-basic' : 'btn-disable']"
:size="size"
type="text"
......@@ -554,37 +535,34 @@
</el-button>
</div>
<div :class="['form-show-block', arrowFlagObj.activityCommoditys == 'close' ? 'form-close' : 'form-open']">
<div v-if="editForm.activityCommoditys.length">
<div
v-for="(item, index) in editForm.activityCommoditys"
:key="index"
:class="['form-show-item', editForm.activityCommoditys.length > index + 1 ? 'line' : '']"
<div
v-for="(item, index) in editForm.activityCommoditys"
:key="index"
: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
class="p-t-20"
ref="commoditysEditFormRef"
:formRef="editChildRef"
:isEdit="true"
: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>
<img
class="icon-add"
src="@/assets/icon-delete.png"
/>
</el-button>
</div>
<div v-else>无数据</div>
</div>
</div>
</div>
......@@ -604,14 +582,12 @@
服务评价:
</span>
<div class="form-show-box">
<div
v-if="!isDisabled"
:class="['btn-box', arrowFlagObj.activityExperienceDTOs == 'open' && editForm.activityExperienceDTOs.length ? 'line' : '']"
>
<div :class="['btn-box', arrowFlagObj.activityExperienceDTOs == 'open' && editForm.activityExperienceDTOs.length ? 'line' : '']">
<el-button
:class="[editForm.activityExperienceDTOs.length < 9 ? 'btn-basic' : 'btn-disable']"
:size="size"
type="text"
:disabled="isDisabled"
@click="handleAddItem('experiences', 'activityExperienceDTOs', 9)"
>
<img
......@@ -622,48 +598,44 @@
</el-button>
</div>
<div :class="['form-show-block', arrowFlagObj.activityExperienceDTOs == 'close' ? 'form-close' : 'form-open']">
<div v-if="editForm.activityExperienceDTOs.length">
<div
v-for="(item, index) in editForm.activityExperienceDTOs"
:key="index"
:class="['form-show-item', editForm.activityExperienceDTOs.length > index + 1 ? 'line' : '']"
>
<div class="head-box">
<img
class="icon-head"
src="@/assets/seckillActivity/icon-default-head.png"
/>
<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
v-for="(item, index) in editForm.activityExperienceDTOs"
:key="index"
:class="['form-show-item', editForm.activityExperienceDTOs.length > index + 1 ? 'line' : '']"
>
<div class="head-box">
<img
class="icon-head"
src="@/assets/seckillActivity/icon-default-head.png"
/>
<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
: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>
......@@ -673,14 +645,15 @@
slot-scope="scope"
>
<el-radio-group
:disabled="isDisabled"
v-model="editForm[scope.scope.name]"
:disabled="isDisabled"
>
<el-radio
v-for="(item, index) in scope.scope.optionList"
:key="index"
:label="item[scope.scope.optionId]"
>{{ item[scope.scope.optionLabel] }}</el-radio>
>{{ item[scope.scope.optionLabel] }}
</el-radio>
</el-radio-group>
</div>
<template slot="appointmentContacts">
......@@ -691,11 +664,11 @@
labelWidth="60px"
>
<el-input
:disabled="isDisabled"
v-model="editForm.reservationInstallContactsName"
style="width: 432px;display: block;"
maxlength="10"
placeholder="请输入姓名"
:disabled="isDisabled"
></el-input>
</el-form-item>
<el-form-item
......@@ -705,22 +678,23 @@
class="phoneClass"
>
<el-input
:disabled="isDisabled"
v-model="editForm.reservationInstallContactsPhone"
style="width: 432px"
maxlength="11"
placeholder="请输入电话"
:disabled="isDisabled"
></el-input>
</el-form-item>
</div>
</template>
<!-- 战报内容配置 -->
<template slot="reportConfigure">
<div class="reportConfigure-bag">
<div class="reportConfigure-bag tab-pane">
<el-tabs v-model="reportFlag">
<el-tab-pane
label="进行中战报"
name="1"
:disabled="isDisabled"
>
<el-form-item
label="产值活动报告:"
......@@ -728,7 +702,6 @@
labelWidth="100px"
>
<el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.produceReportSummary"
placeholder="根据以往经验,活动前三天转发效果最好,赶紧督促大家转发起来吧"
type="textarea"
......@@ -736,12 +709,14 @@
show-word-limit
style="width:580px;height:79px;"
rows="3"
:disabled="isDisabled"
></el-input>
</el-form-item>
</el-tab-pane>
<el-tab-pane
label="已结束战报"
name="2"
:disabled="isDisabled"
>
<el-form-item
label="客户资产分析总结:"
......@@ -750,7 +725,6 @@
style="margin-left: 27px;margin-bottom: 0px;"
>
<el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.customerAssetSummary"
placeholder="请输入"
type="textarea"
......@@ -758,6 +732,7 @@
show-word-limit
style="width:580px;height:79px;"
rows="3"
:disabled="isDisabled"
></el-input>
</el-form-item>
<el-form-item
......@@ -767,7 +742,6 @@
style="margin-left: 27px;margin-top: 10px;"
>
<el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.touchPassageSummary"
placeholder="请输入"
type="textarea"
......@@ -775,6 +749,7 @@
show-word-limit
style="width:580px;height:79px;"
rows="3"
:disabled="isDisabled"
></el-input>
</el-form-item>
<div class="reportConfigureList">
......@@ -786,10 +761,10 @@
style="margin: 0px 8px 0px 0px;"
>
<el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.signMerchantShareCount"
style="width: 136px;height:32px;"
placeholder="请输入"
:disabled="isDisabled"
></el-input>
</el-form-item>
<el-form-item
......@@ -799,10 +774,10 @@
style="margin: 0px 8px 0px 0px;"
>
<el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.signMerchantBrowseCount"
style="width: 136px;height:32px;"
placeholder="请输入"
:disabled="isDisabled"
></el-input>
</el-form-item>
<el-form-item
......@@ -812,10 +787,10 @@
style="margin: 0px 8px 0px 0px;"
>
<el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.signMerchantVisitorCount"
style="width: 136px;height:32px;"
placeholder="请输入"
:disabled="isDisabled"
></el-input>
</el-form-item>
<el-form-item
......@@ -825,10 +800,10 @@
style="margin: 0px 8px 0px 0px;"
>
<el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.signMerchantOrderCount"
style="width: 136px;height:32px;"
placeholder="请输入"
:disabled="isDisabled"
></el-input>
</el-form-item>
<el-form-item
......@@ -838,10 +813,10 @@
style="margin: 0px 8px 0px 0px;"
>
<el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.signMerchantProduceCount"
style="width: 136px;height:32px;"
placeholder="请输入"
:disabled="isDisabled"
></el-input>
</el-form-item>
</div>
......@@ -854,10 +829,10 @@
style="margin: 0px 8px 0px 0px;"
>
<el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.noteTouchCustomerCount"
style="width: 136px;height:32px;"
placeholder="请输入"
:disabled="isDisabled"
></el-input>
</el-form-item>
<el-form-item
......@@ -867,10 +842,10 @@
style="margin: 0px 8px 0px 0px;"
>
<el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.noteTouchVisitorCount"
style="width: 136px;height:32px;"
placeholder="请输入"
:disabled="isDisabled"
></el-input>
</el-form-item>
<el-form-item
......@@ -880,10 +855,10 @@
style="margin: 0px 8px 0px 0px;"
>
<el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.noteTouchOrderCount"
style="width: 136px;height:32px;"
placeholder="请输入"
:disabled="isDisabled"
></el-input>
</el-form-item>
<el-form-item
......@@ -893,10 +868,10 @@
style="margin: 0px 8px 0px 0px;"
>
<el-input
:disabled="isDisabled"
v-model="editForm.activityActionReport.noteTouchConversionRate"
style="width: 136px;height:32px;"
readonly
:disabled="isDisabled"
></el-input>
</el-form-item>
</div>
......@@ -907,58 +882,92 @@
<!-- 直播配置 -->
<div slot="live">
<el-switch
:disabled="isDisabled"
v-model="editForm.liveFlag"
:disabled="isDisabled"
></el-switch>
<div
class="customer-service"
class="live-box tab-pane"
v-if="editForm.liveFlag"
id="liveFlag"
>
<glsx-combi-form
class="edit-form-container"
ref="liveEditFormRef"
:formRef="editChildRef"
:isEdit="true"
: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"
<el-tabs v-model="editForm.liveBroadcastMediaType">
<el-tab-pane
label="选择直播"
:name="1"
:disabled="isDisabled"
>
<img :src="defaultImgObj.COVER_LIVE" />
</div>
<div
v-if="!editForm.liveBroadcastRoomEndCover"
slot="defaultImgEndCover"
class="default-live-img"
<glsx-combi-form
class="edit-form-container"
ref="liveEditFormRef"
:formRef="editChildRef"
:isEdit="true"
: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" />
</div>
<div
slot="liveBroadcastRoomEndCover"
class="edit-tips m-t-8"
>注:用于活动中直播小窗口展示;请上传2M以内的gif、jpg、jpeg、png图片,建议图片尺寸164*252</div>
</glsx-combi-form>
<glsx-combi-form
class="edit-form-container"
ref="liveEditFormRef"
:formRef="editChildRef"
:isEdit="true"
:isBlock="true"
: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>
<!-- 收款模式 -->
......@@ -970,26 +979,21 @@
v-model="editForm.paymentModel"
:disabled="isDisabled"
>
<el-radio
:disabled="isDisabled"
:label="1"
>广联收定金和尾款</el-radio>
<el-radio
:disabled="isDisabled"
:label="2"
>广联收定金门店收尾款</el-radio>
<el-radio
:disabled="isDisabled"
:label="3"
>广联收定金门店收全款退定金</el-radio>
<el-radio
:disabled="isDisabled"
:label="4"
>门店收定金和尾款</el-radio>
<el-radio
:disabled="isDisabled"
:label="5"
>服务商收定金门店收尾款</el-radio>
<el-radio :label="1">广联收定金和尾款</el-radio>
<el-radio :label="2">广联收定金门店收尾款</el-radio>
<el-radio :label="3">广联收定金门店收全款退定金</el-radio>
<el-radio :label="4">门店收定金和尾款</el-radio>
<el-radio :label="5">服务商收定金门店收尾款</el-radio>
</el-radio-group>
</div>
<!-- 常态化模式 -->
<div slot="normalModel">
<el-radio-group
v-model="editForm.normalModel"
:disabled="isDisabled"
>
<el-radio :label="0">否</el-radio>
<el-radio :label="1">是</el-radio>
</el-radio-group>
</div>
</glsx-combi-form>
......@@ -998,18 +1002,11 @@
<el-button
@click="handleCancel"
size="medium"
>{{ routeInfo.addOrEdit != 'detail' ? '取消' : '返回' }}</el-button>
>返回</el-button>
<el-button
@click="handleWechat"
size="medium"
>预览</el-button>
<el-button
v-if="routeInfo.addOrEdit != 'detail'"
type="primary"
@click="handleConfirm"
size="medium"
:loading="loading"
>提交</el-button>
</GLFooter>
<!-- 展示 -->
<GLDialog
......@@ -1025,25 +1022,46 @@
:countDownObj="countDownObj"
></crowdEditWechat>
</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
v-if="isSingleSelectVisible"
:merchantId="editForm.merchantId"
:isSingleSelectVisible="isSingleSelectVisible"
:propSearch="{ deliveryType: 1 }"
:selectedProInfo="selectedProInfo"
@handleSingleSelectConfirm="handleSingleSelectConfirm"
@handleSingleSelectClose="handleSingleSelectClose(true)"
></select-single-pro-dialog>
multiple
>
</select-single-pro-dialog>
</div>
</div>
</template>
<script>
import { limitPrice } from '@/common/constant'
import { limitPrice, businessType } from '@/common/constant'
import { utils } from 'glsx-common'
import crowdEditWechat from './crowdEditWechat.vue'
export default {
name: 'editActivity',
components: {
crowdEditWechat
crowdEditWechat,
},
data () {
var validatorPhone = function (rule, value, callback) {
......@@ -1090,28 +1108,35 @@ export default {
m: '',
s: ''
},
isDisabled: false,
// 预览
wechatVisible: false,
// 商品选择
isSingleSelectVisible: false,
selectedProInfo: {},
isDisabled: true,
wechatVisible: false, // 预览
liveVideoVisible: false, //预览直播视频
isSingleSelectVisible: false, // 商品选择
relateStoreVisible: false, // 选择门店
limitPurchaseDisabled: true,//多商品禁用限购
selectedList: [],
selectedProInfo: [],
specificationDetailList: [],
nameToValSpecsList: [],
activityInfo: {},
editForm: {
merchantId: '',
merchantName: '',
activityName: '',
activityImg: '',
promotion: '',
activityTime: [],
activityPrice: '',
goodsStock: '',
goodsId: '',
goodsList: [],
limitPurchaseFlag: 1,
limitPurchaseNumber: '',
goodsCategory: '',
// 活动配置
customerServiceFlag: 1,
customerServiceFlag: 3,
customerServiceName: '',
customerServicePhone: '',
customerServiceQrImg: '',
......@@ -1133,10 +1158,11 @@ export default {
forwardTitle: '',
posterImg: '',
// 1-否,2-是
orderEndDays: 60,//订单完结时间天数
selectCarNumberFlag: 2,
selectVehicleTypeFlag: 2,
selectPhoneNumberFlag: 2,
businessType: 2, //业务场景
orderEndDays: 60, //订单完结时间天数
formDescribeCheck: ['selectCarNumberFlag', 'selectVehicleTypeFlag', 'selectPhoneNumberFlag'],
activityServices: [],
activityCommoditys: [],
......@@ -1146,11 +1172,15 @@ export default {
// formDescribeThird: '',
showAvatarNicknameFlag: 1,
liveFlag: false,
liveBroadcastMediaType: 1, //直播方式:1直播间,2短视频
liveBroadcastRoomId: '',
groupQrCode: '',
floatingMaskDiagram: '',
liveBroadcastRoomCover: '',
liveBroadcastRoomEndCover: '',
liveBroadcastMediaUrl: '', //直播(2短视频)播放媒体url
liveBroadcastMediaId: '',
liveBroadcastStateFlag: 1,//直播(2短视频)状态标签:1直播中,2直播回放
employeeRegistrationLinkFlag: 2,
reservationInstallContactsName: '',
reservationInstallContactsPhone: '',
......@@ -1158,6 +1188,7 @@ export default {
paymentAccountSource: '1',
paymentAccountId: '',
payMannerId: '',
paymentModel: 1,
// 战报内容配置
activityActionReport: {
produceReportSummary: '',
......@@ -1172,7 +1203,8 @@ export default {
noteTouchVisitorCount: '',
noteTouchOrderCount: '',
noteTouchConversionRate: ''
}
},
normalModel: 0//常态化模式
},
reportFlag: '1',
//商品列表
......@@ -1200,21 +1232,12 @@ export default {
// selectedAllProList: [],
// selectedProList: [],
editRule: {
merchantId: [{ required: true, message: '请选择商户', trigger: 'change' }],
activityName: [{ required: true, message: '请输入活动名称', trigger: 'change' }],
activityImg: [{ required: true, message: '请选择活动宣传图', trigger: 'change' }],
promotion: [{ required: true, message: '请输入活动宣传语', trigger: 'change' }],
activityTime: [{ required: true, message: '活动时间不能为空', trigger: 'change' }],
activityPrice: [
{ 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'] }],
goodsList: [{ required: true, message: '请选择商品', trigger: ['change', 'blur'] }],
goodsCategory: [{ required: true, message: '请选择关联产品类目项', trigger: ['change', 'blur'] }],
limitPurchaseFlag: [{ required: true, message: '请选择是否限购', trigger: 'change' }],
limitPurchaseNumber: [
......@@ -1247,7 +1270,8 @@ export default {
activityBigImg: [{ required: true, message: '请选择活动大图', trigger: 'change' }],
activityDetail: [{ 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: [
......@@ -1279,12 +1303,16 @@ export default {
// 基本信息
editFormData: [
{
label: '门店',
name: 'merchantId',
addHtml: 'merchantHtml'
},
{
label: '活动名称',
name: 'activityName',
type: 'input',
maxlength: 20,
tips: '如XX店车主关怀活动',
isDisabled: false
maxlength: 40,
tips: '如XX店车主关怀活动'
},
{
label: '活动宣传图',
......@@ -1293,7 +1321,6 @@ export default {
width: '320px',
limitSize: 10,
maxPhotoNum: 1,
isDisabled: false,
suffixSlot: 'activityImg',
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
......@@ -1314,9 +1341,8 @@ export default {
label: '活动宣传语',
name: 'promotion',
type: 'input',
maxlength: 20,
tips: '比如车主关怀,0元秒杀',
isDisabled: false
maxlength: 50,
tips: '比如车主关怀,0元秒杀'
},
{
label: '活动时间',
......@@ -1325,7 +1351,7 @@ export default {
},
{
label: '商品',
name: 'goodsId',
name: 'goodsList',
addHtml: 'goodsHtml'
},
{
......@@ -1371,6 +1397,7 @@ export default {
isClear: true,
isHide: true
},
{
label: '规格明细',
name: '',
......@@ -1378,6 +1405,16 @@ export default {
isHide: true
},
{
label: '业务场景',
name: 'businessType',
type: 'select',
optionList: utils.deepClone(businessType),
optionId: 'optionId',
optionLabel: 'optionLabel',
isClear: true
// isHide: true
},
{
label: '是否限购',
name: 'limitPurchaseFlag',
addHtml: 'limitPurchaseFlag',
......@@ -1386,13 +1423,11 @@ export default {
optionList: [
{
confId: 1,
confName: '否',
isDisabled: false
confName: '否'
},
{
confId: 2,
confName: '是',
isDisabled: false
confName: '是'
}
]
}
......@@ -1445,6 +1480,75 @@ export default {
title: [{ 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: [
{
......@@ -1512,7 +1616,7 @@ export default {
limitSize: 5,
maxPhotoNum: 9,
suffixSlot: 'activityExperienceImgs',
isDisabled: false,
isDisabled: true,
uploadStyle: {
imgWH: {
width: '56px',
......@@ -1579,6 +1683,10 @@ export default {
optionLabel: 'confName',
optionList: [
{
confId: 3,
confName: '不显示'
},
{
confId: 1,
confName: '同步在线客服'
},
......@@ -1816,7 +1924,7 @@ export default {
confName: '服务商'
}
],
isDisabled: false,
isDisabled: true,
handleRadioChange: (value, targetItem) => {
this.editForm.paymentAccountId = ''
this.configEditFormData.find(item => item.name == 'paymentAccountId').optionList = value == '1' ? this.baseData.payList : this.baseData.payMerchatList
......@@ -1834,11 +1942,18 @@ export default {
{
label: '收款模式',
name: 'paymentModel',
addHtml: 'paymentModel'
addHtml: 'paymentModel',
},
{
label: '常态化模式',
name: 'normalModel',
addHtml: 'normalModel',
tips: '活动结束后是否作为常态化活动自动上架'
}
],
//直播配置
liveEditFormData: [
//直播配置_1
liveEditFormData_1: [
{
label: '选择直播',
name: 'liveBroadcastRoomId',
......@@ -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' }],
// groupQrCode: [{ required: true, message: '请选择加群二维码', trigger: 'change' }],
floatingMaskDiagram: [
......@@ -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({
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'
......@@ -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 () {
this.getCrowdfundingOrderConfig()
this.getLiveList()
this.setMinHeight('.crowd-config')
this.routeInfo = this.$route.query
this.routeInfo.addOrEdit != 'add' ? this.getInfo() : this.getPayList()
this.getInfo()
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 (this.routeInfo.addOrEdit == 'edit' && this.routeInfo.activityStatus == 2) {
// this.$refs.configEditFormRef.$refs.activityDetailTextBox[0].forbidEdit()
this.isDisabled = this.routeInfo.addOrEdit != 'add'
disableObj.edit.forEach(attr => {
this.changeFormAttr(
attr,
'isDisabled',
this[attr].map(item => item.label),
true
)
const disabledList = ['editFormData', 'customerEditFormData',
'configEditFormData', 'serviceEditFormData', 'commoditysEditFormData',
'experiencesEditFormData', 'liveEditFormData_1', 'liveEditFormData_2']
disabledList.map(e => {
this[e].map(item => {
this.changeFormAttr(e, 'isDisabled', [item.label], true)
})
this.changeFormAttr('configEditFormData', 'isDisabled', ['账户类型', '定金收款账户'], true)
}
})
}
},
......@@ -2001,17 +2156,11 @@ export default {
},
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) {
newValue && newValue.length && this.countDown()
},
'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) {
this.editForm.fictitiousGroupQuantity = limitPrice(newValue, oldValue, 3, 0, 0, 501)
......@@ -2022,14 +2171,15 @@ export default {
'editForm.fictitiousViewQuantity' (newValue, oldValue) {
this.editForm.fictitiousViewQuantity = limitPrice(newValue, oldValue, 7, 0, 0)
},
'editForm.liveBroadcastRoomId' (newValue, oldValue) {
this.editForm.liveFlag = newValue ? true : false
},
'editForm.goodsId' (newValue, oldValue) {
if (newValue) {
let idx = this.editFormData.findIndex(val => val.name == 'goodsCategory')
this.editFormData[idx].isHide = false
}
'editForm.liveBroadcastMediaId' (newValue, oldValue) {
this.liveEditFormData_2.find(item => item.name == 'liveBroadcastMediaId').optionList.map(e => {
if (newValue) {
if (e.value == newValue) {
this.editForm.liveBroadcastRoomCover = e.coverUrl
this.editForm.liveBroadcastMediaUrl = e.mediaUrl
}
}
})
},
'editForm.targetStock' (newValue, oldValue) {
this.editForm.targetStock = limitPrice(newValue, oldValue, 99999, 0)
......@@ -2057,7 +2207,16 @@ export default {
},
'editForm.activityActionReport.signMerchantProduceCount' (newValue, oldValue) {
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: {
......@@ -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) {
!value && (this.editForm[targetItem.name] = [])
},
......@@ -2178,48 +2353,47 @@ export default {
this.editRule.limitPurchaseNumber[0].required = val != 1
},
handleRelateProChange (val) {
this.editRule.goodsId[0].required = val == 2
var idx = this.editFormData.findIndex(item => item.name == 'goodsId')
this.editFormData[idx].isHide = val != 2
},
handleRelateProClose (targetItem) {
this.selectedProInfo = this.editForm.goodsId ? { id: this.editForm.goodsId } : {}
handleRelateProClose () {
// 先选门店在选商品
if (!this.editForm.merchantId) return this.$message.error('请先选择门店!')
this.handleSingleSelectClose()
},
handleSingleSelectConfirm (selectedProInfo) {
this.editForm.activityPrice = ''
this.editForm.goodsStock = ''
formatAppend (val, target, index, isInt) {
let str = String(val)
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()
if (selectedProInfo) {
this.editForm.goodsId = selectedProInfo.id
this.getGoodInfo(selectedProInfo.id)
}
if (goodsList.length) {
list.map((i, index) => {
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) {
if (isCancel) {
this.selectedProInfo.id && this.getGoodInfo(this.selectedProInfo.id)
}
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) {
this.specsWidth = 100 / (this.specificationDetailList.length + 4) + '%'
......@@ -2385,9 +2559,6 @@ export default {
},
handleMusicChange (idx) {
if (this.isDisabled) {
return true
}
this.musicList.forEach((item, index) => {
if (index != idx) {
item.isCheck = false
......@@ -2455,16 +2626,19 @@ export default {
},
handleDeleteItem (attr, formAttr, idx) {
this.$confirm('是否删除该项?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.editForm[formAttr].splice(idx, 1)
this.dealItem(attr, formAttr)
return new Promise((resolve) => {
this.$confirm('是否删除该项?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.editForm[formAttr].splice(idx, 1)
this.dealItem(attr, formAttr)
resolve()
}
}
}
})
})
},
......@@ -2503,15 +2677,33 @@ export default {
this.$apis.seckillActivity
.getActivityDetailApi({ id: this.routeInfo.id })
.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.activityInfo = info
this.$set(this.editForm, 'activityTime', [info.startTime, info.endTime])
this.routeInfo.addOrEdit != 'add' && this.getGoodInfo(info.goodsId)
if (info.activityPrice != null && info.goodsStock != null) {
this.editForm.activityPrice = (info.activityPrice / 100).toFixed(2)
this.editForm.goodsStock = info.goodsStock + ''
}
this.selectedProInfo = selectedProInfo
// 预估销量
if (info.predictVolume) {
this.editForm.predictVolume = (info.predictVolume / 100).toFixed(2)
......@@ -2528,9 +2720,7 @@ export default {
// 活动详情
if (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) {
......@@ -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.selectCarNumberFlag = this.editForm.selectCarNumberFlag || 1
......@@ -2581,7 +2771,7 @@ export default {
}
// 复制
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)
}
// 兼容以前众筹活动没有战报内容配置,展示页面
......@@ -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 () {
var _this = this
var param = this.$common.utils.deepClone(this.editForm)
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') {
param.id = this.routeInfo.id
}
......@@ -2653,7 +2836,6 @@ export default {
param.startTime = d[0]
param.endTime = d[1]
}
param.goodsId = this.selectedProInfo.id
if (this.nameToValSpecsList.length > 0) {
delete param.activityPrice
delete param.goodsStock
......@@ -2661,6 +2843,7 @@ export default {
this.nameToValSpecsList.forEach(function (item) {
var obj = {
retailPrice: (item.activityPrice * 100).toFixed(0), //存的分,需乘100
crowdFundingPrice: (item.crowdFundingPrice * 100).toFixed(0), //存的分,需乘100
stock: item.goodsStock,
specificationData: item.specificationData,
specificationKey: item.specificationKey
......@@ -2692,15 +2875,24 @@ export default {
})
//直播
if (param.liveFlag) {
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
//直播
if (param.liveBroadcastMediaType == 1) {
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 {
let resetAttr = this.liveEditFormData.map(item => item.name)
let resetAttr = this.liveEditFormData_1.map(item => item.name)
resetAttr.forEach(item => {
param[item] = ''
})
}
// 定金收款账户
param.payMannerId = param.paymentAccountSource == 1 ? '' : param.paymentAccountId
param.paymentAccountId = param.paymentAccountSource == 1 ? param.paymentAccountId : ''
// 标杆门店总产值/元(已结束战报)
if (param.activityActionReport.signMerchantProduceCount) {
param.activityActionReport.signMerchantProduceCount = (this.editForm.activityActionReport.signMerchantProduceCount * 10000).toFixed(0)
......@@ -2730,7 +2922,7 @@ export default {
}
}
// 已结束战报转化率计算
param.activityActionReport.noteTouchConversionRate = ""
param.activityActionReport.noteTouchConversionRate = ''
if (param.activityActionReport.noteTouchVisitorCount && param.activityActionReport.noteTouchOrderCount) {
let val = param.activityActionReport.noteTouchOrderCount / param.activityActionReport.noteTouchVisitorCount
param.activityActionReport.noteTouchConversionRate = (val * 10000).toFixed(0)
......@@ -2767,6 +2959,7 @@ export default {
addOrUpdate () {
this.loading = true
var params = this.getCouponInfoParams()
console.log(JSON.parse(JSON.stringify(params)))
this.$apis.seckillActivity
.addOrUpdateActivityApi(params)
.then(res => {
......@@ -2812,7 +3005,6 @@ export default {
this.editForm.activityServices = this.delListAllEmpty('activityServices', ['title', 'content'])
this.editForm.activityCommoditys = this.delListAllEmpty('activityCommoditys', ['question', 'answer'])
this.editForm.activityExperienceDTOs = this.delListAllEmpty('activityExperienceDTOs', ['experience', 'activityExperienceImgs'])
this.validateRules()
var flag = true
if (this.nameToValSpecsList && this.nameToValSpecsList.length > 0) {
var list = this.nameToValSpecsList
......@@ -2826,7 +3018,7 @@ export default {
flag = false
break
}
if (!item.goodsStock) {
if (!item.activityGoodsStock) {
this.$message({
message: '有未设置活动库存的项',
type: 'error'
......@@ -2842,11 +3034,21 @@ export default {
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid, errorObj) => {
validList = [
{ valid: !valid, errorObj: errorObj },
{ valid: !flag, errorObj: { goodsId: '' } }
{ valid: !flag, errorObj: { goodsList: [] } }
]
this.$refs.configEditFormRef.$refs[this.editChildRef].validate((configValid, configErrorObj) => {
validList.push({ valid: !configValid, errorObj: configErrorObj })
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) {
this.$refs.customerEditFormRef.$refs[this.editChildRef].validate((customerValid, customerErrorObj) => {
validList.splice(2, 0, { valid: !customerValid, errorObj: customerErrorObj })
......@@ -2903,34 +3105,53 @@ export default {
})
},
handleCancel () {
if (this.editStatus && this.addOrEdit != 'detail') {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.cancelJump()
})
.catch(() => { })
} else {
this.cancelJump()
}
this.cancelJump()
// if (this.editStatus) {
// this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// })
// .then(() => {
// this.cancelJump()
// })
// .catch(() => { })
// } else {
// this.cancelJump()
// }
},
//获取跟进员工
getLiveList () {
this.$apis.seckillActivity.getLiveListApi({}).then(res => {
if (res.length == 0) return ''
const index = this.liveEditFormData.findIndex(item => {
return item.name == 'liveBroadcastRoomId'
})
const staff = res.map(item => {
return {
label: item.name + ' - ' + item.code,
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 () {
......@@ -2948,13 +3169,35 @@ export default {
},
// 定金收款账户
getPayList () {
this.getVideoList()
this.$apis.seckillActivity.getPayListApi({}).then(res => {
this.baseData.payList = res
this.editForm.paymentAccountSource = this.editForm.paymentAccountSource || '1'
this.editForm.paymentAccountId = this.editForm.paymentAccountId || this.editForm.payMannerId || res.find(item => item.isDefault == 'Y')?.id
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>
......@@ -2968,6 +3211,12 @@ export default {
text-align: right;
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 {
width: 100%;
text-align: center;
......@@ -2976,7 +3225,30 @@ export default {
.edit-product-dh .table-spesc tbody tr {
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 {
display: inline-block;
box-sizing: border-box;
......@@ -3175,6 +3447,7 @@ export default {
opacity: 0.1;
}
}
.btn-box {
padding: 0 20px 2px;
}
......@@ -3185,6 +3458,12 @@ export default {
width: auto !important;
}
}
.balancePayment {
span {
font-weight: 500;
color: #ee3040;
}
}
.el-switch {
.el-switch__core {
width: 44px !important;
......@@ -3275,16 +3554,6 @@ export default {
}
}
.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 {
margin: 20px 0 10px 74px;
}
......@@ -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>
......@@ -66,6 +66,7 @@ export default {
},
jumpEvent(obj) {
console.log(obj)
this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit)
this.$set(this.eventObj, 'info', obj.info)
this.parentCustomerObj = obj.parentCustomerObj
......
......@@ -62,7 +62,7 @@
</glsx-combi-form>
</div>
</div>
<div class="container edit-container">
<div class="container edit-container" v-loading="marketingEventLoading">
<div class="edit-title flex" style="align-items: center">
<p>营销事件设置</p>
<el-tooltip :disabled="!(!editForm.customerInfoList.length || !editForm.sopName)" effect="dark"
......@@ -81,7 +81,8 @@
<div v-show="editForm.eventList.length" class="event-box">
<div class="event-item" v-for="(item, index) in editForm.eventList" :key="index">
<div class="flex-default event-title">
<p class="m-r-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" v-show="item.repeatFlag == 'Y' && item.repeatMode == 1">每天重复循环至</p>
<p class="m-r-20" v-show="item.repeatFlag == 'Y' && item.repeatMode == 2">每周{{
......@@ -112,11 +113,14 @@
<div class="welcome-activity-panel">
<div class="welcome-activity-box">
<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/text.png" v-if="obj.attContent && JSON.parse(obj.attContent).isFile"/>
<img src="@/assets/welcomeWord/pdf_r.png"
v-if="obj.attContent && !backupContentJson(obj.attContent).isFile"/>
<img src="@/assets/welcomeWord/text.png"
v-if="obj.attContent && backupContentJson(obj.attContent).isFile"/>
</div>
<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>
......@@ -197,7 +201,7 @@
content="请先完善sop名称和营销对象" placement="top">
<div>
<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"
:size="size" @click="handleEventEdit('edit', item, index)">编辑
</el-button>
......@@ -239,6 +243,7 @@ export default {
size: 'small',
title: '基本信息',
url: url,
marketingEventLoading: false,
editChildRef: 'editChildRef',
editStatus: false,
editDisabled: false,
......@@ -388,7 +393,14 @@ export default {
confName: '微信朋友圈'
}
]
}
},
// 素材活动集合
materialGroupSet: [],
equityCardCollection: [],
equityPackageCollection: [],
mallCouponCollection: [],
seckillActivitySet: []
}
},
......@@ -421,17 +433,60 @@ export default {
},
mounted() {
async mounted() {
this.setMinHeight('.sop-base-info')
// this.routeInfo.addOrEdit == 'edit'
await this.getTheMaterialActivityCollection()
if (['edit', 'copy', 'look'].includes(this.routeInfo.addOrEdit)) {
this.getInfo()
} else if (this.routeInfo.info) {
this.setCustomer()
}
},
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) {
let htm = val.replace(
/\[([\u4E00-\u9FA56]{1,4}|OK|NO|666)]/gi,
......@@ -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() {
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') {
this.copyForm = res
this.copyForm.eventList.forEach(item => {
res.eventList && res.eventList.map(item => {
item.eventStartDate = ''
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 {
this.editForm = res
this.currentCustomerIdx = this.customerDataList.findIndex(item => item.confId == this.editForm.customerOptType)
this.recoverCustomerList()
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 && this.judgeDisable()
this.$nextTick(() => {
......@@ -744,7 +887,7 @@ export default {
if (action == 'confirm') {
this.customerDataList[this.currentCustomerIdx].list = []
this.changeCustomer()
this.editForm.eventList = []
// this.editForm.eventList = []
}
}
})
......@@ -755,7 +898,8 @@ export default {
},
deleteCustPop() {
this.$confirm('修改的客户类型(是否加企微、是否有手机号)不一致,原有营销渠道可能不可用,系统自动重置原有营销事件。是否确定修改?', '提示', {
// ,原有营销渠道可能不可用,系统自动重置原有营销事件
this.$confirm('修改的客户类型(是否加企微、是否有手机号)不一致。是否确定修改?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
......@@ -765,7 +909,7 @@ export default {
// this.$refs.editFormRef.$refs[this.editChildRef].validateField('customerInfoList')
this.customerDataList[this.currentCustomerIdx].list = []
this.changeCustomer()
this.editForm.eventList = []
// this.editForm.eventList = []
}
}
})
......@@ -1042,6 +1186,18 @@ export default {
}
})
} else {
// 处理复制事件的营销时间
let copyTimeFlag = this.editForm.eventList.every(its => {
return its.eventStartDate && its.eventTime
})
if (!copyTimeFlag) {
this.$message({
message: '请选择营销事件的营销时间',
type: 'error'
})
return
}
// 这边走的是新增
params.eventList = []
this.editForm.eventList.forEach((item, index) => {
......@@ -1447,4 +1603,9 @@ export default {
margin-top: 8px;
display: inline-block
}
.editFlag {
color: #f56c6c;
font-size: 12px;
}
</style>
......@@ -2,8 +2,11 @@
<div class="img-bg">
<div class="preview-content">
<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">
<img class="avatar" src="@/assets/guestCustom/default-customer.png" v-if="!(hasSixType && hasSevenType) || item.attType !== 7" alt/>
<div
: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">
<div class="preview-text text" v-html="item.attContent"></div>
</template>
......@@ -123,7 +126,6 @@ export default {
})
item.attContent = htm
} 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)
}
})
......@@ -131,7 +133,6 @@ export default {
},
previewVal: {
handler(val) {
console.log(val)
this.previewList = utils.deepClone(val).filter(item => item.attContent)
},
deep: true
......@@ -156,9 +157,10 @@ export default {
</script>
<style lang="scss" scoped>
.isMargin{
.isMargin {
margin-top: -20px;
}
.img-bg {
position: relative;
width: 290px;
......
......@@ -2,73 +2,48 @@
<div class="img-bg">
<div class="preview-content">
<div class="preview-info" v-show="previewListFilter.length">
<img class="avatar" src="@/assets/guestCustom/default-customer.png" alt />
<template v-if="previewListFilter && previewListFilter.length <= 3">
<img class="avatar" src="@/assets/guestCustom/default-customer.png" alt/>
<template>
<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 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>
</template>
<template v-else-if="item.attType == 3">
<!-- <el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image> -->
<div class="video-panel">
<video id="video" width="100%" height="100%" preload loop muted>
<source :src="item.attContent" type="video/mp4" />
</video>
<i
class="el-icon-video-play"
@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 v-else-if="hasSixType || hasSevenType">
<template v-if="hasSixType && hasSevenType">
<template v-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>
<template v-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-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>
<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 v-else-if="item.attType == 3">
<!-- <el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image> -->
<div class="video-panel">
<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>
<i
class="el-icon-video-play"
......@@ -105,27 +80,31 @@ const ATT_TYPE = {
ACTIVITY: 7
}
import emoji from '@/utils/emo'
export default {
name: 'Preview',
props: { previewView: Array },
props: {previewView: Array},
data() {
return {
videoShow: false,
previewList: [],
previewListFilter: [],
videoUrl: ''
videoUrl: '',
hasSixType: false,
hasSevenType: false
}
},
watch: {
previewView: {
handler(val) {
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 = []
for (let i in previewVal) {
if (previewVal[i].attType == 1) {
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, '')
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1
......@@ -171,12 +150,14 @@ export default {
.img-list {
margin-right: 3px;
}
.img-bg {
position: relative;
width: 290px;
height: 566px;
background-image: url(../../../../../assets/guestCustom/friend-bg.png);
background-size: 100%;
.preview-content {
position: absolute;
width: 250px;
......@@ -191,9 +172,11 @@ export default {
text-align: center;
margin-bottom: 15px;
}
.preview-info {
padding: 0 0px 20px 9px;
position: relative;
.avatar {
position: absolute;
top: 0px;
......@@ -202,10 +185,12 @@ export default {
height: 26px;
margin-right: 8px;
}
.preview-box {
margin-left: 30px;
width: 180px;
}
.preview-operation {
float: right;
margin-right: 30px;
......@@ -219,6 +204,7 @@ export default {
font-weight: 400;
color: #556993;
}
.video-panel {
width: 100%;
height: 102px;
......@@ -226,9 +212,11 @@ export default {
align-items: center;
justify-content: center;
position: relative;
video {
position: absolute;
}
i {
z-index: 10;
font-size: 20px;
......@@ -236,6 +224,7 @@ export default {
cursor: pointer;
}
}
.preview-text {
font-size: 14px;
position: relative;
......@@ -245,29 +234,34 @@ export default {
word-wrap: break-word;
word-break: break-all;
line-height: 20px;
/deep/ img {
width: 20px;
height: 20px;
vertical-align: middle;
}
}
.text {
width: 100%;
font-size: 12px;
padding: 0px;
margin-bottom: 6px;
}
.preview-link {
padding: 6px 0px;
font-size: 12px;
background: #f7f7f7;
display: flex;
align-items: center;
img {
margin: 0px 12px 0px 5px;
width: 24px;
height: 24px;
}
div {
overflow: hidden;
text-overflow: ellipsis;
......@@ -277,6 +271,7 @@ export default {
-webkit-box-orient: vertical;
}
}
.preview-text::before {
content: '';
position: absolute;
......@@ -287,12 +282,14 @@ export default {
border-color: transparent #fff transparent transparent;
// background-color: cornflowerblue;
}
.preview-applet {
img {
width: 20px;
height: 20px;
margin-right: 4px;
}
&-title {
display: flex;
align-self: center;
......@@ -300,6 +297,7 @@ export default {
margin-bottom: 5px;
}
}
.preview-activity {
width: 160px;
// height: 184px;
......@@ -307,6 +305,7 @@ export default {
border-radius: 4px;
border: 1px solid #dce1e5;
padding: 7px 7px 0;
.activity-name {
font-size: 12px;
color: #333;
......@@ -316,10 +315,12 @@ export default {
overflow: hidden;
white-space: nowrap;
}
.applet-logo {
width: 95px;
height: 24px;
}
.activity-footer {
margin-top: 4px;
border-top: 1px solid #edeff3;
......@@ -328,6 +329,7 @@ export default {
}
}
}
.video-dialog {
z-index: 2001;
position: fixed;
......@@ -337,6 +339,7 @@ export default {
left: 0;
overflow: auto;
background: rgba($color: #000000, $alpha: 0.5);
&-panel {
background: #000000;
position: absolute;
......@@ -348,10 +351,12 @@ export default {
box-sizing: border-box;
padding: 10px 20px 20px;
overflow: hidden;
.video-close {
display: flex;
justify-content: flex-end;
height: 40px;
i {
cursor: pointer;
font-size: 25px;
......
......@@ -61,7 +61,7 @@
<div class="marketingContent">
<div class="group-content">
<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>
<GLEditor ref="welcome" :form="'object'" style="line-height: 12px;width:650px" :btnList="btnList"
@previewWord="previewForm"></GLEditor>
......@@ -71,7 +71,7 @@
</div>
<div class="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>
</div>
</div>
......@@ -594,7 +594,6 @@ export default {
setTimeout(() => {
this.previewList = JSON.parse(JSON.stringify(this.previewList))
})
},
},
......@@ -608,6 +607,7 @@ export default {
},
mounted() {
Object.assign(this.editForm, this.eventObj.info)
this.getStaffTypeList()
this.$nextTick(() => {
......@@ -722,13 +722,13 @@ export default {
let backupContent = typeof (this.editForm.backupContent) == 'string' ? JSON.parse(this.editForm.backupContent) : this.editForm.backupContent
if (backupContent) {
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
})
this.$refs.welcome.updateList(previewList)
} else if (this.editForm.object && this.editForm.object.length != 0) {
const previewList = JSON.parse(this.editForm.backupContent).map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
const previewList = JSON.parse(backupContent).map(item => {
if (item.attType == 7) item.attContent = typeof (item.attContent) == 'string' ? JSON.parse(item.attContent) : item.attContent
return item
})
this.$refs.welcome.updateList(previewList)
......@@ -744,7 +744,7 @@ export default {
handleMarketingContent() {
let params = {}
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
} else {
this.hasEventContentDisplaySpecial = false
......
......@@ -92,16 +92,16 @@ export default {
// click: row => this.handleEdit('look', row)
// }
// },
// {
// type: 'el-button',
// name: '复制',
// attrs: {
// type: 'text'
// },
// listeners: {
// click: row => this.handleEdit('copy', row)
// }
// },
{
type: 'el-button',
name: '复制',
attrs: {
type: 'text'
},
listeners: {
click: row => this.handleEdit('copy', row)
}
},
{
type: 'el-button',
name: '编辑',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!