From 91ae77c4af015e01153acc07763f992fdd0544a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=94=A6=E9=BA=9F=20=E7=8E=8B?= Date: Fri, 28 Aug 2026 13:07:27 +0800 Subject: [PATCH] =?UTF-8?q?#EQD-7213=20=E6=8E=88=E4=BF=A1=E9=A2=9D?= =?UTF-8?q?=E5=BA=A6=E8=AE=BE=E7=BD=AE=EF=BC=9A=E6=8E=88=E4=BF=A1=E9=A2=9D?= =?UTF-8?q?=E5=BA=A6=E6=B2=A1=E6=9C=89=E8=87=AA=E5=8A=A8=E5=A1=AB=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YLErpWeb/Views/credit/creditEdit.cshtml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/YLErpWeb/Views/credit/creditEdit.cshtml b/YLErpWeb/Views/credit/creditEdit.cshtml index 9ff43b13..b074c6a7 100644 --- a/YLErpWeb/Views/credit/creditEdit.cshtml +++ b/YLErpWeb/Views/credit/creditEdit.cshtml @@ -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 @@ } - @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) @Html.MyDecimalFor(model => model.OriginalCredit, new { onfocus = "moneyOnFocusOriginalCredit()", onblur = "this.value=cc(this.value);" }, required: false) @Html.MyDecimalFor(model => model.MaxCreditUseRatio, required: false) - 注:填写原始授信值后,授信额度将按"原始授信值×最大授信可用比例(空白按1)"自动计算. + 注:授信额度按"原始授信值×最大授信可用比例(默认1)"自动计算,无需填写;原始授信值为空时不折算,保留原授信额度. @if (PS.Config.Company == CompanyEnum.中金) { @Html.MyDecimalFor(model => model.PFECredit, new { onkeyup = "changePFECredit()", onfocus = "pfeCreditOnFocus()", onblur = "this.value=cc(this.value);" }, true)