* Finish task #7758.

This commit is contained in:
holan20180123
2020-08-31 14:57:44 +08:00
parent 19e7fb8801
commit 7a661001da
41 changed files with 196 additions and 174 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ class programplan extends control
*/
public function commonAction($programID, $productID = 0, $extra = '')
{
$products = $this->loadModel('product')->getPairs($programID);
$products = $this->loadModel('product')->getPairs('', $programID);
$productID = $this->product->saveState($productID, $products);
$this->product->setMenu($products, $productID, 0, 0, '', $extra);
$this->productID = $productID;
@@ -159,7 +159,7 @@ class programplan extends control
$this->app->loadLang('stage');
$this->view->title = $this->lang->programplan->edit;
$this->view->position[] = $this->lang->programplan->edit;
$this->view->parentStage = $this->programplan->getParentStageList($planID, $plan->product);
$this->view->parentStage = $this->programplan->getParentStageList($this->session->program, $planID, $plan->product);
$this->view->plan = $plan;
$this->view->isParent = $this->programplan->isParent($planID);
$this->view->isCreateTask = $this->programplan->isCreateTask($planID);
+3 -2
View File
@@ -876,12 +876,13 @@ class programplanModel extends model
/**
* Get parent stage list.
*
* @param int $programID
* @param int $planID
* @param int $productID
* @access public
* @return array
*/
public function getParentStageList($planID, $productID)
public function getParentStageList($programID, $planID, $productID)
{
$projects = $this->getProjectsByProduct($productID);
unset($projects[$planID]);
@@ -889,7 +890,7 @@ class programplanModel extends model
$parentStage = $this->dao->select('id,name')->from(TABLE_PROJECT)
->where('id')->in($projects)
->andWhere('type')->eq('project')
->andWhere('program')->eq($this->session->program)
->andWhere('program')->eq($programID)
->andWhere('parent')->eq(0)
->andWhere('deleted')->eq('0')
->fetchPairs('id');