From 740602f78acef63d7c8e83fb2be9c2de94b0c6ce Mon Sep 17 00:00:00 2001 From: Marvin Date: Sun, 16 Oct 2022 21:16:43 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9REP001=E8=AA=BF=E6=95=B4?= =?UTF-8?q?=E7=B6=AD=E4=BF=AE=E4=BB=8B=E9=9D=A2UI=202.=E4=BF=AE=E6=94=B9RE?= =?UTF-8?q?P002=E8=AA=BF=E6=95=B4=E7=B6=AD=E4=BF=AE=E4=BB=8B=E9=9D=A2UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/REPController.cs | 4 +- AMESCoreStudio.Web/Views/REP/REP001.cshtml | 10 ++++- AMESCoreStudio.Web/Views/REP/REP001R.cshtml | 41 ++++++++++-------- AMESCoreStudio.Web/Views/REP/REP001V.cshtml | 21 ++++++++-- AMESCoreStudio.Web/Views/REP/REP002.cshtml | 10 ++++- AMESCoreStudio.Web/Views/REP/REP002R.cshtml | 42 +++++++++++-------- AMESCoreStudio.Web/Views/REP/REP002V.cshtml | 21 ++++++++-- .../AMES/NgComponentsController.cs | 17 ++++++++ AMESCoreStudio.WebApi/Models/AMES/NgRepair.cs | 4 +- 9 files changed, 124 insertions(+), 46 deletions(-) diff --git a/AMESCoreStudio.Web/Controllers/REPController.cs b/AMESCoreStudio.Web/Controllers/REPController.cs index e3ab741b..1ea34f8d 100644 --- a/AMESCoreStudio.Web/Controllers/REPController.cs +++ b/AMESCoreStudio.Web/Controllers/REPController.cs @@ -324,7 +324,7 @@ namespace AMESCoreStudio.Web.Controllers model.ngReason = ng_reason[0]; } - if (result1[0].ErrorDesc == "") + if (result1[0].ErrorDesc == "" || result1[0].ErrorDesc == null) { result1[0].ErrorDesc = ng_reason[0].NGReasonDesc; } @@ -693,7 +693,7 @@ namespace AMESCoreStudio.Web.Controllers model.ngReason = ng_reason[0]; } - if (result1[0].ErrorDesc == "") + if (result1[0].ErrorDesc == "" || result1[0].ErrorDesc == null) { result1[0].ErrorDesc = ng_reason[0].NGReasonDesc; } diff --git a/AMESCoreStudio.Web/Views/REP/REP001.cshtml b/AMESCoreStudio.Web/Views/REP/REP001.cshtml index fb472fc7..f7c1de9e 100644 --- a/AMESCoreStudio.Web/Views/REP/REP001.cshtml +++ b/AMESCoreStudio.Web/Views/REP/REP001.cshtml @@ -96,7 +96,15 @@ { field: 'status', width: 120, - title: '處理狀態' + title: '處理狀態', + templet: function (d) { + if (d.status == 0) + return '未維修' + if (d.status == 1) + return '已維修' + if (d.status == 2) + return '誤判' + } }, { field: 'right', diff --git a/AMESCoreStudio.Web/Views/REP/REP001R.cshtml b/AMESCoreStudio.Web/Views/REP/REP001R.cshtml index dd2bac72..74d9bd15 100644 --- a/AMESCoreStudio.Web/Views/REP/REP001R.cshtml +++ b/AMESCoreStudio.Web/Views/REP/REP001R.cshtml @@ -231,7 +231,7 @@
- +
@@ -256,22 +256,32 @@ + +
+ +
+ + +
+ +
+ +
-
- -
- - -
+ +
+ + +
@@ -308,16 +318,13 @@
- -
- - -
- -
- - -
+
diff --git a/AMESCoreStudio.Web/Views/REP/REP001V.cshtml b/AMESCoreStudio.Web/Views/REP/REP001V.cshtml index 002bc972..e76282b7 100644 --- a/AMESCoreStudio.Web/Views/REP/REP001V.cshtml +++ b/AMESCoreStudio.Web/Views/REP/REP001V.cshtml @@ -95,31 +95,46 @@ var tableCols = [[ { field: 'componentID', - width: 150, + width: 120, title: '不良零件ID', sort: true }, { field: 'locationNo', title: '零件位置代碼', - width: 200, + width: 120, sort: true }, { field: 'pinQty', title: '不良腳位數量', + width: 120, sort: true }, { field: 'ngNo', title: '不良原因代碼', + width: 120, + sort: true + }, + { + field: 'errorDesc', + title: '不良原因描述', sort: true }, { field: 'status', title: '狀態', width: 100, - sort: true + sort: true, + templet: function (d) { + if (d.status == 0) + return '未維修' + if (d.status == 1) + return '已維修' + if (d.status == 2) + return '誤判' + } }, { field: 'createDate', diff --git a/AMESCoreStudio.Web/Views/REP/REP002.cshtml b/AMESCoreStudio.Web/Views/REP/REP002.cshtml index fd53e13b..633dd6c0 100644 --- a/AMESCoreStudio.Web/Views/REP/REP002.cshtml +++ b/AMESCoreStudio.Web/Views/REP/REP002.cshtml @@ -96,7 +96,15 @@ { field: 'status', width: 120, - title: '處理狀態' + title: '處理狀態', + templet: function (d) { + if (d.status == 0) + return '未維修' + if (d.status == 1) + return '已維修' + if (d.status == 2) + return '誤判' + } }, { field: 'right', diff --git a/AMESCoreStudio.Web/Views/REP/REP002R.cshtml b/AMESCoreStudio.Web/Views/REP/REP002R.cshtml index 34e06c58..a5d16282 100644 --- a/AMESCoreStudio.Web/Views/REP/REP002R.cshtml +++ b/AMESCoreStudio.Web/Views/REP/REP002R.cshtml @@ -231,7 +231,7 @@
- +
@@ -256,22 +256,33 @@ + +
+ +
+ + +
+ +
+ +
-
- -
- - -
+ +
+ + +
+
@@ -308,16 +319,13 @@
- -
- - -
- -
- - -
+
diff --git a/AMESCoreStudio.Web/Views/REP/REP002V.cshtml b/AMESCoreStudio.Web/Views/REP/REP002V.cshtml index e851aabb..43296947 100644 --- a/AMESCoreStudio.Web/Views/REP/REP002V.cshtml +++ b/AMESCoreStudio.Web/Views/REP/REP002V.cshtml @@ -99,31 +99,46 @@ var tableCols = [[ { field: 'componentID', - width: 150, + width: 120, title: '不良零件ID', sort: true }, { field: 'locationNo', title: '零件位置代碼', - width: 200, + width: 120, sort: true }, { field: 'pinQty', title: '不良腳位數量', + width: 120, sort: true }, { field: 'ngNo', title: '不良原因代碼', + width: 120, + sort: true + }, + { + field: 'errorDesc', + title: '不良原因描述', sort: true }, { field: 'status', title: '狀態', width: 100, - sort: true + sort: true, + templet: function (d) { + if (d.status == 0) + return '未維修' + if (d.status == 1) + return '已維修' + if (d.status == 2) + return '誤判' + } }, { field: 'createDate', diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/NgComponentsController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/NgComponentsController.cs index f7638c02..3c610bca 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/NgComponentsController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/NgComponentsController.cs @@ -86,6 +86,23 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES { var ngComponent = await q.ToListAsync(); + if (ngComponent.Count > 0) + { + if (ngComponent[0].ErrorDesc == "" || ngComponent[0].ErrorDesc == null) + { + IQueryable q1 = _context.NGReasons; + + q1 = q1.Where(p => p.NGReasonNo.Equals(ngComponent[0].NgNo)); + + var ng_reason = await q1.ToListAsync(); + + if (ng_reason.Count > 0) + { + ngComponent[0].ErrorDesc = ng_reason[0].NGReasonDesc; + } + } + } + if (ngComponent == null) { return NotFound(); diff --git a/AMESCoreStudio.WebApi/Models/AMES/NgRepair.cs b/AMESCoreStudio.WebApi/Models/AMES/NgRepair.cs index a04ba839..ae0b680c 100644 --- a/AMESCoreStudio.WebApi/Models/AMES/NgRepair.cs +++ b/AMESCoreStudio.WebApi/Models/AMES/NgRepair.cs @@ -88,13 +88,13 @@ namespace AMESCoreStudio.WebApi.Models.AMES public string Memo { get; set; } /// - /// 組件料號 + /// 維修料號 /// [Required] [Column("PART_NO")] [StringLength(30)] [DataMember] - [Display(Name = "組件料號")] + [Display(Name = "維修料號")] public string PartNo { get; set; } ///