From 8a895ec2217c5ab86967d268e7e43c9b7d389228 Mon Sep 17 00:00:00 2001 From: liaozetao <1107136310@qq.com> Date: Mon, 1 Apr 2024 10:39:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/vip/VipManageView.vue | 56 ++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/src/views/vip/VipManageView.vue b/src/views/vip/VipManageView.vue index f183720..af82fe6 100644 --- a/src/views/vip/VipManageView.vue +++ b/src/views/vip/VipManageView.vue @@ -104,25 +104,27 @@
-
- -
-
- -
- +
+
+
-
-
- -
- +
+ +
+ +
+
+
+ +
+ +
@@ -328,7 +330,18 @@ const VIP_AUTH_TYPE = { export default { name: "VipManageView", setup() { - return {}; + function swapProfit() { + let isReturnProfit = $('#isReturnProfit').val(); + if (isReturnProfit && isReturnProfit == 1) { + document.getElementById("profitDiv").style.display = "block"; + } else { + document.getElementById("profitDiv").style.display = "none"; + } + } + window.swapProfit = swapProfit; + return { + swapProfit, + }; }, created() { this.$nextTick(function () { @@ -595,7 +608,7 @@ export default { $input.attr('value', returnProfitId); $span.append($input); let html = ''; - if (!i || i == 0) { + if (!profitDate || profitDate == 0) { html += '立即返利,'; } else { html += '第 天,'; @@ -639,12 +652,9 @@ export default { if (json.success == 'true' || json.code == 200) { $("#tipMsg").text("删除成功"); $("#tipModal").modal('show'); - TableHelper.doRefresh("#table"); - $("#editModal").modal('hide'); } else { $("#tipMsg").text("删除失败." + json.message); $("#tipModal").modal('show'); - $("#editModal").modal('hide'); } } }); @@ -697,11 +707,21 @@ export default { } let vipLevel = $("#addForm #vipLevel").val(); let addSize = $('#addSize').val(); + if (addSize && addSize > 5) { + $("#tipMsg").text("返利数量超过5个!!!"); + $("#tipModal").modal('show'); + return; + } let returnProfitArray = []; for (let i = 0; i < addSize; i++) { let returnProfitId = $('#returnProfitId' + i).val(); let profitDate = parseFloat($('#profitDate' + i).val()); let profitAmount = $('#profitAmount' + i).val(); + if (profitDate != 0 && profitDate > 29) { + $("#tipMsg").text("返利日期不能超过30天!"); + $("#tipModal").modal('show'); + return; + } let returnProfit = { vipLevel: vipLevel, profitDate: profitDate,