Files
29WxOrder/AllBase/Model/DBModel/oms_wei_refund_info.cs
T
2026-10-18 08:09:48 +08:00

267 lines
11 KiB
C#

using AllBase.Helper;
using AllBase.Model.MvvmBaseClasses;
using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
namespace AllBase.Model.DBModel
{
public class oms_wei_refund_info : PropertyNotifyObject
{
public string RefundStatusStr
{
get { return this.GetValue(x => x.RefundStatusStr); }
set { this.SetValue(x => x.RefundStatusStr, value); RefundStatusStrVisibility = RefundStatusStr.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible; }
}
public Visibility RefundStatusStrVisibility
{
get { return this.GetValue(x => x.RefundStatusStrVisibility); }
set { this.SetValue(x => x.RefundStatusStrVisibility, value); }
}
public bool IsRefund
{
get { return this.GetValue(x => x.IsRefund); }
set { this.SetValue(x => x.IsRefund, value); }
}
/// <summary>
/// 退款状态颜色
/// </summary>
public SolidColorBrush RefundStatusColor
{
get { return this.GetValue(x => x.RefundStatusColor); }
set { this.SetValue(x => x.RefundStatusColor, value); }
}
/// <summary>
/// 售后原因文字
/// </summary>
public string ReasonTextStr
{
get { return this.GetValue(x => x.ReasonTextStr); }
set { this.SetValue(x => x.ReasonTextStr, value); ReasonTextStrVisibility = value.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible; }
}
public Visibility ReasonTextStrVisibility
{
get { return this.GetValue(x => x.ReasonTextStrVisibility); }
set { this.SetValue(x => x.ReasonTextStrVisibility, value); }
}
public Visibility AfterSaleOrderIdVisibility
{
get { return this.GetValue(x => x.AfterSaleOrderIdVisibility); }
set { this.SetValue(x => x.AfterSaleOrderIdVisibility, value); }
}
public long id { get; set; }
public long? shop_id { get; set; }
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); AfterSaleOrderIdVisibility = value.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible; }
}
/// <summary>
/// 售后单当前状态,参考:
/// USER_CANCELD 用户取消申请
/// MERCHANT_PROCESSING 商家受理中
/// MERCHANT_REJECT_REFUND 商家拒绝退款
/// MERCHANT_REJECT_RETURN 商家拒绝退货退款
/// USER_WAIT_RETURN 待买家退货
/// RETURN_CLOSED 退货退款关闭
/// MERCHANT_WAIT_RECEIPT 待商家收货
/// MERCHANT_OVERDUE_REFUND 商家逾期未退款
/// MERCHANT_REFUND_SUCCESS 退款完成
/// MERCHANT_RETURN_SUCCESS 退货退款完成
/// PLATFORM_REFUNDING 平台退款中
/// PLATFORM_REFUND_FAIL 平台退款失败
/// USER_WAIT_CONFIRM 待用户确认
/// MERCHANT_REFUND_RETRY_FAIL 商家打款失败,客服关闭售后
/// MERCHANT_FAIL 售后关闭
/// USER_WAIT_CONFIRM_UPDATE 待用户处理商家协商
/// USER_WAIT_HANDLE_MERCHANT_AFTER_SALE 待用户处理商家代发起的售后申请
/// WAIT_PACKAGE_INTERCEPT 物流拦截中;
/// </summary>
public string status
{
get { return this.GetValue(x => x.status); }
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>() { "商家受理中", "待买家退货", "待商家收货", "商家逾期未退款", "退款完成", "退货退款完成", "平台退款中", "待用户确认",
"待用户处理商家协商", "待用户处理商家代发起的售后申请", "物流拦截中"};
if (refundStrLst.Contains(this.RefundStatusStr))
this.IsRefund = true;
if (RefundStatusStr == "售后状态读取失败")
this.IsRefund = true;
// 设置售后状态颜色
if (status == "MERCHANT_PROCESSING" || status == "PLATFORM_REFUNDING" || status == "USER_WAIT_RETURN" || status == "MERCHANT_WAIT_RECEIPT" ||
status == "USER_WAIT_CONFIRM" || status == "USER_WAIT_CONFIRM_UPDATE" || status == "USER_WAIT_HANDLE_MERCHANT_AFTER_SALE" ||
status == "WAIT_PACKAGE_INTERCEPT")
RefundStatusColor = GlobalConfig.LightOrangeTextBrush;
else 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"*/)
RefundStatusColor = GlobalConfig.GreenTextBrush;
else
RefundStatusColor = GlobalConfig.LightRedTextBrush;
}
}
/// <summary>
/// 买家身份标识
/// </summary>
public string openid { get; set; }
/// <summary>
/// 买家在开放平台的唯一标识符,若当前视频号小店已绑定到微信开放平台账号下会返回
/// </summary>
public string unionid { get; set; }
/// <summary>
/// 商品spuid
/// </summary>
public string product_id { get; set; }
/// <summary>
/// 商品skuid
/// </summary>
public string sku_id { get; set; }
/// <summary>
/// 售后数量
/// </summary>
public int? count { get; set; }
/// <summary>
/// 是否极速退款RefundInfo
/// </summary>
public string fast_refund { get; set; }
/// <summary>
/// 标明售后单退款直接原因, 枚举值参考 RefundReason
/// </summary>
public int? refund_reason { get; set; }
/// <summary>
/// 退款金额(分)
/// </summary>
public int? refund_amount { get; set; }
/// <summary>
/// 退款快递单号
/// </summary>
public string return_waybill_id { get; set; }
/// <summary>
/// 物流公司id
/// </summary>
public string return_delivery_id { get; set; }
/// <summary>
/// 物流公司名称
/// </summary>
public string return_delivery_name { get; set; }
/// <summary>
/// 售后相关商品信息JSON
/// </summary>
public string merchant_upload_info { get; set; }
/// <summary>
/// 售后单创建时间戳
/// </summary>
public int? create_time { get; set; }
/// <summary>
/// 售后单更新时间戳
/// </summary>
public int? update_time { get; set; }
/// <summary>
/// 退款原因
/// </summary>
public string reason { get; set; }
/// <summary>
/// 退款原因解释
/// </summary>
public string reason_text
{
get { return this.GetValue(x => x.reason_text); }
set
{
this.SetValue(x => x.reason_text, value);
ReasonTextStr = string.IsNullOrEmpty(reason_text) ? string.Empty : ("售后原因:" + reason_text);
}
}
/// <summary>
/// 售后类型。REFUND:退款;RETURN:退货退款。
/// </summary>
public string type { get; set; }
/// <summary>
/// 订单号,该字段可用于获取订单
/// </summary>
public string order_id { get; set; }
/// <summary>
/// detail json
/// </summary>
public string details { get; set; }
/// <summary>
/// 纠纷id,该字段可用于获取纠纷信息
/// </summary>
public string complaint_id { get; set; }
/// <summary>
/// 微信支付退款的响应
/// </summary>
public string refund_resp { get; set; }
/// <summary>
/// 推送状态(0未推送;1推送成功;2推送失败)
/// </summary>
public int? pull_status { get; set; }
/// <summary>
/// 订单审核时间
/// </summary>
public DateTime pull_time { get; set; }
/// <summary>
/// 商品id(o_goods外键)
/// </summary>
public long? erp_goods_id { get; set; }
/// <summary>
/// 商品skuid(o_goods_sku外键)
/// </summary>
public long? erp_goods_sku_id { get; set; }
/// <summary>
/// 商户id
/// </summary>
public long merchant_id { get; set; }
/// <summary>
/// 仓库受理状态
/// </summary>
public int? warehouse_status { get; set; }
public string return_user_name { get; set; }
public string return_province { get; set; }
public string return_city { get; set; }
public string return_county { get; set; }
public string return_detail { get; set; }
public string return_tel { get; set; }
}
}