using System;
namespace BBWY.Client.Models
{
public class AuditPayBill : NotifyObject
{
public void Init()
{
isInited = true;
if (!string.IsNullOrEmpty(CustomAuditCapitalType))
AuditCapitalTypeInputMode = 1;
}
private AuditCapitalType? auditCapitalType;
private string customAuditCapitalType;
private string errorMessage;
private int auditCapitalTypeInputMode;
private bool isInited;
///
/// 是否发生过变化
///
public bool IsChanged { get; set; }
///
/// 账单流水号
///
public string PayBillNo { get; set; }
///
/// 支付时间
///
public DateTime? PayTime { get; set; }
///
/// 账单类型
///
public PayBillType? PayBillType { get; set; }
///
/// 商家订单号
///
public string SourceMerchantOrderNo { get; set; }
///
/// 商家订单号(去掉账单添加的格式)
///
public string MerchantOrderNo { get; set; }
///
/// 是否支持商户单号
///
public bool IsSupportMerchantOrderNo { get; set; }
///
/// 商品名称
///
public string ProductName { get; set; }
///
/// 对方账户
///
public string OppositeAccount { get; set; }
///
/// 支出金额
///
public decimal ExpenditureAmount { get; set; }
///
/// 收入金额
///
public decimal IncomeAmount { get; set; }
public long? BelongShopId { get; set; }
///
/// 归属店铺
///
///
public string BelongShop { get; set; }
public string BelongFileName { get; set; }
///
/// 关联的采购单号
///
public string RelationPurchaseOrderId { get; set; }
///
/// 关联的店铺订单
///
public string RelationShopOrderId { get; set; }
public string Remark { get; set; }
///
/// 审计结果资金类型
///
public AuditCapitalType? AuditCapitalType
{
get => auditCapitalType; set
{
Set(ref auditCapitalType, value);
if (value != null)
{
if (isInited)
IsChanged = true;
ErrorMessage = string.Empty;
if (value != Models.AuditCapitalType.自定义)
{
AuditCapitalTypeInputMode = 0;
CustomAuditCapitalType = string.Empty;
}
else
AuditCapitalTypeInputMode = 1;
}
}
}
public Platform? PurchasePlatform { get; set; }
///
/// 导入时选择的店铺
///
public string ImportShopIds { get; set; }
///
/// 错误信息
///
public string ErrorMessage { get => errorMessage; set { Set(ref errorMessage, value); } }
public DateTime? OrderStartTime { get; set; }
///
/// 自定义资金类型
///
public string CustomAuditCapitalType
{
get => customAuditCapitalType;
set { Set(ref customAuditCapitalType, value); }
}
///
/// 资金类型输入状态 (0=选择 1=输入)
///
public int AuditCapitalTypeInputMode
{
get => auditCapitalTypeInputMode;
set
{
Set(ref auditCapitalTypeInputMode, value);
}
}
public override string ToString()
{
return $"{PayBillNo},{SourceMerchantOrderNo},{PayBillType},{PayTime},{OppositeAccount},{IncomeAmount},{ExpenditureAmount},{AuditCapitalType},{BelongShop},{RelationPurchaseOrderId},{RelationShopOrderId},{OrderStartTime},{PurchasePlatform},{Remark},{ErrorMessage}";
}
public static string ExportTitle
{
get
{
return "账单流水号,商家订单号,账单平台,支付时间,对方账户,收入金额,支出金额,资金类型,归属店铺,采购单号,销售单号,订单日期,采购平台,备注,异常信息";
}
}
}
}