Commit a4df7137 by 杨明

fixed

1 parent 4371d64c
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 16:38:54 * @Date: 2022-12-13 16:38:54
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-09 15:48:27 * @LastEditTime: 2023-07-11 15:28:51
* @FilePath: \scrm-micro-link\src\api\modules\giftBag.js * @FilePath: \scrm-micro-link\src\api\modules\giftBag.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-29 16:16:03 * @Date: 2023-06-29 16:16:03
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-10 16:14:31 * @LastEditTime: 2023-07-11 11:17:23
* @FilePath: \scrm-micro-link\src\api\modules\marketing.js * @FilePath: \scrm-micro-link\src\api\modules\marketing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 09:23:57 * @Date: 2022-12-13 09:23:57
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-10 16:13:41 * @LastEditTime: 2023-07-11 10:09:55
* @FilePath: \scrm-micro-link\src\setup\qiankun.js * @FilePath: \scrm-micro-link\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 17:13:33 * @Date: 2023-05-16 17:13:33
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-10 19:18:22 * @LastEditTime: 2023-07-11 16:15:16
* @FilePath: \scrm-micro-home\src\store\modules\marketing.js * @FilePath: \scrm-micro-home\src\store\modules\marketing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -19,6 +19,7 @@ export default { ...@@ -19,6 +19,7 @@ export default {
packageList: {}, packageList: {},
process: { 0: false, 1: false, 2: false }, process: { 0: false, 1: false, 2: false },
activityInfo: null, activityInfo: null,
addOrEdit: null,
step: 1 step: 1
}, },
mutations: { mutations: {
...@@ -31,6 +32,9 @@ export default { ...@@ -31,6 +32,9 @@ export default {
state.activityInfo = Object.assign({}) state.activityInfo = Object.assign({})
} }
}, },
SET_STATUS(state, data) {
state.addOrEdit = data
},
SET_STEP(state, data) { SET_STEP(state, data) {
state.step = data state.step = data
}, },
...@@ -85,7 +89,6 @@ export default { ...@@ -85,7 +89,6 @@ export default {
state.activityInfo = Object.assign( state.activityInfo = Object.assign(
{}, {},
{ {
templateId: id,
codeId, codeId,
marketingTitle: title, marketingTitle: title,
marketingSubtitle: subTitle, marketingSubtitle: subTitle,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="activity-container"> <div class="activity-container">
<div class="choseRow"> <div class="choseRow">
<div class="choseItem" :class="{ active: step == index + 1 }" v-for="(item, index) in tabList" :key="index" @click="tabClick(index + 1)">{{ item.label }}</div> <div class="choseItem" :class="{ active: step == index + 1 }" v-for="(item, index) in tabList" :key="index" @click="tabClick(index + 1)">{{ item.label }}</div>
<div @click="showCase" class="show-case-btn">历史营销方案</div> <div @click="showCase" class="show-case-btn" v-if="addOrEdit == 'add'">历史营销方案</div>
</div> </div>
<div class="acitity-content"> <div class="acitity-content">
<marketing-task v-show="step == 1"></marketing-task> <marketing-task v-show="step == 1"></marketing-task>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</GLTable> </GLTable>
</GLDialog> </GLDialog>
<el-dialog title="预览" :append-to-body="true" :visible.sync="dialogVisible" width="30%"> <el-dialog title="预览" :append-to-body="true" :visible.sync="dialogVisible" width="30%">
<phone-view :activityInfo="activityInfo"></phone-view> <phone-view v-if="dialogVisible" :activityInfo="activityInfo"></phone-view>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -41,11 +41,13 @@ export default { ...@@ -41,11 +41,13 @@ export default {
components: { components: {
marketingTask, marketingTask,
marketingGift, marketingGift,
PhoneView,
marketingContent marketingContent
}, },
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
activityInfo: {},
routeInfo: {}, routeInfo: {},
tabList: [{ label: '营销任务' }, { label: '营销礼包' }, { label: '营销内容' }], tabList: [{ label: '营销任务' }, { label: '营销礼包' }, { label: '营销内容' }],
caseList: [], caseList: [],
...@@ -121,13 +123,21 @@ export default { ...@@ -121,13 +123,21 @@ export default {
} }
}, },
mounted() { mounted() {
this.routeInfo = this.$route.query if (this.$route.query.addOrEdit == 'edit') {
this.SET_STEP(2)
this.setProcess({ 0: true })
}
}, },
computed: { computed: {
...mapState('marketing', ['step']) ...mapState('marketing', ['step', 'addOrEdit', 'subscribe'])
},
watch: {
subscribe(val) {
if (val == 9) this.SET_STEP(2)
}
}, },
methods: { methods: {
...mapActions('marketing', ['getActivityInfo']), ...mapActions('marketing', ['getActivityInfo', 'setProcess']),
...mapMutations('marketing', ['SET_STEP']), ...mapMutations('marketing', ['SET_STEP']),
//数据看板 //数据看板
handleJump(row) { handleJump(row) {
...@@ -148,16 +158,19 @@ export default { ...@@ -148,16 +158,19 @@ export default {
handleView(row) { handleView(row) {
this.$apis.marketing.activityDetail({ id: row.id }).then(res => { this.$apis.marketing.activityDetail({ id: row.id }).then(res => {
console.log(res) console.log(res)
// if (res) { if (res) {
// const activityCoupon = res.activityCouponBaseInfoDTOS || res.couponList || [], const activityCoupon = res.activityCouponBaseInfoDTOS || res.couponList || [],
// selectedGoodsList = activityCoupon.filter(i => i.discountType == 8), selectedGoodsList = activityCoupon.filter(i => i.discountType == 8),
// couponList = activityCoupon.filter(i => i.discountType != 8) couponList = activityCoupon.filter(i => i.discountType != 8)
// this.activityInfo = { ...res, selectedEquityList: res.serviceMerchantPackageConfigDTOList, couponList, selectedGoodsList } this.activityInfo = { ...res, selectedEquityList: res.serviceMerchantPackageConfigDTOList, couponList, selectedGoodsList }
// this.dialogVisible = true this.dialogVisible = true
// } }
}) })
}, },
tabClick(index) { tabClick(index) {
if (index == 1 && (this.addOrEdit == 'edit' || this.subscribe == 9)) {
return
}
this.SET_STEP(index) this.SET_STEP(index)
}, },
handleCaseClose() { handleCaseClose() {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-29 21:24:27 * @Date: 2023-06-29 21:24:27
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-10 20:49:06 * @LastEditTime: 2023-07-11 17:08:16
* @FilePath: \scrm-micro-link\src\views\activityLink\components\MarketingContent.vue * @FilePath: \scrm-micro-link\src\views\activityLink\components\MarketingContent.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-radio label="" v-model="giftValue">自定义礼包</el-radio> <el-radio label="" v-model="giftValue">自定义礼包</el-radio>
<div class="gift-container"> <div class="gift-container">
<el-radio-group v-model="giftValue" @change="getModel"> <el-radio-group v-model="giftValue" @change="getModel">
<el-radio :label="item.id" v-for="item in giftList" :key="item.id">{{ item.name }}</el-radio> <el-radio :label="item.id" v-for="item in giftList" :key="item.id">{{ item.name }}(成本:{{ item.totalEquityPrice || 0 }})</el-radio>
</el-radio-group> </el-radio-group>
<div class="choseRow"> <div class="choseRow">
<div class="choseItem" :class="{ active: currentIndex == index + 1 }" v-for="(item, index) in tabList" :key="index" @click="tabClick(index + 1)">{{ item.label }}</div> <div class="choseItem" :class="{ active: currentIndex == index + 1 }" v-for="(item, index) in tabList" :key="index" @click="tabClick(index + 1)">{{ item.label }}</div>
...@@ -94,6 +94,7 @@ export default { ...@@ -94,6 +94,7 @@ export default {
data() { data() {
return { return {
isInit: true,
giftValue: '', giftValue: '',
editForm: { editForm: {
giftList: 1 giftList: 1
...@@ -146,14 +147,13 @@ export default { ...@@ -146,14 +147,13 @@ export default {
handler(info) { handler(info) {
this.init() this.init()
this.$nextTick(() => { this.$nextTick(() => {
if (info.serviceMerchantPackageConfigDTOList && info.serviceMerchantPackageConfigDTOList.length) { if (info.serviceMerchantPackageConfigDTOS && info.serviceMerchantPackageConfigDTOS.length) {
this.selectedCarList = info.serviceMerchantPackageConfigDTOList.map(item => { this.selectedCarList = info.serviceMerchantPackageConfigDTOS.map(item => {
return { return {
packageCode: item.packageCode, packageCode: item.packageCode,
packageAmount: item.packageAmount packageAmount: item.packageAmount
} }
}) })
this.selectedCarList = info.serviceMerchantPackageConfigDTOList
} }
let activityCoupon = info.activityCouponBaseInfoDTOS || info.couponList || info.couponItemList let activityCoupon = info.activityCouponBaseInfoDTOS || info.couponList || info.couponItemList
...@@ -188,6 +188,7 @@ export default { ...@@ -188,6 +188,7 @@ export default {
this.selectedServiceList = [] this.selectedServiceList = []
this.goodsList = [] this.goodsList = []
this.selectedGoodsList = [] this.selectedGoodsList = []
this.isInit = true
this.$refs['carRef'].$refs['listMutiTable'].clearSelection() this.$refs['carRef'].$refs['listMutiTable'].clearSelection()
this.$refs['goodsRef' + this.goodsIndex][0].$refs['listMutiTable'].clearSelection() this.$refs['goodsRef' + this.goodsIndex][0].$refs['listMutiTable'].clearSelection()
this.$refs['serviceRef' + this.serviceIndex][0].$refs['listMutiTable'].clearSelection() this.$refs['serviceRef' + this.serviceIndex][0].$refs['listMutiTable'].clearSelection()
...@@ -227,16 +228,13 @@ export default { ...@@ -227,16 +228,13 @@ export default {
couponAnticipatedCost: item.denomination couponAnticipatedCost: item.denomination
} }
}) })
// if (this.selectedCarList.length) { const serviceMerchantPackageConfigDTOS = this.selectedCarList.map(i => {
// const serviceMerchantPackageConfigDTOS = this.selectedCarList.map(i => { return {
// return { packageCode: i.packageCode,
// packageCode: i.packageCode, packageAmount: i.packageAmount
// packageAmount: i.packageAmount }
// } })
// }) params.serviceMerchantPackageConfigDTOS = serviceMerchantPackageConfigDTOS
// params.serviceMerchantPackageConfigDTOS = serviceMerchantPackageConfigDTOS
// }
const equityServices = this.selectedCarList.map(i => i.packageCode) const equityServices = this.selectedCarList.map(i => i.packageCode)
params.equityServices = equityServices.join(',') params.equityServices = equityServices.join(',')
params.activityPrice = (this.editForm.activityPrice * 100).toFixed(0) params.activityPrice = (this.editForm.activityPrice * 100).toFixed(0)
...@@ -272,6 +270,7 @@ export default { ...@@ -272,6 +270,7 @@ export default {
merchantId, merchantId,
activitySubscribe: subscribe, activitySubscribe: subscribe,
name: giftName, name: giftName,
totalEquityPrice: this.totalPrice,
couponIds: JSON.stringify(couponIds), couponIds: JSON.stringify(couponIds),
equities: JSON.stringify(equities) equities: JSON.stringify(equities)
} }
...@@ -375,9 +374,12 @@ export default { ...@@ -375,9 +374,12 @@ export default {
}, },
//用车权益 //用车权益
async getCarList() { async getCarList() {
let equities = {}
if (this.isInit) {
let res = await this.$apis.giftBag.packageDefault({ merchantId: this.merchantId, activitySubscribe: this.subscribe }) let res = await this.$apis.giftBag.packageDefault({ merchantId: this.merchantId, activitySubscribe: this.subscribe })
let equities = JSON.parse(res.equities) equities = JSON.parse(res.equities)
console.log(equities, 99) }
this.isInit = false
var params = { var params = {
...this.searchForm, ...this.searchForm,
merchantId: this.merchantId merchantId: this.merchantId
...@@ -392,6 +394,7 @@ export default { ...@@ -392,6 +394,7 @@ export default {
for (let k in equities) { for (let k in equities) {
if (k == p.packageCode) { if (k == p.packageCode) {
p.packageAmount = equities[k] p.packageAmount = equities[k]
console.log(p.packageAmount)
} }
} }
this.selectedCarList.forEach(s => { this.selectedCarList.forEach(s => {
...@@ -518,6 +521,16 @@ export default { ...@@ -518,6 +521,16 @@ export default {
} }
} }
</script> </script>
<style lang="scss">
.acitity-content {
#giftList {
display: flex !important;
}
.el-radio {
margin-bottom: 6px;
}
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.choseRow { .choseRow {
......
...@@ -227,6 +227,10 @@ export default { ...@@ -227,6 +227,10 @@ export default {
customerKeys: this.customerKey customerKeys: this.customerKey
} }
this.$apis.marketing.importCustomer(param).then(res => { this.$apis.marketing.importCustomer(param).then(res => {
if (res.customerNumTotal == 0) {
this.$message.error('导入客户数为0,请重新导入')
return
}
item.excelUrl = url item.excelUrl = url
item.key = res.customerKey item.key = res.customerKey
item.lastFollowStaffList = res.lastFollowStaffList item.lastFollowStaffList = res.lastFollowStaffList
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:32 * @Date: 2023-05-15 15:08:32
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-10 21:11:31 * @LastEditTime: 2023-07-11 16:06:58
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\MarketingRight.vue * @FilePath: \scrm-micro-home\src\views\home\components\Marketing\MarketingRight.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -40,7 +40,12 @@ ...@@ -40,7 +40,12 @@
<div class="review-bg-img"> <div class="review-bg-img">
<img :src="detail.backgroundImage" v-if="detail.backgroundImage" /> <img :src="detail.backgroundImage" v-if="detail.backgroundImage" />
</div> </div>
<div> </div>
<div class="review-main" v-else>
<div class="review-bg-img">
<img :src="detail.activityBigImg" v-if="detail.activityBigImg" />
</div>
</div>
<div class="main-body" style="background: #DEEAF2;"> <div class="main-body" style="background: #DEEAF2;">
<template v-if="modelNum == 1"> <template v-if="modelNum == 1">
<!-- 权益服务 --> <!-- 权益服务 -->
...@@ -102,8 +107,6 @@ ...@@ -102,8 +107,6 @@
<i class="el-icon-arrow-right"></i> <i class="el-icon-arrow-right"></i>
</div> </div>
</div> </div>
</div>
</div>
</template> </template>
<template v-else-if="isFestival"> <template v-else-if="isFestival">
<img src="@/assets/seckillActivity/phone.png" class="review-phone" /> <img src="@/assets/seckillActivity/phone.png" class="review-phone" />
...@@ -192,6 +195,8 @@ ...@@ -192,6 +195,8 @@
<script> <script>
const WIDTH = 244 const WIDTH = 244
const RATIO = WIDTH / 375 const RATIO = WIDTH / 375
const RENEWAL = [1, 2, 3, 4, 5, 6, 7, 8]
const FESTIVAL = [9, 10]
import PhoneViewA from './PhoneViewA' import PhoneViewA from './PhoneViewA'
import draw from '@/mixins/draw' import draw from '@/mixins/draw'
import equityOne from './model/model_1/equity' import equityOne from './model/model_1/equity'
...@@ -247,7 +252,6 @@ export default { ...@@ -247,7 +252,6 @@ export default {
], ],
isRenewal: true, isRenewal: true,
modelNum: 4, modelNum: 4,
activityInfo: {},
detail: { detail: {
backgroundImg: '' backgroundImg: ''
}, },
...@@ -284,6 +288,22 @@ export default { ...@@ -284,6 +288,22 @@ export default {
isSuper: { isSuper: {
type: Boolean, type: Boolean,
default: true default: true
},
activityInfo: {
type: Object,
default: () => {}
}
},
mounted() {
this.detail = this.activityInfo
this.isFestival = false
this.isRenewal = false
if (!this.detail) return
if (RENEWAL.includes(this.detail.codeId)) {
this.isRenewal = true
}
if (FESTIVAL.includes(this.detail.codeId)) {
this.isFestival = true
} }
}, },
watch: { watch: {
...@@ -300,8 +320,8 @@ export default { ...@@ -300,8 +320,8 @@ export default {
this.detail = { ...this.detail, ...val[2] } this.detail = { ...this.detail, ...val[2] }
this.isFestival = false this.isFestival = false
this.isRenewal = false this.isRenewal = false
console.log(this.detail.codeId, 88) if (!this.detail) return
if (this.detail.codeId) { if (RENEWAL.includes(this.detail.codeId)) {
this.isRenewal = true this.isRenewal = true
this.backgroundHeight = await this.getImgH(this.detail.backgroundImage) this.backgroundHeight = await this.getImgH(this.detail.backgroundImage)
try { try {
...@@ -313,7 +333,7 @@ export default { ...@@ -313,7 +333,7 @@ export default {
console.log(e) console.log(e)
} }
} }
if (this.detail.templateId && !this.detail.codeId) { if (FESTIVAL.includes(this.detail.codeId)) {
this.isFestival = true this.isFestival = true
this.logoInfo = await this.getImgWH(this.detail.merchantLog) this.logoInfo = await this.getImgWH(this.detail.merchantLog)
} }
...@@ -388,7 +408,7 @@ export default { ...@@ -388,7 +408,7 @@ export default {
} }
.review-title_top { .review-title_top {
position: absolute; position: absolute;
top: 44px; top: 14px;
left: 0px; left: 0px;
width: 100%; width: 100%;
text-align: center; text-align: center;
...@@ -411,11 +431,10 @@ export default { ...@@ -411,11 +431,10 @@ export default {
height: 504px; height: 504px;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
top: 77px; top: 47px;
left: 22px; left: 22px;
.review-main { .review-main {
position: relative; position: relative;
height: 300px;
.review-bg-img { .review-bg-img {
width: 100%; width: 100%;
img { img {
...@@ -561,7 +580,13 @@ export default { ...@@ -561,7 +580,13 @@ export default {
} }
} }
} }
.review-address { }
}
.main-body {
}
}
.review-address {
margin-top: 20px;
.title { .title {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -605,8 +630,8 @@ export default { ...@@ -605,8 +630,8 @@ export default {
margin: 2px 0 8px 0; margin: 2px 0 8px 0;
} }
} }
} }
.review-line { .review-line {
color: #999999; color: #999999;
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
...@@ -625,11 +650,5 @@ export default { ...@@ -625,11 +650,5 @@ export default {
margin-left: auto; margin-left: auto;
color: #fc643e; color: #fc643e;
} }
}
}
}
.main-body {
margin-top: 63px;
}
} }
</style> </style>
...@@ -151,6 +151,9 @@ export default { ...@@ -151,6 +151,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.w-100-percent {
width: 100%;
}
.wechat-box { .wechat-box {
width: 276px; width: 276px;
box-sizing: border-box; box-sizing: border-box;
......
...@@ -74,7 +74,8 @@ export default { ...@@ -74,7 +74,8 @@ export default {
url = await this.createBig(this.$refs.viewForm.detail, this.logoInfo, draggableList) url = await this.createBig(this.$refs.viewForm.detail, this.logoInfo, draggableList)
} }
params.subscribe = this.subscribe params.subscribe = this.subscribe
params.backgroundImage = url params.bigImage = url
params.source = 1
this.$apis.marketing this.$apis.marketing
.createSuperMarketing(params) .createSuperMarketing(params)
.then(res => { .then(res => {
......
<template> <template>
<div class="scene-container"> <div class="scene-container">
<el-button :size="size" type="primary" @click="handleAdd" class="el-icon-plus">新建营销方案</el-button> <el-button :size="size" type="primary" @click="handleAdd" class="el-icon-plus" v-if="addOrEdit == 'add'">新建营销方案</el-button>
<div class="choseRow"> <div class="choseRow">
<div class="choseItem" :class="{ active: currentIndex == item.type }" v-for="(item, index) in tabList" :key="index" @click="tabClick(item.type)">{{ item.label }}</div> <div class="choseItem" :class="{ active: currentIndex == item.type }" v-for="(item, index) in tabList" :key="index" @click="tabClick(item.type)">{{ item.label }}</div>
</div> </div>
...@@ -92,15 +92,16 @@ export default { ...@@ -92,15 +92,16 @@ export default {
mounted() { mounted() {
this.calendarPage() this.calendarPage()
this.EntWechatQrCode() this.EntWechatQrCode()
this.routeInfo = this.$route.query if (this.$route.query.addOrEdit == 'edit') {
if (this.routeInfo.addOrEdit == 'edit') { this.getActivityInfo(this.$route.query.id)
this.getInfo() this.sceneList[1].content = '编辑无法再次导入客群'
} else { } else {
this.setSubscribe(this.routeInfo.subscribe ? this.routeInfo.subscribe : this.currentIndex) this.setSubscribe(this.routeInfo.subscribe ? this.routeInfo.subscribe : this.currentIndex)
this.tabList.splice(3, 1)
} }
}, },
computed: { computed: {
...mapState('marketing', ['subscribe']) ...mapState('marketing', ['subscribe', 'addOrEdit'])
}, },
watch: { watch: {
subscribe(val) { subscribe(val) {
...@@ -116,15 +117,15 @@ export default { ...@@ -116,15 +117,15 @@ export default {
this.setSubscribe({ subscribe: 6, keywords: item.keywords }) this.setSubscribe({ subscribe: 6, keywords: item.keywords })
}, },
handleStep(index) { handleStep(index) {
if (this.addOrEdit == 'edit' && index == 1) return
if ([1, 2, 3].includes(index)) this.SET_STEP(index) if ([1, 2, 3].includes(index)) this.SET_STEP(index)
}, },
handleAdd() { handleAdd() {
this.SET_INIT(true) this.SET_INIT(true)
}, },
getInfo() {
this.getActivityInfo(this.routeInfo.id)
},
tabClick(index) { tabClick(index) {
console.log(this.addOrEdit, 'addOrEdit')
if (this.addOrEdit == 'edit') return
this.currentIndex = index this.currentIndex = index
if (index != 6) { if (index != 6) {
this.setSubscribe(index) this.setSubscribe(index)
......
...@@ -16,12 +16,19 @@ import importCustom from './components/ImportCoustom' ...@@ -16,12 +16,19 @@ import importCustom from './components/ImportCoustom'
import scene from './components/Scene' import scene from './components/Scene'
import marketing from './components/Marketing' import marketing from './components/Marketing'
import process from './components/Process' import process from './components/Process'
import { mapMutations } from 'vuex'
export default { export default {
components: { components: {
importCustom, importCustom,
scene, scene,
marketing, marketing,
process process
},
methods: {
...mapMutations('marketing', ['SET_STATUS'])
},
mounted() {
this.SET_STATUS(this.$route.query.addOrEdit)
} }
} }
</script> </script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!