Commit 38495ef3 by 杨明

fixed

1 parent bb49c303
......@@ -7,7 +7,7 @@
<div @click="showCase" class="show-case-btn" v-if="routerInfo.addOrEdit == 'add'">历史营销方案</div>
</div>
<div class="acitity-content">
<marketing-task v-show="step == 1" v-if="routerInfo.addOrEdit != 'edit'"></marketing-task>
<marketing-task v-show="step == 1"></marketing-task>
<marketing-gift v-show="step == 2"></marketing-gift>
<marketing-content v-show="step == 3"></marketing-content>
</div>
......@@ -179,7 +179,7 @@ export default {
})
},
tabClick(index) {
if (index == 1 && (this.routerInfo.addOrEdit == 'edit' || this.subscribe == 9)) {
if (index == 1 && this.subscribe == 9) {
return
}
this.SET_STEP(index)
......
......@@ -3,6 +3,7 @@
<glsx-combi-form class="edit-form-container" :isBlock="true" ref="editFormRef" formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="selectGiftBtn">
<el-radio label="" v-model="giftValue" v-if="!isGhPackage">自定义礼包</el-radio>
<el-radio label="" v-model="giftValue" v-else>自定义续保套餐</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 }}(成本:{{ item.totalEquityPrice || 0 }})</el-radio>
......@@ -28,6 +29,12 @@
<div class="tab-item" :class="{ active: goodsIndex == item.type }" v-for="(item, index) in goodsTabList" :key="index" @click="goodsIndex = item.type">{{ item.label }}</div>
<div class="tab-border" :style="{ left: (goodsIndex - 1) * 61 + 2 + 'px' }"></div>
</div>
<glsx-combi-form :isEdit="false" labelWidth="70px" class="p-16" style="padding-bottom: 0px;" ref="showSearch" :formObj="searchForm[goodsIndex - 1]" :formData="searchFormData">
<span slot="footer">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" @click="handleReset">重置</el-button>
</span>
</glsx-combi-form>
<div v-for="(item, index) in goodsTabList" :key="index">
<GLTable v-loading="loading" v-show="goodsIndex == item.type" :ref="'goodsRef' + item.type" :tableData="goodsList" :tableParams="goodsTableParams" @refreshTable="getGoodsList" @select="handleSelectionGoodsTable" @select-all="handleSelectionGoodsTableAll"></GLTable>
</div>
......@@ -104,6 +111,33 @@ export default {
giftList: 1,
activityPrice: ''
},
loading: false,
// 搜索
searchForm: [{}, {}],
searchFormData: [
{
label: '商品品牌',
name: 'brandName',
type: 'select',
maxlength: 30,
width: '155px',
placeholder: '请选择商品品牌',
optionList: [],
optionId: 'brandName',
optionLabel: 'brandName',
optionsName: 'brandName',
isClear: true
},
{
label: '商品名称',
name: 'goodsName',
type: 'input',
maxlength: 30,
width: '155px',
placeholder: '请输入商品名称',
isClear: true
}
],
totalPrice: 0,
giftName: '',
merchantId: this.$globalState.session.merchantId,
......@@ -209,10 +243,10 @@ export default {
validGh() {
if (this.activityInfo.ghExclusiveFlag != 2) return
this.isGhPackage = true
const carList = this.carList.map(item => item.packageCode)
const serviceList = this.serviceList.map(item => item.id)
if (this.currentIndex == 1) this.carTableParams.checkSelectVal = carList
if (this.currentIndex == 3) this.serviceTableParams.checkSelectVal = serviceList
// const carList = this.carList.map(item => item.packageCode)
// const serviceList = this.serviceList.map(item => item.id)
// if (this.currentIndex == 1) this.carTableParams.checkSelectVal = carList
// if (this.currentIndex == 3) this.serviceTableParams.checkSelectVal = serviceList
},
getGiftList(val) {
const { merchantId } = this
......@@ -243,6 +277,14 @@ export default {
this.$message.error('权益服务、平台优惠、门店优惠券至少选一项')
return
}
if (this.isGhPackage && selectedCarList.length == 0) {
this.$message.error('请选择1~2项用车权益')
return
}
if (this.isGhPackage && selectedCarList.length > 2) {
this.$message.error('最多只能选择2项用车权益')
return
}
this.totalPrice = 0
for (let i = 0; i < selectedCarList.length; i++) {
this.totalPrice = this.totalPrice + parseFloat(selectedCarList[i].packageAmount || 0)
......@@ -487,11 +529,20 @@ export default {
this.loading = false
})
},
handleSearch() {
this.$refs['goodsRef' + this.goodsIndex][0].page.pageNum = 1
this.getGoodsList()
},
handleReset() {
this.searchForm[this.goodsIndex - 1] = {}
this.handleSearch()
},
//生活权益
getGoodsList() {
console.log(this.$refs['goodsRef' + this.goodsIndex][0])
var params = {
...this.searchForm,
...this.searchForm[this.goodsIndex - 1],
appearance: this.goodsIndex,
status: 2,
pageNum: this.$refs['goodsRef' + this.goodsIndex][0].page.pageNum,
......@@ -533,7 +584,6 @@ export default {
},
getServiceList() {
var params = {
...this.searchForm,
status: 2,
discountType: this.serviceIndex,
merchantId: this.merchantId,
......@@ -582,6 +632,18 @@ export default {
handleClose() {
this.giftVisible = false
},
brandList(name) {
this.$apis.giftBag
.brandList({
pageNum: 1,
pageSize: 10000,
supplier: 'HW'
})
.then(res => {
const i = this.searchFormData.findIndex(item => item.optionsName == name)
this.searchFormData[i].optionList = res
})
},
tabClick(index) {
if ((index == 1 || index == 3) && this.activityInfo.ghExclusiveFlag == 2) {
this.$message.error('不可以修改用车权益/门店服务')
......@@ -590,6 +652,7 @@ export default {
}
},
mounted() {
this.brandList('brandName')
this.setProcess({
1: false
})
......
......@@ -74,7 +74,7 @@
<el-table-column label="操作" width="260">
<div class="config-panel flex" slot-scope="scope">
<div class="config-msg" v-if="scope.row.registerStatus === 0" @click="showRegister">邀请人员注册</div>
<div class="config-msg" @click="handleConfig(item.batchNo, scope)">配置话术 / 短信</div>
<div class="config-msg" @click="handleConfig(item.batchNo, scope)">{{ (scope.row.talkId ? '已' : '') + '配置话术 / 短信' }}</div>
</div>
</el-table-column>
</el-table>
......@@ -88,14 +88,16 @@
</div>
</div>
</div>
<div class="task-add" @click="addTask">
<i class="el-icon-circle-plus-outline"></i>
新建营销任务
</div>
<div class="task-footer">
<el-button @click="handleCancel" size="medium">跳过营销任务</el-button>
<el-button type="primary" @click="handleConfirm" size="medium">保存营销任务</el-button>
</div>
<template v-if="routerInfo.addOrEdit != 'edit'">
<div class="task-add" @click="addTask">
<i class="el-icon-circle-plus-outline"></i>
新建营销任务
</div>
<div class="task-footer">
<el-button @click="handleCancel" size="medium">跳过营销任务</el-button>
<el-button type="primary" @click="handleConfirm" size="medium">保存营销任务</el-button>
</div>
</template>
<GLDialog class="qr-dialog" title="邀请人员注册" mode="mid" :hasFooter="false" :visible.sync="isQrcodeVisible" @onCancel="isQrcodeVisible = false">
<div class="qrcode-body">
<div class="qrcode-link">邀请跟进人注册链接</div>
......@@ -128,7 +130,9 @@
<script>
const taskData = { tableData: [], expand: true, assignType: 0, customerNumTotal: 0, lastFollowStaffList: [], staffList: [], excelUrl: '', isFinish: false }
import { mapActions, mapState, mapMutations } from 'vuex'
import marketing from '@/mixins/marketing'
export default {
mixins: [marketing],
data() {
return {
taskList: [{ batchNo: 1, ...taskData }],
......@@ -323,7 +327,7 @@ export default {
handleCancelConfirm() {
this.configVisible = false
console.log(this.taskList[this.batchNo].tableData)
this.taskList[this.batchNo].tableData[this.selectIndex].talkId = this.configForm.talkId
this.$set(this.taskList[this.batchNo].tableData[this.selectIndex], 'talkId', this.configForm.talkId)
this.taskList[this.batchNo].tableData[this.selectIndex].messageContent = this.configForm.messageContent
console.log(this.taskList)
},
......@@ -359,7 +363,12 @@ export default {
merchantId: i.merchantNo,
staffPhone: i.staffPhone,
staffName: i.staffName,
messageContent: i.messageContent ? i.messageContent.replace(/^【\S+?】/, `【${this.$globalState.session.merchantName}】`) : '',
messageContent: i.messageContent
? i.messageContent
.replace(/^【\S+?】/, `【${this.$globalState.session.merchantName}】`)
.replace(/(【|#)活动名称(】|#)/, '{0}')
.replace(/(【|#)活动链接(】|#)/, '{1}')
: '',
registerStatus: i.registerStatus,
talkId: i.talkId,
createdBy: i.createdBy
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-26 13:38:34
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-08-04 16:40:50
* @FilePath: \scrm-micro-link\src\views\activityLink\marketingActivity.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="marketing-container">
<div class="marketing-content">
......@@ -8,6 +16,18 @@
<div class="marketing-view">
<process></process>
</div>
<div class="full-wrap" v-if="isGuide">
<div :class="['full-wrap-body', `background-${step}`]">
<img class="full-body-bg" :src="`https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/guide-${step}.png?v=1.0`" />
<div class="full-footer">
<el-checkbox v-model="checked" class="select-tips">下次不在弹出引导提示</el-checkbox>
<div class="operate-tip">
<el-button :size="size" @click="closeGuide">关闭提示</el-button>
<el-button :size="size" @click="addGuide" v-if="step != 3">下一步</el-button>
</div>
</div>
</div>
</div>
</div>
</template>
......@@ -24,9 +44,21 @@ export default {
marketing,
process
},
data() {
return {
isGuide: true,
step: 1
}
},
methods: {
...mapMutations('marketing', ['SET_STATUS']),
...mapActions('marketing', ['getMerchantInfo'])
...mapActions('marketing', ['getMerchantInfo']),
closeGuide() {
this.isGuide = false
},
addGuide() {
this.step++
}
},
mounted() {
this.getMerchantInfo({ merchantId: this.$globalState.session.merchantId })
......@@ -46,4 +78,85 @@ export default {
width: 303px;
}
}
.full-wrap {
position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background: rgba($color: #000000, $alpha: 0.5);
z-index: 999;
.full-wrap-body {
position: absolute;
top: 48px;
left: 230px;
width: calc(100% - 230px);
height: calc(100% - 48px);
background: rgb(119, 120, 123);
.full-body-bg {
position: absolute;
top: 0px;
left: 0px;
height: 100%;
background-size: 100% 100%;
}
.full-footer {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 30px;
.select-tips {
color: #fff;
margin-bottom: 4px;
}
.operate-tip {
text-align: center;
}
}
}
}
// @media screen and (max-width: 1366px) {
// .background-1 {
// background: url('https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/g1-1366.png');
// }
// .background-2 {
// background: url('https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/g2-1366.png');
// }
// .background-3 {
// background: url('https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/g3-1366.png');
// }
// }
// @media screen and (min-width: 1400px) {
// .background-1 {
// background: url('https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/g1-1400.png');
// }
// .background-2 {
// background: url('https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/g2-1400.png');
// }
// .background-3 {
// background: url('https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/g3-1400.png');
// }
// }
// @media screen and (min-width: 1600px) {
// .background-1 {
// background: url('https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/g1-1600.png');
// }
// .background-2 {
// background: url('https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/g2-1600.png');
// }
// .background-3 {
// background: url('https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/g3-1600.png');
// }
// }
// @media screen and (min-width: 1920px) {
// // .background-1 {
// // background: url('https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/g1-1366.png');
// // }
// // .background-2 {
// // background: url('https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/g2-1366.png');
// // }
// // .background-3 {
// // background: url('https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/g3-1366.png');
// // }
// }
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!