* fix bug #25531,25536,25541,25550,25552,25561

This commit is contained in:
wangyidong
2022-07-21 16:56:14 +08:00
parent 08bc30c893
commit 6576f0ccc4
2 changed files with 17 additions and 35 deletions
+2 -22
View File
@@ -206,7 +206,7 @@ class programplanModel extends model
$stageIndex[$plan->id] = array('planID' => $plan->id, 'parent' => $plan->parent, 'progress' => array('totalConsumed' => 0, 'totalReal' => 0));
}
$taskSign = "<span>[ T ] </span>";
$taskSign = "<span class='task-label'>[ T ] </span>";
$taskPri = "<span class='label-pri label-pri-%s' title='%s'>%s</span> ";
/* Judge whether to display tasks under the stage. */
@@ -233,8 +233,6 @@ class programplanModel extends model
}
}
$minStartDate = '';
$maxDeadline = '';
foreach($tasks as $task)
{
$execution = zget($plans, $task->execution, array());
@@ -278,25 +276,7 @@ class programplanModel extends model
if($data->start_date) $data->start_date = date('d-m-Y', strtotime($data->start_date));
if($data->start_date == '' or $data->endDate == '') $data->duration = 0;
if(strpos($selectCustom, 'task') !== false)
{
$datas['data'][$data->id] = $data;
if(isset($datas['data'][$task->execution]))
{
$changed = false;
if($start and strtotime($start) < strtotime($datas['data'][$task->execution]->start_date))
{
$changed = true;
$datas['data'][$task->execution]->start_date = date('d-m-Y', strtotime($start));
}
if($end and $end > $datas['data'][$task->execution]->endDate)
{
$changed = true;
$datas['data'][$task->execution]->endDate = $end;
}
if($changed) $datas['data'][$task->execution]->duration = helper::diffDate($datas['data'][$task->execution]->endDate, $datas['data'][$task->execution]->start_date) + 1;
}
}
if(strpos($selectCustom, 'task') !== false) $datas['data'][$data->id] = $data;
foreach($stageIndex as $index => $stage)
{
if($stage['planID'] == $task->execution)