From f3393c58b51c49ee679bf5d56c751941fa710dbe Mon Sep 17 00:00:00 2001 From: wangyuting Date: Mon, 28 Apr 2025 09:45:58 +0800 Subject: [PATCH] * [task#142086,doing,1h,2h] Check if deliverable has been uploaded when edit execution. --- module/execution/control.php | 2 +- module/execution/js/batchedit.ui.js | 1 + module/programplan/js/create.ui.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 2081fcd549..4f24b646b7 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1342,7 +1342,7 @@ class execution extends control } $executionIDList = $this->post->executionIDList; - $executions = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->in($executionIDList)->fetchAll('id'); + $executions = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->in($executionIDList)->fetchAll('id', false); $relatedProjects = $this->dao->select('id,project')->from(TABLE_PROJECT)->where('id')->in($executionIDList)->fetchPairs(); /* 获取执行所属的项目列表。*/ $projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->in($relatedProjects)->fetchAll('id'); /* 获取执行所属的项目列表中每个项目的项目信息。*/ diff --git a/module/execution/js/batchedit.ui.js b/module/execution/js/batchedit.ui.js index 7e5513263f..8f7344ef8b 100644 --- a/module/execution/js/batchedit.ui.js +++ b/module/execution/js/batchedit.ui.js @@ -11,6 +11,7 @@ window.renderRowData = function($row, index, row) { let $attribute = info[0]; $attribute.render({items: stageItems, required: true, name: 'attribute', disabled: row.grade > 1 && parentType != 'mix'}); + if(typeof row != 'undefined' && typeof row.hasDeliverable != 'undefined') $attribute.render({disabled: true}); $(e.target).attr('data-parent', row.parent); }); } diff --git a/module/programplan/js/create.ui.js b/module/programplan/js/create.ui.js index c4625bce27..ae02e2ab85 100644 --- a/module/programplan/js/create.ui.js +++ b/module/programplan/js/create.ui.js @@ -203,7 +203,7 @@ window.handleRenderRow = function($row, index, data) } }); - /* 有交付物的阶段无法变更阶段类型。 */ + /* 已关闭且有交付物的阶段无法变更阶段类型。 */ $row.find('[data-name="attribute"]').find('.picker-box').on('inited', function(e, info) { if(typeof data != 'undefined' && typeof data.hasDeliverable != 'undefined') info[0].render({disabled: true});