订单排序,优化异常重拍

This commit is contained in:
wule committed 2026-10-19 18:18:02 +08:00
1 parent fd0ff6771f
commit d36774ea18
7 files changed
+74 -9

No files matched your search

@@ -355,6 +355,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
return;
}
var oldVisibility = orderItem.BtnAbnormalOrderRebuyVisibility;
if (!orderItem.GetIsAbnormalOrderRebuy() && GlobalConfig.lstOrder.Any(o => o.orderItems
.Any(oi => oi.ItemTransitOrder?.order_no == orderItem.order_id && oi.ItemTransitOrder?.order_sku_id == orderItem.sku_id)))
{
@@ -378,6 +379,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
orderItem = newOrder?.orderItems?.FirstOrDefault(oi => oi.sku_id == skuId);
if (orderItem == null)
return;
if (isAbnormalOrder)
orderItem.BtnAbnormalOrderRebuyVisibility = oldVisibility;
if (!isAbnormalOrder && orderItem.ItemTransitOrder != null)
{
@@ -1440,6 +1443,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
void directBuyOrder()
{
var orderItem = this.DataContext as oms_wei_order_item_info;
var oldVisibility = orderItem.BtnAbnormalOrderRebuyVisibility;
if (orderItem == null)
{
BaseMsgWindow.ShowError("订单信息为空");
@@ -1471,12 +1475,13 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
var skuId = orderItem.sku_id;
MainWindow.Instance.orderListCtrl.GetOrder(orderId);
var newOrder = GlobalConfig.lstOrder.FirstOrDefault(or => or.order_id == orderId);
if (newOrder.orderItems.Count == 1)
if (newOrder?.orderItems.Count == 1)
orderItem = newOrder?.orderItems?.FirstOrDefault();
else
orderItem = newOrder?.orderItems?.FirstOrDefault(oi => oi.sku_id == skuId);
if (orderItem == null)
return;
orderItem.BtnAbnormalOrderRebuyVisibility = oldVisibility;
if (!orderItem.ItemOrder.out_order_no.IsNullOrEmpty() && orderItem.ItemOrder.out_after_sale_status != "退款成功")
{