继续优化订单读取和展示
This commit is contained in:
1 parent
1509e0a11d
commit
2f9c98b105
6 files changed
+1682
-1646
No files matched your search
@@ -115,10 +115,16 @@ namespace AllBase.Model.DBModel
|
||||
public string ShopWaybillExceptionStr
|
||||
{
|
||||
get { return this.GetValue(x => x.ShopWaybillExceptionStr); }
|
||||
set { this.SetValue(x => x.ShopWaybillExceptionStr, value); }
|
||||
set { this.SetValue(x => x.ShopWaybillExceptionStr, value); ShopWaybillExceptionStrVisibility = value.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible; }
|
||||
}
|
||||
public Visibility ShopWaybillExceptionStrVisibility
|
||||
{
|
||||
get { return this.GetValue(x => x.ShopWaybillExceptionStrVisibility); }
|
||||
set { this.SetValue(x => x.ShopWaybillExceptionStrVisibility, value); }
|
||||
}
|
||||
|
||||
public oms_wei_order_info ItemOrder
|
||||
|
||||
public oms_wei_order_info ItemOrder
|
||||
{
|
||||
get { return this.GetValue(x => x.ItemOrder); }
|
||||
set { this.SetValue(x => x.ItemOrder, value); }
|
||||
@@ -166,12 +172,17 @@ namespace AllBase.Model.DBModel
|
||||
public string RefundResultStr
|
||||
{
|
||||
get { return this.GetValue(x => x.RefundResultStr); }
|
||||
set { this.SetValue(x => x.RefundResultStr, value); }
|
||||
set { this.SetValue(x => x.RefundResultStr, value); RefundResultStrVisibility = value.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 微信小店用户退款快递单号
|
||||
/// </summary>
|
||||
public string ReturnWaybillIdStr
|
||||
public Visibility RefundResultStrVisibility
|
||||
{
|
||||
get { return this.GetValue(x => x.RefundResultStrVisibility); }
|
||||
set { this.SetValue(x => x.RefundResultStrVisibility, value); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 微信小店用户退款快递单号
|
||||
/// </summary>
|
||||
public string ReturnWaybillIdStr
|
||||
{
|
||||
get { return this.GetValue(x => x.ReturnWaybillIdStr); }
|
||||
set { this.SetValue(x => x.ReturnWaybillIdStr, value); }
|
||||
@@ -1310,14 +1321,30 @@ namespace AllBase.Model.DBModel
|
||||
public string RefundStatusStr
|
||||
{
|
||||
get { return this.GetValue(x => x.RefundStatusStr); }
|
||||
set { this.SetValue(x => x.RefundStatusStr, value); }
|
||||
set { this.SetValue(x => x.RefundStatusStr, value); RefundStatusStrVisibility = value.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible; }
|
||||
}
|
||||
public Visibility RefundStatusStrVisibility
|
||||
{
|
||||
get { return this.GetValue(x => x.RefundStatusStrVisibility); }
|
||||
set { this.SetValue(x => x.RefundStatusStrVisibility, value); }
|
||||
}
|
||||
|
||||
public Visibility BtnVoidTransitOrderVisibility
|
||||
{
|
||||
get { return this.GetValue(x => x.BtnVoidTransitOrderVisibility); }
|
||||
set { this.SetValue(x => x.BtnVoidTransitOrderVisibility, value); }
|
||||
}
|
||||
public Visibility BtnAbnormalOrderRebuyVisibility
|
||||
{
|
||||
get { return this.GetValue(x => x.BtnAbnormalOrderRebuyVisibility); }
|
||||
set { this.SetValue(x => x.BtnAbnormalOrderRebuyVisibility, value); }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 订单商品表数据库id
|
||||
/// </summary>
|
||||
public long id { get; set; }
|
||||
/// <summary>
|
||||
/// 订单商品表数据库id
|
||||
/// </summary>
|
||||
public long id { get; set; }
|
||||
public long shop_id { get; set; }
|
||||
/// <summary>
|
||||
/// 商户ID
|
||||
@@ -1524,10 +1551,10 @@ namespace AllBase.Model.DBModel
|
||||
LatestDirectEWaybill = null;
|
||||
}
|
||||
|
||||
public void UpdateOrderItemBuyButton()
|
||||
{
|
||||
var order_item = this;
|
||||
order_item.Shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == order_item.shop_id.ParseToString());
|
||||
public void UpdateOrderItemBuyButton()
|
||||
{
|
||||
var order_item = this;
|
||||
order_item.Shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == order_item.shop_id.ParseToString());
|
||||
|
||||
// 关联商品sku
|
||||
if (GlobalConfig.CurrentBuyPlatform == "pdd")
|
||||
@@ -1597,6 +1624,44 @@ namespace AllBase.Model.DBModel
|
||||
order_item.BuyGoodsBtnBackColor = GlobalConfig.PurpleBrush35;
|
||||
order_item.BuyGoodsBtnColor = GlobalConfig.PurpleBrush;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 作废重拍
|
||||
if (order_item.ItemOrder.status == 20 /*&& order_item.refund_status <= 1*/ && order_item.ItemTransitOrder != null)
|
||||
BtnVoidTransitOrderVisibility = Visibility.Visible;
|
||||
else
|
||||
BtnVoidTransitOrderVisibility = Visibility.Collapsed;
|
||||
// 异常重拍
|
||||
if (order_item.GetIsAbnormalOrderRebuy())
|
||||
BtnAbnormalOrderRebuyVisibility = Visibility.Visible;
|
||||
else
|
||||
BtnAbnormalOrderRebuyVisibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断中转仓订单是否可以异常重拍
|
||||
/// </summary>
|
||||
/// <param name="order_item"></param>
|
||||
/// <returns></returns>
|
||||
public bool GetIsAbnormalOrderRebuy()
|
||||
{
|
||||
var order_item = this;
|
||||
|
||||
// 不是异常单的不可异常重拍
|
||||
if (order_item?.ItemOrder?.IsAbnormal != true)
|
||||
return false;
|
||||
// 买手未退款的,中转正式取号以后的,不可异常重拍
|
||||
if (order_item.ItemTransitOrder?.refund_status != "买手退款成功" ||
|
||||
order_item.WarehouseWaybillStatusStr == "中转已取号" || order_item.WarehouseWaybillStatusStr == "中转已入库" || order_item.WarehouseWaybillStatusStr == "中转已出库")
|
||||
return false;
|
||||
// 已正式取号的,不可异常重拍
|
||||
if (order_item.ItemTransitOrder?.pre_allocated_order_no == 1 || order_item.ItemTransitOrder?.pre_allocated_order_no == 3)
|
||||
return false;
|
||||
// 仓库异常的异常单不可异常重拍
|
||||
List<string> rawMsgKeyWords = new List<string> { "取号异常", "无法调用" };
|
||||
if (rawMsgKeyWords.Any(k => (order_item.ItemTransitOrderWithVoid?.raw_message).ParseToString().Contains(k)) && order_item.ItemTransitOrderWithVoid?.transfer_warehouse_status != 1)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user