Commit f838d605 by 前端

Merge branch 'v3.7.0' into 'master'

V3.7.0

See merge request !4
2 parents 49b6d5af a9bfe82b
...@@ -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-03-14 14:08:40 * @LastEditTime: 2023-03-22 11:29:49
* @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
*/ */
...@@ -35,5 +35,23 @@ const brandList = params => { ...@@ -35,5 +35,23 @@ const brandList = params => {
sign: true sign: true
}) })
} }
const couponTemplate = params => {
params.method = 'scrm.api.coupon.template.page'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
const couponTemplateDetails = params => {
params.method = 'scrm.api.coupon.template.details.page'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getghDirectionalGiftListApi, getEquityListApi, brandList } export default { getghDirectionalGiftListApi, getEquityListApi, brandList, couponTemplate, couponTemplateDetails }
...@@ -252,14 +252,24 @@ const subscribe = [ ...@@ -252,14 +252,24 @@ const subscribe = [
optionLabel: '定保招揽' optionLabel: '定保招揽'
}, },
{ {
optionId: 4, optionId: 5,
optionLabel: '家庭会员卡' optionLabel: '续保招揽'
},
{
optionId: 6,
optionLabel: '节假日关怀'
}, },
{ {
optionId: 3, optionId: 3,
optionLabel: '其他' optionLabel: '其他'
} }
] ]
const giftPackage = [
{ id: 1, name: '换(焕新礼)' },
{ id: 2, name: '减(折扣礼)' },
{ id: 3, name: '送(券包礼)' },
{ id: 4, name: '约(膨胀礼)' }
]
function setMinHeight(calssName = '.edit-container') { function setMinHeight(calssName = '.edit-container') {
let height = document.querySelector('.header-wrap').clientHeight + 110 + 'px' let height = document.querySelector('.header-wrap').clientHeight + 110 + 'px'
let minHeight = 'calc(100vh - ' + height + ')' let minHeight = 'calc(100vh - ' + height + ')'
...@@ -281,4 +291,4 @@ function isShowBtn(value) { ...@@ -281,4 +291,4 @@ function isShowBtn(value) {
} }
return isShowStatus return isShowStatus
} }
export { isShowBtn, subscribe, limitPrice, getExplorer, exportFn, aToExport, downloadIamge, businessType, orderStatus, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList, setMinHeight } export { isShowBtn, subscribe, giftPackage, limitPrice, getExplorer, exportFn, aToExport, downloadIamge, businessType, orderStatus, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList, setMinHeight }
...@@ -6,7 +6,11 @@ ...@@ -6,7 +6,11 @@
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '154px' : labelWidth" :class="[{ 'no-label': !item.label, isBlock: isBlock }, { textBox: item.type == 'textBox' }]" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name"> <el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '154px' : labelWidth" :class="[{ 'no-label': !item.label, isBlock: isBlock }, { textBox: item.type == 'textBox' }]" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label"> <span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span> <span class="tips-label">{{ item.label }}</span>
<el-popover placement="top" width="200" trigger="hover" :content="item.tips"> <el-popover placement="top" :width="item.tipsWidth || 200" trigger="hover">
<div>
{{ item.tips }}
<span class="tips-jump" v-if="item.jumpLabel" @click="item.handleJump">{{ item.jumpLabel }}</span>
</div>
<img slot="reference" class="tips-icon" src="./images/icon-tip.png" /> <img slot="reference" class="tips-icon" src="./images/icon-tip.png" />
</el-popover> </el-popover>
: :
...@@ -522,4 +526,8 @@ export default { ...@@ -522,4 +526,8 @@ export default {
width: 62%; width: 62%;
/* background: #096; */ /* background: #096; */
} }
.tips-jump {
color: #5850ff;
cursor: pointer;
}
</style> </style>
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* @version: * @version:
* @Author: limin * @Author: limin
* @Date: 2021-06-07 14:12:32 * @Date: 2021-06-07 14:12:32
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2023-03-02 17:28:20 * @LastEditTime: 2023-03-24 14:35:10
*/ */
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js') // let request = require('@/http/request.js')
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* @version: 1.0.0 * @version: 1.0.0
* @Author: limin * @Author: limin
* @Date: 2021-08-13 14:12:11 * @Date: 2021-08-13 14:12:11
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2023-03-10 18:08:50 * @LastEditTime: 2023-03-24 17:46:01
* @FilePath: \scrm\scrm-sub-blog\src\main.js * @FilePath: \scrm\scrm-sub-blog\src\main.js
*/ */
import Vue from 'vue' import Vue from 'vue'
...@@ -18,6 +18,7 @@ Vue.config.productionTip = false ...@@ -18,6 +18,7 @@ Vue.config.productionTip = false
Vue.prototype.$apis = apis Vue.prototype.$apis = apis
Vue.prototype.size = 'small' Vue.prototype.size = 'small'
Vue.prototype.defaultLabelWidth = '154px' Vue.prototype.defaultLabelWidth = '154px'
Vue.prototype.staticImgUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/'
try { try {
const loginpath = JSON.parse(sessionStorage.getItem('SCRM_BASE_SESSION'))?.loginpath const loginpath = JSON.parse(sessionStorage.getItem('SCRM_BASE_SESSION'))?.loginpath
if (loginpath === '/oss') Vue.prototype.loginpath = true if (loginpath === '/oss') Vue.prototype.loginpath = true
......
/* /*
* @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: 前端 qianduan01@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-12-23 15:17:06 * @LastEditTime: 2023-03-23 16:54:09
* @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
*/ */
...@@ -27,7 +27,7 @@ export async function bootstrap({ history, common, messenger, globalState }) { ...@@ -27,7 +27,7 @@ export async function bootstrap({ history, common, messenger, globalState }) {
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$message = message Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token:globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-23 11:06:49 * @Date: 2022-11-23 11:06:49
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-12-01 10:06:04 * @LastEditTime: 2023-03-16 14:46:00
* @FilePath: \live\src\utils\index.js * @FilePath: \live\src\utils\index.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
*/ */
...@@ -56,3 +56,18 @@ export function GetDateDiff(time1, time2 = new Date()) { ...@@ -56,3 +56,18 @@ export function GetDateDiff(time1, time2 = new Date()) {
let seconds = Math.round(leave3 / 1000) let seconds = Math.round(leave3 / 1000)
return days + '天' + hours + '时' + minutes + '分' + seconds + '秒' return days + '天' + hours + '时' + minutes + '分' + seconds + '秒'
} }
export function deepClone(obj) {
let result = typeof obj.splice === 'function' ? [] : {}
if (obj && typeof obj === 'object') {
for (let key in obj) {
if (obj[key] && typeof obj[key] === 'object') {
result[key] = deepClone(obj[key]) //如果对象的属性值为object的时候,递归调用deepClone,即在吧某个值对象复制一份到新的对象的对应值中。
} else {
result[key] = obj[key] //如果对象的属性值不为object的时候,直接复制参数对象的每一个键值到新的对象对应的键值对中。
}
}
return result
}
return obj
}
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-03-17 20:41:39
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-03-17 20:53:33
* @FilePath: \scrm-micro-link\src\views\activityLink\components\header-config.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="activity-guidance scrm-box-f">
<div class="activity-guidance-border" v-for="(item, index) in guidanceList" :key="item.content">
<div class="activity-guidance-item">
<div class="activity-guidance-item-head">
<img :src="require(`@/assets/seckillActivity/${item.img}.png`)" />
<div class="activity-guidance-item-title">{{ item.title }}</div>
</div>
<div class="activity-guidance-item-info">{{ item.content }}</div>
</div>
<div class="ai-arrow" v-if="index < 2">
<img src="@/assets/seckillActivity/arrow.png" />
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
guidanceList: [
{
img: 'play',
title: '选玩法',
content: '系统提供“换-减-送-约”四种核心营销链路,门店可根据业务需要按需选择。'
},
{
img: 'product',
title: '定产品',
content: '选择本次营销活动中要销售的门店服务或商品。平台所提供的多项权益服务可帮助门店打造差异化服务。'
},
{
img: 'fill',
title: '配物料',
content: '通过系统内置模版可快速构建美观充满氛围感的营销页面,店端也可根据需要自行上传物料进行个性化设置。'
}
]
}
}
}
</script>
<style lang="scss" scoped>
.activity-guidance {
background: #fff;
display: flex;
padding: 20px;
box-sizing: border-box;
margin: 16px 0px;
.activity-guidance-border {
display: flex;
align-items: center;
}
.activity-guidance-item {
flex: 1;
height: 112px;
background: linear-gradient(180deg, #f3f2f8 0%, #f9f9fc 100%);
padding: 16px 20px;
box-sizing: border-box;
&-head {
display: flex;
align-items: center;
margin-bottom: 8px;
img {
width: 22px;
height: 22px;
margin-right: 10px;
}
}
&-title {
font-size: 16px;
font-weight: 600;
color: #333333;
line-height: 22px;
}
&-info {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
}
.ai-arrow {
margin: 0 16px;
width: 20px;
height: 15px;
img {
width: 100%;
}
}
}
</style>
...@@ -224,6 +224,7 @@ export default { ...@@ -224,6 +224,7 @@ export default {
getList(page, isResetPage = false, isMount = false) { getList(page, isResetPage = false, isMount = false) {
var params = { var params = {
...this.searchForm, ...this.searchForm,
status: 2,
discountType: this.selectedGiftList[this.activeName].discountType, discountType: this.selectedGiftList[this.activeName].discountType,
merchantId: this.merchantId, merchantId: this.merchantId,
pageNum: isResetPage ? 1 : this.$refs[this.activeName + 'Ref'].page.pageNum, pageNum: isResetPage ? 1 : this.$refs[this.activeName + 'Ref'].page.pageNum,
...@@ -295,7 +296,7 @@ export default { ...@@ -295,7 +296,7 @@ export default {
if (list && list.length) { if (list && list.length) {
list.forEach(row => { list.forEach(row => {
var idx = this.giftList.findIndex(k => k.id == row.id) var idx = this.giftList.findIndex(k => k.id == row.id)
if (idx != -1 && row.status != '3') { if (idx != -1) {
this.$refs[this.activeName + 'Ref'].$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.giftList[idx], true) this.$refs[this.activeName + 'Ref'].$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.giftList[idx], true)
} }
}) })
...@@ -322,7 +323,7 @@ export default { ...@@ -322,7 +323,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
deleteList.forEach(row => { deleteList.forEach(row => {
var idx = this.giftList.findIndex(k => k.id == row.id) var idx = this.giftList.findIndex(k => k.id == row.id)
if (idx != -1 && row.status != '3') { if (idx != -1) {
this.$refs[this.activeName + 'Ref'].$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.giftList[idx], false) this.$refs[this.activeName + 'Ref'].$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.giftList[idx], false)
} }
}) })
...@@ -366,15 +367,13 @@ export default { ...@@ -366,15 +367,13 @@ export default {
couponName: item.couponName, couponName: item.couponName,
couponAmount: isSelected ? list.find(k => k.id == item.id).couponAmount : '1', couponAmount: isSelected ? list.find(k => k.id == item.id).couponAmount : '1',
couponAnticipatedCost: item.couponAnticipatedCost, couponAnticipatedCost: item.couponAnticipatedCost,
status: '2', status: item.status,
residueAmount: item.residueAmount residueAmount: item.residueAmount
}) })
} }
}) })
list.forEach(item => { list.forEach(item => {
if (item.status == '3') { if (this.giftList.findIndex(k => k.id == item.id) == '-1' && this.selectedGiftList[this.activeName].list.findIndex(k => k.id == item.id) == '-1') {
this.selectedGiftList[this.activeName].list.push(item)
} else if (this.giftList.findIndex(k => k.id == item.id) == '-1' && this.selectedGiftList[this.activeName].list.findIndex(k => k.id == item.id) == '-1') {
// 没有库存的券 // 没有库存的券
this.selectedGiftList[this.activeName].list.push(item) this.selectedGiftList[this.activeName].list.push(item)
} }
......
...@@ -47,8 +47,7 @@ ...@@ -47,8 +47,7 @@
<img class="muti-icon" :src="require(`@/assets/coupon/${item}.png`)" /> <img class="muti-icon" :src="require(`@/assets/coupon/${item}.png`)" />
</div> </div>
<div class="gift-content"> <div class="gift-content">
<template v-for="(subItem, subIndex) in selectedList[item].list"> <div class="gift-item" :key="subItem.id" v-for="(subItem, subIndex) in selectedList[item].list">
<div class="gift-item" :key="subItem.id">
<img class="muti-icon" src="@/assets/muti-selected.png" @click="handleGoodsDelete(item, subIndex)" /> <img class="muti-icon" src="@/assets/muti-selected.png" @click="handleGoodsDelete(item, subIndex)" />
<el-tooltip effect="dark" placement="top" :disabled="couponString(subItem).length <= 8"> <el-tooltip effect="dark" placement="top" :disabled="couponString(subItem).length <= 8">
<p :class="['gift-coupon-name', 'ellipsis-1']">{{ couponString(subItem) > 8 ? couponString(subItem).slice(0, 8) + '...' : couponString(subItem) }}</p> <p :class="['gift-coupon-name', 'ellipsis-1']">{{ couponString(subItem) > 8 ? couponString(subItem).slice(0, 8) + '...' : couponString(subItem) }}</p>
...@@ -58,7 +57,6 @@ ...@@ -58,7 +57,6 @@
<el-input-number class="sum-input" v-model="subItem.couponAmount" :min="1" :max="9999" size="mini" label="描述文字"></el-input-number> <el-input-number class="sum-input" v-model="subItem.couponAmount" :min="1" :max="9999" size="mini" label="描述文字"></el-input-number>
</div> </div>
</div> </div>
</template>
</div> </div>
</div> </div>
</div> </div>
...@@ -336,8 +334,10 @@ export default { ...@@ -336,8 +334,10 @@ export default {
// }, // },
// 选择/取消 // 选择/取消
handleSelectionTable(val) { handleSelectionTable(val) {
console.log(val)
const selectedList = this.initSelected ? this.initSelected[this.activeName].list : this.selectedList[this.activeName].list const selectedList = this.initSelected ? this.initSelected[this.activeName].list : this.selectedList[this.activeName].list
var list = this.$common.utils.deepClone(selectedList) var list = this.$common.utils.deepClone(selectedList)
// const val = this.getSelectionTable(list, valp)
var count = 0 var count = 0
var currentIdList = this.GoodsList.map(item => item.id) var currentIdList = this.GoodsList.map(item => item.id)
val val
...@@ -363,11 +363,11 @@ export default { ...@@ -363,11 +363,11 @@ export default {
goodsName: item.goodsName, goodsName: item.goodsName,
denomination: item.denomination, denomination: item.denomination,
effectiveDays: item.effectiveDays, effectiveDays: item.effectiveDays,
rechargeDenomination: item.rechargeDenomination rechargeDenomination: item.rechargeDenomination,
status: item.status
}) })
} }
}) })
console.log(this.selectedList[this.activeName].list)
this.recoveryTotal() this.recoveryTotal()
}, },
handleGoodsConfirm() { handleGoodsConfirm() {
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-03-18 18:47:05
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2023-03-24 14:41:59
* @FilePath: \scrm-micro-link\src\views\activityLink\components\selectModel.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%A
-->
<template>
<div class="select-model">
<GLDialog title="选择模板" width="1080px" :visible.sync="dialogVisible" :before-close="handleClose" :close-on-click-modal="false" @onOk="handleConfirm" @onCancel="handleClose">
<div class="model-panel">
<div class="model-item" v-for="item in modelList" :key="item.value">
<img :src="item.imgUrl" alt="" />
<img src="@/assets/seckillActivity/check.png" v-if="modelValue == item.value" class="checked" />
<div class="model-title">{{ item.name }}</div>
</div>
</div>
</GLDialog>
</div>
</template>
<script>
export default {
name: 'selectModel',
data() {
return {
modelList: [
{
value: 1,
name: '节假日关怀',
imgUrl: 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/activity-1.png'
},
{
value: 2,
name: '定保招揽',
imgUrl: 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/activity-2.png'
},
{
value: 3,
name: '续保招揽',
imgUrl: 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/activity-3.png'
}
]
}
},
props: {
dialogVisible: {
type: Boolean,
default: false
},
modelValue: {
type: Number,
default: 1
}
},
mounted() {
this.modelList = this.modelList.filter(k => k.value == this.modelValue)
},
methods: {
handleConfirm() {
this.$emit('handleRelateModelConfirm', this.modelValue)
},
handleClose() {
this.$emit('handleRelateModelClose')
}
}
}
</script>
<style lang="scss" scoped>
.model-panel {
display: flex;
.model-item {
position: relative;
margin-right: 24px;
img:not(.checked) {
width: 242px;
height: 492px;
}
.checked {
position: absolute;
top: 4px;
right: 4px;
}
.model-title {
font-size: 16px;
color: #1c2b38;
text-align: center;
font-weight: 700;
margin: 6px 0px;
}
}
}
</style>
...@@ -162,6 +162,14 @@ export default { ...@@ -162,6 +162,14 @@ export default {
prop: 'orderCount' prop: 'orderCount'
}, },
{ {
label: '客户回店核销次数',
prop: 'checkNum'
},
{
label: '核销激励',
prop: 'checkReward'
},
{
label: '转化率', label: '转化率',
prop: 'conversionRate', prop: 'conversionRate',
formatter: cellValue => { formatter: cellValue => {
......
<!-- 众筹活动 --> <!-- 众筹活动 -->
<template> <template>
<div v-loading="loading" class="edit-activity"> <div v-loading="loading" class="edit-activity">
<header-config></header-config>
<div class="link-main edit-box"> <div class="link-main edit-box">
<!-- 基本信息 --> <!-- 基本信息 -->
<div class="container edit-container" style="min-height: 520px !important"> <div class="container edit-container" style="min-height: 520px !important" v-show="step == 1">
<p class="edit-title" id="basic">基本信息</p> <p class="edit-title" id="basic">选玩法·营销玩法配置(换-减-送-约)</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="markingEditFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="markingEditFormData" :formRules="editRule">
<div slot="merchantHtml"> <div slot="merchantHtml">
<el-button type="default" class="el-icon-plus" v-if="!isDisabled" @click="handleRelateStoreClose">选择门店</el-button> <el-button type="default" class="el-icon-plus" v-if="!isDisabled" @click="handleRelateStoreClose">选择门店</el-button>
<div class="merchantNameLabel" v-if="editForm.merchantName"> <div class="merchantNameLabel" v-if="editForm.merchantName">
...@@ -13,18 +14,36 @@ ...@@ -13,18 +14,36 @@
<div class="merchantName ellipsis-1">{{ editForm.merchantName }}</div> <div class="merchantName ellipsis-1">{{ editForm.merchantName }}</div>
</div> </div>
</div> </div>
<div slot="activityImg" class="edit-tips m-t-8">展示在首页的活动详情页</div> <div class="play-panel" slot="play">
<template slot="activityTimeHtml" slot-scope="scope"> <div class="choseRow">
<div class="activity-time-container" :style="{ 'margin-left': defaultLabelWidth }"> <div :class="{ choseItem: true, active: editForm.playingType == item.id }" @click="editForm.playingType = item.id" v-for="item in giftPackage" :key="item.id">{{ item.name }}</div>
<label>
<span style="color: #f56c6c; margin-right: 6px">*</span>
<span class="combi-form-label">链接时间:</span>
</label>
<el-date-picker v-model="editForm.activityTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']" @change="e => handleTimeChange(e, scope.scope)"></el-date-picker>
</div> </div>
</template> <div class="chose-panel">
<el-button slot="selectGiftBtn" type="default" class="el-icon-plus" @click="handleGiftAdd">选择服务</el-button> <glsx-combi-form v-if="editForm.playingType == 2 || editForm.playingType == 3" class="edit-form-container" ref="palyEditFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="palyEditFormData" :formRules="editRule">
<div slot="couponListBlock" style="width: 700px" :style="{ 'margin-left': defaultLabelWidth }" v-show="editForm.couponList && editForm.couponList.length != 0"> <div slot="image">
<img src="@/assets/coupon/discount.png" v-if="editForm.playingType == 2" width="360px" />
<img src="@/assets/coupon/package.png" v-if="editForm.playingType == 3" width="360px" />
</div>
</glsx-combi-form>
<div class="waiting-box" v-else>
<img src="@/assets/coupon/waiting.png" />
</div>
</div>
</div>
</glsx-combi-form>
</div>
<div class="container edit-container" style="min-height: 520px !important" v-show="step == 2">
<p class="edit-title" id="product">定产品</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="projuctEditFormData" :formRules="editRule">
<div slot="selectGiftBtn">
<el-button type="default" class="el-icon-plus" @click="handleGiftAdd">选择服务</el-button>
<el-popover placement="top-start" width="500" trigger="hover">
<img src="@/assets/coupon/coupon-view.png" alt="" />
<el-button slot="reference" type="text" v-if="editForm.couponList.length == 0">预览</el-button>
</el-popover>
</div>
<div class="gift-panel" slot="couponListBlock" style="width: 700px" :style="{ 'margin-left': defaultLabelWidth }" v-show="editForm.couponList && editForm.couponList.length != 0">
<div class="gift-block"> <div class="gift-block">
<div class="gift-title"> <div class="gift-title">
预估成本: 预估成本:
...@@ -46,23 +65,37 @@ ...@@ -46,23 +65,37 @@
</div> </div>
</div> </div>
</div> </div>
<div class="gift-input">
<label>核销激励/元:</label>
<el-input type="text" placeholder="请输入" v-model="editForm.verificationEncourage"></el-input>
</div>
<div class="gift-tips">员工推荐客户购买后,客户回店每次核销服务,将按对应的核销次数激励记录到该员工</div>
</div> </div>
<template slot="selectGoodsBtn"> <div slot="selectGoodsBtn">
<el-button type="default" class="el-icon-plus" @click="handleGoodsAdd">选择福利券</el-button> <div class="play-panel">
</template> <div class="card-panel">
<div slot="goodsListBlock" style="width: 792px" :style="{ 'margin-left': defaultLabelWidth }" v-if="selectedGoodsList && selectedGoodsList.length"> <el-tabs type="card" v-model="editForm.couponTemplateId" @tab-click="changeCouponTemplate">
<el-tab-pane :label="item.name" :name="item.id" v-for="item in couponTemplateList" :key="item.id"></el-tab-pane>
</el-tabs>
<div class="chose-panel" v-loading="goodsLoading">
<el-button type="default" class="el-icon-plus select-btn" @click="handleGoodsAdd">选择福利券</el-button>
<div style="width: 852px" v-if="selectedGoodsList && selectedGoodsList.length">
<div class="goods-panel"> <div class="goods-panel">
<el-table :data="selectedGoodsList" border style="width: 100%"> <el-table :data="selectedGoodsList" border style="width: 100%">
<el-table-column type="index" label="序号" width="70"></el-table-column> <el-table-column type="index" label="序号" width="70"></el-table-column>
<el-table-column prop="brandName" label="品牌" width="120"></el-table-column> <el-table-column prop="brandName" label="品牌" width="140"></el-table-column>
<el-table-column prop="goodsName" label="商户名称" width="160"></el-table-column> <el-table-column prop="goodsName" label="商户名称" width="170"></el-table-column>
<el-table-column prop="couponAmount" label="数量" width="80"></el-table-column> <el-table-column prop="couponAmount" label="数量" width="70"></el-table-column>
<el-table-column prop="denomination" label="劵面额" width="140"> <el-table-column prop="denomination" label="劵面额" width="110">
<template slot-scope="scope">{{ (scope.row.denomination / 100).toFixed(2) }}元</template> <template slot-scope="scope">{{ (scope.row.denomination / 100).toFixed(2) }}元</template>
</el-table-column> </el-table-column>
<el-table-column prop="effectiveDays" label="有效期" width="120"> <el-table-column prop="effectiveDays" label="有效期" width="110">
<template slot-scope="scope">{{ scope.row.effectiveDays }}天</template> <template slot-scope="scope">{{ scope.row.effectiveDays }}天</template>
</el-table-column> </el-table-column>
<el-table-column prop="status" label="状态" width="80">
<template slot-scope="scope">{{ scope.row.status == 1 ? '未生效' : scope.row.status == 2 ? '生效中' : scope.row.status == 3 ? '已失效' : '' }}</template>
</el-table-column>
<el-table-column label="操作" width="100"> <el-table-column label="操作" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="handleDeleteGoods(scope.row)" type="text" size="small">删除</el-button> <el-button @click="handleDeleteGoods(scope.row)" type="text" size="small">删除</el-button>
...@@ -71,54 +104,39 @@ ...@@ -71,54 +104,39 @@
</el-table> </el-table>
</div> </div>
</div> </div>
<!-- <div slot="specificationsHtml" v-if="specificationDetailList.length" class="flex" style="min-width: 600px" id="specificationDetailList">
<div style="width: calc(100%)">
<table class="table-spesc" style="width: calc(100%)">
<tbody>
<tr>
<td :style="{ width: specsWidth }" v-for="(subItem, subIndex) in specificationDetailList" :key="subIndex">{{ subItem.specificationName }}</td>
<td :style="{ width: specsWidth }">零售价(元)</td>
<td :style="{ width: specsWidth }">库存</td>
<td :style="{ width: specsWidth }">设置秒杀价</td>
<td :style="{ width: specsWidth }">活动库存</td>
</tr>
</tbody>
</table>
<table class="table-spesc" style="max-height: 400px">
<tbody>
<tr style="border-bottom: 1px solid rgb(235, 235, 235)" v-for="(item, index) in nameToValSpecsList" :key="index">
<td :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 }">
<el-input :disabled="isDisabled" placeholder="秒杀价" style="width: 90%" v-model="item.activityPrice" @input="item.activityPrice = activityPrice_input($event, item.retailPrice)"></el-input>
</td>
<td :style="{ width: specsWidth }">
<el-input :disabled="isDisabled" placeholder="活动库存" style="width: 90%" v-model="item.goodsStock" @input="item.goodsStock = goodsStock_input($event, item.stock)"></el-input>
</td>
</tr>
</tbody>
</table>
</div> </div>
</div> --> </div>
<!-- <template slot="limitPurchaseFlag" slot-scope="scope"> </div>
<el-radio-group v-model="editForm[scope.scope.name]" @change="handleIsLimit"> </div>
<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>
</el-radio-group>
<p v-if="editForm[scope.scope.name] == 2" id="limitPurchaseNumber" style="color: #333333;">
每人限购
<el-form-item prop="limitPurchaseNumber">
<el-input v-model="editForm.limitPurchaseNumber" placeholder="请输入限购次数" :disabled="isDisabled"></el-input>
</el-form-item>
件
</p>
</template> -->
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<!-- 活动配置 --> <!-- 活动配置 -->
<div class="container edit-container crowd-config"> <div class="container edit-container crowd-config" v-show="step == 3">
<p class="edit-title" id="config">活动配置</p> <p class="edit-title" id="config">配物料</p>
<div class="config-right" v-if="editForm.subscribe == 2 || editForm.subscribe == 5 || editForm.subscribe == 6">
<div class="config-right-box">
<div class="config-box-title">{{ editForm.activityName }}</div>
<img class="config-box-bg" :src="activityModelImg" v-if="activityModelImg" />
<img src="@/assets/activity-box.png" />
</div>
</div>
<glsx-combi-form class="edit-form-container" ref="configEditFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="configEditFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="configEditFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="configEditFormData" :formRules="editRule">
<template slot="selectGoodsBtn">
<el-button type="default" class="el-icon-plus" @click="handleRelateModelClose">选择样式</el-button>
<div class="style-panel" v-if="activityModelImg">
<img :src="activityModelImg" />
</div>
</template>
<div slot="activityImg" class="edit-tips m-t-8">展示在首页的活动详情页</div>
<template slot="activityTimeHtml" slot-scope="scope">
<div class="activity-time-container" :style="{ 'margin-left': defaultLabelWidth }">
<label>
<span style="color: #f56c6c; margin-right: 6px">*</span>
<span class="combi-form-label">链接时间:</span>
</label>
<el-date-picker v-model="editForm.activityTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']" @change="e => handleTimeChange(e, scope.scope)"></el-date-picker>
</div>
</template>
<template slot="customerServiceFlag" slot-scope="scope"> <template slot="customerServiceFlag" slot-scope="scope">
<el-radio-group v-model="editForm[scope.scope.name]"> <el-radio-group v-model="editForm[scope.scope.name]">
<el-radio v-for="(item, index) in scope.scope.optionList" :key="index" :label="item[scope.scope.optionId]">{{ item[scope.scope.optionLabel] }}</el-radio> <el-radio v-for="(item, index) in scope.scope.optionList" :key="index" :label="item[scope.scope.optionId]">{{ item[scope.scope.optionLabel] }}</el-radio>
...@@ -323,8 +341,9 @@ ...@@ -323,8 +341,9 @@
</div> </div>
<GLFooter> <GLFooter>
<el-button @click="handleCancel" size="medium">{{ routeInfo.addOrEdit != 'detail' ? '取消' : '返回' }}</el-button> <el-button @click="handleCancel" size="medium">{{ routeInfo.addOrEdit != 'detail' ? '取消' : '返回' }}</el-button>
<el-button @click="handleWechat" size="medium">预览</el-button> <el-button @click="handlePrev" plain size="medium" v-if="step != 1">上一步</el-button>
<el-button v-if="routeInfo.addOrEdit != 'detail'" type="primary" @click="handleConfirm" size="medium" :loading="loading">提交</el-button> <el-button @click="handleNext" size="medium" type="primary" v-if="step != 3">下一步</el-button>
<el-button v-if="routeInfo.addOrEdit != 'detail' && step == 3" type="primary" @click="handleConfirm" size="medium" :loading="loading">提交</el-button>
</GLFooter> </GLFooter>
<!-- 展示 --> <!-- 展示 -->
<GLDialog bigTitle="预览" mode="big" :visible.sync="wechatVisible" @onOk="handleWechat" @onCancel="handleWechat"> <GLDialog bigTitle="预览" mode="big" :visible.sync="wechatVisible" @onOk="handleWechat" @onCancel="handleWechat">
...@@ -332,46 +351,20 @@ ...@@ -332,46 +351,20 @@
</GLDialog> </GLDialog>
<select-gift-dialog :merchantId="editForm.merchantId" v-if="isSelectGiftVisible" :isSelectGiftVisible="isSelectGiftVisible" :selectedGiftList="selectedMealList" @handleGiftConfirm="handleGiftConfirm" @handleGiftClose="handleGiftClose"></select-gift-dialog> <select-gift-dialog :merchantId="editForm.merchantId" v-if="isSelectGiftVisible" :isSelectGiftVisible="isSelectGiftVisible" :selectedGiftList="selectedMealList" @handleGiftConfirm="handleGiftConfirm" @handleGiftClose="handleGiftClose"></select-gift-dialog>
<select-goods-dialog v-if="isSelectGoodsVisible" :isSelectGoodsVisible="isSelectGoodsVisible" :selectedGoodsLists="selectedGoodsList" @handleGoodsConfirm="handleGoodsConfirm" @handleGoodsClose="handleGoodsClose"></select-goods-dialog> <select-goods-dialog v-if="isSelectGoodsVisible" :isSelectGoodsVisible="isSelectGoodsVisible" :selectedGoodsLists="selectedGoodsList" @handleGoodsConfirm="handleGoodsConfirm" @handleGoodsClose="handleGoodsClose"></select-goods-dialog>
<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> <select-store v-if="relateStoreVisible" ref="relateStore" :dialogVisible="relateStoreVisible" :storeSelected="selectedList" :merchantInfo="editForm.merchantId" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose"></select-store>
<!-- :storeSelected="selectedList" --> <select-model v-if="relateModelVisible" :dialogVisible="relateModelVisible" :modelValue="editForm.pageStyle" @handleRelateModelConfirm="handleRelateModelConfirm" @handleRelateModelClose="handleRelateModelClose"></select-model>
<select-store v-if="relateStoreVisible" ref="relateStore" :dialogVisible="relateStoreVisible" :storeSelected="selectedList" :merchantInfo="editForm.merchantId" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose">
<!-- <el-row slot>
<el-form :model="storeSearchForm"
ref="relate"
:inline="true"
label-width="90px">
<el-form-item label="商户ID:"
prop="merchantId">
<el-input :size="size"
v-model.trim="storeSearchForm.merchantId"
placeholder="请输入商户ID"
clearable></el-input>
</el-form-item>
<el-form-item label="门店名称:"
prop="merchantName">
<el-input :size="size"
v-model.trim="storeSearchForm.merchantName"
placeholder="请输入门店名称"
clearable></el-input>
</el-form-item>
<el-form-item>
<el-button :size="size"
type="primary"
@click="handleSearchStore">搜索</el-button>
</el-form-item>
</el-form>
</el-row> -->
</select-store>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { limitPrice, businessType } from '@/common/constant' import { limitPrice, giftPackage } from '@/common/constant'
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
import crowdEditWechat from './crowdEditWechat.vue' import crowdEditWechat from './crowdEditWechat.vue'
import selectStore from './components/selectStore' import selectStore from './components/selectStore'
import selectGiftDialog from './components/selectGiftDialog.vue' import selectGiftDialog from './components/selectGiftDialog.vue'
import selectGoodsDialog from './components/selectGoodsDialog.vue' import selectGoodsDialog from './components/selectGoodsDialog.vue'
import selectModel from './components/selectModel.vue'
import HeaderConfig from './components/header-config.vue'
const couponObj = { const couponObj = {
// 折扣券 // 折扣券
discount: { discount: {
...@@ -433,7 +426,9 @@ export default { ...@@ -433,7 +426,9 @@ export default {
crowdEditWechat, crowdEditWechat,
selectStore, selectStore,
selectGiftDialog, selectGiftDialog,
selectGoodsDialog selectGoodsDialog,
HeaderConfig,
selectModel
}, },
data() { data() {
var validatorPhone = function(rule, value, callback) { var validatorPhone = function(rule, value, callback) {
...@@ -444,9 +439,12 @@ export default { ...@@ -444,9 +439,12 @@ export default {
} }
} }
return { return {
step: 1,
activityModelImg: '',
size: 'small', size: 'small',
editChildRef: 'editChildRef', editChildRef: 'editChildRef',
loading: false, loading: false,
couponTemplateList: [],
rulesOptions: [ rulesOptions: [
{ label: '用一发一', value: 1 }, { label: '用一发一', value: 1 },
{ label: '一次性发放', value: 2 } { label: '一次性发放', value: 2 }
...@@ -465,6 +463,7 @@ export default { ...@@ -465,6 +463,7 @@ export default {
choseItemList: [], choseItemList: [],
selectedMealList: [], selectedMealList: [],
selectedGoodsList: [], selectedGoodsList: [],
goodsLoading: false,
couponObj: JSON.parse(JSON.stringify(couponObj)), couponObj: JSON.parse(JSON.stringify(couponObj)),
goodsObj: JSON.parse(JSON.stringify(goodsObj)), goodsObj: JSON.parse(JSON.stringify(goodsObj)),
numToCoupon, numToCoupon,
...@@ -500,17 +499,22 @@ export default { ...@@ -500,17 +499,22 @@ export default {
isDisabled: false, isDisabled: false,
wechatVisible: false, // 预览 wechatVisible: false, // 预览
isSingleSelectVisible: false, // 商品选择 isSingleSelectVisible: false, // 商品选择
relateStoreVisible: false, // 选择门店 relateStoreVisible: false, // 选择门店,
giftPackage,
relateModelVisible: false,
selectedList: [], selectedList: [],
selectedProInfo: {}, selectedProInfo: {},
specificationDetailList: [], specificationDetailList: [],
nameToValSpecsList: [], nameToValSpecsList: [],
activityInfo: {}, activityInfo: {},
editForm: { editForm: {
merchantId: '', goodsList: null,
pageStyle: null,
merchantId: null,
merchantName: '', merchantName: '',
activityName: '', activityName: '',
// activityImg: '', playingType: 2,
countContent: '',
// promotion: '', // promotion: '',
activityTime: [], activityTime: [],
// goodsStock: '', // goodsStock: '',
...@@ -520,7 +524,6 @@ export default { ...@@ -520,7 +524,6 @@ export default {
limitPurchaseFlag: 1, limitPurchaseFlag: 1,
limitPurchaseNumber: '', limitPurchaseNumber: '',
subscribe: 1, subscribe: 1,
festivalType: 0,
// 活动配置 // 活动配置
customerServiceFlag: 3, customerServiceFlag: 3,
...@@ -548,7 +551,6 @@ export default { ...@@ -548,7 +551,6 @@ export default {
selectCarNumberFlag: 2, selectCarNumberFlag: 2,
selectVehicleTypeFlag: 2, selectVehicleTypeFlag: 2,
selectPhoneNumberFlag: 2, selectPhoneNumberFlag: 2,
businessType: 1, //业务场景
expiresType: 0, expiresType: 0,
formDescribeCheck: ['selectCarNumberFlag', 'selectVehicleTypeFlag', 'selectPhoneNumberFlag'], formDescribeCheck: ['selectCarNumberFlag', 'selectVehicleTypeFlag', 'selectPhoneNumberFlag'],
activityServices: [], activityServices: [],
...@@ -614,22 +616,14 @@ export default { ...@@ -614,22 +616,14 @@ export default {
editRule: { editRule: {
merchantId: [{ required: true, message: '请选择商户', trigger: 'change' }], merchantId: [{ required: true, message: '请选择商户', trigger: 'change' }],
activityName: [{ required: true, message: '请输入活动名称', trigger: 'change' }], activityName: [{ required: true, message: '请输入活动名称', trigger: 'change' }],
// activityImg: [{ required: true, message: '请选择活动宣传图', trigger: 'change' }], playingCustomer: [{ required: true, message: '请输入面向客户群', trigger: 'blur' }],
playingDiscountContent: [{ required: true, message: '请输入折扣内容', trigger: 'blur' }],
playingCouponDescription: [{ required: true, message: '请输入送券描述', trigger: 'blur' }],
pageStyle: [{ required: true, message: '请选择页面样式', trigger: 'change' }],
goodsList: [{ required: true, message: '请选择平台福利', trigger: 'change' }],
// promotion: [{ required: true, message: '请输入活动宣传语', trigger: 'change' }], // promotion: [{ required: true, message: '请输入活动宣传语', trigger: 'change' }],
activityTime: [{ required: true, message: '请选择链接时间', trigger: 'change' }], activityTime: [{ required: true, message: '请选择链接时间', trigger: 'change' }],
expiresType: [{ required: true, message: '请选择链接时间', trigger: 'change' }], expiresType: [{ required: true, message: '请选择链接时间', trigger: 'change' }],
// crowdFundingPrice: [
// { required: true, message: '请设置众筹价', trigger: 'change' },
// {
// validator: (rule, value, callback) => {
// if (value < +this.editForm.activityPrice) {
// return callback(new Error('众筹价需要大于定金'))
// }
// return value >= +(this.selectedProInfo.retailPrice / 100).toFixed(2) ? callback(new Error('秒杀价必须小于零售价')) : callback()
// },
// trigger: 'change'
// }
// ],
activityPrice: [{ required: true, message: '请输入销售价格', trigger: 'blur' }], activityPrice: [{ required: true, message: '请输入销售价格', trigger: 'blur' }],
goodsStock: [{ required: true, message: '请输入库存', trigger: 'blur' }], goodsStock: [{ required: true, message: '请输入库存', trigger: 'blur' }],
couponList: [{ required: true, message: '请选择优惠券', trigger: 'change' }], couponList: [{ required: true, message: '请选择优惠券', trigger: 'change' }],
...@@ -665,8 +659,7 @@ export default { ...@@ -665,8 +659,7 @@ export default {
activityBigImg: [{ required: true, message: '请选择活动大图', trigger: 'change' }], activityBigImg: [{ required: true, message: '请选择活动大图', trigger: 'change' }],
activityDetail: [{ required: true, message: '请输入活动详情', trigger: 'change' }], activityDetail: [{ required: true, message: '请输入活动详情', trigger: 'change' }],
forwardTitle: [{ required: true, message: '请输入转发标题', trigger: 'change' }], forwardTitle: [{ required: true, message: '请输入转发标题', trigger: 'change' }],
paymentAccountId: [{ required: true, message: '请选择定金收款账户', trigger: 'change' }], paymentAccountId: [{ required: true, message: '请选择定金收款账户', trigger: 'change' }]
businessType: [{ required: true, message: '请选择业务场景', trigger: 'change' }]
}, },
// 表单设置 // 表单设置
formDescribeCheckList: [ formDescribeCheckList: [
...@@ -695,24 +688,14 @@ export default { ...@@ -695,24 +688,14 @@ export default {
} }
], ],
fileList: [], fileList: [],
// 基本信息 markingEditFormData: [
editFormData: [
{ {
label: '门店', label: '门店',
name: 'merchantId', name: 'merchantId',
addHtml: 'merchantHtml' addHtml: 'merchantHtml'
}, },
{
label: '业务类型',
name: 'businessType',
type: 'radio',
optionList: utils.deepClone(businessType),
optionId: 'optionId',
optionLabel: 'optionLabel'
},
{ {
label: '所属订阅', label: '场景选择',
name: 'subscribe', name: 'subscribe',
type: 'radio', type: 'radio',
optionList: [ optionList: [
...@@ -725,66 +708,38 @@ export default { ...@@ -725,66 +708,38 @@ export default {
optionLabel: '定保招揽' optionLabel: '定保招揽'
}, },
{ {
optionId: 3, optionId: 5,
optionLabel: '其他' optionLabel: '续保招揽'
}
],
optionId: 'optionId',
optionLabel: 'optionLabel'
}, },
{ {
label: '节日关怀', optionId: 6,
name: 'festivalType', optionLabel: '节假日关怀'
type: 'radio',
optionList: [
{
optionId: 1,
optionLabel: '是'
}, },
{ {
optionId: 0, optionId: 3,
optionLabel: '否' optionLabel: '其他'
} }
], ],
optionId: 'optionId', optionId: 'optionId',
optionLabel: 'optionLabel' optionLabel: 'optionLabel'
}, },
{ {
label: '链接名称', label: '营销玩法',
name: 'activityName', name: 'play',
type: 'input', addHtml: 'play'
maxlength: 40,
tips: '如XX店车主关怀活动',
isDisabled: false
},
{
label: '时间限制',
name: 'expiresType',
type: 'radio',
isDisabled: true,
optionList: [
{
optionId: 0,
optionLabel: '链接时间'
},
{
optionId: 1,
optionLabel: '长期有效'
} }
], ],
optionId: 'optionId', projuctEditFormData: [
optionLabel: 'optionLabel'
},
{
label: '',
name: 'activityTime',
addHtml: 'activityTimeHtml',
isHide: false
},
{ {
label: '门店服务', label: '门店服务',
name: 'couponList', name: 'couponList',
addHtml: 'selectGiftBtn' addHtml: 'selectGiftBtn',
tips: this.loginpath ? '' : '用于打包门店服务、商品及其他产品。若需创建更多服务,请点击',
jumpLabel: '创建服务',
tipsWidth: 220,
handleJump: () => {
this.$history.push('/marketing/couponManage/index')
}
}, },
{ {
label: '', label: '',
...@@ -795,13 +750,8 @@ export default { ...@@ -795,13 +750,8 @@ export default {
{ {
label: '平台福利', label: '平台福利',
name: 'goodsList', name: 'goodsList',
addHtml: 'selectGoodsBtn' addHtml: 'selectGoodsBtn',
}, tips: '平台提供了种类丰富的权益商品,可进一步提升产品套餐的受众,强烈推荐!'
{
label: '',
name: 'goodsListBlock',
addHtml: 'goodsListBlock',
isHide: true
}, },
{ {
label: '销售价格', label: '销售价格',
...@@ -814,6 +764,24 @@ export default { ...@@ -814,6 +764,24 @@ export default {
type: 'input' type: 'input'
} }
], ],
palyEditFormData: [
{
label: '示意图',
addHtml: 'image'
},
{
label: '面向客户群',
name: 'playingCustomer',
type: 'input',
maxlength: 20
},
{
label: '折扣内容',
name: 'playingDiscountContent',
type: 'input',
maxlength: 50
}
],
// 客服设置 // 客服设置
customerEditFormData: [ customerEditFormData: [
{ {
...@@ -989,6 +957,44 @@ export default { ...@@ -989,6 +957,44 @@ export default {
// 活动配置 // 活动配置
configEditFormData: [ configEditFormData: [
{ {
label: '页面样式',
name: 'pageStyle',
addHtml: 'selectGoodsBtn',
isHide: true
},
{
label: '活动名称',
name: 'activityName',
type: 'input',
maxlength: 40,
tips: '如XX店车主关怀活动',
isDisabled: false
},
{
label: '时间限制',
name: 'expiresType',
type: 'radio',
isDisabled: true,
optionList: [
{
optionId: 0,
optionLabel: '链接时间'
},
{
optionId: 1,
optionLabel: '长期有效'
}
],
optionId: 'optionId',
optionLabel: 'optionLabel'
},
{
label: '',
name: 'activityTime',
addHtml: 'activityTimeHtml',
isHide: false
},
{
label: '主办方', label: '主办方',
name: 'sponsorName', name: 'sponsorName',
type: 'input', type: 'input',
...@@ -1097,11 +1103,6 @@ export default { ...@@ -1097,11 +1103,6 @@ export default {
name: 'formDescribe', name: 'formDescribe',
addHtml: 'formDescribe' addHtml: 'formDescribe'
}, },
// {
// label: '头像昵称',
// name: 'showAvatarNicknameFlag',
// addHtml: 'showAvatarNicknameFlag'
// },
{ {
label: '', label: '',
name: 'activityServices', name: 'activityServices',
...@@ -1125,111 +1126,6 @@ export default { ...@@ -1125,111 +1126,6 @@ export default {
tips: '可自定义战报内容' tips: '可自定义战报内容'
} }
], ],
//直播配置
// liveEditFormData: [
// {
// label: '选择直播',
// name: 'liveBroadcastRoomId',
// type: 'select',
// tips: '暂无直播,请到运营平台直播间管理创建新的直播',
// maxlength: 30,
// optionLabel: 'label',
// optionId: 'value',
// optionList: []
// },
// {
// label: '加群二维码',
// name: 'groupQrCode',
// type: 'upload',
// width: '320px',
// limitSize: 10,
// maxPhotoNum: 1,
// suffixSlot: 'groupQrCode',
// handleUpload: (e, file, targetItem) => {
// const imgFile = e.target.result
// const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
// this.loading = true
// this.$apis.common
// .uploadImgApi({ file: base64, fileType: 'image' })
// .then(res => {
// this.editForm[targetItem.name] = res
// this.$refs.editFormRef.$refs[this.editChildRef].validateField(targetItem.name)
// })
// .finally(() => {
// this.loading = false
// })
// }
// },
// {
// label: '运营浮窗动图',
// name: 'floatingMaskDiagram',
// type: 'upload',
// width: '320px',
// limitSize: 2,
// maxPhotoNum: 1,
// supportGif: true,
// prefixSlot: 'defaultImg',
// suffixSlot: 'floatingMaskDiagram',
// handleUpload: (e, file, targetItem) => {
// this.uploadImgOrGif(e, file, targetItem)
// }
// },
// {
// label: '直播缩略图',
// name: 'liveBroadcastRoomCover',
// type: 'upload',
// width: '320px',
// limitSize: 2,
// maxPhotoNum: 1,
// supportGif: true,
// prefixSlot: 'defaultImgCover',
// handleUpload: (e, file, targetItem) => {
// this.uploadImgOrGif(e, file, targetItem)
// }
// },
// {
// label: '回放缩略图',
// name: 'liveBroadcastRoomEndCover',
// type: 'upload',
// width: '320px',
// limitSize: 2,
// maxPhotoNum: 1,
// supportGif: true,
// prefixSlot: 'defaultImgEndCover',
// suffixSlot: 'liveBroadcastRoomEndCover',
// handleUpload: (e, file, targetItem) => {
// this.uploadImgOrGif(e, file, targetItem)
// }
// }
// ],
// liveEditRule: {
// liveBroadcastRoomId: [{ required: true, message: '请选择直播', trigger: 'change' }],
// // groupQrCode: [{ required: true, message: '请选择加群二维码', trigger: 'change' }],
// floatingMaskDiagram: [
// {
// required: true,
// validator: (rule, value, callback) => {
// callback()
// }
// }
// ],
// liveBroadcastRoomCover: [
// {
// required: true,
// validator: (rule, value, callback) => {
// callback()
// }
// }
// ],
// liveBroadcastRoomEndCover: [
// {
// required: true,
// validator: (rule, value, callback) => {
// callback()
// }
// }
// ]
// },
defaultImgObj: Object.freeze({ defaultImgObj: Object.freeze({
COVER_LIVE: 'https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/COVER_LIVE.gif', COVER_LIVE: 'https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/COVER_LIVE.gif',
COVER_REPLAY: 'https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/COVER_REPLAY.gif' COVER_REPLAY: 'https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/COVER_REPLAY.gif'
...@@ -1237,23 +1133,28 @@ export default { ...@@ -1237,23 +1133,28 @@ export default {
defaultFloatingMaskDiagram: 'https://wx.glsx.com.cn/upload/biz/ba63349f-8e9e-4e80-be3b-45cc38dcf13f.gif' defaultFloatingMaskDiagram: 'https://wx.glsx.com.cn/upload/biz/ba63349f-8e9e-4e80-be3b-45cc38dcf13f.gif'
} }
}, },
filters: {
filterBalancePayment(crowdFundingPrice, activityPrice) {
let BalancePaymentNum = Number(crowdFundingPrice) - Number(activityPrice)
if (BalancePaymentNum == 0) return 0
return BalancePaymentNum > 0 ? BalancePaymentNum.toFixed(2) : ''
}
},
mounted() { mounted() {
// this.getLiveList() this.couponTemplate()
// this.setMinHeight('.crowd-config')
this.routeInfo = this.$route.query this.routeInfo = this.$route.query
this.routeInfo.addOrEdit != 'add' && this.getInfo() this.routeInfo.addOrEdit != 'add' && this.getInfo()
const id = this.routeInfo.id const id = this.routeInfo.id
const detailDisableList = ['editFormData'] const detailDisableList = ['markingEditFormData']
const disableObj = { const disableObj = {
detail: ['editFormData', 'configEditFormData', 'serviceEditFormData', 'commoditysEditFormData', 'experiencesEditFormData', 'liveEditFormData'], detail: ['projuctEditFormData', 'configEditFormData', 'serviceEditFormData', 'commoditysEditFormData', 'experiencesEditFormData', 'liveEditFormData'],
edit: ['editFormData'] edit: ['projuctEditFormData']
}
const deleteObj = {
markingEditFormData: ['merchantId', 'subscribe']
}
if (!this.loginpath) {
for (let k in deleteObj) {
this[k] = this[k].filter(value => !deleteObj[k].includes(value.name))
}
if (this.routeInfo.addOrEdit == 'add') {
this.editForm.subscribe = this.routeInfo.subscribe
this.editForm.merchantId = this.$globalState.session.merchantId
this.editForm.merchantName = this.$globalState.session.merchantName
}
} }
if (this.routeInfo.addOrEdit == 'detail') { if (this.routeInfo.addOrEdit == 'detail') {
this.isDisabled = true this.isDisabled = true
...@@ -1268,22 +1169,22 @@ export default { ...@@ -1268,22 +1169,22 @@ export default {
} }
if (id) { if (id) {
if (this.routeInfo.addOrEdit == 'edit' && this.routeInfo.activityStatus == 2) { if (this.routeInfo.addOrEdit == 'edit' && this.routeInfo.activityStatus == 2) {
// this.$refs.configEditFormRef.$refs.activityDetailTextBox[0].forbidEdit()
this.isDisabled = this.routeInfo.addOrEdit == 'edit' this.isDisabled = this.routeInfo.addOrEdit == 'edit'
detailDisableList.forEach(attr => { detailDisableList.forEach(attr => {
this.changeFormAttr(attr, 'isDisabled', ['业务类型', '所属订阅', '节日关怀'], true) this.changeFormAttr(attr, 'isDisabled', ['场景选择'], true)
}) })
// this.changeFormAttr('configEditFormData', 'isDisabled', ['定金收款账户'], true)
} }
} }
}, },
watch: { watch: {
editForm: { // editForm: {
handler(val) { // handler(val) {
this.editStatus = true // this.$nextTick(() => {
}, // this.editStatus = true
deep: true // })
}, // },
// deep: true
// },
'editForm.merchantId'() { 'editForm.merchantId'() {
if (this.loading) { if (this.loading) {
return return
...@@ -1293,9 +1194,52 @@ export default { ...@@ -1293,9 +1194,52 @@ export default {
this.recoveryTotalPrice() this.recoveryTotalPrice()
this.hasCouponBlock(false) this.hasCouponBlock(false)
}, },
selectedGoodsList(val) {
this.editForm.goodsList = val.length ? 1 : null
console.log(this.editForm.goodsList)
},
'editForm.subscribe'(val) {
if (this.routeInfo.addOrEdit != 'add') return
this.configEditFormData[0].isHide = false
switch (+val) {
case 6:
this.handleRelateModelConfirm(1, false)
break
case 2:
this.handleRelateModelConfirm(2, false)
break
case 5:
this.handleRelateModelConfirm(3, false)
break
default:
this.configEditFormData[0].isHide = true
}
},
'editForm.playingType'(val) {
if (val == 2) {
this.editRule.couponList[0].required = true
this.palyEditFormData[2].label = '折扣内容'
this.palyEditFormData[2].name = 'playingDiscountContent'
}
if (val == 3) {
this.editRule.couponList[0].required = false
this.palyEditFormData[2].label = '送券描述'
this.palyEditFormData[2].name = 'playingCouponDescription'
}
},
'editForm.pageStyle'(val) {
console.log(val)
this.activityModelImg = `${this.staticImgUrl}activity-${val}.png`
},
step() {
document.querySelector('.el-main-scroll .el-scrollbar__wrap').scrollTop = 0
},
'editForm.activityPrice'(newValue, oldValue) { 'editForm.activityPrice'(newValue, oldValue) {
this.editForm.activityPrice = limitPrice(newValue, oldValue, 6, 2, 0) this.editForm.activityPrice = limitPrice(newValue, oldValue, 6, 2, 0)
}, },
'editForm.verificationEncourage'(newValue, oldValue) {
this.editForm.verificationEncourage = limitPrice(newValue, oldValue, 4, 2, 0)
},
'editForm.crowdFundingPrice'(newValue, oldValue) { 'editForm.crowdFundingPrice'(newValue, oldValue) {
this.editForm.crowdFundingPrice = limitPrice(newValue, oldValue, 5, 2, 0) this.editForm.crowdFundingPrice = limitPrice(newValue, oldValue, 5, 2, 0)
}, },
...@@ -1309,8 +1253,8 @@ export default { ...@@ -1309,8 +1253,8 @@ export default {
newValue && newValue.length && this.countDown() newValue && newValue.length && this.countDown()
}, },
'editForm.expiresType'(newValue) { 'editForm.expiresType'(newValue) {
let idx = this.editFormData.findIndex(val => val.name == 'activityTime') let idx = this.projuctEditFormData.findIndex(val => val.name == 'activityTime')
this.editFormData[idx].isHide = newValue == 0 ? false : true this.projuctEditFormData[idx].isHide = newValue == 0 ? false : true
}, },
'editForm.predictVolume'(newValue, oldValue) { 'editForm.predictVolume'(newValue, oldValue) {
this.editForm.predictVolume = limitPrice(newValue, oldValue, 10, 2, 0, 1000000000) this.editForm.predictVolume = limitPrice(newValue, oldValue, 10, 2, 0, 1000000000)
...@@ -1327,12 +1271,6 @@ export default { ...@@ -1327,12 +1271,6 @@ export default {
// 'editForm.liveBroadcastRoomId'(newValue, oldValue) { // 'editForm.liveBroadcastRoomId'(newValue, oldValue) {
// this.editForm.liveFlag = newValue ? true : false // this.editForm.liveFlag = newValue ? true : false
// }, // },
'editForm.goodsId'(newValue, oldValue) {
if (newValue) {
let idx = this.editFormData.findIndex(val => val.name == 'subscribe')
this.editFormData[idx].isHide = false
}
},
'editForm.activityActionReport.noteTouchCustomerCount'(newValue, oldValue) { 'editForm.activityActionReport.noteTouchCustomerCount'(newValue, oldValue) {
this.editForm.activityActionReport.noteTouchCustomerCount = limitPrice(newValue, oldValue, 99999, 0) this.editForm.activityActionReport.noteTouchCustomerCount = limitPrice(newValue, oldValue, 99999, 0)
}, },
...@@ -1362,6 +1300,28 @@ export default { ...@@ -1362,6 +1300,28 @@ export default {
// } // }
}, },
methods: { methods: {
//获取优惠券模板
couponTemplate() {
this.$apis.giftBag.couponTemplate({ pageSize: 10000, pageNum: 1 }).then(res => {
this.couponTemplateList = res.list || []
})
},
changeCouponTemplate(tab, event) {
this.$refs.editFormRef.$refs[this.editChildRef].clearValidate('goodsList')
const templateId = tab.name
this.editForm.couponTemplateId = templateId
this.editForm.couponTemplateName = tab.label
this.couponTemplateDetails(templateId)
},
//获取优惠券模板详情
couponTemplateDetails(templateId) {
this.goodsLoading = true
this.$apis.giftBag.couponTemplateDetails({ templateId, pageSize: 10000, pageNum: 1 }).then(res => {
this.selectedGoodsList = res.list || []
this.selectedGoodsList.forEach(item => (item.id = item.couponId))
this.goodsLoading = false
})
},
//选择门店优惠券 //选择门店优惠券
handleGiftAdd() { handleGiftAdd() {
if (!this.editForm.merchantId) return this.$message.error('请先选择门店!') if (!this.editForm.merchantId) return this.$message.error('请先选择门店!')
...@@ -1379,29 +1339,30 @@ export default { ...@@ -1379,29 +1339,30 @@ export default {
this.isSelectGoodsVisible = !this.isSelectGoodsVisible this.isSelectGoodsVisible = !this.isSelectGoodsVisible
}, },
handleGiftConfirm(selectedData) { handleGiftConfirm(selectedData) {
this.$refs.editFormRef.$refs[this.editChildRef].clearValidate('couponList')
this.handleGiftClose() this.handleGiftClose()
this.couponObj = selectedData this.couponObj = selectedData
this.recoveryTotalPrice() this.recoveryTotalPrice()
this.recoveryGiftList() this.recoveryGiftList()
}, },
setNameHide(name) { setNameHide(name) {
var idx = this.editFormData.findIndex(item => item.name == name) var idx = this.projuctEditFormData.findIndex(item => item.name == name)
this.editFormData[idx].isHide = !this.selectedGoodsList.length this.projuctEditFormData[idx].isHide = !this.selectedGoodsList.length
}, },
handleGoodsConfirm(selectedData) { handleGoodsConfirm(selectedData) {
this.$refs.editFormRef.$refs[this.editChildRef].clearValidate('goodsList')
this.selectedGoodsList = selectedData || [] this.selectedGoodsList = selectedData || []
this.setNameHide('goodsListBlock') // this.setNameHide('goodsListBlock')
this.handleGoodsClose() this.handleGoodsClose()
}, },
handleDeleteGoods(row) { handleDeleteGoods(row) {
const index = this.selectedGoodsList.findIndex(k => k.id == row.id) const index = this.selectedGoodsList.findIndex(k => k.id == row.id)
this.selectedGoodsList.splice(index, 1) this.selectedGoodsList.splice(index, 1)
this.setNameHide('goodsListBlock') // this.setNameHide('goodsListBlock')
}, },
hasCouponBlock(isValidate = true) { hasCouponBlock(isValidate = true) {
var idx = this.editFormData.findIndex(item => item.name == 'couponListBlock') var idx = this.projuctEditFormData.findIndex(item => item.name == 'couponListBlock')
this.editFormData[idx].isHide = !this.editForm.couponList.length this.projuctEditFormData[idx].isHide = !this.editForm.couponList.length
isValidate && this.$refs.editFormRef.$refs[this.editChildRef].validateField('couponList')
}, },
// 礼包 // 礼包
recoveryGiftList() { recoveryGiftList() {
...@@ -1457,7 +1418,9 @@ export default { ...@@ -1457,7 +1418,9 @@ export default {
changeFormAttr(formName, attrName, labelList, attrValue) { changeFormAttr(formName, attrName, labelList, attrValue) {
labelList.forEach(item => { labelList.forEach(item => {
let idx = this[formName].findIndex(k => k.label == item) let idx = this[formName].findIndex(k => k.label == item)
if (this[formName][idx]) {
this[formName][idx][attrName] = attrValue this[formName][idx][attrName] = attrValue
}
}) })
}, },
limitPriceForInput(val, intergerDigit, pointDigit, minValue, maxValue, regRule) { limitPriceForInput(val, intergerDigit, pointDigit, minValue, maxValue, regRule) {
...@@ -1550,6 +1513,20 @@ export default { ...@@ -1550,6 +1513,20 @@ export default {
} }
} }
}, },
handleRelateModelClose() {
this.relateModelVisible = !this.relateModelVisible
console.log(this.relateModelVisible)
},
handleRelateModelConfirm(val, status = true) {
this.$refs.configEditFormRef.$refs[this.editChildRef].clearValidate('pageStyle')
this.editForm.pageStyle = val
status && this.handleRelateModelClose()
this.editForm.activityBigImg = `${this.staticImgUrl}model-main-${val}.png`
const html = `<p><img src="${this.staticImgUrl}model-detail-${val}.png" style="max-width:100%;" contenteditable="false"/></p>`
this.editForm.activityDetail = html
this.$refs.configEditFormRef.$refs.activityDetailTextBox[0].setEdit(html)
},
// 选择门店 // 选择门店
handleRelateStoreClose() { handleRelateStoreClose() {
// console.log('handleRelateStoreClose') // console.log('handleRelateStoreClose')
...@@ -1557,7 +1534,7 @@ export default { ...@@ -1557,7 +1534,7 @@ export default {
this.relateStoreVisible = !this.relateStoreVisible this.relateStoreVisible = !this.relateStoreVisible
}, },
handleRelateStoreConfirm(selectedData) { handleRelateStoreConfirm(selectedData) {
this.$refs.editFormRef.$refs[this.editChildRef].clearValidate('merchantId') this.$refs.markingEditFormRef.$refs[this.editChildRef].clearValidate('merchantId')
// this.editForm.supplyMerchantList = selectedData // this.editForm.supplyMerchantList = selectedData
selectedData.merchantId && (this.editForm.merchantId = selectedData.merchantId) selectedData.merchantId && (this.editForm.merchantId = selectedData.merchantId)
selectedData.merchantName && (this.editForm.merchantName = selectedData.merchantName) selectedData.merchantName && (this.editForm.merchantName = selectedData.merchantName)
...@@ -1574,48 +1551,12 @@ export default { ...@@ -1574,48 +1551,12 @@ export default {
this.editForm.limitPurchaseNumber = val == 1 ? '' : '1' this.editForm.limitPurchaseNumber = val == 1 ? '' : '1'
this.editRule.limitPurchaseNumber[0].required = val != 1 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) { handleRelateProClose(targetItem) {
// 先选门店在选商品 // 先选门店在选商品
if (!this.editForm.merchantId) return this.$message.error('请先选择门店!') if (!this.editForm.merchantId) return this.$message.error('请先选择门店!')
this.selectedProInfo = this.editForm.goodsId ? { id: this.editForm.goodsId } : {} this.selectedProInfo = this.editForm.goodsId ? { id: this.editForm.goodsId } : {}
this.handleSingleSelectClose() this.handleSingleSelectClose()
}, },
handleSingleSelectConfirm(selectedProInfo) {
// this.editForm.activityPrice = ''
// this.editForm.goodsStock = ''
this.handleSingleSelectClose()
if (selectedProInfo) {
this.editForm.goodsId = selectedProInfo.id
// this.getGoodInfo(selectedProInfo.id)
}
},
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 = []
}
})
},
setLocaleCompare(params) { setLocaleCompare(params) {
let keys = [] let keys = []
let obj = [] let obj = []
...@@ -1828,6 +1769,9 @@ export default { ...@@ -1828,6 +1769,9 @@ export default {
if (info.predictVolume) { if (info.predictVolume) {
this.editForm.predictVolume = (info.predictVolume / 100).toFixed(2) this.editForm.predictVolume = (info.predictVolume / 100).toFixed(2)
} }
if (info.verificationEncourage) {
this.editForm.verificationEncourage = (info.verificationEncourage / 100).toFixed(2)
}
// 地图 // 地图
if (info.activityAddressProvinceName || info.activityAddressCityName) { if (info.activityAddressProvinceName || info.activityAddressCityName) {
this.$refs.configEditFormRef.$refs.provinceForm[0].init(info.activityAddressProvinceName, info.activityAddressCityName) this.$refs.configEditFormRef.$refs.provinceForm[0].init(info.activityAddressProvinceName, info.activityAddressCityName)
...@@ -1869,7 +1813,6 @@ export default { ...@@ -1869,7 +1813,6 @@ export default {
this.editForm.couponList = this.editForm.couponList.filter(i => i.discountType != 8) this.editForm.couponList = this.editForm.couponList.filter(i => i.discountType != 8)
this.recoveryCoupon() this.recoveryCoupon()
this.recoveryTotalPrice() this.recoveryTotalPrice()
this.selectedGoodsList.length && this.setNameHide('goodsListBlock')
// 表单设置 // 表单设置
this.editForm.formDescribeCheck = [] this.editForm.formDescribeCheck = []
this.editForm.selectCarNumberFlag = this.editForm.selectCarNumberFlag || 1 this.editForm.selectCarNumberFlag = this.editForm.selectCarNumberFlag || 1
...@@ -1997,6 +1940,9 @@ export default { ...@@ -1997,6 +1940,9 @@ export default {
if (this.editForm.predictVolume) { if (this.editForm.predictVolume) {
param.predictVolume = (this.editForm.predictVolume * 100).toFixed(0) param.predictVolume = (this.editForm.predictVolume * 100).toFixed(0)
} }
if (this.editForm.verificationEncourage) {
param.verificationEncourage = (this.editForm.verificationEncourage * 100).toFixed(0)
}
// 活动详情 // 活动详情
if (this.editForm.activityDetail) { if (this.editForm.activityDetail) {
param.activityDetail = encodeURIComponent(this.editForm.activityDetail) param.activityDetail = encodeURIComponent(this.editForm.activityDetail)
...@@ -2026,7 +1972,8 @@ export default { ...@@ -2026,7 +1972,8 @@ export default {
couponAnticipatedCost: item.denomination couponAnticipatedCost: item.denomination
} }
}) })
param.couponCreateRequests = couponLists.concat(selectedGoodsList) param.couponCreateRequests = couponLists.concat(selectedGoodsList) || []
console.log(param.couponCreateRequests)
delete param.couponList delete param.couponList
// 标杆门店总产值/元(已结束战报) // 标杆门店总产值/元(已结束战报)
if (param.activityActionReport.signMerchantProduceCount) { if (param.activityActionReport.signMerchantProduceCount) {
...@@ -2135,6 +2082,33 @@ export default { ...@@ -2135,6 +2082,33 @@ export default {
}) })
return list return list
}, },
handlePrev() {
this.step--
},
//验证表单
validManyForm(formName) {
return new Promise(resolve => {
this.$refs[formName].$refs[this.editChildRef].validate((valid, err) => {
console.log(valid, err)
if (valid) {
resolve()
}
})
})
},
handleNext() {
if (this.step == 2) {
this.validManyForm('editFormRef').then(res => {
this.step++
})
}
if (this.step == 1) {
if (this.editForm.playingType == 1 || this.editForm.playingType == 4) return this.$message.error('请选择正确的营销玩法')
Promise.all([this.validManyForm('markingEditFormRef'), this.validManyForm('palyEditFormRef')]).then(res => {
this.step++
})
}
},
handleConfirm() { handleConfirm() {
this.stopMusic() this.stopMusic()
this.editForm.activityServices = this.delListAllEmpty('activityServices', ['title', 'content']) this.editForm.activityServices = this.delListAllEmpty('activityServices', ['title', 'content'])
...@@ -2253,6 +2227,77 @@ export default { ...@@ -2253,6 +2227,77 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.style-panel {
img {
margin-top: 10px;
width: 104px;
height: 104px;
}
}
.play-panel {
.card-panel {
width: 810px;
.el-tabs__nav {
border: none;
}
.el-tabs__header {
margin: 0;
}
.el-tabs__item {
background: #fafafa;
border: 1px solid #e5e5e5;
border-radius: 4px 4px 0 0;
border-right: 1px solid #e5e5e5;
border-top: 1px solid #e5e5e5;
border-left: 1px solid #e5e5e5 !important;
border-bottom: none;
margin-right: 1px;
width: auto;
&.is-active {
color: #5850ff;
background: #fff;
font-weight: 600;
}
}
}
.choseRow {
display: flex;
height: auto;
.choseItem {
display: inline-block;
cursor: pointer;
line-height: 40px;
height: 40px;
background: #fafafa;
border-radius: 4px 4px 0 0;
border: 1px solid #e5e5e5;
border-bottom: none;
margin-right: 1px;
padding: 0 20px;
&.active {
color: #5850ff;
background: #fff;
font-weight: 600;
}
}
}
.chose-panel {
.select-btn {
margin-bottom: 10px;
}
.waiting-box {
width: 278px;
height: 278px;
margin: 15px auto 0;
}
padding: 20px;
width: 864px;
min-height: 296px;
background: #ffffff;
border: 1px solid #e5e5e5;
border-radius: 0 4px 4px 4px;
}
}
/* 规格 */ /* 规格 */
.edit-product-dh .spesc-label { .edit-product-dh .spesc-label {
padding: 1px 10px; padding: 1px 10px;
...@@ -2266,7 +2311,7 @@ export default { ...@@ -2266,7 +2311,7 @@ export default {
color: #999999; color: #999999;
} }
.edit-activity .el-form-item__content { .edit-activity .el-form-item__content {
width: auto; width: auto !important;
} }
#customerServiceFlag .el-form-item__content .el-radio-group { #customerServiceFlag .el-form-item__content .el-radio-group {
width: 400px; width: 400px;
...@@ -2639,7 +2684,8 @@ export default { ...@@ -2639,7 +2684,8 @@ export default {
margin-top: 10px; margin-top: 10px;
} }
} }
.gift-block { .gift-panel {
.gift-block {
width: 602px; width: 602px;
border-radius: 4px; border-radius: 4px;
border: 1px solid #e5e5e5; border: 1px solid #e5e5e5;
...@@ -2690,7 +2736,21 @@ export default { ...@@ -2690,7 +2736,21 @@ export default {
border-bottom: 0px; border-bottom: 0px;
} }
} }
}
.gift-input {
font-size: 14px;
color: #333333;
margin: 10px 0px;
.el-input {
width: 136px;
}
}
.gift-tips {
font-size: 14px;
color: #999999;
}
} }
.activity-time-container { .activity-time-container {
background: #f9f9f9; background: #f9f9f9;
padding: 20px 80px; padding: 20px 80px;
...@@ -2707,4 +2767,34 @@ export default { ...@@ -2707,4 +2767,34 @@ export default {
width: 100% !important; width: 100% !important;
} }
} }
.crowd-config {
position: relative;
.config-right {
width: 280px;
height: 556px;
right: 40px;
top: 88px;
position: absolute;
&-box {
position: relative;
width: 100%;
height: 100%;
.config-box-title {
position: absolute;
width: 100%;
font-size: 13px;
color: #999999;
text-align: center;
top: 50px;
}
.config-box-bg {
position: absolute;
width: 249px;
height: 472.98px;
left: 16px;
top: 70px;
}
}
}
}
</style> </style>
...@@ -90,15 +90,7 @@ export default { ...@@ -90,15 +90,7 @@ export default {
maxlength: 20 maxlength: 20
}, },
{ {
label: '业务场景', label: '场景选择',
name: 'businessType',
type: 'select',
optionList: this.$common.utils.deepClone(businessType),
optionId: 'optionId',
optionLabel: 'optionLabel'
},
{
label: '所属订阅',
name: 'subscribe', name: 'subscribe',
type: 'select', type: 'select',
optionList: this.$common.utils.deepClone(subscribe), optionList: this.$common.utils.deepClone(subscribe),
...@@ -144,14 +136,7 @@ export default { ...@@ -144,14 +136,7 @@ export default {
prop: 'merchantName' prop: 'merchantName'
}, },
{ {
label: '业务场景', label: '场景选择',
prop: 'businessType',
formatter: cellValue => {
return businessType.find(item => item.optionId == cellValue.businessType)?.optionLabel
}
},
{
label: '所属订阅',
prop: 'subscribe', prop: 'subscribe',
formatter: cellValue => { formatter: cellValue => {
return subscribe.find(item => item.optionId == cellValue.subscribe)?.optionLabel return subscribe.find(item => item.optionId == cellValue.subscribe)?.optionLabel
...@@ -192,7 +177,7 @@ export default { ...@@ -192,7 +177,7 @@ export default {
type: 'text' type: 'text'
}, },
condition: row => { condition: row => {
return row.activityStatus == '1' && this.loginpath return row.activityStatus == '1'
}, },
listeners: { listeners: {
click: this.start click: this.start
...@@ -205,7 +190,7 @@ export default { ...@@ -205,7 +190,7 @@ export default {
type: 'text' type: 'text'
}, },
condition: row => { condition: row => {
return row.activityStatus == '2' && this.loginpath return row.activityStatus == '2'
}, },
listeners: { listeners: {
click: this.end click: this.end
...@@ -217,9 +202,6 @@ export default { ...@@ -217,9 +202,6 @@ export default {
attrs: { attrs: {
type: 'text' type: 'text'
}, },
condition: row => {
return this.loginpath
},
listeners: { listeners: {
click: row => { click: row => {
this.handleEdit('edit', row) this.handleEdit('edit', row)
...@@ -228,28 +210,13 @@ export default { ...@@ -228,28 +210,13 @@ export default {
}, },
{ {
type: 'el-button', type: 'el-button',
name: '查看',
attrs: {
type: 'text'
},
condition: row => {
return !this.loginpath
},
listeners: {
click: row => {
this.handleEdit('detail', row)
}
}
},
{
type: 'el-button',
name: '删除', name: '删除',
attrs: { attrs: {
type: 'text', type: 'text',
fn: '删除' fn: '删除'
}, },
condition: row => { condition: row => {
return row.activityStatus == '3' && this.loginpath return row.activityStatus == '3'
}, },
listeners: { listeners: {
click: this.del click: this.del
...@@ -274,9 +241,6 @@ export default { ...@@ -274,9 +241,6 @@ export default {
attrs: { attrs: {
type: 'text' type: 'text'
}, },
condition: row => {
return this.loginpath
},
listeners: { listeners: {
click: row => { click: row => {
this.handleEdit('copy', row) this.handleEdit('copy', row)
...@@ -301,7 +265,7 @@ export default { ...@@ -301,7 +265,7 @@ export default {
}, },
created() { created() {
if (!this.loginpath) { if (!this.loginpath) {
const filterName = ['merchantName', 'subscribe', 'businessType'] const filterName = ['merchantName']
this.searchFormData = this.searchFormData.filter(item => !filterName.includes(item.name)) this.searchFormData = this.searchFormData.filter(item => !filterName.includes(item.name))
this.tableParams.tableColumns = this.tableParams.tableColumns.filter(item => !filterName.includes(item.prop)) this.tableParams.tableColumns = this.tableParams.tableColumns.filter(item => !filterName.includes(item.prop))
} }
...@@ -376,7 +340,7 @@ export default { ...@@ -376,7 +340,7 @@ export default {
}) })
}, },
filterCouponList(list, isEquity = false) { filterCouponList(list, isEquity = false) {
return list.filter(item => (isEquity ? item.discountType == 8 : item.discountType != 8)) return (list && list.filter(item => (isEquity ? item.discountType == 8 : item.discountType != 8))) || []
}, },
handleBoard(row) { handleBoard(row) {
this.$router.push({ this.$router.push({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!