修复bug

This commit is contained in:
Dragon
2024-03-21 16:55:20 +08:00
parent c4e4a58fb7
commit 1f39e1f291
2 changed files with 33 additions and 6 deletions

View File

@@ -121,8 +121,11 @@ export default {
}, },
created() { created() {
getAll({ giftType: 16 }).then((res) => { getAll({ giftType: 16 }).then((res) => {
this.inquire.gifts = res.data; var arr = [];
this.inquire.giftId = res.data[0].giftId; arr = res.data;
arr.unshift({ giftId: null, giftName: "全部" });
this.inquire.gifts = arr;
this.inquire.giftId = arr[0].giftId;
}); });
this.getData(); this.getData();
}, },
@@ -150,14 +153,14 @@ export default {
}, },
// 导出 // 导出
exportDate() { exportDate() {
luckyGiftRewardRecordExport({ luckyGiftRewardRecordExport({
giftId: this.inquire.giftId, giftId: this.inquire.giftId,
sendErBanNo: this.inquire.senUserId, sendErBanNo: this.inquire.senUserId,
}).then(); }).then();
}, },
// 分页导航 // 分页导航
handleSizeChange() { handleSizeChange() {
this.getData(); this.getData();
}, },
handleCurrentChange() { handleCurrentChange() {
this.getData(); this.getData();

View File

@@ -4,7 +4,7 @@
<!-- 查询 --> <!-- 查询 -->
<div class="inquire" style="display: inline-block; margin-right: 20px"> <div class="inquire" style="display: inline-block; margin-right: 20px">
<span class="demonstration">选择礼物</span> <span class="demonstration">选择礼物</span>
<el-select v-model="inquire.value1" placeholder="请选择"> <el-select @change="selectGift" v-model="inquire.value1" placeholder="请选择">
<el-option <el-option
v-for="(item, i) in inquire.gifts" v-for="(item, i) in inquire.gifts"
:key="i" :key="i"
@@ -67,6 +67,7 @@
<el-table-column align="center" label="操作" width="300"> <el-table-column align="center" label="操作" width="300">
<template v-slot="scope"> <template v-slot="scope">
<el-button <el-button
v-show="scope.row.isDefault == 0"
@click=" @click="
this.dialogBool = false; this.dialogBool = false;
this.detailsTitle = '编辑'; this.detailsTitle = '编辑';
@@ -77,7 +78,12 @@
size="default" size="default"
>编辑</el-button >编辑</el-button
> >
<el-button @click="del(scope.row)" class="danger" type="danger" size="default" <el-button
v-show="scope.row.isDefault == 0"
@click="del(scope.row)"
class="danger"
type="danger"
size="default"
>删除</el-button >删除</el-button
> >
</template> </template>
@@ -286,6 +292,24 @@ export default {
}); });
}); });
}, },
// 外部监听
selectGift(e) {
console.log(e);
luckyGiftRangeConfigList({ giftId: e }).then((res) => {
this.inquire.giftsNum = res.data;
this.inquire.value2 = res.data[0].id;
this.loading = true;
luckyGiftRewardList({
giftId: e,
rangeId: this.inquire.value2,
}).then((res) => {
this.inquire.diamond = res.data.giftPrice;
this.inquire.giftExpectation = res.data.expectValue;
this.tableData = res.data.list;
this.loading = false;
});
});
},
// 监听弹窗数值变化1 // 监听弹窗数值变化1
selectArea() { selectArea() {
if (this.dialog.value1 == 2) { if (this.dialog.value1 == 2) {