diff --git a/src/views/users/GiftManageView.vue b/src/views/users/GiftManageView.vue index d7aadf8..db24e3f 100644 --- a/src/views/users/GiftManageView.vue +++ b/src/views/users/GiftManageView.vue @@ -744,7 +744,6 @@ export default { }, created() { this.$nextTick(function () { - this.giftUnlockList(); this.levelList(); this.initData(); }); @@ -865,7 +864,7 @@ export default { value: e.giftId, }; }); - ComboboxHelper.build(lockGifts, '#baseGiftId', null); + ComboboxHelper.build(lockGifts, '#baseGiftId', this.gift.baseGiftId); }); }, levelList() { @@ -1207,6 +1206,9 @@ export default { $('#bannerSkipUrl').val(''); $('#sendDressIdBak').val(''); $('#receiveDressIdBak').val(''); + setTimeout(() => { + $this.giftUnlockList(); + }, 1000); $("#giftModal").modal('show'); }); $("#gift-version-save").click(function () { @@ -1461,6 +1463,7 @@ export default { $this.gift.giftType = entity.giftType; $this.gift.subGiftType = entity.subGiftType; $this.gift.baseGiftId = entity.baseGiftId; + $this.gift.unlockNum = entity.unlockNum; $this.gift.sendDressType = entity.sendDressType; $this.gift.sendDressId = entity.sendDressId; $this.gift.sendDressTime = entity.sendDressTime; @@ -1588,17 +1591,21 @@ export default { $('#bannerSkipUrl').val(entity.bannerSkipUrl); $('#sendDressIdBak').val(entity.sendDressId); $('#receiveDressIdBak').val(entity.receiveDressId); - // 打开编辑弹窗 - $("#giftModal").modal('show'); - if (entity.giftType == 16) { - $('#giftType').attr('disabled', 'disabled'); - $('#subGiftType').attr('disabled', 'disabled'); - $('#baseGiftId').attr('disabled', 'disabled'); - $('#unlockNum').attr('disabled', 'disabled'); - } else if (entity.giftType == 17) { + if (entity.giftType == 17) { $this.changeDressType('send'); $this.changeDressType('receive'); } + setTimeout(() => { + if (entity.giftType == 16) { + $('#giftType').attr('disabled', 'disabled'); + $('#subGiftType').attr('disabled', 'disabled'); + $('#baseGiftId').attr('disabled', 'disabled'); + $('#unlockNum').attr('disabled', 'disabled'); + } + $this.giftUnlockList(); + }, 1000); + // 打开编辑弹窗 + $("#giftModal").modal('show'); } else { $("#tipMsg").text("获取菜单信息出错"); $("#tipModal").modal('show');