|
|
@ -47,6 +47,7 @@ namespace ButcherFactory.SegmentProductionAuto_ |
|
|
DateTime? batchDate; |
|
|
DateTime? batchDate; |
|
|
DateTime butcherDate = DateTime.Today; |
|
|
DateTime butcherDate = DateTime.Today; |
|
|
DateTime scDateValue = DateTime.Today; |
|
|
DateTime scDateValue = DateTime.Today; |
|
|
|
|
|
decimal minWeight = 0; |
|
|
NotAuto.SegmentProductionFormConfig config; |
|
|
NotAuto.SegmentProductionFormConfig config; |
|
|
List<GoodsIdentify> identityList; |
|
|
List<GoodsIdentify> identityList; |
|
|
List<string> specialGoodsCodes; |
|
|
List<string> specialGoodsCodes; |
|
|
@ -180,6 +181,7 @@ namespace ButcherFactory.SegmentProductionAuto_ |
|
|
_freshTotalCode = SegmentProductionBL.InitFreshTotalCode(); |
|
|
_freshTotalCode = SegmentProductionBL.InitFreshTotalCode(); |
|
|
_stayTotalCode = SegmentProductionBL.InitStayTotalCode(); |
|
|
_stayTotalCode = SegmentProductionBL.InitStayTotalCode(); |
|
|
identityList = SegmentProductionBL.GetGoodsIdentify(); |
|
|
identityList = SegmentProductionBL.GetGoodsIdentify(); |
|
|
|
|
|
minWeight = SegmentProductionBL.GetMinWeight(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void LoadBind() |
|
|
void LoadBind() |
|
|
@ -324,6 +326,11 @@ namespace ButcherFactory.SegmentProductionAuto_ |
|
|
MessageBox.Show("重量必须大于0"); |
|
|
MessageBox.Show("重量必须大于0"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
if (minWeight > 0 && weight < minWeight) |
|
|
|
|
|
{ |
|
|
|
|
|
MessageBox.Show(string.Format("重量:{0}小于最小重量:{1}", weight, minWeight)); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
if (g.StandardWeight.HasValue) |
|
|
if (g.StandardWeight.HasValue) |
|
|
{ |
|
|
{ |
|
|
if (weight < (g.StandardWeightLow ?? 0) || weight > (g.StandardWeightUp ?? 0)) |
|
|
if (weight < (g.StandardWeightLow ?? 0) || weight > (g.StandardWeightUp ?? 0)) |
|
|
@ -424,7 +431,11 @@ namespace ButcherFactory.SegmentProductionAuto_ |
|
|
//#endif
|
|
|
//#endif
|
|
|
if (weight <= 0) |
|
|
if (weight <= 0) |
|
|
throw new Exception("重量必须大于0"); |
|
|
throw new Exception("重量必须大于0"); |
|
|
|
|
|
|
|
|
|
|
|
if (minWeight > 0 && weight < minWeight) |
|
|
|
|
|
{ |
|
|
|
|
|
MessageBox.Show(string.Format("重量:{0}小于最小重量:{1}", weight, minWeight)); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
if (detail.StandardWeight.HasValue) |
|
|
if (detail.StandardWeight.HasValue) |
|
|
{ |
|
|
{ |
|
|
if (weight < (detail.StandardWeightLow ?? 0) || weight > (detail.StandardWeightUp ?? 0)) |
|
|
if (weight < (detail.StandardWeightLow ?? 0) || weight > (detail.StandardWeightUp ?? 0)) |
|
|
@ -1187,15 +1198,6 @@ namespace ButcherFactory.SegmentProductionAuto_ |
|
|
scDate .Text = scDateValue.ToString("yyyy-MM-dd"); |
|
|
scDate .Text = scDateValue.ToString("yyyy-MM-dd"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void flowLayoutPanel2_Paint(object sender, PaintEventArgs e) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void label3_Click(object sender, EventArgs e) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |