优化读取订单的展示
This commit is contained in:
1 parent
b827c6e118
commit
06e45bf587
7 files changed
+127
-105
No files matched your search
@@ -13,9 +13,14 @@ namespace AllBase.Model.DBModel
|
||||
public class oms_wei_external_procurement_log_info : PropertyNotifyObject
|
||||
{
|
||||
public string OutOrderNumStr
|
||||
{
|
||||
get { return out_order_no; }
|
||||
set { }
|
||||
{
|
||||
get {
|
||||
if (this.order_no == "3739906242901888256")
|
||||
{
|
||||
}
|
||||
return this.GetValue(x => x.OutOrderNumStr);
|
||||
}
|
||||
set { this.SetValue(x => x.OutOrderNumStr, value); }
|
||||
}
|
||||
public string OutOrderBuyerStr
|
||||
{
|
||||
@@ -30,7 +35,18 @@ namespace AllBase.Model.DBModel
|
||||
|
||||
|
||||
public long id { get; set; }
|
||||
public string out_order_no { get; set; }
|
||||
public string out_order_no
|
||||
{
|
||||
get { return this.GetValue(x => x.out_order_no); }
|
||||
set
|
||||
{
|
||||
if (this.order_no == "3739906242901888256")
|
||||
{
|
||||
|
||||
}
|
||||
this.SetValue(x => x.out_order_no, value); OutOrderNumStr = value;
|
||||
}
|
||||
}
|
||||
public string order_no { get; set; }
|
||||
public string order_sku_id { get; set; }
|
||||
public string buyer_account { get; set; }
|
||||
|
||||
@@ -136,6 +136,8 @@ namespace AllBase.Model.DBModel
|
||||
//状态10 待付款;20 待发货;21 部分发货;30 待收货;100 完成;200 全部商品售后之后,订单取消;250 未付款用户主动取消或超时未付款订单自动取消;
|
||||
if (status == 10)
|
||||
orderStatusStr = "待付款";
|
||||
else if (status == 20)
|
||||
orderStatusStr = "待发货";
|
||||
else if (status == 21)
|
||||
orderStatusStr = "部分发货";
|
||||
else if (status == 30)
|
||||
@@ -407,7 +409,11 @@ namespace AllBase.Model.DBModel
|
||||
/// <summary>
|
||||
/// 状态10 待付款;20 待发货;21 部分发货;30 待收货;100 完成;200 全部商品售后之后,订单取消;250 未付款用户主动取消或超时未付款订单自动取消;
|
||||
/// </summary>
|
||||
public int? status { get; set; }
|
||||
public int? status
|
||||
{
|
||||
get { return this.GetValue(x => x.status); }
|
||||
set { this.SetValue(x => x.status, value); SetOrderStatusStr(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 售后信息json
|
||||
/// </summary>
|
||||
@@ -691,8 +697,6 @@ namespace AllBase.Model.DBModel
|
||||
|
||||
public void SetOrderTextProperty()
|
||||
{
|
||||
SetOrderStatusStr();
|
||||
|
||||
Shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == shop_id.ParseToString());
|
||||
|
||||
if (this.orderItems.Any(oi => oi.OrderItemExt?.buy_type == "直发") && this.orderItems.Any(oi => oi.ItemTransitOrderWithVoid != null))
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -15,8 +15,8 @@ namespace AllBase.Model.DBModel
|
||||
{
|
||||
public string RefundStatusStr
|
||||
{
|
||||
get { return this.GetValue(x => x.status); }
|
||||
set { this.SetValue(x => x.status, value); RefundStatusStrVisibility = RefundStatusStr.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible; }
|
||||
get { return this.GetValue(x => x.RefundStatusStr); }
|
||||
set { this.SetValue(x => x.RefundStatusStr, value); RefundStatusStrVisibility = RefundStatusStr.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible; }
|
||||
}
|
||||
public Visibility RefundStatusStrVisibility
|
||||
{
|
||||
@@ -52,8 +52,8 @@ namespace AllBase.Model.DBModel
|
||||
}
|
||||
public Visibility AfterSaleOrderIdVisibility
|
||||
{
|
||||
get { return this.GetValue(x => x.ReasonTextStrVisibility); }
|
||||
set { this.SetValue(x => x.ReasonTextStrVisibility, value); }
|
||||
get { return this.GetValue(x => x.AfterSaleOrderIdVisibility); }
|
||||
set { this.SetValue(x => x.AfterSaleOrderIdVisibility, value); }
|
||||
}
|
||||
|
||||
public long id { get; set; }
|
||||
@@ -61,7 +61,7 @@ namespace AllBase.Model.DBModel
|
||||
public string after_sale_order_id
|
||||
{
|
||||
get { return this.GetValue(x => x.after_sale_order_id); }
|
||||
set { this.SetValue(x => x.after_sale_order_id, value); ReasonTextStrVisibility = value.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible; }
|
||||
set { this.SetValue(x => x.after_sale_order_id, value); AfterSaleOrderIdVisibility = value.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 售后单当前状态,参考:
|
||||
@@ -87,37 +87,37 @@ namespace AllBase.Model.DBModel
|
||||
public string status
|
||||
{
|
||||
get { return this.GetValue(x => x.status); }
|
||||
set
|
||||
{
|
||||
this.SetValue(x => x.status, value);
|
||||
|
||||
this.RefundStatusStr = "售后状态读取失败";
|
||||
if (value == "USER_CANCELD") this.RefundStatusStr = "用户取消申请";
|
||||
else if (value == "MERCHANT_PROCESSING") this.RefundStatusStr = "商家受理中";
|
||||
else if (value == "MERCHANT_REJECT_REFUND") this.RefundStatusStr = "商家拒绝退款";
|
||||
else if (value == "MERCHANT_REJECT_RETURN") this.RefundStatusStr = "商家拒绝退货退款";
|
||||
else if (value == "USER_WAIT_RETURN") this.RefundStatusStr = "待买家退货";
|
||||
else if (value == "RETURN_CLOSED") this.RefundStatusStr = "退货退款关闭";
|
||||
else if (value == "MERCHANT_WAIT_RECEIPT") this.RefundStatusStr = "待商家收货";
|
||||
else if (value == "MERCHANT_OVERDUE_REFUND") this.RefundStatusStr = "商家逾期未退款";
|
||||
else if (value == "MERCHANT_REFUND_SUCCESS") this.RefundStatusStr = "退款完成";
|
||||
else if (value == "MERCHANT_RETURN_SUCCESS") this.RefundStatusStr = "退货退款完成";
|
||||
else if (value == "PLATFORM_REFUNDING") this.RefundStatusStr = "平台退款中";
|
||||
else if (value == "PLATFORM_REFUND_FAIL") this.RefundStatusStr = "平台退款失败";
|
||||
else if (value == "USER_WAIT_CONFIRM") this.RefundStatusStr = "待用户确认";
|
||||
else if (value == "MERCHANT_REFUND_RETRY_FAIL") this.RefundStatusStr = "商家打款失败,客服关闭售后";
|
||||
else if (value == "MERCHANT_FAIL") this.RefundStatusStr = "售后关闭";
|
||||
else if (value == "USER_WAIT_CONFIRM_UPDATE") this.RefundStatusStr = "待用户处理商家协商";
|
||||
else if (value == "USER_WAIT_HANDLE_MERCHANT_AFTER_SALE") this.RefundStatusStr = "待用户处理商家代发起的售后申请";
|
||||
else if (value == "WAIT_PACKAGE_INTERCEPT") this.RefundStatusStr = "物流拦截中";
|
||||
else if (value == "USER_WAIT_RECEIPT") this.RefundStatusStr = "换货商品已发货";
|
||||
else this.RefundStatusStr = value;
|
||||
//MERCHANT_EXCHANGE_SUCCESS
|
||||
|
||||
if (order_id == "3738189148379849472")
|
||||
set
|
||||
{
|
||||
if (order_id == "3739902323987233280")
|
||||
{
|
||||
|
||||
}
|
||||
this.SetValue(x => x.status, value);
|
||||
|
||||
this.RefundStatusStr = "售后状态读取失败";
|
||||
if (status == "USER_CANCELD") this.RefundStatusStr = "用户取消申请";
|
||||
else if (status == "MERCHANT_PROCESSING") this.RefundStatusStr = "商家受理中";
|
||||
else if (status == "MERCHANT_REJECT_REFUND") this.RefundStatusStr = "商家拒绝退款";
|
||||
else if (status == "MERCHANT_REJECT_RETURN") this.RefundStatusStr = "商家拒绝退货退款";
|
||||
else if (status == "USER_WAIT_RETURN") this.RefundStatusStr = "待买家退货";
|
||||
else if (status == "RETURN_CLOSED") this.RefundStatusStr = "退货退款关闭";
|
||||
else if (status == "MERCHANT_WAIT_RECEIPT") this.RefundStatusStr = "待商家收货";
|
||||
else if (status == "MERCHANT_OVERDUE_REFUND") this.RefundStatusStr = "商家逾期未退款";
|
||||
else if (status == "MERCHANT_REFUND_SUCCESS") this.RefundStatusStr = "退款完成";
|
||||
else if (status == "MERCHANT_RETURN_SUCCESS") this.RefundStatusStr = "退货退款完成";
|
||||
else if (status == "PLATFORM_REFUNDING") this.RefundStatusStr = "平台退款中";
|
||||
else if (status == "PLATFORM_REFUND_FAIL") this.RefundStatusStr = "平台退款失败";
|
||||
else if (status == "USER_WAIT_CONFIRM") this.RefundStatusStr = "待用户确认";
|
||||
else if (status == "MERCHANT_REFUND_RETRY_FAIL") this.RefundStatusStr = "商家打款失败,客服关闭售后";
|
||||
else if (status == "MERCHANT_FAIL") this.RefundStatusStr = "售后关闭";
|
||||
else if (status == "USER_WAIT_CONFIRM_UPDATE") this.RefundStatusStr = "待用户处理商家协商";
|
||||
else if (status == "USER_WAIT_HANDLE_MERCHANT_AFTER_SALE") this.RefundStatusStr = "待用户处理商家代发起的售后申请";
|
||||
else if (status == "WAIT_PACKAGE_INTERCEPT") this.RefundStatusStr = "物流拦截中";
|
||||
else if (status == "USER_WAIT_RECEIPT") this.RefundStatusStr = "换货商品已发货";
|
||||
else this.RefundStatusStr = status;
|
||||
//MERCHANT_EXCHANGE_SUCCESS
|
||||
|
||||
|
||||
List<string> refundStrLst = new List<string>() { "商家受理中", "待买家退货", "待商家收货", "商家逾期未退款", "退款完成", "退货退款完成", "平台退款中", "待用户确认",
|
||||
"待用户处理商家协商", "待用户处理商家代发起的售后申请", "物流拦截中"};
|
||||
@@ -207,7 +207,7 @@ namespace AllBase.Model.DBModel
|
||||
set
|
||||
{
|
||||
this.SetValue(x => x.reason_text, value);
|
||||
ReasonTextStr = string.IsNullOrEmpty(reason_text) ? string.Empty : "售后原因:" + reason_text;
|
||||
ReasonTextStr = string.IsNullOrEmpty(reason_text) ? string.Empty : ("售后原因:" + reason_text);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user