From 01866208dde544530f0d15e3081dacfab82e9643 Mon Sep 17 00:00:00 2001 From: "vick_wang419@hotmail.com.tw" Date: Wed, 10 Apr 2024 01:43:55 +0800 Subject: [PATCH] =?UTF-8?q?PTD=20=E6=9F=A5=E8=A9=A2=E4=BD=9C=E6=A5=AD?= =?UTF-8?q?=E5=84=AA=E5=8C=96=20&=20GetZDNDetail4PTD001=20=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AMESCoreStudio.Web/Controllers/PTDController.cs | 4 +++- AMESCoreStudio.Web/Views/PTD/PTD003.cshtml | 1 + AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/AMESCoreStudio.Web/Controllers/PTDController.cs b/AMESCoreStudio.Web/Controllers/PTDController.cs index 6945c680..35f33888 100644 --- a/AMESCoreStudio.Web/Controllers/PTDController.cs +++ b/AMESCoreStudio.Web/Controllers/PTDController.cs @@ -353,10 +353,12 @@ namespace AMESCoreStudio.Web.Controllers return View(); } - public async Task PTD003QueryAsync(string recordType, string recordNumber, string lineNo, string materialNo, string shippingSN, string dateStart, string dateEnd) + public async Task PTD003QueryAsync(string recordType, string recordNumber, string lineNo, string materialNo, string shippingSN, string dateStart, string dateEnd, int autoLoad = 0) { //if (recordNumber == null || recordNumber == "") // return Json(new Table() { count = 0, data = null }); + if (autoLoad == 0) + return Json(new Table() { count = 0, data = null }); var result = await _pcsApi.GetData4PTD003(recordType, recordNumber, lineNo, materialNo, shippingSN, dateStart, dateEnd); if (result.DataTotal > 0) diff --git a/AMESCoreStudio.Web/Views/PTD/PTD003.cshtml b/AMESCoreStudio.Web/Views/PTD/PTD003.cshtml index 1844bb3b..fe674851 100644 --- a/AMESCoreStudio.Web/Views/PTD/PTD003.cshtml +++ b/AMESCoreStudio.Web/Views/PTD/PTD003.cshtml @@ -224,6 +224,7 @@ //监听表单提交事件 hg.form.onsubmit('querysubmit', function (data) { hg.msghide("重新載入資料.."); + data.autoLoad = 1; table && table.reload(data); }); diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs index d6306da1..32aa6282 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs @@ -2526,7 +2526,7 @@ FROM [SFIS].[dbo].[ZPDKeyPart] B WHERE B.[IsActive] = 1 AND B.[ProductSN] = (S string strSQL = $@"select DNNO,DNLineNO,ProductID,ShipQty,ShipCustomerID,SoldCustomerID,ExpectShipDate , CurrentShipDate from SFIS_PTD.dbo.ZDNDetail where DNNO ='{dnNo}' "; - if (string.IsNullOrEmpty(lineNo)) + if (!string.IsNullOrEmpty(lineNo)) { strSQL += $@"And DNLineNO ='{lineNo}'"; }