1 parent
f2d31c4a42
commit
4c82d549ec
10 files changed
+304
-1850
No files matched your search
@@ -1,70 +0,0 @@
|
||||
using AllBase.Model.Result;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using WPFCommon.Helpers;
|
||||
using WPFCommon.Models;
|
||||
|
||||
namespace _29WxOrderWpf.Ctrls.PDDInvoice.ViewModels;
|
||||
|
||||
/// <summary>
|
||||
/// 订单发票Model
|
||||
/// </summary>
|
||||
public class PddBrowserOrderInvoiceViewModel : BindableBaseEx
|
||||
{
|
||||
|
||||
public string buyerId { get; set; } // 买手Id
|
||||
public string buyerName { get; set; } // 买手名称
|
||||
/// <summary>
|
||||
/// 订单价
|
||||
/// </summary>
|
||||
public int order_amount { get; set; }
|
||||
/// <summary>
|
||||
/// 实付款
|
||||
/// </summary>
|
||||
public string display_amount { get; set; }
|
||||
/// <summary>
|
||||
/// 下单时间
|
||||
/// </summary>
|
||||
public long order_time { get; set; }
|
||||
/// <summary>
|
||||
/// 订单号
|
||||
/// </summary>
|
||||
public string order_sn { get; set; }
|
||||
|
||||
public int status { get; set; }
|
||||
public int pay_status { get; set; }
|
||||
public string order_status_prompt { get; set; }
|
||||
public List<order_good> order_Goods { get; set; }
|
||||
|
||||
|
||||
public List<OrderButtonItem> order_buttons { get; set; }
|
||||
|
||||
|
||||
public string GoodsName { get => order_Goods?.FirstOrDefault()?.goods_name ?? ""; }
|
||||
public bool IsInvoiced
|
||||
{
|
||||
get => order_buttons?.Any(a => a.button_code == 500) ?? false;
|
||||
}
|
||||
|
||||
public int Quantity => order_Goods?.Sum(a => a.goods_number.Value) ?? 0;
|
||||
/// <summary> 发票状态文案:已开票 / 待开票 </summary>
|
||||
public string InvoiceStatusText => IsInvoiced ? "已开票" : "待开票";
|
||||
public DateTime OrderTime
|
||||
{
|
||||
get => DateTimeHelper.ConvertFromUnixTimestampInSeconds(order_time);
|
||||
}
|
||||
public string ThumbUrl=> order_Goods?.FirstOrDefault()?.thumb_url ?? "";
|
||||
public string DisplayAmount => (order_amount / 100.0).ToString("F2");
|
||||
}
|
||||
|
||||
public class OrderButtonItem
|
||||
{
|
||||
public int button_code { get; set; }
|
||||
public string brief_prompt { get; set; }
|
||||
public ButtonTypeValue type_value { get; set; }
|
||||
}
|
||||
public class ButtonTypeValue
|
||||
{
|
||||
public string Url { get; set; }
|
||||
}
|
||||
Reference in new issue
Block a user