diff --git a/module/execution/config.php b/module/execution/config.php index d8f5428dc9..c2514fd6d8 100644 --- a/module/execution/config.php +++ b/module/execution/config.php @@ -139,7 +139,7 @@ $config->execution->gantt->linkType['end']['end'] = 2; $config->execution->gantt->linkType['begin']['end'] = 3; $config->execution->datatable = new stdclass(); -$config->execution->datatable->defaultField = array('id', 'name', 'code', 'project', 'PM', 'status', 'progress', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn'); +$config->execution->datatable->defaultField = array('id', 'name', 'code', 'project', 'PM', 'status', 'progress', 'percent', 'attribute', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn', 'actions'); $config->execution->datatable->fieldList['id']['title'] = 'idAB'; $config->execution->datatable->fieldList['id']['fixed'] = 'left'; diff --git a/module/execution/control.php b/module/execution/control.php index 58ee1fae6d..bb72b95d4d 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -3476,16 +3476,6 @@ class execution extends control $parents = array(); if($parentIdList) $parents = $this->execution->getByIdList($parentIdList); - $isStage = (isset($project->model) and $project->model == 'waterfall') ? true : false; - if($isStage) - { - $this->config->execution->datatable->defaultField = array('id', 'name', 'PM', 'status', 'progress', 'percent', 'attribute', 'begin', 'end', 'realBegan', 'realEnd', 'actions'); - } - elseif($this->app->tab == 'project') - { - $this->config->execution->datatable->defaultField = array('id', 'name', 'code', 'PM', 'status', 'progress', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn'); - } - $this->view->executionStats = $executionStats; $this->view->productList = $this->loadModel('product')->getProductPairsByProject($projectID); $this->view->productID = $productID; @@ -3497,7 +3487,8 @@ class execution extends control $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->status = $status; $this->view->from = $from; - $this->view->isStage = $isStage; + $this->view->isStage = (isset($project->model) and $project->model == 'waterfall') ? true : false; + $this->display(); } diff --git a/module/execution/css/all.css b/module/execution/css/all.css index 8d99516a98..e397110bf8 100644 --- a/module/execution/css/all.css +++ b/module/execution/css/all.css @@ -15,6 +15,7 @@ body {margin-bottom: 25px;} .main-table tbody > tr.table-children > td:first-child::before {width: 3px;} td.hours {text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} td.flex {display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center; margin-bottom: -1px;} +td.datatable-cell.flex {margin-bottom: -2px;} td.flex span.label-badge {margin-left: 5px; min-width: 50px;} td.flex span.label-badge.label-light {min-width: 22px;} td.flex span.project-type-label {margin-left: 5px; min-width: 36px;} @@ -31,5 +32,5 @@ td.flex span.project-type-label {min-width: 40px;} .c-project{text-overflow: unset !important;} canvas {height: 28px;} -.parent.has-child.c-name.flex, .table-child-bottom > .c-name.flex {border-bottom: 1px solid #cbd0db;} -.parent.has-child.c-name.flex {margin-bottom: -2px;} +.parent.has-child.c-name.flex, .table-child-bottom > .c-name.flex {border-bottom: 1px solid #cbd0db !important;} +.parent.has-child.c-name.flex {margin-bottom: -2px !important;} diff --git a/module/execution/model.php b/module/execution/model.php index 768ac3b83b..dbec1f4d5d 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -4167,7 +4167,7 @@ class executionModel extends model $id = $col->id; $onlyChildStage = ($execution->grade == 2 and $execution->project != $execution->parent); - if(!$isStage and $col->id == 'actions') return; + if(!$isStage and in_array($col->id, array('percent', 'attribute', 'actions'))) return; if(($this->config->systemMode == 'classic' or ($this->config->systemMode == 'new' and $this->app->tab != 'execution')) and $col->id == 'project') return; if($col->show) diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index e332219bc4..8478906dc4 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -106,7 +106,11 @@ js::set('foldAll', $lang->execution->treeLevel['root']); $hasActions = false; foreach($setting as $key => $value) { - if($value->id == 'actions') $hasActions = true; + if($value->id == 'actions') + { + $hasActions = true; + $value->show = true; + } } if(!$hasActions) @@ -126,9 +130,9 @@ js::set('foldAll', $lang->execution->treeLevel['root']); foreach($setting as $key => $value) { - if($value->show || $value->id == 'actions') + if($value->show) { - if($isStage and $value->id == 'actions') $value->show = true; + if(!$isStage and in_array($value->id, array('percent', 'attribute', 'actions'))) continue; if(($config->systemMode == 'classic' or ($config->systemMode == 'new' and $this->app->tab != 'execution')) and $value->id == 'project') continue; $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit); diff --git a/module/project/model.php b/module/project/model.php index 6610f4c29f..80b0e598b8 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2130,6 +2130,9 @@ class projectModel extends model $data->product = $productID; $data->branch = $branch; $data->plan = isset($plans[$productID][$branch]) ? implode(',', $plans[$productID][$branch]) : $oldPlan; + $data->plan = trim($data->plan, ','); + $data->plan = empty($data->plan) ? 0 : ",$data->plan,"; + $this->dao->insert(TABLE_PROJECTPRODUCT)->data($data)->exec(); $existedProducts[$productID][$branch] = true; }