|
@@ -132,6 +132,9 @@
|
132
|
132
|
<el-table-column
|
133
|
133
|
prop="TargetType"
|
134
|
134
|
label="分类">
|
|
135
|
+ <template slot-scope="scope">
|
|
136
|
+ {{returnGoodsType(scope.row.TargetType)}}
|
|
137
|
+ </template>
|
135
|
138
|
</el-table-column>
|
136
|
139
|
<el-table-column label="操作">
|
137
|
140
|
<template slot-scope="scope">
|
|
@@ -409,18 +412,20 @@ export default {
|
409
|
412
|
page: 1,
|
410
|
413
|
pagesize: 10000
|
411
|
414
|
}).then(() => {
|
412
|
|
- if (this.$route.query.id) {
|
413
|
|
- this.getCouponById({
|
414
|
|
- id: this.$route.query.id
|
415
|
|
- }).then((res) => {
|
416
|
|
- // console.log(JSON.stringify(res))
|
417
|
|
- res.coupon.IsAll = String(res.coupon.IsAll)
|
418
|
|
- if (res.coupon.VideoUrl !== '') {
|
419
|
|
- this.videoOff = true
|
420
|
|
- }
|
421
|
|
- this.couponInfo = res.coupon
|
422
|
|
- })
|
423
|
|
- }
|
|
415
|
+ this.GetGoodTypes({ pagesize: 1000, caseid: this.$route.query.caseid }).then(() => {
|
|
416
|
+ if (this.$route.query.id) {
|
|
417
|
+ this.getCouponById({
|
|
418
|
+ id: this.$route.query.id
|
|
419
|
+ }).then((res) => {
|
|
420
|
+ // console.log(JSON.stringify(res))
|
|
421
|
+ res.coupon.IsAll = String(res.coupon.IsAll)
|
|
422
|
+ if (res.coupon.VideoUrl !== '') {
|
|
423
|
+ this.videoOff = true
|
|
424
|
+ }
|
|
425
|
+ this.couponInfo = res.coupon
|
|
426
|
+ })
|
|
427
|
+ }
|
|
428
|
+ })
|
424
|
429
|
})
|
425
|
430
|
})
|
426
|
431
|
},
|
|
@@ -434,6 +439,7 @@ export default {
|
434
|
439
|
}),
|
435
|
440
|
...mapGoodsState({
|
436
|
441
|
goodsList: x => x.goodsList,
|
|
442
|
+ goodsTypes: x => x.goodsTypes.list,
|
437
|
443
|
}),
|
438
|
444
|
...mapCourseState({
|
439
|
445
|
courseList: x => x.courseList,
|
|
@@ -450,6 +456,7 @@ export default {
|
450
|
456
|
methods: {
|
451
|
457
|
...mapGoodsActions([
|
452
|
458
|
'GetGoodsList',
|
|
459
|
+ 'GetGoodTypes',
|
453
|
460
|
]),
|
454
|
461
|
...mapCouponActions([
|
455
|
462
|
'addCoupon',
|
|
@@ -462,6 +469,13 @@ export default {
|
462
|
469
|
...mapCourseActions([
|
463
|
470
|
'GetCourseList',
|
464
|
471
|
]),
|
|
472
|
+ returnGoodsType (val) {
|
|
473
|
+ for (var n = 0; n < this.goodsTypes.length; n++) {
|
|
474
|
+ if (this.goodsTypes[n].TypeId === val) {
|
|
475
|
+ return this.goodsTypes[n].TypeName
|
|
476
|
+ }
|
|
477
|
+ }
|
|
478
|
+ },
|
465
|
479
|
deleteVideo () { // 删除视频
|
466
|
480
|
this.couponInfo.VideoUrl = ''
|
467
|
481
|
this.videoOff = false
|