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.
162 lines
4.9 KiB
162 lines
4.9 KiB
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BBWYB.Client.Models.PackPurchaseTask
|
|
{
|
|
/// <summary>
|
|
/// 合格证
|
|
/// </summary>
|
|
public class CertificateModel : ObservableObject
|
|
{
|
|
/// <summary>
|
|
/// 合格证id
|
|
/// </summary>
|
|
public long Id { get; set; }
|
|
|
|
public string PurchaseSkuId { get; set; }
|
|
|
|
/// <summary>
|
|
/// skuid
|
|
/// </summary>
|
|
public string SkuId { get; set; }
|
|
|
|
|
|
private string spuId;
|
|
/// <summary>
|
|
/// 品牌
|
|
/// </summary>
|
|
public string SpuId { get => spuId; set { SetProperty (ref spuId, value); } }
|
|
|
|
|
|
private string brand;
|
|
/// <summary>
|
|
/// 品牌
|
|
/// </summary>
|
|
public string Brand { get => brand; set { SetProperty(ref brand, value); } }
|
|
|
|
|
|
private string brandName;
|
|
/// <summary>
|
|
/// 品名
|
|
/// </summary>
|
|
public string BrandName { get => brandName; set { SetProperty(ref brandName, value); } }
|
|
|
|
private string shader;
|
|
/// <summary>
|
|
/// 材质
|
|
/// </summary>
|
|
public string Shader { get => shader; set { SetProperty(ref shader, value); } }
|
|
|
|
private string excuteStander;
|
|
/// <summary>
|
|
/// 执行标准
|
|
/// </summary>
|
|
public string ExcuteStander
|
|
{
|
|
get => excuteStander; set
|
|
{
|
|
SetProperty(ref excuteStander, value);
|
|
GetExcuteStanderFormat();
|
|
}
|
|
}
|
|
|
|
|
|
private string excuteStanderFormat;
|
|
/// <summary>
|
|
/// 执行标准 (,=>换行)
|
|
/// </summary>
|
|
public string ExcuteStanderFormat { get => excuteStanderFormat; set { SetProperty(ref excuteStanderFormat, value); } }
|
|
|
|
private string productShop;
|
|
/// <summary>
|
|
/// 生产商
|
|
/// </summary>
|
|
public string ProductShop { get => productShop; set { SetProperty(ref productShop, value); } }
|
|
|
|
private string productAdress;
|
|
/// <summary>
|
|
/// 地址
|
|
/// </summary>
|
|
public string ProductAdress { get => productAdress; set { SetProperty(ref productAdress, value); } }
|
|
|
|
private string productNo;
|
|
/// <summary>
|
|
/// 型号(货号)
|
|
/// </summary>
|
|
public string ProductNo { get => productNo; set { SetProperty(ref productNo, value); } }
|
|
|
|
///// <summary>
|
|
///// 生产日期
|
|
///// </summary>
|
|
//public DateTime ProductDate { get; set; }
|
|
|
|
/// <summary>
|
|
/// 经销商
|
|
/// </summary>
|
|
public string Reseller { get; set; }
|
|
|
|
private int isLogo;
|
|
/// <summary>
|
|
/// 是否含3cLogo(0没有 ,1有)
|
|
/// </summary>
|
|
public int IsLogo { get => isLogo; set { SetProperty(ref isLogo, value); } }
|
|
|
|
private string factoryNumber;
|
|
/// <summary>
|
|
/// 工厂编号
|
|
/// </summary>
|
|
public string FactoryNumber { get => factoryNumber; set { SetProperty(ref factoryNumber, value); } }
|
|
private string applyAge;
|
|
/// <summary>
|
|
/// 适用年龄
|
|
/// </summary>
|
|
public string ApplyAge { get => applyAge; set { SetProperty(ref applyAge, value); } }
|
|
|
|
|
|
private CertificateLabelModel labelModel;
|
|
public CertificateLabelModel LabelModel { get => labelModel; set { SetProperty(ref labelModel, value); } }
|
|
|
|
void GetExcuteStanderFormat()
|
|
{
|
|
StringBuilder sb = new StringBuilder();
|
|
if (!string.IsNullOrEmpty(ExcuteStander))
|
|
if (this.ExcuteStander.Contains(",") || this.ExcuteStander.Contains(","))//有逗号就拆分
|
|
{
|
|
var excutes = this.ExcuteStander.Split(new string[] { ",", "," }, StringSplitOptions.RemoveEmptyEntries);
|
|
for (int i = 0; i < excutes.Length; i++)
|
|
{
|
|
if (i % 2 == 0 && i > 0)//间隔两个换行
|
|
{
|
|
sb.Append("\r\n");
|
|
}
|
|
sb.Append(excutes[i]).Append(" ");
|
|
}
|
|
sb.Remove(sb.Length - 3, 3);
|
|
this.ExcuteStanderFormat = sb.ToString();
|
|
return;
|
|
}
|
|
this.ExcuteStanderFormat = ExcuteStander;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private int goodsNumber = 1;
|
|
/// <summary>
|
|
/// 配件序号
|
|
/// </summary>
|
|
public int GoodsNumber { get => goodsNumber; set { SetProperty(ref goodsNumber, value); } }
|
|
|
|
private string produceDate;
|
|
/// <summary>
|
|
/// 生产日期
|
|
/// </summary>
|
|
public string ProduceDate { get => produceDate; set { SetProperty(ref produceDate, value); } }
|
|
|
|
}
|
|
}
|
|
|