From 8767475c4888c8013d2dac768f1dae26a46454b2 Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 7 Feb 2023 18:51:43 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E6=9B=B4=E6=96=B0=E5=87=BA=E8=B2=A8?= =?UTF-8?q?=E5=BA=8F=E8=99=9F=E5=8F=96=E5=BE=97=E6=96=B9=E5=BC=8F=202.=20?= =?UTF-8?q?=E5=B7=A5=E5=96=AE=E4=BF=AE=E6=94=B9=E8=AA=BF=E6=95=B4=E9=98=B2?= =?UTF-8?q?=E5=91=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/PCSController.cs | 10 +- AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs | 8 +- AMESCoreStudio.Web/Views/PCS/PCS001N.cshtml | 8 +- AMESCoreStudio.Web/Views/PCS/PCS003.cshtml | 355 +++++++++--------- AMESCoreStudio.Web/Views/PCS/PCS034.cshtml | 8 +- 5 files changed, 199 insertions(+), 190 deletions(-) diff --git a/AMESCoreStudio.Web/Controllers/PCSController.cs b/AMESCoreStudio.Web/Controllers/PCSController.cs index 393822af..be7f4611 100644 --- a/AMESCoreStudio.Web/Controllers/PCSController.cs +++ b/AMESCoreStudio.Web/Controllers/PCSController.cs @@ -87,9 +87,6 @@ namespace AMESCoreStudio.Web.Controllers if (string.IsNullOrWhiteSpace(model.wipInfo.UnitNO)) Msg += model.wipInfo.GetAttributeFrom(nameof(model.wipInfo.UnitNO)).Name + ","; - if (model.wipInfo.FlowRuleID == 0) - Msg += model.wipInfo.GetAttributeFrom(nameof(model.wipInfo.FlowRuleID)).Name + ","; - if (model.wipInfo.WipDueDate == DateTime.MinValue) Msg += model.wipInfo.GetAttributeFrom(nameof(model.wipInfo.WipDueDate)).Name + ","; @@ -1413,11 +1410,12 @@ namespace AMESCoreStudio.Web.Controllers /// 生產序號 /// 生產數量 /// 工單號碼 + /// 預計開工日 /// RuleStation [HttpPost] - public async Task GetBarcodeOther(string itemNo, string lotNo, int num, string wipNo) + public async Task GetBarcodeOther(string itemNo, string lotNo, int num, string wipNo , DateTime wipShcDate) { - var result = await _pcsApi.GetSerialRuleByQurey(itemNo, lotNo.Trim().ToUpper(), num); + var result = await _pcsApi.GetSerialRuleByQurey(itemNo, lotNo.Trim().ToUpper(), num, wipShcDate); string StartNO = ""; string EndNO = ""; @@ -5648,7 +5646,7 @@ namespace AMESCoreStudio.Web.Controllers await GetLineInfo(); await GetFlowRuleList(); - var aa = GetBarcodeOther(model.WipAtt.ItemNO, model.WipInfo.Werks.Substring(2, 2), model.WipInfo.PlanQTY, model.WipInfo.WipNO); + //var aa = GetBarcodeOther(model.WipAtt.ItemNO, model.WipInfo.Werks.Substring(2, 2), model.WipInfo.PlanQTY, model.WipInfo.WipNO , model.WipInfo.WipScheduleDate); IResultModel result; model.WipBarcode.WipNO = model.WipInfo.WipNO; diff --git a/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs b/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs index a5852834..bf651dd1 100644 --- a/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs +++ b/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs @@ -984,7 +984,7 @@ namespace AMESCoreStudio.Web /// /// [WebApiClient.Attributes.HttpGet("api/WipInfos/GetWipInfo4QRS009")] - ITask> GetWipInfo4QRS009(string unitNo,string factoryNo); + ITask> GetWipInfo4QRS009(string unitNo, string factoryNo); /// @@ -1304,8 +1304,8 @@ namespace AMESCoreStudio.Web #endregion #region 取出貨序號 - [WebApiClient.Attributes.HttpGet("api/SerialRules/ByQurey/{itemNo}/{lotNo}/{num}")] - ITask> GetSerialRuleByQurey(string itemNo, string lotNo, int num); + [WebApiClient.Attributes.HttpGet("api/SerialRules/ByQurey/{itemNo}/{lotNo}/{num}/{wipShcDate}")] + ITask> GetSerialRuleByQurey(string itemNo, string lotNo, int num, DateTime wipShcDate); #endregion #region 樣品出貨序號紀錄 @@ -1344,7 +1344,7 @@ namespace AMESCoreStudio.Web #region PTD101AMES 完工入庫序號轉檔 [WebApiClient.Attributes.HttpPost("http://nportal.avalue.com.tw/PTD_Batch/api/PTD101AMES")] ITask> PostPTD101AMES([FromBody, RawJsonContent] string model); - + #endregion /// diff --git a/AMESCoreStudio.Web/Views/PCS/PCS001N.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS001N.cshtml index e6c60260..aebb978f 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS001N.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS001N.cshtml @@ -433,6 +433,7 @@ var planQTY = $('#wipInfo_PlanQTY').val(); var lotNo = $('#lotNo').val(); var wipNo = $('#wipInfo_WipNO').val(); + var wipShcDate = $('#wipInfo_WipScheduleDate').val(); if (wipNo == '' || !wipNo) { parent.hg.msg("請輸入工單號碼"); return; @@ -445,7 +446,10 @@ parent.hg.msg("請確認計畫數量"); return; } - + if (wipShcDate == '') { + parent.hg.msg("請確認預計開工日期有填寫"); + return; + } if (lotNo == '' || !lotNo) { lotNo = getLotNo(); } @@ -453,7 +457,7 @@ $.ajax({ url: '@Url.Action("GetBarcodeOther", "PCS")', dataType: 'json', - data: { "itemNo": itemNo, "lotNo": lotNo, "num": planQTY ,"wipNo":wipNo}, + data: { "itemNo": itemNo, "lotNo": lotNo, "num": planQTY, "wipNo": wipNo, "wipShcDate": wipShcDate }, cache: false, type: "POST", success: function (result) { diff --git a/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml index ffa7bf42..09ab3b49 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml @@ -1,8 +1,10 @@ @model AMESCoreStudio.Web.ViewModels.PCS.WipDataViewModel -@{ ViewData["Title"] = "PCS003"; - Layout = "~/Views/Shared/_AMESLayout.cshtml"; } +@{ + ViewData["Title"] = "PCS003"; + Layout = "~/Views/Shared/_AMESLayout.cshtml"; +}