|
@@ -215,6 +215,8 @@
|
|
|
<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" />
|
|
|
+ <!-- 添加微信红包 -->
|
|
|
+ <red-pkg-add :dialog-visible="redPkgTableVisible" @close="close" @confirmRedPkg="confirmRedPkg" v-if="redPkgTableVisible" />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -231,6 +233,7 @@ import CouponAdd from "./components/CouponAdd"
|
|
|
import CouponPkgAdd from "./components/CouponPkgAdd"
|
|
|
import CoinAdd from "./components/CoinAdd"
|
|
|
import AwardForm from "./components/AwardForm"
|
|
|
+import RedPkgAdd from './components/RedPkgAdd.vue';
|
|
|
export default {
|
|
|
name: "TicketCreate",
|
|
|
mixins: [CustomFieldsMixin],
|
|
@@ -242,6 +245,7 @@ export default {
|
|
|
CoinAdd,
|
|
|
Upload,
|
|
|
AwardForm,
|
|
|
+ RedPkgAdd,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -262,6 +266,7 @@ export default {
|
|
|
originPrice: 0, //划线价
|
|
|
disabled: false,
|
|
|
saleChannelType: 1,//销售范围类型
|
|
|
+ isHaveRedPkg: 0,
|
|
|
},
|
|
|
// 门店列表
|
|
|
siteList: [],
|
|
@@ -371,6 +376,7 @@ export default {
|
|
|
couponTableVisible: false, // 添加卡券弹框
|
|
|
couponPkgTableVisible: false, // 添加券包弹框
|
|
|
coinTableVisible: false, // 添加盲豆弹框
|
|
|
+ redPkgTableVisible: false, //添加微信红包
|
|
|
pageParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
@@ -511,6 +517,18 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ this.form.isHaveRedPkg = 0
|
|
|
+
|
|
|
+ for (let i = 0; i < this.awardsList.length; i++) {
|
|
|
+ const item = this.awardsList[i];
|
|
|
+ for (let j = 0; j < item.prizeList.length; j++) {
|
|
|
+ if(item.prizeList[j].prizeType == 'red_pkg') {
|
|
|
+ this.form.isHaveRedPkg = 1
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
let prizeIndex = this.awardsList.findIndex((item) => {
|
|
|
return !item.prizeList.length && item.quantity > 0;
|
|
|
});
|
|
@@ -549,7 +567,7 @@ export default {
|
|
|
refId: ele.goodsId || ele.couponId || ele.id,
|
|
|
prizeType: ele.prizeType,
|
|
|
quantity: ele.quantity,
|
|
|
- value: Number(ele.coinValue),
|
|
|
+ value: Number(ele.value),
|
|
|
};
|
|
|
});
|
|
|
});
|
|
@@ -640,6 +658,7 @@ export default {
|
|
|
this.couponTableVisible = false;
|
|
|
this.couponPkgTableVisible = false;
|
|
|
this.coinTableVisible = false;
|
|
|
+ this.redPkgTableVisible = false;
|
|
|
},
|
|
|
|
|
|
changeType(e) {
|
|
@@ -662,6 +681,9 @@ export default {
|
|
|
}else if(e == "ticketGoods") {
|
|
|
this.iconic = 'goods'
|
|
|
this.goodsTableVisible2 = true;
|
|
|
+ }else if(e == "red_pkg") {
|
|
|
+ this.iconic = 'redPacket'
|
|
|
+ this.redPkgTableVisible = true;
|
|
|
}
|
|
|
},
|
|
|
goodsCommand(e) {
|
|
@@ -688,17 +710,18 @@ export default {
|
|
|
confirmCoupon(arr) {
|
|
|
this.$refs.awards.add(1, arr)
|
|
|
},
|
|
|
-
|
|
|
// 确认选中券包
|
|
|
confirmCouponPkg(arr) {
|
|
|
this.$refs.awards.add(1, arr)
|
|
|
},
|
|
|
-
|
|
|
// 确认输入盲豆
|
|
|
confirmCoin(obj) {
|
|
|
this.$refs.awards.add(2, obj)
|
|
|
},
|
|
|
-
|
|
|
+ // 确认输入金额
|
|
|
+ confirmRedPkg(obj) {
|
|
|
+ this.$refs.awards.add(2, obj)
|
|
|
+ },
|
|
|
//选中的关联商品
|
|
|
confirmGoodsForm(arr) {
|
|
|
this.$refs.awardFrom.add(1,arr)
|