移箱改箱增加订单号

This commit is contained in:
18942506660
2023-11-13 09:54:22 +08:00
parent 8a16ea120f
commit 37a2ba4582
7 changed files with 77 additions and 10 deletions

View File

@@ -70,5 +70,27 @@ namespace WMS.Web.Domain.Entitys
this.CreatorId = creatorId;
this.CreateTime = DateTime.Now;
}
/// <summary>
/// 生成单据号
/// </summary>
public void GenerateNo()
{
//用户手动输入了 就不自动生成了
if (!string.IsNullOrEmpty(this.BillNo)) return;
if (this.Id.ToString().Length >= 8)
{
this.BillNo = "YX" + this.Id.ToString();
return;
}
string idStr = this.Id.ToString();
while (true)
{
idStr = "0" + idStr;
if (idStr.Length >= 8) break;
}
this.BillNo = "YX" + idStr;
}
}
}