* [bug#62348,done,0.5h] fix bug.

This commit is contained in:
sunguangming
2025-05-19 10:26:26 +08:00
committed by 刘刚
parent e5ad439858
commit 3a8b2ceafa
4 changed files with 22 additions and 1 deletions
+13 -1
View File
@@ -1106,7 +1106,19 @@ class execution extends control
if(!empty($project) && in_array($project->model, $this->config->project->waterfallList))
{
if($project->model == 'waterfall') $isStage = true;
$this->view->parentStage = isset($output['parentStage']) ? $output['parentStage'] : 0;
$parentStage = isset($output['parentStage']) ? $output['parentStage'] : 0;
if($parentStage)
{
$parent = $this->execution->fetchById((int)$parentStage);
if($parent->attribute != 'mix')
{
foreach($this->lang->stage->typeList as $type => $label)
{
if($type != $parent->attribute) unset($this->lang->stage->typeList[$type]);
}
}
}
$this->view->parentStage = $parentStage;
$this->view->parentStages = $this->loadModel('programplan')->getParentStageList($projectID, 0, 0, 'withparent|noclosed|' . ($isStage ? 'stage' : 'notstage'));
}
+7
View File
@@ -121,3 +121,10 @@ function toggleOpsTip()
$(this).closest('.form-group').append('<div class="form-tip">' + typeDesc + '</div>');
}
}
function setParentStage()
{
const parentStage = $('input[name=parent]').val();
const type = $('input[name=type]').val();
loadPage($.createLink('execution', 'create', 'projectID=' + projectID + '&executionID=0&copyExecutionID=&planID=0&confirm=no&productID=0&extra=type=' + type + ',parentStage=' + parentStage));
}
+1
View File
@@ -57,6 +57,7 @@ $fields->field('code')
$fields->field('type')
->required()
->labelHint($isStage ? $lang->execution->typeTip : '')
->control($isStage ? 'picker' : 'checkBtnGroup')
->label($showExecutionExec ? $lang->execution->execType : $lang->execution->type)
->name($isStage ? 'attribute' : 'lifetime')
+1
View File
@@ -68,6 +68,7 @@ formGridPanel
on::change('[name=type]', 'setType'),
on::change('[name=begin],[name=end]', 'computeWorkDays'),
on::change('[name=teams]', 'loadMembers'),
on::change('[name=parent]', 'setParentStage'),
on::change('#copyTeam', 'toggleCopyTeam'),
on::click('[name=lifetime]', 'toggleOpsTip'),
set::fields($fields)