diff --git a/AMESCoreStudio.Web/Controllers/PCSController.cs b/AMESCoreStudio.Web/Controllers/PCSController.cs index dc8e6137..23cfcaf1 100644 --- a/AMESCoreStudio.Web/Controllers/PCSController.cs +++ b/AMESCoreStudio.Web/Controllers/PCSController.cs @@ -1878,23 +1878,25 @@ namespace AMESCoreStudio.Web.Controllers await _pcsApi.PostWipAtt(JsonConvert.SerializeObject(model.wipAtt)); // 內部條碼 - if (!string.IsNullOrWhiteSpace(model.wipBarcode.StartNO) && !string.IsNullOrWhiteSpace(model.wipBarcode.EndNO)) + if (model.wipBarcode != null) { - model.wipBarcode.WipID = wipID; - model.wipBarcode.WipNO = model.wipInfo.WipNO; - model.wipBarcode.UnitNO = model.wipInfo.UnitNO; - model.wipBarcode.CreateUserID = UserID; - result = await _pcsApi.PostWipBarcode(JsonConvert.SerializeObject(model.wipBarcode)); - - // 工單條碼規則設定文件檔 - WipRule wipRule = new WipRule(); - wipRule.WipNO = model.wipInfo.WipNO; - wipRule.KeyNo = "00"; - wipRule.BarcodeLen = 14; - wipRule.BarcodeFormat = model.wipInfo.UnitNO; - result = await _pcsApi.PostWipRule(JsonConvert.SerializeObject(wipRule)); + if (!string.IsNullOrWhiteSpace(model.wipBarcode.StartNO) && !string.IsNullOrWhiteSpace(model.wipBarcode.EndNO)) + { + model.wipBarcode.WipID = wipID; + model.wipBarcode.WipNO = model.wipInfo.WipNO; + model.wipBarcode.UnitNO = model.wipInfo.UnitNO; + model.wipBarcode.CreateUserID = UserID; + result = await _pcsApi.PostWipBarcode(JsonConvert.SerializeObject(model.wipBarcode)); + + // 工單條碼規則設定文件檔 + WipRule wipRule = new WipRule(); + wipRule.WipNO = model.wipInfo.WipNO; + wipRule.KeyNo = "00"; + wipRule.BarcodeLen = 14; + wipRule.BarcodeFormat = model.wipInfo.UnitNO; + result = await _pcsApi.PostWipRule(JsonConvert.SerializeObject(wipRule)); + } } - // 出貨序號 //if (!string.IsNullOrWhiteSpace(model.wipBarcodeOther.StartNO) && !string.IsNullOrWhiteSpace(model.wipBarcodeOther.EndNO)) //{ @@ -1909,7 +1911,6 @@ namespace AMESCoreStudio.Web.Controllers // } //} - // 料號相關 var materialItem = await _pcsApi.GetMaterialItemByItemNO(model.wipAtt.ItemNO); if (materialItem != null) @@ -2559,8 +2560,6 @@ namespace AMESCoreStudio.Web.Controllers model.wipBarcodes = await _pcsApi.GetWipBarcode(model.wipInfo.WipNO); model.wipBarcode = model.wipBarcodes.FirstOrDefault(); model.wipBoard = await _pcsApi.GetWipBoard(model.wipInfo.WipNO); - //var q1 = await _pcsApi.GetMaterialSopQuery(itemNo: model.wipAtt.ItemNO); - //model.materialSops = q1.Data; if (model.wipBoard != null) { @@ -2624,6 +2623,17 @@ namespace AMESCoreStudio.Web.Controllers model.wipSystem.Engineer_Name = UserInof.UserName; } } + // 判斷是否預設打勾掃毒 + else + { + var AntivirusItemNo = new List { "E1582", "E1583", "E1584", "E1585", "E1586", + "E1587","E1588","E1589","E158C"}; + if (AntivirusItemNo.Any(item => model.wipAtt.ItemNO.StartsWith(item))) + { + model.wipSystem = new WipSystem(); + model.wipSystem.Antivirus = "Y"; + } + } model.wipMACs = await _pcsApi.GetWipMAC(model.wipInfo.WipNO); @@ -2668,8 +2678,6 @@ namespace AMESCoreStudio.Web.Controllers // 針對安勤 工單基本資料統一打開工程資訊 不判斷製程 ViewBag.WipSpecial = _configuration["WipSpecial"]; - - try { // 登入UserID @@ -2707,6 +2715,7 @@ namespace AMESCoreStudio.Web.Controllers model.wipBoard.ISPcbBake = model.wipBoard.ISPcbBake == "on" ? "Y" : "N"; //系統 model.wipSystem.FinePackage = model.wipSystem.FinePackage == "on" ? "Y" : "N"; + model.wipSystem.Antivirus = model.wipSystem.Antivirus == "on" ? "Y" : "N"; #endregion // 判斷資料填寫 @@ -3033,7 +3042,7 @@ namespace AMESCoreStudio.Web.Controllers model.ruleStations = await _pcsApi.GetRuleStationByWipNo(model.wipInfo.WipNO); model.wipBarcodes = await _pcsApi.GetWipBarcode(model.wipInfo.WipNO); - // Checkbox轉換 + #region Checkbox轉換 model.wipInfo.ECNCheck = model.wipInfo.ECNCheck == "on" ? "Y" : "N"; model.wipInfo.ModelCheck = model.wipInfo.ModelCheck == "on" ? "Y" : "N"; model.wipInfo.InputFlag = model.wipInfo.InputFlag == "on" ? "Y" : "N"; @@ -3051,6 +3060,8 @@ namespace AMESCoreStudio.Web.Controllers model.wipBoard.ISPcbBake = model.wipBoard.ISPcbBake == "on" ? "Y" : "N"; //系統 model.wipSystem.FinePackage = model.wipSystem.FinePackage == "on" ? "Y" : "N"; + model.wipSystem.Antivirus = model.wipSystem.Antivirus == "on" ? "Y" : "N"; + #endregion // 判斷資料填寫 WipDataViewModel wipDataViewModel = new WipDataViewModel(); @@ -4529,25 +4540,28 @@ namespace AMESCoreStudio.Web.Controllers if (result_barcodeinfo == null) { - // 判斷是否在BarcodeChange 有被置換過 - var result_BarcodeChangeData = await _pcsApi.GetBarcodeChangeByBarcodeNo(model.BarCodeNo ?? model.ExtraBarCodeNo ?? "A"); + var _msg = "查無相關資料!"; + return RedirectToAction("Refresh", "Home", new { msg = _msg }); - // 判斷查詢是內部還是出貨條碼 - if (!string.IsNullOrWhiteSpace(model.BarCodeNo)) - result_BarcodeChangeData = result_BarcodeChangeData.Where(w => w.ChangeType == "P").ToList(); - else - result_BarcodeChangeData = result_BarcodeChangeData.Where(w => w.ChangeType == "E").ToList(); + //// 判斷是否在BarcodeChange 有被置換過 + //var result_BarcodeChangeData = await _pcsApi.GetBarcodeChangeByBarcodeNo(model.BarCodeNo ?? model.ExtraBarCodeNo ?? "A"); - if (result_BarcodeChangeData.Count() != 0) - { - var barcodeIDChange = result_BarcodeChangeData.FirstOrDefault().BarcodeID; - result_barcodeinfo = _pcsApi.GetBarcodeInfoes(barcodeIDChange).InvokeAsync().Result.FirstOrDefault(); - } - else - { - var _msg = "查無相關資料!"; - return RedirectToAction("Refresh", "Home", new { msg = _msg }); - } + //// 判斷查詢是內部還是出貨條碼 + //if (!string.IsNullOrWhiteSpace(model.BarCodeNo)) + // result_BarcodeChangeData = result_BarcodeChangeData.Where(w => w.ChangeType == "P").ToList(); + //else + // result_BarcodeChangeData = result_BarcodeChangeData.Where(w => w.ChangeType == "E").ToList(); + + //if (result_BarcodeChangeData.Count() != 0) + //{ + // var barcodeIDChange = result_BarcodeChangeData.FirstOrDefault().BarcodeID; + // result_barcodeinfo = _pcsApi.GetBarcodeInfoes(barcodeIDChange).InvokeAsync().Result.FirstOrDefault(); + //} + //else + //{ + // var _msg = "查無相關資料!"; + // return RedirectToAction("Refresh", "Home", new { msg = _msg }); + //} } var result = new PCS009RViewModel(); diff --git a/AMESCoreStudio.Web/Controllers/SPCController.cs b/AMESCoreStudio.Web/Controllers/SPCController.cs index 87fd3cbc..441e4322 100644 --- a/AMESCoreStudio.Web/Controllers/SPCController.cs +++ b/AMESCoreStudio.Web/Controllers/SPCController.cs @@ -1267,6 +1267,15 @@ namespace AMESCoreStudio.Web.Controllers //return Json(new Result() { success = true, msg = "資料有誤!!" }); } + + [HttpPost] + public async Task SPC005GetPLMECN(string ItemNo) + { + IResultModel result; + result = await _spcApi.GetPLMEcn(ItemNo); + return Json(result); + } + [ResponseCache(Duration = 0)] [HttpGet] public async Task GetInspectionResultMastersAsync() diff --git a/AMESCoreStudio.Web/HttpApis/AMES/ISPC.cs b/AMESCoreStudio.Web/HttpApis/AMES/ISPC.cs index 51999830..b81750ea 100644 --- a/AMESCoreStudio.Web/HttpApis/AMES/ISPC.cs +++ b/AMESCoreStudio.Web/HttpApis/AMES/ISPC.cs @@ -338,6 +338,12 @@ namespace AMESCoreStudio.Web ITask> PutInspectionResultDetailForType([FromBody, RawJsonContent] string model); + /// + /// FQC007 取PLM ECN + /// + /// + [WebApiClient.Attributes.HttpGet("api/GetPLMData/Get_PLM_ECN")] + ITask> GetPLMEcn(string ItemNo); #endregion diff --git a/AMESCoreStudio.Web/Views/PCS/PCS001R.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS001R.cshtml index b3d6451d..e08e5d9b 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS001R.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS001R.cshtml @@ -886,6 +886,8 @@
+ diff --git a/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml index dd421f77..a5f3a05d 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml @@ -875,6 +875,8 @@
+ diff --git a/AMESCoreStudio.Web/Views/PCS/PCS034.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS034.cshtml index 37e92840..8bec0871 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS034.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS034.cshtml @@ -857,6 +857,8 @@
+ diff --git a/AMESCoreStudio.Web/Views/SPC/SPC005C.cshtml b/AMESCoreStudio.Web/Views/SPC/SPC005C.cshtml index 0c9be70a..a24f8ec4 100644 --- a/AMESCoreStudio.Web/Views/SPC/SPC005C.cshtml +++ b/AMESCoreStudio.Web/Views/SPC/SPC005C.cshtml @@ -69,10 +69,10 @@
- + @@ -113,12 +113,12 @@
@*
-
- @Html.ValidationMessage("error") - - -
-
*@ +
+ @Html.ValidationMessage("error") + + +
+ *@
@@ -172,7 +172,7 @@ @* *@ - + } diff --git a/AMESCoreStudio.Web/Views/SPC/SPC005U.cshtml b/AMESCoreStudio.Web/Views/SPC/SPC005U.cshtml index e3290084..71dd54dd 100644 --- a/AMESCoreStudio.Web/Views/SPC/SPC005U.cshtml +++ b/AMESCoreStudio.Web/Views/SPC/SPC005U.cshtml @@ -16,11 +16,12 @@ margin-left: -10px; margin-right: -10px; } + .layui-table-cell { - height:auto; - overflow:visible; - text-overflow:inherit; - white-space:normal + height: auto; + overflow: visible; + text-overflow: inherit; + white-space: normal }
@@ -56,10 +57,10 @@
- + @@ -146,7 +147,7 @@ @*備註*@ @*線別*@ @*插件位置*@ @*缺失單位*@