diff --git a/AMESCoreStudio.Web/Controllers/PCSController.cs b/AMESCoreStudio.Web/Controllers/PCSController.cs index 0654a907..acc35079 100644 --- a/AMESCoreStudio.Web/Controllers/PCSController.cs +++ b/AMESCoreStudio.Web/Controllers/PCSController.cs @@ -9493,7 +9493,10 @@ namespace AMESCoreStudio.Web.Controllers if (result.Success) { _msg = "修改成功!"; - return RedirectToAction("Refresh", "Home", new { wipNo = model.WipInfo.WipNO, msg = _msg }); + return RedirectToAction("Refresh", "Home", new { wipNo = model.WipInfo.WipNO, msg = _msg }); + // return RedirectToAction("PCS040R", "PCS", new { id = model.WipInfo.WipNO,Rule = model.WipAtt.ModelNO, serialRuleitem = model.SerialRuleItem }); + // return RedirectToAction("PCS040Query", "PCS", new { wipNo = model.WipInfo.WipNO }); + } else { @@ -9506,7 +9509,7 @@ namespace AMESCoreStudio.Web.Controllers } - public async Task PCS040R(string id, string rule,string serialRuleitem, string msg = null) + public async Task PCS040R(string id, string rule,string serialRuleitem, int otherID, string msg = null) { ViewBag.Msg = msg; @@ -9516,7 +9519,7 @@ namespace AMESCoreStudio.Web.Controllers { model.WipInfo = q.FirstOrDefault(); model.WipAtt = await _pcsApi.GetWipAtt(model.WipInfo.WipNO); - model.WipBarcodeOther = await _pcsApi.GetWipBarcodeOther(model.WipInfo.WipNO); + model.WipBarcodeOther = await _pcsApi.GetWipBarcodeOtherByotherID(otherID); model.WipAtt.ModelNO = rule; model.SerialRuleItem = serialRuleitem; diff --git a/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs b/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs index 5efb9c06..74092a7d 100644 --- a/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs +++ b/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs @@ -1798,12 +1798,15 @@ namespace AMESCoreStudio.Web /// - /// 刪除工單出貨條碼區間 by OTHERID + ///查詢工單出貨條碼區間 by OTHERID /// /// [WebApiClient.Attributes.HttpDelete("api/WipBarcodeOther/byOhterID/{id}")] ITask> DeleteWipBarcodeOtherByOtherID(int id); + [WebApiClient.Attributes.HttpGet("api/WipBarcodeOther/ByOtherID/{id}")] + ITask GetWipBarcodeOtherByotherID(int id); + #endregion #region OutfitInfoes 設備資料檔 diff --git a/AMESCoreStudio.Web/Views/PCS/PCS040.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS040.cshtml index e66b0a34..4e16a35f 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS040.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS040.cshtml @@ -157,7 +157,7 @@ //通过行tool編輯,lay-event="edit" function edit(obj) { if (obj.data.wipNo) { - hg.open('修改工單資料', '/PCS/PCS040R?id=' + obj.data.wipNo + '&rule=' + obj.data.rule + '&serialRuleitem=' + obj.data.itemRule, 740, 350); + hg.open('修改工單資料', '/PCS/PCS040R?id=' + obj.data.wipNo + '&rule=' + obj.data.rule + '&serialRuleitem=' + obj.data.itemRule + '&otherID=' + obj.data.otherID, 740, 350); } } diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/WipBarcodeOthersController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/WipBarcodeOthersController.cs index 1c552c20..0eaaa4a9 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/WipBarcodeOthersController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/WipBarcodeOthersController.cs @@ -172,6 +172,25 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES return result; } + /// + /// 使用ID尋找 + /// + /// + /// + [HttpGet("ByOtherID/{id}")] + public async Task> GetWipBarcodeOtherByOtherID(int id) + { + IQueryable q = _context.WipBarcodeOthers; + + var wipBarcodeOther = await q.Where(p => p.OtherID == id).FirstOrDefaultAsync(); + + //if (wipBarcodeOther == null) + //{ + // return NotFound(); + //} + + return wipBarcodeOther; + } /// /// 新增工單出貨條碼區間設定檔