Merge branch feature/projecttpl2.0 of zentao/zentaopms (#10053)

This commit is contained in:
刘刚
2025-06-30 17:04:08 +08:00
committed by Gitfox
2 changed files with 16 additions and 3 deletions
+15 -3
View File
@@ -9,7 +9,7 @@ $fields = defineFieldList('project');
$model = data('model');
$hasCode = !empty($config->setCode);
$currency = data('parentProgram') ? data('parentProgram.budgetUnit') : $config->project->defaultCurrency;
$disableStageBy = !empty(data('executions')) || data('app.rawMethod') == 'edit' ? true : false;
$disableStageBy = !empty(data('executions')) || data('app.rawMethod') == 'edit' || !empty(data('copyProject'));
$fields->field('parent')
->control('picker', array('required' => true))
@@ -46,6 +46,18 @@ $fields->field('PM')->control('picker')->items(data('PMUsers'));
unset($lang->project->endList[999]);
$isLongTime = data('project.end') == LONG_TIME;
$copyProject = data('copyProject');
if($copyProject)
{
$beginValue = $copyProject->begin;
$endValue = $copyProject->end == LONG_TIME ? '' : $copyProject->end;
}
else
{
$beginValue = data('project.begin') ? data('project.begin') : date('Y-m-d');
$endValue = data('project.end') == LONG_TIME ? '' : data('project.end');
}
$fields->field('begin')
->label($lang->project->planDate)
->required()
@@ -54,10 +66,10 @@ $fields->field('begin')
->control('dateRangePicker')
->beginName('begin')
->beginPlaceholder($lang->project->begin)
->beginValue(data('project.begin') ? data('project.begin') : date('Y-m-d'))
->beginValue($beginValue)
->endName('end')
->endPlaceholder($lang->project->end)
->endValue(data('project.end') == LONG_TIME ? '' : data('project.end'))
->endValue($endValue)
->endDisabled($isLongTime)
->endList($lang->project->endList)
->itemEnd()
+1
View File
@@ -47,6 +47,7 @@ $fields->field('days')
->control('input', array('className' => $copyProject ? 'has-warning' : ''))
->className($copyProject ? 'has-warning' : '')
->tip($copyProject ? $lang->project->copyProject->daysTips : null)
->value($copyProject ? data('copyProject.days') : '')
->tipClass($copyProject ? 'text-warning' : null);
$fields->field('productsBox')->hidden(data('copyProject') && data('copyProject.hasProduct') == 0);