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

View File

@@ -4,7 +4,7 @@
<!-- 查询 -->
<div class="inquire" style="display: inline-block; margin-right: 20px">
<span class="demonstration">选择礼物</span>
<el-select v-model="inquire.value1" placeholder="请选择">
<el-select @change="selectGift" v-model="inquire.value1" placeholder="请选择">
<el-option
v-for="(item, i) in inquire.gifts"
:key="i"
@@ -67,6 +67,7 @@
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
v-show="scope.row.isDefault == 0"
@click="
this.dialogBool = false;
this.detailsTitle = '编辑';
@@ -77,7 +78,12 @@
size="default"
>编辑</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
>
</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
selectArea() {
if (this.dialog.value1 == 2) {