|
@@ -157,9 +157,9 @@
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<!-- 关联商品设置 -->
|
|
|
- <div class="base-info-title" v-if="form.type != 'offline'">商品设置(购买即可提货)</div>
|
|
|
+ <div class="base-info-title">商品设置(购买即可提货)</div>
|
|
|
|
|
|
- <award-form ref="awardFrom" @close="close" v-model="goodsList" :id="ids" @goodsCommand="goodsCommand" v-if="form.type != 'offline'"></award-form>
|
|
|
+ <award-form ref="awardFrom" @close="close" v-model="goodsList" :id="ids" @goodsCommand="goodsCommand"></award-form>
|
|
|
|
|
|
<!-- 奖级设置 -->
|
|
|
<div class="base-info-title" >奖级设置</div>
|
|
@@ -178,9 +178,9 @@
|
|
|
<!-- 添加商品 -->
|
|
|
<goods-add :dialog-visible="goodsTableVisible" @close="close" @confirmGoods="confirmGoods" v-if="goodsTableVisible" />
|
|
|
<!-- 添加券 -->
|
|
|
- <coupon-add :dialog-visible="couponTableVisible" @close="close" @confirmCoupon="confirmCoupon" v-if="couponTableVisible" />
|
|
|
+ <coupon-add :dialog-visible="couponTableVisible" :iconic="iconic" @close="close" @confirmCouponForm="confirmCouponForm" @confirmCoupon="confirmCoupon" v-if="couponTableVisible" />
|
|
|
<!-- 添加券包 -->
|
|
|
- <coupon-pkg-add :dialog-visible="couponPkgTableVisible" @close="close" @confirmCouponPkg="confirmCouponPkg" v-if="couponPkgTableVisible" />
|
|
|
+ <coupon-pkg-add :dialog-visible="couponPkgTableVisible" :iconic="iconic" @close="close" @confirmCouponPkgForm="confirmCouponPkgForm" @confirmCouponPkg="confirmCouponPkg" v-if="couponPkgTableVisible" />
|
|
|
<!-- 添加盲豆 -->
|
|
|
<coin-add :dialog-visible="coinTableVisible" @close="close" @confirmCoin="confirmCoin" v-if="coinTableVisible" />
|
|
|
<!-- 添加商品 -->
|
|
@@ -339,6 +339,7 @@ export default {
|
|
|
pageSize: 10,
|
|
|
},
|
|
|
goodsVisibleForm: false, //添加关联商品弹框
|
|
|
+ iconic: '',//区分添加的是关联商品还是奖品
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -376,7 +377,7 @@ export default {
|
|
|
}
|
|
|
if(awardsList){
|
|
|
awardsList.forEach((item) => {
|
|
|
- item.isEdit = true,
|
|
|
+ item.isEdit = true
|
|
|
item.prizeList.forEach((ele) => {
|
|
|
(ele.picUrl = publicFileGetUrl + ele.picUrl.split(',')[0]),
|
|
|
(ele.prizeType = JSON.parse(ele.prizeType).value);
|
|
@@ -394,9 +395,9 @@ export default {
|
|
|
// (item.prizeType = JSON.parse(item.prizeType).value);
|
|
|
(item.prizeType = 'goods');
|
|
|
});
|
|
|
- if(this.$refs.awardFrom && this.form.type != 'offline') {
|
|
|
+ if(this.$refs.awardFrom) {
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.awardFrom.add(goodsList)
|
|
|
+ this.$refs.awardFrom.add(3,goodsList)
|
|
|
})
|
|
|
}
|
|
|
// this.goodsList = goodsList
|
|
@@ -564,15 +565,25 @@ export default {
|
|
|
if (e == "goods") {
|
|
|
this.goodsTableVisible = true;
|
|
|
} else if (e == "coupon") {
|
|
|
+ this.iconic = 'coupon'
|
|
|
this.couponTableVisible = true;
|
|
|
} else if (e == "coupon_pkg") {
|
|
|
+ this.iconic = 'couponPkg'
|
|
|
this.couponPkgTableVisible = true;
|
|
|
} else if (e == "coin") {
|
|
|
this.coinTableVisible = true;
|
|
|
}
|
|
|
},
|
|
|
- goodsCommand() {
|
|
|
- this.goodsVisibleForm = true;
|
|
|
+ goodsCommand(e) {
|
|
|
+ if (e == "goods") {
|
|
|
+ this.goodsVisibleForm = true;
|
|
|
+ } else if (e == "coupon") {
|
|
|
+ this.iconic = 'couponForm'
|
|
|
+ this.couponTableVisible = true;
|
|
|
+ } else if (e == "coupon_pkg") {
|
|
|
+ this.iconic = 'couponPkgForm'
|
|
|
+ this.couponPkgTableVisible = true;
|
|
|
+ }
|
|
|
},
|
|
|
// 确认选中商品
|
|
|
confirmGoods(arr) {
|
|
@@ -580,12 +591,12 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 确认选中卡券
|
|
|
- confirmCoupon(arr) {;
|
|
|
+ confirmCoupon(arr) {
|
|
|
this.$refs.awards.add(1, arr)
|
|
|
},
|
|
|
|
|
|
// 确认选中券包
|
|
|
- confirmCouponPkg(arr) {;
|
|
|
+ confirmCouponPkg(arr) {
|
|
|
this.$refs.awards.add(1, arr)
|
|
|
},
|
|
|
|
|
@@ -596,7 +607,15 @@ export default {
|
|
|
|
|
|
//选中的关联商品
|
|
|
confirmGoodsForm(arr) {
|
|
|
- this.$refs.awardFrom.add(arr)
|
|
|
+ this.$refs.awardFrom.add(1,arr)
|
|
|
+ },
|
|
|
+ // 确认选中关联卡券
|
|
|
+ confirmCouponForm(arr) {
|
|
|
+ this.$refs.awardFrom.add(1, arr)
|
|
|
+ },
|
|
|
+ // 确认选中关联券包
|
|
|
+ confirmCouponPkgForm(arr) {
|
|
|
+ this.$refs.awardFrom.add(1, arr)
|
|
|
},
|
|
|
|
|
|
// 取消
|