|
@@ -106,7 +106,16 @@
|
|
|
<div class="prize-top">
|
|
|
<div>奖级名称:{{ item.name }}</div>
|
|
|
<div>奖级:{{ item.sort }}</div>
|
|
|
- <div>奖级数量:{{ item.quantity }}</div>
|
|
|
+ <div>
|
|
|
+ 奖级数量:
|
|
|
+ <el-input-number
|
|
|
+ v-model="item.quantity"
|
|
|
+ controls-position="right"
|
|
|
+ @change="handleChangeAll($event, item)"
|
|
|
+ :min="0"
|
|
|
+ size="small"
|
|
|
+ ></el-input-number>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="prize-table">
|
|
|
<el-table :data="item.prizeList" class="el-table">
|
|
@@ -128,7 +137,7 @@
|
|
|
<div v-if="scope.row.prizeType == 'coin'">盲豆</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="奖品数量" prop="storeName">
|
|
|
+ <!-- <el-table-column label="奖品数量" prop="storeName">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<el-input-number
|
|
@@ -140,7 +149,7 @@
|
|
|
></el-input-number>
|
|
|
</div>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column> -->
|
|
|
<el-table-column label="操作" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
@@ -573,7 +582,7 @@ export default {
|
|
|
this.goodsList = res.rows.map((item) => {
|
|
|
return {
|
|
|
...item,
|
|
|
- picUrl: publicFileGetUrl + item.picUrl,
|
|
|
+ picUrl: publicFileGetUrl + item.picUrl.split(',')[0],
|
|
|
};
|
|
|
});
|
|
|
this.goodsTotal = res.total;
|
|
@@ -652,9 +661,9 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- let filterArr = this.awardsList.filter(item=>{
|
|
|
- return item.prizeList.length != 0
|
|
|
- })
|
|
|
+ let filterArr = this.awardsList.filter((item) => {
|
|
|
+ return item.prizeList.length != 0;
|
|
|
+ });
|
|
|
|
|
|
let data = {
|
|
|
...this.form,
|
|
@@ -696,11 +705,18 @@ export default {
|
|
|
this.form.picUrl = data;
|
|
|
},
|
|
|
|
|
|
+ // 改变奖级数量
|
|
|
+ handleChangeAll(e, item) {
|
|
|
+ this.$set(item, "quantity", e);
|
|
|
+ this.$forceUpdate();
|
|
|
+ // this.getQuantity();
|
|
|
+ },
|
|
|
+
|
|
|
// 改变奖品数量
|
|
|
handleChange(e, index) {
|
|
|
this.prizeIndex = index;
|
|
|
this.$forceUpdate();
|
|
|
- this.getQuantity();
|
|
|
+ // this.getQuantity();
|
|
|
},
|
|
|
|
|
|
// 奖级商品删除
|
|
@@ -709,7 +725,7 @@ export default {
|
|
|
let list = item.prizeList;
|
|
|
list.splice(index, 1);
|
|
|
this.$set(item, "prizeList", list);
|
|
|
- this.getQuantity();
|
|
|
+ // this.getQuantity();
|
|
|
},
|
|
|
|
|
|
// 关闭弹框
|
|
@@ -747,7 +763,7 @@ export default {
|
|
|
this.selectGoodsList = e.map((item) => {
|
|
|
return {
|
|
|
prizeType: "goods",
|
|
|
- quantity: 1,
|
|
|
+ // quantity: 1,
|
|
|
goodsId: item.goodsId,
|
|
|
picUrl: item.picUrl,
|
|
|
title: item.title,
|
|
@@ -760,7 +776,7 @@ export default {
|
|
|
this.selectCouponList = e.map((item) => {
|
|
|
return {
|
|
|
prizeType: "coupon",
|
|
|
- quantity: 1,
|
|
|
+ // quantity: 1,
|
|
|
couponId: item.couponId,
|
|
|
picUrl: item.picUrl,
|
|
|
title: item.title,
|
|
@@ -773,7 +789,7 @@ export default {
|
|
|
this.awardsList[this.prizeIndex].prizeList = this.awardsList[
|
|
|
this.prizeIndex
|
|
|
].prizeList.concat(this.selectGoodsList);
|
|
|
- this.getQuantity();
|
|
|
+ // this.getQuantity();
|
|
|
this.getGoodsList();
|
|
|
this.close();
|
|
|
},
|
|
@@ -783,7 +799,7 @@ export default {
|
|
|
this.awardsList[this.prizeIndex].prizeList = this.awardsList[
|
|
|
this.prizeIndex
|
|
|
].prizeList.concat(this.selectCouponList);
|
|
|
- this.getQuantity();
|
|
|
+ // this.getQuantity();
|
|
|
this.getCouponList();
|
|
|
this.close();
|
|
|
},
|
|
@@ -792,7 +808,7 @@ export default {
|
|
|
confirmCoin() {
|
|
|
let coin = {
|
|
|
prizeType: "coin",
|
|
|
- quantity: 1,
|
|
|
+ // quantity: 1,
|
|
|
title: `盲豆 x${this.coinForm.quantity}`,
|
|
|
picUrl: publicFileGetUrl + "md.jpeg",
|
|
|
coinValue: this.coinForm.quantity,
|
|
@@ -800,7 +816,7 @@ export default {
|
|
|
this.$refs["coinForm"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.awardsList[this.prizeIndex].prizeList.push(coin);
|
|
|
- this.getQuantity();
|
|
|
+ // this.getQuantity();
|
|
|
this.close();
|
|
|
} else {
|
|
|
return false;
|