生成单据编号

This commit is contained in:
18942506660
2023-10-28 15:16:18 +08:00
parent f5cc13f422
commit 25e8a9e30a
5 changed files with 67 additions and 10 deletions

View File

@@ -51,6 +51,29 @@ namespace WMS.Web.Domain.Entitys
/// 明细
/// </summary>
public List<OutStockTaskDetails> Details = new List<OutStockTaskDetails>();
/// <summary>
/// 生成单据号
/// </summary>
public void GenerateNo()
{
//用户手动输入了 就不自动生成了
if (!string.IsNullOrEmpty(this.BillNo)) return;
if (this.Id.ToString().Length >= 8)
{
this.BillNo = "CKZL" + this.Id.ToString();
return;
}
string idStr = this.Id.ToString();
while (true)
{
idStr = "0" + idStr;
if (idStr.Length >= 8) break;
}
//this.Number = CNSpellTranslator.GetFirstSpell(this.Name) + idStr;
this.BillNo = "CKZL" + idStr;
}
/// <summary>
/// 作废