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