1显示最新一条物流信息和展示完整物流轨迹 2优化订单48小时或72小时过滤逻辑

This commit is contained in:
wule committed 2026-09-18 12:21:17 +08:00
1 parent f3fa093709
commit db6774dbda
12 files changed
+749 -33

No files matched your search

@@ -0,0 +1,75 @@
using AllBase.Model.MvvmBaseClasses;
using NaiBa.Util.Extension;
using NaiBa.Util.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AllBase.Model.DBModel
{
public class oms_wei_ewaybill_path : PropertyNotifyObject
{
public long id { get; set; }
public long? shop_id { get; set; }
public long? order_id { get; set; }
public string ewaybill_order_id { get; set; }
public string waybill_id { get; set; }
public long update_time
{
get { return this.GetValue(x => x.update_time); }
set
{
this.SetValue(x => x.update_time, value);
this.UpdateTimeStr = BaseClass.StampToDateTime(value.ParseToInt()).ToString("yyyy-MM-dd HH:mm:ss");
}
}
public string UpdateTimeStr
{
get { return this.GetValue(x => x.UpdateTimeStr); }
set { this.SetValue(x => x.UpdateTimeStr, value); }
}
//0待揽件 1揽收 2运输中 3派件 4入柜 5签收 6退回 7转寄 8异常 9出柜 99其他未知
public int status
{
get { return this.GetValue(x => x.status); }
set
{
this.SetValue(x => x.status, value);
try
{
StatusStr = ((oms_wei_ewaybill_path_status_emum)value).ParseToString();
}
catch
{
StatusStr = "其他未知";
}
}
}
public string StatusStr
{
get { return this.GetValue(x => x.StatusStr); }
set { this.SetValue(x => x.StatusStr, value); }
}
public string node_desc { get; set; }
public DateTime create_time { get; set; }
}
public enum oms_wei_ewaybill_path_status_emum
{
待揽件 = 0,
揽收 = 1,
运输中 = 2,
派件 = 3,
入柜 = 4,
签收 = 5,
退回 = 6,
转寄 = 7,
异常 = 8,
出柜 = 9,
其他未知 = 99
}
}
+7 -4
View File
@@ -1,5 +1,6 @@
using AllBase.Helper;
using AllBase.Model.MvvmBaseClasses;
using NaiBa.Util;
using NaiBa.Util.Extension;
using NPOI.OpenXmlFormats.Dml.Diagram;
using NPOI.OpenXmlFormats.Spreadsheet;
@@ -43,10 +44,12 @@ namespace AllBase.Model.DBModel
public ObservableCollection<oms_wei_refund_info> refundItems { get; set; } = new ObservableCollection<oms_wei_refund_info>();
/// <summary>
/// 待采购
/// </summary>
public bool IsWaitBuy
public ConcurrentList<oms_wei_ewaybill_path> latestEWaybills { get; set; } = new ConcurrentList<oms_wei_ewaybill_path>();
/// <summary>
/// 待采购
/// </summary>
public bool IsWaitBuy
{
get { return this.GetValue(x => x.IsWaitBuy); }
set { this.SetValue(x => x.IsWaitBuy, value); }
@@ -938,10 +938,24 @@ namespace AllBase.Model.DBModel
DirectOrderBuyTimeStr = DirectPddBuyerOrder != null ? DirectPddBuyerOrder.add_time.ToString("yyyy-MM-dd HH:mm:ss") : "";
}
/// <summary>
/// 订单中所有商品加起来的总售价文本
/// </summary>
public string RealPriceStr
/// <summary> 直发最后一条物流信息 </summary>
public oms_wei_ewaybill_path LatestDirectEWaybill
{
get { return this.GetValue(x => x.LatestDirectEWaybill); }
set { this.SetValue(x => x.LatestDirectEWaybill, value); }
}
/// <summary> 中转仓最后一条物流信息 </summary>
public oms_wei_ewaybill_path LatestTransitEWaybill
{
get { return this.GetValue(x => x.LatestTransitEWaybill); }
set { this.SetValue(x => x.LatestTransitEWaybill, value); }
}
/// <summary>
/// 订单中所有商品加起来的总售价文本
/// </summary>
public string RealPriceStr
{
//get { return "¥" + (order_items.Sum(oi => oi.real_price) * 0.01m).ParseToDecimal().ToString("0.00"); }
get { return "¥" + (real_price * 0.01m).ParseToDecimal().ToString("0.00"); }
@@ -1384,7 +1398,27 @@ namespace AllBase.Model.DBModel
// 拍单、代发等信息判断并控制拍单按钮
this.UpdateOrderItemBuyButton();
this.SetAbnormalAndDirectBtnVisibility();
}
SetEWaybillInfo();
}
/// <summary> 初始化物流明细信息 </summary>
public void SetEWaybillInfo()
{
if(order_id == "3738794693820307200")
{
}
if (this.ItemOrder?.latestEWaybills?.Count > 0 && !string.IsNullOrEmpty(ItemTransitOrderWithVoid?.express_2_waybill))
LatestTransitEWaybill = ItemOrder.latestEWaybills.FirstOrDefault(ew => ew.waybill_id == ItemTransitOrderWithVoid.express_2_waybill);
else
LatestTransitEWaybill = null;
if (this.ItemOrder?.latestEWaybills?.Count > 0 && !string.IsNullOrEmpty(this.ItemOrder?.out_express_no))
LatestDirectEWaybill = ItemOrder.latestEWaybills.FirstOrDefault(ew => ew.waybill_id == this.ItemOrder?.out_express_no);
else
LatestDirectEWaybill = null;
}
public void UpdateOrderItemBuyButton()
{