From 7fa5cfb6734797f492f1818363d0f1d7e4010627 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 22 May 2025 10:33:13 +0800 Subject: [PATCH] * [bug#62725,done,0.1h] get total value. --- module/execution/model.php | 11 +++++++---- module/project/js/execution.ui.js | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 8aa2c79f43..331d8de98f 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1501,10 +1501,13 @@ class executionModel extends model foreach($executions as $execution) { - $execution->productName = isset($productList[$execution->id]) ? trim($productList[$execution->id]->productName, ',') : ''; - $execution->product = $productID; - $execution->productID = $productID; - $execution->delay = 0; + $execution->productName = isset($productList[$execution->id]) ? trim($productList[$execution->id]->productName, ',') : ''; + $execution->product = $productID; + $execution->productID = $productID; + $execution->delay = 0; + $execution->totalEstimate = $execution->estimate; + $execution->totalConsumed = $execution->consumed; + $execution->totalLeft = $execution->left; if($execution->end) $execution->end = date(DT_DATE1, strtotime($execution->end)); if(!isset($execution->projectName)) $execution->projectName = $project->name; if(!isset($execution->projectModel)) $execution->projectModel = $project->model; diff --git a/module/project/js/execution.ui.js b/module/project/js/execution.ui.js index 34c170f9c4..fb34cd5df4 100644 --- a/module/project/js/execution.ui.js +++ b/module/project/js/execution.ui.js @@ -93,7 +93,7 @@ window.onRenderCell = function(result, {col, row}) return result; } if(col.name == 'rawID' && data.parent && !data.isExecution) result.push({className: 'ml-5'}); - if(['estimate', 'consumed', 'left'].includes(col.name) && result) result[0] = data.type == 'point' ? '' : {html: result[0] + ' h'}; + if(['estimate', 'consumed', 'left', 'totalEstimate', 'totalConsumed', 'totalLeft'].includes(col.name) && result && typeof result[0] != 'undefined') result[0] = data.type == 'point' ? '' : {html: result[0] + ' h'}; if(col.name == 'progress' && data.type == 'point') result[0] = ''; return result;