Commit 49096f08 by 无尘

feat: 增加奖励

parent c6e65125
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>分享有礼</title><link href=./static/css/app.6286b0c76e2419d22746fc857448641d.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.da6797f5f0cd59d4fa11.js></script><script type=text/javascript src=./static/js/vendor.14f8172dd3290d7d86d8.js></script><script type=text/javascript src=./static/js/app.fea04cb8f4b9cb9f749e.js></script></body></html> <!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>分享有礼</title><link href=./static/css/app.d6b39b4ba4fd6cd2dd124cb1bcc10968.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.941944a8b361417f65d1.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 \ 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,f){for(var a,i,u,d=0,b=[];d<r.length;d++)i=r[d],t[i]&&b.push(t[i][0]),t[i]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(n&&n(r,c,f);b.length;)b.shift()();if(f)for(d=0;d<f.length;d++)u=o(o.s=f[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],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,o.nc&&f.setAttribute("nonce",o.nc),f.src=o.p+"static/js/"+e+"."+{0:"faf56cdf4f10498cbe2c",1:"5b546fa38466a0b05e37",2:"40b6bfef65bf1cfe775f",3:"7515b04a731a0ab774ca",4:"e42560cdcc9ef2f1fe8a",5:"8ecd133bf1cda0bdffb4",6:"fda09ea240d5c03fd4f4",7:"b0fd74564cc799593b8f",8:"fe9ec49f63ecd8e527ba",9:"522a01ff8d619d2bf030",10:"e16b73d2d4b922255e52",11:"c11d02c33702d00b2e2e",12:"b96af0829c134b12bfbb"}[e]+".js";var a=setTimeout(i,12e4);function i(){f.onerror=f.onload=null,clearTimeout(a);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return f.onerror=f.onload=i,c.appendChild(f),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}}([]); !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:"0764e3cc2e64be221503",3:"c3f9dee37529d99c9b02",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 \ No newline at end of file
...@@ -130,11 +130,11 @@ export default { ...@@ -130,11 +130,11 @@ export default {
consumeStoreControlFlag: 0, //消费门店控制开关 1控制,0不控制 consumeStoreControlFlag: 0, //消费门店控制开关 1控制,0不控制
consumeStoreName: '', //消费门店文案 consumeStoreName: '', //消费门店文案
dealAmountControlFlag: 0, //成交额控制开关 0不控制,1控制区间 dealAmountControlFlag: 0, //成交额控制开关 0不控制,1控制区间
dealAmountControlMin: 0, //成交额控制最小值 dealAmountControlMin: 1, //成交额控制最小值
dealAmountControlMax: 0, //成交额控制最大值 dealAmountControlMax: 1, //成交额控制最大值
singleDealNumberControlFlag: 0, //单笔成交件数控制开关 0不控制,1控制区间 singleDealNumberControlFlag: 0, //单笔成交件数控制开关 0不控制,1控制区间
singleDealNumberControlMin: 0, //单笔成交件数最小值 singleDealNumberControlMin: 1, //单笔成交件数最小值
singleDealNumberControlMax: 0, //单笔成交件数最大值 singleDealNumberControlMax: 1, //单笔成交件数最大值
uuid: '', uuid: '',
storeList: [] storeList: []
}; };
...@@ -150,11 +150,11 @@ export default { ...@@ -150,11 +150,11 @@ export default {
consumeStoreControlFlag: 0, //消费门店控制开关 1控制,0不控制 consumeStoreControlFlag: 0, //消费门店控制开关 1控制,0不控制
consumeStoreName: '', //消费门店文案 consumeStoreName: '', //消费门店文案
dealAmountControlFlag: 0, //成交额控制开关 0不控制,1控制区间 dealAmountControlFlag: 0, //成交额控制开关 0不控制,1控制区间
dealAmountControlMin: 0, //成交额控制最小值 dealAmountControlMin: 1, //成交额控制最小值
dealAmountControlMax: 0, //成交额控制最大值 dealAmountControlMax: 1, //成交额控制最大值
singleDealNumberControlFlag: 0, //单笔成交件数控制开关 0不控制,1控制区间 singleDealNumberControlFlag: 0, //单笔成交件数控制开关 0不控制,1控制区间
singleDealNumberControlMin: 0, //单笔成交件数最小值 singleDealNumberControlMin: 1, //单笔成交件数最小值
singleDealNumberControlMax: 0, //单笔成交件数最大值 singleDealNumberControlMax: 1, //单笔成交件数最大值
uuid: '', uuid: '',
storeList: [] storeList: []
}, },
...@@ -202,15 +202,18 @@ export default { ...@@ -202,15 +202,18 @@ export default {
*/ */
submitForm() { submitForm() {
const that = this; const that = this;
that.consumeAction.storeList = that.refs.storeCard.rightList; that.consumeAction.storeList = that.consumeAction.consumeStoreControlFlag == 0 ? [] : that.$refs.storeCard.rightList;
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
that.$refs['consumeForm'].validate(valid => { that.$refs['consumeForm'].validate(valid => {
if (valid) { if (valid) {
that.consumeAction.storeList = that.refs.storeCard.rightList; that.consumeAction.storeList = that.consumeAction.consumeStoreControlFlag == 0 ? [] : that.$refs.storeCard.rightList;
that.$emit('input', that.consumeAction); that.$emit('input', that.consumeAction);
if (that.consumeAction.consumeStoreControlFlag == 1 && (!that.consumeAction.storeList || !that.consumeAction.storeList.length || !that.consumeAction.consumeStoreName)) {
resolve(false);
}
resolve(that.consumeAction); resolve(that.consumeAction);
} else { } else {
reject(false); resolve(false);
} }
}); });
}); });
......
...@@ -14,33 +14,20 @@ import fraudControl from '@/components/active-config/configs/fraud-control.vue'; ...@@ -14,33 +14,20 @@ import fraudControl from '@/components/active-config/configs/fraud-control.vue';
<template> <template>
<div class="fraud-control border-box"> <div class="fraud-control border-box">
<el-form <el-form label-width="154px" :model="pointFreeze" ref="rewardForm" :rules="rules">
label-width="154px" <div role="alert" class="el-alert el-alert--info">
:model="pointFreeze"
ref="rewardForm"
:rules="rules"
>
<div
role="alert"
class="el-alert el-alert--info"
>
<i class="el-alert__icon el-icon-info font-12 color-1890ff"></i> <i class="el-alert__icon el-icon-info font-12 color-1890ff"></i>
<div class="el-alert__content"> <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"
这能有效的杜绝邀请人在闯关奖励、竞赛奖励中采用作弊手段(即时奖励有单独的限制控制,该成交额上限对即时奖励不起作用)。</span> >为了获取邀请人奖励,可能会出现恶意盗刷的情况,因此系统支持对单个受邀人的成交额累计上限做控制。<br />
这能有效的杜绝邀请人在闯关奖励、竞赛奖励中采用作弊手段(即时奖励有单独的限制控制,该成交额上限对即时奖励不起作用)。</span
>
</div> </div>
</div> </div>
<el-form-item <el-form-item label="成交额上限控制:" prop="">
label="成交额上限控制:"
prop=""
>
<ul class="flex "> <ul class="flex ">
<template v-for="(item, index) in modeData"> <template v-for="(item, index) in modeData">
<li <li :class="['li-cell li-second-cell flex-1 ', pointFreeze.numberLimitType == item.goalId ? 'li-second-active' : '']" :key="index + 'first'" @click="selectStore(item)">
:class="['li-cell li-second-cell flex-1 ', pointFreeze.numberLimitType == item.goalId ? 'li-second-active' : '']"
:key="index + 'first'"
@click="selectStore(item)"
>
<div class="li-cell-inner"> <div class="li-cell-inner">
<div class="li-cell-bottom border-box"> <div class="li-cell-bottom border-box">
<div class="li-cell-scene"> <div class="li-cell-scene">
...@@ -59,43 +46,24 @@ import fraudControl from '@/components/active-config/configs/fraud-control.vue'; ...@@ -59,43 +46,24 @@ import fraudControl from '@/components/active-config/configs/fraud-control.vue';
</li> </li>
</template> </template>
</ul> </ul>
<div <div v-if="pointFreeze.numberLimitType == 2" class="store-select-wrap">
v-if="pointFreeze.numberLimitType == 2"
class="store-select-wrap"
>
<div class="store-select-title"> <div class="store-select-title">
<span class="font-14 color-606266">限制额度:</span> <span class="font-14 color-606266">限制额度:</span>
<el-input-number <el-input-number v-model="pointFreeze.numberLimitNum" controls-position="right" :min="1" :max="999999"> </el-input-number>
v-model="pointFreeze.numberLimitNum"
controls-position="right"
:min="1"
:max="999999"
> </el-input-number>
<span class="font-14 color-606266"></span> <span class="font-14 color-606266"></span>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<div <div role="alert" class="el-alert el-alert--info m-t-20">
role="alert"
class="el-alert el-alert--info m-t-20"
>
<i class="el-alert__icon el-icon-info font-12 color-1890ff"></i> <i class="el-alert__icon el-icon-info font-12 color-1890ff"></i>
<div class="el-alert__content"> <div class="el-alert__content">
<span class="el-alert__title color-606266 font-14 font-w-400">转化路径的一系列节点中,消费行为尤其特殊,因为可以申请退款,所以涉及到奖励回收的问题。请根据自身的活动政策,配置相关的风险控制策略。注意:仅针对即时奖励可进行控制,闯关奖励、竞赛奖励和受邀人奖励不作回收处理。由于即时奖励中没有卡券类奖励,因此没有卡券处理方案的配置。</span> <span class="el-alert__title color-606266 font-14 font-w-400">转化路径的一系列节点中,消费行为尤其特殊,因为可以申请退款,所以涉及到奖励回收的问题。请根据自身的活动政策,配置相关的风险控制策略。注意:仅针对即时奖励可进行控制,闯关奖励、竞赛奖励和受邀人奖励不作回收处理。由于即时奖励中没有卡券类奖励,因此没有卡券处理方案的配置。</span>
</div> </div>
</div> </div>
<el-form-item <el-form-item class="m-t-20" label="积分处理方案:" prop="">
class="m-t-20"
label="积分处理方案:"
prop=""
>
<ul class="flex "> <ul class="flex ">
<template v-for="(item, index) in contentData"> <template v-for="(item, index) in contentData">
<li <li :class="['li-cell li-second-cell flex-1 ', pointFreeze.awardLimitType == item.goalId ? 'li-second-active' : '']" :key="index + 'first'" @click="selectMoney(item)">
:class="['li-cell li-second-cell flex-1 ', pointFreeze.awardLimitType == item.goalId ? 'li-second-active' : '']"
:key="index + 'first'"
@click="selectMoney(item)"
>
<div class="li-cell-inner"> <div class="li-cell-inner">
<div class="li-cell-bottom border-box"> <div class="li-cell-bottom border-box">
<div class="li-cell-scene"> <div class="li-cell-scene">
...@@ -114,33 +82,17 @@ import fraudControl from '@/components/active-config/configs/fraud-control.vue'; ...@@ -114,33 +82,17 @@ import fraudControl from '@/components/active-config/configs/fraud-control.vue';
</li> </li>
</template> </template>
</ul> </ul>
<div <div v-if="pointFreeze.awardLimitType == 1" class="store-select-wrap child-select-wrap">
v-if="pointFreeze.awardLimitType == 1"
class="store-select-wrap child-select-wrap"
>
<div class="store-select-title"> <div class="store-select-title">
<span class="font-14 color-606266">延时时长:</span> <span class="font-14 color-606266">延时时长:</span>
<el-input-number <el-input-number v-model="pointFreeze.operateDay" controls-position="right" :min="1" :max="99"> </el-input-number>
v-model="pointFreeze.operateDay"
controls-position="right"
:min="1"
:max="99"
> </el-input-number>
<span class="font-14 color-606266 p-l-3 p-r-10"></span> <span class="font-14 color-606266 p-l-3 p-r-10"></span>
</div> </div>
</div> </div>
<div <div v-if="pointFreeze.awardLimitType == 2" class="store-select-wrap child-select-wrap">
v-if="pointFreeze.awardLimitType == 2"
class="store-select-wrap child-select-wrap"
>
<div class="store-select-title"> <div class="store-select-title">
<span class="font-14 color-606266">冻结时长:</span> <span class="font-14 color-606266">冻结时长:</span>
<el-input-number <el-input-number v-model="pointFreeze.operateDay" controls-position="right" :min="1" :max="99"> </el-input-number>
v-model="pointFreeze.operateDay"
controls-position="right"
:min="1"
:max="99"
> </el-input-number>
<span class="font-14 color-606266 p-l-3 p-r-10"></span> <span class="font-14 color-606266 p-l-3 p-r-10"></span>
</div> </div>
</div> </div>
...@@ -151,6 +103,14 @@ import fraudControl from '@/components/active-config/configs/fraud-control.vue'; ...@@ -151,6 +103,14 @@ import fraudControl from '@/components/active-config/configs/fraud-control.vue';
<script> <script>
export default { export default {
name: 'fraud-control', name: 'fraud-control',
props: {
value: {
type: [Object, Array],
default() {
return {};
}
}
},
components: {}, components: {},
data() { data() {
return { return {
...@@ -200,13 +160,15 @@ export default { ...@@ -200,13 +160,15 @@ export default {
*/ */
submitForm() { submitForm() {
const that = this; const that = this;
that.consumeAction.storeList = that.refs.storeCard.rightList; return new Promise(function(resolve, reject) {
that.$refs['rewardForm'].validate(valid => { that.$refs['rewardForm'].validate(valid => {
if (valid) { if (valid) {
that.consumeAction.storeList = that.refs.storeCard.rightList; that.$emit('input', that.pointFreeze);
} else { resolve(that.pointFreeze);
return false; } else {
} resolve(false);
}
});
}); });
}, },
/** /**
...@@ -235,9 +197,16 @@ export default { ...@@ -235,9 +197,16 @@ export default {
}); });
} }
}, },
/* mounted() { watch: {
value(newData) {
const that = this;
that.pointFreeze = JSON.parse(JSON.stringify(newData));
}
},
mounted() {
const that = this; const that = this;
} */ that.pointFreeze = JSON.parse(JSON.stringify(that.value));
}
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-11-21 16:37:02 * @Date: 2019-11-21 16:37:02
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-11-25 11:13:58 * @LastEditTime: 2019-11-29 10:00:28
--> -->
<!-- <!--
<spot-award></spot-award> <spot-award></spot-award>
...@@ -18,7 +18,24 @@ import spotAward from '@/components/active-config/configs/spot-award.vue'; ...@@ -18,7 +18,24 @@ import spotAward from '@/components/active-config/configs/spot-award.vue';
<el-form-item label="即时奖励模式:" prop=""> <el-form-item label="即时奖励模式:" prop="">
<ul class="flex "> <ul class="flex ">
<template v-for="(item, index) in modeData"> <template v-for="(item, index) in modeData">
<li :class="['li-cell li-second-cell flex-1 ', instanceAward.instanceMade == item.goalId ? 'li-second-active' : '']" :key="index + 'first'" @click="selectStore(item)"> <li v-if="index != 2" :class="['li-cell li-second-cell flex-1 ', instanceAward.instanceMade == item.goalId ? '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">
<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>
<li v-if="basePath.map(ele => ele.transName).includes('消费') && index == 2" :class="['li-cell li-second-cell flex-1 ', instanceAward.instanceMade == item.goalId ? 'li-second-active' : '']" :key="index + 'first'" @click="selectStore(item)">
<div class="li-cell-inner"> <div class="li-cell-inner">
<div class="li-cell-bottom border-box"> <div class="li-cell-bottom border-box">
<div class="li-cell-scene"> <div class="li-cell-scene">
...@@ -67,8 +84,8 @@ import spotAward from '@/components/active-config/configs/spot-award.vue'; ...@@ -67,8 +84,8 @@ import spotAward from '@/components/active-config/configs/spot-award.vue';
<span class="font-14 color-606266 p-r-10"></span> <span class="font-14 color-606266 p-r-10"></span>
<el-input-number v-model="scope.row.start" controls-position="right" :min="1" :max="999999"> </el-input-number> <el-input-number v-model="scope.row.start" controls-position="right" :min="1" :max="999999"> </el-input-number>
<span v-if="scope.row.infinity" class="font-14 color-606266 p-l-10 p-r-10">人 至</span> <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" controls-position="right" :min="1" :max="999999"> </el-input-number> <el-input-number v-if="!scope.row.infinity" v-model="scope.row.end" controls-position="right" :min="1" :max="999999"> </el-input-number>
<el-checkbox class="m-l-10" v-model="scope.row.infinity" @change="changeEnd($event, scope.row)">无穷大</el-checkbox> <el-checkbox v-if="scope.$index == instanceAward.instanceContent.length - 1" class="m-l-10" v-model="scope.row.infinity" @change="changeEnd($event, scope.row)">无穷大</el-checkbox>
</div> </div>
</div> </div>
</template> </template>
...@@ -141,13 +158,43 @@ import spotAward from '@/components/active-config/configs/spot-award.vue'; ...@@ -141,13 +158,43 @@ import spotAward from '@/components/active-config/configs/spot-award.vue';
<script> <script>
export default { export default {
name: 'spot-award', name: 'spot-award',
props: {
value: {
type: [Object, Array],
default() {
return {
instanceMade: 1, //即时奖励模式 1、定额奖励,2阶梯奖励,3成交额等比奖励
instancePoint: 1, //奖励积分(定额中的积分,等比中的积分)
instanceNumber: 1, //等比奖励种的每多少元
instanceContent: [
{
start: 1,
end: 5,
point: 1,
infinity: false
},
{
start: 10,
end: 20,
point: 1,
infinity: false
}
], //即时奖励内容(阶梯内容) 奖励内容json字符串
awardLimitType: 1, //奖励限制类型 1、不限制奖励(推荐),2、限制奖励次数,3、限制奖励额度
awardLimitNumber: 1, //限制奖励次数
awardLimitPoint: 1 //限制奖励额度
};
}
}
},
components: {}, components: {},
data() { data() {
return { return {
basePath: [],
instanceAward: { instanceAward: {
instanceMade: 1, //即时奖励模式 1、定额奖励,2阶梯奖励,3成交额等比奖励 instanceMade: 1, //即时奖励模式 1、定额奖励,2阶梯奖励,3成交额等比奖励
instancePoint: 0, //奖励积分(定额中的积分,等比中的积分) instancePoint: 1, //奖励积分(定额中的积分,等比中的积分)
instanceNumber: 0, //等比奖励种的每多少元 instanceNumber: 1, //等比奖励种的每多少元
instanceContent: [ instanceContent: [
{ {
start: 1, start: 1,
...@@ -163,8 +210,8 @@ export default { ...@@ -163,8 +210,8 @@ export default {
} }
], //即时奖励内容(阶梯内容) 奖励内容json字符串 ], //即时奖励内容(阶梯内容) 奖励内容json字符串
awardLimitType: 1, //奖励限制类型 1、不限制奖励(推荐),2、限制奖励次数,3、限制奖励额度 awardLimitType: 1, //奖励限制类型 1、不限制奖励(推荐),2、限制奖励次数,3、限制奖励额度
awardLimitNumber: 0, //限制奖励次数 awardLimitNumber: 1, //限制奖励次数
awardLimitPoint: 0, //限制奖励额度 awardLimitPoint: 1, //限制奖励额度
stepType: 1 //步骤类型 类型:1服务号关注,2活动营销页访问奖励,3会员认证奖励,4游戏参与奖励,5卡券领取奖励6,消费奖励 stepType: 1 //步骤类型 类型:1服务号关注,2活动营销页访问奖励,3会员认证奖励,4游戏参与奖励,5卡券领取奖励6,消费奖励
}, },
modeData: [ modeData: [
...@@ -209,13 +256,15 @@ export default { ...@@ -209,13 +256,15 @@ export default {
*/ */
submitForm() { submitForm() {
const that = this; const that = this;
that.consumeAction.storeList = that.refs.storeCard.rightList; return new Promise(function(resolve, reject) {
that.$refs['rewardForm'].validate(valid => { that.$refs['rewardForm'].validate(valid => {
if (valid) { if (valid) {
that.consumeAction.storeList = that.refs.storeCard.rightList; that.$emit('input', that.instanceAward);
} else { resolve(that.instanceAward);
return false; } else {
} resolve(false);
}
});
}); });
}, },
/** /**
...@@ -249,12 +298,30 @@ export default { ...@@ -249,12 +298,30 @@ export default {
point: 1, point: 1,
infinity: false infinity: false
}); });
},
/**
* 阶梯奖励删除奖项:
*/
deleteRow(index, arr) {
/* if (index == arr.length - 1) {
return false;
} */
arr.splice(index, 1);
} }
} },
/* mounted() { watch: {
value(newData) {
const that = this;
that.instanceAward = JSON.parse(JSON.stringify(newData));
}
},
mounted() {
const that = this; const that = this;
console.log(that.refs.storeCard.rightList); that.instanceAward = 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;
}
}
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-11-12 10:59:45 * @Date: 2019-11-12 10:59:45
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-11-26 14:23:30 * @LastEditTime: 2019-11-29 14:21:39
--> -->
<template> <template>
<div class="share-index common-wrap"> <div class="share-index common-wrap">
......
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