diff --git a/BBWY.Client/APIServices/OrderService.cs b/BBWY.Client/APIServices/OrderService.cs index b381e87d..d5d24749 100644 --- a/BBWY.Client/APIServices/OrderService.cs +++ b/BBWY.Client/APIServices/OrderService.cs @@ -119,7 +119,8 @@ namespace BBWY.Client.APIServices osku.DeliveryExpressFreight, osku.FirstFreight, DeductionQuantity = osku.ItemTotal, - osku.OperationAmount, + osku.InStorageAmount, + osku.OutStorageAmount, osku.PurchaseFreight, osku.ProductId, osku.SkuAmount, diff --git a/BBWY.Client/Models/APIModel/Response/PurchaseOrder/PurchaseOrderResponse.cs b/BBWY.Client/Models/APIModel/Response/PurchaseOrder/PurchaseOrderResponse.cs index cc141424..6464e3f5 100644 --- a/BBWY.Client/Models/APIModel/Response/PurchaseOrder/PurchaseOrderResponse.cs +++ b/BBWY.Client/Models/APIModel/Response/PurchaseOrder/PurchaseOrderResponse.cs @@ -74,5 +74,10 @@ namespace BBWY.Client.Models /// 单件头程运费 /// public decimal SingleFirstFreight { get; set; } = 0.00M; + + /// + /// 退货入仓单价 + /// + public decimal SingleRefundInStorageAmount { get; set; } = 0.00M; } } diff --git a/BBWY.Client/Models/Order/ManualEditCostOrderSku.cs b/BBWY.Client/Models/Order/ManualEditCostOrderSku.cs index d9276363..c46023fc 100644 --- a/BBWY.Client/Models/Order/ManualEditCostOrderSku.cs +++ b/BBWY.Client/Models/Order/ManualEditCostOrderSku.cs @@ -34,11 +34,11 @@ namespace BBWY.Client.Models private decimal firstFreight; private string firstFreightStr; - /// - /// 操作费 - /// - private decimal operationAmount; - private string operationAmountStr; + private decimal inStorageAmount; + private string inStorageAmountStr; + + private decimal outStorageAmount; + private string outStorageAmountStr; /// /// 耗材费 @@ -99,7 +99,6 @@ namespace BBWY.Client.Models } public decimal PurchaseFreight { get => purchaseFreight; set { if (Set(ref purchaseFreight, value)) { CalculationCost(); } } } public decimal FirstFreight { get => firstFreight; set { if (Set(ref firstFreight, value)) { CalculationCost(); } } } - public decimal OperationAmount { get => operationAmount; set { if (Set(ref operationAmount, value)) { CalculationCost(); } } } public decimal ConsumableAmount { get => consumableAmount; set { if (Set(ref consumableAmount, value)) { CalculationCost(); } } } public decimal StorageAmount { get => storageAmount; set { if (Set(ref storageAmount, value)) { CalculationCost(); } } } public decimal TotalCost @@ -115,7 +114,7 @@ namespace BBWY.Client.Models private void CalculationCost() { - TotalCost = SkuAmount + PurchaseFreight + FirstFreight + OperationAmount + ConsumableAmount + StorageAmount; + TotalCost = SkuAmount + PurchaseFreight + FirstFreight + InStorageAmount + OutStorageAmount + ConsumableAmount + StorageAmount; UnitCost = ItemTotal == 0 ? 0 : TotalCost / ItemTotal; } @@ -176,17 +175,6 @@ namespace BBWY.Client.Models } } } - public string OperationAmountStr - { - get => operationAmountStr; set - { - if (Set(ref operationAmountStr, value)) - { - if (decimal.TryParse(operationAmountStr, out decimal d)) - OperationAmount = d; - } - } - } public string DeliveryExpressFreightStr { @@ -199,5 +187,43 @@ namespace BBWY.Client.Models } } } + + public decimal InStorageAmount + { + get => inStorageAmount; + set + { + if (Set(ref inStorageAmount, value)) + CalculationCost(); + } + } + public string InStorageAmountStr + { + get => inStorageAmountStr; + set + { + if (Set(ref inStorageAmountStr, value)) + if (decimal.TryParse(inStorageAmountStr, out decimal d)) + InStorageAmount = d; + } + } + public decimal OutStorageAmount + { + get => outStorageAmount; set + { + if (Set(ref outStorageAmount, value)) + CalculationCost(); + } + } + public string OutStorageAmountStr + { + get => outStorageAmountStr; + set + { + if (Set(ref outStorageAmountStr, value)) + if (decimal.TryParse(outStorageAmountStr, out decimal d)) + OutStorageAmount = d; + } + } } } diff --git a/BBWY.Client/Models/PurchaseOrder/PurchaseOrder.cs b/BBWY.Client/Models/PurchaseOrder/PurchaseOrder.cs index 4c7cc76f..9c104a07 100644 --- a/BBWY.Client/Models/PurchaseOrder/PurchaseOrder.cs +++ b/BBWY.Client/Models/PurchaseOrder/PurchaseOrder.cs @@ -132,8 +132,26 @@ namespace BBWY.Client.Models } } - public decimal SingleInStorageAmount { get => singleInStorageAmount; set { Set(ref singleInStorageAmount, value); } } - public decimal SingleOutStorageAmount { get => singleOutStorageAmount; set { Set(ref singleOutStorageAmount, value); } } + public decimal SingleInStorageAmount + { + get => singleInStorageAmount; + set + { + if (Set(ref singleInStorageAmount, value)) + RefreshUnitCost(); + } + } + public decimal SingleOutStorageAmount + { + get => singleOutStorageAmount; + set + { + if (Set(ref singleOutStorageAmount, value)) + RefreshUnitCost(); + } + } + + public decimal SingleRefundInStorageAmount { get => singleRefundInStorageAmount; set { Set(ref singleRefundInStorageAmount, value); } } public void RefreshUnitCost() { @@ -153,5 +171,6 @@ namespace BBWY.Client.Models private decimal singleStorageAmount; private decimal singleInStorageAmount; private decimal singleOutStorageAmount; + private decimal singleRefundInStorageAmount; } } diff --git a/BBWY.Client/ViewModels/Order/OrderListViewModel.cs b/BBWY.Client/ViewModels/Order/OrderListViewModel.cs index fcf308a5..61b6dca1 100644 --- a/BBWY.Client/ViewModels/Order/OrderListViewModel.cs +++ b/BBWY.Client/ViewModels/Order/OrderListViewModel.cs @@ -629,7 +629,9 @@ namespace BBWY.Client.ViewModels manualEditCostOrderSku.ConsumableAmount = orderCostDetailList.Sum(ocd => ocd.ConsumableAmount); manualEditCostOrderSku.DeliveryExpressFreight = orderCostDetailList.Sum(ocd => ocd.DeliveryExpressFreight); manualEditCostOrderSku.FirstFreight = orderCostDetailList.Sum(ocd => ocd.FirstFreight); - manualEditCostOrderSku.OperationAmount = orderCostDetailList.Sum(ocd => ocd.OperationAmount); + //manualEditCostOrderSku.OperationAmount = orderCostDetailList.Sum(ocd => ocd.OperationAmount); + manualEditCostOrderSku.InStorageAmount = orderCostDetailList.Sum(ocd => ocd.InStorageAmount); + manualEditCostOrderSku.OutStorageAmount = orderCostDetailList.Sum(ocd => ocd.OutStorageAmount); manualEditCostOrderSku.PurchaseFreight = orderCostDetailList.Sum(ocd => ocd.PurchaseFreight); manualEditCostOrderSku.SkuAmount = orderCostDetailList.Sum(ocd => ocd.SkuAmount); manualEditCostOrderSku.StorageAmount = orderCostDetailList.Sum(ocd => ocd.StorageAmount); @@ -639,7 +641,9 @@ namespace BBWY.Client.ViewModels manualEditCostOrderSku.ConsumableAmountStr = manualEditCostOrderSku.ConsumableAmount.ToString(); manualEditCostOrderSku.DeliveryExpressFreightStr = manualEditCostOrderSku.DeliveryExpressFreight.ToString(); manualEditCostOrderSku.FirstFreightStr = manualEditCostOrderSku.FirstFreight.ToString(); - manualEditCostOrderSku.OperationAmountStr = manualEditCostOrderSku.OperationAmount.ToString(); + //manualEditCostOrderSku.OperationAmountStr = manualEditCostOrderSku.OperationAmount.ToString(); + manualEditCostOrderSku.InStorageAmountStr = manualEditCostOrderSku.InStorageAmount.ToString(); + manualEditCostOrderSku.OutStorageAmountStr = manualEditCostOrderSku.OutStorageAmount.ToString(); manualEditCostOrderSku.PurchaseFreightStr = manualEditCostOrderSku.PurchaseFreight.ToString(); manualEditCostOrderSku.SkuAmountStr = manualEditCostOrderSku.SkuAmount.ToString(); manualEditCostOrderSku.StorageAmountStr = manualEditCostOrderSku.StorageAmount.ToString(); diff --git a/BBWY.Client/Views/Ware/WareStock.xaml b/BBWY.Client/Views/Ware/WareStock.xaml index bebeb534..c37b3d0f 100644 --- a/BBWY.Client/Views/Ware/WareStock.xaml +++ b/BBWY.Client/Views/Ware/WareStock.xaml @@ -7,7 +7,7 @@ xmlns:b="http://schemas.microsoft.com/xaml/behaviors" xmlns:sys="clr-namespace:System;assembly=mscorlib" mc:Ignorable="d" - d:DesignHeight="450" d:DesignWidth="800" + d:DesignHeight="450" d:DesignWidth="1300" DataContext="{Binding WareStock,Source={StaticResource Locator}}" xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" xmlns:ts="clr-namespace:BBWY.Client.TemplateSelectors" @@ -43,9 +43,11 @@ + + - + @@ -53,18 +55,20 @@ - - - - - + + + + + + + - - - - + + + + - + @@ -87,7 +91,10 @@ - + + + + @@ -105,9 +112,11 @@ + + - + - - - - + + + + + + - - - - + + + + - + @@ -154,7 +165,9 @@ - + + + @@ -185,7 +198,7 @@ Background="#F2F2F2"> - + @@ -198,34 +211,42 @@ + + - + - + - - - - + + + + + + + + + + - - - - - + + + + + @@ -243,6 +264,8 @@ + + @@ -289,7 +312,7 @@ Width="{Binding ActualWidth,ElementName=listbox_sku}"> - + @@ -377,7 +400,6 @@ - diff --git a/BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs b/BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs index 2e514922..58d9e759 100644 --- a/BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs +++ b/BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs @@ -96,6 +96,7 @@ namespace BBWY.Server.Business .Set(po => po.SingleFirstFreight, editPurchaseOrderRequest.SingleFirstFreight) .Set(po => po.SingleInStorageAmount, editPurchaseOrderRequest.SingleInStorageAmount) .Set(po => po.SingleOutStorageAmount, editPurchaseOrderRequest.SingleOutStorageAmount) + .Set(po=> po.SingleRefundInStorageAmount,editPurchaseOrderRequest.SingleRefundInStorageAmount) .Set(po => po.SingleConsumableAmount, editPurchaseOrderRequest.SingleConsumableAmount) .Set(po => po.SingleStorageAmount, editPurchaseOrderRequest.SingleStorageAmount) .Set(po => po.SingleDeliveryFreight, editPurchaseOrderRequest.SingleDeliveryFreight) diff --git a/BBWY.Server.Model/Dto/Request/PurchaseOrder/EditPurchaseOrderRequest.cs b/BBWY.Server.Model/Dto/Request/PurchaseOrder/EditPurchaseOrderRequest.cs index c2bfeab0..1c021027 100644 --- a/BBWY.Server.Model/Dto/Request/PurchaseOrder/EditPurchaseOrderRequest.cs +++ b/BBWY.Server.Model/Dto/Request/PurchaseOrder/EditPurchaseOrderRequest.cs @@ -54,5 +54,10 @@ /// 单件出仓操作费 /// public decimal SingleOutStorageAmount { get; set; } = 0.00M; + + /// + /// 退货入仓费 + /// + public decimal SingleRefundInStorageAmount { get; set; } = 0.00M; } } \ No newline at end of file