许成详 6 年之前
父節點
當前提交
74ef68100c

+ 13
- 13
src/pages/system/cardAndCouponManager/couponManager/edit.vue 查看文件

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

+ 3
- 3
src/pages/system/cardAndCouponManager/couponManager/index.vue 查看文件

36
           label="券名称">
36
           label="券名称">
37
         </el-table-column>
37
         </el-table-column>
38
         <el-table-column
38
         <el-table-column
39
-          prop="CouponTypeId"
39
+          prop="CouponType"
40
           label="券类型">
40
           label="券类型">
41
-          <template slot-scope="scope">{{scope.row.CouponTypeId === 'goods' ? '商品券' : '课程券'}}</template>
41
+          <template slot-scope="scope">{{scope.row.CouponType === 'goods' ? '商品券' : '课程券'}}</template>
42
         </el-table-column>
42
         </el-table-column>
43
         <el-table-column
43
         <el-table-column
44
           prop="Price"
44
           prop="Price"
282
       this.getList()
282
       this.getList()
283
     },
283
     },
284
     handleEdit (index, row) { // 编辑
284
     handleEdit (index, row) { // 编辑
285
-      this.$router.push({ name: 'editCoupon', query: { type: row.CouponTypeId, id: row.CouponId, caseid: row.CaseId } })
285
+      this.$router.push({ name: 'editCoupon', query: { type: row.CouponType, id: row.CouponId, caseid: row.CaseId } })
286
     },
286
     },
287
     handleDelete (index, row) { // 删除
287
     handleDelete (index, row) { // 删除
288
       let name = '确认删除渠道“' + row.ChannelName + '”?'
288
       let name = '确认删除渠道“' + row.ChannelName + '”?'