* finish task #62889

This commit is contained in:
lanzongjun
2022-08-03 09:28:39 +08:00
parent f47ab8a359
commit 1ae1352f11
6 changed files with 24 additions and 10 deletions
+1
View File
@@ -84,3 +84,4 @@ $lang->programplan->error->createdTask = 'The task has been decomposed. Sub
$lang->programplan->error->parentWorkload = 'The sum of the workload of the child phase cannot be greater than that of the parent phase: %s.';
$lang->programplan->error->parentDuration = 'The planned start and planned completion of the child phase cannot exceed the parent phase.';
$lang->programplan->error->sameName = 'Stage name cannot be the same!';
$lang->programplan->error->taskDrag = 'The %s task cannot be dragged';
+1
View File
@@ -84,3 +84,4 @@ $lang->programplan->error->createdTask = 'The task is decomposed. Sub stages
$lang->programplan->error->parentWorkload = 'The sum of the workload in the sub stage cannot be > that in the parent stage: %s.';
$lang->programplan->error->parentDuration = 'The planned start and planned completion of the child phase cannot exceed the parent phase.';
$lang->programplan->error->sameName = 'Stage name cannot be the same!';
$lang->programplan->error->taskDrag = 'The %s task cannot be dragged';
+1
View File
@@ -84,3 +84,4 @@ $lang->programplan->error->createdTask = 'The task has been decomposed. Sub
$lang->programplan->error->parentWorkload = 'The sum of the workload of the child phase cannot be greater than that of the parent phase: %s.';
$lang->programplan->error->parentDuration = 'The planned start and planned completion of the child phase cannot exceed the parent phase.';
$lang->programplan->error->sameName = 'Stage name cannot be the same!';
$lang->programplan->error->taskDrag = 'The %s task cannot be dragged';
+1
View File
@@ -84,3 +84,4 @@ $lang->programplan->error->createdTask = '已分解任务,不可添加子
$lang->programplan->error->parentWorkload = '子阶段的工作量之和不能大于父阶段的工作量:%s';
$lang->programplan->error->parentDuration = '子阶段计划开始、计划完成不能超过父阶段';
$lang->programplan->error->sameName = '阶段名称不能相同!';
$lang->programplan->error->taskDrag = '%s的任务不可以拖动';
+3 -3
View File
@@ -390,9 +390,9 @@ function validateResources(id)
flag = true;
/* Check status. */
if(status !== statusLang)
if(status !== statusLang && type === 'task')
{
new $.zui.Messager(status + '的任务不可以拖动', {
new $.zui.Messager("<?php echo $lang->programplan->error->taskDrag;?>".replace('%s', status), {
type: 'danger',
icon: 'exclamation-sign'
}).show();
@@ -459,7 +459,7 @@ $(function()
gantt.config.readonly = false;
gantt.config.order_branch = true;
gantt.config.details_on_dblclick = false;
gantt.config.drag_progress = true;
gantt.config.drag_progress = false;
gantt.config.drag_links = false;
gantt.config.drag_resize = false;
gantt.config.smart_rendering = true;
+17 -7
View File
@@ -3934,6 +3934,14 @@ class taskModel extends model
return dao::$errors = sprintf($this->lang->task->overTime, $arg, $arg);
}
$updateStartArg = !empty($objectData->realStarted) ? 'realStarted' : 'estStarted';
$updateEndArg = !empty($objectData->finishedDate) ? 'finishedDate' : 'deadline';
$this->dao->update(TABLE_TASK)
->set($updateStartArg)->eq($post->start_date)
->set($updateEndArg)->eq($post->end_date)
->set('lastEditedBy')->eq($this->app->user->account)
->where('id')->eq($objectID)
->exec();
}
elseif($objectType == 'plan')
{
@@ -3962,19 +3970,21 @@ class taskModel extends model
$arg = !empty($parent) ? $this->lang->programplan->parent : $this->lang->project->common;
return dao::$errors = sprintf($this->lang->task->overTime, $arg, $arg);
}
$updateStartArg = !empty($objectData->realBegan) ? 'realBegan' : 'begin';
$updateEndArg = !empty($objectData->realEnd) ? 'realEnd' : 'end';
$this->dao->update(TABLE_PROJECT)
->set($updateStartArg)->eq($post->start_date)
->set($updateEndArg)->eq($post->end_date)
->set('lastEditedBy')->eq($this->app->user->account)
->where('id')->eq($objectID)
->exec();
}
else
{
return false;
}
$this->dao->update(TABLE_TASK)
->set('estStarted')->eq($post->start_date)
->set('deadline')->eq($post->end_date)
->set('lastEditedBy')->eq($this->app->user->account)
->where('id')->eq($objectID)
->exec();
return true;
}
}