修改了批号默认为1

This commit is contained in:
2025-03-06 11:07:31 +08:00
parent b8662fc6e7
commit 9c5f275072
2 changed files with 18 additions and 17 deletions

View File

@@ -84,25 +84,26 @@ namespace WMS.Web.Domain.Entitys
{
if (isBatchManage)
{
this.FirstBillNo = Convert.ToInt32(DateTime.Now.ToString("yyMMdd"));
if (this.FirstBillNo == firstBillNo)
this.LastBillNo = lastBillNo + 1;
else
this.LastBillNo = 1;
//this.FirstBillNo = Convert.ToInt32(DateTime.Now.ToString("yyMMdd"));
//if (this.FirstBillNo == firstBillNo)
// this.LastBillNo = lastBillNo + 1;
//else
// this.LastBillNo = 1;
if (this.LastBillNo.ToString().Length >= 6)
{
this.BatchBillNo = "W" + this.FirstBillNo + this.LastBillNo;
return;
}
//if (this.LastBillNo.ToString().Length >= 6)
//{
// this.BatchBillNo = "W" + this.FirstBillNo + this.LastBillNo;
// return;
//}
string lastStr = this.LastBillNo.ToString();
while (true)
{
lastStr = "0" + lastStr;
if (lastStr.Length >= 6) break;
}
this.BatchBillNo = "W" + this.FirstBillNo + lastStr;
//string lastStr = this.LastBillNo.ToString();
//while (true)
//{
// lastStr = "0" + lastStr;
// if (lastStr.Length >= 6) break;
//}
//this.BatchBillNo = "W" + this.FirstBillNo + lastStr;
this.BatchBillNo = "1";
}
}