diff --git a/AMESCoreStudio.Web/Controllers/FQCController.cs b/AMESCoreStudio.Web/Controllers/FQCController.cs index a6110834..2ee044b7 100644 --- a/AMESCoreStudio.Web/Controllers/FQCController.cs +++ b/AMESCoreStudio.Web/Controllers/FQCController.cs @@ -1242,11 +1242,11 @@ namespace AMESCoreStudio.Web.Controllers var _msg = "工單類型不是無序號工單,檢驗類型不能選擇無序號廠驗"; return RedirectToAction("Refresh", "Home", new { msg = _msg }); } - } + } } // Fail數量 小於0 才要判斷抽樣數量 && 不等於免驗||無序號廠驗 - if (fqcItem.FailQty <= 0 && (fqcItem.InspectionStatus != "C" || fqcItem.InspectionStatus != "D")) + if (fqcItem.FailQty <= 0 && (fqcItem.InspectionStatus != "C" && fqcItem.InspectionStatus != "D")) { // 抽驗數量 大於 本批次送驗量 if (fqcItem.QcQty > fqcItem.InhouseQty) @@ -1305,13 +1305,14 @@ namespace AMESCoreStudio.Web.Controllers var fqcItem = FqcQuery.Data.FirstOrDefault(); // 免驗||無序號廠驗排除 - if (fqcItem.InspectionStatus != "C" || fqcItem.InspectionStatus != "D") + if (fqcItem.InspectionStatus != "C" && fqcItem.InspectionStatus != "D") { // 判斷狀態選擇 if (fqcItem.FailQty >= fqcItem.ReQty) { if (model.QaResult == "P" && string.IsNullOrWhiteSpace(model.SpecialPo)) { + //return Json(new { data = "請輸入特採單號", success = false }); ModelState.AddModelError("error", "請輸入特採單號"); return View("FQC007B", model); } @@ -1327,11 +1328,13 @@ namespace AMESCoreStudio.Web.Controllers { ModelState.AddModelError("error", "抽樣數量不足,不可判定允收"); return View("FQC007B", model); + //return Json(new { data = "抽樣數量不足,不可判定允收", success = false }); } } //當抽驗數量 小於 抽樣數量就離開 else if (fqcItem.QcQty > fqcItem.PassQty + fqcItem.FailQty && model.QaResult == "P") { + //return Json(new { data = "抽樣數量不足,不可判定允收", success = false }); ModelState.AddModelError("error", "抽樣數量不足,不可判定允收"); return View("FQC007B", model); } @@ -1365,14 +1368,16 @@ namespace AMESCoreStudio.Web.Controllers //FQC報表自動派送 await CheckFQCToMail(fqcInhouseMaster.ItemNo, model.QaResult, model.InhouseNo, model.SeqID); + //return Json(new { data = "新增成功!", success = true }); var _msg = "新增成功!"; return RedirectToAction("WindowReload", "Home", new { msg = _msg }); } else { + //return Json(new { data = result.Msg, success = false }); ModelState.AddModelError("error", result.Msg); } - + return View("FQC007B", model); } #endregion diff --git a/AMESCoreStudio.Web/Views/FQC/FQC007.cshtml b/AMESCoreStudio.Web/Views/FQC/FQC007.cshtml index 890d1a0a..315af9f4 100644 --- a/AMESCoreStudio.Web/Views/FQC/FQC007.cshtml +++ b/AMESCoreStudio.Web/Views/FQC/FQC007.cshtml @@ -9,11 +9,13 @@ font-weight: bold; color: #FF5722; } + .textF { font-size: 14px; font-weight: bold; color: #009688; } + .aa input { font-size: 14px; color: #0600f0; @@ -90,12 +92,12 @@