|
|
@ -97,28 +97,42 @@ namespace MESWebSite.Manage |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
string LineName = dt.Rows[i][2].ToString(); |
|
|
|
string IsChecked = dt.Rows[i][2].ToString(); |
|
|
|
if (IsChecked == "") |
|
|
|
{ |
|
|
|
ClientScript.RegisterStartupScript(this.GetType(), "tishi", "<script type='text/javascript'>$.messager.alert('提示', '第" + i.ToString() + "行,是否检测为空,故无法导入', 'warning');</script>"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
string IsPartAssemble = dt.Rows[i][3].ToString(); |
|
|
|
if (IsPartAssemble == "") |
|
|
|
{ |
|
|
|
ClientScript.RegisterStartupScript(this.GetType(), "tishi", "<script type='text/javascript'>$.messager.alert('提示', '第" + i.ToString() + "行,是否半成品为空,故无法导入', 'warning');</script>"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
string LineName = dt.Rows[i][4].ToString(); |
|
|
|
if (LineName == "") |
|
|
|
{ |
|
|
|
ClientScript.RegisterStartupScript(this.GetType(), "tishi", "<script type='text/javascript'>$.messager.alert('提示', '第" + i.ToString() + "行,产线为空,故无法导入', 'warning');</script>"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
string StationNo = dt.Rows[i][3].ToString(); |
|
|
|
string StationNo = dt.Rows[i][5].ToString(); |
|
|
|
if (StationNo == "") |
|
|
|
{ |
|
|
|
ClientScript.RegisterStartupScript(this.GetType(), "tishi", "<script type='text/javascript'>$.messager.alert('提示', '第" + i.ToString() + "行,工位号为空,故无法导入', 'warning');</script>"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
string LeftCount = dt.Rows[i][4].ToString(); |
|
|
|
string LeftCount = dt.Rows[i][6].ToString(); |
|
|
|
if (LeftCount == "") |
|
|
|
{ |
|
|
|
ClientScript.RegisterStartupScript(this.GetType(), "tishi", "<script type='text/javascript'>$.messager.alert('提示', '第" + i.ToString() + "行,左侧数量为空,故无法导入', 'warning');</script>"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
string RightCount = dt.Rows[i][5].ToString(); |
|
|
|
string RightCount = dt.Rows[i][7].ToString(); |
|
|
|
if (RightCount == "") |
|
|
|
{ |
|
|
|
ClientScript.RegisterStartupScript(this.GetType(), "tishi", "<script type='text/javascript'>$.messager.alert('提示', '第" + i.ToString() + "行,右侧数量为空,故无法导入', 'warning');</script>"); |
|
|
@ -158,7 +172,27 @@ namespace MESWebSite.Manage |
|
|
|
{ |
|
|
|
ClientScript.RegisterStartupScript(this.GetType(), "提示", "<script type='text/javascript'>$.messager.alert('提示', '第" + i.ToString() + "行,BOM总成零件号与子零件号绑定关系在系统中已存在,故无法导入', 'warning');</script>"); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
var isPartAssembleList = partNoBindDB.Search<tb_Bom_MK>(p => p.PartNo1 == PartNo1 && p.IsPartAssemble == 1 && p.LineName == LineName && p.StationNo == StationNo); |
|
|
|
if (isPartAssembleList != null && isPartAssembleList.Count > 0) |
|
|
|
{ |
|
|
|
ClientScript.RegisterStartupScript(this.GetType(), "提示", "<script type='text/javascript'>$.messager.alert('提示', '第" + i.ToString() + "行,BOM总成零件号已存在一个半成品,不能存在多个半成品,故无法导入', 'warning');</script>"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (IsChecked != "是" && IsChecked != "否") |
|
|
|
{ |
|
|
|
ClientScript.RegisterStartupScript(this.GetType(), "提示", "<script type='text/javascript'>$.messager.alert('提示', '第" + i.ToString() + "行,是否检测填写值不正确,故无法导入', 'warning');</script>"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (IsPartAssemble != "是" && IsPartAssemble != "否") |
|
|
|
{ |
|
|
|
ClientScript.RegisterStartupScript(this.GetType(), "提示", "<script type='text/javascript'>$.messager.alert('提示', '第" + i.ToString() + "行,是否半成品填写值不正确,故无法导入', 'warning');</script>"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
@ -176,6 +210,24 @@ namespace MESWebSite.Manage |
|
|
|
md.LeftCount = int.Parse(LeftCount); |
|
|
|
md.RightCount = int.Parse(RightCount); |
|
|
|
|
|
|
|
if(IsChecked == "是") |
|
|
|
{ |
|
|
|
md.IsChecked = true; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
md.IsChecked = false; |
|
|
|
} |
|
|
|
|
|
|
|
if (IsPartAssemble == "是") |
|
|
|
{ |
|
|
|
md.IsPartAssemble = 1; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
md.IsPartAssemble = 0; |
|
|
|
} |
|
|
|
|
|
|
|
list.Add(md); |
|
|
|
} |
|
|
|
} |
|
|
|