|
@@ -4,12 +4,12 @@
|
|
|
<div class="prize-top">
|
|
|
<div>奖级名称:{{ item.name }}</div>
|
|
|
<div>奖级:{{ item.sort }}</div>
|
|
|
+<!-- <div>-->
|
|
|
+<!-- 关联奖级:<el-select v-model="item.awardsLabel" style="width: 120px;">-->
|
|
|
+<!-- <el-option v-for="(item,index) in awardsLabelList" :label="item.dictLabel" :value="item.dictLabel" :key="index"/>-->
|
|
|
+<!-- </el-select>-->
|
|
|
+<!-- </div>-->
|
|
|
<div>
|
|
|
- 关联奖级:<el-select v-model="item.awardsLabel" style="width: 120px;">
|
|
|
- <el-option v-for="(item,index) in awardsLabelList" :label="item.dictLabel" :value="item.dictLabel" :key="index"/>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- <div v-if="ticketType == 'offline'">
|
|
|
奖级数量:
|
|
|
<el-input-number
|
|
|
v-model="item.quantity"
|
|
@@ -20,7 +20,18 @@
|
|
|
:disabled="item.isEdit"
|
|
|
></el-input-number>
|
|
|
</div>
|
|
|
- <div v-else>奖级数量:{{ item.quantity }}</div>
|
|
|
+<!-- <div v-if="ticketType == 'offline'">-->
|
|
|
+<!-- 奖级数量:-->
|
|
|
+<!-- <el-input-number-->
|
|
|
+<!-- v-model="item.quantity"-->
|
|
|
+<!-- controls-position="right"-->
|
|
|
+<!-- @change="handleChangeAll($event, item)"-->
|
|
|
+<!-- :min="0"-->
|
|
|
+<!-- size="small"-->
|
|
|
+<!-- :disabled="item.isEdit"-->
|
|
|
+<!-- ></el-input-number>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <div v-else>奖级数量:{{ item.quantity }}</div>-->
|
|
|
</div>
|
|
|
<div class="prize-table">
|
|
|
<el-table :data="item.prizeList" class="el-table">
|
|
@@ -60,19 +71,19 @@
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="奖品数量" prop="quantity" v-if="ticketType != 'offline'" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>
|
|
|
- <el-input-number
|
|
|
- v-model="scope.row.quantity"
|
|
|
- controls-position="right"
|
|
|
- @change="handleChange($event, index)"
|
|
|
- :min="1"
|
|
|
- size="small"
|
|
|
- ></el-input-number>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+<!-- <el-table-column label="奖品数量" prop="quantity" v-if="ticketType != 'offline'" align="center">-->
|
|
|
+<!-- <template slot-scope="scope">-->
|
|
|
+<!-- <div>-->
|
|
|
+<!-- <el-input-number-->
|
|
|
+<!-- v-model="scope.row.quantity"-->
|
|
|
+<!-- controls-position="right"-->
|
|
|
+<!-- @change="handleChange($event, index)"-->
|
|
|
+<!-- :min="1"-->
|
|
|
+<!-- size="small"-->
|
|
|
+<!-- ></el-input-number>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- </el-table-column>-->
|
|
|
<el-table-column label="已兑数量" prop="cashedQty" align="center" v-if="boxId" />
|
|
|
<el-table-column label="排序" prop="sortWeight" align="center">
|
|
|
<template slot-scope="scope">
|
|
@@ -232,9 +243,9 @@ export default {
|
|
|
}
|
|
|
this.$emit('input', this.awardsList)
|
|
|
this.$emit('close')
|
|
|
- if (this.ticketType != 'offline' && this.id == 0) {
|
|
|
- this.getQuantity();
|
|
|
- }
|
|
|
+ // if (this.ticketType != 'offline' && this.id == 0) {
|
|
|
+ // this.getQuantity();
|
|
|
+ // }
|
|
|
},
|
|
|
|
|
|
changetype(e) {
|
|
@@ -251,18 +262,18 @@ export default {
|
|
|
handleChangeAll(e, item) {
|
|
|
this.$set(item, "quantity", e);
|
|
|
this.$forceUpdate();
|
|
|
- if (this.ticketType != 'offline' && this.id == 0) {
|
|
|
- this.getQuantity();
|
|
|
- }
|
|
|
+ // if (this.ticketType != 'offline' && this.id == 0) {
|
|
|
+ // this.getQuantity();
|
|
|
+ // }
|
|
|
},
|
|
|
|
|
|
// 改变奖品数量
|
|
|
handleChange(e, index) {
|
|
|
this.prizeIndex = index;
|
|
|
this.$forceUpdate();
|
|
|
- if (this.ticketType != 'offline' && this.id == 0) {
|
|
|
- this.getQuantity();
|
|
|
- }
|
|
|
+ // if (this.ticketType != 'offline' && this.id == 0) {
|
|
|
+ // this.getQuantity();
|
|
|
+ // }
|
|
|
},
|
|
|
|
|
|
// 奖级商品删除
|
|
@@ -271,19 +282,19 @@ export default {
|
|
|
let list = item.prizeList;
|
|
|
list.splice(index, 1);
|
|
|
this.$set(item, "prizeList", list);
|
|
|
- if (this.ticketType != 'offline' && this.id == 0) {
|
|
|
- this.getQuantity();
|
|
|
- }
|
|
|
+ // if (this.ticketType != 'offline' && this.id == 0) {
|
|
|
+ // this.getQuantity();
|
|
|
+ // }
|
|
|
},
|
|
|
|
|
|
// 计算奖级数量
|
|
|
- getQuantity() {
|
|
|
- let num = 0;
|
|
|
- this.awardsList[this.prizeIndex].prizeList.forEach((item) => {
|
|
|
- num += item.quantity;
|
|
|
- });
|
|
|
- this.awardsList[this.prizeIndex].quantity = num;
|
|
|
- },
|
|
|
+ // getQuantity() {
|
|
|
+ // let num = 0;
|
|
|
+ // this.awardsList[this.prizeIndex].prizeList.forEach((item) => {
|
|
|
+ // num += item.quantity;
|
|
|
+ // });
|
|
|
+ // this.awardsList[this.prizeIndex].quantity = num;
|
|
|
+ // },
|
|
|
},
|
|
|
};
|
|
|
</script>
|