diff --git a/AMESCoreStudio.Web/Controllers/PCBController.cs b/AMESCoreStudio.Web/Controllers/PCBController.cs index 3c587a2..eadeb6e 100644 --- a/AMESCoreStudio.Web/Controllers/PCBController.cs +++ b/AMESCoreStudio.Web/Controllers/PCBController.cs @@ -70,13 +70,13 @@ namespace AMESCoreStudio.Web.Controllers } public async Task PCB013QueryAsync(string steelPlateNo, string storageLocation, string item, - string date_str, string date_end, string side, string status, string checkOff, int page = 0, int limit = 10) + string date_str, string date_end, string status, string checkOff, int page = 0, int limit = 10) { if (checkOff == "on") checkOff = "Y"; IResultModel result = await _pcbApi.GetSteelPlateInfoQuery(steelPlateNo: steelPlateNo, storageLocation: storageLocation, - item: item, date_str: date_str, date_end: date_end, side: side, status: status, + item: item, date_str: date_str, date_end: date_end, status: status, checkOff: checkOff, page: page, limit: limit); if (result.Data.Count() != 0) @@ -107,7 +107,7 @@ namespace AMESCoreStudio.Web.Controllers if (ModelState.IsValid) { model.SteelPlateNo = model.SteelPlateNo.Trim(); - model.Items = model.Items.Trim(); + model.Items = model.Items.Trim().ToUpper(); IResultModel result; if (model.SteelPlateID == 0) @@ -153,8 +153,15 @@ namespace AMESCoreStudio.Web.Controllers var resultSteel = await _pcbApi.GetSteelPlateMeasureBySteelPlateID(steelPlateID); + var resultSteelInfo = await _pcbApi.GetSteelPlateInfo(result.SteelPlateID); + + if (resultSteelInfo != null) + { + result.Items = resultSteelInfo.Items; + } + // 鋼板編號沒有量測資料 - if (resultSteel.Data.Count() == 0) + if (!resultSteel.Data.Any()) { result.SpMeasureID = 0; result.Status = "上線"; @@ -162,6 +169,7 @@ namespace AMESCoreStudio.Web.Controllers else { var item = resultSteel.Data.OrderByDescending(o => o.SpMeasureID).FirstOrDefault(); + // 下線資料空白 if (string.IsNullOrWhiteSpace(item.OffTension1)) { @@ -319,11 +327,20 @@ namespace AMESCoreStudio.Web.Controllers } public async Task PCB016QueryAsync(string steelPlateNo, string storageLocation, string item, - string date_str, string date_end, string wipNo, int page = 0, int limit = 10) + string date_str, string date_end, string wipNo, string checkOff, int page = 0, int limit = 10) { + IResultModel result; + if (checkOff == "on") + { + result = await _pcbApi.GetSteelPlateInfoReportByUnused(steelPlateNo: steelPlateNo, storageLocation: storageLocation, + item: item, date_str: date_str, date_end: date_end, wipNo: wipNo, page: page, limit: limit); - IResultModel result = await _pcbApi.GetSteelPlateInfoReport(steelPlateNo: steelPlateNo, storageLocation: storageLocation, - item: item, date_str: date_str, date_end: date_end, wipNo: wipNo, page: page, limit: limit); + } + else + { + result = await _pcbApi.GetSteelPlateInfoReport(steelPlateNo: steelPlateNo, storageLocation: storageLocation, + item: item, date_str: date_str, date_end: date_end, wipNo: wipNo, page: page, limit: limit); + } if (result.Data.Count() != 0) { diff --git a/AMESCoreStudio.Web/HttpApis/AMES/IPCB.cs b/AMESCoreStudio.Web/HttpApis/AMES/IPCB.cs index 9565f1e..c3c94f8 100644 --- a/AMESCoreStudio.Web/HttpApis/AMES/IPCB.cs +++ b/AMESCoreStudio.Web/HttpApis/AMES/IPCB.cs @@ -466,7 +466,6 @@ namespace AMESCoreStudio.Web /// 鋼板編號 /// 儲存位置 /// 料號 - /// 正背面 /// 狀態 /// 到廠日_起 /// 到廠日_迄 @@ -476,8 +475,8 @@ namespace AMESCoreStudio.Web /// [WebApiClient.Attributes.HttpGet("api/SteelPlateInfo/SteelPlateInfoQuery")] ITask> GetSteelPlateInfoQuery(string steelPlateNo = null, string storageLocation = null, - string item = null, string date_str = null, string date_end = null - , string side = null, string status = null, string checkOff = null, int page = 0, int limit = 10); + string item = null, string date_str = null, string date_end = null, + string status = null, string checkOff = null, int page = 0, int limit = 10); /// /// 新增鋼板資料 @@ -564,6 +563,27 @@ namespace AMESCoreStudio.Web string item = null, string date_str = null, string date_end = null , string wipNo = null, int page = 0, int limit = 10); + + /// + /// 鋼板資料查詢(未使用) Report + /// + /// 鋼板編號 + /// 儲存位置 + /// 料號 + /// 正背面 + /// 狀態 + /// 到廠日_起 + /// 到廠日_迄 + /// 鋼板未下線狀態 Y/N + /// 頁數 + /// 筆數 + /// + [WebApiClient.Attributes.HttpGet("api/SteelPlateInfo/SteelPlateInfoReportByUnused")] + ITask> GetSteelPlateInfoReportByUnused(string steelPlateNo = null, string storageLocation = null, + string item = null, string date_str = null, string date_end = null + , string wipNo = null, int page = 0, int limit = 10); + + /// /// 新增警報資料 /// diff --git a/AMESCoreStudio.Web/ViewModels/PCB/PCB013ViewModel.cs b/AMESCoreStudio.Web/ViewModels/PCB/PCB013ViewModel.cs index 99ca218..7ed8050 100644 --- a/AMESCoreStudio.Web/ViewModels/PCB/PCB013ViewModel.cs +++ b/AMESCoreStudio.Web/ViewModels/PCB/PCB013ViewModel.cs @@ -33,6 +33,12 @@ namespace AMESCoreStudio.Web.ViewModels.PCB [DataMember] public string SteelPlateNo { get; set; } + /// + /// 料號 + /// + [DataMember] + public string Items { get; set; } + /// /// 張力_1 /// diff --git a/AMESCoreStudio.Web/Views/PCB/PCB013.cshtml b/AMESCoreStudio.Web/Views/PCB/PCB013.cshtml index ef1abfa..d3113ad 100644 --- a/AMESCoreStudio.Web/Views/PCB/PCB013.cshtml +++ b/AMESCoreStudio.Web/Views/PCB/PCB013.cshtml @@ -7,27 +7,27 @@ /*.layui-table-main .layui-table-cell {*/ /*height: auto !important;*/ /*white-space: normal; - } + } - .layui-table img { - max-width: 60px; - max-height: 28px; - } + .layui-table img { + max-width: 60px; + max-height: 28px; + } - .layui-tree-main { - cursor: pointer; - padding-right: 10px; - float: left; - border-width: 1px; - border-style: solid; - border-color: #e6e6e6; - margin: 10px 0; - } + .layui-tree-main { + cursor: pointer; + padding-right: 10px; + float: left; + border-width: 1px; + border-style: solid; + border-color: #e6e6e6; + margin: 10px 0; + } - .layui-table-cell { - height: auto; - white-space: normal; - }*/ + .layui-table-cell { + height: auto; + white-space: normal; + }*/ @@ -51,30 +51,22 @@ -
+
-
+
-
+
- -
+ +
- -
-
- -
-
@@ -91,19 +83,6 @@
-
-
- -
- -
-
-
@@ -121,7 +100,13 @@
- +
+
+ +
+
@@ -175,11 +160,6 @@ sort: true, templet: '
{{ layui.util.toDateString(d.arrivalDate, "yyyy/MM/dd") }}
' }, - { - field: 'sideName', - title: '正背面', - width: 70 - }, { field: 'boards', title: '鋼板可使用次數', @@ -191,31 +171,6 @@ width: 85, sort: true }, - { - field: 'standardTension1', - title: '張力1', - width: 70 - }, - { - field: 'standardTension2', - title: '張力2', - width: 70 - }, - { - field: 'standardTension3', - title: '張力3', - width: 70 - }, - { - field: 'standardTension4', - title: '張力4', - width: 70 - }, - { - field: 'standardTension5', - title: '張力5', - width: 70 - }, { field: 'statusName', width: 60, @@ -226,11 +181,11 @@ width: 230, templet: function (d) { var aa = '修改\ - 檢視量測' + 檢視量測' if (d.statusName != '失效') { aa += '新增量測'; } - return aa; + return aa; } } ]]; @@ -243,7 +198,7 @@ function detail(obj) { if (obj.data.steelPlateID) { - hg.open('新增量測記錄', '/PCB/PCB013A?steelPlateID=' + obj.data.steelPlateID + '&steelPlateNo=' + obj.data.steelPlateNo, 900, 550); + hg.open('新增量測記錄', '/PCB/PCB013A?steelPlateID=' + obj.data.steelPlateID + '&steelPlateNo=' + obj.data.steelPlateNo, 800, 500); } } @@ -266,6 +221,6 @@ //基本資料表格 var table = hg.table.datatable('query', '鋼板資料查詢', '/PCB/PCB013Query', {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); - // var table = hg.table.datatable('test', '條碼狀態維護', '/PCS/GetWipInfo', {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); + // var table = hg.table.datatable('test', '條碼狀態維護', '/PCS/GetWipInfo', {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); } \ No newline at end of file diff --git a/AMESCoreStudio.Web/Views/PCB/PCB013A.cshtml b/AMESCoreStudio.Web/Views/PCB/PCB013A.cshtml index cff8fa1..a8c94ec 100644 --- a/AMESCoreStudio.Web/Views/PCB/PCB013A.cshtml +++ b/AMESCoreStudio.Web/Views/PCB/PCB013A.cshtml @@ -1,5 +1,7 @@ @model AMESCoreStudio.Web.ViewModels.PCB.PCB013ViewModel -@{ Layout = "~/Views/Shared/_AMESLayout.cshtml"; } +@{ + Layout = "~/Views/Shared/_AMESLayout.cshtml"; +}