售后单逻辑调整。

This commit is contained in:
wule committed 2026-07-14 12:07:53 +08:00
1 parent 5571d227c8
commit ed3545e376
14 files changed
+265 -116

No files matched your search

@@ -54,8 +54,29 @@ namespace AllBase.Model.Local
public int? pre_allocated_order_no { get; set; }
public int? is_transfer_ship { get; set; }
/// <summary>
/// 溯源码
/// </summary>
public string random_code { get; set; }
/// <summary>
/// 1, "拒收" 2, "拦截" 3, "取消" 4, "订单作废"
/// </summary>
public int? transfer_refund_status { get; set; }
/// <summary>
/// 订单作废状态:0=正常,1=已作废,2=作废失败
/// </summary>
public int? order_void_status { get; set; }
/// <summary>
/// 中转仓入库状态 0: 未使用, 1: 已入库, 2: 已出库
/// </summary>
public int? warehouse_status { get; set; }
/// <summary>
/// 中转入库时间
/// </summary>
public DateTime? inbound_time { get; set; }
/// <summary>
/// 中转出库时间
/// </summary>
public DateTime? outbound_time { get; set; }
}
}
+6 -5
View File
@@ -78,7 +78,7 @@ namespace AllBase.Model.Local
/// </summary>
public bool IsRefund
{
get { return refundItems?.Count > 0; }
get { return refundItems?.Count > 0 && refundItems.Any(r => r.status != "USER_CANCELD"); }
set { }
}
/// <summary>
@@ -164,12 +164,13 @@ namespace AllBase.Model.Local
{
get
{
if (this.refundItems.Any(r => "商家受理中,待买家退货,待商家收货,平台退款中,待用户确认,待用户处理商家协商,待用户处理商家代发起的售后申请,物流拦截中".Contains(r.statusStr)))
if (this.refundItems.Any(r => "商家受理中,待买家退货,待商家收货,平台退款中,待用户确认,待用户处理商家协商,待用户处理商家代发起的售后申请,物流拦截中".Contains(r.RefundStatusStr)))
return "退款中";
else if (this.refundItems.Any(r => r.statusStr == "退款完成" || r.statusStr == "退货退款完成"))
else if (this.refundItems.Any(r => r.RefundStatusStr == "退款完成" || r.RefundStatusStr == "退货退款完成"))
return "退款完成";
else if (this.refundItems.Any(r => !r.statusStr.IsNullOrEmpty()))
return this.refundItems.FirstOrDefault(r => !r.statusStr.IsNullOrEmpty()).statusStr;
// 用户取消申请
else if (GlobalConfig.OrderTabHeaderStr.StartsWith("退款单") && this.refundItems.Any(r => !r.RefundStatusStr.IsNullOrEmpty()))
return this.refundItems.FirstOrDefault(r => !r.RefundStatusStr.IsNullOrEmpty()).RefundStatusStr;
if (this.status == 20 || this.status == 21)
{
return "剩余";
+84 -50
View File
@@ -146,40 +146,50 @@ namespace AllBase.Model.Local
}
set { }
}
public string BuyerWaybillStatusStr
public string BuyerTransitWaybillStatusStr
{
get
{
if (PddBuyerOrder?.wx_order_id == "3737683253753151488")
{
}
else if ((PddBuyerOrder?.order_status_prompt).ParseToString().Contains("退款成功"))
string refund_status = (ItemTransitOrderWithVoid?.refund_status).ParseToString();
//if ((PddBuyerOrder?.order_status_prompt).ParseToString().Contains("退款成功"))
//{
// return "买手已退款";
//}
//else if (refund_status.Contains("退款成功"))
//{
// return "买手已退款";
//}
// 已到中转仓的或者中转仓已正式发出的,买手(仓上游)状态显示为已到中转仓
if (ItemTransitOrderWithVoid?.warehouse_status == 1 || ItemTransitOrderWithVoid?.warehouse_status == 2)
{
return "买手已退款";
return "已到中转仓";
}
// 拼多多买手状态为已签收的,为已到中转仓
else if ((PddBuyerOrder?.order_status_prompt).ParseToString().Contains("已签收"))
{
return "已到中转仓";
}
// 售后待用户退回商品的,至少为买手已发货
else if ((PddBuyerOrder?.order_status_prompt).ParseToString().Contains("待用户退回商品"))
{
return "已到中转仓";
return "买手已发货";
}
else if ((PddBuyerOrder?.order_status_prompt).ParseToString().Contains("待收货"))
{
return "买手已发货";
}
var ref_status = (ItemTransitOrderWithVoid?.refund_status).ParseToString();
if (ref_status.Contains("退款成功"))
{
return "买手已退款";
}
if (!ref_status.Contains("退款成功") && ref_status.Length > 0)
// 有退款还没完成的,至少为买手已发货
if (!refund_status.Contains("退款成功") && refund_status.Length > 0)
{
return "买手已发货";
}
// 正式取号或者取号更正的,可认定买手已发货
if (ItemTransitOrderWithVoid?.pre_allocated_order_no == 1 || ItemTransitOrderWithVoid?.pre_allocated_order_no == 3)
return "买手已发货";
if (ItemTransitOrderWithVoid != null)
@@ -188,49 +198,49 @@ namespace AllBase.Model.Local
}
set { }
}
public SolidColorBrush BuyerWaybillStatusStrColor
public SolidColorBrush BuyerTransitWaybillStatusStrColor
{
get
{
if (BuyerWaybillStatusStr.StartsWith("买手已退款"))
if (BuyerTransitWaybillStatusStr.StartsWith("买手已退款"))
return new SolidColorBrush(Color.FromRgb(152, 96, 143));
if (BuyerWaybillStatusStr.StartsWith("已到中转仓"))
if (BuyerTransitWaybillStatusStr.StartsWith("已到中转仓"))
return new SolidColorBrush(Color.FromRgb(19, 206, 102));
if (BuyerWaybillStatusStr.StartsWith("买手已发货"))
if (BuyerTransitWaybillStatusStr.StartsWith("买手已发货"))
return new SolidColorBrush(Color.FromRgb(255, 186, 0));
if (BuyerWaybillStatusStr.StartsWith("买手未发货"))
if (BuyerTransitWaybillStatusStr.StartsWith("买手未发货"))
return new SolidColorBrush(Color.FromRgb(255, 73, 73));
return new SolidColorBrush(Color.FromRgb(255, 73, 73));
}
set { }
}
public SolidColorBrush BuyerWaybillStatusBorderColor
public SolidColorBrush BuyerTransitWaybillStatusBorderColor
{
get
{
if (BuyerWaybillStatusStr.StartsWith("买手已退款"))
if (BuyerTransitWaybillStatusStr.StartsWith("买手已退款"))
return new SolidColorBrush(Color.FromArgb(75, 152, 96, 143));
if (BuyerWaybillStatusStr.StartsWith("已到中转仓"))
if (BuyerTransitWaybillStatusStr.StartsWith("已到中转仓"))
return new SolidColorBrush(Color.FromRgb(208, 245, 224));
if (BuyerWaybillStatusStr.StartsWith("买手已发货"))
if (BuyerTransitWaybillStatusStr.StartsWith("买手已发货"))
return new SolidColorBrush(Color.FromRgb(255, 241, 204));
if (BuyerWaybillStatusStr.StartsWith("买手未发货"))
if (BuyerTransitWaybillStatusStr.StartsWith("买手未发货"))
return new SolidColorBrush(Color.FromRgb(255, 219, 219));
return new SolidColorBrush(Color.FromRgb(255, 219, 219));
}
set { }
}
public SolidColorBrush BuyerWaybillStatusBackColor
public SolidColorBrush BuyerTransitWaybillStatusBackColor
{
get
{
if (BuyerWaybillStatusStr.StartsWith("买手已退款"))
if (BuyerTransitWaybillStatusStr.StartsWith("买手已退款"))
return new SolidColorBrush(Color.FromArgb(35, 152, 96, 143));
if (BuyerWaybillStatusStr.StartsWith("已到中转仓"))
if (BuyerTransitWaybillStatusStr.StartsWith("已到中转仓"))
return new SolidColorBrush(Color.FromRgb(231, 250, 240));
if (BuyerWaybillStatusStr.StartsWith("买手已发货"))
if (BuyerTransitWaybillStatusStr.StartsWith("买手已发货"))
return new SolidColorBrush(Color.FromRgb(255, 248, 230));
if (BuyerWaybillStatusStr.StartsWith("买手未发货"))
if (BuyerTransitWaybillStatusStr.StartsWith("买手未发货"))
return new SolidColorBrush(Color.FromRgb(255, 237, 237));
return new SolidColorBrush(Color.FromRgb(255, 237, 237));
}
@@ -246,18 +256,30 @@ namespace AllBase.Model.Local
}
if (ItemTransitOrderWithVoid?.order_void_status == 2)
return "中转作废失败";
if (ItemTransitOrderWithVoid?.order_void_status == 1)
return "中转已作废";
if ((ItemTransitOrderWithVoid?.pre_allocated_order_no == 1 || ItemTransitOrderWithVoid?.pre_allocated_order_no == 3) && !ItemTransitOrderWithVoid.express_2_company.IsNullOrEmpty() && !ItemTransitOrderWithVoid.express_2_waybill.IsNullOrEmpty())
return "中转已发货";
if (ItemTransitOrderWithVoid?.warehouse_status == 2)
return "中转已出库";
// 老订单还用之前的逻辑判断
if (ItemTransitOrderWithVoid?.created_time < new DateTime(2026, 7, 14) && (ItemTransitOrderWithVoid?.pre_allocated_order_no == 1 || ItemTransitOrderWithVoid?.pre_allocated_order_no == 3) && !ItemTransitOrderWithVoid.express_2_company.IsNullOrEmpty() && !ItemTransitOrderWithVoid.express_2_waybill.IsNullOrEmpty())
//return "中转已出库*";
return "中转已出库";
if (ItemTransitOrderWithVoid?.warehouse_status == 1)
return "中转已入库";
//if ((ItemTransitOrderWithVoid?.pre_allocated_order_no == 1 || ItemTransitOrderWithVoid?.pre_allocated_order_no == 3) && !ItemTransitOrderWithVoid.express_2_company.IsNullOrEmpty() && !ItemTransitOrderWithVoid.express_2_waybill.IsNullOrEmpty())
// return "中转已发货";
//if (ItemTransitOrderWithVoid?.pre_allocated_order_no == 1 || ItemTransitOrderWithVoid?.pre_allocated_order_no == 3)
// return "中转待发货";
if (ItemTransitOrderWithVoid?.pre_allocated_order_no == 1 || ItemTransitOrderWithVoid?.pre_allocated_order_no == 3)
return "待中转发货";
return "中转已取号";
if (ItemTransitOrderWithVoid?.pre_allocated_order_no == 2)
return "中转提前取号";
//if (ItemTransitOrderWithVoid?.order_void_status == 2)
// return "中转作废失败";
//if (ItemTransitOrderWithVoid?.order_void_status == 1)
// return "中转已作废";
if (ItemTransitOrderWithVoid?.pre_allocated_order_no == 0)
return "待中转取号";
return "中转待取号";
return "";
}
set { }
@@ -266,13 +288,13 @@ namespace AllBase.Model.Local
{
get
{
if (WarehouseWaybillStatusStr.StartsWith("中转已作废"))
return new SolidColorBrush(Color.FromRgb(152, 96, 143));
if (WarehouseWaybillStatusStr.StartsWith("中转已发货"))
//if (WarehouseWaybillStatusStr.StartsWith("中转已作废"))
// return new SolidColorBrush(Color.FromRgb(152, 96, 143));
if (WarehouseWaybillStatusStr.StartsWith("中转已出库"))
return new SolidColorBrush(Color.FromRgb(19, 206, 102));
if (WarehouseWaybillStatusStr.StartsWith("待中转发货") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
if (WarehouseWaybillStatusStr.StartsWith("中转已入库") || WarehouseWaybillStatusStr.StartsWith("中转已取号") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
return new SolidColorBrush(Color.FromRgb(255, 186, 0));
if (WarehouseWaybillStatusStr.StartsWith("待中转取号"))
if (WarehouseWaybillStatusStr.StartsWith("中转待取号"))
return new SolidColorBrush(Color.FromRgb(255, 73, 73));
return new SolidColorBrush(Color.FromRgb(255, 73, 73));
}
@@ -282,13 +304,13 @@ namespace AllBase.Model.Local
{
get
{
if (WarehouseWaybillStatusStr.StartsWith("中转已作废"))
return new SolidColorBrush(Color.FromArgb(75, 152, 96, 143));
if (WarehouseWaybillStatusStr.StartsWith("中转已发货"))
//if (WarehouseWaybillStatusStr.StartsWith("中转已作废"))
// return new SolidColorBrush(Color.FromArgb(75, 152, 96, 143));
if (WarehouseWaybillStatusStr.StartsWith("中转已出库"))
return new SolidColorBrush(Color.FromRgb(208, 245, 224));
if (WarehouseWaybillStatusStr.StartsWith("待中转发货") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
if (WarehouseWaybillStatusStr.StartsWith("中转已入库") || WarehouseWaybillStatusStr.StartsWith("中转已取号") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
return new SolidColorBrush(Color.FromRgb(255, 241, 204));
if (WarehouseWaybillStatusStr.StartsWith("待中转取号"))
if (WarehouseWaybillStatusStr.StartsWith("中转待取号"))
return new SolidColorBrush(Color.FromRgb(255, 219, 219));
return new SolidColorBrush(Color.FromRgb(255, 219, 219));
}
@@ -298,13 +320,13 @@ namespace AllBase.Model.Local
{
get
{
if (WarehouseWaybillStatusStr.StartsWith("中转已作废"))
return new SolidColorBrush(Color.FromArgb(35, 152, 96, 143));
if (WarehouseWaybillStatusStr.StartsWith("中转已发货"))
//if (WarehouseWaybillStatusStr.StartsWith("中转已作废"))
// return new SolidColorBrush(Color.FromArgb(35, 152, 96, 143));
if (WarehouseWaybillStatusStr.StartsWith("中转已出库"))
return new SolidColorBrush(Color.FromRgb(231, 250, 240));
if (WarehouseWaybillStatusStr.StartsWith("待中转发货") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
if (WarehouseWaybillStatusStr.StartsWith("中转已入库") || WarehouseWaybillStatusStr.StartsWith("中转已取号") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
return new SolidColorBrush(Color.FromRgb(255, 248, 230));
if (WarehouseWaybillStatusStr.StartsWith("待中转取号"))
if (WarehouseWaybillStatusStr.StartsWith("中转待取号"))
return new SolidColorBrush(Color.FromRgb(255, 237, 237));
return new SolidColorBrush(Color.FromRgb(255, 237, 237));
}
@@ -343,6 +365,18 @@ namespace AllBase.Model.Local
}
set { }
}
public string TransitRefundVoidStatusStr
{
get
{
//if (ItemTransitOrderWithVoid?.order_void_status == 2)
// return "中转作废失败";
if (ItemTransitOrderWithVoid?.order_void_status == 1)
return "中转已作废";
return "";
}
set { }
}
// 仓库采购时间是否达标字段
+4 -3
View File
@@ -9,7 +9,7 @@ namespace AllBase.Model.Local
{
public class oms_wei_refund_info
{
public string statusStr
public string RefundStatusStr
{
get
{
@@ -38,7 +38,7 @@ namespace AllBase.Model.Local
/// <summary>
/// 退款状态颜色
/// </summary>
public SolidColorBrush refundStatusColor
public SolidColorBrush RefundStatusColor
{
get
{
@@ -46,7 +46,8 @@ namespace AllBase.Model.Local
status == "USER_WAIT_CONFIRM" || status == "USER_WAIT_CONFIRM_UPDATE" || status == "USER_WAIT_HANDLE_MERCHANT_AFTER_SALE" ||
status == "WAIT_PACKAGE_INTERCEPT")
return new SolidColorBrush(Color.FromRgb(230, 162, 60));
if (status == "MERCHANT_REFUND_SUCCESS" || status == "MERCHANT_RETURN_SUCCESS")
if (status == "MERCHANT_REFUND_SUCCESS" || status == "MERCHANT_RETURN_SUCCESS" ||
status == "USER_CANCELD" /*|| status == "MERCHANT_REJECT_REFUND" || status == "MERCHANT_REJECT_RETURN" || status == "RETURN_CLOSED" || status == "PLATFORM_REFUND_FAIL" || status == "MERCHANT_FAIL"*/)
return new SolidColorBrush(Color.FromRgb(103, 194, 58));
return new SolidColorBrush(Color.FromRgb(245, 108, 108));
}