修改了批号默认为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) if (isBatchManage)
{ {
this.FirstBillNo = Convert.ToInt32(DateTime.Now.ToString("yyMMdd")); //this.FirstBillNo = Convert.ToInt32(DateTime.Now.ToString("yyMMdd"));
if (this.FirstBillNo == firstBillNo) //if (this.FirstBillNo == firstBillNo)
this.LastBillNo = lastBillNo + 1; // this.LastBillNo = lastBillNo + 1;
else //else
this.LastBillNo = 1; // this.LastBillNo = 1;
if (this.LastBillNo.ToString().Length >= 6) //if (this.LastBillNo.ToString().Length >= 6)
{ //{
this.BatchBillNo = "W" + this.FirstBillNo + this.LastBillNo; // this.BatchBillNo = "W" + this.FirstBillNo + this.LastBillNo;
return; // return;
} //}
string lastStr = this.LastBillNo.ToString(); //string lastStr = this.LastBillNo.ToString();
while (true) //while (true)
{ //{
lastStr = "0" + lastStr; // lastStr = "0" + lastStr;
if (lastStr.Length >= 6) break; // if (lastStr.Length >= 6) break;
} //}
this.BatchBillNo = "W" + this.FirstBillNo + lastStr; //this.BatchBillNo = "W" + this.FirstBillNo + lastStr;
this.BatchBillNo = "1";
} }
} }