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({