Commit d8b6fb25 by chenxin

fix:merge

parents 84de8c3c 1ad5b23e
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/fonts/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link rel=stylesheet href=//web-1251519181.file.myqcloud.com/components/element.2.12.0.css><link href=/marketing/static/css/main.8e45e1436b49cfe9fd99d8326d9cae87.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/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/components/element.2.12.0.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.35.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.09.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/member-group.2.2.14.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.18.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.42.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.13.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.2.02.js></script><script type=text/javascript src=/marketing/static/js/manifest.3ca0ee2983218eaffa4b.js></script><script type=text/javascript src=/marketing/static/js/vendor.cbb380c2053ab598e892.js></script><script type=text/javascript src=/marketing/static/js/main.009190893fcb12e9c083.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/fonts/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link rel=stylesheet href=//web-1251519181.file.myqcloud.com/components/element.2.12.0.css><link href=/marketing/static/css/main.35b5ff025b4d54e9c01de91dab923bc8.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/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/components/element.2.12.0.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.35.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.10.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/member-group.2.2.16.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.18.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.42.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.13.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.2.10.js></script><script type=text/javascript src=/marketing/static/js/manifest.d824dd9a9f21a1f1d363.js></script><script type=text/javascript src=/marketing/static/js/vendor.cbb380c2053ab598e892.js></script><script type=text/javascript src=/marketing/static/js/main.5175384b277b5fe3450d.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.
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 r=window.webpackJsonp;window.webpackJsonp=function(t,o,a){for(var i,u,f,d=0,s=[];d<t.length;d++)u=t[d],n[u]&&s.push(n[u][0]),n[u]=0;for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);for(r&&r(t,o,a);s.length;)s.shift()();if(a)for(d=0;d<a.length;d++)f=c(c.s=a[d]);return f};var t={},n={13:0};function c(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,c),n.l=!0,n.exports}c.e=function(e){var r=n[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var t=new Promise(function(t,c){r=n[e]=[t,c]});r[2]=t;var o=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,c.nc&&a.setAttribute("nonce",c.nc),a.src=c.p+"static/js/"+({0:"card",1:"game",2:"wechat",3:"message",4:"ewash",5:"evaluation",6:"ecm",7:"activity",8:"recharge",9:"msg",10:"calllog"}[e]||e)+"."+{0:"da8d332886991be66db1",1:"869d812fe1ab82d55e87",2:"f7ed37cce062dc989937",3:"3e8593d41cf8ca4b96ec",4:"9e42654bdc43f38a3646",5:"dae31f13dcb87d6e487e",6:"f74cc418860cba30c2cb",7:"d84777d528b9196017cc",8:"983ea8707decbcaf3c7f",9:"0d2b5d488c714e66ec93",10:"2e28c020a9f9c0e96471"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var r=n[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),n[e]=void 0)}return a.onerror=a.onload=u,o.appendChild(a),t},c.m=e,c.c=t,c.d=function(e,r,t){c.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},c.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(r,"a",r),r},c.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},c.p="/marketing/",c.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(t,a,c){for(var i,f,u,s=0,d=[];s<t.length;s++)f=t[s],n[f]&&d.push(n[f][0]),n[f]=0;for(i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i]);for(r&&r(t,a,c);d.length;)d.shift()();if(c)for(s=0;s<c.length;s++)u=o(o.s=c[s]);return u};var t={},n={13:0};function o(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.e=function(e){var r=n[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var t=new Promise(function(t,o){r=n[e]=[t,o]});r[2]=t;var a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,o.nc&&c.setAttribute("nonce",o.nc),c.src=o.p+"static/js/"+({0:"card",1:"game",2:"wechat",3:"message",4:"ewash",5:"evaluation",6:"ecm",7:"activity",8:"recharge",9:"msg",10:"calllog"}[e]||e)+"."+{0:"5a8442bfbb48c4ce819d",1:"a84ee3b94f5f2e5240a7",2:"c287f3dba66f64618009",3:"3e8593d41cf8ca4b96ec",4:"9e42654bdc43f38a3646",5:"dae31f13dcb87d6e487e",6:"3bb70a3570fa92aaebb0",7:"d84777d528b9196017cc",8:"983ea8707decbcaf3c7f",9:"0d2b5d488c714e66ec93",10:"2e28c020a9f9c0e96471"}[e]+".js";var i=setTimeout(f,12e4);function f(){c.onerror=c.onload=null,clearTimeout(i);var r=n[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),n[e]=void 0)}return c.onerror=c.onload=f,a.appendChild(c),t},o.m=e,o.c=t,o.d=function(e,r,t){o.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,"a",r),r},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.p="/marketing/",o.oe=function(e){throw console.error(e),e}}([]);
\ 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.
......@@ -23,16 +23,16 @@
<!-- 组件引用cdn -->
<script src="//web-1251519181.file.myqcloud.com/components/header.2.0.35.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/card.2.0.09.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/card.2.0.10.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/store.2.0.01.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/member-group.2.2.14.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/member-group.2.2.16.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/store-card.2.0.18.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/people.2.0.42.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/export-excel.2.0.13.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/input.2.0.00.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/selector.1.2.02.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/selector.1.2.10.js"></script>
</body>
</html>
......@@ -162,6 +162,9 @@ a:hover {
.mr5{
margin-right: 5px!important;
}
.mr8{
margin-right: 8px!important;
}
.mr10{
margin-right: 10px!important;
}
......@@ -493,8 +496,6 @@ img::after {
font-weight: bold;
}
.flex{
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.border-radius__default{
......
......@@ -72,7 +72,7 @@ export default {
handleSelect(key, keyPath) {
var that = this;
// console.log(key, keyPath);
console.log(key);
that.selectMenu = key;
},
......@@ -202,10 +202,12 @@ export default {
var that = this;
// console.log("新数据:",newData,oldData)
that.repProjectName = newData || 'gic-web';
},
$route(val) {
if (val.query.new) {
this.handleSelect(val.path);
}
}
// $route(val) {
// console.log(val);
// }
},
/* 接收数据 */
......
<template>
<el-dialog title="修改数量" :visible.sync="show" width="30%" :before-close="close" append-to-body>
奖品数量 <el-radio v-model="calculate" :label="true">增加</el-radio>
<el-radio v-model="calculate" :label="false">减少</el-radio>
<div class="text-center pt10">
<el-input-number controls-position="right" :min="0" v-model="count" class="w200 block-center" @blur="checkCalc"></el-input-number>
<span class="fz14 pl20">结果:</span>
<span>{{ calculate ? parseInt(totalCount) + parseInt(count) : parseInt(totalCount) - parseInt(count) }}</span>
<el-dialog title="修改数量" :visible.sync="show" width="435px" :before-close="close" append-to-body>
<div v-loading="loading">
奖品数量 <el-radio class="ml10" v-model="calculate" :label="true">增加</el-radio>
<el-radio v-model="calculate" :label="false">减少</el-radio>
<div class="vl">
<el-input-number controls-position="right" :min="0" :max="max" v-model="count" class="w200 block-center" @blur="checkCalc"></el-input-number>
</div>
<div class="fz14 vl" v-if="needCheck && calculate">可用库存:{{ maxStock }}</div>
<div class="fz14 vl" v-if="!calculate">当前库存:{{ totalCount }}</div>
<div class="fz14 vl mb10">结果:{{ resNum }}</div>
</div>
<div class="text-center pt10"></div>
<span slot="footer" class="dialog-footer">
<el-button @click="close">取 消</el-button>
<el-button type="primary" @click="submit">确 定</el-button>
......@@ -51,10 +53,32 @@ export default {
data() {
return {
count: 0,
calculate: true
calculate: true,
loading: false,
maxStock: 0, // 库存最大值
needCheck: false // 是否需要进行库存最大值校验
};
},
watch: {
calculate() {
this.count = 0;
}
},
computed: {
resNum() {
const num = this.calculate ? parseInt(this.totalCount) + parseInt(this.count) : parseInt(this.totalCount) - parseInt(this.count);
return isNaN(num) ? 0 : num;
},
max() {
return this.needCheck && this.calculate ? this.maxStock - this.totalCount : 1000000;
}
},
methods: {
// 父组件传入更改是否需要校验库存最大值
needCheckFn(maxStock) {
this.needCheck = true;
this.maxStock = maxStock;
},
checkCalc() {
if (!this.calculate) {
if (this.count > this.totalCount) {
......@@ -65,7 +89,10 @@ export default {
},
close() {
this.$emit('update:show', false);
// this.count = 0;
this.count = 0;
this.loading = false;
this.needCheck = false;
this.maxStock = 0;
},
submit() {
if (!this.calculate) {
......@@ -87,10 +114,16 @@ export default {
};
updatePrizeStock(params).then(res => {
this.$emit('countRefresh', { calc: this.calculate, num: this.count });
this.close();
});
this.close();
}
}
};
</script>
<style lang="scss" scoped>
.vl {
margin-left: 70px;
margin-top: 15px;
}
</style>
<template>
<div class="dm-avatar">
<label class="dm-avatar__upload " :class="{ 'is-disabled': disabled }" :style="`width:${width}px;height:${height}px;`" v-loading="loading">
<input type="file" style="display:none;" :disabled="disabled" accept="image/gif, image/jpeg,image/png" ref="uploader" v-upload="this" />
<label class="dm-avatar__upload " :class="{ 'is-disabled': disabled || unused }" :style="`width:${width}px;height:${height}px;`" v-loading="loading">
<input type="file" style="display:none;" :disabled="disabled || unused" accept="image/gif, image/jpeg,image/png" ref="uploader" v-upload="this" />
<img v-show="model.imgUrl && showImg" :src="model.imgUrl || ''" :class="className" class="dm-avatar__img" />
<i class="el-icon-plus dm-avatar__icon" v-show="!model.imgUrl" :style="'line-height:' + height + 'px;'"></i>
</label>
......@@ -24,6 +24,11 @@ export default {
};
}
},
unused: {
// 是否禁用
type: Boolean,
default: false
},
width: {
type: String,
default: 'auto'
......
......@@ -4,8 +4,8 @@
<div v-html="textarea" @keyup="textInput(textarea, $event)" ref="myTextarea" contenteditable="true" @blur="getTextValue"></div>
</div>
<div class="wx-text__opt clearfix">
<a @click="addLink" class="iconfont icon-lianjie" title="添加链接"></a>
<a @click="removeLink" class="iconfont icon-duankailianjie" title="取消链接"></a>
<!-- <a @click="addLink" class="iconfont icon-lianjie" title="添加链接"></a>
<a @click="removeLink" class="iconfont icon-duankailianjie" title="取消链接"></a> -->
<el-popover placement="top" trigger="hover" width="680" v-if="isSupportVar">
<p>1.支持插入会员信息变量,如下表所示,{数字}为可插入变量,注意变量值长度,以免超过300字文本上限。</p>
<p>2.支持插入H5链接;支持插入小程序链接。</p>
......
......@@ -42,9 +42,9 @@ export default {
this.xxSysp.isResign = true;
});
}
if (this.xxSysp.filterAbbrInfo.length !== 0) {
this.$refs.selector.changeComplexInfo(); // 强制展开
}
// if (this.xxSysp.filterAbbrInfo.length !== 0) {
// this.$refs.selector.changeComplexInfo(); // 强制展开
// }
},
// 商品选择器反显label
xxSyspLabel(filterAbbrInfo) {
......
......@@ -144,3 +144,12 @@ export const downloadPtyxSkinPsd = config.api + PREFIX + 'download-tempskin-psd?
// 游戏营销--大转盘/刮刮卡下载psd
export const downloadWheelSkinPsd = config.api + PREFIX + 'download_wheel_skin_psd?requestProject=marketing';
// 游戏营销-- 库存 - 编辑奖品
export const updateGamePrize = params => requests(PREFIX + 'update-game-prize', params);
// 游戏营销-- 奖品 - ggk dzp 删除游戏奖品
export const deleteGamePrize = params => requests(PREFIX + 'delete-game-prize', params);
// 游戏营销-- 库存 - 获取奖品库存
export const getCouponStock = params => requests(PREFIX + 'get-coupon-stock', params);
......@@ -158,6 +158,7 @@
</div>
<div v-if="form.onlyFlag">
<el-checkbox v-model="only" :disabled="isEdit || isInfo">不与其它优惠共享</el-checkbox>
<span class="fz12 gray ml5">* 仅用于微信原生卡券详情展示,无实际业务逻辑</span>
</div>
</el-form-item>
<el-form-item prop="cardLimit" label="领券限制">
......
......@@ -606,13 +606,13 @@ export default {
type: 'warning'
})
.then(() => {
this.$router.push('/card/list');
this.$router.push('/card/record/send?new=1');
})
.catch(err => {
this.getCardPutonDetail();
});
} else {
this.$router.push('/card/list');
this.$router.push('/card/record/send?new=1');
}
} else {
this.$tips({ type: 'error', message: '操作失败' });
......@@ -670,7 +670,13 @@ export default {
}
},
handleDataLeft(selectedData, selectionToRemove) {
console.log(selectedData, selectionToRemove);
// 不可编辑
if (this.form.memberType === 2 && this.isAdd) {
this.form.memberGroupIds = selectedData
.map(v => v.memberTagGroupId)
.filter(v => v)
.join(',');
}
}
},
filters: {
......
......@@ -42,7 +42,7 @@
</el-table-column>
<el-table-column min-width="120" align="left" label="适用门店">
<template slot-scope="scope">
<span>{{ scope.row.storeMode === 0 ? '所有门店' : scope.row.storeMode === 1 ? '部分分组' : '部分门店' }}</span>
<span>{{ scope.row.storeMode === 0 ? '所有门店' : scope.row.storeMode === 1 ? '部分门店' : '--' }}</span>
</template>
</el-table-column>
<el-table-column min-width="120" align="left" label="库存">
......
......@@ -129,7 +129,8 @@ export default {
writeOffBeginTime: '',
writeOffEndTime: '',
sortBy: '',
showSelfFlag: ''
showSelfFlag: '',
coupCardId: this.$route.query.coupCardId
},
total: 0,
cardOrderShow: false,
......
<template>
<el-dialog title="修改库存" :visible.sync="show" width="500px" :before-close="close" :closed="closed" append-to-body>
<div v-loading="loading">
<span class="mr20">库存数量</span><el-radio v-model="calculate" :label="true">增加</el-radio>
<el-radio v-model="calculate" :label="false">减少</el-radio>
<div class="pt20 ml76">
<el-input-number controls-position="right" :min="0" v-model="count" class="w200 block-center" size="small" :max="max"></el-input-number>
</div>
<div class="pt20 ml76" v-if="calculate">
<span class="fz14">可用库存:{{ maxStock }}</span>
</div>
<div class="pt20 ml76" v-else>
<span class="fz14">当前库存:{{ totalCount }}</span>
</div>
<div class="pt20 ml76 pb10">
<span class="fz14">结果:{{ after }}</span>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="close">取 消</el-button>
<el-button type="primary" @click="submit">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
import { getCouponStock } from '@/service/api/gameApi.js';
export default {
props: {
totalCount: {
type: Number,
default: 0
},
show: {
type: Boolean,
default: false
},
coupCardId: {
type: String,
default: ''
}
},
data() {
return {
count: 0,
calculate: true,
loading: false,
maxStock: 0 // 可操作库存
};
},
watch: {
calculate(val) {
this.count = 0;
},
show(val) {
if (val) {
this.getCouponStock();
}
}
},
computed: {
max() {
const totalCount = this.totalCount > 0 ? this.totalCount : 0;
return this.calculate ? this.maxStock - totalCount : this.totalCount;
},
after() {
return (this.calculate ? parseInt(this.totalCount) + parseInt(this.count) : parseInt(this.totalCount) - parseInt(this.count)) || 0;
}
},
methods: {
getCouponStock() {
this.loading = true;
getCouponStock({ cardId: this.coupCardId })
.then(res => {
this.maxStock = res.result || 0;
this.loading = false;
})
.catch(() => {
this.loading = false;
});
},
close() {
this.calculate = true;
this.count = 0;
this.$emit('update:show', false);
},
submit() {
if (!this.calculate) {
if (this.count > this.totalCount) {
this.$tips({ type: 'warning', message: '操作后目标库存值不能小于0' });
return;
}
} else {
if (this.count > this.maxStock) {
this.$tips({ type: 'warning', message: '增加值不能超过可用库存' });
return;
}
}
this.$emit('backStock', this.after);
this.close();
}
}
};
</script>
<style lang="scss" scoped>
.ml76 {
margin-left: 76px;
}
</style>
export default {
filters: {
prizeNameByType(val) {
// // 1积分 2卡券 3谢谢参与
const prizeReferTypeOptions = [
{ value: 1, label: '积分' },
{ value: 2, label: '卡券' },
{ value: 3, label: '谢谢参与' }
];
const current = prizeReferTypeOptions.find(v => v.value == val) || {};
return current.label;
}
}
};
......@@ -178,7 +178,7 @@
<el-button @click="$router.go(-1)">返 回</el-button>
</div>
<vue-gic-card :showCardDialog="showCardDialog" @selectCard="selectCard" :cardLimit="3" :cardType="null"></vue-gic-card>
<calculate :show.sync="calculateShow" :gameId="form.gameActivityId" :totalCount="currentObj.prizeCount" :prizeId="currentObj.prizeId" :prizeReferType="currentObj.prizeReferType" :prizeReferId="currentObj.prizeReferId" :useStrategy="0" @countRefresh="countRefresh"></calculate>
<calculate ref="calculate" :show.sync="calculateShow" :gameId="form.gameActivityId" :totalCount="currentObj.prizeCount" :prizeId="currentObj.prizeId" :prizeReferType="currentObj.prizeReferType" :prizeReferId="currentObj.prizeReferId" :useStrategy="0" @countRefresh="countRefresh"></calculate>
<strategy :show.sync="strategyShow" :gameId="form.gameActivityId" :strategyType="strategyType" :dataId="gamePrizeStrategyId" :gameActivityId="form.gameActivityId" :cardObj="strategyDialog" @set-data="setStrategyCard" @refesh="klflStrategyList"></strategy>
<code-dialog :show.sync="codeDialogShow" :id="form.gameActivityId" @selectedCode="selectedCode"></code-dialog>
</el-form>
......@@ -186,7 +186,7 @@
<script>
import activitySelect from '@/components/activity-select';
import { klflDetail, klflSave, klflStrategyList, klflPrizeList, klflStrategySort, klflStrategyDel, klflDownTemp } from '@/service/api/gameApi.js';
import { klflDetail, klflSave, klflStrategyList, klflPrizeList, klflStrategySort, klflStrategyDel, klflDownTemp, getCouponStock } from '@/service/api/gameApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import dmUploadImg from '@/components/upload/img';
import dmUploadAvatar from '@/components/upload/avatar';
......@@ -331,6 +331,18 @@ export default {
}
},
methods: {
// 获取卡券库存
getCouponStock(cardId) {
this.$refs.calculate.loading = true;
getCouponStock({ cardId })
.then(res => {
this.$refs.calculate.needCheckFn(res.result || 0);
this.$refs.calculate.loading = false;
})
.catch(() => {
this.$refs.calculate.loading = false;
});
},
//code选择
codeSelect(i) {
if (this.form.codeType == 1) {
......@@ -349,9 +361,12 @@ export default {
setPrizeCount(obj) {
this.currentObj = obj;
this.calculateShow = true;
if (obj.prizeReferType == 2) {
// 卡券 获取库存值
this.getCouponStock(obj.card.coupCardId);
}
},
countRefresh(val) {
console.log(val);
this.currentObj.prizeStock = this.currentObj.prizeCount = val.calc ? parseInt(this.currentObj.prizeCount) + parseInt(val.num) : parseInt(this.currentObj.prizeCount) - parseInt(val.num);
},
selectBg(v, i) {
......
......@@ -8,7 +8,7 @@
<template>
<section class="dm-wrap">
<div class="pb22 clearfix">
<el-select class="dm-select" v-model="listParams.prizeReferType" placeholder="选择领取状态" @change="klflReportList">
<el-select class="dm-select" v-model="listParams.prizeReferType" placeholder="请选择" @change="klflReportList">
<el-option v-for="(v, i) in prizeReferTypeOptions" :key="i" :label="v.label" :value="v.value"></el-option>
</el-select>
<el-select class="dm-select" v-model="listParams.getStatus" placeholder="选择领取状态" @change="klflReportList">
......@@ -56,7 +56,7 @@ export default {
data() {
return {
prizeReferTypeOptions: [{ value: -1, label: '所有类型' }, { value: 1, label: '积分' }, { value: 2, label: '卡券' }, { value: 3, label: '礼品' }], // eslint-disable-line
getStatusOptions: [{ value: -1, label: '所有状态' }, { value: 1, label: '待领取' }, { value: 2, label: '已领取' }, { value: 3, label: '待核销' }, { value: 4, label: ' 已核销' }, { value: 5, label: '待完善信息' }, { value: 6, label: '待发货' }, { value: 7, label: '已发货' }], // eslint-disable-line
getStatusOptions: [{ value: -1, label: '所有状态' }, { value: 1, label: '待领取' }, { value: 2, label: '已领取' }, { value: 3, label: '待核销' }, { value: 4, label: ' 已核销' }], // eslint-disable-line
loading: false,
rankList: [],
rankHeader: [
......
......@@ -3,11 +3,11 @@
<section class="dm-form__wrap">
<activity-select class="mb20" :actId.sync="info.marketingActivityId" colon :readOnly="isEdit || isInfo"></activity-select>
<div class="mb20" v-if="!isAdd && info.sceneSettingName">
<span class="dm-input_label">营销场景:</span>
<span class="dm-input_label mr8">营销场景:</span>
{{ info.sceneSettingName }}
</div>
<div>
<span class="dm-input_label">发送时间:</span>
<span class="dm-input_label mr8">发送时间:</span>
<el-select class="w250" v-model="info.sendType" :disabled="isInfo">
<el-option v-for="(v, i) in sendTypeOptions" :key="i" :value="v.value" :label="v.label"></el-option>
</el-select>
......@@ -280,7 +280,7 @@ export default {
return;
}
if (this.info.contentType === 0 && !this.info.imageTextId) {
this.$tips({ type: 'warning', message: '先选择一个图文' });
this.$tips({ type: 'warning', message: '先选择一个图文' });
return;
} else if (this.info.contentType === 1 && !this.info.content) {
this.$tips({ type: 'warning', message: '请填写文本' });
......@@ -543,7 +543,13 @@ export default {
}
},
handleDataLeft(selectedData, selectionToRemove) {
console.log(selectedData, selectionToRemove);
// 不可编辑
if (this.info.memberType === 2 && this.isAdd) {
this.info.memberGroupIds = selectedData
.map(v => v.memberTagGroupId)
.filter(v => v)
.join(',');
}
}
}
};
......
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