From 9eeef517af064a4fe6ddc63b8cf19dc2db97725e Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Wed, 6 Aug 2025 11:37:31 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E6=A7=9Bbom=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=98=AF=E5=90=A6=E6=A3=80=E6=B5=8B=E5=92=8C?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=8D=8A=E6=88=90=E5=93=81=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MESWebSite/Excel/装配Bom导入模板.xlsx | Bin 18944 -> 18944 bytes MESWebSite/Manage/Bom_MK.aspx.cs | 62 ++++++++++++++++++-- 2 files changed, 57 insertions(+), 5 deletions(-) diff --git a/MESWebSite/Excel/装配Bom导入模板.xlsx b/MESWebSite/Excel/装配Bom导入模板.xlsx index 1b1182fff846b4188932c2511f847b84fa6230e6..013c2a2fe119199d453503f9a266d9eb256fbfcb 100644 GIT binary patch delta 312 zcmZpe!q_l{aYGIZ`v;Mewv}vmCKt1`G6`C4{>3uW*s$7|0SMR_gBdayQh~69!H}Vq zL4@I_DZ023SiE)e5erxLI0g=&G{?uqXeridX#0zy;*7G4KO10|SJ|4&<=|dDnqrEtBJ{P59Uun1Oso epeT^Vym^7O4$CG77gqL$nd?CzwAtHrD+>VYs5Qa> delta 258 zcmZpe!q_l{aYGIZyMSF%Y~-KYlZ#neneJL_{>3uW*f80c0SMR_gBdayQh~69!H}Vq zL4@I`DZ023SUhm@5erv#HwHG4uE_$H(vzJn6PO}RC(GM>nmpY~%#o3yL6Dz;iGhWo zmVpOIGcmm4L-3gym>C?n5PTM(I#DEfRtDC|@2tdmLB?}134q)Hv_{A}p7lD=%8bdA ztWEg18CZd$j11gB$jZ7o!FD6#=AYI*jFUy|-%M7pH{ayo!phF@?{5syubaJHx3T~L DgMKzS diff --git a/MESWebSite/Manage/Bom_MK.aspx.cs b/MESWebSite/Manage/Bom_MK.aspx.cs index aa01a3a..08a0904 100644 --- a/MESWebSite/Manage/Bom_MK.aspx.cs +++ b/MESWebSite/Manage/Bom_MK.aspx.cs @@ -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", ""); + return; + } + + string IsPartAssemble = dt.Rows[i][3].ToString(); + if (IsPartAssemble == "") + { + ClientScript.RegisterStartupScript(this.GetType(), "tishi", ""); + return; + } + + string LineName = dt.Rows[i][4].ToString(); if (LineName == "") { ClientScript.RegisterStartupScript(this.GetType(), "tishi", ""); return; } - string StationNo = dt.Rows[i][3].ToString(); + string StationNo = dt.Rows[i][5].ToString(); if (StationNo == "") { ClientScript.RegisterStartupScript(this.GetType(), "tishi", ""); return; } - string LeftCount = dt.Rows[i][4].ToString(); + string LeftCount = dt.Rows[i][6].ToString(); if (LeftCount == "") { ClientScript.RegisterStartupScript(this.GetType(), "tishi", ""); return; } - string RightCount = dt.Rows[i][5].ToString(); + string RightCount = dt.Rows[i][7].ToString(); if (RightCount == "") { ClientScript.RegisterStartupScript(this.GetType(), "tishi", ""); @@ -158,7 +172,27 @@ namespace MESWebSite.Manage { ClientScript.RegisterStartupScript(this.GetType(), "提示", ""); return; - } + } + + var isPartAssembleList = partNoBindDB.Search(p => p.PartNo1 == PartNo1 && p.IsPartAssemble == 1 && p.LineName == LineName && p.StationNo == StationNo); + if (isPartAssembleList != null && isPartAssembleList.Count > 0) + { + ClientScript.RegisterStartupScript(this.GetType(), "提示", ""); + return; + } + + if (IsChecked != "是" && IsChecked != "否") + { + ClientScript.RegisterStartupScript(this.GetType(), "提示", ""); + return; + } + + if (IsPartAssemble != "是" && IsPartAssemble != "否") + { + ClientScript.RegisterStartupScript(this.GetType(), "提示", ""); + 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); } }