From daa10d6d475b5de78a07b1fcf50170ba1c597ea5 Mon Sep 17 00:00:00 2001 From: Yiru Date: Tue, 26 Mar 2024 10:49:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A0=B1=E5=B7=A5=E6=98=8E=E7=B4=B0=E6=9F=A5?= =?UTF-8?q?=E8=A9=A2=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/QRSController.cs | 1 + AMESCoreStudio.Web/Views/QRS/QRS029.cshtml | 44 +++++++++---------- .../Controllers/AMES/ActualTimeController.cs | 11 +++++ 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/AMESCoreStudio.Web/Controllers/QRSController.cs b/AMESCoreStudio.Web/Controllers/QRSController.cs index ffe27173..c1eb35fd 100644 --- a/AMESCoreStudio.Web/Controllers/QRSController.cs +++ b/AMESCoreStudio.Web/Controllers/QRSController.cs @@ -11149,6 +11149,7 @@ namespace AMESCoreStudio.Web.Controllers public async Task QRS029() { + ViewBag.ActualDate = System.DateTime.Now.ToString("yyyy/MM"); return View(); } [ResponseCache(Duration = 0)] diff --git a/AMESCoreStudio.Web/Views/QRS/QRS029.cshtml b/AMESCoreStudio.Web/Views/QRS/QRS029.cshtml index 69fd3476..277e4707 100644 --- a/AMESCoreStudio.Web/Views/QRS/QRS029.cshtml +++ b/AMESCoreStudio.Web/Views/QRS/QRS029.cshtml @@ -40,22 +40,22 @@
-
+
- +
- +
-
-
- -
+
+
+
+
@@ -78,7 +78,7 @@ laydate.render({ elem: '#dateStr' , trigger: 'click' - , format: 'yyyy/MM/dd' + , format: 'yyyy/MM' , theme: 'grid' }); @@ -113,8 +113,8 @@ field: 'actualdate', width: 140, title: '報工日期', - sort: true, - totalRow: true + sort: true + }, { field: 'wiP_NO', @@ -125,41 +125,41 @@ { field: 'actualtime', title: '作業工時', - width: 100 + width: 120 }, { field: 'st', - width: 100, + width: 120, title: '標工' }, { field: 'resttime', - width: 100, + width: 120, title: '休息時間' }, { field: 'actualtimedetail', - width: 100, + width: 120, title: '報工工時明細' }, { field: 'productiontime', - width: 100, - title: '報工工時' + width: 120, + title: 'SAP報工工時' }, { field: 'actualtimedetailexcept', - width: 100, + width: 120, title: '與報工工時差異' }, { field: 'productioncntsap', - width: 100, - title: '報工數量' + width: 120, + title: 'SAP報工數量' }, { field: 'types', @@ -196,7 +196,7 @@ }); //基本数据表格 function tt() { - table = hg.table.datatable('query', '報工明細查詢', '/QRS/QRS029Query?' + 'actualDate=' + $("#dateStr").val() , {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports'], true); + table = hg.table.datatable('query', '報工明細查詢', '/QRS/QRS029Query?' + 'actualDate=' + $("#dateStr").val() , {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); } diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/ActualTimeController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/ActualTimeController.cs index 261f1695..c114e803 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/ActualTimeController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/ActualTimeController.cs @@ -104,12 +104,23 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES } result.DataTotal = list.Count(); + + //Table 頁數 + if (page > 0) + { + list = list.Skip((page - 1) * limit).Take(limit).ToList(); + } result.Data = list; } } } + + + + + if (result == null) { result.Msg = "查無資料";