优化读取订单的展示

This commit is contained in:
wule committed 2026-10-18 08:09:48 +08:00
1 parent b827c6e118
commit 06e45bf587
7 files changed
+127 -105

No files matched your search

@@ -103,11 +103,7 @@ namespace AllBase.Model.DBModel
public order_item_ext OrderItemExt
{
get { return this.GetValue(x => x.OrderItemExt); }
set
{
this.SetValue(x => x.OrderItemExt, value);
ShopWaybillExceptionStr = value == null ? "" : value.abnormal_text.ParseToString();
}
set { this.SetValue(x => x.OrderItemExt, value); }
}
/// <summary>
/// 店铺后台显示的物流异常信息(订单扩展信息)
@@ -115,13 +111,18 @@ namespace AllBase.Model.DBModel
public string ShopWaybillExceptionStr
{
get { return this.GetValue(x => x.ShopWaybillExceptionStr); }
set { this.SetValue(x => x.ShopWaybillExceptionStr, value); ShopWaybillExceptionStrVisibility = value.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible; }
set { this.SetValue(x => x.ShopWaybillExceptionStr, value); }
}
public Visibility ShopWaybillExceptionStrVisibility
{
get { return this.GetValue(x => x.ShopWaybillExceptionStrVisibility); }
set { this.SetValue(x => x.ShopWaybillExceptionStrVisibility, value); }
}
void SetOrderItemExtInfo()
{
ShopWaybillExceptionStr = OrderItemExt == null ? "" : OrderItemExt.abnormal_text.ParseToString();
ShopWaybillExceptionStrVisibility = ShopWaybillExceptionStr.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible;
}
public oms_wei_order_info ItemOrder
@@ -134,19 +135,32 @@ namespace AllBase.Model.DBModel
public oms_wei_refund_info ItemRefund
{
get { return this.GetValue(x => x.ItemRefund); }
set { this.SetValue(x => x.ItemRefund, value); }
set { this.SetValue(x => x.ItemRefund, value);
RefundReasonTextStrVisibility = ItemRefund?.ReasonTextStrVisibility ?? Visibility.Collapsed;
RefundAfterSaleOrderIdVisibility = ItemRefund?.AfterSaleOrderIdVisibility ?? Visibility.Collapsed; }
}
public string RefundAddressStr
public Visibility RefundReasonTextStrVisibility
{
get { return this.GetValue(x => x.RefundReasonTextStrVisibility); }
set { this.SetValue(x => x.RefundReasonTextStrVisibility, value); }
}
public Visibility RefundAfterSaleOrderIdVisibility
{
get { return this.GetValue(x => x.RefundAfterSaleOrderIdVisibility); }
set { this.SetValue(x => x.RefundAfterSaleOrderIdVisibility, value); }
}
public string RefundAddressStr
{
get { return this.GetValue(x => x.RefundAddressStr); }
set
{
this.SetValue(x => x.RefundAddressStr, value);
if (value.ParseToString().Length > 26)
RefundAddressShortStr = string.Join("", value.ParseToString().Take(26)) + "…";
if (RefundAddressStr.ParseToString().Length > 26)
RefundAddressShortStr = string.Join("", RefundAddressStr.ParseToString().Take(26)) + "…";
else
RefundAddressShortStr = value.ParseToString();
RefundAddressShortStr = RefundAddressStr.ParseToString().Trim();
RefundAddressShortStrVisibility = RefundAddressShortStr.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible;
}
@@ -164,6 +178,10 @@ namespace AllBase.Model.DBModel
public void SetItemRefund()
{
if (order_id == "3739902323987233280")
{
}
if (ItemOrder?.refundItems?.Count == 1)
ItemRefund = ItemOrder?.refundItems?.FirstOrDefault();
else
@@ -193,7 +211,7 @@ namespace AllBase.Model.DBModel
public string RefundResultStr
{
get { return this.GetValue(x => x.RefundResultStr); }
set { this.SetValue(x => x.RefundResultStr, value); RefundResultStrVisibility = value.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible; }
set { this.SetValue(x => x.RefundResultStr, value); RefundResultStrVisibility = RefundResultStr.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible; }
}
public Visibility RefundResultStrVisibility
{
@@ -276,10 +294,6 @@ namespace AllBase.Model.DBModel
get { return this.GetValue(x => x.ItemTransitExtraOrder); }
set
{
if (order_id == "3739278903964250368")
{
}
this.SetValue(x => x.ItemTransitExtraOrder, value);
if (ItemTransitExtraOrder != null)
{
@@ -334,9 +348,6 @@ namespace AllBase.Model.DBModel
public void SetTransitOrder()
{
if (order_id == "3739241588056569856")
{
}
this.ItemTransitOrder = ItemTransitOrders?.FirstOrDefault(t => t.order_void_status != 1);
this.ItemTransitOrderWithVoid = ItemTransitOrders?.FirstOrDefault();
this.SetTransitRefundStatusStr();
@@ -1576,6 +1587,7 @@ namespace AllBase.Model.DBModel
SetOutOrderTimeQualifiedStr();
CalcOrderPrice();
SetOrderItemStatusAndColor();
SetOrderItemExtInfo();
if (this.ItemTransitOrders != null)
{