shanji 3 years ago
parent
commit
4b32c868b6
  1. 39
      BBWY.Client/ViewModels/BillCorrection/BillCorrectionViewModel.cs

39
BBWY.Client/ViewModels/BillCorrection/BillCorrectionViewModel.cs

@ -72,6 +72,12 @@ namespace BBWY.Client.ViewModels
/// 查询订单 /// 查询订单
/// </summary> /// </summary>
public ICommand SearchBillCorrectionOrderCommand { get; set; } public ICommand SearchBillCorrectionOrderCommand { get; set; }
/// <summary>
/// 矫正费用
/// </summary>
public ICommand CorrectCommand { get; set; }
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } } public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } }
public IList<BillCorrectionOrder> OrderList { get; set; } public IList<BillCorrectionOrder> OrderList { get; set; }
@ -92,6 +98,7 @@ namespace BBWY.Client.ViewModels
ImportSaleFreightBillCommand = new RelayCommand<string>(ImportSaleFreightBill); ImportSaleFreightBillCommand = new RelayCommand<string>(ImportSaleFreightBill);
SearchBillCorrectionOrderCommand = new RelayCommand(SearchBillCorrectionOrder); SearchBillCorrectionOrderCommand = new RelayCommand(SearchBillCorrectionOrder);
CorrectCommand = new RelayCommand(Correct);
} }
private void OnSearchShopKeyWordChanged(string key) private void OnSearchShopKeyWordChanged(string key)
@ -313,25 +320,33 @@ namespace BBWY.Client.ViewModels
var list = response.Data.Map<IList<BillCorrectionOrder>>(); var list = response.Data.Map<IList<BillCorrectionOrder>>();
App.Current.Dispatcher.BeginInvoke((Action)delegate App.Current.Dispatcher.Invoke(() =>
{ {
foreach (var order in list) foreach (var order in list)
{ {
if (string.IsNullOrEmpty(order.WaybillNo)) //if (string.IsNullOrEmpty(order.WaybillNo))
continue; // continue;
var billModel = SaleFreightBillList.FirstOrDefault(b => b.BillNo == order.WaybillNo); //var billModel = SaleFreightBillList.FirstOrDefault(b => b.BillNo == order.WaybillNo);
if (billModel == null) //if (billModel == null)
continue; // continue;
if (billModel.Amount != order.DeliveryExpressFreight) //if (billModel.Amount != order.DeliveryExpressFreight)
{ //{
order.NewDeliveryExpressFreight = billModel.Amount; // order.NewDeliveryExpressFreight = billModel.Amount;
order.ChangedContent = $"销售运费 {order.DeliveryExpressFreight} -> {order.NewDeliveryExpressFreight}"; // order.ChangedContent = $"销售运费 {order.DeliveryExpressFreight} -> {order.NewDeliveryExpressFreight}";
} //}
OrderList.Add(order); OrderList.Add(order);
} }
}); });
}); });
} }
/// <summary>
/// 矫正费用
/// </summary>
private void Correct()
{
}
} }
} }

Loading…
Cancel
Save