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}'"; }