后台-赠送钻石水晶-公款打钻数额校验

This commit is contained in:
liaozetao
2023-10-07 12:11:49 +08:00
parent 51f6813d53
commit dece6f7476

View File

@@ -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();