From dece6f7476cda989b32ee0ef3fb696dd8ad637ff Mon Sep 17 00:00:00 2001 From: liaozetao <1107136310@qq.com> Date: Sat, 7 Oct 2023 12:11:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0-=E8=B5=A0=E9=80=81=E9=92=BB?= =?UTF-8?q?=E7=9F=B3=E6=B0=B4=E6=99=B6-=E5=85=AC=E6=AC=BE=E6=89=93?= =?UTF-8?q?=E9=92=BB=E6=95=B0=E9=A2=9D=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/record/OfficicalGoldView.vue | 76 +++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/src/views/record/OfficicalGoldView.vue b/src/views/record/OfficicalGoldView.vue index 0572cef..c7490ad 100644 --- a/src/views/record/OfficicalGoldView.vue +++ b/src/views/record/OfficicalGoldView.vue @@ -185,7 +185,81 @@ export default { $("#btnGive").click(function () { //校验 - check(); + if (isGiveBol) { + return; + } + var type = $('#type').val(); + var erBanNos = $("#ernos").val(); + var actualAmount = $('#actualAmount').val(); + var num = $('#num').val(); + var busType = $('#busType').val(); + if (!erBanNos) { + $("#tipMsg").text("请输入平台ID"); + $("#tipModal").modal('show'); + return; + } + if (type == 'COMPANY_ACCOUNT_DIAMOND') { + if (!actualAmount) { + $("#tipMsg").text("请输入实际充值金额数"); + $("#tipModal").modal('show'); + return; + } + var reg = actualAmount.match(/^[0-9]+(.[0-9]{1,3})?$/); + if (reg == null) { + $("#tipMsg").text("请输入合理的充值金额数"); + $("#tipModal").modal('show'); + return; + } + if (actualGold != parseInt(actualAmount * 1000)) { + $("#tipMsg").text("赠送钻石与充值金额兑换比例不正确!"); + $("#tipModal").modal('show'); + return; + } + } + if (type != 'CLEAR_USER_GOLD') { + if (busType == null || busType.trim() == '') { + $("#tipMsg").text("请填写分类"); + $("#tipModal").modal('show'); + return; + } + } if (isGiveBol) { + return; + } + var type = $('#type').val(); + var erBanNos = $("#ernos").val(); + var actualAmount = $('#actualAmount').val(); + var num = $('#num').val(); + var busType = $('#busType').val(); + if (!erBanNos) { + $("#tipMsg").text("请输入平台ID"); + $("#tipModal").modal('show'); + return; + } + if (type == 'COMPANY_ACCOUNT_DIAMOND') { + if (!actualAmount) { + $("#tipMsg").text("请输入实际充值金额数"); + $("#tipModal").modal('show'); + return; + } + var reg = actualAmount.match(/^[0-9]+(.[0-9]{1,3})?$/); + if (reg == null) { + $("#tipMsg").text("请输入合理的充值金额数"); + $("#tipModal").modal('show'); + return; + } + if (actualGold != parseInt(actualAmount * 1000)) { + $("#tipMsg").text("赠送钻石与充值金额兑换比例不正确!"); + $("#tipModal").modal('show'); + return; + } + } + if (type != 'CLEAR_USER_GOLD') { + if (busType == null || busType.trim() == '') { + $("#tipMsg").text("请填写分类"); + $("#tipModal").modal('show'); + return; + } + } //参数 var type = $('#type').val(); var erBanNos = $("#ernos").val();