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

Loading…
Cancel
Save