主页增加发票助手
This commit is contained in:
1 parent
5456e6611d
commit
a15f97ac2e
22 files changed
+3825
-309
No files matched your search
@@ -0,0 +1,94 @@
|
||||
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
|
||||
{
|
||||
private bool _isSelected;
|
||||
|
||||
/// <summary>
|
||||
/// 是否被勾选(用于批量开票)
|
||||
/// </summary>
|
||||
public bool IsSelected
|
||||
{
|
||||
get => _isSelected;
|
||||
set => SetProperty(ref _isSelected, value, nameof(IsSelected));
|
||||
}
|
||||
|
||||
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; }
|
||||
/// <summary>
|
||||
/// 订单详情
|
||||
/// </summary>
|
||||
public string order_link_url { 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 ?? ""; }
|
||||
/// <summary>
|
||||
/// 是否已开票
|
||||
/// </summary>
|
||||
public bool IsInvoiced
|
||||
{
|
||||
get => GetValue<bool>();
|
||||
set
|
||||
{
|
||||
SetValue(value);
|
||||
base.RaisePropertyChanged(nameof(InvoiceStatusText));
|
||||
}
|
||||
}
|
||||
|
||||
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