Browse Source

1.在等待采购状态中设置本地自发之后,移除订单列表

2.在等待采购中设置代发并修改商家备注之后,移除订单列表
qianyi
shanji 2 years ago
parent
commit
217163eb8a
  1. 2
      BBWY.Client/BBWY.Client.csproj
  2. 62
      BBWY.Client/ViewModels/Order/OrderListViewModel.cs

2
BBWY.Client/BBWY.Client.csproj

@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWPF>true</UseWPF>
<ApplicationIcon>Resources\Images\bbwylogo.ico</ApplicationIcon>

62
BBWY.Client/ViewModels/Order/OrderListViewModel.cs

@ -310,7 +310,7 @@ namespace BBWY.Client.ViewModels
Task.Factory.StartNew(() => LoadOrder(1));
}
public void RefreshOrder(string orderId)
public void RefreshOrder(string orderId, bool isRemoveOrder = false)
{
//Task.Factory.StartNew(() => LoadOrder(PageIndex));
var order = OrderList.FirstOrDefault(o => o.Id == orderId);
@ -320,7 +320,7 @@ namespace BBWY.Client.ViewModels
return;
}
if (OrderState == Models.OrderState. && order.StorageType == null)
if (isRemoveOrder)
{
IsLoading = false;
Application.Current.Dispatcher.Invoke(() =>
@ -512,34 +512,6 @@ namespace BBWY.Client.ViewModels
AfterSaleOrderUnhandleCount = response.Data.AfterSaleOrderUnhandleCount;
}
//private void DecodeConsignee(Order order)
//{
// var plaintextMobile = string.Empty;
// var grab = new GrabJDMibole(order.Id);
// if (grab.ShowDialog() == true)
// plaintextMobile = grab.Tag.ToString();
// if (string.IsNullOrEmpty(plaintextMobile))
// {
// MessageBox.Show("未获取到手机号", "提示");
// return;
// }
// IsLoading = true;
// Task.Factory.StartNew(() => orderService.DecodeConsignee(order.Id, plaintextMobile)).ContinueWith(t =>
// {
// var response = t.Result;
// IsLoading = false;
// if (!response.Success)
// {
// App.Current.Dispatcher.Invoke(() => MessageBox.Show(response.Msg, "解密失败"));
// return;
// }
// order.Consignee.ContactName = response.Data.ContactName;
// order.Consignee.Address = response.Data.Address;
// order.Consignee.Mobile = response.Data.Mobile;
// order.Consignee.IsDecode = true;
// });
//}
private void GetBuyerAccount(Order order)
{
if (string.IsNullOrEmpty(order.BuyerAccount))
@ -689,26 +661,6 @@ namespace BBWY.Client.ViewModels
}
RefreshOrder(orderId);
});
//var relationPurchaseOrder = sender as RelationPurchaseOrder;
//if (relationPurchaseOrder.DialogResult != true)
// return;
//var orderDropShipping = relationPurchaseOrder.OrderDropShipping;
//var relationPurchaseOrderSkuList = relationPurchaseOrder.RelationPurchaseOrderSkuList;
//IsLoading = true;
//Task.Factory.StartNew(() => orderService.RelationPurchaseOrder(orderDropShipping, relationPurchaseOrderSkuList, globalContext.User.Shop.PlatformCommissionRatio ?? 0.05M))
// .ContinueWith(r =>
// {
// var response = r.Result;
// if (!response.Success)
// {
// IsLoading = false;
// App.Current.Dispatcher.Invoke(() => MessageBox.Show(response.Msg, "关联采购订单"));
// return;
// }
// //LoadOrder(PageIndex); //关联订单刷新订单列表
// RefreshOrder(orderDropShipping.OrderId);
// });
}
private void Sd_Closed(object sender, EventArgs e)
@ -833,7 +785,7 @@ namespace BBWY.Client.ViewModels
}
//LoadOrder(PageIndex); //自动计算成功刷新订单列表
RefreshOrder(orderId);
RefreshOrder(orderId, isSetStorageType);
});
}
else
@ -910,7 +862,7 @@ namespace BBWY.Client.ViewModels
return;
}
//LoadOrder(PageIndex); //手动计算成功刷新订单列表
RefreshOrder(orderId);
RefreshOrder(orderId, isSetStorageType);
});
}
@ -995,7 +947,11 @@ namespace BBWY.Client.ViewModels
App.Current.Dispatcher.Invoke(() => MessageBox.Show(response.Msg, "修改商家备注"));
return;
}
if (OrderState == Models.OrderState. && order.StorageType == StorageType.)
{
App.Current.Dispatcher.Invoke(() => OrderList.Remove(order));
return;
}
order.VenderRemark = venderRemark;
order.Flag = flag;
});

Loading…
Cancel
Save