From 7a9fa57163188aee4b31cf56c272c92c59dcb661 Mon Sep 17 00:00:00 2001 From: ray Date: Wed, 22 Feb 2023 22:57:15 +0800 Subject: [PATCH] =?UTF-8?q?1.=20FQC=E6=8A=BD=E9=A9=97=20=E5=88=A4=E6=96=B7?= =?UTF-8?q?=E7=84=A1=E5=BA=8F=E8=99=9F=E5=B7=A5=E5=96=AE=E4=B8=8D=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E9=81=8EFQC=E9=81=8E=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AMESCoreStudio.Web/Controllers/FQCController.cs | 14 ++++++++++++-- AMESCoreStudio.Web/Views/FQC/FQC007.cshtml | 4 ++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/AMESCoreStudio.Web/Controllers/FQCController.cs b/AMESCoreStudio.Web/Controllers/FQCController.cs index 635465a3..32d8777e 100644 --- a/AMESCoreStudio.Web/Controllers/FQCController.cs +++ b/AMESCoreStudio.Web/Controllers/FQCController.cs @@ -1377,8 +1377,18 @@ namespace AMESCoreStudio.Web.Controllers result = await _fqcApi.PutFqcResultMaster(JsonConvert.SerializeObject(fqcResultMaster)); if (result.Success) { - if (model.QaResult == "P") - await _fqcApi.PassingByFQC(model.InhouseNo, model.SeqID, GetLogInUserID()); + // 允收且不是無序號供單需要FQC過站 + if (model.QaResult == "P" && fqcItem.InspectionStatus != "D") + result = await _fqcApi.PassingByFQC(model.InhouseNo, model.SeqID, GetLogInUserID()); + + if (!result.Success) + { + fqcResultMaster.QaResult = "A"; + fqcInhouseMaster.Status = "A"; + await _fqcApi.PutFqcInhouseMaster(JsonConvert.SerializeObject(fqcInhouseMaster)); + await _fqcApi.PutFqcResultMaster(JsonConvert.SerializeObject(fqcResultMaster)); + return Json(new { data = $"新增失敗,錯誤訊息:{result.Msg}", success = false }); + } //FQC報表自動派送 await CheckFQCToMail(fqcInhouseMaster.ItemNo, model.QaResult, model.InhouseNo, model.SeqID); diff --git a/AMESCoreStudio.Web/Views/FQC/FQC007.cshtml b/AMESCoreStudio.Web/Views/FQC/FQC007.cshtml index a7d35ec1..14e4bbac 100644 --- a/AMESCoreStudio.Web/Views/FQC/FQC007.cshtml +++ b/AMESCoreStudio.Web/Views/FQC/FQC007.cshtml @@ -377,7 +377,7 @@ 抽驗
- 結果判定 + 結果判定
@*
*@ @@ -636,7 +636,7 @@ }; - function result() { + function colse() { //hg.open('判定結果', '/FQC/FQC007B/', 600, 400); var data = $("#FQC007Form").serialize(); $.ajax({