diff --git a/AMESCoreStudio.Web/Controllers/PCSController.cs b/AMESCoreStudio.Web/Controllers/PCSController.cs index dc6b03c2..bdcb785c 100644 --- a/AMESCoreStudio.Web/Controllers/PCSController.cs +++ b/AMESCoreStudio.Web/Controllers/PCSController.cs @@ -713,6 +713,27 @@ namespace AMESCoreStudio.Web.Controllers ViewBag.GetSolderPasteList = SolderPaste; } + /// + /// 工單資訊 系統工程資訊 PMType + /// + /// + private void GetWipSystemPMTypeSelect(string SelectedValue = null) + { + List values = new List(); + if (SelectedValue != null) + { + values = SelectedValue.Split(',').ToList(); + } + var q = Enum.GetValues(typeof(Enums.EnumWipSystemPMType)).Cast() + .Select(s => new SelectListItem + { + Text = Enums.GetDisplayName(s).ToString(), + Value = Convert.ToInt32(Enum.Parse(typeof(Enums.EnumWipSystemPMType), s.ToString())).ToString() + }).ToList(); + + ViewBag.GetWipSystemPMTypeSelect = q; + } + /// /// 工單資訊 系統工程資訊 Type @@ -1325,6 +1346,7 @@ namespace AMESCoreStudio.Web.Controllers GetSolderPaste(); GetWipType(); GetWipSystemTypeSelect(); + GetWipSystemPMTypeSelect(); GetCustomerType(); GetPCSList1(); GetPCSOPList(); @@ -2388,51 +2410,49 @@ namespace AMESCoreStudio.Web.Controllers return View(model); } - if (int.Parse(model.BarCodeNoStr.Substring(model.BarCodeNoStr.Length - NoLength, NoLength)) < - int.Parse(model.BarCodeNoEnd.Substring(model.BarCodeNoEnd.Length - NoLength, NoLength))) + var NoStr = int.Parse(model.BarCodeNoStr.Substring(model.BarCodeNoStr.Length - NoLength, NoLength)); + var NoEnd = int.Parse(model.BarCodeNoEnd.Substring(model.BarCodeNoEnd.Length - NoLength, NoLength)); + if (NoStr > NoEnd) { - ModelState.AddModelError("error", "結束流水碼不可以小於起始流水碼"); + ModelState.AddModelError("error", "條碼區間結束流水碼不可以小於條碼區間起始流水碼"); return View(model); } + var _msg = string.Empty; + //foreach (var item in q1) + //{ + // // 判斷是否有鎖定中 + // var q2 = await _pcsApi.GetBarcodeLockByBarCodeID(item.BarcodeID); + // if (q2.Where(w => w.LockStatus == 0).Any()) + // { + // _msg += "目前內部序號【" + item.BarcodeNo + "】尚未解鎖
"; + // } + // else + // { + // BarcodeLock barcodeLock = new BarcodeLock + // { + // BarcodeID = item.BarcodeID, + // WipID = item.WipID, + // StatusID = item.StatusID, + // LockStatus = 0, + // LockReason = model.LockReason, + // LockUserID = 0 + // }; + // result = await _pcsApi.PostBarcodeLock(JsonConvert.SerializeObject(barcodeLock)); + // if (result.Success) + // { + // _msg += "目前內部序號【" + model.BarCodeNo + "】條碼鎖定成功!
"; + + // } + // else + // { + // _msg += "目前內部序號【" + model.BarCodeNo + "】條碼鎖定失敗!
"; + // } + // } + //} - - var q = await _pcsApi.GetWipBarcode(model.WipNo); - if (q.Count() == 0) - { - ModelState.AddModelError("error", "工單號碼【" + model.WipNo + "】,找不到"); - return View(model); - } + return RedirectToAction("Refresh", "Home", new { msg = _msg }); } - - - //var q = await _pcsApi.GetWipInfoByWipNO(model.WipNO); - //if (q.Count() == 0) - // ModelState.AddModelError("error", "找不到工單號碼【" + model.WipNO + "】"); - - //// 判斷工單是否有該站 - - //var q1 = await _pcsApi.GetWipLockByWipNO(model.WipNO); - - //if (q1.Data.Where(w => w.LockStatus == "0").Count() != 0) - //{ - // ModelState.AddModelError("error", "目前此工單號碼【" + model.WipNO + "】尚未解鎖定"); - //} - - //if (ModelState.IsValid) - //{ - // result = await _pcsApi.PostWipLock(JsonConvert.SerializeObject(model)); - // if (result.Success) - // { - // var _msg = model.WipLockID == 0 ? "新增成功!" : "修改成功!"; - // return RedirectToAction("Refresh", "Home", new { msg = _msg }); - // } - // else - // { - // ModelState.AddModelError("error", result.Msg); - // } - //} - return View(model); } #endregion diff --git a/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml index 354bb031..89a530b6 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml @@ -151,14 +151,14 @@
  • 工單屬性
  • -
  • 生產流程
  • 序號編碼
  • Keypart組合
  • -
  • 治具組合
  • +
  • 生產流程
  • 板卡-工程資訊
  • 系統-工程資訊
  • -
  • 標籤選項
  • +
  • 治具組合
  • SOP文件
  • +
  • 標籤選項
@* 工單屬性sheet *@ @@ -226,66 +226,6 @@
- @* 生產流程sheet *@ -
-
-
- -
- -
- -
-
- -
-
- - - - - - - - - - - - @foreach (var index in Model.ruleStations) - { - - - - - - - - } - -
- 生產單位 - - 流程名稱 - - 站別描述 - - 站別順序 - - 站別類型 -
- @index.UnitNoName - - @index.FlowRuleName - - @index.StationDesc - - @index.Sequence - - @index.StationType -
-
-
- @* 序號編碼sheet *@
@@ -413,42 +353,64 @@
- @* 治具組合sheet *@ + @* 生產流程sheet *@
- - @{ int j = 0;} - - - - - - - - - @foreach (var index in Model.Outfits) - { +
+
+ +
+ +
+ +
+
+ +
+
- 治具NO - - 治具名稱 - - 流程名稱ID -
+ + - - - + + + + + - j++; - } - -
- - @index.OutfitNo - - @index.StationType - - @index.RuleStationID - + 生產單位 + + 流程名稱 + + 站別描述 + + 站別順序 + + 站別類型 +
+ + + @foreach (var index in Model.ruleStations) + { + + + @index.UnitNoName + + + @index.FlowRuleName + + + @index.StationDesc + + + @index.Sequence + + + @index.StationType + + + } + + +
@* 板卡-工程資訊sheet *@ @@ -605,6 +567,9 @@
+
+ +
@@ -648,29 +613,38 @@
- +
- +
- - +
- +
+
- +
- +
-
- + +
+
+ +
+ +
+ +
+ +
+
-
@@ -692,6 +666,12 @@
+
+ +
+
+ +
@@ -701,6 +681,12 @@
+
+ +
+
+ +
@@ -710,6 +696,12 @@
+
+ +
+
+ +
@@ -719,6 +711,9 @@
+
+ +
@@ -760,6 +755,49 @@
+ @* 治具組合sheet *@ +
+ + @{ int j = 0;} + + + + + + + + + @foreach (var index in Model.Outfits) + { + + + + + + j++; + } + +
+ 治具NO + + 治具名稱 + + 流程名稱ID +
+ + @index.OutfitNo + + @index.StationType + + @index.RuleStationID +
+
+ + @* SOP文件 sheet *@ +
+
+
+ @* 標籤選項sheet *@
@@ -795,12 +833,6 @@
- - @* SOP文件 sheet *@ -
-
-
-
diff --git a/AMESCoreStudio.WebApi/Models/AMES/WipSystem.cs b/AMESCoreStudio.WebApi/Models/AMES/WipSystem.cs index eaf2dc5b..bf1a089c 100644 --- a/AMESCoreStudio.WebApi/Models/AMES/WipSystem.cs +++ b/AMESCoreStudio.WebApi/Models/AMES/WipSystem.cs @@ -34,6 +34,13 @@ namespace AMESCoreStudio.WebApi.Models.AMES [Display(Name = "料號")] public string ItemNo { get; set; } + /// + /// POWER_MODE_TYPE + /// + [DataMember] + [Column("POWER_MODE_TYPE")] + public int PowerModeType { get; set; } = 1; + /// /// PLM出貨P_M設定 ///