Commit d7dc3327 by 无尘

feat: 增加奖励

parent 318c8d6b
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>分享有礼</title><link href=./static/css/app.d211633142cf77751c9d0cbde1443a71.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.33.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.29.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.13.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.38.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/area-ab.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.1.91.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.12.js></script><script type=text/javascript src=./static/js/manifest.375c4bc7a9258792f220.js></script><script type=text/javascript src=./static/js/vendor.8455def81090347f10ce.js></script><script type=text/javascript src=./static/js/app.063950505fceb28630cd.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>分享有礼</title><link href=./static/css/app.afcc97872df7d9c94e44a482c7ea57c0.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.33.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.29.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.13.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.38.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/area-ab.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.1.91.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.12.js></script><script type=text/javascript src=./static/js/manifest.a66ccaa2d48f7a5e1ae3.js></script><script type=text/javascript src=./static/js/vendor.8455def81090347f10ce.js></script><script type=text/javascript src=./static/js/app.063950505fceb28630cd.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var f,i,u,d=0,b=[];d<r.length;d++)i=r[d],t[i]&&b.push(t[i][0]),t[i]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(e[f]=c[f]);for(n&&n(r,c,a);b.length;)b.shift()();if(a)for(d=0;d<a.length;d++)u=o(o.s=a[d]);return u};var r={},t={15:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"b1c6d8cabf2459ac5a8a",1:"5b546fa38466a0b05e37",2:"1e48cc7db677d19bab99",3:"2549dae1a989371e0a90",4:"e42560cdcc9ef2f1fe8a",5:"8ecd133bf1cda0bdffb4",6:"fda09ea240d5c03fd4f4",7:"b0fd74564cc799593b8f",8:"fe9ec49f63ecd8e527ba",9:"522a01ff8d619d2bf030",10:"e16b73d2d4b922255e52",11:"c11d02c33702d00b2e2e",12:"b96af0829c134b12bfbb"}[e]+".js";var f=setTimeout(i,12e4);function i(){a.onerror=a.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=i,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var f,i,u,d=0,b=[];d<r.length;d++)i=r[d],t[i]&&b.push(t[i][0]),t[i]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(e[f]=c[f]);for(n&&n(r,c,a);b.length;)b.shift()();if(a)for(d=0;d<a.length;d++)u=o(o.s=a[d]);return u};var r={},t={15:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"b1c6d8cabf2459ac5a8a",1:"5b546fa38466a0b05e37",2:"039e2e34a224788b3dc1",3:"2549dae1a989371e0a90",4:"e42560cdcc9ef2f1fe8a",5:"8ecd133bf1cda0bdffb4",6:"fda09ea240d5c03fd4f4",7:"b0fd74564cc799593b8f",8:"fe9ec49f63ecd8e527ba",9:"522a01ff8d619d2bf030",10:"e16b73d2d4b922255e52",11:"c11d02c33702d00b2e2e",12:"b96af0829c134b12bfbb"}[e]+".js";var f=setTimeout(i,12e4);function i(){a.onerror=a.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=i,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-11-21 16:37:02
* @LastEditors: 无尘
* @LastEditTime: 2019-11-29 11:11:20
* @LastEditTime: 2019-12-02 09:28:31
-->
<!--
<competition-award></competition-award>
......@@ -14,11 +14,24 @@ import competitionAward from '@/components/active-config/configs/competition-awa
<template>
<div class="competition-award border-box">
<el-form label-width="154px" :model="compitionAward" ref="rewardForm" :rules="rules">
<el-form-item label="闯关指标(多选):" prop="">
<el-form
label-width="154px"
:model="compitionAward"
ref="rewardForm"
:rules="rules"
>
<el-form-item
label="闯关指标(多选):"
prop=""
>
<ul class="flex ">
<template v-for="(item, index) in modeData">
<li v-if="index == 0" :class="['li-cell li-second-cell flex-1 ', compitionAward.dealNumberFlag == 1 ? 'li-second-active' : '']" :key="index + 'first'" @click="selectStore(item)">
<li
v-if="index == 0"
:class="['li-cell li-second-cell flex-1 ', compitionAward.dealNumberFlag == 1 ? 'li-second-active' : '']"
:key="index + 'first'"
@click="selectStore(item)"
>
<div class="li-cell-inner">
<div class="li-cell-bottom border-box">
<div class="li-cell-scene">
......@@ -35,7 +48,12 @@ import competitionAward from '@/components/active-config/configs/competition-awa
</div>
</div>
</li>
<li v-if="basePath.map(ele => ele.transName).includes('消费') && index == 1" :class="['li-cell li-second-cell flex-1 ', compitionAward.dealAmountFlag == 1 ? 'li-second-active' : '']" :key="index + 'first'" @click="selectStore(item)">
<li
v-if="index == 1 && basePath.map(ele => ele.transName).includes('消费')"
:class="['li-cell li-second-cell flex-1 ', compitionAward.dealAmountFlag == 1 ? 'li-second-active' : '']"
:key="index + 'first'"
@click="selectStore(item)"
>
<div class="li-cell-inner">
<div class="li-cell-bottom border-box">
<div class="li-cell-scene">
......@@ -55,36 +73,93 @@ import competitionAward from '@/components/active-config/configs/competition-awa
</template>
</ul>
</el-form-item>
<el-form-item v-if="compitionAward.dealNumberFlag == 1" class="m-t-20" label="成交人数闯关奖项:" prop="">
<el-table :data="compitionAward.dealNumberSettingParam" style="width: 100%">
<el-form-item
v-if="compitionAward.dealNumberFlag == 1"
class="m-t-20"
label="成交人数闯关奖项:"
prop=""
>
<el-table
:data="compitionAward.dealNumberSettingParam"
style="width: 100%"
>
<el-table-column label="奖项名称">
<template slot-scope="scope">
<div class="cell">
<limitInput :inputWidth="275" :disflag="$route.query.editFlag ? true : false" :inputValue.sync="scope.row.awardName" :holder="'请输入奖项名称'" :getByType="'char'" :maxLength="20"> </limitInput>
<limitInput
:inputWidth="275"
:disflag="$route.query.editFlag ? true : false"
:inputValue.sync="scope.row.awardName"
:holder="'请输入奖项名称'"
:getByType="'char'"
:maxLength="20"
> </limitInput>
</div>
</template>
</el-table-column>
<el-table-column label="排名" width="335">
<el-table-column
label="排名"
width="335"
>
<template slot-scope="scope">
<div class="cell">
<div v-if="scope.$index == 0">
<span class="font-14 color-606266 p-r-10"></span>
<el-input-number class="w-90" v-model="scope.row.end" controls-position="right" :min="1" :max="9999999999"> </el-input-number>
<el-input-number
class="w-90"
v-model="scope.row.end"
controls-position="right"
:min="1"
:max="9999999999"
> </el-input-number>
<span class="font-14 color-606266 p-l-10"></span>
</div>
<div v-if="scope.$index != 0 && scope.$index != compitionAward.dealNumberSettingParam.length - 1">
<span class="font-14 color-606266 p-r-10"></span>
<el-input-number class="w-90" v-model="scope.row.start" controls-position="right" :min="1" :max="9999999999"> </el-input-number>
<el-input-number
class="w-90"
v-model="scope.row.start"
controls-position="right"
:min="1"
:max="9999999999"
> </el-input-number>
<span class="font-14 color-606266 p-l-10 p-r-10">名 至</span>
<el-input-number class="w-90" v-model="scope.row.end" controls-position="right" :min="1" :max="9999999999"> </el-input-number>
<el-input-number
class="w-90"
v-model="scope.row.end"
controls-position="right"
:min="1"
:max="9999999999"
> </el-input-number>
<span class="font-14 color-606266 p-l-10"></span>
</div>
<div v-if="scope.$index != 0 && scope.$index == compitionAward.dealNumberSettingParam.length - 1">
<span class="font-14 color-606266 p-r-10"></span>
<el-input-number class="w-90" v-model="scope.row.start" controls-position="right" :min="1" :max="9999999999"> </el-input-number>
<span v-if="scope.row.infinity" class="font-14 color-606266 p-l-10 p-r-10">人 至</span>
<el-input-number v-if="!scope.row.infinity" class="w-90" v-model="scope.row.end" controls-position="right" :min="1" :max="9999999999"> </el-input-number>
<el-checkbox v-if="scope.$index == compitionAward.dealNumberSettingParam.length - 1" class="m-l-10" v-model="scope.row.infinity" @change="changeEnd($event, scope.row)">无穷大</el-checkbox>
<el-input-number
class="w-90"
v-model="scope.row.start"
controls-position="right"
:min="1"
:max="9999999999"
> </el-input-number>
<span
v-if="scope.row.infinity"
class="font-14 color-606266 p-l-10 p-r-10"
>人 至</span>
<el-input-number
v-if="!scope.row.infinity"
class="w-90"
v-model="scope.row.end"
controls-position="right"
:min="1"
:max="9999999999"
> </el-input-number>
<el-checkbox
v-if="scope.$index == compitionAward.dealNumberSettingParam.length - 1"
class="m-l-10"
v-model="scope.row.infinity"
@change="changeEnd($event, scope.row)"
>无穷大</el-checkbox>
</div>
</div>
</template>
......@@ -95,54 +170,136 @@ import competitionAward from '@/components/active-config/configs/competition-awa
<div>
<div>
<el-checkbox v-model="scope.row.pointCheck">积分</el-checkbox>
<el-input-number class="w-146" v-model="scope.row.point" controls-position="right" :min="1" :max="999999"> </el-input-number>
<el-input-number
class="w-146"
v-model="scope.row.point"
controls-position="right"
:min="1"
:max="999999"
> </el-input-number>
</div>
<div class="m-t-10">
<el-checkbox v-model="scope.row.cardCheck">卡券</el-checkbox>
<el-select class="w-146" v-model="scope.row.cardId" placeholder="请选择" @change="changeCard($event, scope.row)">
<el-option v-for="item in cardList" :key="item.coupCardId" :label="item.cardName" :value="item.coupCardId"> </el-option>
<el-select
class="w-146"
v-model="scope.row.cardId"
placeholder="请选择"
@change="changeCard($event, scope.row)"
>
<el-option
v-for="item in cardList"
:key="item.coupCardId"
:label="item.cardName"
:value="item.coupCardId"
> </el-option>
</el-select>
</div>
</div>
<el-button v-if="scope.$index != 0" class="m-l-16" @click.stop="deleteRow(scope.$index, compitionAward.dealNumberSettingParam)" type="text" size="small">
<el-button
v-if="scope.$index != 0"
class="m-l-16"
@click.stop="deleteRow(scope.$index, compitionAward.dealNumberSettingParam)"
type="text"
size="small"
>
删除
</el-button>
</div>
</template>
</el-table-column>
</el-table>
<div class="add-line text-center cursor-pointer" @click="addPeopleItem"><i class="el-icon-plus color-1890ff"></i><span class="color-1890ff font-14 p-l-10">添加奖项</span></div>
<div
class="add-line text-center cursor-pointer"
@click="addPeopleItem"
><i class="el-icon-plus color-1890ff"></i><span class="color-1890ff font-14 p-l-10">添加奖项</span></div>
</el-form-item>
<el-form-item v-if="compitionAward.dealAmountFlag == 1" class="m-t-20" label="成交额闯关奖项: " prop="">
<el-table :data="compitionAward.dealAmountSettingParam" style="width: 100%">
<el-form-item
v-if="compitionAward.dealAmountFlag == 1"
class="m-t-20"
label="成交额闯关奖项: "
prop=""
>
<el-table
:data="compitionAward.dealAmountSettingParam"
style="width: 100%"
>
<el-table-column label="奖项名称">
<template slot-scope="scope">
<div class="cell">
<limitInput :inputWidth="275" :disflag="$route.query.editFlag ? true : false" :inputValue.sync="scope.row.awardName" :holder="'请输入奖项名称'" :getByType="'char'" :maxLength="20"> </limitInput>
<limitInput
:inputWidth="275"
:disflag="$route.query.editFlag ? true : false"
:inputValue.sync="scope.row.awardName"
:holder="'请输入奖项名称'"
:getByType="'char'"
:maxLength="20"
> </limitInput>
</div>
</template>
</el-table-column>
<el-table-column label="排名" width="335">
<el-table-column
label="排名"
width="335"
>
<template slot-scope="scope">
<div class="cell">
<div v-if="scope.$index == 0">
<span class="font-14 color-606266 p-r-10"></span>
<el-input-number class="w-90" v-model="scope.row.end" controls-position="right" :min="1" :max="9999999999"> </el-input-number>
<el-input-number
class="w-90"
v-model="scope.row.end"
controls-position="right"
:min="1"
:max="9999999999"
> </el-input-number>
<span class="font-14 color-606266 p-l-10"></span>
</div>
<div v-if="scope.$index != 0">
<span class="font-14 color-606266 p-r-10"></span>
<el-input-number class="w-90" v-model="scope.row.start" controls-position="right" :min="1" :max="9999999999"> </el-input-number>
<el-input-number
class="w-90"
v-model="scope.row.start"
controls-position="right"
:min="1"
:max="9999999999"
> </el-input-number>
<span class="font-14 color-606266 p-l-10 p-r-10">名 至</span>
<el-input-number class="w-90" v-model="scope.row.end" controls-position="right" :min="1" :max="9999999999"> </el-input-number>
<el-input-number
class="w-90"
v-model="scope.row.end"
controls-position="right"
:min="1"
:max="9999999999"
> </el-input-number>
<span class="font-14 color-606266 p-l-10"></span>
</div>
<div v-if="scope.$index != 0 && scope.$index == compitionAward.dealAmountSettingParam.length - 1">
<span class="font-14 color-606266 p-r-10"></span>
<el-input-number class="w-90" v-model="scope.row.start" controls-position="right" :min="1" :max="9999999999"> </el-input-number>
<span v-if="scope.row.infinity" class="font-14 color-606266 p-l-10 p-r-10">人 至</span>
<el-input-number v-if="!scope.row.infinity" v-model="scope.row.end" class="w-90" controls-position="right" :min="1" :max="9999999999"> </el-input-number>
<el-checkbox v-if="scope.$index == compitionAward.dealAmountSettingParam.length - 1" class="m-l-10" v-model="scope.row.infinity" @change="changeEnd($event, scope.row)">无穷大</el-checkbox>
<el-input-number
class="w-90"
v-model="scope.row.start"
controls-position="right"
:min="1"
:max="9999999999"
> </el-input-number>
<span
v-if="scope.row.infinity"
class="font-14 color-606266 p-l-10 p-r-10"
>人 至</span>
<el-input-number
v-if="!scope.row.infinity"
v-model="scope.row.end"
class="w-90"
controls-position="right"
:min="1"
:max="9999999999"
> </el-input-number>
<el-checkbox
v-if="scope.$index == compitionAward.dealAmountSettingParam.length - 1"
class="m-l-10"
v-model="scope.row.infinity"
@change="changeEnd($event, scope.row)"
>无穷大</el-checkbox>
</div>
</div>
</template>
......@@ -153,23 +310,48 @@ import competitionAward from '@/components/active-config/configs/competition-awa
<div>
<div>
<el-checkbox v-model="scope.row.pointCheck">积分</el-checkbox>
<el-input-number class="w-146" v-model="scope.row.point" controls-position="right" :min="1" :max="999999"> </el-input-number>
<el-input-number
class="w-146"
v-model="scope.row.point"
controls-position="right"
:min="1"
:max="999999"
> </el-input-number>
</div>
<div class="m-t-10">
<el-checkbox v-model="scope.row.cardCheck">卡券</el-checkbox>
<el-select class="w-146" v-model="scope.row.cardId" placeholder="请选择" @change="changeCard($event, scope.row)">
<el-option v-for="item in cardList" :key="item.coupCardId" :label="item.cardName" :value="item.coupCardId"> </el-option>
<el-select
class="w-146"
v-model="scope.row.cardId"
placeholder="请选择"
@change="changeCard($event, scope.row)"
>
<el-option
v-for="item in cardList"
:key="item.coupCardId"
:label="item.cardName"
:value="item.coupCardId"
> </el-option>
</el-select>
</div>
</div>
<el-button v-if="scope.$index != 0" class="m-l-16" @click.stop="deleteRow(scope.$index, compitionAward.dealAmountSettingParam)" type="text" size="small">
<el-button
v-if="scope.$index != 0"
class="m-l-16"
@click.stop="deleteRow(scope.$index, compitionAward.dealAmountSettingParam)"
type="text"
size="small"
>
删除
</el-button>
</div>
</template>
</el-table-column>
</el-table>
<div class="add-line text-center cursor-pointer" @click="addMoneyItem"><i class="el-icon-plus color-1890ff"></i><span class="color-1890ff font-14 p-l-10">添加奖项</span></div>
<div
class="add-line text-center cursor-pointer"
@click="addMoneyItem"
><i class="el-icon-plus color-1890ff"></i><span class="color-1890ff font-14 p-l-10">添加奖项</span></div>
</el-form-item>
</el-form>
</div>
......@@ -361,6 +543,7 @@ export default {
that.compitionAward = JSON.parse(JSON.stringify(that.value));
if (Object.keys(that.$store.state.baseInfo).length) {
that.basePath = JSON.parse(JSON.stringify(that.$store.state.baseInfo)).router;
console.log('basePath:',that.basePath)
}
}
};
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-11-21 16:37:02
* @LastEditors: 无尘
* @LastEditTime: 2019-11-25 15:37:41
* @LastEditTime: 2019-12-02 10:36:49
-->
<!--
<invitee-reward></invitee-reward>
......@@ -14,53 +14,104 @@ import inviteeReward from '@/components/active-config/configs/invitee-reward.vue
<template>
<div class="invitee-reward border-box">
<div role="alert" class="el-alert el-alert--info">
<div
role="alert"
class="el-alert el-alert--info"
>
<i class="el-alert__icon el-icon-info font-12 color-1890ff"></i>
<div class="el-alert__content">
<span class="el-alert__title color-606266 font-14 font-w-400"
>给邀请人的奖励往往是为了扩大活动影响力和辐射范围,而受邀人奖励则能提升活动响应率和行为转化能力。<br />
<span class="el-alert__title color-606266 font-14 font-w-400">给邀请人的奖励往往是为了扩大活动影响力和辐射范围,而受邀人奖励则能提升活动响应率和行为转化能力。<br />
您可以配置受邀人奖励,当完成相关行为后,受邀人将实时获取相关奖励。<br />
注意:与邀请人奖励不同,受邀人无论消费多少次,都只能获得一次受邀人奖励。</span
>
注意:与邀请人奖励不同,受邀人无论消费多少次,都只能获得一次受邀人奖励。</span>
</div>
</div>
<el-form label-width="154px" :model="invitedAward" ref="rewardForm" :rules="rules">
<el-form-item label="奖励内容:" prop="">
<el-form
label-width="154px"
:model="invitedAward"
ref="rewardForm"
:rules="rules"
>
<el-form-item
label="奖励内容:"
prop=""
>
<div class="point-cell">
<div class="point-cell-title border-box flex flex-space-between">
<div class="point-cell-name font-14 color-303133 font-w-600">积分奖励</div>
<div class="point-cell-switch">
<el-switch v-model="invitedAward.pointSettingFlag" active-text="" inactive-text=""> </el-switch>
<el-switch
v-model="invitedAward.pointSettingFlag"
active-text=""
inactive-text=""
> </el-switch>
</div>
</div>
<div v-if="invitedAward.pointSettingFlag" class="point-cell-body border-box">
<div
v-if="invitedAward.pointSettingFlag"
class="point-cell-body border-box"
>
<div class="point-title-tip font-14 color-606266">积分奖励只适用于受邀人有会员卡的场景(适合老客复购场景,不适合老带新场景),非会员受邀人即使完成相关行为也无法获取积分奖励。</div>
<div data-v-6033a8b1="" class="el-form-item m-t-44">
<label for="" class="el-form-item__label" style="width: 85px;">奖励模式:</label>
<div class="el-form-item__content" style="margin-left: 85px;">
<div
data-v-6033a8b1=""
class="el-form-item m-t-44"
>
<label
for=""
class="el-form-item__label"
style="width: 85px;"
>奖励模式:</label>
<div
class="el-form-item__content"
style="margin-left: 85px;"
>
<el-radio-group v-model="invitedAward.pointAwardMode">
<el-radio :label="1">定额奖励</el-radio>
<el-radio v-if="basePath.map(ele => ele.transName).includes('消费')" :label="2">阶梯奖励</el-radio>
<el-radio v-if="basePath.map(ele => ele.transName).includes('消费')" :label="3">成交额等比奖励</el-radio>
<el-radio
v-if="basePath.map(ele => ele.transName).includes('消费')"
:label="2"
>阶梯奖励</el-radio>
<el-radio
v-if="basePath.map(ele => ele.transName).includes('消费')"
:label="3"
>成交额等比奖励</el-radio>
</el-radio-group>
</div>
</div>
<div v-if="invitedAward.pointAwardMode == 1" class="m-t-20">
<div
v-if="invitedAward.pointAwardMode == 1"
class="m-t-20"
>
<div class="store-select-title">
<span class="font-14 color-606266">奖励额度:</span>
<el-input-number v-model="invitedAward.pointAwardPoint" controls-position="right" :min="1" :max="999999"> </el-input-number>
<el-input-number
v-model="invitedAward.pointAwardPoint"
controls-position="right"
:min="1"
:max="999999"
> </el-input-number>
<span class="font-14 color-606266">积分</span>
</div>
</div>
<div v-if="invitedAward.pointAwardMode == 2" class="m-t-20 w-845">
<div
v-if="invitedAward.pointAwardMode == 2"
class="m-t-20 w-845"
>
<div class="store-select-title">
<el-table :data="invitedAward.pointAwardStepParam" style="width: 100%">
<el-table
:data="invitedAward.pointAwardStepParam"
style="width: 100%"
>
<el-table-column label="成交额">
<template slot-scope="scope">
<div class="cell">
<div>
<span class="font-14 color-606266 p-r-10"></span>
<el-input-number v-model="scope.row.amount" controls-position="right" :min="1" :max="9999999999"> </el-input-number>
<el-input-number
v-model="scope.row.amount"
controls-position="right"
:min="1"
:max="9999999999"
> </el-input-number>
<span class="font-14 color-606266 p-l-10"></span>
</div>
</div>
......@@ -69,68 +120,143 @@ import inviteeReward from '@/components/active-config/configs/invitee-reward.vue
<el-table-column label="奖励积分">
<template slot-scope="scope">
<div class="cell">
<el-input-number v-model="scope.row.point" controls-position="right" :min="1" :max="999999"> </el-input-number>
<el-button v-if="scope.$index != 0" class="m-l-16" @click.stop="deleteRow(scope.$index, invitedAward.pointAwardStepParam)" type="text" size="small">
<el-input-number
v-model="scope.row.point"
controls-position="right"
:min="1"
:max="999999"
> </el-input-number>
<el-button
v-if="scope.$index != 0"
class="m-l-16"
@click.stop="deleteRow(scope.$index, invitedAward.pointAwardStepParam)"
type="text"
size="small"
>
删除
</el-button>
</div>
</template>
</el-table-column>
</el-table>
<div class="add-line text-center cursor-pointer" @click="addPointItem"><i class="el-icon-plus color-1890ff"></i><span class="color-1890ff font-14 p-l-10">添加奖项</span></div>
<div
class="add-line text-center cursor-pointer"
@click="addPointItem"
><i class="el-icon-plus color-1890ff"></i><span class="color-1890ff font-14 p-l-10">添加奖项</span></div>
</div>
</div>
<div v-if="invitedAward.pointAwardMode == 3" class="m-t-20">
<div
v-if="invitedAward.pointAwardMode == 3"
class="m-t-20"
>
<div class="store-select-title">
<span class="font-14 color-606266">奖励额度:</span>
<span class="font-14 color-606266">每消费</span>
<el-input-number v-model="invitedAward.pointAwardPerAmount" controls-position="right" :min="1" :max="999"> </el-input-number>
<el-input-number
v-model="invitedAward.pointAwardPerAmount"
controls-position="right"
:min="1"
:max="999"
> </el-input-number>
<span class="font-14 color-606266 p-l-3 p-r-10">元 奖励 </span>
<el-input-number v-model="invitedAward.pointAwardPerPoint" controls-position="right" :min="1" :max="999"> </el-input-number>
<el-input-number
v-model="invitedAward.pointAwardPerPoint"
controls-position="right"
:min="1"
:max="999"
> </el-input-number>
<span class="font-14 color-606266">积分</span>
</div>
</div>
</div>
</div>
</el-form-item>
<el-form-item class="m-t-20" label="" prop="">
<el-form-item
class="m-t-20"
label=""
prop=""
>
<div class="point-cell">
<div class="point-cell-title flex flex-space-between">
<div class="point-cell-name font-14 color-303133 font-w-600">卡券奖励</div>
<div class="point-cell-switch">
<el-switch v-model="invitedAward.cardSettingFlag" active-text="" inactive-text=""> </el-switch>
<el-switch
v-model="invitedAward.cardSettingFlag"
active-text=""
inactive-text=""
> </el-switch>
</div>
</div>
<div v-if="invitedAward.cardSettingFlag" class="point-cell-body">
<div
v-if="invitedAward.cardSettingFlag"
class="point-cell-body"
>
<div class="point-title-tip font-14 color-606266">该奖励仅适用于消费行为后的奖励,消费行为之前如果有送受邀人卡券的需求,请在转化路径中增加“卡券领取”环节。受邀人奖励中的卡券仅单纯作为奖励,不做转化路径的漏斗分析、活动效果分析等。</div>
<div data-v-6033a8b1="" class="el-form-item m-t-44">
<label for="" class="el-form-item__label" style="width: 85px;">奖励模式:</label>
<div class="el-form-item__content" style="margin-left: 85px;">
<div
data-v-6033a8b1=""
class="el-form-item m-t-44"
>
<label
for=""
class="el-form-item__label"
style="width: 85px;"
>奖励模式:</label>
<div
class="el-form-item__content"
style="margin-left: 85px;"
>
<el-radio-group v-model="invitedAward.cardAwardMode">
<el-radio :label="0">固定奖励</el-radio>
<el-radio v-if="basePath.map(ele => ele.transName).includes('消费')" :label="1">阶梯奖励</el-radio>
<el-radio
v-if="basePath.map(ele => ele.transName).includes('消费')"
:label="1"
>阶梯奖励</el-radio>
</el-radio-group>
</div>
</div>
<div v-if="invitedAward.cardAwardMode == 0" class="m-t-20 child-select-wrap">
<div
v-if="invitedAward.cardAwardMode == 0"
class="m-t-20 child-select-wrap"
>
<div class="store-select-title">
<span class="font-14 color-606266">选择卡券:</span>
<el-select class="w-240" v-model="invitedAward.cardId" placeholder="请选择" @change="changeSingleCard($event)">
<el-option v-for="item in cardList" :key="item.coupCardId" :label="item.cardName" :value="item.coupCardId"> </el-option>
<el-select
class="w-240"
v-model="invitedAward.cardId"
placeholder="请选择"
@change="changeSingleCard($event)"
>
<el-option
v-for="item in cardList"
:key="item.coupCardId"
:label="item.cardName"
:value="item.coupCardId"
> </el-option>
</el-select>
</div>
</div>
<div v-if="invitedAward.cardAwardMode == 1" class="m-t-20 child-select-wrap">
<el-table :data="invitedAward.cardAwardStepParam" style="width: 100%">
<div
v-if="invitedAward.cardAwardMode == 1"
class="m-t-20 child-select-wrap"
>
<el-table
:data="invitedAward.cardAwardStepParam"
style="width: 100%"
>
<el-table-column label="成交额">
<template slot-scope="scope">
<div class="cell">
<div>
<span class="font-14 color-606266 p-r-10"></span>
<el-input-number v-model="scope.row.amount" controls-position="right" :min="1" :max="9999999999"> </el-input-number>
<el-input-number
v-model="scope.row.amount"
controls-position="right"
:min="1"
:max="9999999999"
> </el-input-number>
<span class="font-14 color-606266 p-l-10"></span>
</div>
</div>
......@@ -139,17 +265,36 @@ import inviteeReward from '@/components/active-config/configs/invitee-reward.vue
<el-table-column label="奖励卡券">
<template slot-scope="scope">
<div class="cell">
<el-select class="w-240" v-model="scope.row.cardId" placeholder="请选择" @change="changeCard($event, scope.row)">
<el-option v-for="item in cardList" :key="item.coupCardId" :label="item.cardName" :value="item.coupCardId"> </el-option>
<el-select
class="w-240"
v-model="scope.row.cardId"
placeholder="请选择"
@change="changeCard($event, scope.row)"
>
<el-option
v-for="item in cardList"
:key="item.coupCardId"
:label="item.cardName"
:value="item.coupCardId"
> </el-option>
</el-select>
<el-button v-if="scope.$index != 0" class="m-l-16" @click.stop="deleteRow(scope.$index, invitedAward.cardAwardStepParam)" type="text" size="small">
<el-button
v-if="scope.$index != 0"
class="m-l-16"
@click.stop="deleteRow(scope.$index, invitedAward.cardAwardStepParam)"
type="text"
size="small"
>
删除
</el-button>
</div>
</template>
</el-table-column>
</el-table>
<div class="add-line text-center cursor-pointer" @click="addCardItem"><i class="el-icon-plus color-1890ff"></i><span class="color-1890ff font-14 p-l-10">添加奖项</span></div>
<div
class="add-line text-center cursor-pointer"
@click="addCardItem"
><i class="el-icon-plus color-1890ff"></i><span class="color-1890ff font-14 p-l-10">添加奖项</span></div>
</div>
</div>
</div>
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-11-18 10:37:02
* @LastEditors: 无尘
* @LastEditTime: 2019-11-29 18:06:41
* @LastEditTime: 2019-12-02 11:22:25
-->
<!--
<reward-config @submitBack="submitBack" @submitNext="submitNext"></reward-config>
......@@ -14,14 +14,29 @@ import rewardConfig from '@/components/active-config/reward-config.vue';
<template>
<div class="reward-config-content">
<div class="config-title font-14 color-303133">奖励配置</div>
<el-form label-width="154px" :model="activeInfoData" ref="rewardForm" :rules="rules">
<el-form-item label="奖励模式:" prop="awardMode">
<el-form
label-width="154px"
:model="activeInfoData"
ref="rewardForm"
:rules="rules"
>
<el-form-item
label="奖励模式:"
prop="awardMode"
>
<ul class="flex">
<template v-for="(item, index) in awardData">
<li :class="['li-cell flex-1 ', activeInfoData.awardMode == item.goalId ? 'li-cell-active' : '']" :key="index + 'first'" @click="selectMode(item)">
<li
:class="['li-cell flex-1 ', activeInfoData.awardMode == item.goalId ? 'li-cell-active' : '']"
:key="index + 'first'"
@click="selectMode(item)"
>
<div class="li-cell-inner flex ">
<div class="li-cell-left flex flex-align-center flex-pack-center">
<img :src="activeInfoData.awardMode == item.goalId ? item.selectedIconUrl : item.iconUrl" alt="" />
<img
:src="activeInfoData.awardMode == item.goalId ? item.selectedIconUrl : item.iconUrl"
alt=""
/>
</div>
<div class="li-cell-right border-box flex flex-column ">
<div class="li-cell-active_name flex flex-align-center font-18 color-303133">{{ item.goalName }}</div>
......@@ -39,10 +54,18 @@ import rewardConfig from '@/components/active-config/reward-config.vue';
</template>
</ul>
</el-form-item>
<el-form-item v-if="activeInfoData.awardMode == 1" label="奖励方案(多选):" prop="">
<el-form-item
v-if="activeInfoData.awardMode == 1"
label="奖励方案(多选):"
prop=""
>
<ul class="flex m-t-48">
<template v-for="(item, index) in awardTypeData">
<li :class="['li-cell li-second-cell flex-1 ', activeInfoData[item.key] ? 'li-second-active' : '']" :key="index + 'second'" @click="selectModeType(item, activeInfoData)">
<li
:class="['li-cell li-second-cell flex-1 ', activeInfoData[item.key] ? 'li-second-active' : '']"
:key="index + 'second'"
@click="selectModeType(item, activeInfoData)"
>
<div class="li-cell-inner">
<div class="li-cell-bottom border-box">
<div class="li-cell-scene">
......@@ -62,54 +85,129 @@ import rewardConfig from '@/components/active-config/reward-config.vue';
</template>
</ul>
</el-form-item>
<el-form-item v-if="activeInfoData.awardMode == 1" class="m-t-50">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane v-if="basePath.map(ele => ele.transName).includes('消费')" label="消费行为控制" name="first">
<el-form-item
v-if="activeInfoData.awardMode == 1"
class="m-t-50"
>
<el-tabs
v-model="activeName"
type="card"
@tab-click="handleClick"
>
<el-tab-pane
v-if="basePath.map(ele => ele.transName).includes('消费')"
label="消费行为控制"
name="first"
>
<!-- 消费行为控制 -->
<consume-config ref="singleConsume" v-model="activeInfoData.consumeAction"></consume-config>
<consume-config
ref="singleConsume"
v-model="activeInfoData.consumeAction"
></consume-config>
</el-tab-pane>
<el-tab-pane v-if="activeInfoData.instantAwardFlag" label="即时奖励配置" name="second">
<el-tab-pane
v-if="activeInfoData.instantAwardFlag"
label="即时奖励配置"
name="second"
>
<!-- 即时奖励配置 -->
<spot-award ref="singleSpot" v-model="activeInfoData.instanceAward"></spot-award>
<spot-award
ref="singleSpot"
v-model="activeInfoData.instanceAward"
></spot-award>
</el-tab-pane>
<el-tab-pane v-if="activeInfoData.passAwardFlag" label="闯关奖励配置" name="third">
<el-tab-pane
v-if="activeInfoData.passAwardFlag"
label="闯关奖励配置"
name="third"
>
<!-- 闯关奖励配置 -->
<entry-award ref="singleEntry" v-model="activeInfoData.passAward"></entry-award>
<entry-award
ref="singleEntry"
v-model="activeInfoData.passAward"
></entry-award>
</el-tab-pane>
<el-tab-pane v-if="activeInfoData.competitionAwardFlag" label="竞赛奖励配置" name="four">
<competition-award ref="singleCompetition" v-model="activeInfoData.compitionAward"></competition-award>
<el-tab-pane
v-if="activeInfoData.competitionAwardFlag"
label="竞赛奖励配置"
name="four"
>
<competition-award
ref="singleCompetition"
v-model="activeInfoData.compitionAward"
></competition-award>
<!-- 竞赛奖励配置 -->
</el-tab-pane>
<el-tab-pane label="受邀人奖励" name="five">
<el-tab-pane
label="受邀人奖励"
name="five"
>
<!-- 受邀人奖励 -->
<invitee-reward ref="singleInvitee" v-model="activeInfoData.invitedAward"></invitee-reward>
<invitee-reward
ref="singleInvitee"
v-model="activeInfoData.invitedAward"
></invitee-reward>
</el-tab-pane>
<el-tab-pane v-if="basePath.map(ele => ele.transName).includes('消费')" label="防欺诈风险控制" name="six">
<el-tab-pane
v-if="basePath.map(ele => ele.transName).includes('消费')"
label="防欺诈风险控制"
name="six"
>
<!-- 防欺诈风险控制 -->
<fraud-control ref="singleFreeze" v-model="activeInfoData.pointFreeze"></fraud-control>
<fraud-control
ref="singleFreeze"
v-model="activeInfoData.pointFreeze"
></fraud-control>
</el-tab-pane>
</el-tabs>
</el-form-item>
<el-form-item v-if="activeInfoData.awardMode == 2" class="m-t-50">
<el-form-item
v-if="activeInfoData.awardMode == 2"
class="m-t-50"
>
<ul class="active-big-class">
<template v-for="(parentItem, ind) in ProgressiveData">
<li :key="ind + 'set'" :class="['parent-li-cell border-box', parentItem.serviceAttentionFlag ? 'show-active-li' : '']">
<li
:key="ind + 'set'"
:class="['parent-li-cell border-box', parentItem.switchFlag ? 'show-active-li' : '']"
>
<div class="progress-active-title flex flex-space-between border-box">
<div class="active-title-left">
<div class="active-title-title font-16 color-303133">{{ parentItem.title }}</div>
<div class="active-title-subtitle font-14 color-606266 m-t-7">{{ parentItem.subTitle }}</div>
</div>
<div class="active-title-right flex flex-align-center">
<el-switch v-model="parentItem.serviceAttentionFlag" active-text="" inactive-text=""> </el-switch>
<el-switch
v-model="parentItem.switchFlag"
active-text=""
inactive-text=""
> </el-switch>
</div>
</div>
<div v-if="parentItem.serviceAttentionFlag" class="set-body">
<div data-v-6033a8b1="" class="el-form-item m-t-44">
<label for="" class="el-form-item__label" style="width: 115px;">奖励模式:</label>
<div class="el-form-item__content" style="margin-left: 115px;">
<div
v-if="parentItem.switchFlag"
class="set-body"
>
<div
data-v-6033a8b1=""
class="el-form-item m-t-44"
>
<label
for=""
class="el-form-item__label"
style="width: 115px;"
>奖励模式:</label>
<div
class="el-form-item__content"
style="margin-left: 115px;"
>
<ul class="flex m-t-48">
<template v-for="(item, index) in awardTypeData">
<li :class="['li-cell li-second-cell flex-1 ', parentItem[item.key] ? 'li-second-active' : '']" :key="index + 'second'" @click="selectModeType(item, parentItem)">
<li
:class="['li-cell li-second-cell flex-1 ', parentItem[item.key] ? 'li-second-active' : '']"
:key="index + 'second'"
@click="selectModeType(item, parentItem)"
>
<div class="li-cell-inner">
<div class="li-cell-bottom border-box">
<div class="li-cell-scene">
......@@ -130,105 +228,93 @@ import rewardConfig from '@/components/active-config/reward-config.vue';
</ul>
</div>
</div>
<el-tabs class="m-t-30" v-model="parentItem.activeName" type="card" @tab-click="handleClick">
<el-tab-pane v-if="basePath.map(ele => ele.transName).includes('消费')" label="消费行为控制" name="first">
<el-tabs
class="m-t-30"
v-model="parentItem.activeName"
type="card"
@tab-click="handleClick"
>
<el-tab-pane
v-if="basePath.map(ele => ele.transName).includes('消费')"
label="消费行为控制"
name="first"
>
<!-- 消费行为控制 -->
<consume-config ref="singleConsume" v-model="parentItem.consumeAction"></consume-config>
<consume-config
ref="multConsume"
v-model="parentItem.consumeAction"
></consume-config>
</el-tab-pane>
<el-tab-pane v-if="parentItem.instantAwardFlag" label="即时奖励配置" name="second">
<el-tab-pane
v-if="parentItem.instantAwardFlag"
label="即时奖励配置"
name="second"
>
<!-- 即时奖励配置 -->
<spot-award></spot-award>
<spot-award
ref="multSpot"
v-model="parentItem.instanceAward"
></spot-award>
</el-tab-pane>
<el-tab-pane v-if="parentItem.passAwardFlag" label="闯关奖励配置" name="third">
<el-tab-pane
v-if="parentItem.passAwardFlag"
label="闯关奖励配置"
name="third"
>
<!-- 闯关奖励配置 -->
<entry-award></entry-award>
<entry-award
ref="multEntry"
v-model="parentItem.passAward"
></entry-award>
</el-tab-pane>
<el-tab-pane v-if="parentItem.competitionAwardFlag" label="竞赛奖励配置" name="four">
<competition-award></competition-award>
<el-tab-pane
v-if="parentItem.competitionAwardFlag"
label="竞赛奖励配置"
name="four"
>
<competition-award
ref="multCompetition"
v-model="parentItem.compitionAward"
></competition-award>
<!-- 竞赛奖励配置 -->
</el-tab-pane>
<el-tab-pane label="受邀人奖励" name="five">
<el-tab-pane
label="受邀人奖励"
name="five"
>
<!-- 受邀人奖励 -->
<invitee-reward></invitee-reward>
<invitee-reward
ref="multInvitee"
v-model="parentItem.invitedAward"
></invitee-reward>
</el-tab-pane>
<el-tab-pane v-if="basePath.map(ele => ele.transName).includes('消费')" label="防欺诈风险控制" name="six">
<el-tab-pane
v-if="basePath.map(ele => ele.transName).includes('消费')"
label="防欺诈风险控制"
name="six"
>
<!-- 防欺诈风险控制 -->
<fraud-control></fraud-control>
</el-tab-pane>
</el-tabs>
</div>
</li>
<li v-if="basePath.map(ele => ele.transName).includes('消费')" :key="ind + 'set'" :class="['parent-li-cell border-box', parentItem.serviceAttentionFlag ? 'show-active-li' : '']">
<div class="progress-active-title flex flex-space-between border-box">
<div class="active-title-left">
<div class="active-title-title font-16 color-303133">{{ parentItem.title }}</div>
<div class="active-title-subtitle font-14 color-606266 m-t-7">{{ parentItem.subTitle }}</div>
</div>
<div class="active-title-right flex flex-align-center">
<el-switch v-model="parentItem.serviceAttentionFlag" active-text="" inactive-text=""> </el-switch>
</div>
</div>
<div v-if="parentItem.serviceAttentionFlag" class="set-body">
<div data-v-6033a8b1="" class="el-form-item m-t-44">
<label for="" class="el-form-item__label" style="width: 115px;">奖励模式:</label>
<div class="el-form-item__content" style="margin-left: 115px;">
<ul class="flex m-t-48">
<template v-for="(item, index) in awardTypeData">
<li :class="['li-cell li-second-cell flex-1 ', parentItem[item.key] ? 'li-second-active' : '']" :key="index + 'second'" @click="selectModeType(item, parentItem)">
<div class="li-cell-inner">
<div class="li-cell-bottom border-box">
<div class="li-cell-scene">
<div class="li-cell-scene_title font-14 color-303133">{{ item.goalName }}</div>
<div class="li-cell-scene_text font-14 color-606266">{{ item.describe }}</div>
</div>
</div>
</div>
<div class="common-cell-check">
<div class="common-cell-triangle">
<div class="common-cell-outer">
<i class="el-icon-upload-success el-icon-check"></i>
</div>
</div>
</div>
</li>
</template>
</ul>
</div>
</div>
<el-tabs class="m-t-30" v-model="parentItem.activeName" type="card" @tab-click="handleClick">
<el-tab-pane v-if="basePath.map(ele => ele.transName).includes('消费')" label="消费行为控制" name="first">
<!-- 消费行为控制 -->
<consume-config ref="singleConsume" v-model="parentItem.consumeAction"></consume-config>
</el-tab-pane>
<el-tab-pane v-if="parentItem.instantAwardFlag" label="即时奖励配置" name="second">
<!-- 即时奖励配置 -->
<spot-award></spot-award>
</el-tab-pane>
<el-tab-pane v-if="parentItem.passAwardFlag" label="闯关奖励配置" name="third">
<!-- 闯关奖励配置 -->
<entry-award></entry-award>
</el-tab-pane>
<el-tab-pane v-if="parentItem.competitionAwardFlag" label="竞赛奖励配置" name="four">
<competition-award></competition-award>
<!-- 竞赛奖励配置 -->
</el-tab-pane>
<el-tab-pane label="受邀人奖励" name="five">
<!-- 受邀人奖励 -->
<invitee-reward></invitee-reward>
</el-tab-pane>
<el-tab-pane v-if="basePath.map(ele => ele.transName).includes('消费')" label="防欺诈风险控制" name="six">
<!-- 防欺诈风险控制 -->
<fraud-control></fraud-control>
<fraud-control
ref="multFreeze"
v-model="parentItem.pointFreeze"
></fraud-control>
</el-tab-pane>
</el-tabs>
</div>
</li>
</template>
</ul>
</el-form-item>
<el-form-item class="m-t-50">
<el-button type="primary" @click="submitBack">上一步</el-button>
<el-button type="primary" @click="submitForm('rewardForm')">确认新建</el-button>
<el-button
type="primary"
@click="submitBack"
>上一步</el-button>
<el-button
type="primary"
@click="submitForm('rewardForm')"
>确认新建</el-button>
</el-form-item>
</el-form>
</div>
......@@ -1068,7 +1154,6 @@ export default {
changeModeData() {
const that = this;
// 根据路径
console.log(that);
for (const i in that.switchObj) {
that.basePath.forEach(ele => {
if (ele.transName == that.switchObj[i]) {
......@@ -1076,6 +1161,11 @@ export default {
}
});
}
that.$nextTick(() => {
that.ProgressiveData[that.ProgressiveData.length-1].switchFlag = true;
that.$forceUpdate();
})
console.log(that.ProgressiveData);
},
/**
......@@ -1117,31 +1207,26 @@ export default {
return false;
}
const spot = that.activeInfoData.instantAwardFlag == 1 ? await that.$refs.singleSpot.submitForm() : true;
console.log(spot);
if (!spot) {
showMsg.showmsg('请完善即时奖励配置', 'warning');
return false;
}
const entry = that.activeInfoData.passAwardFlag == 1 ? await that.$refs.singleEntry.submitForm() : true;
console.log(entry);
if (!entry) {
showMsg.showmsg('请完善闯关奖励配置', 'warning');
return false;
}
const competition = that.activeInfoData.competitionAwardFlag == 1 ? await that.$refs.singleCompetition.submitForm() : true;
console.log(competition);
if (!competition) {
showMsg.showmsg('请完善竞赛奖励配置', 'warning');
return false;
}
const invitee = await that.$refs.singleInvitee.submitForm();
console.log(invitee);
if (!invitee) {
showMsg.showmsg('请完善受邀人奖励配置', 'warning');
return false;
}
const freeze = that.basePath.map(ele => ele.transName).includes('消费') ? await that.$refs.singleFreeze.submitForm() : true;
console.log(freeze);
console.log('单次数据', that.activeInfoData);
const postData = {
activityId: that.activeInfoData.activityId,
......@@ -1152,7 +1237,95 @@ export default {
},
async moreCheck() {
const that = this;
that.postSave();
let flag = true;
if (!!that.$refs.hasOwnProperty('multConsume') && that.$refs.multConsume.length ) {
console.log(that.$refs)
for (let index = 0; index < that.$refs.multConsume.length; index++) {
flag = await that.$refs.multConsume[index].submitForm();
if (!flag) {
break;
}
}
}
if (!flag) {
showMsg.showmsg('请完善消费行为控制', 'warning');
return false;
}
let spot = true;
if (!!that.$refs.hasOwnProperty('multSpot') && that.$refs.multSpot.length ) {
for (let index = 0; index < that.$refs.multSpot.length; index++) {
spot = await that.$refs.multSpot[index].submitForm()
if (!spot) {
break;
}
}
}
if (!spot) {
showMsg.showmsg('请完善即时奖励配置', 'warning');
return false;
}
let entry = true;
if (!!that.$refs.hasOwnProperty('multEntry') && that.$refs.multEntry.length ) {
for (let index = 0; index < that.$refs.multEntry.length; index++) {
entry = await that.$refs.multEntry[index].submitForm()
if (!entry) {
break;
}
}
}
if (!entry) {
showMsg.showmsg('请完善闯关奖励配置', 'warning');
return false;
}
let competition = true;
if (!!that.$refs.hasOwnProperty('multCompetition') && that.$refs.multCompetition.length ) {
for (let index = 0; index < that.$refs.multCompetition.length; index++) {
competition = await that.$refs.multCompetition[index].submitForm()
if (!competition) {
break;
}
}
}
if (!competition) {
showMsg.showmsg('请完善竞赛奖励配置', 'warning');
return false;
}
let invitee = true;
if (!!that.$refs.hasOwnProperty('multInvitee') && that.$refs.multInvitee.length ) {
for (let index = 0; index < that.$refs.multInvitee.length; index++) {
invitee = await that.$refs.multInvitee[index].submitForm()
if (!invitee) {
break;
}
}
}
if (!invitee) {
showMsg.showmsg('请完善受邀人奖励配置', 'warning');
return false;
}
let freeze = true;
if (!!that.$refs.multFreeze && that.$refs.multFreeze.length ) {
for (let index = 0; index < that.$refs.multFreeze.length; index++) {
freeze = await that.$refs.multFreeze[index].submitForm()
if (!freeze) {
break;
}
}
}
// true--->1; false--->0
that.ProgressiveData.forEach(ele => {
if (ele.hasOwnProperty('invitedAward')) {
ele.invitedAward.pointSettingFlag = ele.invitedAward.pointSettingFlag ? 1:0;
ele.invitedAward.cardSettingFlag = ele.invitedAward.cardSettingFlag ? 1: 0;
}
})
const postData = {
activityId: that.activeInfoData.activityId,
awardMode: that.activeInfoData.awardMode,
awardItems: that.ProgressiveData
};
that.postSave(postData);
},
postSave(data) {
const that = this;
......@@ -1193,7 +1366,7 @@ export default {
if (resData.result.awardMode == 1) {
const obj = {
activityId: resData.result.activityId,
awardMode: '1',
awardMode: resData.result.awardMode,
instantAwardFlag: resData.result.awardItems[0].instantAwardFlag, // 即时
passAwardFlag: resData.result.awardItems[0].passAwardFlag, // 闯关
competitionAwardFlag: resData.result.awardItems[0].competitionAwardFlag, // 竞赛
......@@ -1211,7 +1384,15 @@ export default {
invitedAward: resData.result.awardItems[0].invitedAward,
pointFreeze: resData.result.awardItems[0].pointFreeze
};
if (obj.invitedAward) {
obj.invitedAward.pointSettingFlag = obj.invitedAward.pointSettingFlag==1 ? true:false;
obj.invitedAward.cardSettingFlag = obj.invitedAward.cardSettingFlag==1 ? true: false;
}
that.activeInfoData = obj;
}else {
that.activeInfoData.activityId = resData.result.activityId;
that.activeInfoData.awardMode = resData.result.awardMode;
that.ProgressiveData = resData.result.awardItems;
}
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment