|
@@ -1,7 +1,7 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="subPage">
|
3
|
3
|
<form class="mainForm">
|
4
|
|
- <!-- <h1 style="font-size:22px;">{{isEdit === 0 ? '新建' : '编辑'}}{{couponInfo.CouponTypeId === 'goods' ? '饮品优惠券' : '课程优惠券'}}</h1> -->
|
|
4
|
+ <!-- <h1 style="font-size:22px;">{{isEdit === 0 ? '新建' : '编辑'}}{{couponInfo.CouponType === 'goods' ? '饮品优惠券' : '课程优惠券'}}</h1> -->
|
5
|
5
|
<ul>
|
6
|
6
|
<li class="flex-h">
|
7
|
7
|
<span>选择案场:</span>
|
|
@@ -49,7 +49,7 @@
|
49
|
49
|
<span>券类型:</span>
|
50
|
50
|
<div class="flex-item">
|
51
|
51
|
<div style="width:50%">
|
52
|
|
- <el-select v-model="couponInfo.CouponTypeId" placeholder="请选择" @change="couponTypeChange">
|
|
52
|
+ <el-select v-model="couponInfo.CouponType" placeholder="请选择" @change="couponTypeChange">
|
53
|
53
|
<el-option
|
54
|
54
|
v-for="item in TypeList"
|
55
|
55
|
:key="item.id"
|
|
@@ -89,7 +89,7 @@
|
89
|
89
|
<div class="flex-item">
|
90
|
90
|
<div>
|
91
|
91
|
<el-radio v-model="couponInfo.SendType" label="channel">渠道</el-radio>
|
92
|
|
- <el-radio v-if="couponInfo.CouponTypeId === 'case'" v-model="couponInfo.SendType" label="case">案场</el-radio>
|
|
92
|
+ <el-radio v-if="couponInfo.CouponType === 'case'" v-model="couponInfo.SendType" label="case">案场</el-radio>
|
93
|
93
|
<el-radio v-model="couponInfo.SendType" label="system">系统</el-radio>
|
94
|
94
|
</div>
|
95
|
95
|
</div>
|
|
@@ -151,7 +151,7 @@
|
151
|
151
|
</div>
|
152
|
152
|
</div>
|
153
|
153
|
</li>
|
154
|
|
- <li class="flex-h" v-if="couponInfo.CouponTypeId === 'goods'">
|
|
154
|
+ <li class="flex-h" v-if="couponInfo.CouponType === 'goods'">
|
155
|
155
|
<span>券有效时间:</span>
|
156
|
156
|
<div class="flex-item">
|
157
|
157
|
<div>
|
|
@@ -268,7 +268,7 @@
|
268
|
268
|
width="650px"
|
269
|
269
|
center>
|
270
|
270
|
<div>
|
271
|
|
- <div v-if="couponInfo.CouponTypeId === 'goods'">
|
|
271
|
+ <div v-if="couponInfo.CouponType === 'goods'">
|
272
|
272
|
<el-table
|
273
|
273
|
ref="multipleTable"
|
274
|
274
|
:data="goodsList.list"
|
|
@@ -299,7 +299,7 @@
|
299
|
299
|
:total="total">
|
300
|
300
|
</el-pagination>
|
301
|
301
|
</div>
|
302
|
|
- <div v-if="couponInfo.CouponTypeId === 'course'">
|
|
302
|
+ <div v-if="couponInfo.CouponType === 'course'">
|
303
|
303
|
<el-table
|
304
|
304
|
ref="multipleTable"
|
305
|
305
|
:data="courseList.list"
|
|
@@ -378,7 +378,7 @@ export default {
|
378
|
378
|
couponInfo: {
|
379
|
379
|
CaseId: '',
|
380
|
380
|
CouponName: '',
|
381
|
|
- CouponTypeId: '',
|
|
381
|
+ CouponType: '',
|
382
|
382
|
Price: '',
|
383
|
383
|
TotalCount: '',
|
384
|
384
|
SendType: '',
|
|
@@ -490,7 +490,7 @@ export default {
|
490
|
490
|
},
|
491
|
491
|
sureAddItem () { // 确定添加指定商品
|
492
|
492
|
var bool = true
|
493
|
|
- if (this.couponInfo.CouponTypeId === 'goods') {
|
|
493
|
+ if (this.couponInfo.CouponType === 'goods') {
|
494
|
494
|
for (var n = 0; n < this.currentSelectArr.length; n++) {
|
495
|
495
|
if (this.couponInfo.Targets.length) {
|
496
|
496
|
bool = true
|
|
@@ -514,7 +514,7 @@ export default {
|
514
|
514
|
})
|
515
|
515
|
}
|
516
|
516
|
}
|
517
|
|
- } else if (this.couponInfo.CouponTypeId === 'course') {
|
|
517
|
+ } else if (this.couponInfo.CouponType === 'course') {
|
518
|
518
|
for (var x = 0; x < this.currentSelectArr.length; x++) {
|
519
|
519
|
if (this.couponInfo.Targets.length) {
|
520
|
520
|
bool = true
|
|
@@ -557,7 +557,7 @@ export default {
|
557
|
557
|
this.couponInfo.Targets = []
|
558
|
558
|
},
|
559
|
559
|
addGoods () { // 添加指定商品
|
560
|
|
- if (this.couponInfo.CouponTypeId === 'goods') {
|
|
560
|
+ if (this.couponInfo.CouponType === 'goods') {
|
561
|
561
|
this.GetGoodsList({
|
562
|
562
|
...this.postData,
|
563
|
563
|
caseid: this.couponInfo.CaseId
|
|
@@ -565,7 +565,7 @@ export default {
|
565
|
565
|
this.total = res.pagenum
|
566
|
566
|
this.centerDialogVisible = true
|
567
|
567
|
})
|
568
|
|
- } else if (this.couponInfo.CouponTypeId === 'course') {
|
|
568
|
+ } else if (this.couponInfo.CouponType === 'course') {
|
569
|
569
|
this.GetCourseList({
|
570
|
570
|
...this.postData,
|
571
|
571
|
caseid: this.couponInfo.CaseId
|
|
@@ -621,14 +621,14 @@ export default {
|
621
|
621
|
},
|
622
|
622
|
handleCurrentChange (val) { // 跳转到分页
|
623
|
623
|
this.postData.page = val
|
624
|
|
- if (this.couponInfo.CouponTypeId === 'goods') {
|
|
624
|
+ if (this.couponInfo.CouponType === 'goods') {
|
625
|
625
|
this.GetGoodsList({
|
626
|
626
|
...this.postData,
|
627
|
627
|
caseid: this.couponInfo.CaseId
|
628
|
628
|
}).then((res) => {
|
629
|
629
|
this.total = res.pagenum
|
630
|
630
|
})
|
631
|
|
- } else if (this.couponInfo.CouponTypeId === 'course') {
|
|
631
|
+ } else if (this.couponInfo.CouponType === 'course') {
|
632
|
632
|
this.GetCourseList({
|
633
|
633
|
...this.postData,
|
634
|
634
|
caseid: this.couponInfo.CaseId
|