Commit a4df7137 by 杨明

fixed

1 parent 4371d64c
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 16:38:54
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-29 16:16:03
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 09:23:57
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 17:13:33
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -19,6 +19,7 @@ export default {
packageList: {},
process: { 0: false, 1: false, 2: false },
activityInfo: null,
addOrEdit: null,
step: 1
},
mutations: {
......@@ -31,6 +32,9 @@ export default {
state.activityInfo = Object.assign({})
}
},
SET_STATUS(state, data) {
state.addOrEdit = data
},
SET_STEP(state, data) {
state.step = data
},
......@@ -85,7 +89,6 @@ export default {
state.activityInfo = Object.assign(
{},
{
templateId: id,
codeId,
marketingTitle: title,
marketingSubtitle: subTitle,
......
......@@ -2,7 +2,7 @@
<div class="activity-container">
<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 @click="showCase" class="show-case-btn">历史营销方案</div>
<div @click="showCase" class="show-case-btn" v-if="addOrEdit == 'add'">历史营销方案</div>
</div>
<div class="acitity-content">
<marketing-task v-show="step == 1"></marketing-task>
......@@ -26,7 +26,7 @@
</GLTable>
</GLDialog>
<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>
</div>
</template>
......@@ -41,11 +41,13 @@ export default {
components: {
marketingTask,
marketingGift,
PhoneView,
marketingContent
},
data() {
return {
dialogVisible: false,
activityInfo: {},
routeInfo: {},
tabList: [{ label: '营销任务' }, { label: '营销礼包' }, { label: '营销内容' }],
caseList: [],
......@@ -121,13 +123,21 @@ export default {
}
},
mounted() {
this.routeInfo = this.$route.query
if (this.$route.query.addOrEdit == 'edit') {
this.SET_STEP(2)
this.setProcess({ 0: true })
}
},
computed: {
...mapState('marketing', ['step'])
...mapState('marketing', ['step', 'addOrEdit', 'subscribe'])
},
watch: {
subscribe(val) {
if (val == 9) this.SET_STEP(2)
}
},
methods: {
...mapActions('marketing', ['getActivityInfo']),
...mapActions('marketing', ['getActivityInfo', 'setProcess']),
...mapMutations('marketing', ['SET_STEP']),
//数据看板
handleJump(row) {
......@@ -148,16 +158,19 @@ export default {
handleView(row) {
this.$apis.marketing.activityDetail({ id: row.id }).then(res => {
console.log(res)
// if (res) {
// const activityCoupon = res.activityCouponBaseInfoDTOS || res.couponList || [],
// selectedGoodsList = activityCoupon.filter(i => i.discountType == 8),
// couponList = activityCoupon.filter(i => i.discountType != 8)
// this.activityInfo = { ...res, selectedEquityList: res.serviceMerchantPackageConfigDTOList, couponList, selectedGoodsList }
// this.dialogVisible = true
// }
if (res) {
const activityCoupon = res.activityCouponBaseInfoDTOS || res.couponList || [],
selectedGoodsList = activityCoupon.filter(i => i.discountType == 8),
couponList = activityCoupon.filter(i => i.discountType != 8)
this.activityInfo = { ...res, selectedEquityList: res.serviceMerchantPackageConfigDTOList, couponList, selectedGoodsList }
this.dialogVisible = true
}
})
},
tabClick(index) {
if (index == 1 && (this.addOrEdit == 'edit' || this.subscribe == 9)) {
return
}
this.SET_STEP(index)
},
handleCaseClose() {
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-29 21:24:27
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......
......@@ -5,7 +5,7 @@
<el-radio label="" v-model="giftValue">自定义礼包</el-radio>
<div class="gift-container">
<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>
<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>
......@@ -94,6 +94,7 @@ export default {
data() {
return {
isInit: true,
giftValue: '',
editForm: {
giftList: 1
......@@ -146,14 +147,13 @@ export default {
handler(info) {
this.init()
this.$nextTick(() => {
if (info.serviceMerchantPackageConfigDTOList && info.serviceMerchantPackageConfigDTOList.length) {
this.selectedCarList = info.serviceMerchantPackageConfigDTOList.map(item => {
if (info.serviceMerchantPackageConfigDTOS && info.serviceMerchantPackageConfigDTOS.length) {
this.selectedCarList = info.serviceMerchantPackageConfigDTOS.map(item => {
return {
packageCode: item.packageCode,
packageAmount: item.packageAmount
}
})
this.selectedCarList = info.serviceMerchantPackageConfigDTOList
}
let activityCoupon = info.activityCouponBaseInfoDTOS || info.couponList || info.couponItemList
......@@ -188,6 +188,7 @@ export default {
this.selectedServiceList = []
this.goodsList = []
this.selectedGoodsList = []
this.isInit = true
this.$refs['carRef'].$refs['listMutiTable'].clearSelection()
this.$refs['goodsRef' + this.goodsIndex][0].$refs['listMutiTable'].clearSelection()
this.$refs['serviceRef' + this.serviceIndex][0].$refs['listMutiTable'].clearSelection()
......@@ -227,16 +228,13 @@ export default {
couponAnticipatedCost: item.denomination
}
})
// if (this.selectedCarList.length) {
// const serviceMerchantPackageConfigDTOS = this.selectedCarList.map(i => {
// return {
// packageCode: i.packageCode,
// packageAmount: i.packageAmount
// }
// })
// params.serviceMerchantPackageConfigDTOS = serviceMerchantPackageConfigDTOS
// }
const serviceMerchantPackageConfigDTOS = this.selectedCarList.map(i => {
return {
packageCode: i.packageCode,
packageAmount: i.packageAmount
}
})
params.serviceMerchantPackageConfigDTOS = serviceMerchantPackageConfigDTOS
const equityServices = this.selectedCarList.map(i => i.packageCode)
params.equityServices = equityServices.join(',')
params.activityPrice = (this.editForm.activityPrice * 100).toFixed(0)
......@@ -272,6 +270,7 @@ export default {
merchantId,
activitySubscribe: subscribe,
name: giftName,
totalEquityPrice: this.totalPrice,
couponIds: JSON.stringify(couponIds),
equities: JSON.stringify(equities)
}
......@@ -375,9 +374,12 @@ export default {
},
//用车权益
async getCarList() {
let res = await this.$apis.giftBag.packageDefault({ merchantId: this.merchantId, activitySubscribe: this.subscribe })
let equities = JSON.parse(res.equities)
console.log(equities, 99)
let equities = {}
if (this.isInit) {
let res = await this.$apis.giftBag.packageDefault({ merchantId: this.merchantId, activitySubscribe: this.subscribe })
equities = JSON.parse(res.equities)
}
this.isInit = false
var params = {
...this.searchForm,
merchantId: this.merchantId
......@@ -392,6 +394,7 @@ export default {
for (let k in equities) {
if (k == p.packageCode) {
p.packageAmount = equities[k]
console.log(p.packageAmount)
}
}
this.selectedCarList.forEach(s => {
......@@ -518,6 +521,16 @@ export default {
}
}
</script>
<style lang="scss">
.acitity-content {
#giftList {
display: flex !important;
}
.el-radio {
margin-bottom: 6px;
}
}
</style>
<style lang="scss" scoped>
.choseRow {
......
......@@ -227,6 +227,10 @@ export default {
customerKeys: this.customerKey
}
this.$apis.marketing.importCustomer(param).then(res => {
if (res.customerNumTotal == 0) {
this.$message.error('导入客户数为0,请重新导入')
return
}
item.excelUrl = url
item.key = res.customerKey
item.lastFollowStaffList = res.lastFollowStaffList
......
......@@ -151,6 +151,9 @@ export default {
</script>
<style lang="scss" scoped>
.w-100-percent {
width: 100%;
}
.wechat-box {
width: 276px;
box-sizing: border-box;
......
......@@ -74,7 +74,8 @@ export default {
url = await this.createBig(this.$refs.viewForm.detail, this.logoInfo, draggableList)
}
params.subscribe = this.subscribe
params.backgroundImage = url
params.bigImage = url
params.source = 1
this.$apis.marketing
.createSuperMarketing(params)
.then(res => {
......
<template>
<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="choseItem" :class="{ active: currentIndex == item.type }" v-for="(item, index) in tabList" :key="index" @click="tabClick(item.type)">{{ item.label }}</div>
</div>
......@@ -92,15 +92,16 @@ export default {
mounted() {
this.calendarPage()
this.EntWechatQrCode()
this.routeInfo = this.$route.query
if (this.routeInfo.addOrEdit == 'edit') {
this.getInfo()
if (this.$route.query.addOrEdit == 'edit') {
this.getActivityInfo(this.$route.query.id)
this.sceneList[1].content = '编辑无法再次导入客群'
} else {
this.setSubscribe(this.routeInfo.subscribe ? this.routeInfo.subscribe : this.currentIndex)
this.tabList.splice(3, 1)
}
},
computed: {
...mapState('marketing', ['subscribe'])
...mapState('marketing', ['subscribe', 'addOrEdit'])
},
watch: {
subscribe(val) {
......@@ -116,15 +117,15 @@ export default {
this.setSubscribe({ subscribe: 6, keywords: item.keywords })
},
handleStep(index) {
if (this.addOrEdit == 'edit' && index == 1) return
if ([1, 2, 3].includes(index)) this.SET_STEP(index)
},
handleAdd() {
this.SET_INIT(true)
},
getInfo() {
this.getActivityInfo(this.routeInfo.id)
},
tabClick(index) {
console.log(this.addOrEdit, 'addOrEdit')
if (this.addOrEdit == 'edit') return
this.currentIndex = index
if (index != 6) {
this.setSubscribe(index)
......
......@@ -16,12 +16,19 @@ import importCustom from './components/ImportCoustom'
import scene from './components/Scene'
import marketing from './components/Marketing'
import process from './components/Process'
import { mapMutations } from 'vuex'
export default {
components: {
importCustom,
scene,
marketing,
process
},
methods: {
...mapMutations('marketing', ['SET_STATUS'])
},
mounted() {
this.SET_STATUS(this.$route.query.addOrEdit)
}
}
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!