Merge branch 'sprint/201_tianshujie_57095' into 'master'

Sprint/201 tianshujie 57095

See merge request easycorp/zentaopms!3964
This commit is contained in:
王怡栋
2022-06-16 03:24:29 +00:00
6 changed files with 17 additions and 18 deletions
+1 -1
View File
@@ -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';
+2 -11
View File
@@ -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();
}
+3 -2
View File
@@ -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;}
+1 -1
View File
@@ -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)
+7 -3
View File
@@ -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);
+3
View File
@@ -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;
}