Merge branch 'story_37168' into 'master'

* Finish story#37168.

See merge request easycorp/zentaopms!5738
This commit is contained in:
王怡栋
2022-10-14 00:17:47 +00:00
5 changed files with 43 additions and 2 deletions
+1 -1
View File
@@ -58,6 +58,6 @@ $config->programplan->customCreateFields = 'PM,percent,attribute,acl,milestone,r
$config->programplan->custom = new stdclass();
$config->programplan->custom->createFields = 'PM,percent,attribute,acl,milestone';
$config->programplan->custom->customGanttFields = 'PM,deadline,status,realBegan,realEnd,progress,taskProgress,estimate,consumed';
$config->programplan->custom->customGanttFields = 'PM,deadline,status,realBegan,realEnd,progress,taskProgress,estimate,consumed,delay,delayDays';
$config->programplan->ganttCustom = new stdclass();
$config->programplan->ganttCustom->ganttFields = 'PM,deadline';
+9
View File
@@ -60,6 +60,9 @@ $lang->programplan->exporting = 'Exporting';
$lang->programplan->exportFail = 'Failed';
$lang->programplan->hideCriticalPath = 'Hide Critical Path';
$lang->programplan->showCriticalPath = 'Show Critical Path';
$lang->programplan->delay = 'Delay';
$lang->programplan->delayDays = 'Delay days';
$lang->programplan->errorBegin = "Project begin date: %s, begin date should be >= project begin date.";
$lang->programplan->errorEnd = "Project end date: %s, end date should be <= project end date.";
$lang->programplan->emptyBegin = '『Begin』should not be blank';
@@ -70,6 +73,10 @@ $lang->programplan->checkEnd = '『End』should be valid date';
$lang->programplan->milestoneList[1] = 'Yes';
$lang->programplan->milestoneList[0] = 'No';
$lang->programplan->delayList = array();
$lang->programplan->delayList[1] = 'Yes';
$lang->programplan->delayList[0] = 'No';
$lang->programplan->noData = 'No Data';
$lang->programplan->children = 'Sub Plan';
$lang->programplan->childrenAB = 'Child';
@@ -89,6 +96,8 @@ $lang->programplan->ganttCustom['progress'] ='Workload Ratio';
$lang->programplan->ganttCustom['taskProgress'] ='Task Progress';
$lang->programplan->ganttCustom['estimate'] ='Estimate';
$lang->programplan->ganttCustom['consumed'] ='Consumed';
$lang->programplan->ganttCustom['delay'] = 'Delay';
$lang->programplan->ganttCustom['delayDays'] = 'Delay days';
$lang->programplan->error = new stdclass();
$lang->programplan->error->percentNumber = '"Workload %" must be digits.';
+9
View File
@@ -60,6 +60,9 @@ $lang->programplan->exporting = '导出';
$lang->programplan->exportFail = '导出失败';
$lang->programplan->hideCriticalPath = '隐藏关键路径';
$lang->programplan->showCriticalPath = '显示关键路径';
$lang->programplan->delay = '是否延期';
$lang->programplan->delayDays = '延期天数';
$lang->programplan->errorBegin = '阶段的开始时间不能小于所属项目的开始时间%s';
$lang->programplan->errorEnd = '阶段的结束时间不能大于所属项目的结束时间%s';
$lang->programplan->emptyBegin = '『计划开始』日期不能为空';
@@ -70,6 +73,10 @@ $lang->programplan->checkEnd = '『计划完成』应当为合法的日
$lang->programplan->milestoneList[1] = '是';
$lang->programplan->milestoneList[0] = '否';
$lang->programplan->delayList = array();
$lang->programplan->delayList[1] = '是';
$lang->programplan->delayList[0] = '否';
$lang->programplan->noData = '暂无数据。';
$lang->programplan->children = '二级计划';
$lang->programplan->childrenAB = '子';
@@ -89,6 +96,8 @@ $lang->programplan->ganttCustom['progress'] ='工作量占比';
$lang->programplan->ganttCustom['taskProgress'] ='任务进度';
$lang->programplan->ganttCustom['estimate'] ='工时';
$lang->programplan->ganttCustom['consumed'] ='消耗工时';
$lang->programplan->ganttCustom['delay'] = '是否延期';
$lang->programplan->ganttCustom['delayDays'] = '延期天数';
$lang->programplan->error = new stdclass();
$lang->programplan->error->percentNumber = '"工作量比例"必须为数字';
+19
View File
@@ -169,6 +169,7 @@ class programplanModel extends model
}
}
$today = helper::today();
$datas = array();
$planIdList = array();
$isMilestone = "<icon class='icon icon-flag icon-sm red'></icon> ";
@@ -205,6 +206,15 @@ class programplanModel extends model
$data->textColor = $this->lang->execution->gantt->stage->textColor;
$data->bar_height = $this->lang->execution->gantt->bar_height;
/* Determines if the object is delay. */
$data->delay = $this->lang->programplan->delayList[0];
$data->delayDays = 0;
if($today > $end)
{
$data->delay = $this->lang->programplan->delayList[1];
$data->delayDays = helper::diffDate($today, substr($end, 0, 10));
}
if($data->endDate > $data->start_date) $data->duration = helper::diffDate(substr($data->endDate, 0, 10), substr($data->start_date, 0, 10)) + 1;
if($data->start_date) $data->start_date = date('d-m-Y', strtotime($data->start_date));
if($data->start_date == '' or $data->endDate == '') $data->duration = 1;
@@ -285,6 +295,15 @@ class programplanModel extends model
$data->textColor = zget($this->lang->execution->gantt->textColor, $task->pri, $this->lang->execution->gantt->defaultTextColor);
$data->bar_height = $this->lang->execution->gantt->bar_height;
/* Determines if the object is delay. */
$data->delay = $this->lang->programplan->delayList[0];
$data->delayDays = 0;
if($today > $end)
{
$data->delay = $this->lang->programplan->delayList[1];
$data->delayDays = helper::diffDate($today, substr($end, 0, 10));
}
/* If multi task then show the teams. */
if($task->mode == 'multi' and !empty($taskTeams[$task->id]))
{
+5 -1
View File
@@ -560,7 +560,9 @@ $(function()
if(showFields.indexOf('taskProgress') != -1) gantt.config.columns.push({name: 'taskProgress', align: 'center', resize: true, width: 60});
if(showFields.indexOf('realBegan') != -1) gantt.config.columns.push({name: 'realBegan', align: 'center', resize: true, width: 80});
if(showFields.indexOf('realEnd') != -1) gantt.config.columns.push({name: 'realEnd', align: 'center', resize: true, width: 80});
if(showFields.indexOf('consumed') != -1) gantt.config.columns.push({name: 'consumed', align: 'center', resize: false, width: 60});
if(showFields.indexOf('consumed') != -1) gantt.config.columns.push({name: 'consumed', align: 'center', resize: true, width: 60});
if(showFields.indexOf('delay') != -1) gantt.config.columns.push({name: 'delay', align: 'center', resize: true, width: 60});
if(showFields.indexOf('delayDays') != -1) gantt.config.columns.push({name: 'delayDays', align: 'center', resize: false, width: 60});
endField = gantt.config.columns.pop();
endField.resize = false;
@@ -578,6 +580,8 @@ $(function()
gantt.locale.labels.column_duration = "<?php echo $lang->programplan->duration;?>";
gantt.locale.labels.column_estimate = "<?php echo $lang->programplan->estimate;?>";
gantt.locale.labels.column_consumed = "<?php echo $lang->programplan->consumed;?>";
gantt.locale.labels.column_delay = "<?php echo $lang->programplan->delay;?>";
gantt.locale.labels.column_delayDays = "<?php echo $lang->programplan->delayDays;?>";
if((module == 'review' && method == 'assess') || dateDetails) gantt.config.show_chart = false;