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); } } /// /// 退款状态颜色 /// public SolidColorBrush RefundStatusColor { get { return this.GetValue(x => x.RefundStatusColor); } set { this.SetValue(x => x.RefundStatusColor, value); } } /// /// 售后原因文字 /// 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; } } /// /// 售后单当前状态,参考: /// 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 物流拦截中; /// 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 refundStrLst = new List() { "商家受理中", "待买家退货", "待商家收货", "商家逾期未退款", "退款完成", "退货退款完成", "平台退款中", "待用户确认", "待用户处理商家协商", "待用户处理商家代发起的售后申请", "物流拦截中"}; 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; } } /// /// 买家身份标识 /// public string openid { get; set; } /// /// 买家在开放平台的唯一标识符,若当前视频号小店已绑定到微信开放平台账号下会返回 /// public string unionid { get; set; } /// /// 商品spuid /// public string product_id { get; set; } /// /// 商品skuid /// public string sku_id { get; set; } /// /// 售后数量 /// public int? count { get; set; } /// /// 是否极速退款RefundInfo /// public string fast_refund { get; set; } /// /// 标明售后单退款直接原因, 枚举值参考 RefundReason /// public int? refund_reason { get; set; } /// /// 退款金额(分) /// public int? refund_amount { get; set; } /// /// 退款快递单号 /// public string return_waybill_id { get; set; } /// /// 物流公司id /// public string return_delivery_id { get; set; } /// /// 物流公司名称 /// public string return_delivery_name { get; set; } /// /// 售后相关商品信息JSON /// public string merchant_upload_info { get; set; } /// /// 售后单创建时间戳 /// public int? create_time { get; set; } /// /// 售后单更新时间戳 /// public int? update_time { get; set; } /// /// 退款原因 /// public string reason { get; set; } /// /// 退款原因解释 /// 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); } } /// /// 售后类型。REFUND:退款;RETURN:退货退款。 /// public string type { get; set; } /// /// 订单号,该字段可用于获取订单 /// public string order_id { get; set; } /// /// detail json /// public string details { get; set; } /// /// 纠纷id,该字段可用于获取纠纷信息 /// public string complaint_id { get; set; } /// /// 微信支付退款的响应 /// public string refund_resp { get; set; } /// /// 推送状态(0未推送;1推送成功;2推送失败) /// public int? pull_status { get; set; } /// /// 订单审核时间 /// public DateTime pull_time { get; set; } /// /// 商品id(o_goods外键) /// public long? erp_goods_id { get; set; } /// /// 商品skuid(o_goods_sku外键) /// public long? erp_goods_sku_id { get; set; } /// /// 商户id /// public long merchant_id { get; set; } /// /// 仓库受理状态 /// 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; } } }