|
|
@ -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; |
|
|
|
}); |
|
|
|