From c8ca8b602d5abe6fce45e053bd883445ec3343a0 Mon Sep 17 00:00:00 2001 From: Ray Date: Thu, 14 Apr 2022 16:51:34 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BF=AE=E6=AD=A3=E9=81=8E=E7=AB=99?= =?UTF-8?q?=E5=88=A4=E6=96=B7=E7=B5=84=E4=BB=B6=E6=95=B8=E9=87=8F=202.=20?= =?UTF-8?q?=E5=B7=A5=E5=96=AE=E8=B3=87=E6=96=99=E4=BF=AE=E6=AD=A3=20?= =?UTF-8?q?=E5=90=84=E9=A0=85=E7=9B=AE=E5=88=AA=E9=99=A4=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/PCSController.cs | 13 ++- AMESCoreStudio.Web/Views/PCS/PCS003.cshtml | 95 ++++++++++--------- AMESCoreStudio.Web/Views/PCS/PCS021.cshtml | 2 +- 3 files changed, 62 insertions(+), 48 deletions(-) diff --git a/AMESCoreStudio.Web/Controllers/PCSController.cs b/AMESCoreStudio.Web/Controllers/PCSController.cs index 87eca8b2..057cbe0a 100644 --- a/AMESCoreStudio.Web/Controllers/PCSController.cs +++ b/AMESCoreStudio.Web/Controllers/PCSController.cs @@ -1429,7 +1429,7 @@ namespace AMESCoreStudio.Web.Controllers Title = item.Title, CreateUserID = UserID, UpdateUserID = UserID - }; + }; await _pcsApi.PostWipKp(JsonConvert.SerializeObject(wipKp)); } @@ -1446,7 +1446,7 @@ namespace AMESCoreStudio.Web.Controllers PartNo = item.StationType, CreateUserID = UserID, UpdateUserID = UserID - }; + }; await _pcsApi.PostWipOutfit(JsonConvert.SerializeObject(wipOutfit)); } @@ -1464,7 +1464,7 @@ namespace AMESCoreStudio.Web.Controllers SOPType = item.SopType, CreateUserID = UserID, UpdateUserID = UserID - }; + }; await _pcsApi.PostWipSop(JsonConvert.SerializeObject(wipSop)); } } @@ -3482,7 +3482,12 @@ namespace AMESCoreStudio.Web.Controllers int i = 0; foreach (var KeyPartItem in model.Inputs) { - + if (i + KpItemQty > model.WipKps.Count()) + { + Msg = "已刷超過組件數量"; + Success = false; + return Json(new Result() { success = Success, msg = Msg, data = Data }); + } keyParts.Add(new BarCodeCheckDto.inputItem { inputType = KeyPartItem.Contains("$") ? "NG" : model.WipKps[i + KpItemQty].KpNo, diff --git a/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml index c1c56275..3e61c246 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml @@ -233,47 +233,47 @@ @* 序號編碼sheet *@
- - - - +
- 起始生產序號 -
+ + + - + + + + + @foreach (var index in Model.wipBarcodes) + { + + + - - - @foreach (var index in Model.wipBarcodes) - { - - - - - } - -
+ 起始生產序號 + - 結束生產序號 - + 結束生產序號 +
+ @index.StartNO + + @index.EndNO +
- @index.StartNO - - @index.EndNO -
+ } + + @*
-
- -
- -
-
-
-
- -
-
- +
+ +
+ +
+
-
+
+ +
+
+ +
-
-
*@ +
*@
@@ -1374,7 +1374,8 @@ }); SelectKPNo += ''; var contactdiv = '' + - '' + + '' + + '' + ''+SelectKPNo+'' + '' + '' + @@ -1400,7 +1401,8 @@ }); Select += ''; var contactdiv = '' + - '' + + '' + + '' + '' + '' + Select + '' + '刪除' + @@ -1428,7 +1430,8 @@ }); SelectSOPType += ''; var contactdiv = '' + - '' + + '' + + '' + '' + '' + SelectSOPType + '' + '' + Select + '' + @@ -1442,9 +1445,15 @@ // Table 刪除 function Remove(button) { //Determine the reference of the Row using the Button. - var row = $(button).closest("TR"); - var table = $(button).closest("TABLE")[0]; //$("#KPTable")[0]; - table.deleteRow(row[0].rowIndex); + hg.confirm("確認要刪除此筆資料嗎?", function () { + var row = $(button).closest("TR"); + var id = $(button).closest("TR").find('input[type=hidden]').val(); + var table = $(button).closest("TABLE")[0]; //$("#KPTable")[0]; + $(button).closest("TR").find('input[type=hidden]').val(id + "_"); + alert($(button).closest("TR").find('input[type=hidden]').val()); + row.hide(); + }); + //table.deleteRow(row[0].rowIndex); }; //生產單位選單 diff --git a/AMESCoreStudio.Web/Views/PCS/PCS021.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS021.cshtml index 55f3658f..edf86d85 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS021.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS021.cshtml @@ -217,7 +217,7 @@ - +