From b83a4c07739a983af2d5c62de5845ef578f215a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=96=8C?= <1324361213@qq.com> Date: Tue, 29 Jul 2025 19:50:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A1=B9=E7=9B=AE=E9=A2=84?= =?UTF-8?q?=E7=AE=97=E5=88=A9=E6=B6=A6=E8=A1=A8=E5=AE=8C=E6=88=90=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E5=90=8E=E8=87=AA=E5=8A=A8=E5=B0=86=E5=AE=9E=E6=96=BD?= =?UTF-8?q?=E6=88=90=E6=9C=AC=E5=B8=A6=E5=85=A5=E5=AE=9E=E6=96=BD=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E8=A1=8C=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GZ_LTHPilot_ORDER.csproj | 3 ++- XMYSLRB/OnLoadLR.cs | 18 +++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/GZ_LTHPilot_ORDER.csproj b/GZ_LTHPilot_ORDER.csproj index aa51e15..977a5ac 100644 --- a/GZ_LTHPilot_ORDER.csproj +++ b/GZ_LTHPilot_ORDER.csproj @@ -423,6 +423,7 @@ - copy $(TargetPath) "D:\kingdee\K3Cloud\WebSite\Bin\$(TargetFileName)" + + \ No newline at end of file diff --git a/XMYSLRB/OnLoadLR.cs b/XMYSLRB/OnLoadLR.cs index cb129af..6988167 100644 --- a/XMYSLRB/OnLoadLR.cs +++ b/XMYSLRB/OnLoadLR.cs @@ -11,6 +11,8 @@ using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; +using static IronPython.Modules._ast; +using static Kingdee.K3.SCM.App.Core.Validation.InvAccountValidation.InvAccountConsumeSumBillValidator; namespace GZ_LTHPilot_ORDER.XMYSLRB { @@ -53,8 +55,11 @@ WHERE return; } - var SGCB_STR = this.View.Model.GetValue("F_SGCB"); - var SGCB = Convert.ToDecimal(100); + var SGCB_STR = this.View.Model.GetValue("F_SGCB")?.ToString(); + decimal SGCB; + var SGCB_STRIsNumber = decimal.TryParse(SGCB_STR, out SGCB); + + for (int i = 0; i < Count; i++) { @@ -63,13 +68,16 @@ WHERE // 实施安装费,将税率设置为6,将单头上的施工成本带出 if (Convert.ToString(sqlDS[i]["FENTRYID"]) == "682e83afbd70b6") { - this.View.Model.SetItemValueByID("F_VRYF_Decimal_qtr", 6, i); - this.View.Model.SetValue("F_VRYF_Amount_xk9", SGCB, i); + this.View.Model.SetValue("F_VRYF_Decimal_qtr", 6, i); + if (SGCB_STRIsNumber) + { + this.View.Model.SetValue("F_VRYF_Amount_xk9", SGCB, i); + } } // 外包费,将税率设置为6 else if (Convert.ToString(sqlDS[i]["FENTRYID"]) == "682e83e4bd70cb") { - this.View.Model.SetItemValueByID("F_VRYF_Decimal_qtr", 6, i); + this.View.Model.SetValue("F_VRYF_Decimal_qtr", 6, i); } }