From c23a537c9962392fcd0effa9da46248695d75085 Mon Sep 17 00:00:00 2001 From: "BB.Wang" Date: Thu, 9 Feb 2023 18:04:58 +0800 Subject: [PATCH] =?UTF-8?q?Yiru=E4=BF=AE=E6=AD=A3=E5=AE=8C=E5=B7=A5?= =?UTF-8?q?=E5=85=A5=E5=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs | 2 +- AMESCoreStudio.Web/Views/PCS/PCS031.cshtml | 94 +++++++++++++++++-- .../AMES/FqcInhouseMasterController.cs | 4 +- .../DTO/AMES/FqcInhouseMaster_WareDto.cs | 7 ++ .../Models/AMES/PTD101AMESModel.cs | 2 +- 5 files changed, 100 insertions(+), 9 deletions(-) diff --git a/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs b/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs index a2b95aeb..6bcd6270 100644 --- a/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs +++ b/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs @@ -1343,7 +1343,7 @@ namespace AMESCoreStudio.Web #region PTD101AMES 完工入庫序號轉檔 [WebApiClient.Attributes.HttpPost("http://nportal.avalue.com.tw/PTD_Batch/api/PTD101AMES")] - ITask> PostPTD101AMES([FromBody, RawJsonContent] string model); + ITask PostPTD101AMES([FromBody, RawJsonContent] string model); #endregion diff --git a/AMESCoreStudio.Web/Views/PCS/PCS031.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS031.cshtml index 026a7ece..069af51e 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS031.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS031.cshtml @@ -68,7 +68,6 @@
-
@@ -96,8 +95,33 @@
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+
@@ -127,6 +151,43 @@ }); }); + + + $('#inhouseNo1').on('keypress', function (event) { + + if (event.keyCode == 13) { + var data = $("#inhouseNo1").val(); + if (data == '') { + alert("請輸入recordNumber") + } + else + { + $('#recordNumber ').each(function () { + $(this).val(data); + }); + } + + } + + }); + + $('#querysubmitTmp').click(function () { + var data = $("#inhouseNo1").val(); + + var data = $("#inhouseNo1").val(); + if (data == '') { + alert("請輸入recordNumber") + } + else { + $('#recordNumber ').each(function () { + $(this).val(data); + }); + } + + }); + + + // alert('測試文字1'); @@ -139,12 +200,24 @@ // alert('測試文字2'); var tableCols = [[ - { type: 'checkbox' }, + + { + type: 'checkbox', title: '全選', + + }, { field: 'serialNo', width: 145, title: '箱號', - sort: true + sort: true, + totalRowText : '合計:' + }, + { + field: 'boxQty', + width: 70, + title: '數量', + sort: true, + totalRow: true }, { field: 'inhouseNo', @@ -197,7 +270,14 @@ templet: function (d) { var txt = '
'; if (d.locationNo != null) - txt = d.locationNo; + txt = '
'; + if (d.recordNumber != null) { + if (d.locationNo != null) + txt = d.locationNo + else + txt = ""; + } + return txt; } @@ -209,9 +289,10 @@ fixed: 'right', edit: 'text', templet: function (d) { - var txt = '
'; + var txt = '
'; if (d.recordNumber != null) txt = d.recordNumber; + return txt; } @@ -259,6 +340,7 @@ }; // alert('測試文字4'); + function detail(obj) { // if (obj.data.wipID) { hg.open('箱號資料查詢', '/PCS/PCS031V?InhouseNo=' + obj.data.inhouseNo + '&SeqID=' + obj.data.seqID, '', '', true); @@ -328,7 +410,7 @@ // alert('測試文字6'); //基本数据表格 - var table = hg.table.datatable('query', 'FQC查詢', '/PCS/PCS031Query', {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); + var table = hg.table.datatable('query', 'FQC查詢', '/PCS/PCS031Query', {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports'],true); // alert('測試文字7'); diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs index 46c0702a..b9fff9d6 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs @@ -502,6 +502,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES { IQueryable q = from q1 in _context.FqcInhouseMasters join q2 in _context.FqcInhouseDetails on new { q1.InhouseNo, q1.SeqID } equals new { q2.InhouseNo, q2.SeqID } + join q2_1 in _context.WipBoxs on q2.SerialNo equals q2_1.BoxNo join q3 in _context.FqcResultMasters on q1.InhouseNo equals q3.InhouseNo join q4 in _context.WareHouseings on new { q2.InhouseNo, q2.SeqID, q2.SerialNo } equals new { q4.InhouseNo, q4.SeqID, q4.SerialNo } into q2q4 from q402 in q2q4.DefaultIfEmpty() @@ -519,7 +520,8 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES EndTime = q3.EndTime, RecordNumber = q402.RecordNumber, RecordDate = q402.Create_Date, - LocationNo = q1.LocationNo + LocationNo = q1.LocationNo, + BoxQty = q2_1.BoxCnt.ToString() }; //q1.Status == "P" ? "允收" : q1.Status == "R" ? "批退" : "未驗收完成", //IQueryable q1 = _context.FqcInhouseDetails; diff --git a/AMESCoreStudio.WebApi/DTO/AMES/FqcInhouseMaster_WareDto.cs b/AMESCoreStudio.WebApi/DTO/AMES/FqcInhouseMaster_WareDto.cs index 0fce225c..8575d16d 100644 --- a/AMESCoreStudio.WebApi/DTO/AMES/FqcInhouseMaster_WareDto.cs +++ b/AMESCoreStudio.WebApi/DTO/AMES/FqcInhouseMaster_WareDto.cs @@ -131,5 +131,12 @@ namespace AMESCoreStudio.WebApi.DTO.AMES [Display(Name = "入庫單號")] public string LocationNo { get; set; } + /// + /// 數量 + /// + [DataMember] + [Display(Name = "數量")] + public string BoxQty { get; set; } + } } diff --git a/AMESCoreStudio.WebApi/Models/AMES/PTD101AMESModel.cs b/AMESCoreStudio.WebApi/Models/AMES/PTD101AMESModel.cs index e268ea10..1bb9f07e 100644 --- a/AMESCoreStudio.WebApi/Models/AMES/PTD101AMESModel.cs +++ b/AMESCoreStudio.WebApi/Models/AMES/PTD101AMESModel.cs @@ -54,7 +54,7 @@ namespace AMESCoreStudio.WebApi.Models.AMES /// /// 正式資料:Ava.ptdbatch 測試資料 :test-Ava.ptdbatch-test /// - public string Key { get; set; } = "test-Ava.ptdbatch-test"; + public string Key { get; set; } = "Ava.ptdbatch"; } }