退款账号不允许续费

This commit is contained in:
“wanyongkang”
2024-02-18 16:00:29 +08:00
parent 97a7635790
commit a5cf256780
2 changed files with 16 additions and 2 deletions

View File

@@ -107,7 +107,7 @@
@foreach (var item in Model)
{
<tr>
<td><input type="checkbox" class="selectAccount" value="@item.Account" a-pid="@(item.ProductId)" a-connectCount="@item.ConnectCount" a-aType="@item.AccountType" style="width: 0.4rem;height: 0.4rem;" /></td>
<td><input type="checkbox" class="selectAccount" value="@item.Account" a-status="@(item.Status)" a-pid="@(item.ProductId)" a-connectCount="@item.ConnectCount" a-aType="@item.AccountType" style="width: 0.4rem;height: 0.4rem;" /></td>
<td>@item.ProductName/@item.PackageName</td>
<td>@item.Account</td>
<td>
@@ -818,6 +818,7 @@
var accounts = [];
var accountModels = [];
var isTest = false
var isrefund = false;
$.each($('input:checkbox:checked'), function () {
var account = $(this).val();
if (account) {
@@ -830,6 +831,11 @@
accountModels.push(accountItem)
accounts.push(account)
if (accountItem.isTest) isTest = true;
var status = $(this).attr('a-status');
if (status == 'Refund') {
isrefund = true;
return;
}
}
});
@@ -837,6 +843,7 @@
if (!isSame(accountModels, 'pid')) { alert('必须选择相同的产品'); return; }
if (!isSame(accountModels, 'connectCount')) { alert('必须选择相同的连接数'); return; }
if (isTest) { alert('测试账号暂不支持续费,请新开正式账号'); return; }
if (isrefund) { alert('退款账号暂不支持续费,请新开正式账号'); return; }
window.location.href = "/product/rebuyindex?productId=" + accountModels[0].pid + "&accounts=" + accounts.join(",");
})

View File

@@ -384,7 +384,7 @@
@foreach (var item in Model)
{
<tr>
<td><input type="checkbox" class="selectAccount" value="@item.Account" a-pid="@(item.ProductId)" a-connectCount="@item.ConnectCount" a-aType="@item.AccountType" /></td>
<td><input type="checkbox" class="selectAccount" value="@item.Account" a-status="@(item.Status)" a-pid="@(item.ProductId)" a-connectCount="@item.ConnectCount" a-aType="@item.AccountType" /></td>
<td>@item.CreateTime.ToString("yyyy.MM.dd")</td>
<td>@item.ProductName</td>
<td>@item.PackageName</td>
@@ -1251,6 +1251,7 @@
var accounts = [];
var accountModels = [];
var isTest = false
var isrefund = false;
$.each($('input:checkbox:checked'), function () {
var account = $(this).val();
if (account) {
@@ -1263,12 +1264,18 @@
accountModels.push(accountItem)
accounts.push($(this).val())
if (accountItem.isTest) isTest = true;
var status = $(this).attr('a-status');
if (status == 'Refund') {
isrefund = true;
return;
}
}
});
if (accountModels.length == 0) { alert('请选择账号'); return; }
if (!isSame(accountModels, 'pid')) { alert('必须选择相同的产品'); return; }
if (!isSame(accountModels, 'connectCount')) { alert('必须选择相同的连接数'); return; }
if (isTest) { alert('测试账号暂不支持续费,请新开正式账号'); return; }
if (isrefund) { alert('退款账号暂不支持续费,请新开正式账号'); return; }
window.location.href = "/product/rebuyindex?productId=" + accountModels[0].pid + "&accounts=" + accounts.join(",");
})