发票助手修改,增加时间范围,增加上次读取历史,修复bug

This commit is contained in:
chfei committed 2026-09-18 14:32:52 +08:00
1 parent b42c17c013
commit 9e62672013
8 files changed
+729 -218

No files matched your search

@@ -1,4 +1,5 @@
using AllBase.Model.Result;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -22,7 +23,6 @@ public class PddBrowserOrderInvoiceViewModel : BindableBaseEx
get => _isSelected;
set => SetProperty(ref _isSelected, value, nameof(IsSelected));
}
public string buyerId { get; set; } // 买手Id
public string buyerName { get; set; } // 买手名称
/// <summary>
@@ -41,7 +41,6 @@ public class PddBrowserOrderInvoiceViewModel : BindableBaseEx
/// 订单号
/// </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; }
@@ -51,11 +50,10 @@ public class PddBrowserOrderInvoiceViewModel : BindableBaseEx
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 ?? ""; }
private string _goodsName;
public string GoodsName { get => _goodsName ?? order_Goods?.FirstOrDefault()?.goods_name ?? ""; set => _goodsName = value; }
/// <summary>
/// 是否已开票
/// </summary>
@@ -78,8 +76,27 @@ public class PddBrowserOrderInvoiceViewModel : BindableBaseEx
{
get => DateTimeHelper.ConvertFromUnixTimestampInSeconds(order_time);
}
public string ThumbUrl => order_Goods?.FirstOrDefault()?.thumb_url ?? "";
private string _thumburl;
public string ThumbUrl
{
get { return _thumburl ?? order_Goods?.FirstOrDefault()?.thumb_url ?? ""; }
set { _thumburl = value; }
}
public string DisplayAmount => (order_amount / 100.0).ToString("F2");
public PddBrowserOrderInvoiceViewModel()
{
}
public PddBrowserOrderInvoiceViewModel(OrderInvoiceInfo info)
{
_goodsName = info.GoodsName;
order_amount = info.order_amount;
order_time = info.order_time;
order_sn = info.order_sn;
order_link_url = info.order_link_url;
IsInvoiced = info.IsInvoiced;
_thumburl = info.ThumbUrl;
}
}
public class OrderButtonItem
@@ -91,4 +108,31 @@ public class OrderButtonItem
public class ButtonTypeValue
{
public string Url { get; set; }
}
public class OrderInvoiceInfo
{
/// <summary>
/// 订单价
/// </summary>
public int order_amount { get; set; }
/// <summary>
/// 下单时间
/// </summary>
public long order_time { get; set; }
/// <summary>
/// 订单号
/// </summary>
public string order_sn { get; set; }
/// <summary>
/// 订单详情
/// </summary>
public string order_link_url { get; set; }
/// <summary>
/// 是否已开票
/// </summary>
public bool IsInvoiced { get; set; }
public string ThumbUrl { get; set; }
public string GoodsName { get; set; }
}