You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
1.6 KiB
69 lines
1.6 KiB
using Newtonsoft.Json;
|
|
using System;
|
|
|
|
namespace BBWY.Client.Models
|
|
{
|
|
public class RelationPurchaseOrderSku : NotifyObject
|
|
{
|
|
public RelationPurchaseOrderSku()
|
|
{
|
|
SingleSkuAmountStr = (0).ToString();
|
|
}
|
|
|
|
private string singleSkuAmountStr;
|
|
private decimal singleSkuAmount;
|
|
private decimal skuAmount;
|
|
|
|
public string ProductId { get; set; }
|
|
|
|
public string SkuId { get; set; }
|
|
|
|
public string Logo { get; set; }
|
|
|
|
public int Quantity { get; set; }
|
|
|
|
public string Title { get; set; }
|
|
|
|
public string SingleSkuAmountStr
|
|
{
|
|
get => singleSkuAmountStr; set
|
|
{
|
|
if (Set(ref singleSkuAmountStr, value))
|
|
{
|
|
if (decimal.TryParse(value, out decimal d))
|
|
SingleSkuAmount = d;
|
|
}
|
|
}
|
|
}
|
|
|
|
public decimal SingleSkuAmount
|
|
{
|
|
get => singleSkuAmount;
|
|
set
|
|
{
|
|
if (Set(ref singleSkuAmount, value))
|
|
SkuAmount = SingleSkuAmount * Quantity;
|
|
|
|
}
|
|
}
|
|
|
|
public decimal SkuAmount
|
|
{
|
|
get => skuAmount;
|
|
set
|
|
{
|
|
if (Set(ref skuAmount, value))
|
|
OnSkuAmountChanged?.Invoke();
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 代发信息Id
|
|
/// </summary>
|
|
public long? OrderDropShippingId { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public Action OnSkuAmountChanged { get; set; }
|
|
|
|
}
|
|
}
|
|
|