ruoxing.wang 3 days ago
parent
commit
da7208f8db
  1. 4
      MESWebSite/HttpHandlers/Bom_MKHandler.ashx.cs
  2. 1
      MESWebSite/Manage/Bom_MK.aspx
  3. 24
      MESWebSite/Manage/Bom_MK.aspx.cs

4
MESWebSite/HttpHandlers/Bom_MKHandler.ashx.cs

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

1
MESWebSite/Manage/Bom_MK.aspx

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

24
MESWebSite/Manage/Bom_MK.aspx.cs

@ -68,7 +68,7 @@ namespace MESWebSite.Manage
Bom_MKBLL bll = new Bom_MKBLL(); Bom_MKBLL bll = new Bom_MKBLL();
List<tb_Bom_MK> list = new List<tb_Bom_MK>(); List<tb_Bom_MK> list = new List<tb_Bom_MK>();
tb_Bom_MK md = new tb_Bom_MK();
ProductBLL pbll = new ProductBLL(); ProductBLL pbll = new ProductBLL();
LineBLL linebll = new LineBLL(); LineBLL linebll = new LineBLL();
@ -174,12 +174,22 @@ namespace MESWebSite.Manage
return; return;
} }
var isPartAssembleList = partNoBindDB.Search<tb_Bom_MK>(p => p.PartNo1 == PartNo1 && p.IsPartAssemble == 1 && p.LineName == LineName && p.StationNo == StationNo); if(IsPartAssemble == "是")
if (isPartAssembleList != null && isPartAssembleList.Count > 0)
{ {
ClientScript.RegisterStartupScript(this.GetType(), "提示", "<script type='text/javascript'>$.messager.alert('提示', '第" + i.ToString() + "行,BOM总成零件号已存在一个半成品,不能存在多个半成品,故无法导入', 'warning');</script>"); var isPartAssembleList = partNoBindDB.Search<tb_Bom_MK>(p => p.PartNo1 == PartNo1 && p.IsPartAssemble == 1 && p.LineName == LineName && p.StationNo == StationNo);
return; 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 != "否") if (IsChecked != "是" && IsChecked != "否")
{ {
@ -195,7 +205,7 @@ namespace MESWebSite.Manage
#endregion #endregion
tb_Bom_MK md = new tb_Bom_MK();
var info = Request.Cookies.Get("LoginUserInfo"); var info = Request.Cookies.Get("LoginUserInfo");
if (info != null) if (info != null)
{ {

Loading…
Cancel
Save