From 9738370a0e03882a51d1cfe32f6a70bba5d64aa5 Mon Sep 17 00:00:00 2001 From: wugang <425674808@qq.com> Date: Thu, 28 Dec 2017 10:28:28 +0800 Subject: [PATCH] ... --- .../Pages/B3YunKen/Overlays/OrderEdit_Ext.cs | 1 + .../BLActions/SaleOutStoreFreightData.cs | 51 +++++++++++++++++++ BWP.B3_YunKen/BWP.B3_YunKen.csproj | 1 + 3 files changed, 53 insertions(+) create mode 100644 BWP.B3_YunKen/BLActions/SaleOutStoreFreightData.cs diff --git a/BWP.B3_YunKen.Web/Pages/B3YunKen/Overlays/OrderEdit_Ext.cs b/BWP.B3_YunKen.Web/Pages/B3YunKen/Overlays/OrderEdit_Ext.cs index d84bad8..906c35f 100644 --- a/BWP.B3_YunKen.Web/Pages/B3YunKen/Overlays/OrderEdit_Ext.cs +++ b/BWP.B3_YunKen.Web/Pages/B3YunKen/Overlays/OrderEdit_Ext.cs @@ -25,6 +25,7 @@ namespace BWP.Web.Pages.B3YunKen.Overlays config.Add("FreightBear"); config.Add("FreightUnitPrice"); config.Add("FreightPrice"); + config.Add("FreightPayment"); } protected override void AddLayOutManagerScript(LayoutManager layoutPanel)//联动下拉 diff --git a/BWP.B3_YunKen/BLActions/SaleOutStoreFreightData.cs b/BWP.B3_YunKen/BLActions/SaleOutStoreFreightData.cs new file mode 100644 index 0000000..2a6105f --- /dev/null +++ b/BWP.B3_YunKen/BLActions/SaleOutStoreFreightData.cs @@ -0,0 +1,51 @@ +using BWP.B3Frameworks.Utils; +using BWP.B3Sale.BO; +using Forks.EnterpriseServices.BusinessInterfaces; +using Forks.EnterpriseServices.DomainObjects2; +using Forks.EnterpriseServices.DomainObjects2.DQuery; +using Forks.EnterpriseServices.SqlDoms; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using TSingSoft.WebPluginFramework; +using TSingSoft.WebPluginFramework.BIPlugins.BLEvents; +using BWP.B3Sale.Utils; +using Forks.Utils; +using BWP.B3Frameworks.BO.MoneyTemplate; + +namespace BWP.B3_YunKen.BLActions +{ + public class SaleOutStoreFreightData : IBLMethodAction + { + public string Description + { + get { return "若{计价方式}为计重,则运费金额=【销售出库】明细中{报价数量}合计*{运费单价};若{计价方式}为包车,则运费单价=【销售出库】的{运费金额}/【销售出库】明细中{报价数量}合计"; } + } + + public void Execute(IDmoContext context, object dmo, object parameter) + { + var bill = dmo as SaleOutStore; + if (bill == null) + return; + if (bill.FreightPayment == 运费支付方式.计重) { + bill.FreightPrice = (Money<金额>?)(bill.AllUnitNum * (bill.FreightUnitPrice??0).Value); + } else if (bill.FreightPayment == 运费支付方式.包车 && bill.AllUnitNum!=0) { + bill.FreightUnitPrice = bill.FreightPrice / bill.AllUnitNum.Value.Value; + } + } + + public IList Features + { + get { return new List(); } + } + + public string Name + { + get { return "B3_YunKen.根据计价方式算运费相关"; } + } + } +} + + + diff --git a/BWP.B3_YunKen/BWP.B3_YunKen.csproj b/BWP.B3_YunKen/BWP.B3_YunKen.csproj index a92998d..12988d6 100644 --- a/BWP.B3_YunKen/BWP.B3_YunKen.csproj +++ b/BWP.B3_YunKen/BWP.B3_YunKen.csproj @@ -67,6 +67,7 @@ +