From c5e340855dc03ccbfd67813d5a753288fad3a5f7 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 27 Sep 2021 15:12:59 +0800 Subject: [PATCH] * Finish task #42867. --- module/company/control.php | 22 +++++++++++----------- module/company/js/dynamic.js | 10 +++++----- module/company/view/dynamic.html.php | 8 ++++---- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/module/company/control.php b/module/company/control.php index e0b8079d65..dc3c9da54e 100644 --- a/module/company/control.php +++ b/module/company/control.php @@ -164,13 +164,13 @@ class company extends control * @param string $date * @param string $direction next|pre * @param int $userID - * @param int $product - * @param int $project - * @param int $execution + * @param int $productID + * @param int $projectID + * @param int $executionID * @access public * @return void */ - public function dynamic($browseType = 'today', $param = '', $recTotal = 0, $date = '', $direction = 'next', $userID = '', $product = 0, $project = 0, $execution = 0) + public function dynamic($browseType = 'today', $param = '', $recTotal = 0, $date = '', $direction = 'next', $userID = '', $productID = 0, $projectID = 0, $executionID = 0) { $this->company->setMenu(); $this->app->loadLang('user'); @@ -242,10 +242,10 @@ class company extends control /* Get actions. */ if($browseType != 'bysearch') { - $product = $product ? $product : 'all'; - $project = $project ? $project : 'all'; - $execution = $execution ? $execution : 'all'; - $actions = $this->action->getDynamic($account, $browseType, $sort, $pager, $product, $project, $execution, $date, $direction); + if(!$productID) $productID = 'all'; + if(!$projectID) $projectID = 'all'; + if(!$executionID) $executionID = 'all'; + $actions = $this->action->getDynamic($account, $browseType, $sort, $pager, $productID, $projectID, $executionID, $date, $direction); } else { @@ -278,9 +278,9 @@ class company extends control $this->view->browseType = $browseType; $this->view->account = $account; $this->view->accountPairs = $accountPairs; - $this->view->product = $product; - $this->view->project = $project; - $this->view->execution = $execution; + $this->view->productID = $productID; + $this->view->projectID = $projectID; + $this->view->executionID = $executionID; $this->view->queryID = $queryID; $this->view->orderBy = $orderBy; $this->view->pager = $pager; diff --git a/module/company/js/dynamic.js b/module/company/js/dynamic.js index 2cbfb64c2c..5562c04046 100644 --- a/module/company/js/dynamic.js +++ b/module/company/js/dynamic.js @@ -1,10 +1,10 @@ $('#account, #product, #project, #execution').change(function() { - var userID = $('#account').val(); - var product = $('#product').val(); - var project = systemMode == 'new' ? $('#project').val() : 0; - var execution = $('#execution').val(); + var userID = $('#account').val(); + var productID = $('#product').val(); + var projectID = systemMode == 'new' ? $('#project').val() : 0; + var executionID = $('#execution').val(); browseType = browseType == 'bysearch' ? 'all' : browseType; - link = createLink('company', 'dynamic', 'browseType=' + browseType + '¶m=&recTotal=0&date=&direction=next&userID=' + userID + '&product=' + product + '&project=' + project + '&execution=' + execution); + link = createLink('company', 'dynamic', 'browseType=' + browseType + '¶m=&recTotal=0&date=&direction=next&userID=' + userID + '&productID=' + productID + '&projectID=' + projectID + '&executionID=' + executionID); location.href = link; }) diff --git a/module/company/view/dynamic.html.php b/module/company/view/dynamic.html.php index 3fd2b3f482..6e2a4f9711 100644 --- a/module/company/view/dynamic.html.php +++ b/module/company/view/dynamic.html.php @@ -24,15 +24,15 @@ $active = 'btn-active-text'; $label .= " {$pager->recTotal}"; } - echo html::a(inlink('dynamic', "browseType=$period¶m=&recTotal=0&date=&direction=next&userID=$userID&product=$product&project=$project&execution=$execution"), $label, '', "class='btn btn-link $active' id='{$period}'") + echo html::a(inlink('dynamic', "browseType=$period¶m=&recTotal=0&date=&direction=next&userID=$userID&productID=$productID&projectID=$projectID&executionID=$executionID"), $label, '', "class='btn btn-link $active' id='{$period}'") ?>
-
+
systemMode == 'new'):?> -
+
-
+
action->dynamic->search;?>