#EQD-7213 授信额度设置:授信额度没有自动填充
This commit is contained in:
@@ -60,6 +60,14 @@
|
||||
changeFormCredit(Number(moneytemp).toFixed(2) + "");
|
||||
}
|
||||
|
||||
//授信可用比例默认填1;授信额度置灰,按 原始授信值×最大授信可用比例 联动计算
|
||||
if (!$("#MaxCreditUseRatio").val()) {
|
||||
$("#MaxCreditUseRatio").val("1");
|
||||
}
|
||||
$("#OriginalCredit").on("input change", calcCreditByRatio);
|
||||
$("#MaxCreditUseRatio").on("input change", calcCreditByRatio);
|
||||
calcCreditByRatio();
|
||||
|
||||
//$('#Credit').keyup(function () {
|
||||
// changePrice();
|
||||
//});
|
||||
@@ -134,6 +142,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
//授信额度 = 原始授信值 × 最大授信可用比例(空白按1);原始授信值为空时不折算,保留原授信额度
|
||||
function calcCreditByRatio() {
|
||||
var original = $("#OriginalCredit").val();
|
||||
if (original == null || original == "") {
|
||||
return;
|
||||
}
|
||||
var ratio = $("#MaxCreditUseRatio").val();
|
||||
var money = (Number(original.replace(/,/g, "")) * (ratio == "" ? 1 : Number(ratio))).toFixed(2);
|
||||
$("#Credit").val(money);
|
||||
$("#CreditVal").val(money);
|
||||
changeFormCredit(money);
|
||||
}
|
||||
|
||||
function checkSubmitData() {
|
||||
var pass = $('#creditEditForm').valid();
|
||||
if (pass) {
|
||||
@@ -416,11 +437,11 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
@Html.MyDecimalFor(model => model.Credit, new { onfocus = "moneyOnFocus()", onblur = "this.value=cc(this.value);" }, !pageObj.UseClientStockEqvNotional)
|
||||
@Html.MyDecimalFor(model => model.Credit, new { @readonly = "readonly", style = "background-color:#eee;" }, !pageObj.UseClientStockEqvNotional)
|
||||
<input type="hidden" value="@Model.Credit" name="CreditVal" id="CreditVal" />
|
||||
@Html.MyDecimalFor(model => model.OriginalCredit, new { onfocus = "moneyOnFocusOriginalCredit()", onblur = "this.value=cc(this.value);" }, required: false)
|
||||
@Html.MyDecimalFor(model => model.MaxCreditUseRatio, required: false)
|
||||
<span style="color:red">注:填写原始授信值后,授信额度将按"原始授信值×最大授信可用比例(空白按1)"自动计算.</span>
|
||||
<span style="color:red">注:授信额度按"原始授信值×最大授信可用比例(默认1)"自动计算,无需填写;原始授信值为空时不折算,保留原授信额度.</span>
|
||||
@if (PS.Config.Company == CompanyEnum.中金)
|
||||
{
|
||||
@Html.MyDecimalFor(model => model.PFECredit, new { onkeyup = "changePFECredit()", onfocus = "pfeCreditOnFocus()", onblur = "this.value=cc(this.value);" }, true)
|
||||
|
||||
Reference in New Issue
Block a user