Browse Source

门槛bom是否检测不能为空,判断导入模板中是否有多个半成品零件号

master
周红军 2 days ago
parent
commit
50a86c7a52
  1. 4
      MESWebSite/HttpHandlers/Bom_MKHandler.ashx.cs
  2. 1
      MESWebSite/Manage/Bom_MK.aspx
  3. 22
      MESWebSite/Manage/Bom_MK.aspx.cs

4
MESWebSite/HttpHandlers/Bom_MKHandler.ashx.cs

@ -197,6 +197,10 @@ namespace MESWebSite.HttpHandlers
{
md.IsChecked = true;
}
else
{
md.IsChecked = false;
}
var info = Request.Cookies.Get("LoginUserInfo");
if (info != null)

1
MESWebSite/Manage/Bom_MK.aspx

@ -502,6 +502,7 @@
PrimaryID = row.BomID;
$('#fl_id_1').combobox('select', row.PartNo1);
$('#fl_id_2').combobox('select', row.PartNo2);
if (row.IsChecked == 0) {
$('#IsChecked').removeAttr("checked")
} else {

22
MESWebSite/Manage/Bom_MK.aspx.cs

@ -68,7 +68,7 @@ namespace MESWebSite.Manage
Bom_MKBLL bll = new Bom_MKBLL();
List<tb_Bom_MK> list = new List<tb_Bom_MK>();
tb_Bom_MK md = new tb_Bom_MK();
ProductBLL pbll = new ProductBLL();
LineBLL linebll = new LineBLL();
@ -174,13 +174,23 @@ namespace MESWebSite.Manage
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)
if(IsPartAssemble == "是")
{
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;
}
var isPartAssembleListExcel = list.Where(p => p.PartNo1 == PartNo1 && p.IsPartAssemble == 1 && p.LineName == LineName && p.StationNo == StationNo).ToList();
if (isPartAssembleListExcel != null && isPartAssembleListExcel.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>");
@ -195,7 +205,7 @@ namespace MESWebSite.Manage
#endregion
tb_Bom_MK md = new tb_Bom_MK();
var info = Request.Cookies.Get("LoginUserInfo");
if (info != null)
{

Loading…
Cancel
Save